Updated to fedora-glibc-2_3-20050216T1256
[glibc.git] / linuxthreads / ChangeLog
blob4c80a83534635d6a8060bfabbdaec1b708c36367
1 2005-02-09  Daniel Jacobowitz  <dan@codesourcery.com>
3         [BZ #740]
4         * descr.h (__pthread_find_self, thread_self): Mark as pure
5         instead of const.
7 2005-02-07  Jakub Jelinek  <jakub@redhat.com>
9         [BZ #739]
10         * specific.c (pthread_key_delete): If pthread_create has not been
11         called yet, clear p_specific for the current thread.
12         * Makefile (tests): Add tst-tsd1.
13         * tst-tsd1.c: New test.
15 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
17         [BZ #723]
18         * Makefile (tests): Add tst-align.
19         * tst-align.c: New test.
20         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Add
21         -mpreferred-stack-boundary=4.
23 2004-12-12  Ulrich Drepper  <drepper@redhat.com>
25         * internals.h: Include <stdbool.h> to match includes used in nptl.
27 2004-12-01  Jakub Jelinek  <jakub@redhat.coM.
29         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
30         _POSIX_THREAD_CPUTIME): Define to 0.
31         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
32         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
33         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
34         __timer_signal_thread_tclk): Remove.
35         (init_module): Remove their initialization.
36         (thread_cleanup): Remove their cleanup assertions.
37         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
38         __timer_signal_thread_tclk): Remove.
39         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
40         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
41         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
42         * tst-clock1.c (do_test): Check for availability of CPU clock.
44 2004-11-18  Daniel Jacobowitz  <dan@codesourcery.com>
46         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: Update RETINSTR use.
47         * sysdeps/unix/sysv/linux/arm/vfork.S: Likewise.
49 2004-12-02  Roland McGrath  <roland@redhat.com>
51         * Makefile (libpthread-nonshared): Variable removed.
52         ($(objpfx)libpthread_nonshared.a): Target removed.
53         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
54         These are now handled by generic magic from
55         libpthread-static-only-routines being set.
57 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
59         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
60         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
61         _POSIX_THREAD_PRIO_PROTECT): Define.
62         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
63         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
64         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
66 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
68         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
69         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
70         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
71         _POSIX_TYPED_MEMORY_OBJECTS): Define.
72         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
73         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
74         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
76 2004-11-05  Maciej W. Rozycki  <macro@mips.com>
78         * sysdeps/mips/pspinlock.c: Include <sgidefs.h>.  Use _ABIO32,
79         _ABIN32 and _ABI64 for ABI selection throughout.
80         * sysdeps/mips/pt-machine.h: Use _ABIO32, _ABIN32 and _ABI64 for
81         ABI selection throughout.
83 2004-10-18  Roland McGrath  <roland@redhat.com>
85         [BZ #406]
86         * Makefile (linuxthreads-CPPFLAGS): New variable;
87         adds -DIS_IN_linuxthreads=1.
88         * sysdeps/i386/tls.h: Protect "useldt.h" with
89         [!IS_IN_linuxthreads && !DO_MODIFY_LDT].
90         * sysdeps/i386/i686/pt-machine.h: Revert last change.
92 2004-10-14  Jakub Jelinek  <jakub@redhat.com>
94         * sysdeps/pthread/errno-loc.c: Don't undef #errno
95         if RTLD_PRIVATE_ERRNO.
97 2004-10-05  Dwayne Grant McConnell  <dgm69@us.ibm.com>
99         * pthread.c: Mask restart signal during cancel signal handler.
101 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
103         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
104         _POSIX_THREAD_CPUTIME): Define to 0.
106 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
108         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Set _POSIX_CPUTIME
109         and _POSIX_THREAD_CPUTIME to zero.
110         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
112         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
113         _POSIX_THREAD_PROCESS_SHARED and _POSIX_CLOCK_SELECTION as -1.
114         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
115         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
116         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
118 2004-09-25  Roland McGrath  <roland@redhat.com>
120         [BZ #406]
121         * sysdeps/i386/i686/pt-machine.h: Don't #include "../useldt.h" if
122         [_TLS_H], since sysdeps/i386/tls.h includes it after including us.
124 2004-09-24  Roland McGrath  <roland@redhat.com>
126         [BZ #406]
127         * sysdeps/i386/tls.h: Move #include "useldt.h" outside
128         of [__ASSUME_LDT_WORKS > 0] test.
129         Reported by Carlos Velasco <carlos.velasco@newipnet.com>.
131 2004-09-21  Roland McGrath  <roland@redhat.com>
133         * Versions: Add comment about linuxthreads' frozen ABI.
135 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
137         * Versions: Remove exports for pthread_set*id_np functions.
138         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
139         for now.
140         * Makefile: Don't build pthread_set*id code for now.
142 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
144         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
145         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
146         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
147         and pthread_setresuid_np.
148         * pthread_setgid_np.c: New file.
149         * pthread_setuid_np.c: New file.
150         * pthread_setegid_np.c: New file.
151         * pthread_seteuid_np.c: New file.
152         * pthread_setregid_np.c: New file.
153         * pthread_setreuid_np.c: New file.
154         * pthread_setresgid_np.c: New file.
155         * pthread_setresuid_np.c: New file.
156         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
157         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
158         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
159         and pthread_setresuid_np.
160         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
161         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
162         pthread_setregid, and pthread_setresgid.
164 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
166         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
167         for __USE_XOPEN2K.
168         * sysdeps/pthread/bits/pthreadtypes.h: Define rwlock types also
169         for __USE_XOPEN2K.  [BZ #320]
171 2004-09-04  Jakub Jelinek  <jakub@redhat.com>
173         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
175 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
177         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
178         the initialization function might throw.
180 2004-08-30  Roland McGrath  <roland@frob.com>
182         * Makefile (libpthread-abi-frozen): New variable.
184 2004-08-26  Roland McGrath  <roland@redhat.com>
186         * configure.in: New file.  If nptl add-on is also selected, barf if
187         explicit and elide ourselves if implicit.
188         * configure: Now generated.
190 2004-08-25  Richard Sandiford  <rsandifo@redhat.com>
192         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h (CENABLE, CDISABLE,
193         __local_multiple_threads): Fix definitions for IS_IN_librt.
194         * sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h: Likewise.
196 2004-08-22  Andreas Schwab  <schwab@suse.de>
198         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO) [IS_IN_librt]:
199         Save gp around CENABLE/CDISABLE calls.
201 2004-08-15  Roland McGrath  <roland@frob.com>
203         * pthread_atfork.c: Update copyright terms including special exception
204         for these trivial files, which are statically linked into executables
205         that use dynamic linking for the significant library code.
207 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
209         * libc-tsd.c: Move resolv.h include before the #if.
210         (__res_maybe_init): New function.  Add libc_hidden_def.
212 2004-08-02  Ulrich Drepper  <drepper@redhat.com>
214         * linuxthreads.texi (Cleanup Handlers): Fix typo.
215         Reported by Bjoern Engelmann <bjengelmann@gmx.de>.
217 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
219         [BZ #284]
220         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
221         instead of clockid_t.
223 2004-07-21  Roland McGrath  <roland@redhat.com>
225         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
227 2004-07-02  Roland McGrath  <roland@redhat.com>
229         * configure: Don't exit.
231 2004-07-20  Alexandre Oliva  <aoliva@redhat.com>
233         * sysdeps/mips/pt-machine.h: Use standard names for ABI macros,
234         include sgidefs.h.
235         * sysdeps/mips/atomicity.h: Likewise.
237 2004-07-19  Alexandre Oliva  <aoliva@redhat.com>
239         * sysdeps/unix/sysv/linux/mips/Makefile (CFLAGS-pt-initfini.s):
240         Remove redundant override that missed -g0.
242 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
244         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
245         (__local_multiple_threads): Define for librt.
246         (SINGLE_THREAD_P): Likewise.
248 2004-07-07  Jakub Jelinek  <jakub@redhat.com>
250         * sysdeps/pthread/getcpuclockid.c (pthread_getcpuclockid): Allow
251         using other thread's clock.
252         * ptclock_gettime.c (__pthread_clock_gettime): Likewise.
253         * ptclock_settime.c (__pthread_clock_settime): Likewise.
254         * internals.h (__pthread_clock_gettime, __pthread_clock_settime):
255         Remove prototypes.
256         Reported by Bernd Schmidt <bernds@redhat.com>.
257         * Makefile (librt-tests): Add tst-clock1.
258         * tst-clock1.c: New test.
260         * sysdeps/x86_64/Versions: New file.
261         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
262         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
264 2004-04-16  Andreas Schwab  <schwab@suse.de>
266         * sysdeps/ia64/tls.h (INIT_SYSINFO): Cast dl_sysinfo to void*.
268 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
270         * sysdeps/s390/pspinlock.c (__pthread_spin_lock,
271         __pthread_spin_trylock): Use constraint "m" instead of "0" for
272         futex.
273         * sysdeps/ia64/pt-machine.h (__compare_and_swap,
274         __compare_and_swap_with_release_semantic, testandset): Use
275         constraint "m" instead of "0" for futex.
277 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
279         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Fix
280         branch offset for a PLT entry.
281         (CDISABLE): Likewise.
283 2004-05-31  Andreas Jaeger  <aj@suse.de>
285         * sysdeps/unix/sysv/linux/mips/Makefile (CFLAGS-pt-initfini.s):
286         Set to -fno-unit-at-a-time.
287         Patch by Dan Kegel <dank@kegel.com>.
289 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
291         * tst-stack1.c: Don't include mcheck.h.
292         (do_test): Make sure user defined stacks aren't reused,
293         don't free them at the end.  [BZ #110]
295 2004-05-02  Jakub Jelinek  <jakub@redhat.com>
297         * manager.c: Include not-cancel.h.
298         (__pthread_manager): Use read_not_cancel instead of __libc_read.
299         (pthread_start_thread, __pthread_manager_sighandler): Use
300         write_not_cancel instead of __libc_write.
301         (pthread_reap_children): Use waitpid_not_cancel instead of
302         __libc_waitpid.
303         * pthread.c: Include not-cancel.h.
304         (__pthread_initialize_minimal, __pthread_create_2_1,
305         pthread_onexit_process, __pthread_message): Use
306         write_not_cancel instead of __libc_write.
307         (__pthread_initialize_manager): Likewise.  Use close_not_cancel
308         instead of __libc_close.
309         (__pthread_reset_main_thread): Use close_not_cancel instead of
310         __libc_close.
311         * join.c: Include not-cancel.h.
312         (__pthread_do_exit, pthread_join, pthread_detach): Use
313         write_not_cancel instead of __libc_write.
314         * semaphore.c: Include not-cancel.h.
315         (__new_sem_post): Use write_not_cancel instead of __libc_write.
316         * specific.c: Include not-cancel.h.
317         (pthread_key_delete): Use write_not_cancel instead of __libc_write.
319 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
321         * Versions (libc): Add __on_exit and __libc_sigaction.
323 2004-04-28  Jakub Jelinek  <jakub@redhat.com>
325         * semaphore.c (sem_timedwait): Return -1 and set errno instead of
326         returning error number [BZ #133].  Patch by <rmhaddad@yahoo.com>.
328 2004-04-22  SUGIOKA Toshinobu  <sugioka@itonet.co.jp>
330         * sysdeps/unix/sysv/linux/sh/vfork.S: Fix wrong function pointer
331         reference in PIC case.
333 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
335         * oldsemaphore.c (SEM_VALUE_MAX): Remove.
337 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
339         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Define
340         for librt.  Save the return value to a safe register.
341         (CDISABLE): Define for librt.  Set the function argument correctly.
343 2004-04-18  Jakub Jelinek  <jakub@redhat.com>
345         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
346         (PSEUDO_CANCEL): Define.
347         (PSEUDO): Use it.
348         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
349         CDISABLE): For librt, append @PLT.
351 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
353         * sysdeps/x86_64/tls.h [!__ASSEMBLER__]: Include tcb-offsets.h.
355         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
356         return it_value { 0, 0 }.
357         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
358         like SIGEV_SIGNAL.
359         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
360         assertion for SIGEV_NONE.
361         (thread_attr_compare): Compare all attributes, not just a partial
362         subset.
364         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
366 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
368         * semaphore.h (SEM_VALUE_MAX): Just use a plain number.
370 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
372         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix last patch.
374 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
376         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
378 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
380         * sysdeps/unix/sysv/linux/mq_notify.c: New file.
382         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE): Define
383         for librt.
384         (CDISABLE): Likewise.
386 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
388         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
389         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
390         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
391         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
392         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
393         Define.
394         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
395         (_POSIX_MESSAGE_PASSING): Define.
397 2004-04-10  Andreas Jaeger  <aj@suse.de>
399         * sysdeps/x86_64/pt-machine.h: Add used attribute to stack_pointer
400         to avoid warnings with GCC 3.5.
402 2004-04-09  Steven Munroe  <sjmunroe@us.ibm.com>
404         * sysdeps/powerpc/tls.h (TLS_INIT_TP): Eliminate lvalue cast from
405         __thread_self assignment.
406         (THREAD_DTV): Replace __thread_register with __thread_self.
407         (INIT_THREAD_SELF): Eliminate lvalue cast from __thread_self
408         assignment.
410 2004-04-08  Alexandre Oliva  <aoliva@redhat.com>
412         * signals.c (pthread_sigmask): Don't ever block or mask
413         __pthread_sig_debug.
415 2004-03-11  Steven Munroe  <sjmunroe@us.ibm.com>
417         * sysdeps/powerpc/tls.h: Remove __powerpc64__ conditional.
419 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
421         * sysdeps/ia64/pt-machine.h (BUSY_WAIT_NOP): Define.
422         * sysdeps/x86_64/pt-machine.h (BUSY_WAIT_NOP): Likewise.
424 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
426         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add HOST_NAME_MAX.
427         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
428         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
429         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
431 2004-03-08  Andreas Jaeger  <aj@suse.de>
433         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT_KERNEL_CHECK):
434         dl_osversion is readonly.
436 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
438         * sysdeps/i386/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
439         _rtlf_global_ro.
440         * sysdeps/ia64/tls.h (INIT_SYSINFO): Likewise.
442 2004-02-20  Steven Munroe  <sjmunroe@us.ibm.com>
444         * sysdeps/unix/sysv/linux/powerpc/ptlongjmp.c [SHARED]: Code only
445         valid for SHARED case.  Correct spelling of __vmx_longjmp.
447         * sysdeps/powerpc/pspinlock.c: Move from here.
448         * sysdeps/powerpc/powerpc32/pspinlock.c: To here.
449         * sysdeps/powerpc/powerpc64/pspinlock.c: New file.
450         * sysdeps/powerpc/powerpc64/pt-machine.h: Define __compare_and_swap32
451         and __compare_and_swap32_with_release_semantics.
453 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
455         * Makefile (generated): Remove tst-stack1.mtrace and tst-stack1-mem.
456         (tests): Remove $(objpfx)tst-stack1-mem.
457         (tst-stack1-ENV): Remove.
458         ($(objpfx)tst-stack1-mem): Remove.
460         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
461         (__syscall_error_handler2): Call CDISABLE.
462         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
463         (__syscall_error_handler2): Call CDISABLE.
465         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
467 2004-02-10  Steven Munroe  <sjmunroe@us.ibm.com>
469         * Makefile (libpthread-routines): Add ptcleanup.
470         * ptlongjmp.c: Removed.
471         * ptcleanup.c: Copied __pthread_cleanup_upto to here. New file.
472         * sysdeps/pthread/ptlongjmp.c: Copied longjmp to here. New file.
473         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
474         Version longjmp, siglongjmp for GLIBC_2.3.4.
475         * sysdeps/unix/sysv/linux/powerpc/ptlongjmp.c: New File.
477 2004-01-22  Andreas Jaeger  <aj@suse.de>
479         * spinlock.c (__pthread_lock): Fix contraint to avoid warning.
480         (__pthread_release): Likewise.
482 2004-01-16  Richard Henderson  <rth@redhat.com>
484         * attr.c: Include ldsodefs.h.
485         (pthread_getattr_np): Don't declare __libc_stack_end.
487 2004-01-09  Steven Munroe  <sjmunroe@us.ibm.com>
489         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
490         [!HAVE_TLS_SUPPORT]: Define SINGLE_THREAD_P using static
491         __lib*_multiple_threads.
492         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
493         [!HAVE_TLS_SUPPORT]: Likewise.
495 2004-01-13  Roland McGrath  <roland@redhat.com>
497         * sysdeps/powerpc/tcb-offsets.sym: Put -- separator line before any
498         conditionals.
500 2004-01-10  Andreas Jaeger  <aj@suse.de>
502         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Add cfi directives.
504 2004-01-01  Andreas Jaeger  <aj@suse.de>
506         * Makefile (generated): Add missing files.
508 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
510         * attr.c (pthread_getattr_np): Make sure stack info returned for
511         main thread does not overlap with any other VMA.
512         Patch by Jakub Jelinek.
514 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
516         * sysdeps/ia64/tls.h: Include dl-sysdep.h.
517         (INIT_SYSINFO): Define.
518         (TLS_INIT_TP): Use it.
520 2003-12-28  Carlos O'Donell  <carlos@baldric.uwo.ca>
522         * attr.c (pthread_getattr_np): Add _STACK_GROWS_UP case.
524 2003-12-26  Jakub Jelinek  <jakub@redhat.com>
526         * sysdeps/pthread/pthread.h (pthread_setcancelstate,
527         pthread_setcanceltype, pthread_cancel, pthread_testcancel): Remove
528         __THROW.
529         * semaphore.h (sem_wait, sem_timedwait): Likewise.
531 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
533         * manager.c (pthread_free): Call _dl_deallocate_tls even for
534         p_userstack threads.
535         * pthread.c (__pthread_initialize_manager): Call _dl_deallocate_tls
536         on error.
537         (pthread_onexit_process): Update comment.
538         * Makefile (tests): Add tst-stack1.  Depend on $(objpfx)tst-stack1-mem.
539         (generated): Add tst-stack1.mtrace and tst-stack1-mem.
540         (tst-stack1-ENV): Set.
541         ($(objpfx)tst-stack1-mem): New.
542         * tst-stack1.c: New test.
544 2003-12-16  Steven Munroe  <sjmunroe@us.ibm.com>
546         * sysdeps/powerpc/tcb-offsets.sym [!__powerpc64__]: Remove
547         conditional so MULTIPLE_THREADS_OFFSET is generated for both.
548         * sysdeps/powerpc/tls.h [!__powerpc64__]: Remove conditional
549         so TLS_MULTIPLE_THREADS_IN_TCB is generated for both.
550         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h:
551         Include tls.h.
553 2003-12-04  Steven Munroe  <sjmunroe@us.ibm.com>
555         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
556         (SINGLE_THREAD_P): Test using thread local p_multiple_threads field.
558 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
560         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Update copyright
561         message.  Add include of <stddef.h>.
562         (INIT_NEW_WAY): New macro.
563         (INIT_OLD_WAY): Likewise.
564         (_init): Add unwind directives.  Invoke
565         __pthread_initialize_minimal() via INIT_NEW_WAY or INIT_OLD_WAY,
566         respectively.
567         (_init_EPILOG_BEGINS): Add unwind-directives.  Drop unused .regstk
568         directive.
569         (_fini): Add unwind directives.  Drop unnecessary .align 16
570         directive (bundles are always 16-byte aligned).
571         (_fini_EPILOG_BEGINS): Add unwind-directives.
573 2003-11-19  David Mosberger  <davidm@hpl.hp.com>
575         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
577 2003-12-10  Andreas Jaeger  <aj@suse.de>
578             Ruediger Oertel  <ro@suse.de>
580         * sysdeps/alpha/elf/pt-initfini.c (__asm__): Remove extra .prologue.
582 2003-11-30  Andreas Jaeger  <aj@suse.de>
584         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
585         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
586         Likewise.
588 2003-11-04  Jakub Jelinek  <jakub@redhat.com>
590         * signals.c (__pthread_sigaction): Set __sighandler[sig].old before
591         __libc_sigaction if it has been one of the special values before.
593 2003-10-06  Carlos O'Donell <carlos@baldric.uwo.ca>
595         * pthread.c (__pthread_self_stack): _STACK_GROWS_UP case added.
596         (__pthread_find_self): Likewise.
597         * manager.c (thread_segment): _STACK_GROWS_UP case added.
599 2003-10-10  Carlos O'Donell  <carlos@baldric.uwo.ca>
601         * linuxthreads/sysdeps/unix/sysv/linux/hppa/malloc-machine.h: New file.
603 2003-10-10  Carlos O'Donell  <carlos@baldric.uwo.ca>
605         * sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h: New file.
607 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
609         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
610         changes.
611         (SAVE_OLDTYPE_0): Fix a typo.
613 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
615         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
616         correct offset.
618 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
620         * Makefile (tests): Add tst-cancel8.
621         * tst-cancel8.c: New test.
623 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
625         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
626         restoring of the old cancellation type.
628 2003-09-10  Chris Demetriou  <cgd@broadcom.com>
630         * sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h: New file.
632 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
634         * sysdeps/pthread/malloc-machine.h [!__libc_maybe_call2] (mutex_init,
635         mutex_lock, mutex_trylock, mutex_unlock): Remove.
637 2003-09-27  Wolfram Gloger  <wg@malloc.de>
639         * sysdeps/pthread/malloc-machine.h: New file.
641 2003-09-18  H.J. Lu  <hongjiu.lu@intel.com>
643         * attr.c (__pthread_attr_init_2_1): Double __guardsize size
644         if NEED_SEPARATE_REGISTER_STACK is defined.
646 2003-09-22  Philip Blundell  <philb@gnu.org>
648         * forward.c: Add _pthread_cleanup_push, _pthread_cleanup_pop.
649         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
650         Likewise.
651         * pthread.c (__pthread_elements): Initialise these new elements.
652         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Use
653         __libc_maybe_call.
654         (__libc_cleanup_pop): Likewise.
656 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
658         * attr.c: Include stdlib.h.
660 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
662         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
664         * tst-attr1.c: New test.
665         * Makefile (tests): Add tst-attr1.
667 2003-09-17  Philip Blundell  <philb@gnu.org>
669         * sysdeps/unix/sysv/linux/arm/vfork.S: Branch to fork if
670         libpthread is loaded.  Elide backwards compatibility code when not
671         required.
673 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
675         * descr.h (manager_thread): Rename to...
676         (__pthread_manager_threadp): ... this.
677         * pthread.c (manager_thread): Define to __pthread_manager_threadp.
678         (__pthread_manager_threadp): New variable.
679         * internals.h (__manager_thread): Define to
680         __pthread_manager_threadp if USE_TLS.
682 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
684         * sysdeps/i386/Makefile (CFLAGS-cancel.c, CFLAGS-manager.c,
685         CFLAGS-pthread.c, CFLAGS-sighandler.c): Add
686         -mpreferred-stack-boundary=4.
688 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
690         * attr.c (pthread_getattr_np): Correctly fill in the stack-related
691         values for the initial thread.
693 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
695         * pthread.c (manager_thread): Remove static, add attribute_hidden.
696         (thread_self_stack): Rename to...
697         (__pthread_self_stack): ... this.  Remove static.
698         (pthread_handle_sigcancel): Use check_thread_self ().
699         (pthread_handle_sigrestart): Likewise.
700         * sighandler.c (__pthread_sighandler, __pthread_sighandler_rt):
701         Likewise.
702         * descr.h (manager_thread): Declare.
703         * internals.h (__pthread_self_stack): New prototype.
704         (__manager_thread): Define.
705         (check_thread_self): New function.
707 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
709         * Makefile (CFLAGS-mutex.c): Add $(uses-callbacks).
710         (CFLAGS-sighandler.c): Change $(exceptions) into $(uses-callbacks).
712 2003-09-12  Jakub Jelinek  <jakub@redhat.com>
714         * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: New.
715         (__SSIZE_T_TYPE): Define to __SWORD_TYPE for gcc 2.95.x and
716         __SLONGWORD_TYPE otherwise.
718 2003-09-11  Steven Munroe  <sjmunroe@us.ibm.com>
720         * sysdeps/powerpc/powerpc64/pt-machine.h [MEMORY_BARRIER]: Use lwsync.
721         [READ_MEMORY_BARRIER]: Define.
722         [WRITE_MEMORY_BARRIER]: Define.
724 2003-09-10  Jakub Jelinek  <jakub@redhat.com>
726         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Move
727         ptr___pthread_cond_timedwait to the end of the structure to avoid
728         breaking Wine unnecessarily.
730 2003-09-08  Jakub Jelinek  <jakub@redhat.com>
732         * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: Remove.
734 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
736         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
737         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
738         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
739         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
740         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
741         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
742         * attr.c (__old_pthread_attr_setstacksize,
743         __old_pthread_attr_setstack): New functions.
744         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
745         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
746         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
747         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
748         * tststack.c: Include limits.h and sys/param.h.
749         (main): Set size to MAX (70 * 1024, PTHREAD_STACK_MIN).
751         * barrier.c (__pthread_barrierattr_getpshared): Always
752         return PTHREAD_PROCESS_PRIVATE.
753         (pthread_barrierattr_setpshared): Return EINVAL if pshared
754         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
756 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
758         * sysdeps/sparc/tls.h (TLS_TCB_SIZE): If in ld.so and NPTL struct
759         pthread is bigger than struct _pthread_descr_struct, use NPTL struct
760         pthread size.
762 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
764         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
765         (DL_SYSINFO_IMPLEMENTATION): Add CFI and make sure the code ends
766         up in .text.
768         * barrier.c (pthread_barrierattr_setpshared): We don't handle
769         inter-process barriers.
771 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
773         * Makefile (tests): Add tst-tls1.
774         (module-names): Add tst-tls1mod{,a,b,c,d,e,f}.
775         ($(objpfx)tst-tls1mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
776         ($(objpfx)tst-tls1): New.
777         ($(objpfx)tst-tls2.out): Likewise.
778         (tests): Depend on $(objpfx)tst-tls2.out.
779         * tst-tls1.c: New test.
780         * tst-tls1.h: New.
781         * tst-tls1mod.c: New.
782         * tst-tls1moda.c: New.
783         * tst-tls1modb.c: New.
784         * tst-tls1modc.c: New.
785         * tst-tls1modd.c: New.
786         * tst-tls1mode.c: New.
787         * tst-tls1modf.c: New.
788         * tst-tls2.sh: New test.
790         * internals.h (__pthread_cond_timedwait): New prototype.
791         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
792         ptr___pthread_cond_timedwait.
793         * pthread.c (__pthread_functions): Initialize them.
794         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
795         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
796         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
797         pthread_cond_timedwait@@GLIBC_2.3.2.
799 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
801         * sysdeps/pthread/pthread.h: Don't mark pthread_exit,
802         pthread_join, pthread_cond_wait, and pthread_cond_timedwait with
803         __THROW to match NPTL.
805 2003-08-13  Ulrich Drepper  <drepper@redhat.com>
807         * sysdeps/pthread/Makefile [subdir=rt] (CPPFLAGS): Add
808         -DBROKEN_THREAD_SIGNALS.
810 2003-08-11  Steven Munroe  <sjmunroe@us.ibm.com>
812         * manager.c (pthread_start_thread) [!(USE_TLS && HAVE___THREAD)]:
813         Correct spelling of per thread resolver state.
815 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
817         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
818         (__rtld_lock_default_lock_recursive,
819         __rtld_lock_default_unlock_recursive): Define.
820         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
821         __rtld_lock_unlock_recursive): Define using
822         GL(_dl_rtld_*lock_recursive).
823         * pthread.c (pthread_initialize): Initialize _dl_rtld_lock_recursive
824         and _dl_rtld_unlock_recursive.  Lock GL(_dl_load_lock) the same
825         number of times as GL(_dl_load_lock) using non-mt implementation was
826         nested.
828 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
830         * sysdeps/pthread/bits/typesizes.h (__SSIZE_T_TYPE): Define.
831         * sysdeps/unix/sysv/linux/alpha/bits/typesizes.h (__SSIZE_T_TYPE):
832         Likewise.
833         * sysdeps/unix/sysv/linux/sparc/bits/typesizes.h (__SSIZE_T_TYPE):
834         Likewise.
835         * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: New file.
837         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
838         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
839         PTHREAD_STACK_MIN in comments.
841         * sysdeps/alpha/pt-machine.h (PT_EI): Add
842         __attribute__((always_inline)).
843         * sysdeps/arm/pt-machine.h (PT_EI): Likewise.
844         * sysdeps/cris/pt-machine.h (PT_EI): Likewise.
845         * sysdeps/hppa/pt-machine.h (PT_EI): Likewise.
846         * sysdeps/i386/i686/pt-machine.h (PT_EI): Likewise.
847         * sysdeps/i386/pt-machine.h (PT_EI): Likewise.
848         * sysdeps/ia64/pt-machine.h (PT_EI): Likewise.
849         * sysdeps/m68k/pt-machine.h (PT_EI): Likewise.
850         * sysdeps/mips/pt-machine.h (PT_EI): Likewise.
851         * sysdeps/powerpc/powerpc32/pt-machine.h (PT_EI): Likewise.
852         * sysdeps/powerpc/powerpc64/pt-machine.h (PT_EI): Likewise.
853         * sysdeps/s390/s390-32/pt-machine.h (PT_EI): Likewise.
854         * sysdeps/s390/s390-64/pt-machine.h (PT_EI): Likewise.
855         * sysdeps/sh/pt-machine.h (PT_EI): Likewise.
856         * sysdeps/sparc/sparc32/pt-machine.h (PT_EI): Likewise.
857         * sysdeps/sparc/sparc64/pt-machine.h (PT_EI): Likewise.
858         * sysdeps/x86_64/pt-machine.h (PT_EI): Likewise.
859         * spinlock.h (__pthread_set_own_extricate_if): Likewise.
860         * sysdeps/ia64/tls.h (TLS_INIT_TP): Cast tcbp to __typeof
861         (__thread_self).
862         * Examples/ex13.c (main): Change res type to void * to avoid
863         warnings.
864         * tst-cancel.c (cleanup, inner, tf1, tf2, tf3): Comment out.
866 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
868         * pthread.c (init_one_static_tls, __pthread_init_static_tls): New
869         functions.
870         (pthread_initialize): Initialize GL(dl_init_static_tls).
872 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
874         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
875         before __timer_dealloc.
876         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
877         Don't call list_unlink.
879 2003-07-29  Roland McGrath  <roland@redhat.com>
881         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
883 2003-07-25  Roland McGrath  <roland@redhat.com>
885         * manager.c (pthread_start_thread): Fix typo in last change.
887 2003-07-14  Guido Guenther  <agx@sigxcpu.org>
889         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: Add IS_IN_librt,
890         use L() for local labels.
892 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
894         * sysdeps/alpha/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Change to 0.
895         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Alignment of struct
896         _pthread_descr_struct.
897         (TLS_PRE_TCB_SIZE): Add sizeof (tcbhead_t) and pad to align.
898         If in ld.so and NPTL struct pthread is bigger than struct
899         _pthread_descr_struct, use NPTL struct pthread size.
900         (TLS_TCB_OFFSET): Define.
901         (INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_DTV,
902         THREAD_SELF, INIT_THREAD_SELF): Changed to match NPTL tls.h
903         definitions.
904         * sysdeps/i386/tls.h (TLS_TCB_SIZE): If in ld.so and NPTL struct
905         pthread is bigger than struct _pthread_descr_struct, use NPTL struct
906         pthread size.
907         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Likewise.
908         * sysdeps/powerpc/tls.h (TLS_PRE_TCB_SIZE): Likewise.
909         * sysdeps/s390/tls.h (TLS_TCB_SIZE): Likewise.
910         * sysdeps/sh/tls.h (TLS_PRE_TCB_SIZE): Likewise.
911         * sysdeps/x86_64/tls.h (TLS_TCB_SIZE): Likewise.
912         * sysdeps/pthread/Makefile (gen-as-const-headers): Add
913         nptl-struct-pthread.sym if nptl tree is present.
914         (before-compile): Add $(common-objpfx)nptl-struct-pthread.h
915         if nptl tree is not present.
916         (common-generated): Add nptl-struct-pthread.h.
917         ($(common-objpfx)nptl-struct-pthread.h): New rule.
918         * sysdeps/pthread/nptl-struct-pthread.sym: New file.
920 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
922         * descr.h (struct _pthread_descr_struct): Provide p_res member
923         even if USE_TLS && HAVE___THREAD.
924         * sysdeps/pthread/res-state.c (__res_state): Return __resp
925         if USE___THREAD.
926         * manager.c: Include resolv.h.
927         (pthread_start_thread): Initialize __resp.
928         * libc-tls-loc.c (__res_state): Return __resp.
929         * Makefile (tests): Add tst-_res1.
930         (modules-names, extra-objs, test-extras, test-modules): Add support
931         for test modules.
932         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
933         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
934         -lpthread.
935         * tst-_res1.c: New test.
936         * tst-_res1mod1.c: New test.
937         * tst-_res1mod2.c: New test.
939 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
941         * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_push and
942         __libc_cleanup_pop.
944         * tst-cancel-wrappers.sh: lseek and llseek are no cancellation points.
946 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
948         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Fix typo
949         in test for compilation in libc.
951 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
953         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
954         different symbol for the cancellation syscall wrapper and
955         non-cancellation syscall wrapper.
956         (PSEUDO_END): Define.
958 2003-07-05  Richard Henderson  <rth@redhat.com>
960         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
962 2003-06-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
964         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Support cancellation
965         in librt.
967 2003-06-21  Andreas Schwab  <schwab@suse.de>
969         * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Support cancellation
970         in librt.
972 2003-06-20  Richard Henderson  <rth@redhat.com>
974         * sysdeps/unix/sysv/linux/alpha/Makefile (libpthread-routines):
975         Remove ptw-osf_sigprocmask.
977 2003-06-18  Jakub Jelinek  <jakub@redhat.com>
979         * internals.h (__librt_multiple_threads, __librt_enable_asynccancel,
980         __librt_disable_asynccancel): Declare.
981         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET, LIBC_CANCEL_HANDLED): Define
982         for IS_IN_librt.
983         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Support cancellation
984         in librt.
985         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
986         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
987         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
988         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
989         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
990         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
991         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
992         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
993         * sysdeps/x86_64/tcb-offsets.sym: New file.
994         * sysdeps/x86_64/Makefile: New file.
995         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
996         * Versions (libc): Export __librt_enable_asynccancel,
997         __librt_disable_asynccancel and __librt_multiple_threads as
998         GLIBC_PRIVATE.
999         * libc-cancellation.c (__librt_multiple_threads,
1000         __librt_enable_asynccancel, __librt_disable_asynccancel): New aliases.
1002 2003-06-12  Steven Munroe  <sjmunroe@us.ibm.com>
1004         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1005         (SINGLE_THREAD_P): Replace @ got notation with @toc.
1007 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
1009         * sysdeps/powerpc/pspinlock.c (__pthread_spin_init): Fix
1010         initializer [PR libc/5052].
1012 2003-06-09  Andreas Schwab  <schwab@suse.de>
1014         * Makefile: Move inclusion of ../Rules down after extra-objs is
1015         fully known.
1017 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
1019         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: New sequences for
1020         5+ arg syscalls only needed for PIC.
1021         Patch by Ralph Siemsen <ralphs@netwinder.org>.
1023 2003-06-05  Richard Henderson  <rth@redhat.com>
1025         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use
1026         and require CFI assembler directives.
1027         * sysdeps/unix/sysv/linux/alpha/vfork.S: Likewise.
1029 2003-05-30  Andreas Jaeger  <aj@suse.de>
1031         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h
1032         (SAVESTK_0): Add CFI directives.
1033         (SAVESTK_3): Likewise.
1034         (SAVESTK_5): Likewise.
1035         (RESTSTK_0): Likewise.
1036         (RESTSTK_3): Likewise.
1037         (RESTSTK_5): Likewise.
1039 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
1041         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Add \n to error
1042         messages.
1044 2003-05-04  Roland McGrath  <roland@redhat.com>
1046         * Makefile ($(objpfx)../libc.so): New target.
1048 2003-04-26  Ulrich Drepper  <drepper@redhat.com>
1050         * pthread.c (__pthread_initialize_manager): Remove one last
1051         p_multiple_threads call.
1053 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
1055         * pthread.c (__pthread_initialize_manager): Subtract
1056         TLS_PRE_TCB_SIZE bytes from tcbp to get to descr.
1057         * manager.c (pthread_handle_create): Subtract or add TLS_PRE_TCB_SIZE
1058         instead of sizeof (pthread_descr).
1059         (pthread_free): Add TLS_PRE_TCB_SIZE instead of sizeof (pthread_descr).
1060         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define to 0.
1061         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
1062         pthread_descr.
1063         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
1064         to TLS_TCB_ALIGN.
1065         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
1066         tcbp.
1067         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
1068         unneccessarily.
1069         (NO_TLS_OFFSET): Define.
1071 2003-04-22  Roland McGrath  <roland@redhat.com>
1073         * Makeconfig (shared-thread-library): Reverse link order to work
1074         around linker bug.
1076 2003-04-20  Ulrich Drepper  <drepper@redhat.com>
1078         * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Make sure the
1079         compiler knows we use the ldt_entry variable and that the syscall
1080         modifies the memory.
1082         * internals.h: Split pthread_functions definition into...
1083         * sysdeps/pthread/pthread-functions.h: ...new file.
1085         * sysdeps/i386/useldt.h: Include <sysdep.h>.
1087 2003-04-13  Jakub Jelinek  <jakub@redhat.com>
1089         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Rename macros to
1090         match changes in NPTL sysdep-cancel.h.
1092 2003-04-11  Roland McGrath  <roland@redhat.com>
1094         * Makefile (multidir): Don't set the variable here with $(shell ...).
1095         ($(objpfx)multidir.mk): New target, generated makefile; include that.
1096         (generated): Append it.
1098 2003-04-10  Jakub Jelinek  <jakub@redhat.com>
1100         * Makefile (multidir, crti-objs, crtn-objs): New variables.
1101         (generated-dirs): Add pathname component of multidir.
1102         (omit-deps, extra-objs): Include $(multidir)/crt? as well.
1103         ($(objpfx)libpthread.so): Depend on $(multidir)/crt?.o as well.
1104         ($(objpfx)$(multidir), $(objpfx)$(multidir)/crti.o,
1105         $(objpfx)$(multidir)/crtn.o): New.
1106         * sysdeps/unix/sysv/linux/sparc/Makefile: Removed.
1107         * sysdeps/unix/sysv/linux/x86_64/Makefile (LDFLAGS-pthread.so,
1108         before-compile, generated): Don't generate and use specs.
1109         ($(objpfx)specs): Remove.
1111 2003-04-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1113         * sysdeps/s390/pspinlock.c (__pthread_spin_unlock): Fix asm contraints.
1115 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
1117         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h (PSEUDO): Add
1118         missing ; after ENTRY use [PR libc/4997].
1120 2003-04-03  Jakub Jelinek  <jakub@redhat.com>
1122         * pthread.c (pthread_initialize): Unblock __pthread_sig_cancel
1123         in case the parent blocked it.
1125 2003-04-02  Jakub Jelinek  <jakub@redhat.com>
1127         * Makefile (libpthread-routines): Add pthread_atfork.
1128         (libpthread-static-only-routines): Add pthread_atfork.
1130 2003-04-01  Jakub Jelinek  <jakub@redhat.com>
1132         * pthread.c (__pthread_wait_for_restart_signal): Use
1133         __pthread_sigsuspend instead of sigsuspend.
1134         * internals.h (__pthread_sigsuspend): New prototype.
1135         * Makefile (libpthread-routines): Add pt-sigsuspend.
1136         (tests): Add tst-cancel7.
1137         * sysdeps/unix/sysv/linux/pt-sigsuspend.c: New file.
1138         * sysdeps/unix/sysv/linux/alpha/pt-sigsuspend.S: New file.
1139         * sysdeps/unix/sysv/linux/ia64/pt-sigsuspend.c: New file.
1140         * sysdeps/unix/sysv/linux/s390/s390-64/pt-sigsuspend.c: New file.
1141         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-sigsuspend.c: New file.
1142         * sysdeps/unix/sysv/linux/x86_64/pt-sigsuspend.c: New file.
1143         * tst-cancel7.c: New test.
1145 2003-03-31  Alexandre Oliva  <aoliva@redhat.com>
1147         * alloca_cutoff.c: Include internals.h.
1148         * sysdeps/pthread/errno-loc.c: Include linuxthreads/internals.h.
1149         * sysdeps/pthread/herrno-loc.c: Likewise.
1150         * sysdeps/pthread/res-state.c: Likewise.
1152 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
1154         * sysdeps/pthread/bits/typesizes.h: New file.
1155         * sysdeps/unix/sysv/linux/alpha/bits/typesizes.h: New file.
1156         * sysdeps/unix/sysv/linux/sparc/bits/typesizes.h: New file.
1158 2003-03-24  Daniel Jacobowitz  <drow@mvista.com>
1160         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
1161         (DOARGS_5, DOARGS_6, DOARGS_7): Rewritten.
1163 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
1165         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
1167 2003-03-21  Daniel Jacobowitz  <drow@mvista.com>
1169         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
1170         (SINGLE_THREAD_P_PIC): Use "reg" instead of "lr".
1172 2003-03-21  Jakub Jelinek  <jakub@redhat.com>
1174         * sysdeps/i386/tls.h [__ASSUME_SET_THREAD_AREA_SYSCALL]
1175         (TLS_SETUP_GS_SEGMENT): Fix a typo.
1177 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
1179         * sysdeps/pthread/Makefile: Fix cut&paste error.
1181 2003-03-18  Roland McGrath  <roland@redhat.com>
1183         * Versions (libpthread: GLIBC_2.2): Remove
1184         pthread_barrierattr_getpshared, never really existed.
1185         (libpthread: GLIBC_2.0): Move __pthread_initialize to ...
1186         (libpthread: GLIBC_PRIVATE): ... here.
1188 2003-03-14  Jakub Jelinek  <jakub@redhat.com>
1190         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
1191         * sysdeps/unix/sysv/linux/sparc/Makefile ($(objpfx)specs): Use full
1192         path for crt[in].o.
1194 2003-03-14  Alexandre Oliva  <aoliva@redhat.com>
1196         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't .set
1197         mips2 on new abi.
1198         * sysdeps/mips/pt-machine.h (__compare_and_swap): Likewise.
1199         Handle 64-bit longs on n64.
1201 2003-03-07  Jakub Jelinek  <jakub@redhat.com>
1203         * sysdeps/ia64/pspinlock.c (__pthread_spin_lock,
1204         __pthread_spin_trylock): Rewritten.
1206 2003-03-06  Ulrich Drepper  <drepper@redhat.com>
1208         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
1209         recent kernels.
1211 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
1213         * sysdeps/pthread/timer_create.c (timer_create): Return correct
1214         error for CPU clocks.
1216         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1217         _POSIX_MONOTONIC_CLOCK.
1218         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1220 2003-03-01  Roland McGrath  <roland@redhat.com>
1222         * sysdeps/powerpc/powerpc64/pt-machine.h
1223         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
1224         New macros.
1225         * sysdeps/powerpc/tls.h: Don't define those here.
1227         * sysdeps/powerpc/tls.h [! USE_TLS && !__powerpc64__]: Define
1228         tcbhead_t with multiple_threads member.
1229         [USE_TLS] (tcbhead_t): Define minimal one-word version.
1230         [USE_TLS && !__powerpc64__] (TLS_MULTIPLE_THREADS_IN_TCB): Define.
1231         * sysdeps/powerpc/tcb-offsets.sym [USE_TLS]: Use tls.h macros to
1232         derive thread register offset of p_multiple_threads member.
1234         * descr.h (struct _pthread_descr_struct) [!USE_TLS || !TLS_DTV_AT_TP]:
1235         Conditionalize p_header member on this.
1236         [TLS_MULTIPLE_THREADS_IN_TCB]: Add p_multiple_threads alternatively.
1237         * sysdeps/ia64/tls.h [USE_TLS] (TLS_MULTIPLE_THREADS_IN_TCB): Define.
1238         * sysdeps/sh/tls.h: Likewise.
1239         * sysdeps/ia64/tcb-offsets.sym [USE_TLS]: Use p_multiple_threads.
1240         * sysdeps/sh/tcb-offsets.sym: Likewise.
1241         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
1242         (SINGLE_THREAD_P): Likewise.
1243         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1244         (SINGLE_THREAD_P): Likewise.
1245         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1246         (SINGLE_THREAD_P): Likewise.
1247         * pthread.c (__pthread_initialize_manager): Likewise.
1248         * manager.c (pthread_handle_create): Likewise.
1250         * sysdeps/powerpc/tls.h [HAVE_TLS_SUPPORT]: Define USE_TLS and all
1251         related macros.
1253 2003-01-31  Steven Munroe  <sjmunroe@us.ibm.com>
1255         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S [SHARED]:
1256         Conditionalize .toc section magic on this.
1258 2003-02-21  Roland McGrath  <roland@redhat.com>
1260         * cancel.c (__pthread_perform_cleanup): Call __libc_thread_freeres
1261         instead of __rpc_thread_destroy.
1263 2003-02-21  Jakub Jelinek  <jakub@redhat.com>
1265         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Call
1266         __fork instead of branching to it if BROKEN_SPARC_WDISP22.
1267         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
1268         Fix typo.
1269         * sysdeps/unix/sysv/linux/sparc/Makefile (specs): Add ./ prefix
1270         to crti.o and crtn.o.
1271         * sysdeps/unix/sysv/linux/x86_64/Makefile (specs): Likewise.
1273 2003-02-21  Roland McGrath  <roland@redhat.com>
1275         * Makefile (install-lib-ldscripts): New variable.
1277 2003-02-20  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
1279         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: Avoid short
1280         interprocedure branches.
1282 2003-02-19  Ulrich Drepper  <drepper@redhat.com>
1284         * specific.c (pthread_key_delete_helper): Don't use GETMEM, we
1285         need the target thread's lock.
1287 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
1289         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
1290         and LOGIN_NAME_MAX.
1292 2003-02-17  Kevin B. Hendricks  <kevin.hendricks@sympatico.ca>
1293             Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
1295         * sysdeps/powerpc/Makefile: Handle tcb-offsets.sym.
1296         * sysdeps/powerpc/tcb-offsets.sym: New file.
1297         * sysdeps/powerpc/tls.h: New file.
1298         * sysdeps/powerpc/powerpc32/pt-machine.h (FLOATING_STACKS): Define.
1299         (ARCH_STACK_MAX_SIZE): Define.
1300         (THREAD_SELF): Define.
1301         (INIT_THREAD_SELF): Define.
1302         (THREAD_GETMEM): Define.
1303         (THREAD_GETMEM_NC): Define.
1304         (THREAD_SETMEM): Define.
1305         (THREAD_SETMEM_NC): Define.
1306         (__thread_self): Declare.
1307         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Adjust
1308         for thread register.
1310 2003-02-14  Steven Munroe  <sjmunroe@us.ibm.com>
1312         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
1313         Check pthread_create existance, not __pthread_fork.
1315 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
1317         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
1319 2003-02-10  Jakub Jelinek  <jakub@redhat.com>
1321         * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Check
1322         pthread_create existance, not __pthread_fork.
1323         * sysdeps/unix/sysv/linux/i386/vfork.S (__vfork): Likewise.
1324         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Likewise.
1325         * sysdeps/unix/sysv/linux/m68k/vfork.S (__vfork): Likewise.
1326         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
1327         Likewise.
1328         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
1329         * sysdeps/unix/sysv/linux/x86_64/vfork.S (__vfork): Likewise.
1330         * sysdeps/unix/sysv/linux/sh/vfork.S (__vfork): Likewise.
1331         Add .weak pthread_create.
1332         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Fix a typo.
1333         Check pthread_create existance, not __pthread_fork.
1334         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
1335         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Branch to
1336         __fork whenever libpthread.so is loaded.
1338 2003-02-09  Andreas Jaeger  <aj@suse.de>
1340         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h:
1341         Rework: %r9 is destroyed by functions so don't use it as
1342         temporary, align stack correctly, fix parameter for CDISABLE.
1344 2003-02-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1346         * sysdeps/sh/Makefile: New file.
1347         * sysdeps/sh/tcb-offsets.sym: Likewise.
1348         * sysdeps/sh/tls.h: Don't include sysdep.h. Move include
1349         of linuxthreads/descr.h after the definition of THREAD_SELF.
1350         (tcbhead_t): Use IA64 type tcbhead_t for TLS case.
1351         (TLS_TCB_SIZE): Set size of tcbhead_t.
1352         (TLS_PRE_TCB_SIZE): Define.
1353         (INSTALL_NEW_DTV): Set dtv of tcbhead_t structure instead of
1354         a member of thread structure.
1355         (THREAD_DTV): Likewise.
1356         (TLS_INIT_TP_EXPENSIVE): Remove.
1357         (TLS_INIT_TP): Set gbr register only.
1358         (THREAD_SELF): New.
1359         (INIT_THREAD_SELF): Likewise.
1360         (NONTLS_INIT_TP): New.
1361         * sysdeps/unix/sysv/linux/sh/pt-initfini.c (__fpscr_values):
1362         Remove.
1363         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Add
1364         SYSCALL_INST_PAD macro after DO_CALL.
1365         (SINGLE_THREAD_P): Fix non-PIC and TLS case so to read the
1366         correct variable.
1367         * sysdeps/unix/sysv/linux/sh/vfork.S (__vfork): Branch to __fork
1368         whenever libpthread.so is loaded.
1370 2003-02-08  Andreas Schwab  <schwab@suse.de>
1372         * sysdeps/unix/sysv/linux/m68k/vfork.S: Branch to __fork whenever
1373         libpthread.so is loaded.
1375 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
1377         * sysdeps/unix/sysv/linux/i386/vfork.S: Make sure
1378         __ASSUME_VFORK_SYSCALL is not defined if the kernel headers have
1379         no __NR_vfork definition.
1381 2003-02-07  Jakub Jelinek  <jakub@redhat.com>
1383         * tst-popen2.c: New test.
1384         * Makefile (tests): Add tst-popen2.
1385         * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Branch to __fork
1386         whenever libpthread.so is loaded.
1387         * sysdeps/unix/sysv/linux/i386/vfork.S (__vfork): Likewise.
1388         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Likewise.
1389         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
1390         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
1391         Likewise.
1392         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
1393         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
1394         * sysdeps/unix/sysv/linux/x86_64/vfork.S (__vfork): Likewise.
1396 2003-02-05  Ulrich Drepper  <drepper@redhat.com>
1398         * sysdeps/pthread/bits/libc-lock.h (__libc_once): Set control
1399         variable for non-libpthread case to the same value the
1400         pthread_once function would use.
1402 2003-02-03  Jakub Jelinek  <jakub@redhat.com>
1404         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): If
1405         BROKEN_SPARC_WDISP22, handle SHARED the same way as non-SHARED.
1407 2003-02-04  Andreas Jaeger  <aj@suse.de>
1409         * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Do not use
1410         multi-line strings.
1412 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
1414         * sysdeps/s390/tls.h (TLS_INIT_TP): Return NULL, not 0.
1416 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
1418         * sysdeps/alpha/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1419         THREAD_SETMEM, THREAD_SETMEM_NC): Avoid warnings about unused self
1420         variable.
1421         * sysdeps/ia64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1422         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1423         * sysdeps/s390/s390-32/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1424         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1425         * sysdeps/s390/s390-64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1426         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1427         * sysdeps/sh/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1428         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1429         * sysdeps/sparc/sparc32/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1430         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1431         * sysdeps/sparc/sparc64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1432         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1434 2003-01-27  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1436         * sysdeps/s390/s390-32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
1437         Define TLS versions.
1438         * sysdeps/s390/s390-64/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
1439         Likewise.
1440         * sysdeps/s390/tls.h [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE,
1441         TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE, TLS_TCB_ALIGN, TLS_TCB_AT_TP,
1442         INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_DTV):
1443         Define.
1444         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Use
1445         branch with 32 bit offset.
1446         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: Likewise.
1448 2003-01-24  Jakub Jelinek  <jakub@redhat.com>
1450         * sysdeps/sparc/sparc32/pt-machine.h (__thread_self): Change to %g7,
1451         as required by TLS ABI.
1452         * sysdeps/sparc/sparc64/pt-machine.h (__thread_self): Likewise.
1453         * sysdeps/sparc/tls.h [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE,
1454         TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE, TLS_TCB_ALIGN, TLS_TCB_AT_TP,
1455         INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_DTV):
1456         Define.
1457         [HAVE_TLS_SUPPORT]: Include descr.h and sysdep.h.
1458         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Use %g7
1459         instead of %g6 for thread pointer.
1460         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
1461         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1462         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
1464 2003-01-25  Guido Guenther  <agx@sigxcpu.org>
1466         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
1467         * sysdeps/unix/sysv/linux/mips/Makefile: New file.
1469 2003-01-20  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1471         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: Avoid non pc relative
1472         reference to __fork.
1474 2003-01-17  Richard Henderson  <rth@redhat.com>
1476         * sysdeps/alpha/tls.h (tcbhead_t): Clarify second member.
1477         (TLS_TCB_SIZE, TLS_TCB_ALIGN): Set for tcbhead_t.
1478         (TLS_PRE_TCB_SIZE): New.
1479         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Update for
1480         new ia64-style thread pointer layout.
1481         (THREAD_GETMEM, THREAD_GETMEM_NC): New.
1482         (THREAD_SETMEM, THREAD_SETMEM_NC): New.
1483         * sysdeps/unix/sysv/linux/alpha/vfork.S: Don't tail-call to __fork
1484         if !SHARED.
1486 2003-01-15  Jakub Jelinek  <jakub@redhat.com>
1488         * sysdeps/ia64/tls.h (tcbhead_t): Use the TLS ABI required layout
1489         if USE_TLS only.
1490         (NONTLS_INIT_TP): Revert last change.
1491         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define to
1492         offsetof (tcbhead_t, multiple_threads) if USE_TLS not defined.
1494 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
1496         * pthread.c (_pthread_initialize_minimal): Use
1497         GL(dl_tls_dtv_slotinfo_list) != NULL to check whether TLS has
1498         been already initialized.
1500 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
1502         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize head->sysinfo even
1503         if not SHARED.
1505 2003-01-15  Jakub Jelinek  <jakub@redhat.com>
1507         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init,
1508         __libc_lock_init_recursive): Initialize fields directly.
1510 2003-01-15  Jakub Jelinek  <jakub@redhat.com>
1512         * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Allow
1513         __fork to be far away from __vfork ifndef SHARED.
1514         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
1515         Likewise.
1516         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
1517         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
1518         Add a missing instruction.
1519         * sysdeps/unix/sysv/linux/arm/vfork.S (__vfork): Conditionally
1520         branch to __fork even if __NR_vfork is not defined.
1522 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
1524         * tst-cancel-wrappers.sh: Allow .__*_asynccancel functions names
1525         as well.
1527 2003-01-14  Steven Munroe  <sjmunroe@us.ibm.com>
1529         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
1531 2003-01-14  Jakub Jelinek  <jakub@redhat.com>
1533         * sysdeps/unix/sysv/linux/ia64/vfork.S (JUMPTARGET): Remove.
1535 2003-01-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1537         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Avoid
1538         unterminated string literals.
1539         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Likewise.
1541 2003-01-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1543         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
1544         (PSEUDO): Code reordering.  Move CENABLE and CDISABLE literals from
1545         PSEUDO_END to PSEUDO.
1546         (PSEUDO_END): Remove.
1547         (SINGLE_THREAD_P): Save an instruction.
1548         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add missing
1549         parameter to SINGLE_THREAD_P call.
1550         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
1551         Code reordering.
1553 2003-01-10  Andreas Schwab  <schwab@suse.de>
1555         * sysdeps/unix/sysv/linux/m68k/vfork.S: New file.
1557 2003-01-10  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1559         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Setup
1560         backchain in pseudo_cancel.  Minor code improvements.
1561         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
1562         Likewise.
1564 2003-01-10  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1566         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
1567         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
1569 2002-01-12  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
1571         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
1573 2002-01-09  Richard Henderson  <rth@redhat.com>
1575         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Assume only
1576         ret follows pseudo, and thus avoid branch-to-branch in cancel
1577         case.  Use SYSCALL_ERROR_LABEL.
1579 2003-01-11  Philip Blundell  <philb@gnu.org>
1581         * sysdeps/unix/sysv/linux/arm/vfork.S: New file.
1582         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h (PSEUDO_RET):
1583         Correctly unstack lr.
1584         (UNDOARGS_5): Fix ordering of pushes and pops.
1585         (SINGLE_THREAD_P_PIC): New.
1586         (SINGLE_THREAD_P_INT): New.
1587         (SINGLE_THREAD_P): Implement in terms of above.  Restore lr if it
1588         was stacked.
1589         (PSEUDO): Use SINGLE_THREAD_P_INT.
1591 2003-01-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1593         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
1595 2003-01-11  Jakub Jelinek  <jakub@redhat.com>
1597         * sysdeps/ia64/tls.h (tcbhead_t): Change into dtv_t *, void *.
1598         [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN,
1599         TLS_TCB_SIZE, TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, TLS_DTV_AT_TP,
1600         INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_SELF,
1601         INIT_THREAD_SELF): Define.
1602         [HAVE_TLS_SUPPORT]: Include descr.h.
1603         (NONTLS_INIT_TP): Point __thread_self at the end of dummy
1604         struct _pthread_descr_struct.
1605         * sysdeps/ia64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1606         THREAD_SETMEM, THREAD_SETMEM_NC): Define using THREAD_SELF,
1607         not __thread_self.
1608         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Adjust
1609         computation.
1610         * pthread.c (__pthread_initialize_minimal): Use tcbp, not self
1611         for TCB pointer.
1612         (__pthread_initialize_manager): Rename tcb to mgr.
1613         Use tcbp for TCB pointer, if TLS_DTV_AT_TP set mgr to sizeof (struct
1614         _pthread_descr) below tcbp, otherwise to tcbp.
1615         * manager.c (pthread_handle_create): If TLS_DTV_AT_TP, set
1616         new_thread to be below _dl_allocate_tls ().  Adjust new_thread back
1617         before freeing.  Fix clone arguments if report_events and USE_TLS.
1618         (pthread_free): Adjust th back before freeing.
1620 2003-01-10  Steven Munroe  <sjmunroe@us.ibm.com>
1622         * sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile: Moved to ...
1623         * sysdeps/unix/sysv/linux/powerpc/Makefile: ...here.
1624         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New File.
1626 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
1628         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
1629         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
1630         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1631         [__ASSEMBLER__] (SINGLE_THREAD_P): Remove trailing ;;.
1632         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
1633         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
1634         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
1635         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
1636         * tst-popen.c: New test.
1637         * Makefile (tests): Add tst-popen.
1639 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
1641         * sysdeps/unix/sysv/linux/sigwait.c (do_sigwait): Add
1642         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
1644 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
1646         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use
1647         PSEUDO_PREPARE_ARGS.  Fix branch condition after SINGLE_THREAD_P.
1649 2003-01-06  Philip Blundell  <philb@gnu.org>
1651         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: New file.
1653 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
1655         * internals.h (LIBC_CANCEL_HANDLED): Define.
1656         * sysdeps/unix/sysv/linux/sigwait.c (LIBC_CANCEL_HANDLED): Add.
1657         * signals.c (LIBC_CANCEL_HANDLED): Add.
1658         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
1659         * tst-cancel-wrappers.sh: Remove all exceptions.
1661         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
1663 2003-01-05  Andreas Schwab  <schwab@suse.de>
1665         * sysdeps/m68k/Makefile: New file, use -fPIC for nonshared
1666         objects.
1668         * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h (SINGLE_THREAD_P):
1669         Fix for PIC.
1670         (CENABLE): Likewise.
1671         (CDISABLE): Likewise.
1673 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
1675         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
1676         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
1678         * Makefile (libc.so-no-z-defs): Define to yes.
1680 2003-01-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1682         * sysdeps/sh/tls.h: Include dl-sysdep.h and stdint.h.
1683         (tcbhead_t): Add multiple_threads member.
1684         (TLS_INIT_TP_EXPENSIVE): Define.
1685         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Don't use multi-line
1686         strings.  Remove unused code.
1687         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
1689 2003-01-04  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
1691         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
1692         * sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile: New file.
1694 2003-01-04  Jakub Jelinek  <jakub@redhat.com>
1696         * internals.h (LIBC_THREAD_GETMEM, LIBC_THREAD_SETMEM): Define
1697         even if NOT_IN_libc is defined.
1699 2003-01-05  Jakub Jelinek  <jakub@redhat.com>
1701         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
1702         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
1703         * sysdeps/s390/Makefile: New file.
1704         * sysdeps/s390/tcb-offsets.sym: New file.
1705         * sysdeps/s390/tls.h: New file.
1707 2003-01-03  Richard Henderson  <rth@redhat.com>
1709         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
1711 2003-01-03  Andreas Jaeger  <aj@suse.de>
1713         * sysdeps/pthread/bits/libc-tsd.h: Declare weak_extern functions.
1715 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
1717         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
1719 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
1721         * tst-cancel-wrappers.sh: Exclude sigwait.c as well, it does not have
1722         cancellation tests.
1724 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
1726         * internals.h (struct pthread_functions): Rename
1727         ptr_pthread_cond_* fields to ptr___pthread_cond_*.
1728         * pthread.c (pthread_functions): Adjust.
1729         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
1730         pthread_cond_*@GLIBC_2.0 compatibility symbols.
1731         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
1732         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
1733         and pthread_cond_wait.
1735         * sysdeps/pthread/bits/pthreadtypes.h (__pthread_cond_align_t): New
1736         type.
1737         (pthread_cond_t): Add __align member, shorten __padding.
1738         * sysdeps/pthread/pthread.h (PHTREAD_COND_INITIALIZER): Initialize
1739         __padding and __align too.
1741         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call2): Add
1742         __builtin_expect.
1743         * sysdeps/pthread/sigaction.c: New file.
1744         * sysdeps/unix/sysv/linux/raise.c: New file.
1745         * sysdeps/unix/sysv/linux/sigwait.c: New file.
1746         * sysdeps/unix/sysv/linux/fork.c (__pthread_fork): Protect
1747         weak_extern with #ifndef SHARED.
1748         * sysdeps/unix/sysv/linux/jmp-unwind.c (__pthread_cleanup_upto):
1749         Likewise.
1750         * signals.c (__sigaction): Renamed to...
1751         (__pthread_sigaction): ... this.
1752         (__sigaction): New strong alias, #ifdef SHARED only.
1753         (sigaction): Protect with #ifdef SHARED.
1754         (sigwait): Renamed to...
1755         (__pthread_sigwait): ... this.
1756         (sigwait): New strong alias, #ifdef SHARED only.
1757         (raise): Renamed to...
1758         (__pthread_raise): ... this.
1759         (raise): New strong alias, #ifdef SHARED only.
1760         * internals.h (__pthread_sigaction, __pthread_sigwait,
1761         __pthread_raise): New prototypes.
1762         (struct pthread_functions): Add ptr_pthread_sigaction,
1763         ptr_pthread_sigwait, ptr_pthread_raise.
1764         * pthread.c (pthread_functions): Renamed to...
1765         (__pthread_functions): ... this.  No longer static, no longer
1766         SHARED only.  Initialize ptr_pthread_sigaction, ptr_pthread_sigwait
1767         and ptr_pthread_raise.
1768         [SHARED] (ptr_pthread_functions): Change to &__pthread_functions.
1769         * libc-cancellation.c (__pthread_thread_self): Remove weak_extern.
1770         * ptfork.c (__fork, __vfork): Protect with #ifdef SHARED.
1771         * ptlongjmp.c (siglongjmp, longjmp): Protect with #ifdef SHARED.
1773         * Makefile (tests, tests-static): Add tst-cancel-static.
1774         * tst-cancel-static.c: New test.
1776 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
1778         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
1780 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
1782         * sysdeps/pthread/bits/pthreadtypes.h (pthread_cond_t): Add padding.
1783         * condvar.c: Add symbol versioning.  The compatibility versions
1784         are the same as the change in the interface does not effect this
1785         implementation.
1786         * Versions [libpthread]: Add definitions for new pthread_cond_*
1787         interfaces for version GLIBC_2.3.2.
1789 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
1791         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
1792         __register_atfork.
1793         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
1794         for __register_atfork.
1796 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
1798         * sysdeps/i386/i686/pt-machine.h: Use __ASSEMBLER__ instead of
1799         ASSEMBLER test macro.
1800         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Likewise.
1801         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1802         * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Likewise.
1803         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1804         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1805         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1807         * sysdeps/pthread/errno-loc.c (__errno_location): Add
1808         libc_hidden_def.
1809         * sysdeps/pthread/herrno-loc.c (__h_errno_location): Likewise.
1810         * sysdeps/pthread/res-state.c (__res_state): Likewise.
1811         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
1812         __libc_current_sigrtmax): Likewise.
1813         * Versions [libc] (GLIBC_PRIVATE): Remove __libc_internal_tsd_get,
1814         __libc_internal_tsd_set, __libc_internal_tsd_address,
1815         __libc_alloca_cutoff.
1816         [libpthread] (GLIBC_PRIVATE): Remove __libc_internal_tsd_get,
1817         __libc_internal_tsd_set, __libc_internal_tsd_address.
1819         * sysdeps/pthread/list.h: Remove assert.h include.
1820         * sysdeps/unix/sysv/linux/fork.c: Include <fork.h>, not "fork.h".
1822         * sysdeps/pthread/list.h: New file.
1823         * sysdeps/unix/sysv/linux/jmp-unwind.c: New file.
1824         * sysdeps/unix/sysv/linux/fork.c: New file.
1825         * sysdeps/unix/sysv/linux/fork.h: New file.
1826         * sysdeps/unix/sysv/linux/ia64/fork.h: New file.
1827         * sysdeps/unix/sysv/linux/sparc/fork.h: New file.
1828         * sysdeps/unix/sysv/linux/register-atfork.c: New file.
1829         * sysdeps/unix/sysv/linux/unregister-atfork.c: New file.
1830         * sysdeps/unix/sysv/linux/Makefile: New file.
1831         * sysdeps/unix/sysv/linux/Versions: New file.
1832         * ptlongjmp.c (pthread_cleanup_upto): Rename to...
1833         (__pthread_cleanup_upto): ...this. Add targetframe argument,
1834         use it instead of currentframe.  No longer static.
1835         (siglongjmp, longjmp): Remove pthread_cleanup_upto calls.
1836         * internals.h (__pthread_cleanup_upto, __pthread_fork): New prototypes.
1837         (struct pthread_functions): Add ptr_pthread_fork,
1838         ptr_pthread_cleanup_upto.
1839         * pthread.c (pthread_functions): Initialize ptr_pthread_fork and
1840         ptr_pthread_cleanup_upto.
1841         * ptfork.c: Include fork.h.
1842         (struct handler_list, struct handler_list_block): Remove.
1843         (pthread_atfork_lock, pthread_atfork_prepare, pthread_atfork_parent,
1844         pthread_atfork_child): Remove.
1845         (pthread_insert_list, __pthread_atfork, pthread_call_handlers): Remove.
1846         (__pthread_fork): New function.
1847         (__fork, __vfork): Call __libc_fork.
1848         * Makefile (libpthread-routines): Add old_pthread_atfork.
1849         (libpthread-nonshared): Add pthread_atfork.
1850         (others): Depend on $(objpfx)libpthread_nonshared.a.
1851         ($(objpfx)libpthread_nonshared.a): New rule.
1852         (install): Depend on $(inst_libdir)/libpthread.so.
1853         ($(inst_libdir)/libpthread.so, $(inst_libdir)/libpthread_nonshared.a):
1854         New rules.
1855         (tests): Depend on libpthread_nonshared.a too.
1856         * old_pthread_atfork.c: New file.
1857         * pthread_atfork.c: New file.
1858         * Makeconfig (shared-thread-library): Include libpthread_nonshared.a
1859         too.
1861 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
1863         * forward.c: Make all functions available by default again.  It
1864         caused too much trouble.
1865         * internals.h (struct pthread_functions): Rename ptr_pthread_exit
1866         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
1867         ptr___pthread_attr_init_2_*.
1868         * pthread.c (pthread_functions): Adjust.
1870 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
1872         * libc_pthread_init.c (__libc_pthread_init): Remove
1873         MULTIPLE_THREADS_OFFSET check.
1874         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
1875         (SYSINFO_OFFSET): Remove.
1876         * sysdeps/i386/Makefile [csu] (gen-as-const-headers): Add
1877         tcb-offsets.sym.
1878         * sysdeps/i386/tcb-offsets.sym: New file.
1879         * sysdeps/pthread/tcb-offsets.h: New file.
1880         * sysdeps/sparc/sparc32/tls.h: Removed.
1881         * sysdeps/sparc/sparc64/tls.h: Move...
1882         * sysdeps/sparc/tls.h: ...here.  Include tcb-offsets.h in assembler.
1883         * sysdeps/sparc/Makefile: New file.
1884         * sysdeps/sparc/tcb-offsets.sym: New file.
1885         * sysdeps/ia64/tls.h: Include tcb-offsets.h in assembler.
1886         * sysdeps/ia64/Makefile: New file.
1887         * sysdeps/ia64/tcb-offsets.sym: New file.
1888         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
1889         (MULTIPLE_THREADS_OFFSET): Remove.
1890         Replace defined MULTIPLE_THREADS_OFFSET
1891         with defined FLOATING_STACKS && USE___THREAD.
1892         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1893         (MULTIPLE_THREADS_OFFSET): Remove.
1894         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1895         (MULTIPLE_THREADS_OFFSET): Remove.
1896         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1897         (MULTIPLE_THREADS_OFFSET): Remove.
1898         * pthread.c (__pthread_initialize_manager): Remove
1899         MULTIPLE_THREADS_OFFSET cbeck.
1901         * tst-cancel-wrappers.sh: Add line continuations.
1903 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
1905         * sysdeps/pthread/bits/libc-tsd.h: Include linuxthreads/descr.h
1906         and bits/libc-lock.h.
1907         (__libc_internal_tsd_get, __libc_internal_tsd_set,
1908         __libc_internal_tsd_address): Remove.
1909         (__pthread_internal_tsd_address, __pthread_internal_tsd_get,
1910         __pthread_internal_tsd_set): New weak_externs.
1911         (__libc_tsd_address, __libc_tsd_get, __libc_tsd_set): Define
1912         using __libc_maybe_call2.
1913         (__libc_tsd_key_t): Move to ...
1914         * descr.h (__libc_tsd_key_t): ...here.
1915         Remove bits/libc-tsd.h include.
1916         * sysdeps/pthread/errno-loc.c: New file.
1917         * sysdeps/pthread/herrno-loc.c: New file.
1918         * sysdeps/pthread/res-state.c: New file.
1919         * libc-cancellation.c (THREAD_GETMEM, THREAD_SETMEM): Remove.
1920         (__libc_enable_asynccancel, __libc_disable_asynccancel): Use
1921         thread_self unconditionally.  Use LIBC_THREAD_[SG]ETMEM instead
1922         of THREAD_[SG]ETMEM.
1923         * specific.c (libc_internal_tsd_set): Renamed to...
1924         __pthread_internal_tsd_set.  Remove static.
1925         (libc_internal_tsd_get): Renamed to...
1926         __pthread_internal_tsd_get.  Remove static.
1927         (libc_internal_tsd_address): Renamed to...
1928         __pthread_internal_tsd_address.  Remove static.
1929         (__libc_internal_tsd_set, __libc_internal_tsd_get,
1930         __libc_internal_tsd_address, __libc_alloca_cutoff): Remove.
1931         * internals.h [!NOT_IN_libc] (LIBC_THREAD_GETMEM, LIBC_THREAD_SETMEM):
1932         Define.
1933         (__pthread_internal_tsd_set, __pthread_internal_tsd_get,
1934         __pthread_internal_tsd_address): New prototypes.
1935         (struct pthread_functions): Add
1936         ptr_pthread_internal_tsd_([sg]et|address) fields.
1937         [!NOT_IN_libc && !FLOATING_STACKS] (thread_self): Define.
1938         * pthread.c (pthread_functions) [!USE_TLS && !HAVE___THREAD]:
1939         Initialize ptr_pthread_internal_tsd_([sg]et|address) fields.
1940         * Versions (libpthread): Remove __libc_alloca_cutoff@GLIBC_PRIVATE.
1941         * alloca_cutoff.c: New file.
1942         * no-tsd.c: Removed.
1943         * Makefile (routines): Remove no-tsd.  Add alloca_cutoff.
1944         * pt-system.c (system): Remove cancellation handling.
1945         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
1946         cancellation routines.
1948         * sysdeps/i386/tls.h: Include dl-sysdep.h and stdint.h.
1949         (tcbhead_t): Add sysinfo field.
1950         (SYSINFO_OFFSET, INIT_SYSINFO): Define.
1951         (TLS_INIT_TP): Use INIT_SYSINFO.
1952         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
1953         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
1954         (MULTIPLE_THREADS_OFFSET): Adjust.
1955         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1956         (MULTIPLE_THREADS_OFFSET): Likewise.
1957         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1958         (MULTIPLE_THREADS_OFFSET): Likewise.
1959         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1960         (MULTIPLE_THREADS_OFFSET): Likewise.
1961         * descr.h: Include stdint.h.
1962         (struct _pthread_descr_struct): Add p_header.data.sysinfo field.
1964 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
1966         * libc_pthread_init.c: Include stdlib.h.
1967         * sysdeps/i386/tls.h (tcbhead_t): Add multiple_threads member.
1968         (TLS_INIT_TP_EXPENSIVE): Define.
1969         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call,
1970         __libc_maybe_call2): In _LIBC check SHARED define.
1971         * sysdeps/ia64/tls.h: New file.
1972         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
1973         * sysdeps/unix/sysv/linux/ia64/Makefile: New file.
1974         * sysdeps/x86_64/tls.h (TLS_INIT_TP_EXPENSIVE): Define.
1975         * sysdeps/sparc/sparc32/tls.h: New file.
1976         * sysdeps/sparc/sparc64/tls.h: New file.
1977         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
1978         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
1979         * Makefile (tests): Add tst-cancel[1-6].
1980         (tests-reverse): Add tst-cancel5.
1981         Link libc.so before libpthread.so for tests-reverse.
1982         * tst-cancel1.c: New file.
1983         * tst-cancel2.c: New file.
1984         * tst-cancel3.c: New file.
1985         * tst-cancel4.c: New file.
1986         * tst-cancel5.c: New file.
1987         * tst-cancel6.c: New file.
1989 2002-12-27  Andreas Schwab  <schwab@suse.de>
1991         * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: New file.
1993 2002-12-22  Roland McGrath  <roland@redhat.com>
1995         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
1997 2002-12-21  Ulrich Drepper  <drepper@redhat.com>
1999         * pthread.c (init_rtsigs): Remove incomplete __builtin_expect.
2000         Reported by Art Hass <ahaas@airmail.net>.
2002 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
2004         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
2005         Use return 0 as 6th argument to FORWARD4.
2007 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
2009         * sysdeps/i386/useldt.h (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Only
2010         define if __ASSUME_LDT_WORKS > 0.
2011         * libc-cancellation.c (THREAD_GETMEM, THREAD_SETMEM): Redefine to
2012         struct member access if !FLOATING_STACKS.
2013         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
2015 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
2017         * internals.h (__pthread_thread_self): New prototype.
2018         (struct pthread_functions): Add ptr_pthread_thread_self field.
2019         * pthread.c (pthread_functions): Initialize ptr_pthread_thread_self.
2020         (__pthread_thread_self): New function.
2021         * libc-cancellation.c (__pthread_thread_self): Add weak_extern.
2022         (__libc_enable_asynccancel, __libc_disable_asynccancel): Don't
2023         use thread_self() directly if not FLOATING_STACKS.
2025 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
2027         * sysdeps/x86_64/pt-machine.h: Guard most of the header
2028         with #ifndef __ASSEMBLER__.
2029         * pthread.c (pthread_functions): Use SHLIB_COMPAT around
2030         pthread_attr_init_2_0 use.
2032 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
2034         * wrapsyscall.c: Removed.
2035         * weaks.c: Removed.
2036         * Makefile (distribute): Add tst-cancel-wrappers.sh.
2037         (routines): Remove weaks.  Add forward,
2038         libc_pthread_init, libc-cancellation.
2039         (shared-only-routines): Remove weaks.  Add forward.
2040         (libpthread-routines): Remove wrapsyscall.
2041         Add ptw-write, ptw-read, ptw-close, ptw-fcntl, ptw-accept,
2042         ptw-connect, ptw-recv, ptw-recvfrom, ptw-recvmsg, ptw-send,
2043         ptw-sendmsg, ptw-sendto, ptw-fsync, ptw-lseek, ptw-lseek64,
2044         ptw-llseek, ptw-msync, ptw-nanosleep, ptw-open, ptw-open64,
2045         ptw-pause, ptw-pread, ptw-pread64, ptw-pwrite, ptw-pwrite64,
2046         ptw-tcdrain, ptw-wait, ptw-waitpid, pt-system, pt-allocrtsig.
2047         (libpthread-shared-only-routines): Add pt-allocrtsig.
2048         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
2049         ($(objpfx)tst-cancel-wrappers.out): New rule.
2050         * sysdeps/pthread/bits/libc-lock.h: Include linuxthreads/internals.h
2051         if in libc.
2052         (__libc_maybe_call): In libpthread.* don't check for existance
2053         of the function.
2054         (__libc_maybe_call2): Define.
2055         (__libc_lock_init, __libc_lock_fini, __libc_lock_lock,
2056         __libc_lock_trylock, __libc_lock_unlock): Use it.
2057         * sysdeps/pthread/flockfile.c: New file.
2058         * sysdeps/pthread/ftrylockfile.c: New file.
2059         * sysdeps/pthread/funlockfile.c: New file.
2060         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
2061         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
2062         * sysdeps/unix/sysv/linux/allocrtsig.c: New file.
2063         * libc-cancellation.c: New file.
2064         * forward.c: New file.
2065         * libc_pthread_init.c: New file.
2066         * pt-system.c: New file.
2067         * pthread.c: Remove locale.h.
2068         (__pthread_manager_thread): Initialize multiple_threads.
2069         (__pthread_multiple_threads): Declare.
2070         (pthread_functions): New variable.
2071         (__pthread_initialize_minimal): Remove __uselocale call.
2072         Call __libc_pthread_init.
2073         (__pthread_initialize_manager): Initialize __pthread_multiple_threads,
2074         initial thread's multiple_threads and __libc_multiple_threads.
2075         Check MULTIPLE_THREADS_OFFSET value. Initialize manager thread's
2076         multiple_threads.
2077         (pthread_setschedparam, pthread_getschedparam): Rename to __
2078         prefixed variants.  Add strong_alias.
2079         (current_rtmin, current_rtmax, __libc_current_sigrtmin,
2080         __libc_current_sigrtmax, __libc_allocate_rtsig): Remove.
2081         (init_rtsigs): Use __libc_current_sigrtmin_private.
2082         (pthread_initialize): Only call init_rtsigs if
2083         !__ASSUME_REALTIME_SIGNALS.
2084         (__pthread_require_wrappers, __pthread_require_lockfile): Remove.
2085         * internals.h (__pthread_attr_destroy, __pthread_attr_setdetachstate,
2086         __pthread_attr_getdetachstate, __pthread_attr_setschedparam,
2087         __pthread_attr_getschedparam, __pthread_attr_setschedpolicy,
2088         __pthread_attr_getschedpolicy, __pthread_attr_setinheritsched,
2089         __pthread_attr_getinheritsched, __pthread_attr_setscope,
2090         __pthread_attr_getscope, __pthread_cond_init,
2091         __pthread_cond_destroy, __pthread_cond_wait,
2092         __pthread_cond_signal, __pthread_cond_broadcast,
2093         __pthread_condattr_init, __pthread_condattr_destroy,
2094         __pthread_equal, __pthread_getschedparam,
2095         __pthread_setschedparam, __pthread_setcancelstate,
2096         __pthread_setcanceltype, __pthread_enable_asynccancel,
2097         __libc_enable_asynccancel, __libc_pthread_init): New prototype.
2098         (__pthread_mutex_init, __pthread_mutex_destroy,
2099         __pthread_mutex_lock, __pthread_mutex_unlock,
2100         __pthread_mutex_trylock): Likewise.
2101         Add hidden_proto.
2102         (struct pthread_functions): New type.
2103         (__libc_pthread_functions): New variable.
2104         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define.
2105         * descr.h (struct _pthread_descr_struct): Add
2106         p_header.data.multiple_threads field.
2107         * manager.c (pthread_handle_create): Initialize multiple_threads.
2108         * cancel.c (__pthread_enable_asynccancel,
2109         __pthread_disable_asynccancel): New functions.
2110         (__pthread_provide_wrappers): Remove.
2111         (pthread_setcancelstate, pthread_setcanceltype): Rename to __
2112         prefixed variants.  Add strong_alias.
2113         * condvar.c (pthread_cond_init, pthread_cond_destroy,
2114         pthread_cond_wait, pthread_cond_signal, pthread_cond_broadcast,
2115         pthread_condattr_init, pthread_condattr_destroy): Likewise.
2116         * join.c (pthread_exit): Likewise.
2117         * attr.c (pthread_attr_destroy, pthread_attr_setdetachstate,
2118         pthread_attr_getdetachstate, pthread_attr_setschedparam,
2119         pthread_attr_getschedparam, pthread_attr_setschedpolicy,
2120         pthread_attr_getschedpolicy, pthread_attr_setinheritsched,
2121         pthread_attr_getinheritsched, pthread_attr_setscope,
2122         pthread_attr_getscope): Likewise.
2123         * mutex.c (__pthread_mutex_init, __pthread_mutex_destroy,
2124         __pthread_mutex_lock, __pthread_mutex_unlock,
2125         __pthread_mutex_trylock): Add hidden_def.
2126         * Versions (libc): Add __libc_pthread_init,
2127         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
2128         __libc_allocate_rtsig_private @@GLIBC_PRIVATE.
2129         * lockfile.c: Remove some USE_IN_LIBIO guards.
2130         (__pthread_provide_lockfile): Remove.
2131         * pt-allocrtsig.c: New file.
2132         * tst-cancel-wrappers.sh: New test.
2134 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
2136         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
2137         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
2138         * wrapsyscall.c: Remove creat, poll, pselect, readv, select,
2139         sigpause, sigsuspend, sigwaitinfo, waitid, and writev wrappers.
2141 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
2143         * wrapsyscall.c (CANCELABLE_SYSCALL): Don't define function as
2144         weak.  There is no reason for that.
2145         (CANCELABLE_SYSCALL_VA): Likewise.
2147 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
2149         * wrapsyscall.c: Add wrappers for creat, poll, pselect, readv, select,
2150         sigpause, __xpg_sigpause, sigsuspend, sigwaitinfo, waitid, and writev.
2151         * Versions: Export creat, poll, pselect, readv, select, sigpause,
2152         __xpg_sigpause, sigsuspend, sigwaitinfo, waitid, and writev from
2153         libpthread in version GLIBC_2.3.2.
2155 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
2157         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
2159 2002-12-05  Roland McGrath  <roland@redhat.com>
2161         * pthread.c (__pthread_initialize_minimal)
2162         [USE_TLS && SHARED && !USE___THREAD]: Initialize TLS and set up the
2163         TCB if the dynamic linker didn't do it at startup.
2165         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
2166         string.
2167         (TLS_DO_SET_THREAD_AREA, TLS_DO_MODIFY_LDT, TLS_SETUP_GS_SEGMENT):
2168         Submacros updated.
2169         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
2170         * sysdeps/alpha/tls.h (TLS_INIT_TP): Likewise (always zero).
2172 2002-12-03  Roland McGrath  <roland@redhat.com>
2174         * pthread.c (pthread_initialize) [SHARED]: Copy dl_error_tsd value
2175         from dynamic linker internal cell to new libc cell.
2177 2002-11-28  Roland McGrath  <roland@redhat.com>
2179         * tst-context.c: #define IS_IN_libpthread around #include <tls.h>
2180         before other headers, so FLOATING_STACKS is not defined wrongly.
2182         * sysdeps/i386/tls.h [!IS_IN_libpthread]: Enable TLS support
2183         even if [! FLOATING_STACKS].
2184         (TLS_DO_MODIFY_LDT_KERNEL_CHECK): New macro.
2185         If not under [__ASSUME_LDT_WORKS > 0], then do a runtime check of
2186         dl_osversion >= 2.3.99 and fatal if not.
2187         (TLS_DO_MODIFY_LDT): Use it.
2189 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
2191         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
2192         require it to 200112L.  Remove _POSIX_POLL and _POSIX_SELECT.
2193         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2195 2002-11-19  Ulrich Drepper  <drepper@redhat.com>
2197         * Versions (libc: GLIBC_2.0): Remove names of functions which are
2198         not defined in libc.
2199         * Makefile (shared-only-routines): Add weaks.
2200         * weaks.c: Remove functions which are not exported from libc.so.
2202 2002-11-14  Roland McGrath  <roland@redhat.com>
2204         * libc-tsd.c: New file.
2205         * Makefile (distribute): Add it.
2206         (libc-link.so): New variable.
2207         ($(objpfx)libpthread.so): Depend on that instead of libc.so file name.
2208         (libc-ok-for-link): New variable.
2209         [$(versioning) = yes]: Include $(common-objpfx)tls.make and define
2210         libc-ok-for-link to $(use-thread).
2211         [$(libc-ok-for-link) = no]
2212         (libc-link.so): Set to $(objpfx)libc.so, not $(common-objpfx)libc.so.
2213         ($(objpfx)libc_pic_lite.a,$(objpfx)libc_pic_lite.os, $(objpfx)libc.so):
2214         New targets.
2215         (generated): Append them.
2216         (extra-objs): Append libc-tsd.os.
2218         * libc-tls-loc.c: New file.
2219         * Makefile (libpthread-routines): Add it.
2221 2002-11-14  Andreas Schwab  <schwab@suse.de>
2223         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Fix unterminated
2224         string.
2226 2002-11-13  Roland McGrath  <roland@redhat.com>
2228         * Examples/ex6.c (main): Improve error reporting.
2230 2002-11-04  Ulrich Drepper  <drepper@redhat.com>
2232         * sysdeps/i386/Makefile: Compile pthread.c and sighandler.c with
2233         -fno-omit-frame-pointer.  Patch by Andreas Steinmetz <ast@domdv.de>.
2235         * sysdeps/i386/useldt.h [PIC] (USETLS_LOAD_EBX): Use correct input
2236         register number.
2237         (DO_SET_THREAD_AREA): Mark asm output specifiers correctly.
2239 2002-10-22  Jakub Jelinek  <jakub@redhat.com>
2241         * manager.c (pthread_start_thread): Call __uselocale even
2242         if [! SHARED].  Patch by Leon Kanter <leon@geon.donetsk.ua>.
2244 2002-10-17  Roland McGrath  <roland@redhat.com>
2246         * Makefile (unload): Don't link in libpthread.so.
2247         ($(objpfx)unload.out): Do depend on it.
2248         * unload.c (main): Improve error reporting.
2250 2002-10-09  Roland McGrath  <roland@redhat.com>
2252         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
2253         Under [__PIC__], call the function via the pointer fetched for
2254         comparison rather than a call by name that uses the PLT.
2255         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
2256         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
2257         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
2258         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
2259         (__libc_key_create, __libc_getspecific, __libc_setspecific)
2260         (__libc_atfork): Use it.
2262         * pthread.c [SHARED] (__libc_dl_error_tsd): New function.
2263         (pthread_initialize) [SHARED]: Set _dl_error_catch_tsd to that.
2264         * Versions (libc: GLIBC_PRIVATE): Add __libc_dl_error_tsd.
2265         (ld: GLIBC_PRIVATE): Set removed.
2267 2002-10-11  Ulrich Drepper  <drepper@redhat.com>
2269         * sysdeps/unix/sysv/linux/execve.c: New file.
2271 2002-10-09  Jakub Jelinek  <jakub@redhat.com>
2273         * no-tsd.c: Include stdlib.h.
2275 2002-10-07  Jakub Jelinek  <jakub@redhat.com>
2277         * sysdeps/unix/sysv/linux/allocalim.h: New file.
2278         * descr.h (struct _pthread_descr_struct): Add p_alloca_cutoff
2279         field.
2280         * manager.c (__pthread_allocate_stack): Add out_stacksize argument.
2281         Pass stack size to caller.
2282         (pthread_handle_create): Set p_alloca_cutoff.
2283         * pthread.c (__pthread_initial_thread): Use C99 designated
2284         initializers.  Set p_alloca_cutoff.
2285         (__pthread_manager_thread): Likewise.
2286         (__pthread_initialize_minimal) [USE_TLS]: Set p_alloca_cutoff
2287         for initial thread.
2288         (__pthread_init_max_stacksize): Possibly decrease p_alloca_cutoff
2289         for initial thread.
2290         (__pthread_initialize_manager) [USE_TLS]: Set p_alloca_cutoff
2291         for manager thread.
2292         * specific.c (__libc_alloca_cutoff): New function.
2293         * no-tsd.c (__libc_alloca_cutoff): New function.
2294         * Versions: Export __libc_alloca_cutoff@@GLIBC_PRIVATE from libc
2295         and libpthread.
2297 2002-10-02  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2299         * sysdeps/sh/pt-machine.h: Make C code ifndef'ed with __ASSEMBLER__.
2300         * sysdeps/sh/tls.h: Likewise.
2301         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
2303 2002-09-29  Jakub Jelinek  <jakub@redhat.com>
2305         * sysdeps/pthread/tst-timer.c (main): Clear
2306         SIGEV2.sigev_notify_attributes.
2308 2002-09-29  Ulrich Drepper  <drepper@redhat.com>
2310         * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Don't use
2311         INLINE_SYSCALL for set_thread_area syscall.
2313 2002-09-28  Roland McGrath  <roland@redhat.com>
2315         * pthread.c (__pthread_reset_main_thread) [FLOATING_STACKS]:
2316         Don't call setrlimit, since we did no prior bogon we need to undo.
2318 2002-09-27  Roland McGrath  <roland@redhat.com>
2320         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Don't include <pt-machine.h>.
2322 2002-09-24  Roland McGrath  <roland@redhat.com>
2324         * sysdeps/x86_64/tls.h: New file.
2326 2002-09-23  Roland McGrath  <roland@redhat.com>
2328         * Examples/ex13.c (dump_mut): int -> size_t for counter.
2330 2002-09-18  Bruno Haible  <bruno@clisp.org>
2332         * Examples/ex10.c (thread): Fail if pthread_mutex_timedlock() returns
2333         an unexpected error code.
2335         * internals.h (__pthread_message): Add const to first parameter type.
2336         * pthread.c (__pthread_message): Likewise.
2338         * sysdeps/unix/sysv/linux/configure: Moved to ../sysdeps/pthread.
2340 2002-09-17  Roland McGrath  <roland@redhat.com>
2342         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT, TLS_DO_SET_THREAD_AREA):
2343         Set the descriptor limit to the full 4GB, so %gs:OFFSET works for any
2344         offset (positive or negative) relative to the thread struct.
2345         * sysdeps/i386/useldt.h (DO_MODIFY_LDT, DO_SET_THREAD_AREA): Likewise.
2347 2002-09-12  Jakub Jelinek  <jakub@redhat.com>
2349         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Move...
2350         * sysdeps/unix/sysv/linux/sparc/Makefile: ...here.
2351         Replace /usr/lib/crt[in].o with crt[in].o too.
2353 2002-09-11  Steven Munroe  <sjmunroe@us.ibm.com>
2355         * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
2357 2002-09-04  Bruno Haible  <bruno@clisp.org>
2359         * pthread.c: Include <sys/time.h>.
2360         (is_smp_system): Move to sysdeps/unix/sysv/linux/smp.h.
2361         * sysdeps/unix/sysv/linux/smp.h: New file, extracted from pthread.c.
2362         * Makefile (distribute): Add smp.h to the list.
2364 2002-09-04  Bruno Haible  <bruno@clisp.org>
2366         * sysdeps/alpha/pt-machine.h: Choose different include file location
2367         on non-Linux platforms.
2369         * wrapsyscall.c (PROMOTE_INTEGRAL_TYPE): New macro.
2370         (open, open64): Change va_arg argument type to the integral type to
2371         which mode_t promotes.
2373         * sysdeps/pthread/tst-timer.c (main): Don't assume anything about
2374         the structure of 'struct sigevent'.
2376         * errno.c (__errno_location, __h_errno_location, __res_state):
2377         Use prototype function definitions.
2379 2002-07-29  Steven Munroe  <sjmunroe@us.ibm.com>
2381         * shlib-versions: Set libpthread version to 2.3 for powerpc64.
2382         * sysdeps/powerpc/pt-machine.h: moved to...
2383         * sysdeps/powerpc/powerpc32/pt-machine.h: ...here
2384         * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
2386 2002-09-02  Roland McGrath  <roland@redhat.com>
2388         * sysdeps/powerpc/Makefile (CFLAGS-pt-initfini.s): New variable.
2390 2002-09-01  Roland McGrath  <roland@redhat.com>
2392         * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t): Add new keys
2393         CTYPE_B, CTYPE_TOLOWER, CTYPE_TOUPPER.
2395         * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_address): New macro.
2396         (__libc_internal_tsd_address): Declare it.
2397         * Versions (libc, ld, libpthread: GLIBC_PRIVATE): Add
2398         __libc_internal_tsd_address.
2399         * specific.c (libc_internal_tsd_address): New function.
2400         (__libc_internal_tsd_address): New variable.
2401         * no-tsd.c (__libc_internal_tsd_address): New variable.
2403 2002-08-31  Ulrich Drepper  <drepper@redhat.com>
2405         * Makefile: Don't use rule for crt%.o, spell it out as rules for
2406         crti.o and crtn.o.
2408 2002-08-30  Roland McGrath  <roland@redhat.com>
2410         * Makefile (extra-objs, omit-deps): Add crtn.
2411         ($(objpfx)libpthread.so): Depend on $(objpfx)crtn.o.
2412         ($(objpfx)libpthread.so: +postinit): Append $(objpfx)crtn.o.
2413         ($(objpfx)crtn.S): New target.
2414         ($(objpfx)crt%.o): Pattern rule replaces crti.o target.
2415         (generated): Add crtn.S.
2417         * sysdeps/unix/sysv/linux/x86_64/Makefile ($(objpfx)specs): Massage
2418         crtn.o pathname too.
2420 2002-08-30  Jakub Jelinek  <jakub@redhat.com>
2422         * pthread.c (__pthread_initialize_minimal): Call __uselocale even
2423         if [! SHARED].
2425 2002-08-30  Roland McGrath  <roland@redhat.com>
2427         * tst-static-locale.c: New file.
2428         * Makefile (tests, tests-static): Add it.
2430 2002-04-24  Steven Munroe  <sjmunroe@us.ibm.com>
2432         * spinlock.c (__pthread_lock): Fix spurious wakeup
2433         handling.  Don't clear lowest bit of list pointer as sign the thread
2434         is still on the wait list.  Don't restart after spurious wakeup
2435         with spinning to get the lock.
2436         (__pthread_unlock): Take set lowest bit into account when handling
2437         pointer to list elements.
2438         Patch by Steve Munroe <sjmunroe@us.ibm.com>.
2440 2002-08-28  Roland McGrath  <roland@redhat.com>
2442         * sysdeps/pthread/timer_routines.c (thread_func): Fix type in cast.
2444 2002-08-28  Jakub Jelinek  <jakub@redhat.com>
2446         * sysdeps/unix/sysv/linux/hppa/aio_cancel.c: New file.
2447         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
2448         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
2450 2002-08-28  Ulrich Drepper  <drepper@redhat.com>
2452         * sysdeps/pthread/timer_routines.c (thread_func): Change return
2453         type to void and add casts in use to avoid warnings with all gcc
2454         versions.
2456 2002-08-08  Jakub Jelinek  <jakub@redhat.com>
2458         * sysdeps/unix/sysv/linux/bits/local_lim.h (PTHREAD_THREADS_MAX):
2459         Bump to 16384.
2460         * manager.c (__pthread_handles): Remove.
2461         * pthandles.c: New file.
2462         * pthread.c (__pthread_initialize_minimal): Initialize
2463         __pthread_handles[0] and __pthread_handles[1].
2464         * Makefile (libpthread-routines): Add pthandles (must be last).
2466 2002-08-26  Brian Youmans  <3diff@gnu.org>
2468         * Examples/ex10.c: Corrected version number in Lesser GPL copying
2469         permission notice from 2 to 2.1.
2470         * Examples/ex11.c: Likewise.
2471         * Examples/ex13.c: Likewise.
2472         * Examples/ex8.c: Likewise.
2473         * Examples/ex9.c: Likewise.
2474         * barrier.c: Likewise.
2475         * events.c: Likewise.
2476         * lockfile.c: Likewise.
2477         * no-tsd.c: Likewise.
2478         * pt-machine.c: Likewise.
2479         * ptclock_gettime.c: Likewise.
2480         * ptclock_settime.c: Likewise.
2481         * rwlock.c: Likewise.
2482         * sysdeps/alpha/pspinlock.c: Likewise.
2483         * sysdeps/alpha/pt-machine.h: Likewise.
2484         * sysdeps/arm/pspinlock.c: Likewise.
2485         * sysdeps/arm/pt-machine.h: Likewise.
2486         * sysdeps/cris/pspinlock.c: Likewise.
2487         * sysdeps/cris/pt-machine.h: Likewise.
2488         * sysdeps/hppa/pspinlock.c: Likewise.
2489         * sysdeps/hppa/pt-machine.h: Likewise.
2490         * sysdeps/i386/i686/pt-machine.h: Likewise.
2491         * sysdeps/i386/pspinlock.c: Likewise.
2492         * sysdeps/i386/pt-machine.h: Likewise.
2493         * sysdeps/i386/useldt.h: Likewise.
2494         * sysdeps/ia64/pspinlock.c: Likewise.
2495         * sysdeps/ia64/pt-machine.h: Likewise.
2496         * sysdeps/m68k/pspinlock.c: Likewise.
2497         * sysdeps/m68k/pt-machine.h: Likewise.
2498         * sysdeps/mips/pspinlock.c: Likewise.
2499         * sysdeps/mips/pt-machine.h: Likewise.
2500         * sysdeps/powerpc/pspinlock.c: Likewise.
2501         * sysdeps/powerpc/pt-machine.h: Likewise.
2502         * sysdeps/pthread/bits/initspin.h: Likewise.
2503         * sysdeps/pthread/bits/libc-lock.h: Likewise.
2504         * sysdeps/pthread/bits/libc-tsd.h: Likewise.
2505         * sysdeps/pthread/getcpuclockid.c: Likewise.
2506         * sysdeps/pthread/posix-timer.h: Likewise.
2507         * sysdeps/pthread/timer_create.c: Likewise.
2508         * sysdeps/pthread/timer_delete.c: Likewise.
2509         * sysdeps/pthread/timer_getoverr.c: Likewise.
2510         * sysdeps/pthread/timer_gettime.c: Likewise.
2511         * sysdeps/pthread/timer_routines.c: Likewise.
2512         * sysdeps/pthread/timer_settime.c: Likewise.
2513         * sysdeps/pthread/tst-timer.c: Likewise.
2514         * sysdeps/s390/pspinlock.c: Likewise.
2515         * sysdeps/s390/s390-32/pt-machine.h: Likewise.
2516         * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2517         * sysdeps/sh/pspinlock.c: Likewise.
2518         * sysdeps/sh/pt-machine.h: Likewise.
2519         * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
2520         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2521         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
2522         * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
2523         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2524         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
2525         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
2526         * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
2527         * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
2528         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2529         * tststack.c: Likewise.
2530         * unload.c: Likewise.
2531         * weaks.c: Likewise.
2532         * wrapsyscall.c: Likewise.
2534         * sysdeps/pthread/pt-initfini.c: Changed copying
2535         permission notice to Lesser GPL from Library GPL, including the
2536         references in the special exception.
2537         * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Likewise.
2538         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Likewise.
2539         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c:
2540         Likewise.
2541         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c:
2542         Likewise.
2543         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Likewise.
2545 2002-08-26  Ulrich Drepper  <drepper@redhat.com>
2547         * Examples/ex10.c (thread): tv_nsec == 1000000000 is already
2548         overflow [PR libc/4244].
2550 2002-08-25  Ulrich Drepper  <drepper@redhat.com>
2552         * sysdeps/pthread/timer_routines.c (thread_func): Make the
2553         compiler happy by adding a return statement which will never be
2554         reached.
2556         * tst-context.c (main): Cast to long before casting to pointer.
2558         * Examples/ex17.c (main): Use correct format string.
2560         * Examples/ex9.c (thread): Remove incorrect return statement.
2562 2002-08-23  Ulrich Drepper  <drepper@redhat.com>
2564         * pthread.c (__linuxthreads_version): New global constant.
2566 2002-08-23  Andreas Jaeger  <aj@suse.de>
2568         * sysdeps/x86_64/pt-machine.h: Use %fs instead of %gs
2569         as thread specific register.
2570         (testandset): Fix inline asm.
2571         (THREAD_GETMEM): Fix inline asm.
2573 2002-08-22  Roland McGrath  <roland@redhat.com>
2575         * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Remove [HAVE_TLS_SUPPORT]
2576         conditional.
2577         (INIT_THREAD_SELF): Pass second arg to DO_SET_THREAD_AREA.
2578         (DO_SET_THREAD_AREA): Take second arg, pass to DO_SET_THREAD_AREA_REUSE
2579         macro.  That chooses whether to reuse %gs value or let kernel set it.
2580         [USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, always 1.
2581         [!USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, true if arg is
2582         not constant 0.
2584 2002-08-21  Ulrich Drepper  <drepper@redhat.com>
2586         * sysdeps/i386/tls.h (TLS_SETUP_GS_SEGMENT): Add new parameter
2587         also to the third definition of this macro.
2589 2002-06-17  Andreas Jaeger  <aj@suse.de>
2591         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
2592         Set it.
2594 2002-08-20  Ulrich Drepper  <drepper@redhat.com>
2596         * sysdeps/i386/useldt.h: Go back to using 16-bit instructions when
2597         loading/reading segment registers.  Some old hardware doesn't
2598         handle the 32-bit instructions as expected.
2599         * sysdeps/i386/tls.h: Likewise.
2601         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Second parameter is
2602         renamed to secondcall and use is negated.
2603         (TLS_SETUP_GS_SEGMENT): Likewise.
2604         (TLS_INIT_TP): Likewise.
2605         * sysdeps/sh/tls.h (TLS_INIT_TP): Second parameter is renamed to
2606         secondcall.
2608         * sysdeps/i386/tls.h: Use 32-bit operations when handling segment
2609         registers.  No need to mask upper 16 bits in this case.
2610         * sysdeps/i386/useldt.h: Likewise.
2611         (DO_SET_THREAD_AREA): We have to load %gs again even if the value
2612         is the same since the GDT content changed.
2614         * sysdeps/i386/tls.h (TLS_INIT_TP): Add new parameter and pass it on
2615         to TLS_SETUP_GS_SEGMENT.
2616         (TLS_SETUP_GS_SEGMENT): Add new parameter and pass it on to
2617         TLS_DO_SET_THREAD_AREA.
2618         (TLS_DO_SET_THREAD_AREA): If new parameter is zero determine
2619         entry number from %gs value.
2620         * sysdeps/sh/tls.h (TLS_INIT_TP): Add new parameter and simply
2621         ignore it.
2623         * manager.c (pthread_handle_create): Pass NULL to _dl_allocate_tls.
2624         Pass true to _dl_deallocate_tls.
2625         (pthread_free): Likewise.
2626         * pthread.c (__pthread_initialize_manager): Likewise.
2628 2002-08-19  Ulrich Drepper  <drepper@redhat.com>
2630         * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Use correct shift when
2631         computing index from %gs value.
2633 2002-08-16  Roland McGrath  <roland@redhat.com>
2635         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Calculate segment
2636         register value from entry number properly.
2638         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Rewrite asm to use %ebx
2639         optimally conditional on [__PIC__].
2640         (TLS_DO_SET_THREAD_AREA): New macro, implement inline syscall
2641         without touching errno, and use latest modify_ldt-like interface.
2642         (TLS_SETUP_GS_SEGMENT): Use that instead of INLINE_SYSCALL.
2643         * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Set %gs in this macro.
2644         (DO_SET_THREAD_AREA): New macro, uses current syscall interface with
2645         existing %gs value as the segment to set.
2646         (INIT_THREAD_SELF): Rewritten using those.  Use set_thread_area only
2647         under [HAVE_TLS_SUPPORT] so we can rely on the initialization done
2648         by the first thread's early TLS setup.
2650 2002-08-15  Roland McGrath  <roland@redhat.com>
2652         * sysdeps/i386/tls.h (TLS_INIT_TP): Use statement expression and
2653         return a value as callers now expect.
2655 2002-08-11  Roland McGrath  <roland@redhat.com>
2657         * pthread.c (__pthread_initialize_manager): Initialize
2658         p_header.data.tcb field of manager thread's descriptor.
2659         (__pthread_initialize_minimal): Don't initialize p_header.data.self
2660         field, already done by TLS_INIT_TP.
2662         * manager.c (pthread_handle_create): Move p_header field initializers
2663         together.
2665 2002-08-08  Ulrich Drepper  <drepper@redhat.com>
2667         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Removed.
2669 2002-08-07  Ulrich Drepper  <drepper@redhat.com>
2671         * pthread.c (__linuxthreads_initial_report_events): New variable.
2672         (__pthread_initialize_manager): Use it to initialize p_report_events
2673         of initial thread.
2674         [TLS]: Store pointer to descriptor of manager in __pthread_handles.
2676 2002-08-07  Roland McGrath  <roland@redhat.com>
2678         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Add an extra argument with
2679         an "m" constraint to the asm so the compiler knows LDT_ENTRY was used.
2681 2002-08-02  Roland McGrath  <roland@redhat.com>
2683         * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t):
2684         Add _LIBC_TSD_KEY_LOCALE.
2685         * manager.c (pthread_start_thread) [!(USE_TLS && HAVE___THREAD)]:
2686         Call __uselocale to initialize our per-thread locale pointer to
2687         the global one.
2688         * pthread.c (__pthread_initialize_minimal): Likewise.
2690         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Add missing \s.
2692 2002-08-02  Ulrich Drepper  <drepper@redhat.com>
2694         * pthread.c: Declare _errno, _h_errno, and _res unless we use TLS
2695         internally.
2697         * cancel.c (__pthread_perform_cleanup) [USE_TLS && HAVE___THREAD]:
2698         Don't use p_libc_specific element in thread descriptor.
2700 2002-07-30  Roland McGrath  <roland@redhat.com>
2702         * sysdeps/pthread/bits/libc-tsd.h: Include <tls.h>.
2703         [USE_TLS && HAVE___THREAD]: Just include the sysdeps/generic file,
2704         which does the right thing when __thread support is available.
2705         * descr.h (struct _pthread_descr_struct) [USE_TLS && HAVE___THREAD]:
2706         Omit `p_libc_specific', `p_errnop', `p_errno', `p_h_errnop',
2707         `p_h_errno', `p_resp', and `p_res' members.
2708         * pthread.c (__pthread_initialize_minimal) [USE_TLS && HAVE___THREAD]:
2709         Don't initialize `p_errnop' and `p_h_errnop' members.
2710         (__pthread_reset_main_thread): Likewise.
2711         (__pthread_initialize_manager): Likewise.
2712         * manager.c (__pthread_manager, pthread_handle_create): Likewise.
2713         * pthread.c (pthread_initialize) [USE_TLS && HAVE___THREAD]:
2714         Don't initialize `p_resp' member.
2715         (__pthread_reset_main_thread): Likewise.
2716         * manager.c (pthread_handle_create): Likewise.
2717         * specific.c (libc_internal_tsd_set, libc_internal_tsd_get):
2718         Conditionalize these on [!(USE_TLS && HAVE___THREAD)].
2719         * no-tsd.c: Conditionalize contents on [!(USE_TLS && HAVE___THREAD)].
2720         * errno.c [USE_TLS && HAVE___THREAD]
2721         (__h_errno_location, __res_state): Don't define these at all.
2723         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens around arguments!
2724         (INSTALL_NEW_DTV, GET_DTV): Likewise.
2725         * sysdeps/sh/tls.h (INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV): Likewise.
2727         * weaks.c: Don't include <errno.h> here.
2729 2002-08-01  Roland McGrath  <roland@redhat.com>
2731         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): New macro, broken out of
2732         TLS_INIT_TP.
2733         (TLS_DO_SET_THREAD_AREA): New macro, uses thread_set_area syscall.
2734         (TLS_SETUP_GS_SEGMENT): New macro, try one or the other or both.
2735         (TLS_INIT_TP): Use that.
2737 2002-08-02  Jakub Jelinek  <jakub@redhat.com>
2739         * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Move from INIT_THREAD_SELF.
2740         (INIT_THREAD_SELF): Use sys_thread_area syscall instead if available.
2741         (FREE_THREAD): Avoid modify_ldt if using GDT.
2742         * sysdeps/i386/pspinlock.c (__have_no_set_thread_area): New variable.
2744 2002-07-25  Jakub Jelinek  <jakub@redhat.com>
2746         * sysdeps/i386/tls.h: Use __ASSEMBLER__ test macro not ASSEMBLER.
2747         * sysdeps/i386/pt-machine.h: Likewise.
2748         * sysdeps/i386/useldt.h: Likewise.
2750 2002-07-22  Ulrich Drepper  <drepper@redhat.com>
2752         * pthread.c (__pthread_initialize_minimal): If !SHARED and TLS
2753         call __libc_setup_tls first.
2754         * Makefile: Actually create tst-signal.out file when running the test.
2755         (tests): Add tststatic.
2756         * Examples/tststatic.c: New file.
2758 2002-07-19  Ulrich Drepper  <drepper@redhat.com>
2760         * errno.c (__errno_location): Don't define unless !USE_TLS
2761         || !HAVE___THREAD.
2762         * sysdeps/i386/pt-machine.c: Protect C code with #ifndef ASSEMBLER.
2763         * sysdeps/i386/tls.h: Likewise.
2764         * sysdeps/i386/useldt.h: Likewise.
2765         * sysdeps/i386/i686/pt-machine.h: Likewise.
2767 2002-07-02  H.J. Lu  <hjl@gnu.org>
2769         * sysdeps/mips/pspinlock.c: Don't include <sgidefs.h>.  Always
2770         use ll/sc.
2771         * sysdeps/mips/pt-machine.h: Likewise.
2773 2002-07-14  Ulrich Drepper  <drepper@redhat.com>
2775         * manager.c (pthread_handle_create): Initialize self-reference in
2776         descriptor.
2778 2002-07-01  Jakub Jelinek  <jakub@redhat.com>
2780         * Examples/ex9.c (main): Remove unused th variable.
2782 2002-07-10  Ulrich Drepper  <drepper@redhat.com>
2784         * wrapsyscall.c: Add __nanosleep alias.
2785         * Versions (GLIBC_2.2.6): Add __nanosleep.
2786         * bug-sleep.c: New file.
2787         * Makefile (tests): Add bug-sleep.
2789 2002-06-19  Steven Munroe  <sjmunroe@vnet.ibm.com>
2791         * Examples/ex9.c (main):  Use list of children and join them.
2792         (thread): Do not call exit.
2794 2002-06-20  Ulrich Drepper  <drepper@redhat.com>
2796         * spinlock.c (wait_node_alloc): We cannot use compare-and-exchange.
2797         Unconditionally use the code using spinlock.  Use __pthread_release
2798         to free a spinlock.
2799         (wait_node_free): Likewise.
2800         (__pthread_acquire, __pthread_release): Unconditionally define.
2802 2002-06-07  Jakub Jelinek  <jakub@redhat.com>
2804         * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Fix typo.
2806 2002-05-24  Ulrich Drepper  <drepper@redhat.com>
2808         * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Use __sync_synchronize.
2810 2002-05-21  Ulrich Drepper  <drepper@redhat.com>
2812         * sysdeps/pthread/pthread.h (pthread_create): Rename first
2813         parameter.
2814         (pthread_cancel): Likewise.
2815         * internals.h (__pthread_create_2_1): Likewise.
2816         * sysdeps/unix/sysv/linux/bits/sigthread.h (pthread_kill): Likewise.
2818 2002-05-20  Ulrich Drepper  <drepper@redhat.com>
2820         * sysdeps/alpha/pt-machine.c (THREAD_SELF): Remove clobber.
2821         Patch by Glen Nakamura <gen@flex.com>.
2823 2002-05-03  Ulrich Drepper  <drepper@redhat.com>
2825         * signals.c: Move sighandler functions to...
2826         * sighandler.c: ...here.  New file.
2827         * signals.c: Move signal handler related type definitions to...
2828         * internals.h: ...here.  Add prototypes for signal handlers.
2829         * Makefile (libpthread-routines): Add sighandler.
2830         (CFLAGS-sighandler.c): Add $(exceptions).
2832 2002-04-30  Jakub Jelinek  <jakub@redhat.com>
2834         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
2836 2002-04-08  Ulrich Drepper  <drepper@redhat.com>
2838         * sysdeps/pthread/timer_getoverr.c: Return real overrun.
2839         * sysdeps/pthread/posix-timer.h (struct timer_node): Add overrun_count.
2840         * sysdeps/pthread/timer_routines.c (thread_func): Schedule next timeout
2841         based on previous one and not on current time.  Count overruns.
2842         Patch by Eric F. Sorton <eric@cctcorp.com>.
2844         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add DELAYTIMER_MAX.
2846 2002-04-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
2848         * sysdeps/sh/pt-machine.h: Define _PT_MACHINE_H
2849         if it isn't defined yet.
2850         (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Defined.
2851         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
2852         Likewise.
2853         * sysdeps/sh/tls.h: New file.
2855 2002-04-08  Jakub Jelinek  <jakub@redhat.com>
2857         * manager.c (__pthread_manager_event): Use self instead of arg
2858         for INIT_THREAD_SELF.
2859         * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Use sizeof (struct
2860         _pthread_descr_struct) instead of sizeof (*descr).
2862 2002-04-05  Ulrich Drepper  <drepper@redhat.com>
2864         * sysdeps/ia64/pt-machine.h: Protect against multiple inclusion.
2865         * sysdeps/alpha/pt-machine.h: Likewise.
2866         * sysdeps/arm/pt-machine.h: Likewise.
2867         * sysdeps/cris/pt-machine.h: Likewise.
2868         * sysdeps/hppa/pt-machine.h: Likewise.
2869         * sysdeps/m68k/pt-machine.h: Likewise.
2870         * sysdeps/mips/pt-machine.h: Likewise.
2871         * sysdeps/powerpc/pt-machine.h: Likewise.
2872         * sysdeps/s390/s390-32/pt-machine.h: Likewise.
2873         * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2874         * sysdeps/sh/pt-machine.h: Likewise.
2875         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2876         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2877         * sysdeps/x86_64/pt-machine.h: Likewise.
2879 2002-04-05  Jakub Jelinek  <jakub@redhat.com>
2881         * man/pthread_mutexattr_init.man (pthread_mutexattr_settype): Document
2882         instead of pthread_mutexattr_setkind_np.
2883         (pthread_mutexattr_gettype): Similarly.
2884         * man/pthread_mutexattr_setkind_np.man: New.
2885         * man/Makefile (SOURCES): Add pthread_mutexattr_setkind_np.man.
2887 2002-04-02  Ulrich Drepper  <drepper@redhat.com>
2889         * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Define.
2891 2002-03-22  Jakub Jelinek  <jakub@redhat.com>
2893         * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Remove.
2895 2002-03-22  Ulrich Drepper  <drepper@redhat.com>
2897         * internals.h (MEMORY_BARRIER): Define as asm with memory as clobber.
2899 2002-03-17  Andreas Jaeger  <aj@suse.de>
2901         * sysdeps/i386/pt-machine.h: Add testandset and __compare_and_swap
2902         prototpyes.
2903         * sysdeps/alpha/pt-machine.h: Likewise.
2904         * sysdeps/arm/pt-machine.h: Likewise.
2905         * sysdeps/cris/pt-machine.h: Likewise.
2906         * sysdeps/hppa/pt-machine.h: Likewise.
2907         * sysdeps/i386/i686/pt-machine.h: Likewise.
2908         * sysdeps/ia64/pt-machine.h: Likewise.
2909         * sysdeps/m68k/pt-machine.h: Likewise.
2910         * sysdeps/mips/pt-machine.h: Likewise.
2911         * sysdeps/powerpc/pt-machine.h: Likewise.
2912         * sysdeps/s390/s390-32/pt-machine.h: Likewise.
2913         * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2914         * sysdeps/sh/pt-machine.h: Likewise.
2915         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2916         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2917         * sysdeps/x86_64/pt-machine.h: Likewise.
2919         * internals.h: Move testandset and __compare_and_swap prototypes
2920         to pt-machine.h.
2922 2002-03-03  Andreas Jaeger  <aj@suse.de>
2924         * errno.c: Include resolv.h to avoid warning.
2926 2002-02-27  Ulrich Drepper  <drepper@redhat.com>
2928         * pthread.c [USE_TLS] (thread_self_stack): Correct check for upper
2929         stack limit.
2931 2002-02-23  Ulrich Drepper  <drepper@redhat.com>
2933         * attr.c (pthread_getattr_np): Don't take thread descriptor size
2934         into account if USE_TLS.
2935         * manager.c (pthread_handle_create): Free TLS data structures if call
2936         failed.  Pass correct stack to clone if USE_TLS.
2937         * sysdeps/i386/pt-machine.h: Handle multiple inclusion.
2938         * sysdeps/i386/i686/pt-machine.h: Likewise.
2939         * sysdeps/i386/tls.h: Unconditionally include <pt-machine.h>.
2941         * descr.h (struct _pthread_descr_struct): Update p_header for TLS.
2942         Add p_stackaddr element #if USE_TLS.
2943         * internals.c: Include <tls.h>.
2944         * manager.c: Integrate creating and handling of thread descriptor
2945         for TLS.
2946         * pthread.c: Likewise.
2947         * sysdeps/i386/tls.h (tcbhead_t): Add self pointer.
2948         Include <linuxthreads/descr.h> only if TLS is really used.
2949         (GET_DTV): New macro.
2950         (TLS_INIT_TP): Initialize self pointer.
2952 2002-02-17  Andreas Schwab  <schwab@suse.de>
2954         * signals.c (sigwait): Check for old sighandler being SIG_ERR,
2955         not NULL.
2957 2002-02-12  Ulrich Drepper  <drepper@redhat.com>
2959         * sysdeps/i386/tls.c (INSTALL_NEW_DTV): Define.
2960         (INSTALL_DTV): Adjust for being passed pointer to element with length.
2962 2002-02-08  Ulrich Drepper  <drepper@redhat.com>
2964         * sysdeps/i386/tls.h (TLS_INIT_TP): Also initialize %gs.
2966 2002-02-08  Richard Henderson  <rth@redhat.com>
2968         * sysdeps/alpha/elf/pt-initfini.c: Use \n\ for multiline string.
2970 2002-02-08  Ulrich Drepper  <drepper@redhat.com>
2972         * sysdeps/i386/tls.h: TLS cannot be supported with FLOATING_STACKS
2973         after all.
2975 2002-02-07  H.J. Lu  <hjl@gnu.org>
2977         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Silence the
2978         gcc warning.
2979         (__pthread_spin_lock): Remove ".set noreorder".
2980         * sysdeps/mips/pt-machine.h (__compare_and_swap): Liekwise.
2982 2002-02-05  H.J. Lu  <hjl@gnu.org>
2984         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Not use
2985         branch likely.
2986         * sysdeps/mips/pt-machine.h (testandset): Likewise.
2987         (__compare_and_swap): Likewise.
2989 2002-02-07  Ulrich Drepper  <drepper@redhat.com>
2991         * internals.h: Move declarations/definitions of
2992         __pthread_initial_thread_bos, __pthread_initial_thread,
2993         __pthread_manager_thread_bos, __pthread_manager_thread_tos,
2994         __pthread_manager_thread, __pthread_nonstandard_stacks, STACK_SIZE,
2995         CURRENT_STACK_FRAME, __pthread_find_self, and thread_self...
2996         * descr.h: ...here.
2997         * sysdeps/i386/tls.h: Add TLS definitions also for !FLOATING_STACKS.
2998         Define THREAD_GETMEM accordingly.
3000 2002-02-06  Ulrich Drepper  <drepper@redhat.com>
3002         * sysdeps/i386/tls.h: Include <stddef.h> for size_t.
3004         * sysdeps/i386/tls.h: Define THREAD_DTV.
3006 2002-02-04  Ulrich Drepper  <drepper@redhat.com>
3008         * internals.h: Move thread descriptor definition...
3009         * descr.h.: ...here.  New file.
3010         * sysdeps/i386/tls.h: New file.
3012 2002-02-01  H.J. Lu  <hjl@gnu.org>
3014         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Use a
3015         different register in the delayed slot.  Use branch likely.
3017         * sysdeps/mips/pt-machine.h (testandset): Call _test_and_set.
3018         (__compare_and_swap): Return 0 only when failed to compare. Use
3019         branch likely.
3021 2002-02-01  Jakub Jelinek  <jakub@redhat.com>
3023         * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set,
3024         __pthread_kill_other_threads_np): Move to GLIBC_PRIVATE.
3025         * sysdeps/i386/i586/Versions: Move all symbols to GLIBC_PRIVATE.
3026         * sysdeps/i386/i686/Versions: Move all symbols to GLIBC_PRIVATE.
3027         * sysdeps/sparc/sparc32/sparcv9/Versions: New file.
3028         * sysdeps/sparc/sparc64/Versions: New file.
3029         * sysdeps/ia64/Versions: Move all symbols to GLIBC_PRIVATE.
3031 2002-01-31  Ulrich Drepper  <drepper@redhat.com>
3033         * pthread.c: _dl_cpuclock_offset is not any longer a global variable
3034         in SHARED code, use GL(dl_cpuclock_offset).
3036 2002-01-28  Andreas Jaeger  <aj@suse.de>
3038         * sysdeps/mips/pspinlock.c (__pthread_spin_init): Clear *LOCK to
3039         0. Patch by Machida Hiroyuki <machida@sm.sony.co.jp>.
3041 2002-01-16  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3043         * sysdeps/s390/s390-32/pt-machine.h (MEMORY_BARRIER): Define.
3044         (CURRENT_STACK_FRAME): Remove duplicate definition.
3045         * sysdeps/s390/s390-64/pt-machine.h: Likewise.
3047 2002-01-14  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3049         * Makefile (CFLAGS-tst-cancel.c): Add -fno-inline-functions to prevent
3050         automatic inline.
3052 2002-01-12  Andreas Schwab  <schwab@suse.de>
3054         * Makefile (test-srcs): Add tst-signal.
3055         (tests): Run tst-signal.
3056         (distribute): Add tst-signal.sh.
3057         * tst-signal.c, tst-signal.sh: New files.
3059 2002-01-14  Andreas Jaeger  <aj@suse.de>
3061         * sysdeps/x86_64/pt-machine.h (INIT_THREAD_SELF): Avoid warning.
3063 2002-01-11  Andreas Schwab  <schwab@suse.de>
3065         * signals.c (sighandler): Initialize all elements to SIG_ERR.
3066         (__sigaction): Don't use value from sighandler if it is SIG_ERR.
3068 2002-01-06  Richard Henderson  <rth@redhat.com>
3070         * sysdeps/alpha/elf/pt-initfini.c: New file.
3072 2001-12-29  Andreas Jaeger  <aj@suse.de>
3074         * Examples/ex9.c: Add noreturn attribute for thread.
3075         * Examples/ex10.c: Likewise.
3076         * Examples/ex13.c (thread_start): Likewise.
3077         * Examples/ex15.c (worker): Likewise.
3079         * Examples/ex18.c: Include unistd.h for prototype of sleep.
3081 2001-12-14  Ulrich Drepper  <drepper@redhat.com>
3083         * man/pthread_atfork.man: Adjust description of mutex handling
3084         after fork for current implementation.
3085         * linuxthreads.texi: Likewise [PR libc/2519].
3087 2001-12-13  Andreas Schwab  <schwab@suse.de>
3089         * specific.c (pthread_key_delete): Don't contact the thread
3090         manager if no threads have been created yet.
3092 2001-12-12  NIIBE Yutaka  <gniibe@m17n.org>
3094         * sysdeps/sh/pt-machine.h (INIT_THREAD_SELF): Added __volatile__
3095         qualifier to be safe.
3097 2001-11-30  Andreas Schwab  <schwab@suse.de>
3099         * pthread.c (pthread_handle_sigcancel) [THREAD_SELF]: Double check
3100         that self is the manager thread, and initialize the thread
3101         register if not.
3102         (thread_self_stack) [THREAD_SELF]: New function to find self via
3103         stack pointer.
3104         * manager.c (pthread_handle_create): Don't block cancel signal any
3105         more.
3107 2001-11-29  Andreas Jaeger  <aj@suse.de>
3109         * sysdeps/x86_64/pt-machine.h: Use %gs as thread specific register.
3110         (THREAD_SELF): New.
3111         (INIT_THREAD_SELF): New.
3112         (THREAD_GETMEM): New.
3113         (THREAD_GETMEM_NC):
3114         (THREAD_SETMEM): New.
3115         (THREAD_SETMEM_NC): New.
3116         (FLOATING_STACKS): Define.
3117         (ARCH_STACK_MAX_SIZE): Define.
3119 2001-11-28  Kaz Kylheku  <kaz@ashi.footprints.net>
3121         Bugfix to pthread_key_delete. It was iterating over the thread
3122         manager's linked list of threads, behind the thread manager's
3123         back causing a race. The fix is to have the manager iterate over
3124         the threads instead, using a new request type for doing so.
3125         * internals.h (struct pthread_request): New manager request type
3126         REQ_FOR_EACH_THREAD.
3127         * manager.c (pthread_for_each_thread): New function.
3128         (__pthread_manager): Handle new REQ_FOR_EACH_THREAD request.
3129         * specific.c (struct pthread_key_delete_helper_args): New type.
3130         (pthread_key_delete_helper): New static function.
3131         (pthread_key_delete): Use the new thread manager
3132         REQ_FOR_EACH_THREAD function to iterate over the threads and set
3133         the delete key slot to a null value in each thread.
3134         * Examples/ex18.c: New test.
3135         * Makefile (tests): Add ex18.
3137 2001-11-22  Wolfram Gloger  <wg@malloc.de>
3139         * pthread.c (pthread_onexit_process): Don't call free
3140         after threads have been asynchronously terminated.
3142         * manager.c (pthread_handle_exit): Surround cancellation
3143         of threads with __flockfilelist()/__funlockfilelist().
3145 2001-11-26  Andreas Schwab  <schwab@suse.de>
3147         * manager.c (pthread_handle_create): Start the child thread with
3148         the cancel signal blocked, so that it does not handle it before
3149         the thread register is set up.  Save errno from failed clone call.
3151 2001-11-15  Ulrich Drepper  <drepper@redhat.com>
3153         * sysdeps/i386/i686/Implies: Removed.
3154         * sysdeps/i386/i686/Versions: New file.
3156 2001-10-31  Andreas Jaeger  <aj@suse.de>
3158         * sysdeps/x86_64/Makefile: Remove, we do not need it anymore.
3160 2001-10-05  Kevin Buettner  <kevinb@cygnus.com>
3162         * pthread.c (__linuxthread_pthread_sizeof_descr): Change name
3163         to __linuxthreads_pthread_sizeof_descr to match name used by
3164         symbol_list_arr[LINUXTHREADS_PTHREAD_SIZEOF_DESCR] in
3165         linuxthreads_db/td_symbol_list.c.
3167 2001-09-22  Andreas Jaeger  <aj@suse.de>
3169         * linuxthreads/tst-context.c: Avoid compile warning.
3171 2001-09-20  Andreas Jaeger  <aj@suse.de>
3173         * shlib-versions: Add x86-64.
3175 2001-09-19  Andreas Jaeger  <aj@suse.de>
3177         * sysdeps/x86_64/Makefile: New file.
3178         * sysdeps/x86_64/pspinlock.c: New file.
3179         * sysdeps/x86_64/pt-machine.h: New file.
3181 2001-09-12  Jakub Jelinek  <jakub@redhat.com>
3183         * sysdeps/pthread/timer_delete.c (timer_delete): Thread may be NULL
3184         for SIGEV_NONE.
3185         * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
3187 2001-09-11  Ulrich Drepper  <drepper@redhat.com>
3188             Wolfram Gloger <wg@malloc.de>
3190         * join.c: Protect all communications from and to manager with
3191         TEMP_FAILURE_RETRY.
3192         * manager.c: Likewise.
3193         * pthread.c: Likewise.
3194         * smeaphore.c: Likewise.
3196 2001-08-29  Ulrich Drepper  <drepper@redhat.com>
3198         * spinlock.c (__pthread_lock): Top max_count value with
3199         MAX_ADAPTIVE_SPIN_COUNT.
3200         * internals.h (MAX_ADAPTIVE_SPIN_COUNT): Define if not already done.
3202         * sysdeps/i386/i686/pt-machine.h (BUSY_WAIT_NOP): New macro to
3203         help P4.
3205 2001-08-27  Jakub Jelinek  <jakub@redhat.com>
3207         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_t): Only define to
3208         non-opaque type if __USE_UNIX98.
3210 2001-08-26  Jakub Jelinek  <jakub@redhat.com>
3212         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_t): Define
3213         non-opaque lock types also if _IO_MTSAFE_IO is defined.
3215 2001-08-23  Roland McGrath  <roland@frob.com>
3217         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start): Take
3218         new first argument, skip the cleanup handler if it's zero.
3219         (_LIBC_LOCK_RECURSIVE_INITIALIZER): New macro.
3220         (__libc_lock_define_initialized_recursive): Use it.
3221         * sysdeps/pthread/bits/stdio-lock.h: File removed.
3222         The sysdeps/generic file from the main tree now suffices.
3224 2001-08-22  Roland McGrath  <roland@frob.com>
3226         * sysdeps/pthread/bits/stdio-lock.h: Include <bits/libc-lock.h>
3227         instead of <pthread.h>.
3228         (_IO_lock_t): Define this typedef using __libc_lock_define_recursive.
3229         (_IO_lock_initializer): Add braces.
3230         (_IO_lock_lock): Use __libc_lock_lock_recursive.
3231         (_IO_lock_unlock): Use __libc_lock_unlock_recursive.
3233         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_recursive_t): New type.
3234         (__libc_lock_define_initialized_recursive): Use it.
3235         (__libc_lock_init_recursive): Likewise.
3236         (__libc_lock_fini_recursive): Likewise.
3237         (__libc_lock_lock_recursive): Likewise.
3238         (__libc_lock_trylock_recursive): Likewise.
3239         (__libc_lock_unlock_recursive): Likewise.
3240         (__libc_lock_define_recursive): New macro.
3242 2001-08-14  Jakub Jelinek  <jakub@redhat.com>
3244         * lockfile.c (__pthread_provide_lockfile): New variable.
3245         * pthread.c (__pthread_require_lockfile): New variable.
3246         * cancel.c (__pthread_require_lockfile): New variable.
3248 2001-07-31  Ulrich Drepper  <drepper@redhat.com>
3250         * tst-context.c (threadfct): Initialize context before calling
3251         makecontext.
3253         * Examples/ex17.c: Make sure test thread is around long enough.
3255 2001-07-26  kaz Kojima  <kkojima@rr.iij4u.or.jp>
3257         * sysdeps/sh/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF): Defined.
3259 2001-07-24  Ulrich Drepper  <drepper@redhat.com>
3261         * tst-context.c (main): Print explanation before bailing out
3262         because context handling is not supported.
3264 2001-07-23  Ulrich Drepper  <drepper@redhat.com>
3266         * Makefile (tests): Add tst-context.
3267         * tst-context.c: New file.
3269         * sysdeps/pthread/bits/stdio-lock.h: Define
3270         _IO_cleanup_region_start_noarg.
3272 2001-07-23  Jakub Jelinek  <jakub@redhat.com>
3274         * sysdeps/alpha/pt-machine.h (FLOATING_STACKS): Define.
3275         (ARCH_STACK_MAX_SIZE): Define.
3276         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
3277         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3279 2001-07-19  Jakub Jelinek  <jakub@redhat.com>
3281         * sysdeps/i386/useldt.h: Fix typo in ARCH_STACK_MAX_SIZE comment.
3283         * sysdeps/ia64/pt-machine.h (FLOATING_STACKS): Define.
3284         (ARCH_STACK_MAX_SIZE): Define.
3285         * manager.c (pthread_allocate_stack): Handle FLOATING_STACKS with
3286         NEED_SEPARATE_REGISTER_STACK.
3288 2001-07-16  Andreas Schwab  <schwab@suse.de>
3290         * Makefile (before-compile): Don't add $(objpfx)crti.o.
3291         (omit-deps): Add crti.
3292         ($(objpfx)libpthread.so): Depend on $(objpfx)crti.o, but make sure
3293         it is filtered out of the link command.
3295 2001-07-16  Ulrich Drepper  <drepper@redhat.com>
3297         * pthread.c (pthread_initialize): For FLOATING_STACKS don't bother
3298         to find the right value for __pthread_initial_thread_bos, it's not
3299         used.  If not FLOATING_STACKS first run
3300         __pthread_init_max_stacksize.
3302 2001-06-16  H.J. Lu  <hjl@gnu.org>
3304         * internals.h: Include <stackinfo.h>.
3306         * attr.c: Don't include <stackinfo.h> here.
3307         * cancel.c: Likewise.
3308         * manager.c: Likewise.
3309         * pthread.c: Likewise.
3310         * ptlongjmp.c: Likewise.
3312 2001-03-23  Matthew Wilcox  <willy@ldl.fc.hp.com>
3314         * attr.c: Make _STACK_GROWS_UP work.
3315         * internals.h: Likewise.
3316         * manager.c: Likewise.
3317         * pthread.c: Likewise.
3319 2001-06-15  H.J. Lu  <hjl@gnu.org>
3321         * pthread.c (__pthread_reset_main_thread): Fix a typo.
3323 2001-02-02  John S. Marvin  <jsm@udlkern.fc.hp.com>
3325         * semaphore.h: Use struct _pthread_fastlock as an element of
3326         sem_t instead of an identical struct.
3327         * rwlock.c: Remove casts.
3328         * semaphore.c: Likewise.
3330 2001-04-30  Alan Modra  <amodra@one.net.au>
3332         * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: New.
3334 2001-05-25  Bruce Mitchener  <bruce@cubik.org>
3336         * linuxthreads.texi: Spelling corrections.
3338 2001-05-25  Ulrich Drepper  <drepper@redhat.com>
3340         * oldsemaphore.c (__old_sem_wait): Clear p_nextwaiting before
3341         returning successfully.
3342         Patch by Gene Cooperman <gene@ccs.neu.edu>.
3344 2001-05-24  Ulrich Drepper  <drepper@redhat.com>
3346         * spinlock.c (__pthread_lock) [HAS_COMPARE_AND_SWAP]: Before doing any
3347         serious work try once whether the lock is uncontested.
3348         Remove duplicate reading of __status before loop.
3349         Change suggested by Hans Boehm <hans_boehm@hp.com>.
3351         * spinlock.h (__pthread_trylock): Remove need for oldstatus variable.
3352         (__pthread_alt_trylock): Likewise.
3354 2001-05-01  Kaz Kylheku  <kaz@ashi.footprints.net>
3356         Memory barrier overhaul following line by line inspection.
3357         * mutex.c (pthread_once): Missing memory barriers added.
3358         * pthread.c (__pthread_wait_for_restart_signal,
3359         __pthread_timedsuspend_new, __pthread_restart_new): Added
3360         memory barriers ``just in case'' and for documentary value.
3361         * spinlock.c (__pthread_release): New inline function for releasing
3362         spinlock, to complement __pthread_acquire.  Includes memory
3363         barrier prior to assignment to spinlock, and __asm __volatile
3364         dance to prevent reordering or optimization of the spinlock access.
3365         * spinlock.c (__pthread_unlock, __pthread_alt_lock,
3366         __pthread_alt_timedlock, __pthread_alt_unlock,
3367         __pthread_compare_and_swap): Updated to use new __pthread_release
3368         instead of updating spinlock directly.
3369         * spinlock.c (__pthread_lock, __pthread_unlock, wait_node_alloc,
3370         wait_node_free, wait_node_dequeue, __pthread_alt_lock,
3371         __pthread_alt_timedlock, __pthread_alt_unlock, __pthread_acquire):
3372         Memory barrier overhaul.  Lots of missing memory barriers added,
3373         a couple needless ones removed.
3374         * spinlock.c (__pthread_compare_and_swap): testandset optimization
3375         removed, just calls __pthread_acquire, which has the new read
3376         barrier in it before its testandset.
3378 2001-05-20  Roland McGrath  <roland@frob.com>
3380         * Makeconfig: New file, variables used to be in main libc Makeconfig.
3382 2001-05-09  Geoff Keating  <geoffk@redhat.com>
3384         * sysdeps/powerpc/pt-machine.h
3385         (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): Define.
3386         (__compare_and_swap): Remove memory barriers.
3387         (__compare_and_swap_with_release_semantics): New function.
3389 2001-04-24  Andreas Jaeger  <aj@suse.de>
3391         * wrapsyscall.c: send* and recv* return ssize_t.
3393         * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Unlock the
3394         mutex instead of double locking it.
3395         Reported by Pierre Artaud <partaud@sodatec.com>.
3397 2001-04-23  Ulrich Drepper  <drepper@redhat.com>
3399         * sysdeps/pthread/getcpuclockid.c: Make function generic, test
3400         using #ifdef whether the clock is available.
3401         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: Removed.
3403         * sysdeps/ia64/Versions: New file.
3405         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init): We don't
3406         have to call __gmon_start__ in the libpthread DSO.
3407         * sysdeps/pthread/pt-initfini.c (_init): Likewise.
3409         * Makefile (libpthread-routines): Add ptclock_gettime and
3410         ptclock_settime.
3411         * internals.h: Don't use cpuclock-init.h definitions, use
3412         hp-timing.h definitions.
3413         * pthread.c: Likewise.
3414         * manager.c: Likewise.
3415         * ptclock_gettime.c: New file.
3416         * ptclock_settime.c: New file.
3417         * internals.h: Fix parameter type for __pthread_clock_gettime and
3418         __pthread_clock_settime.
3420         * sysdeps/i386/i586/ptclock_gettime.c: Removed.
3421         * sysdeps/i386/i586/ptclock_settime.c: Removed.
3422         * sysdeps/i386/i586/Makefile: Removed.
3424 2001-04-22  Ulrich Drepper  <drepper@redhat.com>
3426         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_ASYNCH_IO.
3427         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3429 2001-04-21  Andreas Jaeger  <aj@suse.de>
3431         * sysdeps/pthread/timer_routines.c (thread_func): Add noreturn
3432         attribute, remove statements that will never be executed.
3433         (thread_func): Remove mutex_unlock call since it's never executed.
3434         (thread_func): Fix comment as suggested by Jakub Jelinek.
3436         * manager.c (__pthread_manager): Add noreturn
3437         attribute.
3438         (pthread_start_thread): Likewise, remove return statement.
3439         (pthread_start_thread_event): Likewise.
3440         Add noreturn attribute for pthread_handle_exit.
3441         * weaks.c: Add noreturn attribute for pthread_exit.
3443         * internals.h: Add __pthread_clock_gettime and
3444         __pthread_clock_settime prototypes.
3446 2001-04-21  Ulrich Drepper  <drepper@redhat.com>
3448         * internals.h: Include <cpuclock-init.h>.
3449         (struct _pthread_descr_struct): Add p_cpuclock_offset field if
3450         CPUCLOCK_VARDEF is defined.
3451         * pthread.c (__pthread_initialize_minimal): Initialize
3452         p_cpuclock_offset field for main thread if CPUCLOCK_INIT is defined.
3453         * manager.c (pthread_start_thread): Set p_cpuclock_offset field
3454         for new thread to current CPU clock value.
3456         * sysdeps/i386/useldt.h: Extend all the macros to handle 8-byte values.
3458         * sysdeps/i386/i586/Makefile: New file.
3459         * sysdeps/i386/i586/Versions: New file.
3460         * sysdeps/i386/i586/ptclock_gettime.c: New file.
3461         * sysdeps/i386/i586/ptclock_settime.c: New file.
3462         * sysdeps/i386/i686/Implies: New file.
3464 2001-04-18  Jakub Jelinek  <jakub@redhat.com>
3466         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Put specs into
3467         $generated, not $postclean-generated.
3469 2001-04-18  Andreas Jaeger  <aj@suse.de>
3471         * Makefile (otherlibs): Added.
3473 2001-04-18  Jakub Jelinek  <jakub@redhat.com>
3475         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
3477 2001-04-16  Ulrich Drepper  <drepper@redhat.com>
3479         * signals.c (sigwait): NSIG is no signal number.  Block all
3480         signals while in signal handler for signals in SET.
3481         Patch by Manfred Spraul <manfred@colorfullife.com>.
3483 2001-04-12  Ulrich Drepper  <drepper@redhat.com>
3485         * tst-cancel.c: Disable most tests.  Add new test where all
3486         cleanup handlers must run.
3487         * Makefile (tests): Add tst-cancel again.
3489         * cancel.c (__pthread_perform_cleanup): Correct condition for
3490         leaving cleanup loop early.
3492         * sysdeps/i386/Makefile: Make sure gcc uses a frame pointer for
3493         all the files which use CURRENT_STACK_FRAME.
3494         * sysdeps/i386/pt-machine.h (CURRENT_STACK_FRAME): Define using
3495         __builtin_frame_address.
3496         * sysdeps/i386/i686/pt-machine.h: Likewise.
3498 2001-04-11  Ulrich Drepper  <drepper@redhat.com>
3500         * Makefile (tests): Comment out tst-cancel for now.
3502         * tst-cancel.c (main): Cleanup 4 is supposed to run.  Create
3503         temporary file in object directory.
3504         * Makefile: Don't allow inlining when compiling tst-cancel.c.
3505         Pass $(objpfx) to tst-cancel.
3507 2001-04-11  David S. Miller  <davem@redhat.com>
3509         * sysdeps/sparc/sparc32/pt-machine.h (stack_pointer): Advance
3510         up closer to user local variables so that new cleanup heuristics work.
3511         * sysdeps/sparc/sparc64/pt-machine.h (stack_pointer): Likewise.
3513 2001-04-11  Ulrich Drepper  <drepper@redhat.com>
3515         * cancel.c (_pthread_cleanup_push): Catch invalid __prev buffer
3516         and remove it.
3517         (_pthread_cleanup_push_defer): Likewise.
3519         * tst-cancel.c (main): Fix loop printing cleanup output.
3521 2001-04-10  kaz Kojima  <kkojima@rr.iij4u.or.jp>
3523         * sysdeps/sh/pspinlock.c (__pthread_spin_lock): Fix a reverse
3524         test.
3525         (__pthread_spin_trylock): Likewise.
3526         * sysdeps/sh/pt-machine.h (testandset): Likewise.
3528 2001-04-10  Ulrich Drepper  <drepper@redhat.com>
3530         * join.c (pthread_exit): Move code to new function __pthread_do_exit
3531         which takes an extra parameter with the current frame pointer.
3532         Call new function with CURRENT_STACK_FRAME.
3533         (__pthread_do_exit): New function.  Call __pthread_perform_cleanup
3534         with the new parameter.
3535         (pthread_join): Call __pthread_do_exit instead of pthread_exit.
3536         * cancel.c (__pthread_perform_cleanup): Takes extra parameter.  Use
3537         this parameter as the initial value the cleanup handler records are
3538         compared against.  No active cleanup handler record must have an
3539         address lower than the previous one and the initial record must be
3540         above (below on PA) the frame address passed in.
3541         (pthread_setcancelstate): Call __pthread_do_exit instead of
3542         pthread_exit.
3543         (pthread_setcanceltype): Likewise.
3544         (pthread_testcancel): Likewise.
3545         (_pthread_cleanup_pop_restore): Likewise.
3546         * condvar.c (pthread_cond_wait): Likewise.
3547         (pthread_cond_timedwait_relative): Likewise.
3548         * manager.c (pthread_start_thread): Likewise.
3549         * oldsemaphore.c (__old_sem_wait): Likewise.
3550         * pthread.c (pthread_handle_sigcancel): Likewise.
3551         * semaphore.c (__new_sem_wait): Likewise.
3552         (sem_timedwait): Likewise.
3553         * ptlongjmp.c (pthread_cleanup_upto): Also use current stack frame
3554         to limit the cleanup handlers which get run.
3555         * internals.h: Add prototype for __pthread_do_exit.  Adjust prototype
3556         for __pthread_perform_cleanup.
3558         * Makefile (tests): Add tst-cancel.
3559         * tst-cancel.c: New file.
3561 2001-04-08  Hans-Peter Nilsson  <hp@axis.com>
3563         * sysdeps/cris/pt-machine.h: New file.
3564         * sysdeps/cris/pspinlock.c: New file.
3566 2001-04-09  Hans-Peter Nilsson  <hp@axis.com>
3568         * shlib-versions: Add case for Linux on CRIS.
3570 2001-03-26  Ulrich Drepper  <drepper@redhat.com>
3572         * attr.c (pthread_getattr_np): Correct computation of stack size
3573         for machiens with register stack.
3575         * Examples/ex17.c (main): Correct detection of failed mmap call.
3577 2001-03-21  Jakub Jelinek  <jakub@redhat.com>
3579         * pthread.c (__pthread_initialize_manager): Fix a typo.
3581 2001-03-21  Jakub Jelinek  <jakub@redhat.com>
3583         * attr.c (__pthread_attr_setstack): Fix alignment check.
3584         (pthread_getattr_np): __stackaddr is top of stack, not bottom.
3585         * Makefile (tests): Add ex17 test.
3586         * Examples/ex17.c: New test.
3588 2001-03-20  Ulrich Drepper  <drepper@redhat.com>
3590         * Makefile: Define -D_RPC_THREAD_SAFE_ for cancel.c.
3591         * cancel.c (__pthread_perform_cleanup): Call __rpc_thread_destroy.
3592         * sysdeps/pthread/bits/libc-tsd.h: Define _LIBC_TSD_KEY_VARS.
3594 2001-03-18  Ulrich Drepper  <drepper@redhat.com>
3596         * Makefile: When generating DSO link with libc_nonshared.a.
3598 2001-02-26  Jakub Jelinek  <jakub@redhat.com>
3600         * signals.c (pthread_sighandler): Use CALL_SIGHANDLER.
3602 2001-02-23  Jakub Jelinek  <jakub@redhat.com>
3604         * internals.h (__pthread_init_max_stacksize): New prototype.
3605         * attr.c (__pthread_attr_setstacksize): Call
3606         __pthread_init_max_stacksize if not yet initialized.
3607         * pthread.c (__pthread_init_max_stacksize): New function.
3608         (__pthread_initialize_manager): Call it.
3609         Patch by <dtc@cmucl.cons.org>.
3611 2001-03-16  Ulrich Drepper  <drepper@redhat.com>
3613         * attr.c (pthread_getattr_np): Fix __stacksize computation for IA-64.
3615 2001-03-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3617         * shlib-versions: Add rule for Linux on 64 bit S/390.
3618         * sysdeps/s390/s390-64/pt-machine.h: New file.
3619         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
3621 2001-03-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3623         * sysdeps/s390/pt-machine.h: Move to...
3624         * sysdeps/s390/s390-32/pt-machine.h: ...here.
3625         Add defines for FLOATING_STACK and ARCH_STACK_MAX_SIZE.
3627 2001-03-15  Ulrich Drepper  <drepper@redhat.com>
3629         * Versions [libpthread] (GLIBC_2.2.3): Add pthread_getattr_np.
3630         * attr.c: Implement pthread_getattr_np.
3631         * sysdeps/pthread/pthread.h: Add prototype for pthread_getattr_np.
3632         * internals.h (struct _pthread_descr_struct): Add p_inheritsched.
3633         * manager.c (pthread_handle_create): Initialize p_inheritsched.
3635 2001-03-09  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3637         * sysdeps/unix/sysv/linux/s390/pt-initfini.c: Use 0x07 padding for
3638         code alignment.
3640 2001-02-20  Hans Boehm  <hans_boehm@hp.com>
3642         * manager.c (manager_mask): Removed static vesion.  Now always local
3643         to __pthread_manager().
3644         (manager_mask_all): Removed completely.
3645         (__pthread_manager): Remove manager_mask_all initialization.
3646         (pthread_handle_create): Remove code to set and reset signal mask
3647         around __clone2() calls.
3649 2001-02-17  Jakub Jelinek  <jakub@redhat.com>
3651         * spinlock.c (__pthread_lock): Force lock->__status to be read from
3652         memory on every spin.
3654 2001-02-10  Andreas Jaeger  <aj@suse.de>
3656         * Makefile (extra-objs): New.
3658 2001-02-09  Jakub Jelinek  <jakub@redhat.com>
3660         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add
3661         __pthread_initialize_minimal prototype.
3663 2001-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
3665         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
3667 2001-02-06  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3669         * sysdeps/unix/sysv/linux/s390/pt-initfini.c: New file.
3671 2001-02-06  Ulrich Drepper  <drepper@redhat.com>
3673         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the
3674         broken code.  Patch by Jes Sorensen.
3676 2001-02-06  Andreas Jaeger  <aj@suse.de>
3678         * sysdeps/pthread/pthread.h: Move __pthread_initialize from here
3679         to...
3680         * internals.h: ...here.
3682 2001-02-05  Jes Sorensen  <jes@linuxcare.com>
3684         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
3686 2001-02-02  Ulrich Drepper  <drepper@redhat.com>
3688         * Versions: Remove __pthread_initialize_minimal.
3690 2001-02-01  Ulrich Drepper  <drepper@redhat.com>
3692         * Makefile: Add rules to build crti.o and make it being used in
3693         building libpthread.so.
3694         * sysdeps/i386/Makefile: New file.
3695         * sysdeps/pthread/pt-initfini.c: New file.
3697         * pthread.c: Cleanups.
3699 2001-01-28  Andreas Jaeger  <aj@suse.de>
3701         * oldsemaphore.c (__old_sem_init): Adjust for last change.
3702         * sysdeps/pthread/bits/libc-lock.h: Likewise.
3703         * spinlock.c: Likewise.
3705 2001-01-28  Ulrich Drepper  <drepper@redhat.com>
3707         * sysdeps/pthread/bits/initspin.h: Make all names namespace clean.
3708         * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
3709         * manager.c: Adjust for namespace cleanup in bits/initspin.h.
3710         * pthread.c: Likewise.
3711         * spinlock.h: Likewise.
3712         * sysdeps/pthread/pthread.h: Likewise.
3714 2001-01-26  Ulrich Drepper  <drepper@redhat.com>
3716         * sysdeps/pthread/bits/pthreadtypes.h: Define pthread_attr_t also
3717         as struct __pthread_attr_s.
3719         * semaphore.h (sem_t): Cleanup namespace, rename status and
3720         spinlock elements.
3722 2001-01-13  Jakub Jelinek  <jakub@redhat.com>
3724         * pthread.c (pthread_onexit_process): Clear
3725         __pthread_manager_thread_bos after freeing it.
3726         * Makefile (tests): Add ex16.
3727         * Examples/ex16.c: New file.
3729 2001-01-11  Jakub Jelinek  <jakub@redhat.com>
3731         * Makefile (CFLAGS-pthread.c): Pass -DHAVE_Z_NODELETE if ld supports
3732         -z nodelete.
3733         * pthread.c (pthread_exit_process): Rename to...
3734         (pthread_onexit_process): ...this.
3735         (pthread_atexit_process, pthread_atexit_retcode): New.
3736         (pthread_initialize): Call __cxa_atexit instead of __cxa_on_exit
3737         and only if HAVE_Z_NODELETE is not defined.
3738         (__pthread_initialize_manager): Register pthread_atexit_retcode
3739         with __cxa_atexit.
3741 2001-01-11  Ulrich Drepper  <drepper@redhat.com>
3743         * pthread.c (pthread_initialize): Use __cxs_on_exit not __cxa_atexit.
3745 2001-01-11  Jakub Jelinek  <jakub@redhat.com>
3747         * Makefile (tests): Add ex15.
3748         * Examples/ex15.c: New test.
3750 2001-01-08  Ulrich Drepper  <drepper@redhat.com>
3752         * pthread.c (pthread_exit_process): Free memory allocated for
3753         manager stack.
3755 2000-12-31  Ulrich Drepper  <drepper@redhat.com>
3757         * manager.c (pthread_alloca_stack): Remove MAP_FIXED from mmap calls.
3758         (pthread_free): Always unmap the stack.  It's safe now that we don't
3759         use MAP_FIXED to allocate stacks.
3761 2000-12-31  Ulrich Drepper  <drepper@redhat.com>
3763         * sysdeps/powerpc/pspinlock.c: Don't include pt-machine.h here.
3765         * manager.c (pthread_allocate_stack): Prepare for removal of MAP_FIXED.
3767 2000-11-15  Wolfram Gloger  <wg@malloc.de>
3769         * manager.c (pthread_free): [!FLOATING_STACKS]: Only remap the
3770         stack to PROT_NONE, don't unmap it, avoiding collisions with malloc.
3772 2000-12-27  Andreas Jaeger  <aj@suse.de>
3774         * Examples/ex13.c: Make local functions static.
3775         * ecmutex.c: Likewise.
3776         * joinrace.c: Likewise.
3777         * Examples/ex14.c: Likewise.
3779         * Examples/ex2.c: Make local functions static; reformat.
3780         * Examples/ex1.c: Likewise.
3781         * Examples/ex4.c: Likewise.
3782         * Examples/ex5.c: Likewise.
3783         * Examples/ex7.c: Likewise.
3785         * oldsemaphore.c: Add prototypes to shut up GCC.
3786         * pt-machine.c: Likewise.
3788         * weaks.c: Add prototype for pthread_exit.
3790         * internals.h: Add some prototypes, format prototypes and add
3791         missing externs.
3792         Move __libc_waitpid prototype to include/sys/wait.h.
3794         * rwlock.c: Include <bits/libc-lock.h> for prototypes.
3795         * mutex.c: Likewise.
3796         * specific.c: Likewise.
3797         * ptfork.c: Likewise.
3799         * lockfile.c: Include internals.h to get prototypes.
3800         * events.c: Likewise.
3801         * sysdeps/alpha/pspinlock.c: Likewise.
3802         * sysdeps/arm/pspinlock.c: Likewise.
3803         * sysdeps/hppa/pspinlock.c: Likewise.
3804         * sysdeps/i386/pspinlock.c: Likewise.
3805         * sysdeps/ia64/pspinlock.c: Likewise.
3806         * sysdeps/m68k/pspinlock.c: Likewise.
3807         * sysdeps/mips/pspinlock.c: Likewise.
3808         * sysdeps/powerpc/pspinlock.c: Likewise.
3809         * sysdeps/s390/pspinlock.c: Likewise.
3810         * sysdeps/sh/pspinlock.c: Likewise.
3811         * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
3812         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
3813         * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
3815 2000-12-27  Ulrich Drepper  <drepper@redhat.com>
3817         * attr.c (__pthread_attr_setstack): Fix setting of __stackaddr element.
3818         (__pthread_attr_getstack): Return correct address.
3819         Add warnings for using pthread_attr_getstackaddr and
3820         pthread_attr_setstackaddr.
3822 2000-12-26  Ulrich Drepper  <drepper@redhat.com>
3824         * Examples/ex6.c (test_thread): Make static.
3825         * Examples/ex12.c (test_thread): Make static and add noreturn
3826         attribute.
3828 2000-12-18  Jes Sorensen  <jes@linuxcare.com>
3830         * linuxthreads/sysdeps/ia64/pt-machine.h: __compare_and_swap
3831         and compare_and_swap_with_release_semantics returns int not long.
3833 2000-12-17  Andreas Jaeger  <aj@suse.de>
3835         * sysdeps/s390/pt-machine.h (testandset): Use long int as return
3836         value.
3837         * sysdeps/arm/pt-machine.h (testandset): Likewise.
3838         * sysdeps/hppa/pt-machine.h (testandset): Likewise.
3839         * sysdeps/m68k/pt-machine.h (testandset): Likewise.
3840         * sysdeps/sh/pt-machine.h (testandset): Likewise.
3841         * sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise.
3842         * sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise.
3844 2000-12-17  Ulrich Drepper  <drepper@redhat.com>
3846         * sysdeps/i386/pt-machine.h (testandset): Adjust for prototype change.
3847         * sysdeps/i386/i686/pt-machine.h (testandset): Likewise.
3849 2000-12-17  Andreas Jaeger  <aj@suse.de>
3851         * internals.h: Add prototypes for testandset and
3852         __compare_and_swap to shut up gcc warnings.
3854 2000-12-06  Wolfram Gloger  <wg@malloc.de>
3856         * join.c (pthread_detach): Allow case where the thread has already
3857         terminated.
3859 2000-12-05  Andreas Jaeger  <aj@suse.de>
3861         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't set mips2.
3862         * sysdeps/mips/pt-machine.h (testandset): Likewise.
3863         (__compare_and_swap): Likewise.
3864         Patches by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
3866 2000-11-20  Jakub Jelinek  <jakub@redhat.com>
3868         * Examples/ex3.c (main): Cast int to long before casting to void *.
3869         (search): Cast void * to long, not int.
3870         * Examples/ex8.c (main, thread): Similarly.
3871         * Examples/ex11.c (main): Similarly.
3872         * Examples/ex14.c (worker, do_test): Similarly.
3873         * ecmutex.c (worker, do_test): Similarly.
3874         (nlocks): Cast to int.
3876 2000-11-08  Bruce Mitchener  <bruce@cubik.org>
3878         * linuxthreads.texi:  Add documentation for pthreads attributes
3879         guardsize, stackaddr, stacksize, and stack.  Fix typo in previous
3880         patch.  Document pthread_[sg]etconcurrency().  Mark
3881         pthread_mutexattr_[sg]ettype() as POSIX rather than GNU.
3883 2000-11-07  Ulrich Drepper  <drepper@redhat.com>
3885         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
3886         Don't define it.
3887         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3888         Reported by Christopher Yeoh <cyeoh@linuxcare.com.au>.
3890 2000-11-06  Ulrich Drepper  <drepper@redhat.com>
3892         * cancel.c (pthread_cancel): Always set p_canceled, even if we are
3893         not doing it right now.
3894         Reported by Kaz Kylheku <kaz@ashi.footprints.net>.
3896 2000-10-30  Ulrich Drepper  <drepper@redhat.com>
3898         * Examples/ex4.c (main): Don't use exit() to avoid warning with
3899         broken compilers.
3901 2000-10-29  Ulrich Drepper  <drepper@redhat.com>
3903         * attr.c (__pthread_attr_setguardsize): Don't round guardsize
3904         here.  Reported by Bruce Mitchener <bruce@cubik.org>.
3906         * linuxthreads.texi: Changes terminology to 'type' from 'kind' when
3907         discussing mutexes. (As per the Unix98 name for the API.)
3908         Changes documentation for pthread_mutexattr_setkind_np() and
3909         pthread_mutexattr_getkind_np() over to the Unix98 APIs for the
3910         same: pthread_mutexattr_settype() and pthread_mutexattr_gettype().
3911         Changes references to PTHREAD_MUTEXATTR_FAST_NP to
3912         PTHREAD_MUTEXATTR_ADAPTIVE_NP.
3913         Begins to introduce discussion of the ``timed'' mutex type.  This
3914         discussion is currently incomplete.
3915         Patch by Bruce Mitchener <bruce@cubik.org>.
3917 2000-10-26  Kazumoto Kojima  <kkojima@rr.iij4u.or.jp>
3918             Yutaka Niibe  <gniibe@chroot.org>
3920         * sysdeps/sh/pt-machine.h (testandset): Since the operand of TAS.B
3921         has restrictions, use register.
3923 2000-10-23  Andreas Schwab  <schwab@suse.de>
3925         * Examples/ex14.c (TIMEOUT): Override default timeout.
3927 2000-10-16  Ulrich Drepper  <drepper@redhat.com>
3929         * specific.c: Protect tsd array modification in thread data
3930         structures by getting the thread lock in pthread_key_delete and
3931         __pthread_destroy_specifics.
3932         Patch by Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>.
3934 2000-10-12  Alan Modra <alan@linuxcare.com.au>
3936         * sysdeps/pthread/bits/initspin.h: New file.
3937         * spinlock.h: Move LOCK_INITIALIZER definition to <bits/initspin.h>.
3938         (__pthread_init_lock): Initialize lock with LT_SPINLOCK_INIT.
3939         (__pthread_alt_init_lock): Likewise.
3940         (__pthread_alt_trylock): Release lock with LT_SPINLOCK_INIT.
3942 2000-10-12  David Huggins-Daines  <dhd@linuxcare.com>
3944         * oldsemaphore.c (__old_sem_init): Release lock with
3945         LT_SPINLOCK_INIT, not zero.
3946         * spinlock.c (__pthread_unlock): Likewise.
3947         (__pthread_alt_lock): Likewise.
3948         (__pthread_alt_timedlock): Likewise.
3949         (__pthread_alt_unlock): Likewise.
3950         * sysdeps/pthread/bits/libc-lock.h: Initialize locks with
3951         LT_SPINLOCK_INIT if it is non-zero.  Likewise for init-once flags.
3952         * sysdeps/pthread/pthread.h: Include bits/initspin.h.  Use
3953         LT_SPINLOCK_INIT do initialize spinlocks not 0.
3955 2000-10-12  David Huggins-Daines <dhd@linuxcare.com>
3957         * shlib-versions: Add version definitions for hppa-linux.
3959 2000-10-12  Alan Modra <alan@linuxcare.com.au>
3961         * sysdeps/hppa/pspinlock.c: New file.
3962         * sysdeps/hppa/pt-machine.h: New file.
3963         * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: New file.
3965 2000-10-05  Jakub Jelinek  <jakub@redhat.com>
3967         * mutex.c (__pthread_mutex_destroy): Correct test of
3968         busy mutex for mutexes using alternate fastlocks.
3969         Patch by dtc@cmucl.cons.org.
3971 2000-09-28  Martin Schwidefsksy    <schwidefsky@de.ibm.com>
3973         * sysdeps/s390/pt-machine.h: Make %a0 the thread register.
3975 2000-09-28  Ulrich Drepper  <drepper@redhat.com>
3977         * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP
3978         test for owner first.
3979         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
3981         * cancel.c (pthread_cancel): Don't do anything if cancelation is
3982         disabled.
3984 2000-09-26  Ulrich Drepper  <drepper@redhat.com>
3986         * spinlock.h (__pthread_set_own_extricate_if): Optimize a bit.
3987         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
3989         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
3990         _POSIX_MONOTONIC_CLOCK.
3992         * spinlock.h (__pthread_set_own_extricate_if): Add back locking
3993         and explain why.
3995 2000-09-20  Andreas Jaeger  <aj@suse.de>
3997         * pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
3998         "testrtsig.h" conditional.
4000 2000-09-11  Ulrich Drepper  <drepper@redhat.com>
4002         * sysdeps/pthread/pthread.h: Declare pthread_attr_getstack and
4003         pthread_attr_setstack.
4004         * Versions [libpthread] (GLIBC_2.2): Export pthread_attr_getstack and
4005         pthread_attr_setstack.
4006         * attr.c (pthread_attr_getstack, pthread_attr_setstack): New functions.
4008 2000-09-05  Ulrich Drepper  <drepper@redhat.com>
4010         * Examples/ex14.c: New file.
4011         * Makefile (tests): Add ex14.
4013         * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
4014         mutex.  Patch by dtc@cmucl.cons.org.
4016         * ecmutex.c: New file.
4017         * Makefile (tests): Add ecmutex.
4019 2000-09-04  H.J. Lu  <hjl@gnu.org>
4021         * attr.c (__pthread_attr_setguardsize): Use page_roundup
4022         instead of roundup to round up to the page size.
4024 2000-09-03  Mark Kettenis  <kettenis@gnu.org>
4026         * manager.c (pthread_exited): Correctly report event as TD_REAP
4027         instead of TD_DEATH.  Fix comments.
4029 2000-09-03  Ulrich Drepper  <drepper@redhat.com>
4031         * spinlock.h (testandset): Add cast to avoid warning.
4032         Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
4034 2000-09-02  Andreas Jaeger  <aj@suse.de>
4036         * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
4037         prototype.
4039 2000-09-01  Ulrich Drepper  <drepper@redhat.com>
4041         * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
4042         Fix typo in last patch (_mode -> _flags).
4044         * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
4045         Provide definition which respects _IO_USER_LOCK flag.
4047 2000-08-30  Ulrich Drepper  <drepper@redhat.com>
4049         * manager.c (pthread_allocate_stack): Clear descriptor only if not
4050         mmaped.
4052 2000-08-25  Ulrich Drepper  <drepper@redhat.com>
4054         * Makefile: Add rules to build and run unload.
4055         * unload.c: New file.
4057         * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
4059         * sysdeps/pthread/pthread.h
4060         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
4061         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
4063 2000-08-24  Andreas Jaeger  <aj@suse.de>
4065         * Examples/ex13.c: Include <string.h> for strerror prototype and
4066         <stdlib.h> for abort prototype.
4067         (pthr_cond_signal_mutex): Rewrite to silence GCC.
4068         (thread_start): Remove unused variable err.
4069         (main): Silence GCC warnings.
4071 2000-08-22  Andreas Jaeger  <aj@suse.de>
4073         * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
4075         * Makefile (tests): Add ex13.
4077 2000-08-20  Ulrich Drepper  <drepper@redhat.com>
4079         * semaphore.h: Add restrict where required by AGd4.
4080         * sysdeps/pthread/pthread.h: Likewise.
4081         * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
4083 2000-08-15  Ulrich Drepper  <drepper@redhat.com>
4085         * Makefile (tests): Add ex12.  Add rule to build it.
4086         * Examples/ex12.c: New file.
4088 2000-08-13  Ulrich Drepper  <drepper@redhat.com>
4090         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
4091         even though the implementation is not quite complete (but it reports
4092         it).  Define _POSIX_MESSAGE_PASSING to -1.
4093         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4095 2000-08-12  Andreas Jaeger  <aj@suse.de>
4097         * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
4098         assembler.
4099         (__compare_and_swap): Likewise.
4100         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
4102 2000-08-10  Ulrich Drepper  <drepper@redhat.com>
4104         * pthread.c (__pthread_initial_thread): Initialize p_errnop and
4105         p_h_errnop correctly and not to NULL.
4107 2000-08-05  Ulrich Drepper  <drepper@redhat.com>
4109         * Banner: Bump version number to 0.9.
4111 2000-08-04  Ulrich Drepper  <drepper@redhat.com>
4113         * Makefile (tests): Add tststack.  Add rule to build the program.
4114         * tststack.c: New file.
4116         * internals.h: Declare __pthread_max_stacksize.
4117         * pthread.c (__pthread_max_stacksize): New variable.
4118         (__pthread_initialize_manager): Determine __pthread_initialize_manager
4119         value.
4120         * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
4121         (pthread_allocate_stack): Allow kernel to choose stack address if
4122         FLOATING_STACKS.  This also handles variable-sized stacks.
4123         Always allocate stack and guardpage together.  Use mprotect to
4124         change guardpage access.
4125         * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
4126         ARCH_STACK_MAX_SIZE.
4128         * attr.c (__pthread_attr_setstacksize): Also test value against
4129         upper limit.
4131         * manager.c (__pthread_nonstandard_stacks): Define only if
4132         THREAD_SELF is not defined.
4133         (pthread_allocate_stack): Always initialize gardaddr to a correct
4134         value.
4135         (pthread_handle_create): Unmap thread with one call.
4136         (pthread_free): Remove test for initial thread before removing stack.
4137         Unmap stack with one call.
4139         * pthread.c (__pthread_initial_thread): Initialize p_userstack to
4140         1 to avoid removing the stack.
4142 2000-07-27  Jes Sorensen  <jes@linuxcare.com>
4144         * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
4145         load of spin lock to prime the cache before the atomic compare and
4146         exchange operation (cmpxchg4). This avoids the spinning on the
4147         cmpxchg4 instruction and reduces movement of the cache line back
4148         and forth between the processors (explanation by Asis K. Mallick
4149         from Intel). This basically makes the implementation operate the
4150         same as the Linux kernel implementation.
4152         * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
4153         * sysdeps/ia64/pspinlock.c: New file.
4155 2000-08-03  Ulrich Drepper  <drepper@redhat.com>
4157         * pthread.c: Move definition of __pthread_set_own_extricate_if...
4158         * spinlock.h: ...here.  Remove locking.
4159         * internals.h: Remove __pthread_set_own_extricate_if prototype.
4161         * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
4162         (rwlock_rd_extricate_func): Don't determine self, let
4163         __pthread_lock do it.
4164         (rwlock_wr_extricate_func): Likewise.
4165         (rwlock_have_already): Optimize *pself handling a bit.
4167         * mutex.c: Use __builtin_expect.
4168         * pthread.c: Likewise.
4170 2000-08-02  Andreas Jaeger  <aj@suse.de>
4172         * sysdeps/s390/pspinlock.c: New file.
4173         * sysdeps/s390/pt-machine.h: New file.
4174         Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
4176 2000-07-12  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
4178         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
4179         R3K.
4180         * sysdeps/mips/pt-machine.h (testandset): Likewise.
4182 2000-07-26  Andreas Jaeger  <aj@suse.de>
4184         * pthread.c: Initialize p_sem_avail.
4186 2000-07-25  Ulrich Drepper  <drepper@redhat.com>
4188         * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
4189         * semaphore.c: Handle spurious wakeups.
4191         * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
4192         for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
4194         * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
4195         (__pthread_wait_for_restart): Likewise.
4197         * condvar.c (pthread_cond_wait): Also check whether thread is
4198         cancelable before aborting loop.
4199         (pthread_cond_timedwait): Likewise.
4201         * signals.c (pthread_sighandler): Remove special code to restrore
4202         %gs on x86.
4203         (pthread_sighandler_t): Likewise.
4205 2000-07-25  Mark Kettenis  <kettenis@gnu.org>
4207         * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
4208         * pthread.c: Include <resolv.h>.
4209         (_res): Undefine.  Add extern declaration.
4211 2000-07-24  Ulrich Drepper  <drepper@redhat.com>
4213         * pthread.c (__pthread_initial_thread): Update initializer.
4214         (__pthread_manager_thread): Likewise.
4215         (pthread_initialize): Move setrlimit call to...
4216         (__pthread_initialize_manager): ...here.
4217         (__pthread_reset_main_thread): Reset also soft limit on stack size.
4219         * condvar.c: Handle spurious wakeups.  [PR libc/1749].
4220         * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
4222 2000-07-21  Ulrich Drepper  <drepper@redhat.com>
4224         * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
4225         __compare_and_swap to define testandset.
4226         * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
4227         Define IMPLEMENT_TAS_WITH_CAS.
4229 2000-07-20  Ulrich Drepper  <drepper@redhat.com>
4231         * Makefile: Pass -z nodelete to linker for libpthread.so
4232         generation if it understand this option.
4234 2000-07-18  Mark Kettenis  <kettenis@gnu.org>
4236         * manager.c (pthread_handle_create): Remove initialization of
4237         new_thread->p_res._sock.
4239 2000-07-19  Kaz Kylheku  <kaz@ashi.footprints.net>
4241         Bugfixes to the variant of the code for machines with no compare
4242         and swap.
4244         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
4245         node was not being properly enqueued, due to failing to update
4246         the lock->__status field.
4248         * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
4249         being set inappropriately, causing the suspend function to be called
4250         with a null self pointer and crash.
4252 2000-07-18  Ulrich Drepper  <drepper@redhat.com>
4254         * spinlock.h (__pthread_alt_trylock): Fix code used if no
4255         compare&swap is available.
4257         * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
4258         compare_and_swap.
4260         * pthread.c (pthread_initialize): Don't use sysconf to determine
4261         whether the machine has more than one processor.
4263         * spinlock.c (__pthread_alt_timedlock): Add back one of the
4264         removed thread_self calls.
4266 2000-07-18  Kaz Kylheku  <kaz@ashi.footprints.net>
4268         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
4269         __compare_and_swap to compare_and_swap in code which assumes
4270         compare swap is available.
4272 2000-07-18  Kaz Kylheku  <kaz@ashi.footprints.net>
4274         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
4275         bug whereby thr field of waitnode structure would not be correctly
4276         set unless a null self pointer is passed to the functions.
4277         Eliminated redundant calls to thread_self().
4279 2000-07-18  Jakub Jelinek  <jakub@redhat.com>
4281         * pthread.c (__pthread_initialize_manager): Lock
4282         __pthread_manager_thread.p_lock before calling clone.
4284 2000-05-05  H.J. Lu  <hjl@gnu.org>
4286         * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
4287         have acquire semantics.
4288         (__compare_and_swap_with_release_semantics): New inline
4289         function.
4290         (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
4292 2000-01-28  Hans Boehm  <hboehm@exch.hpl.hp.com>
4294         * manager.c: Fix the problem with signals at startup.
4295         Change the way that thread stacks are allocated on IA64.
4296         Clean up some of the guard page allocation stuff.
4298 1999-12-19  H.J. Lu  <hjl@gnu.org>
4300         * internals.h (page_roundup): New.
4301         * attr.c (__pthread_attr_setguardsize); Use page_roundup
4302         instead of roundup.
4303         * manager.c (pthread_allocate_stack): Make sure guardaddr is
4304         page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
4305         is define.
4307 1999-12-17  Hans Boehm  <hboehm@exch.hpl.hp.com>
4309         * manager.c (pthread_allocate_stack): Unmap the stack top
4310         if failed to map the stack bottom.
4311         Fix the guard page.
4312         (pthread_free): Fix the guard page.
4314         * pthread.c (pthread_initialize): Set rlimit correctly for
4315         NEED_SEPARATE_REGISTER_STACK.
4317 1999-12-16  H.J. Lu  <hjl@gnu.org>
4319         * pthread.c (__pthread_initialize_manager): Pass
4320         __pthread_manager_thread_bos instead of
4321         __pthread_manager_thread_tos to __clone2.
4323 1999-12-16  H.J. Lu  <hjl@gnu.org>
4325         * manager.c (pthread_allocate_stack): Correct the calculation
4326         of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
4327         stack bottom.
4329 1999-12-13  H.J. Lu  <hjl@gnu.org>
4331         * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
4332         bit after setting ar.ccv.
4334 1999-12-12  H.J. Lu  <hjl@gnu.org>
4336         * manager.c (pthread_allocate_stack): Make the starting
4337         address of the stack bottom page aligned. FIXME: it may
4338         need changes in other places.
4339         (pthread_handle_create): Likewise.
4341 1999-12-11  Hans Boehm  <hboehm@exch.hpl.hp.com>
4343         * manager.c (pthread_allocate_stack): Handle
4344         NEED_SEPARATE_REGISTER_STACK.
4345         (pthread_handle_create): Likewise.
4346         * pthread.c (__pthread_initialize_manager): Likewise.
4348         * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
4350 1999-12-02  H.J. Lu  <hjl@gnu.org>
4352         * sysdeps/ia64/pt-machine.h: New.
4354 2000-07-13  Ulrich Drepper  <drepper@redhat.com>
4356         * wrapsyscall.c: Mark non-__ protected names as weak.
4357         PR libc/1466.
4359 2000-07-12  Bruno Haible  <haible@clisp.cons.org>
4361         * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
4363 2000-07-12  Ulrich Drepper  <drepper@redhat.com>
4365         * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
4366         Add tests also to new alternative spinlock implementation.
4367         * spinlock.h: Likewise.
4368         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4370 2000-07-06  Ulrich Drepper  <drepper@redhat.com>
4372         * Version: Export __sigaction.
4373         * signals.c: Define __sigaction alias.  Use __libc_sigaction instead
4374         of __sigaction.
4375         * pthread.c: Use __libc_sigaction instead of __sigaction.
4377         * condvar.c: Implement pthread_condattr_getpshared and
4378         pthread_condattr_setpshared.
4379         * mutex.c: Implement pthread_mutexattr_getpshared and
4380          pthread_mutexattr_setpshared.
4381         * Versions: Export new functions.
4382         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
4384         * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
4385         (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
4386         is not selected.
4388 2000-07-04  Greg McGary  <greg@mcgary.org>
4390         * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
4391         pragmas.  Include bp-sym.h only if _LIBC.
4393 2000-07-04  Ulrich Drepper  <drepper@redhat.com>
4395         * spinlock.c (__pthread_unlock): Properly place write barrier.
4396         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4398 2000-07-03  Ulrich Drepper  <drepper@redhat.com>
4400         * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
4401         faster on SMP systems.  No more emulation of compare&swap for adaptive
4402         spinlocks.
4403         * spinlock.h: Likewise.
4404         * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
4405         Replace fast with adaptive mutex.
4406         * mutex.c: Rewrite for replacement of fast by adaptive mutex.
4407         * condvar.c: Likewise.
4408         * pthread.c: Define and initialize __pthread_smp_kernel variable.
4409         * internals.h: Declare __pthread_smp_kernel.
4410         * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
4411         _pthread_fastlock structure.
4412         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4414         * pthread.c: Remove initialization to zero from global variables.
4416 2000-06-29  Jakub Jelinek  <jakub@redhat.com>
4418         * shlib-versions: Make sparc64 GLIBC_2.2+ only.
4420 2000-06-28  Greg McGary  <greg@mcgary.org>
4422         * weaks.c: Wrap BP_SYM () around weak extern declarations of
4423         pthread functions that have pointers in their return+arg signatures.
4425 2000-06-27  Greg McGary  <greg@mcgary.org>
4427         * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
4428         extern declarations of pthread functions that have pointers in
4429         their return+arg signatures.
4431 2000-06-26  Ulrich Drepper  <drepper@redhat.com>
4433         * Makefile (tests): Add ex11.  Add rules to build it.
4434         * Examples/ex11.c: New file.
4435         * rwlock.c: Fix complete braindamaged previous try to implement
4436         timedout functions.
4438         * spinlock.c: Pretty print.
4440 2000-06-25  Ulrich Drepper  <drepper@redhat.com>
4442         * Makefile (tests): Add ex10.  Add rules to build it.
4443         * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
4444         pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
4445         * condvar.c (pthread_cond_wait): Allow mutex of kind
4446         PTHREAD_MUTEX_TIMED_NP.
4447         (pthread_cond_timedwait_relative): Likewise.
4448         * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
4449         (__pthread_mutex_trylock): Use __pthread_alt_trylock for
4450         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
4451         (__pthread_mutex_lock): Use __pthread_alt_lock for
4452         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
4453         (__pthread_mutex_timedlock): New function.
4454         (__pthread_mutex_unlock): Use __pthread_alt_unlock for
4455         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
4456         (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
4457         (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
4458         * spinlock.c: Implement alternate fastlocks.
4459         * spinlock.h: Add prototypes.
4460         * Examples/ex10.c: New file.
4461         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
4462         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4464         * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
4465         (__pthread_rwlock_timedrdlock): New function.
4466         (__pthread_rwlock_timedwrlock): New function.
4467         Use laternate fastlock function everywhere.
4469 2000-06-21  Andreas Jaeger  <aj@suse.de>
4471         * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
4472         prototype.
4474         * join.c: Include <stdlib.h> for exit prototype.
4476 2000-06-20  Ulrich Drepper  <drepper@redhat.com>
4478         * sysdeps/i386/useldt.h: Include <stdlib.h>.
4480         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
4481         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4483         * Makefile (libpthread-routines): Add barrier.
4484         (tests): Add ex9.  Add rule to build ex9.
4485         * Versions: Export barrier functions.
4486         * barrier.c: New file.
4487         * Examples/ex9.c: New file.
4488         * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
4489         * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
4490         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4492 2000-06-19  H.J. Lu  <hjl@gnu.org>
4494         * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
4495         HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
4496         (compare_and_swap_with_release_semantics): New. Default to
4497         compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
4498         is not defined.
4500         * spinlock.c (__pthread_unlock): Call
4501         compare_and_swap_with_release_semantics () instead of
4502         compare_and_swap ().
4504 2000-06-19  Ulrich Drepper  <drepper@redhat.com>
4506         * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
4507         to errno directly.
4508         * sysdeps/pthread/timer_delete.c: Likewise.
4509         * sysdeps/pthread/timer_getoverr.c: Likewise.
4510         * sysdeps/pthread/timer_gettime.c: Likewise.
4511         * sysdeps/pthread/timer_settime.c: Likewise.
4513 2000-06-13  Kaz Kylheku  <kaz@ashi.footprints.net>
4515         Timer nodes are now reference counted, and can be marked
4516         as deleted. This allows for the safe release of the global mutex
4517         in the middle without losing the timer being operated on.
4519         * sysdeps/pthread/posix-timer.h (struct timer_node):  The inuse
4520         member is now an enum with three values, so that an intermediate
4521         state can be represented (deleted but not free for reuse yet).
4522         New refcount member added.
4523         * sysdeps/pthread/timer_routines.c: Likewise.
4525         * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
4526         timer_valid): New inline functions added.
4528         * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
4529         restructured, recursive deadlock bug fixed.
4531         * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
4532         timer_addref to ensure that timer won't be deleted while mutex is not
4533         held. Also uses timer_invalid to perform validation of timer handle.
4534         * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
4535         * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
4537 2000-06-14  Ulrich Drepper  <drepper@redhat.com>
4539         * shlib-versions: Add entry for SH.
4540         Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
4542 2000-06-13  Kaz Kylheku  <kaz@ashi.footprints.net>
4544         A few optimizations.  Got rid of unnecessary wakeups of timer threads,
4545         tightened up some critical regions and micro-optimized some list
4546         manipulation code.
4548         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
4549         Returns int value now to indicate whether timer was queued at head.
4550         * sysdeps/pthread/posix-timer.h: Likewise.
4551         * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
4552         new return value from __timer_thread_queue_timer to avoid waking
4553         up timer thread unnecessarily.
4555         * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
4556         inuse flag, because this requires mutex to be held.  Callers updated
4557         to do the check when they have the mutex.
4558         * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
4560         * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
4561         regions: avoids making system calls while holding timer mutex, and
4562         a few computations were moved outside of the mutex as well.
4563         * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
4565         * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
4566         to list_unlink_ip, meaning idempotent.  Pointer manipulation
4567         changed to get better better code out of gcc.
4568         * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
4569         version of list_unlink added here.
4570         * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
4571         function in all places: idempotent one for timers, non-idempotent
4572         one for thread nodes.
4573         * sysdeps/pthread/timer_settime: Likewise.
4574         * sysdeps/pthread/timer_routines.c: Likewise.
4576 2000-06-13  Ulrich Drepper  <drepper@redhat.com>
4578         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
4579         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4581         * sysdeps/pthread/Makefile: Remove tests definition.
4583 2000-06-12  Kazumoto Kojima  <kkojima@rr.iij4u.or.jp>
4584             Yutaka Niibe  <gniibe@chroot.org>
4586         * sysdeps/sh/pspinlock.c: New file.
4587         * sysdeps/sh/pt-machine.h: New file.
4589 2000-06-12  Ulrich Drepper  <drepper@redhat.com>
4591         * Makefile (tests): Add joinrace.
4593         * Examples/ex6.c: Test return value of pthread_join.
4595 2000-06-11  Geoff Keating  <geoffk@cygnus.com>
4597         * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
4598         (__pthread_spin_trylock): Implement.
4599         (__pthread_spin_unlock): Implement.
4600         (__pthread_spin_init): Implement.
4601         (__pthread_spin_destroy): Implement.
4603 2000-06-10  Ulrich Drepper  <drepper@redhat.com>
4605         * sysdeps/pthread/timer_routines.c (list_append): Little fix to
4606         really append the entry.
4608 2000-06-10  Andreas Jaeger  <aj@suse.de>
4610         * lockfile.c (__fresetlockfiles): Remove unused variable fp.
4612 2000-06-10  Kaz Kylheku  <kaz@ashi.footprints.net>
4614         * sysdeps/pthread/timer_create.c: Thread matching now done on
4615         clock type as well as thread attributes.
4616         There are individual global signal-delivering threads for
4617         different clock types.
4618         * sysdeps/pthread/posix-timer.h: Likewise.
4619         * sysdeps/pthread/timer_routines.c: Likewise.
4621         * sysdeps/pthread/timer_routines.c: Thread allocation and
4622         deallocation function now remembers to put thread on active
4623         list and remove from active list.
4624         Thus now the feature of binding multiple timers
4625         to a single thread actually works.
4627 2000-06-10  Ulrich Drepper  <drepper@redhat.com>
4629         * pthread.c (__pthread_create_2_1): Optimize a bit.
4631         * internals.h (invalid_handle): Also test for p_terminated != 0.
4632         (nonexisting_handle): New function.  Same as old invalid_handle.
4633         * join.c (pthread_join): Use nonexisting_handle instead of
4634         invalid_handle to test for acceptable thread handle.
4635         * manager.c (pthread_handle_free): Likewise.
4636         * joinrace.c: New file.
4637         Reported by Permaine Cheung <pcheung@cygnus.com>.
4639 2000-06-08  Ulrich Drepper  <drepper@redhat.com>
4641         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
4642         Correct handling of matching variable.
4644         * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
4645         avoid warnings.
4647         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
4648         Be prepared for empty timer list.
4650         * sysdeps/pthread/timer_create.c (timer_create): Correct names of
4651         CPUTIME clock ID.  Add support for thread clocks.
4653         * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
4654         subtraction were switched.
4656         * sysdeps/pthread/timer_routines.c (init_module): Use
4657         THREAD_MAXNODES threads.
4659         * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
4660         * sysdeps/pthread/timer_create.c: Fill in creator_pid.
4661         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
4662         with sigqueueinfo is this system call is available.
4664         * sysdeps/pthread/timer_create.c (timer_create): Allow
4665         CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
4667         * sysdeps/pthread/Makefile: New file.  Add rules to build timer
4668         functionality.
4669         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
4671 2000-06-04  Kaz Kylheku  <kaz@ashi.footprints.net>
4673         * sysdeps/pthread/posix-timer.h: New file.
4674         * sysdeps/pthread/timer_create.c: New file.
4675         * sysdeps/pthread/timer_delete.c: New file.
4676         * sysdeps/pthread/timer_getoverr.c: New file.
4677         * sysdeps/pthread/timer_gettime.c: New file.
4678         * sysdeps/pthread/timer_routines.c: New file.
4679         * sysdeps/pthread/timer_settime.c: New file.
4680         * sysdeps/pthread/tst-timer.c: New file.
4682 2000-06-08  Ulrich Drepper  <drepper@redhat.com>
4684         * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
4685         LINK_MAX definitions if necessary.
4687 2000-06-04  Kaz Kylheku  <kaz@ashi.footprints.net>
4689         Added missing fork time handling of global libio lock.
4691         * lockfile.c (__fresetlockfiles): Now also resets the list lock,
4692         not just the individual stream locks. Rewritten to use new
4693         iterator interface provided by libio rather than accessing
4694         global variable.
4696         * lockfile.c (__flockfilelist, _funlockfilelist): New functions
4697         which lock and unlock the stream list using the new interface
4698         provied by libio.
4699         * internals.h: Likewise.
4701         * ptfork.c (__fork): Now calls __flockfilelist before fork,
4702         and __funlockfilelist in the parent after the fork.
4703         Child still calls __fresetlockfiles as before.
4705         * linuxthreads.texi: Now explains what happens to streams at
4706         fork time. Also whole new section on forking and thread added.
4707         Definition of pthread_atfork moved out of Miscellaneous Functions
4708         to this new section.
4710 2000-06-04  Jakub Jelinek  <jakub@redhat.com>
4712         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
4713         Add missing register.
4714         * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
4716 2000-06-02  Jakub Jelinek  <jakub@redhat.com>
4718         * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
4719         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
4720         * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
4722 2000-05-31  Andreas Jaeger  <aj@suse.de>
4724         * sysdeps/mips/pspinlock.c: Implement spinlocks.
4726 2000-05-28  Ulrich Drepper  <drepper@redhat.com>
4728         * spinlock.c (__pthread_lock): Remove ASSERT.
4730         * Makefile (tests): Add ex8.
4731         * Examples/ex8.c: New file.
4733 2000-05-12  Kaz Kylheku  <kaz@ashi.footprints.net>
4735         Bugfix: The pthread_atfork mechanism now takes care of its
4736         own internal mutex at fork time.
4738         * ptfork.c (__fork): Revised so that the mutex is held across
4739         the fork operation and while the handlers are called, and so that
4740         the child resets the mutex.
4742         * linuxthreads.texi: Updated pthread_atfork documentation to make
4743         it clear that fork and pthread_atfork can't be reentered from
4744         atfork handlers, that pthread_atfork and fork are mutually atomic,
4745         and that the handlers are inherited by the child process.
4747 2000-05-24  Ulrich Drepper  <drepper@redhat.com>
4749         * Makefile (libpthread-routines): Add pspinlock.
4750         * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
4751         Use struct _pthread_fastlock instead of pthread_spinlock_t.
4752         * condvar.c: Likewise.
4753         * internals.h: Likewise.
4754         * join.c: Likewise.
4755         * manager.c: Likewise.
4756         * mutex.c: Likewise.
4757         * pthread.c: Likewise.
4758         * rwlock.c: Likewise.
4759         * semaphore.c: Likewise.
4760         * signals.c: Likewise.
4761         * spinlock.h: Likewise.
4762         * spinlock.c: Likewise.  Remove pthread_spin_lock functions.
4763         * sysdeps/alpha/pspinlock.c: New file.
4764         * sysdeps/arm/pspinlock.c: New file.
4765         * sysdeps/i386/pspinlock.c: New file.
4766         * sysdeps/m68k/pspinlock.c: New file.
4767         * sysdeps/mips/pspinlock.c: New file.
4768         * sysdeps/powerpc/pspinlock.c: New file.
4769         * sysdeps/sparc/sparc32/pspinlock.c: New file.
4770         * sysdeps/sparc/sparc64/pspinlock.c: New file.
4771         * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
4772         back to _pthread_fastlock.  Define new pthread_spinlock_t.
4774 2000-05-24  Andreas Jaeger  <aj@suse.de>
4776         * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
4778 2000-05-21  Jakub Jelinek  <jakub@redhat.com>
4780         * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
4782 2000-05-13  Jakub Jelinek  <jakub@redhat.com>
4784         * internals.h (__RES_PTHREAD_INTERNAL): Define.
4786 2000-05-06  Kaz Kylheku  <kaz@ashi.footprints.net>
4788         * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
4789         object state is represented with additional bits which distinguish
4790         whether that state was set up in the current process, or
4791         in an ancestor process. If that state was set in an ancestor,
4792         it means that a fork happened while thread was executing the init
4793         function. In that case, the state is reset to NEVER.
4794         * mutex.c (__pthread_once_fork_prepare): New function.
4795         (__pthread_once_fork_child): Likewise
4796         (__pthread_once_fork_parent): Likewise
4797         (__pthread_reset_pthread_once): Removed.
4798         * ptfork.c (__fork): Call new handlers in mutex.c.
4799         * internals.h: Declarations of new mutex.c functions added.
4800         Declaration of removed function deleted.
4801         * linuxthreads.texi: Updated documentation about pthread_once
4802         to clarify what happens under cancellation and forking.
4804 2000-05-06  Kaz Kylheku  <kaz@ashi.footprints.net>
4806         * internals.h: New thread manager request type, REQ_KICK.
4807         * join.c (pthread_exit): main thread now calls exit() instead
4808         of _exit() in order to proper process cleanup.
4809         * manager.c (__pthread_manager): Do not terminate manager
4810         after unblocking main thread; wait for main thread's
4811         REQ_PROCESS_EXIT request instead.
4812         Also, added REQ_KICK case to handle new request; this just does
4813         nothing.
4814         * manager.c (pthread_exited): Do not terminate manager after
4815         unblocking main thread.
4816         * manager.c (__pthread_manager_sighandler): If the main thread
4817         is waiting for all other threads to die, send a REQ_KICK into
4818         the thread manager request pipe to get it to clean out the threads
4819         and unblock the main thread as soon as possible. This fixes
4820         the 2000 millisecond hang on shutdown bug.
4821         * Examples/ex7.c: New file, tests shutdown behavior when all threads
4822         including the main one call pthread_exit(), or implicitly do so.
4823         * Makefile (tests): Add ex7.
4825 2000-05-05  Andreas Jaeger  <aj@suse.de>
4827         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
4828         (pthread_getcpuclockid): Correct test for ourselves.
4830 2000-05-05  Ulrich Drepper  <drepper@redhat.com>
4832         * internals.h (struct _pthread_descr_struct): Reorganization.
4833         Allocate room for 16 pointers at head of the structure for future
4834         thread-local data handling.  Move p_self member in this area.
4835         * manager.c (pthread_handle_create): Adjust use of p_self.
4836         * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
4837         * pthread.c (__pthread_initial_thread): Adjust initialization.
4838         (__pthread_manager_thread): Likewise.
4840 2000-04-29  Bruno Haible  <haible@clisp.cons.org>
4842         * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
4843         for eventmask larger than 1 word.
4845 2000-04-27  Ulrich Drepper  <drepper@redhat.com>
4847         * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
4848         * pthread.c (__pthread_initialize_minimal): New function.  Perform
4849         minimal initialization.
4850         (pthread_initialize): Remove this code here.
4851         * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again.  We
4852         are working around the problem in glibc.
4854 2000-04-25  Ulrich Drepper  <drepper@redhat.com>
4856         * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
4857         now.  First gcc must be fixed (more concrete: libgcc).
4859 2000-04-24  Ulrich Drepper  <drepper@redhat.com>
4861         * pthread.c: Remove special treatement for interrupt handlers on x86.
4862         * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
4863         * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
4864         necessary.
4865         * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
4867 2000-04-24  Mark Kettenis  <kettenis@gnu.org>
4869         * join.c (pthread_exit): Set p_terminated after reporting the
4870         termination event instead of before.
4872 2000-04-20  Jakub Jelinek  <jakub@redhat.com>
4874         * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
4875         if __USE_UNIX98.
4877 2000-04-18  Andreas Jaeger  <aj@suse.de>
4879         * Versions: Use ld instead of ld.so.
4881 2000-04-18  Jakub Jelinek  <jakub@redhat.com>
4883         * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
4884         Remove the typedef keyword.
4886 2000-04-18  Jakub Jelinek  <jakub@redhat.com>
4888         * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
4889         not stbar.
4890         (READ_MEMORY_BARRIER): Define.
4891         * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
4892         MEMORY_BARRIER.
4893         * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
4894         headers.
4896 2000-04-17  Ulrich Drepper  <drepper@redhat.com>
4898         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
4899         (pthread_getcpuclockid): Don't compare thread_id with thread_self,
4900         use thread_handle().
4902 2000-04-16  Ulrich Drepper  <drepper@redhat.com>
4904         * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
4905         if fast mutex is used.  Don't initialize `already_canceled' twice.
4906         Correctly test for return value of timedsuspend.
4908         * pthread.c: Correct long-time braino.  We never set SA_SIGINFO and
4909         therefore don't need the _rt versions of the signal handlers.
4911 2000-04-15  Ulrich Drepper  <drepper@redhat.com>
4913         * pthread.c (pthread_yield): New function.
4914         * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
4915         * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
4916         * internals.h: Declare __pthread_yield.
4918         * pthread.c (pthread_initialize): Avoid a bit more code if
4919         realtime signals are known to exist.
4921         * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
4922         to dynamically detect RT signals and avoid generating compatibility
4923         functions with old kernel.
4924         * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
4925         __pthread_restart_new directly.
4926         (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
4927         __pthread_wait_for_restart_signal directly.
4928         (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
4929         __pthread_timedsuspend_new directly.
4931 2000-04-15  Ulrich Drepper  <drepper@redhat.com>
4933         * condvar.c: Remove all the special code to handle cond_timedwait.
4934         Use timedsuspend instead.
4935         * internals.h: Declare __pthread_timedsuspend_old,
4936         __pthread_timedsuspend_new, and __pthread_timedsuspend.
4937         Remove declaration of __pthread_init_condvar.
4938         * pthread.c: Define __pthread_timedsuspend variable.
4939         (__pthread_timedsuspend_old): New function.  Timed suspension
4940         implementation for old Linux kernels.
4941         (__pthread_timedsuspend_new): New function.  Timed suspension
4942         implementation for new Linux kernels.
4943         * restart.h (timedsuspend): New function.  Call appropriate
4944         suspension function through __pthread_timedsuspend.
4945         * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
4946         the code.
4947         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4949         * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
4950         undefined.
4951         * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
4952         where possible.
4953         * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
4954         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
4956         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
4957         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4959 2000-04-14  Andreas Jaeger  <aj@suse.de>
4961         * weaks.c: Fix typo.
4963         * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
4964         2.2 for linuxthreads.
4966 2000-04-13  Ulrich Drepper  <drepper@redhat.com>
4968         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
4969         (pthread_getcpuclockid): Fix typo.
4971 2000-04-12  Ulrich Drepper  <drepper@redhat.com>
4973         * Makefile (libpthread-routines): Add getcpuclockid.
4974         * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
4975         * sysdeps/pthread/getcpuclockid.c: New file.
4976         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
4977         * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
4979         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
4980         Defined.
4981         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4983         * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
4984         pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
4985         and pthread_spin_unlock.
4986         * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
4987         into pthread_spinlock_t.  Change all uses.
4988         * spinlock.c: Implement pthread_spin_lock.
4989         Rename __pthread_unlock to __pthread_spin_unlock and define weak
4990         alias for real name.
4991         Define pthread_spin_trylock, pthread_spin_init, and
4992         pthread_spin_destroy.
4993         Change all uses of _pthread_fastlock to pthread_spinlock_t.
4994         * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
4995         Change all uses of _pthread_fastlock to pthread_spinlock_t.
4996         * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
4997         pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
4998         and pthread_spin_unlock.
4999         * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
5000         Change all uses of _pthread_fastlock to pthread_spinlock_t.
5001         * condvar.c: Likewise.
5002         * internals.h: Likewise.
5003         * join.c: Likewise.
5004         * manager.c: Likewise.
5005         * mutex.c: Likewise.
5006         * pthread.c: Likewise.
5007         * rwlock.c: Likewise.
5008         * semaphore.c: Likewise.
5009         * signals.c: Likewise.
5011         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
5012         macros.
5013         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
5015 2000-04-11  Ulrich Drepper  <drepper@redhat.com>
5017         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
5018         _POSIX_SHARED_MEMORY_OBJECTS.
5020 2000-04-11  Andreas Jaeger  <aj@suse.de>
5022         * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
5023         (__compare_and_swap): Mark as modifying memory.
5025 2000-04-11  Geoff Keating  <geoffk@cygnus.com>
5027         * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
5028         __volatile__.
5029         (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
5030         Don't have the 'asm' __volatile__.
5032 2000-04-11  Ulrich Drepper  <drepper@redhat.com>
5034         * internals.h: Define MEMORY_BARRIER as empty if not defined already.
5035         * spinlock.c (__pthread_lock): Add memory barriers.
5036         (__pthread_unlock): Likewise.
5037         * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
5038         instruction.
5039         (RELEASE): Not needed anymore.
5040         (__compare_and_swap): Mark asm as modifying memory.
5041         * sysdeps/powerpc/pt-machine.h (sync): Remove.  Replace with definition
5042         of MEMORY_BARRIER.
5043         (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
5044         * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
5045         (MEMORY_BARRIER): Define using stbar.
5046         * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
5047         stbar.
5048         (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
5049         Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
5050         Mike Burrows <m3b@pa.dec.com>.
5052 2000-04-09  Ulrich Drepper  <drepper@redhat.com>
5054         * signals.c (sigaction): Fix return value for the case SIG is one
5055         of the signals the implementation uses.
5056         Patch by Xavier.Leroy@inria.fr.
5058 2000-04-01  Andreas Jaeger  <aj@suse.de>
5060         * attr.c: Use shlib-compat macros.
5061         * oldsemaphore.c: Likewise.
5062         * pthread.c: Likewise.
5063         * weaks.c: Likewise.
5065 2000-03-26  Ulrich Drepper  <drepper@redhat.com>
5067         * semaphore.c (sem_timedwait): New function.
5068         Patch by Carl Mailloux <carlm@oricom.ca>.
5069         * semaphore.h: Declare sem_timedwait.
5070         * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
5072 2000-03-26  Roland McGrath  <roland@baalperazim.frob.com>
5074         * sysdeps/pthread/Makefile: File removed.
5076 2000-03-23  Ulrich Drepper  <drepper@redhat.com>
5078         * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
5079         * internals.h (__pthread_reset_pthread_once): Add prototype.
5080         * ptfork.c (__fork): Call __pthread_reset_pthread_once.
5082         * manager.c (pthread_handle_create): Store ID of new thread before
5083         clone call.
5085 2000-03-21  Ulrich Drepper  <drepper@redhat.com>
5087         * attr.c: Use new macros from shlib-compat.h to define versions.
5088         * oldsemaphore.c: Likewise.
5089         * semaphore.c: Likewise.
5090         * weaks.c: Likewise.
5092         * pthread.c: Update for new SHLIB_COMPAT definition.
5094         * manager.c (__pthread_manager): Unmask debug signal.
5096         * pthread.c (pthread_initialize): Test for address of __dso_handle
5097         being NULL, not value.  Use __on_exit, not on_exit.
5098         Patch by Andreas Jaeger <aj@suse.de>.
5100         * pthread.c: Use new macros from shlib-compat.h to define versions.
5102 2000-03-19  Ulrich Drepper  <drepper@redhat.com>
5104         * pthread.c (pthread_initialize): Instead of on_exit use
5105         __cxa_atexit if __dso_label is available to allow unloading the
5106         libpthread shared library.
5108 2000-03-16  Ulrich Drepper  <drepper@redhat.com>
5110         * condvar.c: Make tests for ownership of mutex less strict.
5112 2000-03-14  Ulrich Drepper  <drepper@redhat.com>
5114         * condvar.c (pthread_cond_wait): Check whether mutex is owned by
5115         current thread and return error if not.
5116         (pthread_cond_timedwait_relative_old): Likewise.
5117         (pthread_cond_timedwait_relative_new): Likewise.
5119         * mutex.c (__pthread_once): Handle cancelled init function correctly.
5120         (pthread_once_cancelhandler): New function.
5121         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
5123 2000-03-14  Andreas Jaeger  <aj@suse.de>
5125         * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
5126         REG_GS.
5127         (pthread_handle_sigrestart_rt): Likewise.
5128         * signals.c (pthread_sighandler_rt): Likewise.
5130 2000-03-02  Andreas Jaeger  <aj@suse.de>
5132         * sysdeps/pthread/bits/libc-lock.h: Fix typo.
5133         Reported by Sean Chen <sean.chen@turbolinux.com>.
5135 2000-02-28  Andreas Jaeger  <aj@suse.de>
5137         * rwlock.c: Fix typo.
5139 2000-02-27  Ulrich Drepper  <drepper@redhat.com>
5141         * rwlock.c: Define __* variants of the functions and make old names
5142         aliases.
5143         * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
5144         * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
5146 2000-02-25  Andreas Jaeger  <aj@suse.de>
5148         * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
5149         pwrite64, lseek64, open64, and __open64 with version 2.2.
5151 2000-02-22  Ulrich Drepper  <drepper@redhat.com>
5153         * semaphore.h (SEM_FAILED): Use 0 not NULL.
5155 2000-02-14  Ulrich Drepper  <drepper@redhat.com>
5157         * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
5158         nanosleep does not work either.  Get absolute time inside the
5159         loop.
5160         (pthread_cond_timedwait_relative_new): Likewise.
5161         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
5163 2000-02-13  Andreas Jaeger  <aj@suse.de>
5165         * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
5166         (pthread_cond_timedwait_relative_old): Likewise.
5168 2000-02-13  Ulrich Drepper  <drepper@redhat.com>
5170         * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
5171         but keep the code around.  A bug in the kernel prevent us from
5172         using the code.
5173         (pthread_cond_timedwait_relative_new): Likewise.
5174         (PR libc/1597 and libc/1598).
5176 2000-02-01  Kaz Kylheku  <kaz@ashi.footprints.net>
5178         * condvar.c (pthread_cond_timedwait_relative_old): Do tight
5179         loop around nanosleep calls instead of around most of the function
5180         (pthread_cond_timedwait_relative_new): Likewise.
5181         body.  Got rid of backwards goto and one local.
5183 2000-01-31  Ulrich Drepper  <drepper@redhat.com>
5185         * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
5186         before every nanosleep call to account for time spent in the rest
5187         of the function.
5188         (pthread_cond_timedwait_relative_new): Likewise.
5189         Patch by khendricks@ivey.uwo.ca (PR libc/1564).
5191 2000-01-29  Ulrich Drepper  <drepper@redhat.com>
5193         * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
5194         from nanosleep call so that in case we restart we only wait for the
5195         remaining time.
5196         (pthread_cond_timedwait_relative_new): Likewise.
5197         Patch by khendricks@ivey.uwo.ca (PR libc/1561).
5199 2000-01-18  Ulrich Drepper  <drepper@cygnus.com>
5201         * manager.c (pthread_allocate_stack): Compute guard page address
5202         correctly.  Patch by HJ Lu.
5204         * sysdeps/pthread/pthread.h: Define
5205         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
5207 2000-01-16  Ulrich Drepper  <drepper@cygnus.com>
5209         * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
5210         preference handling.
5211         (pthread_rwlockattr_setkind_np): Allow
5212         PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
5213         Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
5215 2000-01-12  Ulrich Drepper  <drepper@cygnus.com>
5217         * internals.h (pthread_readlock_info): New structure.
5218         (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
5219         p_untracked_readlock_count.
5220         * pthread.c (__pthread_initial_thread, pthread_manager_thread):
5221         Add initializers for new fields.
5222         * manager.c (pthread_free): Free read/write lock lists.
5223         * queue.h (queue_is_empty): New function.
5224         * rwlock.c: Implement requirements about when readers should get
5225         locks assigned.
5226         * sysdeps/pthread/pthread.h
5227         (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
5228         * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
5229         Define this name as well.
5230         Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
5232 2000-01-05  Ulrich Drepper  <drepper@cygnus.com>
5234         * pthread.c (__pthread_initial_thread, pthread_manager_thread):
5235         Adjust initializers for struct _pthread_descr_struct change.
5236         * internals.h (struct _pthread_descr_struct): Move new elements to
5237         the end.
5239 2000-01-03  Kaz Kylheku  <kaz@ashi.footprints.net>
5241         Redesigned how cancellation unblocks a thread from internal
5242         cancellation points (sem_wait, pthread_join,
5243         pthread_cond_{wait,timedwait}).
5244         Cancellation won't eat a signal in any of these functions
5245         (*required* by POSIX and Single Unix Spec!).
5246         * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
5247         simultaneous condition variable signal (not required by POSIX
5248         or Single Unix Spec, but nice).
5249         * spinlock.c: __pthread_lock queues back any received restarts
5250         that don't belong to it instead of assuming ownership of lock
5251         upon any restart; fastlock can no longer be acquired by two threads
5252         simultaneously.
5253         * restart.h: Restarts queue even on kernels that don't have
5254         queued real time signals (2.0, early 2.1), thanks to atomic counter,
5255         avoiding a rare race condition in pthread_cond_timedwait.
5257 1999-12-31  Andreas Jaeger  <aj@suse.de>
5259         * internals.h: Remove duplicate prototype declarations.
5261         * weaks.c: Remove __THROW from prototypes since the file is not
5262         compiled by a C++ compiler.
5263         * internals.h: Likewise.
5265 1999-12-30  Andreas Jaeger  <aj@suse.de>
5267         * sysdeps/pthread/pthread.h: Move internal functions to...
5268         * sysdeps/pthread/bits/libc-lock.h: ...here.
5270 1999-12-29  Andreas Jaeger  <aj@suse.de>
5272         * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
5274 1999-12-28  Ulrich Drepper  <drepper@cygnus.com>
5276         * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
5277         beginning.
5279         * manager.c (__pthread_start): Add one more cast to prevent
5280         warning on 64bit machines.
5282 1999-12-21  Ulrich Drepper  <drepper@cygnus.com>
5284         * manager.c (pthread_handle_create): Set p_pid of new thread
5285         before calling the callback function to report a new thread.
5287 1999-12-20  Andreas Jaeger  <aj@suse.de>
5289         * pthread.c (pthread_initialize): Move getrlimit call after
5290         setting of errno.
5292 1999-12-18  Ulrich Drepper  <drepper@cygnus.com>
5294         * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
5295         pwrite64, lseek64, open64, and __open64.
5296         * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
5297         pwrite64, lseek64, open64, and __open64.
5299         * manager.c (pthread_allocate_stack): Correct computation of
5300         new_thread_bottom.  Correct handling of stack size and when the
5301         rlimit method to guard for stack growth is used.
5302         * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
5303         minus one pagesize (not two).
5305 1999-12-03  Andreas Jaeger  <aj@suse.de>
5307         * Versions: Add __res_state with version GLIBC_2.2.
5309         * errno.c (__res_state): New function to return thread specific
5310         resolver state.
5312         * pthread.c (pthread_initialize): Initialize p_resp.
5313         (__pthread_reset_main_thread): Also set p_resp.
5315         * manager.c (pthread_handle_create): Initialize p_resp.
5317         * internals.h: Add thread specific resolver state.
5318         Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
5320 1999-12-01  Ulrich Drepper  <drepper@cygnus.com>
5322         * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
5323         beginning.
5324         * sysdeps/i386/i686/pt-machine.h: Likewise.
5325         Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
5327 1999-11-23  Ulrich Drepper  <drepper@cygnus.com>
5329         * manager.c (pthread_start_thread_event): Initialize p_pid already
5330         here.
5332 1999-11-22  Ulrich Drepper  <drepper@cygnus.com>
5334         * internals.h: Add prototype for __pthread_manager_event.
5335         * manager.c (__pthread_manager_event): New function.
5336         (pthread_start_thread_event): Correct computation of self.
5337         Use INIT_THREAD_SELF.
5338         * pthread.c (__pthread_manager_thread): Initialize p_lock.
5339         (__pthread_initialize_manager): Respect event flags also for creation
5340         of the manager thread.
5342 1999-11-08  Ulrich Drepper  <drepper@cygnus.com>
5344         * pthread.c (__pthread_initialize_manager): Initialize
5345         __pthread_manager_thread.p_tid.
5347 1999-11-02  Ulrich Drepper  <drepper@cygnus.com>
5349         * internals.h: Declare __pthread_last_event.
5350         * manager.c: Define __pthread_last_event.
5351         (pthread_handle_create): Set __pthread_last_event.
5352         (pthread_exited): Likewise.
5353         * join.c (pthread_exit): Likewise.
5355         * Makefile (libpthread-routines): Add events.
5356         * events.c: New file.
5357         * internals.h: Protect against multiple inclusion.
5358         Include thread_dbP.h header.
5359         (struct _pthread_descr_struct): Add new fields p_report_events and
5360         p_eventbuf.
5361         Declare event reporting functions.
5362         * join.c (pthread_exit): Signal event if this is wanted.
5363         * manager.c (__pthread_threads_events): New variable.
5364         (pthread_handle_create): Take new parameters with event information.
5365         Signal TD_CREATE event if wanted.
5366         (__pthread_manager): Adjust pthread_handle_create call.
5367         (pthread_start_thread_event): New function.  Block until manager is
5368         finished and then call pthread_start_thread.
5369         (pthread_exited): Signal TD_REAP event if wanted.
5371 1999-10-26  Ulrich Drepper  <drepper@cygnus.com>
5373         * restart.h (suspend_with_cancellation): Rewrite as a macro.
5375         * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
5377 1999-10-25  Andreas Jaeger  <aj@suse.de>
5379         * internals.h: Remove K&R compatibility.
5380         * no-tsd.c: Likewise.
5381         * semaphore.h: Likewise.
5382         * signals.c: Likewise.
5383         * sysdeps/pthread/bits/libc-tsd.h: Likewise.
5384         * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
5385         * weaks.c: Likewise.
5387 1999-10-21  Xavier Leroy  <Xavier.Leroy@inria.fr>
5389         * pthread.c: For i386, wrap pthread_handle_sigrestart and
5390         pthread_handle_sigcancel with functions that restore %gs from the
5391         signal context.  For each signal handling function, two wrappers
5392         are required, one for a non-RT signal and one for a RT signal.
5393         * signal.c: For i386, add code to restore %gs from the signal
5394         context in pthread_sighandler and pthread_sighandler_rt.
5396 1999-10-17  Ulrich Drepper  <drepper@cygnus.com>
5398         * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
5400 1999-10-14  Ulrich Drepper  <drepper@cygnus.com>
5402         * pthread.c (__pthread_initial_thread): Pass argument to
5403         PTHREAD_START_ARGS_INITIALIZER.
5404         (__pthread_manager_thread): Likewise.
5406         * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
5407         initialize function.
5409         * manager.c (pthread_handle_create): Remove p_startfct initialization.
5411         * internals.h (_pthread_descr_struct): We don't need p_startfct field.
5413 1999-10-12  Ulrich Drepper  <drepper@cygnus.com>
5415         * internals.h: Correct return types for __libc_read and __libc_write.
5417 1999-10-09  Andreas Jaeger  <aj@suse.de>
5419         * internals.h: Add __new_sem_post to get prototype in
5420         manager.c; include semaphore.h for needed types.
5422 1999-10-08  Ulrich Drepper  <drepper@cygnus.com>
5424         * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
5425         directly instead of calling sem_post which should not be necessary
5426         but is faster and might help in some case to work around problems.
5427         Patch by khendricks@ivey.uwo.ca [libc/1382].
5429 1999-10-08  Andreas Schwab  <schwab@suse.de>
5431         * sysdeps/pthread/Subdirs: New file.
5432         * Implies: Removed.
5434 1999-10-07  Ulrich Drepper  <drepper@cygnus.com>
5436         * Implies: New file.
5437         * internals.h (struct _pthread_descr_struct): Add p_startfct.
5438         * manager.c (pthread_handle_create): Initialize p_startfct.
5439         * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
5441 1999-09-25  Ulrich Drepper  <drepper@cygnus.com>
5443         * manager.c (__linuxthreads_pthread_threads_max): New variable.
5444         * specific.c (__linuxthreads_pthread_keys_max): New variable.
5445         (__linuxthreads_pthread_key_2ndlevel_size): New variable.
5447         * condvar.c (pthread_cond_timedwait_relative): Never return with
5448         EINTR.  Patch by Andreas Schwab.
5450 1999-09-19  Ulrich Drepper  <drepper@cygnus.com>
5452         * signals.c (sigaction): Correct last patch.  Don't select
5453         pthread_sighandler_rt based on the signal number but instead of
5454         the SA_SIGINFO flag.
5456 1999-09-23  Ulrich Drepper  <drepper@cygnus.com>
5458         * specific.c: Move definitions of struct pthread_key_struct and
5459         destr_function to ...
5460         * internals.h: ...here.
5462 1999-09-18  Ulrich Drepper  <drepper@cygnus.com>
5464         * pthread.c (pthread_handle_sigrestart_rt): New function.  Use
5465         this instead of pthread_handle_sigrestart if the signal is an RT
5466         signal.
5468         * signals.c: Handle passing through of sighandler arguments also
5469         for real-time signals.
5471 1999-09-03  Andreas Schwab  <schwab@suse.de>
5473         * ptfork.c (__fork): Renamed from fork and use __libc_fork.  Add
5474         fork as weak alias.
5475         (__vfork): New function, alias vfork.
5476         * Versions: Export __fork, vfork, and __vfork in libpthread.
5478 1999-08-23  Andreas Schwab  <schwab@suse.de>
5480         * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
5481         call to signal handler.
5483 1999-08-20  Ulrich Drepper  <drepper@cygnus.com>
5485         * pthread.c (__pthread_reset_main_thread): Undo last change.
5486         (__pthread_kill_other_threads_np): Reset signal handlers for the
5487         signals we used in the thread implementation here.
5489 1999-08-19  Ulrich Drepper  <drepper@cygnus.com>
5491         * pthread.c (__pthread_reset_main_thread): Reset signal handlers
5492         for the signals we used in the thread implementation [PR libc/1234].
5494         * Versions: Export __pthread_kill_other_threads_np from libpthread
5495         for GLIBC_2.1.2.
5497         * signals.c: Pass sigcontext through wrapper to the user function.
5499 1999-08-01  Ulrich Drepper  <drepper@cygnus.com>
5501         * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
5502         __libc_internal_tsd_set.
5504 1999-07-29  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5506         * manager.c: Remove inclusion of <linux/tasks.h> since it's not
5507         needed anymore.
5509 1999-07-16  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5511         * internals.h: Align _pthread_descr_struct to 32 bytes.
5512         Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
5513         libc/1206.
5515 1999-07-09  Ulrich Drepper  <drepper@cygnus.com>
5517         * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
5518         swap function.
5520 1999-07-09  Cristian Gafton  <gafton@redhat.com>
5522         * Makefile (libpthread-routines): Add oldsemaphore routine.
5523         * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
5524         sem_trywait, and sem_wait to GLIBC_2.1.
5525         * oldsemaphore.c: New file.
5526         * semaphore.c: Add default_symbol_versions for the changed functions.
5527         (__new_sem_init): Rename from sem_init.
5528         (__new_sem_post): Rename from sem_post.
5529         (__new_sem_wait): Rename from sem_wait.
5530         (__new_sem_trywait): Rename from sem_trywait.
5531         (__new_sem_getvalue): Rename from sem_getvalue.
5532         (__new_sem_destroy): Rename from sem_destroy.
5534 1999-06-23  Robey Pointer  <robey@netscape.com>
5536         * internals.h: Added p_nextlock entry to separate queueing for a
5537         lock from queueing for a CV (sometimes a thread queues on a lock
5538         to serialize removing itself from a CV queue).
5539         * pthread.c: Added p_nextlock to initializers.
5540         * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
5542 1999-07-09  Ulrich Drepper  <drepper@cygnus.com>
5544         * manager.c (pthread_handle_create): Free mmap region after stack
5545         if clone failed.  Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
5547 1999-05-23  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5549         * man/pthread_cond_init.man: Correct example.
5550         Reported by Tomas Berndtsson <tomas@nocrew.org>.
5552         * linuxthreads.texi (Condition Variables): Likewise.
5554 1999-05-18  Jakub Jelinek  <jj@ultra.linux.cz>
5556         * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
5557         casx not cas, also successful casx returns the old value in rd
5558         and not the new value.
5560 1999-05-16  Xavier Leroy  <Xavier.Leroy@inria.fr>
5562         * manager.c: If pthread_create() is given a NULL attribute
5563         and the thread manager runs with a realtime policy, set the
5564         scheduling policy of the newly created thread back to SCHED_OTHER.
5565         * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
5566         initialize the schedpolicy field of new_thread->p_start_args
5567         to that of the calling thread.
5569 1999-04-29  Ulrich Drepper  <drepper@cygnus.com>
5571         * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
5572         instruction does not allow memory element to use offset.
5574 1999-04-28  Ulrich Drepper  <drepper@cygnus.com>
5576         * manager.c (pthread_allocate_stack): Optimize initialization of new
5577         thread descriptor.
5579         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
5580         Don't use initializer since it is all zeroes.
5581         (__libc_once_define): Likewise.
5583 1999-04-16  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5585         * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
5586         doesn't exist anymore.
5587         * sysdeps/i386/Implies: Likewise.
5588         * sysdeps/m68k/Implies: Likewise.
5589         * sysdeps/mips/Implies: Likewise.
5590         * sysdeps/powerpc/Implies: Likewise.
5591         * sysdeps/sparc/sparc32/Implies: Likewise.
5592         * sysdeps/sparc/sparc64/Implies: Likewise.
5594 1999-04-15  Ulrich Drepper  <drepper@cygnus.com>
5596         * sysdeps/alpha/bits/semaphore.h: Removed.
5597         * sysdeps/powerpc/bits/semaphore.h: Removed.
5598         * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
5599         * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
5600         * Makefile (headers): Remove bits/semaphore.h.
5602         * semaphore.h: Define _pthread_descr if necessary.
5603         Don't include limits.h.  Define SEM_VALUE_MAX directly.
5604         Define SEM_FAILED.
5605         (sem_t): Protect element names with leading __.
5606         Add declarations for sem_close, sem_open, and sem_unlink.
5607         * semaphore.c: Adjust all functions for new element names.
5608         Define sem_close, sem_open, and sem_unlink.
5609         * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
5610         GLIBC_2.1.1.
5611         * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
5612         necessary.
5614 1999-03-16  H.J. Lu  <hjl@gnu.org>
5616         * specific.c (pthread_key_delete): Check th->p_terminated to see
5617         if the thread is running.
5619         * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
5620         Added to GLIBC_2.0 for libc.so.
5622 1999-02-12  H.J. Lu  <hjl@gnu.org>
5624         * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
5625         __libc_allocate_rtsig): Added to GLIBC_2.1.
5627         * internals.h (DEFAULT_SIG_RESTART): Removed.
5628         (DEFAULT_SIG_CANCEL): Removed.
5630         * pthread.c (init_rtsigs, __libc_current_sigrtmin,
5631         __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
5632         (__pthread_sig_restart, __pthread_sig_cancel,
5633         __pthread_sig_debug): Initialized.
5634         (pthread_initialize): Call init_rtsigs () to initialize
5635         real-time signals.
5637 1999-02-03  H.J. Lu  <hjl@gnu.org>
5639         * manager.c (__pthread_manager): Do block __pthread_sig_debug.
5640         Don't restart the thread which sent REQ_DEBUG.
5641         (pthread_start_thread): Check if __pthread_sig_debug > 0
5642         before debugging.
5644         * pthread.c (__pthread_initialize_manager): Suspend ourself
5645         after sending __pthread_sig_debug to gdb instead of
5646         __pthread_sig_cancel.
5648 1999-01-24  H.J. Lu  <hjl@gnu.org>
5650         * manager.c (__pthread_manager): Delete __pthread_sig_debug
5651         from mask if __pthread_sig_debug > 0.
5652         (pthread_handle_create): Increment __pthread_handles_num.
5654         * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
5655         * pthread.c (__pthread_initialize_manager): Likewise.
5657         * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
5658         instead of __libc_allocate_rtsig (2).
5659         (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
5660         instead of __pthread_sig_cancel.
5661         (pthread_handle_sigdebug): Fix comments.
5663 1999-01-21  Ulrich Drepper  <drepper@cygnus.com>
5665         * manager.c (pthread_allocate_stack): Set
5666         __pthread_nonstandard_stacks if user-specified stack is used.
5668 1999-01-16  Ulrich Drepper  <drepper@cygnus.com>
5670         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
5671         _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
5673 1999-01-07  Xavier Leroy  <Xavier.Leroy@inria.fr>
5675         * pthread.c: Use a third signal __pthread_sig_debug distinct
5676         from __pthread_sig_cancel to notify gdb when a thread is
5677         created
5678         * manager.c: Likewise.
5679         * internals.h: Likewise.
5680         * signals.c: The implementation of sigwait(s) assumed that
5681         all signals in s have signal handlers already attached.
5682         This is not required by the standard, so make it work
5683         also if some of the signals have no handlers.
5685 1999-01-05  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
5687         * linuxthreads.texi: Remove pointers from first @node.  Move old
5688         @node spec inside comment.
5690 1998-12-31  Ulrich Drepper  <drepper@cygnus.com>
5692         * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
5693         _IO_lock_unlock.
5695 1998-12-29  Ulrich Drepper  <drepper@cygnus.com>
5697         * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
5698         lock.  Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
5700 1998-12-21  Ulrich Drepper  <drepper@cygnus.com>
5702         * manager.c: Threads now send __pthread_sig_cancel on termination.
5703         Change clone call and signal masks.
5704         * thread.c (pthread_handle_sigrestart): Remove special code for
5705         manager.
5706         (pthread_handle_sigcancel): In manager thread call
5707         __pthread_manager_sighandler.
5708         * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
5709         * sysdeps/i386/i686/pt-machine.h: Likewise.
5710         Patches by Xavier Leroy.
5712 1998-12-14  Ulrich Drepper  <drepper@cygnus.com>
5714         * spinlock.c (__pthread_unlock): Don't crash if called for an
5715         untaken mutex.  Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
5717         * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
5718         overall runtime.
5720 1998-12-13  Ulrich Drepper  <drepper@cygnus.com>
5722         * Examples/ex3.c: Wait until all threads are started before
5723         searching for the number to avoid race condition on very fast
5724         systems.
5726 1998-12-08  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5728         * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
5729         declaration since it's not needed.
5731         * sysdeps/pthread/pthread.h: Move internal functions to ...
5732         * internals.h: ...here.
5734 1998-12-02  H.J. Lu  <hjl@gnu.org>
5736         * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
5737         SIGRTMIN is defined.
5738         (__pthread_sig_cancel): Likewise.
5740 1998-12-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5742         * wrapsyscall.c: Include <sys/mman.h> for msync,
5743         <stdlib.h> for system and <termios.h> for tcdrain prototype.
5744         Correct msync declaration.
5746 1998-11-29  Roland McGrath  <roland@baalperazim.frob.com>
5748         * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
5749         __libc_tsd_set): New macros for new interface.
5750         * no-tsd.c: New file, provide uninitialized defns of
5751         __libc_internal_tsd_get and __libc_internal_tsd_set.
5752         * Makefile (routines): Add no-tsd.
5754 1998-10-12  Roland McGrath  <roland@baalperazim.frob.com>
5756         * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
5757         * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
5758         __libc_internal_tsd_set): Move decls to ...
5759         * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
5760         declarations.
5762         * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
5763         __libc_internal_tsd_set): Make these pointers to functions, not
5764         functions; remove #pragma weak decls for them.
5765         * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
5766         Define static functions and initialized pointers to them.
5768 1998-11-18  Ulrich Drepper  <drepper@cygnus.com>
5770         * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
5771         (CFLAGS-specific.c): Likewise.
5772         (CFLAGS-pthread.c): Likewise.
5773         (CFLAGS-ptfork.c): Likewise.
5774         (CFLAGS-cancel.c): Likewise.
5775         * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
5776         as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
5778         * mutex.c (pthread_mutex_init): Define as strong symbol.
5779         (pthread_mutex_destroy): Likewise.
5780         (pthread_mutex_trylock): Likewise.
5781         (pthread_mutex_lock): Likewise.
5782         (pthread_mutex_unlock): Likewise.
5783         (pthread_mutexattr_init): Likewise.
5784         (pthread_mutexattr_destroy): Likewise.
5785         (pthread_once): Likewise.
5786         * ptfork.c (pthread_atfork): Likewise.
5787         * specific.c (pthread_key_create): Likewise.
5788         (pthread_setspecific): Likewise.
5789         (pthread_getspecific): Likewise.
5791 1998-11-15  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
5793         * linuxthreads.texi: Fix punctuation after xref.
5795 1998-11-10  H.J. Lu  <hjl@gnu.org>
5797         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
5798         if it is defined in <linux/limits.h>.
5800 1998-10-29 14:28  Ulrich Drepper  <drepper@cygnus.com>
5802         * spinlock.h (__pthread_trylock): Define inline.
5803         (__pthread_lock): Add extra parameter to declaration.  Declare
5804         using internal_function.
5805         (__pthread_unlock): Declare using internal_function.
5806         * spinlock.c (__pthread_lock): Add new parameter.  Use it instead
5807         of local variable self.  Avoid recomputing self.  Define using
5808         internal_function.
5809         (__pthread_trylock): Remove.
5810         (__pthread_unlock): Define using internal_function.
5811         * cancel.c: Adjust for __pthread_lock interface change.  Use already
5812         computed self value is possible.
5813         * condvar.c: Likewise.
5814         * join.c: Likewise.
5815         * manager.c: Likewise.
5816         * mutex.c: Likewise.
5817         * pthread.c: Likewise.
5818         * rwlock.c: Likewise.
5819         * semaphore.c: Likewise.
5820         * signals.c: Likewise.
5822 1998-10-27 13:46  Ulrich Drepper  <drepper@cygnus.com>
5824         * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
5825         __ to field names of the struct.
5826         * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
5827         Likewise.
5828         (pthread_attr_t): Likewise.
5829         (pthread_cond_t): Likewise.
5830         (pthread_condattr_t): Likewise.
5831         (pthread_mutex_t): Likewise.
5832         (pthread_mutexattr_t): Likewise.
5833         (pthread_rwlock_t): Likewise.
5834         (pthread_rwlockattr_t): Likewise.
5835         * attr.c: Adjust for pthread.h and pthreadtypes.h change.
5836         * cancel.c: Likewise.
5837         * condvar.c: Likewise.
5838         * manager.c: Likewise.
5839         * mutex.c: Likewise.
5840         * pthread.c: Likewise.
5841         * ptlongjmp.c: Likewise.
5842         * rwlock.c: Likewise.
5843         * spinlock.c: Likewise.
5845 1998-10-09  Ulrich Drepper  <drepper@cygnus.com>
5847         * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
5848         also with PT_EI.
5850         * sysdeps/i386/i686/pt-machine.h: Remove unused inline
5851         definitions.
5853         * Makefile (libpthread-routines): Add pt-machine.
5854         * pt-machine.c: New file.
5855         * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
5856         yet defined.  Use PT_EI in extern inline definitions.
5857         * sysdeps/arm/pt-machine.h: Likewise.
5858         * sysdeps/i386/pt-machine.h: Likewise.
5859         * sysdeps/i386/i686/pt-machine.h: Likewise.
5860         * sysdeps/m68k/pt-machine.h: Likewise.
5861         * sysdeps/mips/pt-machine.h: Likewise.
5862         * sysdeps/powerpc/pt-machine.h: Likewise.
5863         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
5864         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
5866 1998-10-02  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5868         * semaphore.h: Include <sys/types.h> so that _pthread_descr
5869         is declared.
5871 1998-09-15  David S. Miller  <davem@pierdol.cobaltmicro.com>
5873         * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
5874         argument.
5875         * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
5877 1998-09-12 14:24 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
5879         * sysdeps/unix/sysv/linux/bits/sigthread.h: Add multiple inclusion
5880         guard.
5882 1998-09-02 11:08  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
5884         * signals.c (sigaction): Check that sig is less than NSIG to avoid
5885         array index overflow.
5887 1998-09-06 10:56  Ulrich Drepper  <drepper@cygnus.com>
5889         * sysdeps/pthread/semaphore.h: New file.
5891 1998-09-06 09:08  Ulrich Drepper  <drepper@cygnus.com>
5893         * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
5894         _LIBC_TSD_KEY_DL_ERROR.
5896 1998-08-31  Ulrich Drepper  <drepper@cygnus.com>
5898         * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
5899         * sysdeps/i386/pt-machine.h: Likewise.
5900         Suggested by Roland McGrath.
5902 1998-08-28 13:58  Ulrich Drepper  <drepper@cygnus.com>
5904         * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
5905         access thread data with non-constant offsets.
5906         * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
5907         necessary.
5909         * sysdeps/i386/useldt.h: Fix typo.  Add THREAD_GETMEM_NC and
5910         THREAD_SETMEM_NC definitions.
5912         * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
5913         THREAD_SETMEM_NC.
5914         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
5916 1998-08-26 15:46  Ulrich Drepper  <drepper@cygnus.com>
5918         * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
5919         not already defined.
5920         (struct _pthread_descr_struct): Add p_self and p_nr field.
5921         * manager.c (__pthread_handles): Define second element to point
5922         to manager thread.
5923         (__pthread_handles_num): Initialize to 2.
5924         (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
5925         (pthread_start_thread): Likewise.
5926         (pthread_handle_create): Start search for free slot at entry 2.
5927         Initialize new fields p_self and p_nr.
5928         Call __clone with CLONE_PTRACE if available.
5929         (pthread_free): Call FREE_THREAD_SELF if available.
5930         * pthread.c (__pthread_initial_thread): Initialize new fields.
5931         (__pthread_manager_thread): Likewise.
5932         (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
5934         * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
5935         elements of the thread descriptor.
5936         * condvar.c: Likewise.
5937         * errno.c: Likewise.
5938         * join.c: Likewise.
5939         * manager.c: Likewise.
5940         * pthread.c: Likewise.
5941         * ptlongjmp.c: Likewise.
5942         * semaphore.c: Likewise.
5943         * signals.c: Likewise.
5944         * specific.c: Likewise.
5945         * spinlock.c: Likewise.
5947         * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
5949         * sysdeps/i386/useldt.h: New file.
5950         * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
5952         * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
5953         THREAD_SETMEM using __thread_self.
5954         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
5956 1998-08-24  Geoff Keating  <geoffk@ozemail.com.au>
5958         * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
5959         turned out that we didn't need to queue after all.
5961 1998-08-22  Geoff Keating  <geoffk@ozemail.com.au>
5963         * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
5964         and wastes space; correct types.
5966 1998-08-08 11:18  H.J. Lu  <hjl@gnu.org>
5968         * signals.c (sigaction): Handle NULL argument.
5970 1998-08-04  Ulrich Drepper  <drepper@cygnus.com>
5972         * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
5973         of sigset_t.
5975 1998-08-02  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
5977         * Makefile (linuxthreads-version): Extract correct number from
5978         Banner.
5980 1998-07-29  Xavier Leroy  <Xavier.Leroy@inria.fr>
5982         * Banner: Bump version number to 0.8
5983         * FAQ.html: Many updates, in particular w.r.t. debugging.
5984         * manager.c: Support for non-default stacksize for
5985         LinuxThreads-allocated stacks;
5986         don't use guard pages for stacks with default size, rely on
5987         rlimit(RLIMIT_STACK) instead (it's cheaper).
5988         * attr.c: Likewise.
5989         * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
5990         everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
5991         * condvar.c: Likewise.
5992         * internals.h: Likewise.
5993         * restart.h: Likewise.
5994         * signals.c: Likewise.
5995         * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
5997 1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
5999         * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
6000         __pthread_mutexattr_[sg]ettype.  Add more weak aliases.
6001         * Versions: Put __pthread_mutexattr_settype under version
6002         GLIBC_2.0.  Don't export __pthread_mutexattr_setkind_np and
6003         __pthread_mutexattr_gettype.
6005 1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6007         * sysdeps/pthread/bits/libc-lock.h: Make
6008         __pthread_mutexattr_settype weak.  Don't make
6009         __pthread_mutexattr_setkind_np weak.
6011 1998-07-16 10:52  Ulrich Drepper  <drepper@cygnus.com>
6013         * manager.c (pthread_handle_create): Check whether sched_setscheduler
6014         call can succeed here.
6016         * mutex.c: Define __pthread_mutexattr_settype and make
6017         __pthread_mutexattr_setkind_np an alias.
6018         Likewise for __pthread_mutexattr_gettype.
6020 1998-07-15 11:00 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
6022         * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
6023         is root.
6025 1998-07-14 19:38  Ulrich Drepper  <drepper@cygnus.com>
6027         * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
6029 1998-07-11  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
6031         * Examples/ex6.c: Include <unistd.h> for usleep.
6033 1998-06-13 11:04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6035         * Examples/ex4.c (main): Use exit, not pthread_exit.
6037 1998-07-09 13:39  Ulrich Drepper  <drepper@cygnus.com>
6039         * Versions: Add __pthread_mutexattr_gettype and
6040         __pthread_mutexattr_settype.
6041         * lockfile.c: Use __pthread_mutexattr_settype instead of
6042         __pthread_mutexattr_setkind_np.
6043         * mutex.c: Define __pthread_mutexattr_gettype and
6044         __pthread_mutexattr_settype.
6045         * weak.c: Likewise.
6046         * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
6047         __pthread_mutexattr_settype.
6048         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
6049         Use __pthread_mutexattr_settype.
6051 1998-07-08 22:26  Ulrich Drepper  <drepper@cygnus.com>
6053         * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
6054         * mutex.c: Define weak alias pthread_mutexattr_gettype and
6055         pthread_mutexattr_settype.
6056         * sysdeps/pthread/pthread.h: Declare these functions.
6057         Move pthread_sigmask and pthread_kill declaration in separate header.
6058         * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
6060 1998-07-07 15:20  Ulrich Drepper  <drepper@cygnus.com>
6062         * Makefile: Add rules to compile and run tests.
6063         * Examples/ex1.c: Little changes to fix warnings.
6064         * Examples/ex2.c: Likewise.
6065         * Examples/ex3.c: Likewise.
6066         * Examples/ex4.c: Likewise.
6067         * Examples/ex5.c: Likewise.
6068         * Examples/ex6.c: New file.
6070 1998-07-05 11:54  Ulrich Drepper  <drepper@cygnus.com>
6072         * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
6074 1998-07-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
6076         * attr.c: Include <string.h>.
6078 1998-06-30 11:47  Ulrich Drepper  <drepper@cygnus.com>
6080         * attr.c: Include errno.h.  Use memcpy to copy sched_param.
6081         * internals.h: Include limits.h.
6082         * manager.c: Use memcpy to copy sched_param.
6083         * ptfork.c: Include errno.h.
6084         * pthread.c: Likewise.
6085         * semaphore.c: Likewise.
6086         * specific.c: Likewise.
6087         * spinlock.h: Likewise.
6088         * sysdeps/pthread/pthread.h: Include only allowed headers.  Move
6089         type definition to ...
6090         * sysdeps/pthread/bits/pthreadtypes.h: ...here.  New file.
6092 1998-06-29 12:34  Ulrich Drepper  <drepper@cygnus.com>
6094         * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
6096         * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
6097         as macros as demanded in POSIX.1, Annex C.
6099 1998-06-29 12:29  Ulrich Drepper  <drepper@cygnus.com>
6101         * internals.h (struct pthread_request): For free use pthread_t
6102         instead of pthread_descr.
6103         * join.c (pthread_join): Pass thread_id, not th to manager.
6104         (pthread_detach): Likewise.
6105         * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
6106         (pthread_exited): Remove detached queue code.
6107         (pthread_handle_free): Expect thread ID parameter and use it to
6108         validate the thread decsriptor.  Don't use detached queue.
6109         Patches by Xavier Leroy.
6111 1998-06-27  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6113         * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
6114         _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
6115         __pthread_atfork, __pthread_key_create, __pthread_once.
6116         * internals.h: Doc fix.
6117         * pthread.c (__pthread_initialize): Define again.
6119 1998-06-26  Ulrich Drepper  <drepper@cygnus.com>
6121         * manager.c (pthread_exited): If thread is not detached put it on
6122         special list.
6123         (pthread_handle_free): If thread is not on list with living threads
6124         search on list with detached threads.
6126         * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
6127         for new definition of pthread_rwlock_t.
6129         * spinlock.c: Correct test whether to compile
6130         __pthread_compare_and_swap or not.
6132 1998-06-25 19:27  Ulrich Drepper  <drepper@cygnus.com>
6134         * attr.c: Finish user stack support.  Change locking code to be safe
6135         in situations with different priorities.
6136         * cancel.c: Likewise.
6137         * condvar.c: Likewise.
6138         * internals.h: Likewise.
6139         * join.c: Likewise.
6140         * manager.c: Likewise.
6141         * mutex.c: Likewise.
6142         * pthread.c: Likewise.
6143         * ptlongjmp.c: Likewise.
6144         * queue.h: Likewise.
6145         * rwlock.c: Likewise.
6146         * semaphore.c: Likewise.
6147         * semaphore.h: Likewise.
6148         * signals.c: Likewise.
6149         * spinlock.c: Likewise.
6150         * spinlock.h: Likewise.
6151         * sysdeps/pthread/pthread.h: Likewise.
6152         Patches by Xavier Leroy.
6154         * sysdeps/i386/i686/pt-machine.h: New file.
6156 1998-06-25  Ulrich Drepper  <drepper@cygnus.com>
6158         * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
6159         [sg]et_stackaddr prototypes always available.
6161         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6162         _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
6164 1998-06-24  Ulrich Drepper  <drepper@cygnus.com>
6166         * manager.c (pthread_free): Undo patch from 980430.
6167         Reported by David Wragg <dpw@doc.ic.ac.uk>.
6169 1998-06-09 15:07  Ulrich Drepper  <drepper@cygnus.com>
6171         * manager.c: Define __pthread_manager_adjust_prio and use it to
6172         increase priority when needed.
6173         * internals.h: Add prototype for __pthread_manager_adjust_prio.
6174         * mutex.c: Optimize mutexes to wake up only one thread.
6175         * pthread.c: Move PID of manager for global variable in structure
6176         element.
6177         Patches by Xavier Leroy.
6179 1998-06-07 13:47  Ulrich Drepper  <drepper@cygnus.com>
6181         * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
6183 1998-06-03  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
6185         * attr.c: Correct typo.
6187 1998-05-01  Ulrich Drepper  <drepper@cygnus.com>
6189         * manager.c (pthread_free): Unmap guard before the stack.
6190         Patch by Matthias Urlichs.
6192 1998-04-30  Ulrich Drepper  <drepper@cygnus.com>
6194         * manager.c (pthread_free): Detect already free child.
6195         Patch by Xavier Leroy, reported by Matthias Urlichs.
6197 1998-04-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6199         * Makefile (linuxthreads-version): Renamed back from
6200         libpthread-version.
6202 1998-04-21  Ulrich Drepper  <drepper@cygnus.com>
6204         * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
6205         __libc_longjmp.
6207 1998-04-20 14:55  Ulrich Drepper  <drepper@cygnus.com>
6209         * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
6210         * internals.h: Add definitions for new spinlock implementation.
6211         * ptlongjmp.c: New file.
6212         * spinlock.c: New file.
6213         * spinlock.h (acquire): Don't reschedule using __sched_yield, use
6214         new function __pthread_acquire to prevent deadlocks with thread
6215         with different priorities.
6216         Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
6218 1998-03-16  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6220         * manager.c (__pthread_manager): Reduce first argument to select
6221         to include just the needed file descriptor.
6223 1998-03-17 00:06  Ulrich Drepper  <drepper@cygnus.com>
6225         * manager.c: Fix last patch which caused core dumps.
6227         * pthread.c: Correctly handle missing SIGRTMIN.
6229 1998-03-15  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6231         * libpthread.map: Add __libc_internal_tsd_get and
6232         __libc_internal_tsd_set.  Add missing cancelable functions. Export
6233         libc internal versions of the cancelable functions.
6235 1998-03-13 16:51  Ulrich Drepper  <drepper@cygnus.com>
6237         * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
6239 1998-03-13 00:46  Ulrich Drepper  <drepper@cygnus.com>
6241         * attr.c: Implement pthread_attr_[gs]etguardsize,
6242         pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
6243         Change pthread_attr_init to have two interfaces.
6244         * internals.h (struct _pthread_descr_struct): Add new fields for
6245         above functions.
6246         * libpthread.map: Add names in GLIBC_2.1 section.
6247         * manager.c (pthread_handle_create): Implement guardsize and
6248         user stack.
6249         (pthread_free): Likewise.
6250         * pthread.c (pthread_create): Add new interface for changed
6251         pthread_attr_t.
6252         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
6253         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
6254         PTHREAD_STACK_MIN.
6256 1998-03-11 00:42  Wolfram Gloger  <wmglo@dent.med.uni-muenchen.de>
6258         * manager.c: Enable resetting of the thread scheduling policy
6259         to SCHED_OTHER when the parent thread has a different one.
6261 1998-02-01 13:51  Ulrich Drepper  <drepper@cygnus.com>
6263         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6264         _POSIX_ASYNCHRONOUS_IO.
6266         * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
6267         mutexes.
6268         * mutex.c: Implement new mutex types.
6270         * internals.h: Include <signal.h>.
6272         * libpthread.map: Add __erno_location and __h_errno_location.
6274         * errno.c: Return pointer to variable actually in use.  This might
6275         not be the one in the thread structure.
6276         * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
6277         and p_h_errnop.
6278         * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
6279         of manager thread structure.
6280         (pthread_handle_create): Set p_errnop and p_h_errnop members for new
6281         thread.
6282         * pthread.c: Adapt initializer for thread structures.
6283         (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
6284         (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
6285         current thread to global variables.
6287 1998-01-31 17:27  Ulrich Drepper  <drepper@cygnus.com>
6289         * rwlock.c: New file.
6290         * Makefile (libpthread-routines): Add rwlock.
6291         * sysdeps/pthread/pthread.h: Define data structures and declare
6292         functions.
6293         * libpthread.map: Add new functions.
6295 1997-12-18 13:50  Philip Blundell  <pb@nexus.co.uk>
6297         * sysdeps/arm/pt-machine.h: New file; add ARM support.
6298         * sysdeps/arm/Implies: likewise.
6299         * README: Document it.
6301 1997-12-13  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6303         * signals.c: Remove unneeded initializer for sigwaited, saving a
6304         warning.
6306 1997-04-11 01:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6308         * semaphore.c (sem_init): Set sem_spinlock only if available.
6310 1997-12-04 01:48  Ulrich Drepper  <drepper@cygnus.com>
6312         * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
6313         * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
6315         * Makefile: Update from LinuxThreads 0.7.
6316         * internals.h. Likewise.
6317         * manager.c: Likewise.
6318         * mutex.c: Likewise.
6319         * pthread.c: Likewise.
6320         * signals.c: Likewise.
6321         * specific.c: Likewise.
6322         * Examples/ex3.c: Likewise.
6324 1997-11-20 18:13  Ulrich Drepper  <drepper@cygnus.com>
6326         * pthread.c (__pthread_reset_main_thread): Close pipe only if still
6327         open.
6329 1997-10-29 05:38  Ulrich Drepper  <drepper@cygnus.com>
6331         * wrapsyscall.c: Add socket functions which are also cancelation
6332         points.
6334 1997-10-19 21:40  Wolfram Gloger  <wg@wolfram.dent.med.uni-muenchen.de>
6336         * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
6337         New functions for fast thread specific data within libc.
6339         * internals.h: Add new array p_libc_specific to struct
6340         _pthread_descr_struct.
6342         * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
6344 1997-10-13 05:39  Ulrich Drepper  <drepper@cygnus.com>
6346         * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
6347         Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
6349 1997-08-29 03:05  Ulrich Drepper  <drepper@cygnus.com>
6351         * internals.h (struct _pthread_descr_struct): Add definitions for
6352         two-level specific key handling.
6353         * manager.c (pthread_handle_create): Initialize specific memory array.
6354         * specific.c: Implement two-level key handling.
6355         * weaks.c: Don't provide dummy key handling.
6356         * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
6357         Add definition of __libc_key_t.
6358         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
6359         as 1024.
6360         Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
6361         PTHREAD_DESTRUCTOR_ITERATIONS.
6363         * manager.c (pthread_handle_create): Compare mmap result with
6364         MAP_FAILED.
6366         * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
6367         * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
6369 1997-08-22 19:04  Richard Henderson  <rth@cygnus.com>
6371         sysdeps/sparc -> sysdeps/sparc/sparc32
6372         sysdeps/sparc64 -> sysdeps/sparc/sparc64
6374         * internals.h: Change definition of THREAD_SELF to be an expression,
6375         not a statement that did a return.
6376         * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
6377         * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
6378         Follow Solaris and use a "system reserved" register (%g6) to hold
6379         the thread descriptor.
6380         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
6382 1997-08-03 00:09  Ulrich Drepper  <drepper@cygnus.com>
6384         * mutex.c: Correct pthread_once.  Patch by Xavier Leroy.
6385         * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
6386         * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
6388         * semaphore.c: Include spinlock.h only when needed.
6390         * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
6391         keys for entries not in use.
6393         * weaks.c: Implement key handling functions for real.
6395 1997-06-29  01:04  Richard Henderson  <richard@gnu.ai.mit.edu>
6397         Initial sparc64-linux support:
6398         * sysdeps/sparc64/Implies: New file.
6399         * sysdeps/sparc64/pt-machine.h: Likewise.
6401 1997-06-29 00:48  Ulrich Drepper  <drepper@cygnus.com>
6403         * semaphore.c: Include spinlock.h at correct place.
6404         Patch by HJ Lu.
6406 1997-06-13 10:06  Richard Henderson  <rth@tamu.edu>
6408         The Great Bit File Move:
6409         * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
6410         * sysdeps/powerpc/semaphorebits.h: Likewise.
6411         * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
6412         * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
6413         * sysdeps/pthread/libc-lock.h: -> bits/
6414         * sysdeps/pthread/stdio-lock.h: Likewise.
6415         * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
6416         * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
6417         * semaphore.h: Likewise.
6418         * sysdeps/pthread/pthread.h: Likewise.
6420         * lockfile.c: <foo.h> -> <bits/foo.h>.
6421         * semaphore.h: Likewise.
6423         * Makefile: (headers): foo.h -> bits/foo.h.
6424         * sysdeps/pthread/Makefile: Likewise.
6426 1997-04-11 01:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6428         * semaphore.c (sem_init): Set sem_spinlock only if available.
6430         * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
6431         asm constraints.
6433 1997-04-09 03:00  Ulrich Drepper  <drepper@cygnus.com>
6435         Update from LinuxThreads 0.6.
6437         * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
6438         and __sched_get_priority_min instead of names without `__'.
6440         * manager.c: Rewrite large parts to implement opaque pthread_t.
6442         * cancel.c: Adapt for opaque pthread_t type.
6443         * condvar.c: Likewise.
6444         * errno.c: Likewise.
6445         * join.c: Likewise.
6446         * mutex.c: Likewise.
6447         * pthread.c: Likewise.
6448         * signals.c: Likewise.
6449         * specific.c: Likewise.
6450         * restart.h: Likewise.
6451         * queue.h: Likewise.
6452         * Examples/ex3.c: Likewise.
6453         * Examples/ex4.c: Likewise.
6454         * sysdeps/pthread/pthread.h: Likewise.
6456         * pthread.c: Accumulate time for all threads in thread manager.
6458         * semaphore.c: Implement fallback implementation for architectures
6459         sometimes missing compare-exchange operations.
6461         * cancel.c (pthread_cancel): Validate handle argument.
6462         * join.c (pthread_join): Likewise.
6463         (pthread_detach): Likewise.
6464         * signals.c (pthread_kill): Likewise.
6466         * spinlock.h (acquire): Use __sched_yield not sched_yield.
6468         * queue.h (enqueue): Enqueue thread according to priority.
6470         * internals.c (struct pthread_start_args): New struct for passing
6471         args to cloning function.
6472         (struct _pthread): Rename to _pthread_descr_struct and adapt for
6473         opaque pthread_t.
6475         * Examples/Makefile (clean): Pass -f option to rm.
6477         * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
6478         and define TEST_FOR_COMPARE_AND_SWAP.
6479         * sysdeps/i386/i486/pt-machine.h: Removed.
6481         * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
6482         to 1024.
6484 1997-04-04 16:38  Ulrich Drepper  <drepper@cygnus.com>
6486         * restart.h (suspend): Clear p_signal before suspending.
6487         (suspend_with_cancellation): Likewise.
6488         Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
6490         * weaks.c: Make __pthread_key_create return 1.
6491         * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
6492         __libc_getspecific, __libc_setspecific, and __libc_key_t.
6493         * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
6494         using libio.
6496 1997-03-19 15:13  Miguel de Icaza  <miguel@nuclecu.unam.mx>
6498         * sysdeps/sparc/pt-machine (RELEASE): Fix.
6500 1997-03-01 07:55  Geoff Keating  <geoffk@ozemail.com.au>
6502         * sysdeps/powerpc/Implies: Added.
6503         * sysdeps/powerpc/pt-machine.h: Added.
6504         * sysdeps/powerpc/semaphorebits.h: Added.
6506 1997-01-22 01:22  Ulrich Drepper  <drepper@cygnus.com>
6508         * pthread.c (__pthread_initial_thread): Correct
6509         initializer.
6510         (__pthread_manager_thread): Likewise.
6511         Reported by Andreas Jaeger.
6513 1997-01-18 22:15  Richard Henderson  <rth@tamu.edu>
6515         Since sigset_t no longer fits in a register, we can't pass in the
6516         thread's initial mask so easily.  Take this opportunity to simplify
6517         the clone implementation by only accepting a single void* argument.
6519         * manager.c (__pthread_manager): Put thread vitals in the thread
6520         struct instead of as arguments through clone.
6521         (pthread_start_thread): Look for them there.
6522         * internals.h (struct _pthread): Add p_initial_fn,
6523         p_initial_fn_arg, p_initial_mask.  Fix __pthread_manager proto.
6524         * pthread.c (pthread_initialize_manager): Revise clone invocation.