Updated to fedora-glibc-20041213T2323
[glibc.git] / linuxthreads / ChangeLog
blob9577130e10d3353dbc099d89470d0aa0987768f7
1 2004-12-12  Ulrich Drepper  <drepper@redhat.com>
3         * internals.h: Include <stdbool.h> to match includes used in nptl.
5 2004-12-01  Jakub Jelinek  <jakub@redhat.coM.
7         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
8         _POSIX_THREAD_CPUTIME): Define to 0.
9         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
10         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
11         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
12         __timer_signal_thread_tclk): Remove.
13         (init_module): Remove their initialization.
14         (thread_cleanup): Remove their cleanup assertions.
15         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
16         __timer_signal_thread_tclk): Remove.
17         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
18         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
19         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
20         * tst-clock1.c (do_test): Check for availability of CPU clock.
22 2004-11-18  Daniel Jacobowitz  <dan@codesourcery.com>
24         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: Update RETINSTR use.
25         * sysdeps/unix/sysv/linux/arm/vfork.S: Likewise.
27 2004-12-02  Roland McGrath  <roland@redhat.com>
29         * Makefile (libpthread-nonshared): Variable removed.
30         ($(objpfx)libpthread_nonshared.a): Target removed.
31         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
32         These are now handled by generic magic from
33         libpthread-static-only-routines being set.
35 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
37         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
38         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
39         _POSIX_THREAD_PRIO_PROTECT): Define.
40         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
41         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
42         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
44 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
46         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
47         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
48         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
49         _POSIX_TYPED_MEMORY_OBJECTS): Define.
50         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
51         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
52         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
54 2004-11-05  Maciej W. Rozycki  <macro@mips.com>
56         * sysdeps/mips/pspinlock.c: Include <sgidefs.h>.  Use _ABIO32,
57         _ABIN32 and _ABI64 for ABI selection throughout.
58         * sysdeps/mips/pt-machine.h: Use _ABIO32, _ABIN32 and _ABI64 for
59         ABI selection throughout.
61 2004-10-18  Roland McGrath  <roland@redhat.com>
63         [BZ #406]
64         * Makefile (linuxthreads-CPPFLAGS): New variable;
65         adds -DIS_IN_linuxthreads=1.
66         * sysdeps/i386/tls.h: Protect "useldt.h" with
67         [!IS_IN_linuxthreads && !DO_MODIFY_LDT].
68         * sysdeps/i386/i686/pt-machine.h: Revert last change.
70 2004-10-14  Jakub Jelinek  <jakub@redhat.com>
72         * sysdeps/pthread/errno-loc.c: Don't undef #errno
73         if RTLD_PRIVATE_ERRNO.
75 2004-10-05  Dwayne Grant McConnell  <dgm69@us.ibm.com>
77         * pthread.c: Mask restart signal during cancel signal handler.
79 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
81         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
82         _POSIX_THREAD_CPUTIME): Define to 0.
84 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
86         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Set _POSIX_CPUTIME
87         and _POSIX_THREAD_CPUTIME to zero.
88         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
90         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
91         _POSIX_THREAD_PROCESS_SHARED and _POSIX_CLOCK_SELECTION as -1.
92         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
93         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
94         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
96 2004-09-25  Roland McGrath  <roland@redhat.com>
98         [BZ #406]
99         * sysdeps/i386/i686/pt-machine.h: Don't #include "../useldt.h" if
100         [_TLS_H], since sysdeps/i386/tls.h includes it after including us.
102 2004-09-24  Roland McGrath  <roland@redhat.com>
104         [BZ #406]
105         * sysdeps/i386/tls.h: Move #include "useldt.h" outside
106         of [__ASSUME_LDT_WORKS > 0] test.
107         Reported by Carlos Velasco <carlos.velasco@newipnet.com>.
109 2004-09-21  Roland McGrath  <roland@redhat.com>
111         * Versions: Add comment about linuxthreads' frozen ABI.
113 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
115         * Versions: Remove exports for pthread_set*id_np functions.
116         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
117         for now.
118         * Makefile: Don't build pthread_set*id code for now.
120 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
122         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
123         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
124         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
125         and pthread_setresuid_np.
126         * pthread_setgid_np.c: New file.
127         * pthread_setuid_np.c: New file.
128         * pthread_setegid_np.c: New file.
129         * pthread_seteuid_np.c: New file.
130         * pthread_setregid_np.c: New file.
131         * pthread_setreuid_np.c: New file.
132         * pthread_setresgid_np.c: New file.
133         * pthread_setresuid_np.c: New file.
134         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
135         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
136         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
137         and pthread_setresuid_np.
138         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
139         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
140         pthread_setregid, and pthread_setresgid.
142 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
144         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
145         for __USE_XOPEN2K.
146         * sysdeps/pthread/bits/pthreadtypes.h: Define rwlock types also
147         for __USE_XOPEN2K.  [BZ #320]
149 2004-09-04  Jakub Jelinek  <jakub@redhat.com>
151         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
153 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
155         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
156         the initialization function might throw.
158 2004-08-30  Roland McGrath  <roland@frob.com>
160         * Makefile (libpthread-abi-frozen): New variable.
162 2004-08-26  Roland McGrath  <roland@redhat.com>
164         * configure.in: New file.  If nptl add-on is also selected, barf if
165         explicit and elide ourselves if implicit.
166         * configure: Now generated.
168 2004-08-25  Richard Sandiford  <rsandifo@redhat.com>
170         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h (CENABLE, CDISABLE,
171         __local_multiple_threads): Fix definitions for IS_IN_librt.
172         * sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h: Likewise.
174 2004-08-22  Andreas Schwab  <schwab@suse.de>
176         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO) [IS_IN_librt]:
177         Save gp around CENABLE/CDISABLE calls.
179 2004-08-15  Roland McGrath  <roland@frob.com>
181         * pthread_atfork.c: Update copyright terms including special exception
182         for these trivial files, which are statically linked into executables
183         that use dynamic linking for the significant library code.
185 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
187         * libc-tsd.c: Move resolv.h include before the #if.
188         (__res_maybe_init): New function.  Add libc_hidden_def.
190 2004-08-02  Ulrich Drepper  <drepper@redhat.com>
192         * linuxthreads.texi (Cleanup Handlers): Fix typo.
193         Reported by Bjoern Engelmann <bjengelmann@gmx.de>.
195 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
197         [BZ #284]
198         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
199         instead of clockid_t.
201 2004-07-21  Roland McGrath  <roland@redhat.com>
203         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
205 2004-07-02  Roland McGrath  <roland@redhat.com>
207         * configure: Don't exit.
209 2004-07-20  Alexandre Oliva  <aoliva@redhat.com>
211         * sysdeps/mips/pt-machine.h: Use standard names for ABI macros,
212         include sgidefs.h.
213         * sysdeps/mips/atomicity.h: Likewise.
215 2004-07-19  Alexandre Oliva  <aoliva@redhat.com>
217         * sysdeps/unix/sysv/linux/mips/Makefile (CFLAGS-pt-initfini.s):
218         Remove redundant override that missed -g0.
220 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
222         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
223         (__local_multiple_threads): Define for librt.
224         (SINGLE_THREAD_P): Likewise.
226 2004-07-07  Jakub Jelinek  <jakub@redhat.com>
228         * sysdeps/pthread/getcpuclockid.c (pthread_getcpuclockid): Allow
229         using other thread's clock.
230         * ptclock_gettime.c (__pthread_clock_gettime): Likewise.
231         * ptclock_settime.c (__pthread_clock_settime): Likewise.
232         * internals.h (__pthread_clock_gettime, __pthread_clock_settime):
233         Remove prototypes.
234         Reported by Bernd Schmidt <bernds@redhat.com>.
235         * Makefile (librt-tests): Add tst-clock1.
236         * tst-clock1.c: New test.
238         * sysdeps/x86_64/Versions: New file.
239         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
240         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
242 2004-04-16  Andreas Schwab  <schwab@suse.de>
244         * sysdeps/ia64/tls.h (INIT_SYSINFO): Cast dl_sysinfo to void*.
246 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
248         * sysdeps/s390/pspinlock.c (__pthread_spin_lock,
249         __pthread_spin_trylock): Use constraint "m" instead of "0" for
250         futex.
251         * sysdeps/ia64/pt-machine.h (__compare_and_swap,
252         __compare_and_swap_with_release_semantic, testandset): Use
253         constraint "m" instead of "0" for futex.
255 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
257         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Fix
258         branch offset for a PLT entry.
259         (CDISABLE): Likewise.
261 2004-05-31  Andreas Jaeger  <aj@suse.de>
263         * sysdeps/unix/sysv/linux/mips/Makefile (CFLAGS-pt-initfini.s):
264         Set to -fno-unit-at-a-time.
265         Patch by Dan Kegel <dank@kegel.com>.
267 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
269         * tst-stack1.c: Don't include mcheck.h.
270         (do_test): Make sure user defined stacks aren't reused,
271         don't free them at the end.  [BZ #110]
273 2004-05-02  Jakub Jelinek  <jakub@redhat.com>
275         * manager.c: Include not-cancel.h.
276         (__pthread_manager): Use read_not_cancel instead of __libc_read.
277         (pthread_start_thread, __pthread_manager_sighandler): Use
278         write_not_cancel instead of __libc_write.
279         (pthread_reap_children): Use waitpid_not_cancel instead of
280         __libc_waitpid.
281         * pthread.c: Include not-cancel.h.
282         (__pthread_initialize_minimal, __pthread_create_2_1,
283         pthread_onexit_process, __pthread_message): Use
284         write_not_cancel instead of __libc_write.
285         (__pthread_initialize_manager): Likewise.  Use close_not_cancel
286         instead of __libc_close.
287         (__pthread_reset_main_thread): Use close_not_cancel instead of
288         __libc_close.
289         * join.c: Include not-cancel.h.
290         (__pthread_do_exit, pthread_join, pthread_detach): Use
291         write_not_cancel instead of __libc_write.
292         * semaphore.c: Include not-cancel.h.
293         (__new_sem_post): Use write_not_cancel instead of __libc_write.
294         * specific.c: Include not-cancel.h.
295         (pthread_key_delete): Use write_not_cancel instead of __libc_write.
297 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
299         * Versions (libc): Add __on_exit and __libc_sigaction.
301 2004-04-28  Jakub Jelinek  <jakub@redhat.com>
303         * semaphore.c (sem_timedwait): Return -1 and set errno instead of
304         returning error number [BZ #133].  Patch by <rmhaddad@yahoo.com>.
306 2004-04-22  SUGIOKA Toshinobu  <sugioka@itonet.co.jp>
308         * sysdeps/unix/sysv/linux/sh/vfork.S: Fix wrong function pointer
309         reference in PIC case.
311 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
313         * oldsemaphore.c (SEM_VALUE_MAX): Remove.
315 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
317         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Define
318         for librt.  Save the return value to a safe register.
319         (CDISABLE): Define for librt.  Set the function argument correctly.
321 2004-04-18  Jakub Jelinek  <jakub@redhat.com>
323         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
324         (PSEUDO_CANCEL): Define.
325         (PSEUDO): Use it.
326         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
327         CDISABLE): For librt, append @PLT.
329 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
331         * sysdeps/x86_64/tls.h [!__ASSEMBLER__]: Include tcb-offsets.h.
333         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
334         return it_value { 0, 0 }.
335         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
336         like SIGEV_SIGNAL.
337         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
338         assertion for SIGEV_NONE.
339         (thread_attr_compare): Compare all attributes, not just a partial
340         subset.
342         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
344 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
346         * semaphore.h (SEM_VALUE_MAX): Just use a plain number.
348 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
350         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix last patch.
352 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
354         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
356 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
358         * sysdeps/unix/sysv/linux/mq_notify.c: New file.
360         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE): Define
361         for librt.
362         (CDISABLE): Likewise.
364 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
366         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
367         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
368         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
369         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
370         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
371         Define.
372         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
373         (_POSIX_MESSAGE_PASSING): Define.
375 2004-04-10  Andreas Jaeger  <aj@suse.de>
377         * sysdeps/x86_64/pt-machine.h: Add used attribute to stack_pointer
378         to avoid warnings with GCC 3.5.
380 2004-04-09  Steven Munroe  <sjmunroe@us.ibm.com>
382         * sysdeps/powerpc/tls.h (TLS_INIT_TP): Eliminate lvalue cast from
383         __thread_self assignment.
384         (THREAD_DTV): Replace __thread_register with __thread_self.
385         (INIT_THREAD_SELF): Eliminate lvalue cast from __thread_self
386         assignment.
388 2004-04-08  Alexandre Oliva  <aoliva@redhat.com>
390         * signals.c (pthread_sigmask): Don't ever block or mask
391         __pthread_sig_debug.
393 2004-03-11  Steven Munroe  <sjmunroe@us.ibm.com>
395         * sysdeps/powerpc/tls.h: Remove __powerpc64__ conditional.
397 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
399         * sysdeps/ia64/pt-machine.h (BUSY_WAIT_NOP): Define.
400         * sysdeps/x86_64/pt-machine.h (BUSY_WAIT_NOP): Likewise.
402 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
404         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add HOST_NAME_MAX.
405         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
406         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
407         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
409 2004-03-08  Andreas Jaeger  <aj@suse.de>
411         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT_KERNEL_CHECK):
412         dl_osversion is readonly.
414 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
416         * sysdeps/i386/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
417         _rtlf_global_ro.
418         * sysdeps/ia64/tls.h (INIT_SYSINFO): Likewise.
420 2004-02-20  Steven Munroe  <sjmunroe@us.ibm.com>
422         * sysdeps/unix/sysv/linux/powerpc/ptlongjmp.c [SHARED]: Code only
423         valid for SHARED case.  Correct spelling of __vmx_longjmp.
425         * sysdeps/powerpc/pspinlock.c: Move from here.
426         * sysdeps/powerpc/powerpc32/pspinlock.c: To here.
427         * sysdeps/powerpc/powerpc64/pspinlock.c: New file.
428         * sysdeps/powerpc/powerpc64/pt-machine.h: Define __compare_and_swap32
429         and __compare_and_swap32_with_release_semantics.
431 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
433         * Makefile (generated): Remove tst-stack1.mtrace and tst-stack1-mem.
434         (tests): Remove $(objpfx)tst-stack1-mem.
435         (tst-stack1-ENV): Remove.
436         ($(objpfx)tst-stack1-mem): Remove.
438         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
439         (__syscall_error_handler2): Call CDISABLE.
440         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
441         (__syscall_error_handler2): Call CDISABLE.
443         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
445 2004-02-10  Steven Munroe  <sjmunroe@us.ibm.com>
447         * Makefile (libpthread-routines): Add ptcleanup.
448         * ptlongjmp.c: Removed.
449         * ptcleanup.c: Copied __pthread_cleanup_upto to here. New file.
450         * sysdeps/pthread/ptlongjmp.c: Copied longjmp to here. New file.
451         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
452         Version longjmp, siglongjmp for GLIBC_2.3.4.
453         * sysdeps/unix/sysv/linux/powerpc/ptlongjmp.c: New File.
455 2004-01-22  Andreas Jaeger  <aj@suse.de>
457         * spinlock.c (__pthread_lock): Fix contraint to avoid warning.
458         (__pthread_release): Likewise.
460 2004-01-16  Richard Henderson  <rth@redhat.com>
462         * attr.c: Include ldsodefs.h.
463         (pthread_getattr_np): Don't declare __libc_stack_end.
465 2004-01-09  Steven Munroe  <sjmunroe@us.ibm.com>
467         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
468         [!HAVE_TLS_SUPPORT]: Define SINGLE_THREAD_P using static
469         __lib*_multiple_threads.
470         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
471         [!HAVE_TLS_SUPPORT]: Likewise.
473 2004-01-13  Roland McGrath  <roland@redhat.com>
475         * sysdeps/powerpc/tcb-offsets.sym: Put -- separator line before any
476         conditionals.
478 2004-01-10  Andreas Jaeger  <aj@suse.de>
480         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Add cfi directives.
482 2004-01-01  Andreas Jaeger  <aj@suse.de>
484         * Makefile (generated): Add missing files.
486 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
488         * attr.c (pthread_getattr_np): Make sure stack info returned for
489         main thread does not overlap with any other VMA.
490         Patch by Jakub Jelinek.
492 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
494         * sysdeps/ia64/tls.h: Include dl-sysdep.h.
495         (INIT_SYSINFO): Define.
496         (TLS_INIT_TP): Use it.
498 2003-12-28  Carlos O'Donell  <carlos@baldric.uwo.ca>
500         * attr.c (pthread_getattr_np): Add _STACK_GROWS_UP case.
502 2003-12-26  Jakub Jelinek  <jakub@redhat.com>
504         * sysdeps/pthread/pthread.h (pthread_setcancelstate,
505         pthread_setcanceltype, pthread_cancel, pthread_testcancel): Remove
506         __THROW.
507         * semaphore.h (sem_wait, sem_timedwait): Likewise.
509 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
511         * manager.c (pthread_free): Call _dl_deallocate_tls even for
512         p_userstack threads.
513         * pthread.c (__pthread_initialize_manager): Call _dl_deallocate_tls
514         on error.
515         (pthread_onexit_process): Update comment.
516         * Makefile (tests): Add tst-stack1.  Depend on $(objpfx)tst-stack1-mem.
517         (generated): Add tst-stack1.mtrace and tst-stack1-mem.
518         (tst-stack1-ENV): Set.
519         ($(objpfx)tst-stack1-mem): New.
520         * tst-stack1.c: New test.
522 2003-12-16  Steven Munroe  <sjmunroe@us.ibm.com>
524         * sysdeps/powerpc/tcb-offsets.sym [!__powerpc64__]: Remove
525         conditional so MULTIPLE_THREADS_OFFSET is generated for both.
526         * sysdeps/powerpc/tls.h [!__powerpc64__]: Remove conditional
527         so TLS_MULTIPLE_THREADS_IN_TCB is generated for both.
528         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h:
529         Include tls.h.
531 2003-12-04  Steven Munroe  <sjmunroe@us.ibm.com>
533         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
534         (SINGLE_THREAD_P): Test using thread local p_multiple_threads field.
536 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
538         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Update copyright
539         message.  Add include of <stddef.h>.
540         (INIT_NEW_WAY): New macro.
541         (INIT_OLD_WAY): Likewise.
542         (_init): Add unwind directives.  Invoke
543         __pthread_initialize_minimal() via INIT_NEW_WAY or INIT_OLD_WAY,
544         respectively.
545         (_init_EPILOG_BEGINS): Add unwind-directives.  Drop unused .regstk
546         directive.
547         (_fini): Add unwind directives.  Drop unnecessary .align 16
548         directive (bundles are always 16-byte aligned).
549         (_fini_EPILOG_BEGINS): Add unwind-directives.
551 2003-11-19  David Mosberger  <davidm@hpl.hp.com>
553         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
555 2003-12-10  Andreas Jaeger  <aj@suse.de>
556             Ruediger Oertel  <ro@suse.de>
558         * sysdeps/alpha/elf/pt-initfini.c (__asm__): Remove extra .prologue.
560 2003-11-30  Andreas Jaeger  <aj@suse.de>
562         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
563         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
564         Likewise.
566 2003-11-04  Jakub Jelinek  <jakub@redhat.com>
568         * signals.c (__pthread_sigaction): Set __sighandler[sig].old before
569         __libc_sigaction if it has been one of the special values before.
571 2003-10-06  Carlos O'Donell <carlos@baldric.uwo.ca>
573         * pthread.c (__pthread_self_stack): _STACK_GROWS_UP case added.
574         (__pthread_find_self): Likewise.
575         * manager.c (thread_segment): _STACK_GROWS_UP case added.
577 2003-10-10  Carlos O'Donell  <carlos@baldric.uwo.ca>
579         * linuxthreads/sysdeps/unix/sysv/linux/hppa/malloc-machine.h: New file.
581 2003-10-10  Carlos O'Donell  <carlos@baldric.uwo.ca>
583         * sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h: New file.
585 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
587         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
588         changes.
589         (SAVE_OLDTYPE_0): Fix a typo.
591 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
593         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
594         correct offset.
596 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
598         * Makefile (tests): Add tst-cancel8.
599         * tst-cancel8.c: New test.
601 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
603         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
604         restoring of the old cancellation type.
606 2003-09-10  Chris Demetriou  <cgd@broadcom.com>
608         * sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h: New file.
610 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
612         * sysdeps/pthread/malloc-machine.h [!__libc_maybe_call2] (mutex_init,
613         mutex_lock, mutex_trylock, mutex_unlock): Remove.
615 2003-09-27  Wolfram Gloger  <wg@malloc.de>
617         * sysdeps/pthread/malloc-machine.h: New file.
619 2003-09-18  H.J. Lu  <hongjiu.lu@intel.com>
621         * attr.c (__pthread_attr_init_2_1): Double __guardsize size
622         if NEED_SEPARATE_REGISTER_STACK is defined.
624 2003-09-22  Philip Blundell  <philb@gnu.org>
626         * forward.c: Add _pthread_cleanup_push, _pthread_cleanup_pop.
627         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
628         Likewise.
629         * pthread.c (__pthread_elements): Initialise these new elements.
630         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Use
631         __libc_maybe_call.
632         (__libc_cleanup_pop): Likewise.
634 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
636         * attr.c: Include stdlib.h.
638 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
640         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
642         * tst-attr1.c: New test.
643         * Makefile (tests): Add tst-attr1.
645 2003-09-17  Philip Blundell  <philb@gnu.org>
647         * sysdeps/unix/sysv/linux/arm/vfork.S: Branch to fork if
648         libpthread is loaded.  Elide backwards compatibility code when not
649         required.
651 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
653         * descr.h (manager_thread): Rename to...
654         (__pthread_manager_threadp): ... this.
655         * pthread.c (manager_thread): Define to __pthread_manager_threadp.
656         (__pthread_manager_threadp): New variable.
657         * internals.h (__manager_thread): Define to
658         __pthread_manager_threadp if USE_TLS.
660 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
662         * sysdeps/i386/Makefile (CFLAGS-cancel.c, CFLAGS-manager.c,
663         CFLAGS-pthread.c, CFLAGS-sighandler.c): Add
664         -mpreferred-stack-boundary=4.
666 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
668         * attr.c (pthread_getattr_np): Correctly fill in the stack-related
669         values for the initial thread.
671 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
673         * pthread.c (manager_thread): Remove static, add attribute_hidden.
674         (thread_self_stack): Rename to...
675         (__pthread_self_stack): ... this.  Remove static.
676         (pthread_handle_sigcancel): Use check_thread_self ().
677         (pthread_handle_sigrestart): Likewise.
678         * sighandler.c (__pthread_sighandler, __pthread_sighandler_rt):
679         Likewise.
680         * descr.h (manager_thread): Declare.
681         * internals.h (__pthread_self_stack): New prototype.
682         (__manager_thread): Define.
683         (check_thread_self): New function.
685 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
687         * Makefile (CFLAGS-mutex.c): Add $(uses-callbacks).
688         (CFLAGS-sighandler.c): Change $(exceptions) into $(uses-callbacks).
690 2003-09-12  Jakub Jelinek  <jakub@redhat.com>
692         * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: New.
693         (__SSIZE_T_TYPE): Define to __SWORD_TYPE for gcc 2.95.x and
694         __SLONGWORD_TYPE otherwise.
696 2003-09-11  Steven Munroe  <sjmunroe@us.ibm.com>
698         * sysdeps/powerpc/powerpc64/pt-machine.h [MEMORY_BARRIER]: Use lwsync.
699         [READ_MEMORY_BARRIER]: Define.
700         [WRITE_MEMORY_BARRIER]: Define.
702 2003-09-10  Jakub Jelinek  <jakub@redhat.com>
704         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Move
705         ptr___pthread_cond_timedwait to the end of the structure to avoid
706         breaking Wine unnecessarily.
708 2003-09-08  Jakub Jelinek  <jakub@redhat.com>
710         * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: Remove.
712 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
714         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
715         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
716         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
717         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
718         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
719         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
720         * attr.c (__old_pthread_attr_setstacksize,
721         __old_pthread_attr_setstack): New functions.
722         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
723         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
724         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
725         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
726         * tststack.c: Include limits.h and sys/param.h.
727         (main): Set size to MAX (70 * 1024, PTHREAD_STACK_MIN).
729         * barrier.c (__pthread_barrierattr_getpshared): Always
730         return PTHREAD_PROCESS_PRIVATE.
731         (pthread_barrierattr_setpshared): Return EINVAL if pshared
732         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
734 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
736         * sysdeps/sparc/tls.h (TLS_TCB_SIZE): If in ld.so and NPTL struct
737         pthread is bigger than struct _pthread_descr_struct, use NPTL struct
738         pthread size.
740 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
742         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
743         (DL_SYSINFO_IMPLEMENTATION): Add CFI and make sure the code ends
744         up in .text.
746         * barrier.c (pthread_barrierattr_setpshared): We don't handle
747         inter-process barriers.
749 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
751         * Makefile (tests): Add tst-tls1.
752         (module-names): Add tst-tls1mod{,a,b,c,d,e,f}.
753         ($(objpfx)tst-tls1mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
754         ($(objpfx)tst-tls1): New.
755         ($(objpfx)tst-tls2.out): Likewise.
756         (tests): Depend on $(objpfx)tst-tls2.out.
757         * tst-tls1.c: New test.
758         * tst-tls1.h: New.
759         * tst-tls1mod.c: New.
760         * tst-tls1moda.c: New.
761         * tst-tls1modb.c: New.
762         * tst-tls1modc.c: New.
763         * tst-tls1modd.c: New.
764         * tst-tls1mode.c: New.
765         * tst-tls1modf.c: New.
766         * tst-tls2.sh: New test.
768         * internals.h (__pthread_cond_timedwait): New prototype.
769         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
770         ptr___pthread_cond_timedwait.
771         * pthread.c (__pthread_functions): Initialize them.
772         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
773         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
774         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
775         pthread_cond_timedwait@@GLIBC_2.3.2.
777 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
779         * sysdeps/pthread/pthread.h: Don't mark pthread_exit,
780         pthread_join, pthread_cond_wait, and pthread_cond_timedwait with
781         __THROW to match NPTL.
783 2003-08-13  Ulrich Drepper  <drepper@redhat.com>
785         * sysdeps/pthread/Makefile [subdir=rt] (CPPFLAGS): Add
786         -DBROKEN_THREAD_SIGNALS.
788 2003-08-11  Steven Munroe  <sjmunroe@us.ibm.com>
790         * manager.c (pthread_start_thread) [!(USE_TLS && HAVE___THREAD)]:
791         Correct spelling of per thread resolver state.
793 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
795         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
796         (__rtld_lock_default_lock_recursive,
797         __rtld_lock_default_unlock_recursive): Define.
798         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
799         __rtld_lock_unlock_recursive): Define using
800         GL(_dl_rtld_*lock_recursive).
801         * pthread.c (pthread_initialize): Initialize _dl_rtld_lock_recursive
802         and _dl_rtld_unlock_recursive.  Lock GL(_dl_load_lock) the same
803         number of times as GL(_dl_load_lock) using non-mt implementation was
804         nested.
806 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
808         * sysdeps/pthread/bits/typesizes.h (__SSIZE_T_TYPE): Define.
809         * sysdeps/unix/sysv/linux/alpha/bits/typesizes.h (__SSIZE_T_TYPE):
810         Likewise.
811         * sysdeps/unix/sysv/linux/sparc/bits/typesizes.h (__SSIZE_T_TYPE):
812         Likewise.
813         * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: New file.
815         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
816         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
817         PTHREAD_STACK_MIN in comments.
819         * sysdeps/alpha/pt-machine.h (PT_EI): Add
820         __attribute__((always_inline)).
821         * sysdeps/arm/pt-machine.h (PT_EI): Likewise.
822         * sysdeps/cris/pt-machine.h (PT_EI): Likewise.
823         * sysdeps/hppa/pt-machine.h (PT_EI): Likewise.
824         * sysdeps/i386/i686/pt-machine.h (PT_EI): Likewise.
825         * sysdeps/i386/pt-machine.h (PT_EI): Likewise.
826         * sysdeps/ia64/pt-machine.h (PT_EI): Likewise.
827         * sysdeps/m68k/pt-machine.h (PT_EI): Likewise.
828         * sysdeps/mips/pt-machine.h (PT_EI): Likewise.
829         * sysdeps/powerpc/powerpc32/pt-machine.h (PT_EI): Likewise.
830         * sysdeps/powerpc/powerpc64/pt-machine.h (PT_EI): Likewise.
831         * sysdeps/s390/s390-32/pt-machine.h (PT_EI): Likewise.
832         * sysdeps/s390/s390-64/pt-machine.h (PT_EI): Likewise.
833         * sysdeps/sh/pt-machine.h (PT_EI): Likewise.
834         * sysdeps/sparc/sparc32/pt-machine.h (PT_EI): Likewise.
835         * sysdeps/sparc/sparc64/pt-machine.h (PT_EI): Likewise.
836         * sysdeps/x86_64/pt-machine.h (PT_EI): Likewise.
837         * spinlock.h (__pthread_set_own_extricate_if): Likewise.
838         * sysdeps/ia64/tls.h (TLS_INIT_TP): Cast tcbp to __typeof
839         (__thread_self).
840         * Examples/ex13.c (main): Change res type to void * to avoid
841         warnings.
842         * tst-cancel.c (cleanup, inner, tf1, tf2, tf3): Comment out.
844 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
846         * pthread.c (init_one_static_tls, __pthread_init_static_tls): New
847         functions.
848         (pthread_initialize): Initialize GL(dl_init_static_tls).
850 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
852         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
853         before __timer_dealloc.
854         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
855         Don't call list_unlink.
857 2003-07-29  Roland McGrath  <roland@redhat.com>
859         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
861 2003-07-25  Roland McGrath  <roland@redhat.com>
863         * manager.c (pthread_start_thread): Fix typo in last change.
865 2003-07-14  Guido Guenther  <agx@sigxcpu.org>
867         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: Add IS_IN_librt,
868         use L() for local labels.
870 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
872         * sysdeps/alpha/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Change to 0.
873         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Alignment of struct
874         _pthread_descr_struct.
875         (TLS_PRE_TCB_SIZE): Add sizeof (tcbhead_t) and pad to align.
876         If in ld.so and NPTL struct pthread is bigger than struct
877         _pthread_descr_struct, use NPTL struct pthread size.
878         (TLS_TCB_OFFSET): Define.
879         (INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_DTV,
880         THREAD_SELF, INIT_THREAD_SELF): Changed to match NPTL tls.h
881         definitions.
882         * sysdeps/i386/tls.h (TLS_TCB_SIZE): If in ld.so and NPTL struct
883         pthread is bigger than struct _pthread_descr_struct, use NPTL struct
884         pthread size.
885         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Likewise.
886         * sysdeps/powerpc/tls.h (TLS_PRE_TCB_SIZE): Likewise.
887         * sysdeps/s390/tls.h (TLS_TCB_SIZE): Likewise.
888         * sysdeps/sh/tls.h (TLS_PRE_TCB_SIZE): Likewise.
889         * sysdeps/x86_64/tls.h (TLS_TCB_SIZE): Likewise.
890         * sysdeps/pthread/Makefile (gen-as-const-headers): Add
891         nptl-struct-pthread.sym if nptl tree is present.
892         (before-compile): Add $(common-objpfx)nptl-struct-pthread.h
893         if nptl tree is not present.
894         (common-generated): Add nptl-struct-pthread.h.
895         ($(common-objpfx)nptl-struct-pthread.h): New rule.
896         * sysdeps/pthread/nptl-struct-pthread.sym: New file.
898 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
900         * descr.h (struct _pthread_descr_struct): Provide p_res member
901         even if USE_TLS && HAVE___THREAD.
902         * sysdeps/pthread/res-state.c (__res_state): Return __resp
903         if USE___THREAD.
904         * manager.c: Include resolv.h.
905         (pthread_start_thread): Initialize __resp.
906         * libc-tls-loc.c (__res_state): Return __resp.
907         * Makefile (tests): Add tst-_res1.
908         (modules-names, extra-objs, test-extras, test-modules): Add support
909         for test modules.
910         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
911         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
912         -lpthread.
913         * tst-_res1.c: New test.
914         * tst-_res1mod1.c: New test.
915         * tst-_res1mod2.c: New test.
917 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
919         * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_push and
920         __libc_cleanup_pop.
922         * tst-cancel-wrappers.sh: lseek and llseek are no cancellation points.
924 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
926         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Fix typo
927         in test for compilation in libc.
929 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
931         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
932         different symbol for the cancellation syscall wrapper and
933         non-cancellation syscall wrapper.
934         (PSEUDO_END): Define.
936 2003-07-05  Richard Henderson  <rth@redhat.com>
938         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
940 2003-06-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
942         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Support cancellation
943         in librt.
945 2003-06-21  Andreas Schwab  <schwab@suse.de>
947         * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Support cancellation
948         in librt.
950 2003-06-20  Richard Henderson  <rth@redhat.com>
952         * sysdeps/unix/sysv/linux/alpha/Makefile (libpthread-routines):
953         Remove ptw-osf_sigprocmask.
955 2003-06-18  Jakub Jelinek  <jakub@redhat.com>
957         * internals.h (__librt_multiple_threads, __librt_enable_asynccancel,
958         __librt_disable_asynccancel): Declare.
959         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET, LIBC_CANCEL_HANDLED): Define
960         for IS_IN_librt.
961         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Support cancellation
962         in librt.
963         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
964         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
965         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
966         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
967         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
968         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
969         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
970         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
971         * sysdeps/x86_64/tcb-offsets.sym: New file.
972         * sysdeps/x86_64/Makefile: New file.
973         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
974         * Versions (libc): Export __librt_enable_asynccancel,
975         __librt_disable_asynccancel and __librt_multiple_threads as
976         GLIBC_PRIVATE.
977         * libc-cancellation.c (__librt_multiple_threads,
978         __librt_enable_asynccancel, __librt_disable_asynccancel): New aliases.
980 2003-06-12  Steven Munroe  <sjmunroe@us.ibm.com>
982         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
983         (SINGLE_THREAD_P): Replace @ got notation with @toc.
985 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
987         * sysdeps/powerpc/pspinlock.c (__pthread_spin_init): Fix
988         initializer [PR libc/5052].
990 2003-06-09  Andreas Schwab  <schwab@suse.de>
992         * Makefile: Move inclusion of ../Rules down after extra-objs is
993         fully known.
995 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
997         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: New sequences for
998         5+ arg syscalls only needed for PIC.
999         Patch by Ralph Siemsen <ralphs@netwinder.org>.
1001 2003-06-05  Richard Henderson  <rth@redhat.com>
1003         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use
1004         and require CFI assembler directives.
1005         * sysdeps/unix/sysv/linux/alpha/vfork.S: Likewise.
1007 2003-05-30  Andreas Jaeger  <aj@suse.de>
1009         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h
1010         (SAVESTK_0): Add CFI directives.
1011         (SAVESTK_3): Likewise.
1012         (SAVESTK_5): Likewise.
1013         (RESTSTK_0): Likewise.
1014         (RESTSTK_3): Likewise.
1015         (RESTSTK_5): Likewise.
1017 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
1019         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Add \n to error
1020         messages.
1022 2003-05-04  Roland McGrath  <roland@redhat.com>
1024         * Makefile ($(objpfx)../libc.so): New target.
1026 2003-04-26  Ulrich Drepper  <drepper@redhat.com>
1028         * pthread.c (__pthread_initialize_manager): Remove one last
1029         p_multiple_threads call.
1031 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
1033         * pthread.c (__pthread_initialize_manager): Subtract
1034         TLS_PRE_TCB_SIZE bytes from tcbp to get to descr.
1035         * manager.c (pthread_handle_create): Subtract or add TLS_PRE_TCB_SIZE
1036         instead of sizeof (pthread_descr).
1037         (pthread_free): Add TLS_PRE_TCB_SIZE instead of sizeof (pthread_descr).
1038         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define to 0.
1039         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
1040         pthread_descr.
1041         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
1042         to TLS_TCB_ALIGN.
1043         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
1044         tcbp.
1045         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
1046         unneccessarily.
1047         (NO_TLS_OFFSET): Define.
1049 2003-04-22  Roland McGrath  <roland@redhat.com>
1051         * Makeconfig (shared-thread-library): Reverse link order to work
1052         around linker bug.
1054 2003-04-20  Ulrich Drepper  <drepper@redhat.com>
1056         * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Make sure the
1057         compiler knows we use the ldt_entry variable and that the syscall
1058         modifies the memory.
1060         * internals.h: Split pthread_functions definition into...
1061         * sysdeps/pthread/pthread-functions.h: ...new file.
1063         * sysdeps/i386/useldt.h: Include <sysdep.h>.
1065 2003-04-13  Jakub Jelinek  <jakub@redhat.com>
1067         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Rename macros to
1068         match changes in NPTL sysdep-cancel.h.
1070 2003-04-11  Roland McGrath  <roland@redhat.com>
1072         * Makefile (multidir): Don't set the variable here with $(shell ...).
1073         ($(objpfx)multidir.mk): New target, generated makefile; include that.
1074         (generated): Append it.
1076 2003-04-10  Jakub Jelinek  <jakub@redhat.com>
1078         * Makefile (multidir, crti-objs, crtn-objs): New variables.
1079         (generated-dirs): Add pathname component of multidir.
1080         (omit-deps, extra-objs): Include $(multidir)/crt? as well.
1081         ($(objpfx)libpthread.so): Depend on $(multidir)/crt?.o as well.
1082         ($(objpfx)$(multidir), $(objpfx)$(multidir)/crti.o,
1083         $(objpfx)$(multidir)/crtn.o): New.
1084         * sysdeps/unix/sysv/linux/sparc/Makefile: Removed.
1085         * sysdeps/unix/sysv/linux/x86_64/Makefile (LDFLAGS-pthread.so,
1086         before-compile, generated): Don't generate and use specs.
1087         ($(objpfx)specs): Remove.
1089 2003-04-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1091         * sysdeps/s390/pspinlock.c (__pthread_spin_unlock): Fix asm contraints.
1093 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
1095         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h (PSEUDO): Add
1096         missing ; after ENTRY use [PR libc/4997].
1098 2003-04-03  Jakub Jelinek  <jakub@redhat.com>
1100         * pthread.c (pthread_initialize): Unblock __pthread_sig_cancel
1101         in case the parent blocked it.
1103 2003-04-02  Jakub Jelinek  <jakub@redhat.com>
1105         * Makefile (libpthread-routines): Add pthread_atfork.
1106         (libpthread-static-only-routines): Add pthread_atfork.
1108 2003-04-01  Jakub Jelinek  <jakub@redhat.com>
1110         * pthread.c (__pthread_wait_for_restart_signal): Use
1111         __pthread_sigsuspend instead of sigsuspend.
1112         * internals.h (__pthread_sigsuspend): New prototype.
1113         * Makefile (libpthread-routines): Add pt-sigsuspend.
1114         (tests): Add tst-cancel7.
1115         * sysdeps/unix/sysv/linux/pt-sigsuspend.c: New file.
1116         * sysdeps/unix/sysv/linux/alpha/pt-sigsuspend.S: New file.
1117         * sysdeps/unix/sysv/linux/ia64/pt-sigsuspend.c: New file.
1118         * sysdeps/unix/sysv/linux/s390/s390-64/pt-sigsuspend.c: New file.
1119         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-sigsuspend.c: New file.
1120         * sysdeps/unix/sysv/linux/x86_64/pt-sigsuspend.c: New file.
1121         * tst-cancel7.c: New test.
1123 2003-03-31  Alexandre Oliva  <aoliva@redhat.com>
1125         * alloca_cutoff.c: Include internals.h.
1126         * sysdeps/pthread/errno-loc.c: Include linuxthreads/internals.h.
1127         * sysdeps/pthread/herrno-loc.c: Likewise.
1128         * sysdeps/pthread/res-state.c: Likewise.
1130 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
1132         * sysdeps/pthread/bits/typesizes.h: New file.
1133         * sysdeps/unix/sysv/linux/alpha/bits/typesizes.h: New file.
1134         * sysdeps/unix/sysv/linux/sparc/bits/typesizes.h: New file.
1136 2003-03-24  Daniel Jacobowitz  <drow@mvista.com>
1138         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
1139         (DOARGS_5, DOARGS_6, DOARGS_7): Rewritten.
1141 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
1143         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
1145 2003-03-21  Daniel Jacobowitz  <drow@mvista.com>
1147         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
1148         (SINGLE_THREAD_P_PIC): Use "reg" instead of "lr".
1150 2003-03-21  Jakub Jelinek  <jakub@redhat.com>
1152         * sysdeps/i386/tls.h [__ASSUME_SET_THREAD_AREA_SYSCALL]
1153         (TLS_SETUP_GS_SEGMENT): Fix a typo.
1155 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
1157         * sysdeps/pthread/Makefile: Fix cut&paste error.
1159 2003-03-18  Roland McGrath  <roland@redhat.com>
1161         * Versions (libpthread: GLIBC_2.2): Remove
1162         pthread_barrierattr_getpshared, never really existed.
1163         (libpthread: GLIBC_2.0): Move __pthread_initialize to ...
1164         (libpthread: GLIBC_PRIVATE): ... here.
1166 2003-03-14  Jakub Jelinek  <jakub@redhat.com>
1168         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
1169         * sysdeps/unix/sysv/linux/sparc/Makefile ($(objpfx)specs): Use full
1170         path for crt[in].o.
1172 2003-03-14  Alexandre Oliva  <aoliva@redhat.com>
1174         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't .set
1175         mips2 on new abi.
1176         * sysdeps/mips/pt-machine.h (__compare_and_swap): Likewise.
1177         Handle 64-bit longs on n64.
1179 2003-03-07  Jakub Jelinek  <jakub@redhat.com>
1181         * sysdeps/ia64/pspinlock.c (__pthread_spin_lock,
1182         __pthread_spin_trylock): Rewritten.
1184 2003-03-06  Ulrich Drepper  <drepper@redhat.com>
1186         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
1187         recent kernels.
1189 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
1191         * sysdeps/pthread/timer_create.c (timer_create): Return correct
1192         error for CPU clocks.
1194         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1195         _POSIX_MONOTONIC_CLOCK.
1196         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1198 2003-03-01  Roland McGrath  <roland@redhat.com>
1200         * sysdeps/powerpc/powerpc64/pt-machine.h
1201         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
1202         New macros.
1203         * sysdeps/powerpc/tls.h: Don't define those here.
1205         * sysdeps/powerpc/tls.h [! USE_TLS && !__powerpc64__]: Define
1206         tcbhead_t with multiple_threads member.
1207         [USE_TLS] (tcbhead_t): Define minimal one-word version.
1208         [USE_TLS && !__powerpc64__] (TLS_MULTIPLE_THREADS_IN_TCB): Define.
1209         * sysdeps/powerpc/tcb-offsets.sym [USE_TLS]: Use tls.h macros to
1210         derive thread register offset of p_multiple_threads member.
1212         * descr.h (struct _pthread_descr_struct) [!USE_TLS || !TLS_DTV_AT_TP]:
1213         Conditionalize p_header member on this.
1214         [TLS_MULTIPLE_THREADS_IN_TCB]: Add p_multiple_threads alternatively.
1215         * sysdeps/ia64/tls.h [USE_TLS] (TLS_MULTIPLE_THREADS_IN_TCB): Define.
1216         * sysdeps/sh/tls.h: Likewise.
1217         * sysdeps/ia64/tcb-offsets.sym [USE_TLS]: Use p_multiple_threads.
1218         * sysdeps/sh/tcb-offsets.sym: Likewise.
1219         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
1220         (SINGLE_THREAD_P): Likewise.
1221         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1222         (SINGLE_THREAD_P): Likewise.
1223         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1224         (SINGLE_THREAD_P): Likewise.
1225         * pthread.c (__pthread_initialize_manager): Likewise.
1226         * manager.c (pthread_handle_create): Likewise.
1228         * sysdeps/powerpc/tls.h [HAVE_TLS_SUPPORT]: Define USE_TLS and all
1229         related macros.
1231 2003-01-31  Steven Munroe  <sjmunroe@us.ibm.com>
1233         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S [SHARED]:
1234         Conditionalize .toc section magic on this.
1236 2003-02-21  Roland McGrath  <roland@redhat.com>
1238         * cancel.c (__pthread_perform_cleanup): Call __libc_thread_freeres
1239         instead of __rpc_thread_destroy.
1241 2003-02-21  Jakub Jelinek  <jakub@redhat.com>
1243         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Call
1244         __fork instead of branching to it if BROKEN_SPARC_WDISP22.
1245         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
1246         Fix typo.
1247         * sysdeps/unix/sysv/linux/sparc/Makefile (specs): Add ./ prefix
1248         to crti.o and crtn.o.
1249         * sysdeps/unix/sysv/linux/x86_64/Makefile (specs): Likewise.
1251 2003-02-21  Roland McGrath  <roland@redhat.com>
1253         * Makefile (install-lib-ldscripts): New variable.
1255 2003-02-20  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
1257         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: Avoid short
1258         interprocedure branches.
1260 2003-02-19  Ulrich Drepper  <drepper@redhat.com>
1262         * specific.c (pthread_key_delete_helper): Don't use GETMEM, we
1263         need the target thread's lock.
1265 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
1267         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
1268         and LOGIN_NAME_MAX.
1270 2003-02-17  Kevin B. Hendricks  <kevin.hendricks@sympatico.ca>
1271             Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
1273         * sysdeps/powerpc/Makefile: Handle tcb-offsets.sym.
1274         * sysdeps/powerpc/tcb-offsets.sym: New file.
1275         * sysdeps/powerpc/tls.h: New file.
1276         * sysdeps/powerpc/powerpc32/pt-machine.h (FLOATING_STACKS): Define.
1277         (ARCH_STACK_MAX_SIZE): Define.
1278         (THREAD_SELF): Define.
1279         (INIT_THREAD_SELF): Define.
1280         (THREAD_GETMEM): Define.
1281         (THREAD_GETMEM_NC): Define.
1282         (THREAD_SETMEM): Define.
1283         (THREAD_SETMEM_NC): Define.
1284         (__thread_self): Declare.
1285         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Adjust
1286         for thread register.
1288 2003-02-14  Steven Munroe  <sjmunroe@us.ibm.com>
1290         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
1291         Check pthread_create existance, not __pthread_fork.
1293 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
1295         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
1297 2003-02-10  Jakub Jelinek  <jakub@redhat.com>
1299         * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Check
1300         pthread_create existance, not __pthread_fork.
1301         * sysdeps/unix/sysv/linux/i386/vfork.S (__vfork): Likewise.
1302         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Likewise.
1303         * sysdeps/unix/sysv/linux/m68k/vfork.S (__vfork): Likewise.
1304         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
1305         Likewise.
1306         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
1307         * sysdeps/unix/sysv/linux/x86_64/vfork.S (__vfork): Likewise.
1308         * sysdeps/unix/sysv/linux/sh/vfork.S (__vfork): Likewise.
1309         Add .weak pthread_create.
1310         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Fix a typo.
1311         Check pthread_create existance, not __pthread_fork.
1312         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
1313         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Branch to
1314         __fork whenever libpthread.so is loaded.
1316 2003-02-09  Andreas Jaeger  <aj@suse.de>
1318         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h:
1319         Rework: %r9 is destroyed by functions so don't use it as
1320         temporary, align stack correctly, fix parameter for CDISABLE.
1322 2003-02-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1324         * sysdeps/sh/Makefile: New file.
1325         * sysdeps/sh/tcb-offsets.sym: Likewise.
1326         * sysdeps/sh/tls.h: Don't include sysdep.h. Move include
1327         of linuxthreads/descr.h after the definition of THREAD_SELF.
1328         (tcbhead_t): Use IA64 type tcbhead_t for TLS case.
1329         (TLS_TCB_SIZE): Set size of tcbhead_t.
1330         (TLS_PRE_TCB_SIZE): Define.
1331         (INSTALL_NEW_DTV): Set dtv of tcbhead_t structure instead of
1332         a member of thread structure.
1333         (THREAD_DTV): Likewise.
1334         (TLS_INIT_TP_EXPENSIVE): Remove.
1335         (TLS_INIT_TP): Set gbr register only.
1336         (THREAD_SELF): New.
1337         (INIT_THREAD_SELF): Likewise.
1338         (NONTLS_INIT_TP): New.
1339         * sysdeps/unix/sysv/linux/sh/pt-initfini.c (__fpscr_values):
1340         Remove.
1341         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Add
1342         SYSCALL_INST_PAD macro after DO_CALL.
1343         (SINGLE_THREAD_P): Fix non-PIC and TLS case so to read the
1344         correct variable.
1345         * sysdeps/unix/sysv/linux/sh/vfork.S (__vfork): Branch to __fork
1346         whenever libpthread.so is loaded.
1348 2003-02-08  Andreas Schwab  <schwab@suse.de>
1350         * sysdeps/unix/sysv/linux/m68k/vfork.S: Branch to __fork whenever
1351         libpthread.so is loaded.
1353 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
1355         * sysdeps/unix/sysv/linux/i386/vfork.S: Make sure
1356         __ASSUME_VFORK_SYSCALL is not defined if the kernel headers have
1357         no __NR_vfork definition.
1359 2003-02-07  Jakub Jelinek  <jakub@redhat.com>
1361         * tst-popen2.c: New test.
1362         * Makefile (tests): Add tst-popen2.
1363         * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Branch to __fork
1364         whenever libpthread.so is loaded.
1365         * sysdeps/unix/sysv/linux/i386/vfork.S (__vfork): Likewise.
1366         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Likewise.
1367         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
1368         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
1369         Likewise.
1370         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
1371         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
1372         * sysdeps/unix/sysv/linux/x86_64/vfork.S (__vfork): Likewise.
1374 2003-02-05  Ulrich Drepper  <drepper@redhat.com>
1376         * sysdeps/pthread/bits/libc-lock.h (__libc_once): Set control
1377         variable for non-libpthread case to the same value the
1378         pthread_once function would use.
1380 2003-02-03  Jakub Jelinek  <jakub@redhat.com>
1382         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): If
1383         BROKEN_SPARC_WDISP22, handle SHARED the same way as non-SHARED.
1385 2003-02-04  Andreas Jaeger  <aj@suse.de>
1387         * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Do not use
1388         multi-line strings.
1390 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
1392         * sysdeps/s390/tls.h (TLS_INIT_TP): Return NULL, not 0.
1394 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
1396         * sysdeps/alpha/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1397         THREAD_SETMEM, THREAD_SETMEM_NC): Avoid warnings about unused self
1398         variable.
1399         * sysdeps/ia64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1400         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1401         * sysdeps/s390/s390-32/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1402         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1403         * sysdeps/s390/s390-64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1404         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1405         * sysdeps/sh/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1406         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1407         * sysdeps/sparc/sparc32/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1408         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1409         * sysdeps/sparc/sparc64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1410         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1412 2003-01-27  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1414         * sysdeps/s390/s390-32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
1415         Define TLS versions.
1416         * sysdeps/s390/s390-64/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
1417         Likewise.
1418         * sysdeps/s390/tls.h [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE,
1419         TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE, TLS_TCB_ALIGN, TLS_TCB_AT_TP,
1420         INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_DTV):
1421         Define.
1422         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Use
1423         branch with 32 bit offset.
1424         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: Likewise.
1426 2003-01-24  Jakub Jelinek  <jakub@redhat.com>
1428         * sysdeps/sparc/sparc32/pt-machine.h (__thread_self): Change to %g7,
1429         as required by TLS ABI.
1430         * sysdeps/sparc/sparc64/pt-machine.h (__thread_self): Likewise.
1431         * sysdeps/sparc/tls.h [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE,
1432         TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE, TLS_TCB_ALIGN, TLS_TCB_AT_TP,
1433         INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_DTV):
1434         Define.
1435         [HAVE_TLS_SUPPORT]: Include descr.h and sysdep.h.
1436         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Use %g7
1437         instead of %g6 for thread pointer.
1438         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
1439         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1440         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
1442 2003-01-25  Guido Guenther  <agx@sigxcpu.org>
1444         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
1445         * sysdeps/unix/sysv/linux/mips/Makefile: New file.
1447 2003-01-20  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1449         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: Avoid non pc relative
1450         reference to __fork.
1452 2003-01-17  Richard Henderson  <rth@redhat.com>
1454         * sysdeps/alpha/tls.h (tcbhead_t): Clarify second member.
1455         (TLS_TCB_SIZE, TLS_TCB_ALIGN): Set for tcbhead_t.
1456         (TLS_PRE_TCB_SIZE): New.
1457         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Update for
1458         new ia64-style thread pointer layout.
1459         (THREAD_GETMEM, THREAD_GETMEM_NC): New.
1460         (THREAD_SETMEM, THREAD_SETMEM_NC): New.
1461         * sysdeps/unix/sysv/linux/alpha/vfork.S: Don't tail-call to __fork
1462         if !SHARED.
1464 2003-01-15  Jakub Jelinek  <jakub@redhat.com>
1466         * sysdeps/ia64/tls.h (tcbhead_t): Use the TLS ABI required layout
1467         if USE_TLS only.
1468         (NONTLS_INIT_TP): Revert last change.
1469         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define to
1470         offsetof (tcbhead_t, multiple_threads) if USE_TLS not defined.
1472 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
1474         * pthread.c (_pthread_initialize_minimal): Use
1475         GL(dl_tls_dtv_slotinfo_list) != NULL to check whether TLS has
1476         been already initialized.
1478 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
1480         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize head->sysinfo even
1481         if not SHARED.
1483 2003-01-15  Jakub Jelinek  <jakub@redhat.com>
1485         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init,
1486         __libc_lock_init_recursive): Initialize fields directly.
1488 2003-01-15  Jakub Jelinek  <jakub@redhat.com>
1490         * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Allow
1491         __fork to be far away from __vfork ifndef SHARED.
1492         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
1493         Likewise.
1494         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
1495         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
1496         Add a missing instruction.
1497         * sysdeps/unix/sysv/linux/arm/vfork.S (__vfork): Conditionally
1498         branch to __fork even if __NR_vfork is not defined.
1500 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
1502         * tst-cancel-wrappers.sh: Allow .__*_asynccancel functions names
1503         as well.
1505 2003-01-14  Steven Munroe  <sjmunroe@us.ibm.com>
1507         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
1509 2003-01-14  Jakub Jelinek  <jakub@redhat.com>
1511         * sysdeps/unix/sysv/linux/ia64/vfork.S (JUMPTARGET): Remove.
1513 2003-01-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1515         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Avoid
1516         unterminated string literals.
1517         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Likewise.
1519 2003-01-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1521         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
1522         (PSEUDO): Code reordering.  Move CENABLE and CDISABLE literals from
1523         PSEUDO_END to PSEUDO.
1524         (PSEUDO_END): Remove.
1525         (SINGLE_THREAD_P): Save an instruction.
1526         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add missing
1527         parameter to SINGLE_THREAD_P call.
1528         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
1529         Code reordering.
1531 2003-01-10  Andreas Schwab  <schwab@suse.de>
1533         * sysdeps/unix/sysv/linux/m68k/vfork.S: New file.
1535 2003-01-10  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1537         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Setup
1538         backchain in pseudo_cancel.  Minor code improvements.
1539         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
1540         Likewise.
1542 2003-01-10  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1544         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
1545         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
1547 2002-01-12  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
1549         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
1551 2002-01-09  Richard Henderson  <rth@redhat.com>
1553         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Assume only
1554         ret follows pseudo, and thus avoid branch-to-branch in cancel
1555         case.  Use SYSCALL_ERROR_LABEL.
1557 2003-01-11  Philip Blundell  <philb@gnu.org>
1559         * sysdeps/unix/sysv/linux/arm/vfork.S: New file.
1560         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h (PSEUDO_RET):
1561         Correctly unstack lr.
1562         (UNDOARGS_5): Fix ordering of pushes and pops.
1563         (SINGLE_THREAD_P_PIC): New.
1564         (SINGLE_THREAD_P_INT): New.
1565         (SINGLE_THREAD_P): Implement in terms of above.  Restore lr if it
1566         was stacked.
1567         (PSEUDO): Use SINGLE_THREAD_P_INT.
1569 2003-01-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1571         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
1573 2003-01-11  Jakub Jelinek  <jakub@redhat.com>
1575         * sysdeps/ia64/tls.h (tcbhead_t): Change into dtv_t *, void *.
1576         [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN,
1577         TLS_TCB_SIZE, TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, TLS_DTV_AT_TP,
1578         INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_SELF,
1579         INIT_THREAD_SELF): Define.
1580         [HAVE_TLS_SUPPORT]: Include descr.h.
1581         (NONTLS_INIT_TP): Point __thread_self at the end of dummy
1582         struct _pthread_descr_struct.
1583         * sysdeps/ia64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1584         THREAD_SETMEM, THREAD_SETMEM_NC): Define using THREAD_SELF,
1585         not __thread_self.
1586         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Adjust
1587         computation.
1588         * pthread.c (__pthread_initialize_minimal): Use tcbp, not self
1589         for TCB pointer.
1590         (__pthread_initialize_manager): Rename tcb to mgr.
1591         Use tcbp for TCB pointer, if TLS_DTV_AT_TP set mgr to sizeof (struct
1592         _pthread_descr) below tcbp, otherwise to tcbp.
1593         * manager.c (pthread_handle_create): If TLS_DTV_AT_TP, set
1594         new_thread to be below _dl_allocate_tls ().  Adjust new_thread back
1595         before freeing.  Fix clone arguments if report_events and USE_TLS.
1596         (pthread_free): Adjust th back before freeing.
1598 2003-01-10  Steven Munroe  <sjmunroe@us.ibm.com>
1600         * sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile: Moved to ...
1601         * sysdeps/unix/sysv/linux/powerpc/Makefile: ...here.
1602         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New File.
1604 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
1606         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
1607         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
1608         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1609         [__ASSEMBLER__] (SINGLE_THREAD_P): Remove trailing ;;.
1610         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
1611         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
1612         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
1613         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
1614         * tst-popen.c: New test.
1615         * Makefile (tests): Add tst-popen.
1617 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
1619         * sysdeps/unix/sysv/linux/sigwait.c (do_sigwait): Add
1620         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
1622 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
1624         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use
1625         PSEUDO_PREPARE_ARGS.  Fix branch condition after SINGLE_THREAD_P.
1627 2003-01-06  Philip Blundell  <philb@gnu.org>
1629         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: New file.
1631 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
1633         * internals.h (LIBC_CANCEL_HANDLED): Define.
1634         * sysdeps/unix/sysv/linux/sigwait.c (LIBC_CANCEL_HANDLED): Add.
1635         * signals.c (LIBC_CANCEL_HANDLED): Add.
1636         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
1637         * tst-cancel-wrappers.sh: Remove all exceptions.
1639         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
1641 2003-01-05  Andreas Schwab  <schwab@suse.de>
1643         * sysdeps/m68k/Makefile: New file, use -fPIC for nonshared
1644         objects.
1646         * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h (SINGLE_THREAD_P):
1647         Fix for PIC.
1648         (CENABLE): Likewise.
1649         (CDISABLE): Likewise.
1651 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
1653         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
1654         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
1656         * Makefile (libc.so-no-z-defs): Define to yes.
1658 2003-01-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1660         * sysdeps/sh/tls.h: Include dl-sysdep.h and stdint.h.
1661         (tcbhead_t): Add multiple_threads member.
1662         (TLS_INIT_TP_EXPENSIVE): Define.
1663         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Don't use multi-line
1664         strings.  Remove unused code.
1665         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
1667 2003-01-04  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
1669         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
1670         * sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile: New file.
1672 2003-01-04  Jakub Jelinek  <jakub@redhat.com>
1674         * internals.h (LIBC_THREAD_GETMEM, LIBC_THREAD_SETMEM): Define
1675         even if NOT_IN_libc is defined.
1677 2003-01-05  Jakub Jelinek  <jakub@redhat.com>
1679         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
1680         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
1681         * sysdeps/s390/Makefile: New file.
1682         * sysdeps/s390/tcb-offsets.sym: New file.
1683         * sysdeps/s390/tls.h: New file.
1685 2003-01-03  Richard Henderson  <rth@redhat.com>
1687         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
1689 2003-01-03  Andreas Jaeger  <aj@suse.de>
1691         * sysdeps/pthread/bits/libc-tsd.h: Declare weak_extern functions.
1693 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
1695         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
1697 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
1699         * tst-cancel-wrappers.sh: Exclude sigwait.c as well, it does not have
1700         cancellation tests.
1702 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
1704         * internals.h (struct pthread_functions): Rename
1705         ptr_pthread_cond_* fields to ptr___pthread_cond_*.
1706         * pthread.c (pthread_functions): Adjust.
1707         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
1708         pthread_cond_*@GLIBC_2.0 compatibility symbols.
1709         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
1710         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
1711         and pthread_cond_wait.
1713         * sysdeps/pthread/bits/pthreadtypes.h (__pthread_cond_align_t): New
1714         type.
1715         (pthread_cond_t): Add __align member, shorten __padding.
1716         * sysdeps/pthread/pthread.h (PHTREAD_COND_INITIALIZER): Initialize
1717         __padding and __align too.
1719         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call2): Add
1720         __builtin_expect.
1721         * sysdeps/pthread/sigaction.c: New file.
1722         * sysdeps/unix/sysv/linux/raise.c: New file.
1723         * sysdeps/unix/sysv/linux/sigwait.c: New file.
1724         * sysdeps/unix/sysv/linux/fork.c (__pthread_fork): Protect
1725         weak_extern with #ifndef SHARED.
1726         * sysdeps/unix/sysv/linux/jmp-unwind.c (__pthread_cleanup_upto):
1727         Likewise.
1728         * signals.c (__sigaction): Renamed to...
1729         (__pthread_sigaction): ... this.
1730         (__sigaction): New strong alias, #ifdef SHARED only.
1731         (sigaction): Protect with #ifdef SHARED.
1732         (sigwait): Renamed to...
1733         (__pthread_sigwait): ... this.
1734         (sigwait): New strong alias, #ifdef SHARED only.
1735         (raise): Renamed to...
1736         (__pthread_raise): ... this.
1737         (raise): New strong alias, #ifdef SHARED only.
1738         * internals.h (__pthread_sigaction, __pthread_sigwait,
1739         __pthread_raise): New prototypes.
1740         (struct pthread_functions): Add ptr_pthread_sigaction,
1741         ptr_pthread_sigwait, ptr_pthread_raise.
1742         * pthread.c (pthread_functions): Renamed to...
1743         (__pthread_functions): ... this.  No longer static, no longer
1744         SHARED only.  Initialize ptr_pthread_sigaction, ptr_pthread_sigwait
1745         and ptr_pthread_raise.
1746         [SHARED] (ptr_pthread_functions): Change to &__pthread_functions.
1747         * libc-cancellation.c (__pthread_thread_self): Remove weak_extern.
1748         * ptfork.c (__fork, __vfork): Protect with #ifdef SHARED.
1749         * ptlongjmp.c (siglongjmp, longjmp): Protect with #ifdef SHARED.
1751         * Makefile (tests, tests-static): Add tst-cancel-static.
1752         * tst-cancel-static.c: New test.
1754 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
1756         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
1758 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
1760         * sysdeps/pthread/bits/pthreadtypes.h (pthread_cond_t): Add padding.
1761         * condvar.c: Add symbol versioning.  The compatibility versions
1762         are the same as the change in the interface does not effect this
1763         implementation.
1764         * Versions [libpthread]: Add definitions for new pthread_cond_*
1765         interfaces for version GLIBC_2.3.2.
1767 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
1769         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
1770         __register_atfork.
1771         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
1772         for __register_atfork.
1774 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
1776         * sysdeps/i386/i686/pt-machine.h: Use __ASSEMBLER__ instead of
1777         ASSEMBLER test macro.
1778         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Likewise.
1779         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1780         * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Likewise.
1781         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1782         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1783         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1785         * sysdeps/pthread/errno-loc.c (__errno_location): Add
1786         libc_hidden_def.
1787         * sysdeps/pthread/herrno-loc.c (__h_errno_location): Likewise.
1788         * sysdeps/pthread/res-state.c (__res_state): Likewise.
1789         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
1790         __libc_current_sigrtmax): Likewise.
1791         * Versions [libc] (GLIBC_PRIVATE): Remove __libc_internal_tsd_get,
1792         __libc_internal_tsd_set, __libc_internal_tsd_address,
1793         __libc_alloca_cutoff.
1794         [libpthread] (GLIBC_PRIVATE): Remove __libc_internal_tsd_get,
1795         __libc_internal_tsd_set, __libc_internal_tsd_address.
1797         * sysdeps/pthread/list.h: Remove assert.h include.
1798         * sysdeps/unix/sysv/linux/fork.c: Include <fork.h>, not "fork.h".
1800         * sysdeps/pthread/list.h: New file.
1801         * sysdeps/unix/sysv/linux/jmp-unwind.c: New file.
1802         * sysdeps/unix/sysv/linux/fork.c: New file.
1803         * sysdeps/unix/sysv/linux/fork.h: New file.
1804         * sysdeps/unix/sysv/linux/ia64/fork.h: New file.
1805         * sysdeps/unix/sysv/linux/sparc/fork.h: New file.
1806         * sysdeps/unix/sysv/linux/register-atfork.c: New file.
1807         * sysdeps/unix/sysv/linux/unregister-atfork.c: New file.
1808         * sysdeps/unix/sysv/linux/Makefile: New file.
1809         * sysdeps/unix/sysv/linux/Versions: New file.
1810         * ptlongjmp.c (pthread_cleanup_upto): Rename to...
1811         (__pthread_cleanup_upto): ...this. Add targetframe argument,
1812         use it instead of currentframe.  No longer static.
1813         (siglongjmp, longjmp): Remove pthread_cleanup_upto calls.
1814         * internals.h (__pthread_cleanup_upto, __pthread_fork): New prototypes.
1815         (struct pthread_functions): Add ptr_pthread_fork,
1816         ptr_pthread_cleanup_upto.
1817         * pthread.c (pthread_functions): Initialize ptr_pthread_fork and
1818         ptr_pthread_cleanup_upto.
1819         * ptfork.c: Include fork.h.
1820         (struct handler_list, struct handler_list_block): Remove.
1821         (pthread_atfork_lock, pthread_atfork_prepare, pthread_atfork_parent,
1822         pthread_atfork_child): Remove.
1823         (pthread_insert_list, __pthread_atfork, pthread_call_handlers): Remove.
1824         (__pthread_fork): New function.
1825         (__fork, __vfork): Call __libc_fork.
1826         * Makefile (libpthread-routines): Add old_pthread_atfork.
1827         (libpthread-nonshared): Add pthread_atfork.
1828         (others): Depend on $(objpfx)libpthread_nonshared.a.
1829         ($(objpfx)libpthread_nonshared.a): New rule.
1830         (install): Depend on $(inst_libdir)/libpthread.so.
1831         ($(inst_libdir)/libpthread.so, $(inst_libdir)/libpthread_nonshared.a):
1832         New rules.
1833         (tests): Depend on libpthread_nonshared.a too.
1834         * old_pthread_atfork.c: New file.
1835         * pthread_atfork.c: New file.
1836         * Makeconfig (shared-thread-library): Include libpthread_nonshared.a
1837         too.
1839 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
1841         * forward.c: Make all functions available by default again.  It
1842         caused too much trouble.
1843         * internals.h (struct pthread_functions): Rename ptr_pthread_exit
1844         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
1845         ptr___pthread_attr_init_2_*.
1846         * pthread.c (pthread_functions): Adjust.
1848 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
1850         * libc_pthread_init.c (__libc_pthread_init): Remove
1851         MULTIPLE_THREADS_OFFSET check.
1852         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
1853         (SYSINFO_OFFSET): Remove.
1854         * sysdeps/i386/Makefile [csu] (gen-as-const-headers): Add
1855         tcb-offsets.sym.
1856         * sysdeps/i386/tcb-offsets.sym: New file.
1857         * sysdeps/pthread/tcb-offsets.h: New file.
1858         * sysdeps/sparc/sparc32/tls.h: Removed.
1859         * sysdeps/sparc/sparc64/tls.h: Move...
1860         * sysdeps/sparc/tls.h: ...here.  Include tcb-offsets.h in assembler.
1861         * sysdeps/sparc/Makefile: New file.
1862         * sysdeps/sparc/tcb-offsets.sym: New file.
1863         * sysdeps/ia64/tls.h: Include tcb-offsets.h in assembler.
1864         * sysdeps/ia64/Makefile: New file.
1865         * sysdeps/ia64/tcb-offsets.sym: New file.
1866         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
1867         (MULTIPLE_THREADS_OFFSET): Remove.
1868         Replace defined MULTIPLE_THREADS_OFFSET
1869         with defined FLOATING_STACKS && USE___THREAD.
1870         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1871         (MULTIPLE_THREADS_OFFSET): Remove.
1872         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1873         (MULTIPLE_THREADS_OFFSET): Remove.
1874         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1875         (MULTIPLE_THREADS_OFFSET): Remove.
1876         * pthread.c (__pthread_initialize_manager): Remove
1877         MULTIPLE_THREADS_OFFSET cbeck.
1879         * tst-cancel-wrappers.sh: Add line continuations.
1881 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
1883         * sysdeps/pthread/bits/libc-tsd.h: Include linuxthreads/descr.h
1884         and bits/libc-lock.h.
1885         (__libc_internal_tsd_get, __libc_internal_tsd_set,
1886         __libc_internal_tsd_address): Remove.
1887         (__pthread_internal_tsd_address, __pthread_internal_tsd_get,
1888         __pthread_internal_tsd_set): New weak_externs.
1889         (__libc_tsd_address, __libc_tsd_get, __libc_tsd_set): Define
1890         using __libc_maybe_call2.
1891         (__libc_tsd_key_t): Move to ...
1892         * descr.h (__libc_tsd_key_t): ...here.
1893         Remove bits/libc-tsd.h include.
1894         * sysdeps/pthread/errno-loc.c: New file.
1895         * sysdeps/pthread/herrno-loc.c: New file.
1896         * sysdeps/pthread/res-state.c: New file.
1897         * libc-cancellation.c (THREAD_GETMEM, THREAD_SETMEM): Remove.
1898         (__libc_enable_asynccancel, __libc_disable_asynccancel): Use
1899         thread_self unconditionally.  Use LIBC_THREAD_[SG]ETMEM instead
1900         of THREAD_[SG]ETMEM.
1901         * specific.c (libc_internal_tsd_set): Renamed to...
1902         __pthread_internal_tsd_set.  Remove static.
1903         (libc_internal_tsd_get): Renamed to...
1904         __pthread_internal_tsd_get.  Remove static.
1905         (libc_internal_tsd_address): Renamed to...
1906         __pthread_internal_tsd_address.  Remove static.
1907         (__libc_internal_tsd_set, __libc_internal_tsd_get,
1908         __libc_internal_tsd_address, __libc_alloca_cutoff): Remove.
1909         * internals.h [!NOT_IN_libc] (LIBC_THREAD_GETMEM, LIBC_THREAD_SETMEM):
1910         Define.
1911         (__pthread_internal_tsd_set, __pthread_internal_tsd_get,
1912         __pthread_internal_tsd_address): New prototypes.
1913         (struct pthread_functions): Add
1914         ptr_pthread_internal_tsd_([sg]et|address) fields.
1915         [!NOT_IN_libc && !FLOATING_STACKS] (thread_self): Define.
1916         * pthread.c (pthread_functions) [!USE_TLS && !HAVE___THREAD]:
1917         Initialize ptr_pthread_internal_tsd_([sg]et|address) fields.
1918         * Versions (libpthread): Remove __libc_alloca_cutoff@GLIBC_PRIVATE.
1919         * alloca_cutoff.c: New file.
1920         * no-tsd.c: Removed.
1921         * Makefile (routines): Remove no-tsd.  Add alloca_cutoff.
1922         * pt-system.c (system): Remove cancellation handling.
1923         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
1924         cancellation routines.
1926         * sysdeps/i386/tls.h: Include dl-sysdep.h and stdint.h.
1927         (tcbhead_t): Add sysinfo field.
1928         (SYSINFO_OFFSET, INIT_SYSINFO): Define.
1929         (TLS_INIT_TP): Use INIT_SYSINFO.
1930         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
1931         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
1932         (MULTIPLE_THREADS_OFFSET): Adjust.
1933         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1934         (MULTIPLE_THREADS_OFFSET): Likewise.
1935         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1936         (MULTIPLE_THREADS_OFFSET): Likewise.
1937         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1938         (MULTIPLE_THREADS_OFFSET): Likewise.
1939         * descr.h: Include stdint.h.
1940         (struct _pthread_descr_struct): Add p_header.data.sysinfo field.
1942 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
1944         * libc_pthread_init.c: Include stdlib.h.
1945         * sysdeps/i386/tls.h (tcbhead_t): Add multiple_threads member.
1946         (TLS_INIT_TP_EXPENSIVE): Define.
1947         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call,
1948         __libc_maybe_call2): In _LIBC check SHARED define.
1949         * sysdeps/ia64/tls.h: New file.
1950         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
1951         * sysdeps/unix/sysv/linux/ia64/Makefile: New file.
1952         * sysdeps/x86_64/tls.h (TLS_INIT_TP_EXPENSIVE): Define.
1953         * sysdeps/sparc/sparc32/tls.h: New file.
1954         * sysdeps/sparc/sparc64/tls.h: New file.
1955         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
1956         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
1957         * Makefile (tests): Add tst-cancel[1-6].
1958         (tests-reverse): Add tst-cancel5.
1959         Link libc.so before libpthread.so for tests-reverse.
1960         * tst-cancel1.c: New file.
1961         * tst-cancel2.c: New file.
1962         * tst-cancel3.c: New file.
1963         * tst-cancel4.c: New file.
1964         * tst-cancel5.c: New file.
1965         * tst-cancel6.c: New file.
1967 2002-12-27  Andreas Schwab  <schwab@suse.de>
1969         * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: New file.
1971 2002-12-22  Roland McGrath  <roland@redhat.com>
1973         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
1975 2002-12-21  Ulrich Drepper  <drepper@redhat.com>
1977         * pthread.c (init_rtsigs): Remove incomplete __builtin_expect.
1978         Reported by Art Hass <ahaas@airmail.net>.
1980 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
1982         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
1983         Use return 0 as 6th argument to FORWARD4.
1985 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
1987         * sysdeps/i386/useldt.h (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Only
1988         define if __ASSUME_LDT_WORKS > 0.
1989         * libc-cancellation.c (THREAD_GETMEM, THREAD_SETMEM): Redefine to
1990         struct member access if !FLOATING_STACKS.
1991         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
1993 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
1995         * internals.h (__pthread_thread_self): New prototype.
1996         (struct pthread_functions): Add ptr_pthread_thread_self field.
1997         * pthread.c (pthread_functions): Initialize ptr_pthread_thread_self.
1998         (__pthread_thread_self): New function.
1999         * libc-cancellation.c (__pthread_thread_self): Add weak_extern.
2000         (__libc_enable_asynccancel, __libc_disable_asynccancel): Don't
2001         use thread_self() directly if not FLOATING_STACKS.
2003 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
2005         * sysdeps/x86_64/pt-machine.h: Guard most of the header
2006         with #ifndef __ASSEMBLER__.
2007         * pthread.c (pthread_functions): Use SHLIB_COMPAT around
2008         pthread_attr_init_2_0 use.
2010 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
2012         * wrapsyscall.c: Removed.
2013         * weaks.c: Removed.
2014         * Makefile (distribute): Add tst-cancel-wrappers.sh.
2015         (routines): Remove weaks.  Add forward,
2016         libc_pthread_init, libc-cancellation.
2017         (shared-only-routines): Remove weaks.  Add forward.
2018         (libpthread-routines): Remove wrapsyscall.
2019         Add ptw-write, ptw-read, ptw-close, ptw-fcntl, ptw-accept,
2020         ptw-connect, ptw-recv, ptw-recvfrom, ptw-recvmsg, ptw-send,
2021         ptw-sendmsg, ptw-sendto, ptw-fsync, ptw-lseek, ptw-lseek64,
2022         ptw-llseek, ptw-msync, ptw-nanosleep, ptw-open, ptw-open64,
2023         ptw-pause, ptw-pread, ptw-pread64, ptw-pwrite, ptw-pwrite64,
2024         ptw-tcdrain, ptw-wait, ptw-waitpid, pt-system, pt-allocrtsig.
2025         (libpthread-shared-only-routines): Add pt-allocrtsig.
2026         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
2027         ($(objpfx)tst-cancel-wrappers.out): New rule.
2028         * sysdeps/pthread/bits/libc-lock.h: Include linuxthreads/internals.h
2029         if in libc.
2030         (__libc_maybe_call): In libpthread.* don't check for existance
2031         of the function.
2032         (__libc_maybe_call2): Define.
2033         (__libc_lock_init, __libc_lock_fini, __libc_lock_lock,
2034         __libc_lock_trylock, __libc_lock_unlock): Use it.
2035         * sysdeps/pthread/flockfile.c: New file.
2036         * sysdeps/pthread/ftrylockfile.c: New file.
2037         * sysdeps/pthread/funlockfile.c: New file.
2038         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
2039         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
2040         * sysdeps/unix/sysv/linux/allocrtsig.c: New file.
2041         * libc-cancellation.c: New file.
2042         * forward.c: New file.
2043         * libc_pthread_init.c: New file.
2044         * pt-system.c: New file.
2045         * pthread.c: Remove locale.h.
2046         (__pthread_manager_thread): Initialize multiple_threads.
2047         (__pthread_multiple_threads): Declare.
2048         (pthread_functions): New variable.
2049         (__pthread_initialize_minimal): Remove __uselocale call.
2050         Call __libc_pthread_init.
2051         (__pthread_initialize_manager): Initialize __pthread_multiple_threads,
2052         initial thread's multiple_threads and __libc_multiple_threads.
2053         Check MULTIPLE_THREADS_OFFSET value. Initialize manager thread's
2054         multiple_threads.
2055         (pthread_setschedparam, pthread_getschedparam): Rename to __
2056         prefixed variants.  Add strong_alias.
2057         (current_rtmin, current_rtmax, __libc_current_sigrtmin,
2058         __libc_current_sigrtmax, __libc_allocate_rtsig): Remove.
2059         (init_rtsigs): Use __libc_current_sigrtmin_private.
2060         (pthread_initialize): Only call init_rtsigs if
2061         !__ASSUME_REALTIME_SIGNALS.
2062         (__pthread_require_wrappers, __pthread_require_lockfile): Remove.
2063         * internals.h (__pthread_attr_destroy, __pthread_attr_setdetachstate,
2064         __pthread_attr_getdetachstate, __pthread_attr_setschedparam,
2065         __pthread_attr_getschedparam, __pthread_attr_setschedpolicy,
2066         __pthread_attr_getschedpolicy, __pthread_attr_setinheritsched,
2067         __pthread_attr_getinheritsched, __pthread_attr_setscope,
2068         __pthread_attr_getscope, __pthread_cond_init,
2069         __pthread_cond_destroy, __pthread_cond_wait,
2070         __pthread_cond_signal, __pthread_cond_broadcast,
2071         __pthread_condattr_init, __pthread_condattr_destroy,
2072         __pthread_equal, __pthread_getschedparam,
2073         __pthread_setschedparam, __pthread_setcancelstate,
2074         __pthread_setcanceltype, __pthread_enable_asynccancel,
2075         __libc_enable_asynccancel, __libc_pthread_init): New prototype.
2076         (__pthread_mutex_init, __pthread_mutex_destroy,
2077         __pthread_mutex_lock, __pthread_mutex_unlock,
2078         __pthread_mutex_trylock): Likewise.
2079         Add hidden_proto.
2080         (struct pthread_functions): New type.
2081         (__libc_pthread_functions): New variable.
2082         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define.
2083         * descr.h (struct _pthread_descr_struct): Add
2084         p_header.data.multiple_threads field.
2085         * manager.c (pthread_handle_create): Initialize multiple_threads.
2086         * cancel.c (__pthread_enable_asynccancel,
2087         __pthread_disable_asynccancel): New functions.
2088         (__pthread_provide_wrappers): Remove.
2089         (pthread_setcancelstate, pthread_setcanceltype): Rename to __
2090         prefixed variants.  Add strong_alias.
2091         * condvar.c (pthread_cond_init, pthread_cond_destroy,
2092         pthread_cond_wait, pthread_cond_signal, pthread_cond_broadcast,
2093         pthread_condattr_init, pthread_condattr_destroy): Likewise.
2094         * join.c (pthread_exit): Likewise.
2095         * attr.c (pthread_attr_destroy, pthread_attr_setdetachstate,
2096         pthread_attr_getdetachstate, pthread_attr_setschedparam,
2097         pthread_attr_getschedparam, pthread_attr_setschedpolicy,
2098         pthread_attr_getschedpolicy, pthread_attr_setinheritsched,
2099         pthread_attr_getinheritsched, pthread_attr_setscope,
2100         pthread_attr_getscope): Likewise.
2101         * mutex.c (__pthread_mutex_init, __pthread_mutex_destroy,
2102         __pthread_mutex_lock, __pthread_mutex_unlock,
2103         __pthread_mutex_trylock): Add hidden_def.
2104         * Versions (libc): Add __libc_pthread_init,
2105         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
2106         __libc_allocate_rtsig_private @@GLIBC_PRIVATE.
2107         * lockfile.c: Remove some USE_IN_LIBIO guards.
2108         (__pthread_provide_lockfile): Remove.
2109         * pt-allocrtsig.c: New file.
2110         * tst-cancel-wrappers.sh: New test.
2112 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
2114         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
2115         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
2116         * wrapsyscall.c: Remove creat, poll, pselect, readv, select,
2117         sigpause, sigsuspend, sigwaitinfo, waitid, and writev wrappers.
2119 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
2121         * wrapsyscall.c (CANCELABLE_SYSCALL): Don't define function as
2122         weak.  There is no reason for that.
2123         (CANCELABLE_SYSCALL_VA): Likewise.
2125 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
2127         * wrapsyscall.c: Add wrappers for creat, poll, pselect, readv, select,
2128         sigpause, __xpg_sigpause, sigsuspend, sigwaitinfo, waitid, and writev.
2129         * Versions: Export creat, poll, pselect, readv, select, sigpause,
2130         __xpg_sigpause, sigsuspend, sigwaitinfo, waitid, and writev from
2131         libpthread in version GLIBC_2.3.2.
2133 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
2135         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
2137 2002-12-05  Roland McGrath  <roland@redhat.com>
2139         * pthread.c (__pthread_initialize_minimal)
2140         [USE_TLS && SHARED && !USE___THREAD]: Initialize TLS and set up the
2141         TCB if the dynamic linker didn't do it at startup.
2143         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
2144         string.
2145         (TLS_DO_SET_THREAD_AREA, TLS_DO_MODIFY_LDT, TLS_SETUP_GS_SEGMENT):
2146         Submacros updated.
2147         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
2148         * sysdeps/alpha/tls.h (TLS_INIT_TP): Likewise (always zero).
2150 2002-12-03  Roland McGrath  <roland@redhat.com>
2152         * pthread.c (pthread_initialize) [SHARED]: Copy dl_error_tsd value
2153         from dynamic linker internal cell to new libc cell.
2155 2002-11-28  Roland McGrath  <roland@redhat.com>
2157         * tst-context.c: #define IS_IN_libpthread around #include <tls.h>
2158         before other headers, so FLOATING_STACKS is not defined wrongly.
2160         * sysdeps/i386/tls.h [!IS_IN_libpthread]: Enable TLS support
2161         even if [! FLOATING_STACKS].
2162         (TLS_DO_MODIFY_LDT_KERNEL_CHECK): New macro.
2163         If not under [__ASSUME_LDT_WORKS > 0], then do a runtime check of
2164         dl_osversion >= 2.3.99 and fatal if not.
2165         (TLS_DO_MODIFY_LDT): Use it.
2167 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
2169         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
2170         require it to 200112L.  Remove _POSIX_POLL and _POSIX_SELECT.
2171         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2173 2002-11-19  Ulrich Drepper  <drepper@redhat.com>
2175         * Versions (libc: GLIBC_2.0): Remove names of functions which are
2176         not defined in libc.
2177         * Makefile (shared-only-routines): Add weaks.
2178         * weaks.c: Remove functions which are not exported from libc.so.
2180 2002-11-14  Roland McGrath  <roland@redhat.com>
2182         * libc-tsd.c: New file.
2183         * Makefile (distribute): Add it.
2184         (libc-link.so): New variable.
2185         ($(objpfx)libpthread.so): Depend on that instead of libc.so file name.
2186         (libc-ok-for-link): New variable.
2187         [$(versioning) = yes]: Include $(common-objpfx)tls.make and define
2188         libc-ok-for-link to $(use-thread).
2189         [$(libc-ok-for-link) = no]
2190         (libc-link.so): Set to $(objpfx)libc.so, not $(common-objpfx)libc.so.
2191         ($(objpfx)libc_pic_lite.a,$(objpfx)libc_pic_lite.os, $(objpfx)libc.so):
2192         New targets.
2193         (generated): Append them.
2194         (extra-objs): Append libc-tsd.os.
2196         * libc-tls-loc.c: New file.
2197         * Makefile (libpthread-routines): Add it.
2199 2002-11-14  Andreas Schwab  <schwab@suse.de>
2201         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Fix unterminated
2202         string.
2204 2002-11-13  Roland McGrath  <roland@redhat.com>
2206         * Examples/ex6.c (main): Improve error reporting.
2208 2002-11-04  Ulrich Drepper  <drepper@redhat.com>
2210         * sysdeps/i386/Makefile: Compile pthread.c and sighandler.c with
2211         -fno-omit-frame-pointer.  Patch by Andreas Steinmetz <ast@domdv.de>.
2213         * sysdeps/i386/useldt.h [PIC] (USETLS_LOAD_EBX): Use correct input
2214         register number.
2215         (DO_SET_THREAD_AREA): Mark asm output specifiers correctly.
2217 2002-10-22  Jakub Jelinek  <jakub@redhat.com>
2219         * manager.c (pthread_start_thread): Call __uselocale even
2220         if [! SHARED].  Patch by Leon Kanter <leon@geon.donetsk.ua>.
2222 2002-10-17  Roland McGrath  <roland@redhat.com>
2224         * Makefile (unload): Don't link in libpthread.so.
2225         ($(objpfx)unload.out): Do depend on it.
2226         * unload.c (main): Improve error reporting.
2228 2002-10-09  Roland McGrath  <roland@redhat.com>
2230         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
2231         Under [__PIC__], call the function via the pointer fetched for
2232         comparison rather than a call by name that uses the PLT.
2233         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
2234         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
2235         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
2236         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
2237         (__libc_key_create, __libc_getspecific, __libc_setspecific)
2238         (__libc_atfork): Use it.
2240         * pthread.c [SHARED] (__libc_dl_error_tsd): New function.
2241         (pthread_initialize) [SHARED]: Set _dl_error_catch_tsd to that.
2242         * Versions (libc: GLIBC_PRIVATE): Add __libc_dl_error_tsd.
2243         (ld: GLIBC_PRIVATE): Set removed.
2245 2002-10-11  Ulrich Drepper  <drepper@redhat.com>
2247         * sysdeps/unix/sysv/linux/execve.c: New file.
2249 2002-10-09  Jakub Jelinek  <jakub@redhat.com>
2251         * no-tsd.c: Include stdlib.h.
2253 2002-10-07  Jakub Jelinek  <jakub@redhat.com>
2255         * sysdeps/unix/sysv/linux/allocalim.h: New file.
2256         * descr.h (struct _pthread_descr_struct): Add p_alloca_cutoff
2257         field.
2258         * manager.c (__pthread_allocate_stack): Add out_stacksize argument.
2259         Pass stack size to caller.
2260         (pthread_handle_create): Set p_alloca_cutoff.
2261         * pthread.c (__pthread_initial_thread): Use C99 designated
2262         initializers.  Set p_alloca_cutoff.
2263         (__pthread_manager_thread): Likewise.
2264         (__pthread_initialize_minimal) [USE_TLS]: Set p_alloca_cutoff
2265         for initial thread.
2266         (__pthread_init_max_stacksize): Possibly decrease p_alloca_cutoff
2267         for initial thread.
2268         (__pthread_initialize_manager) [USE_TLS]: Set p_alloca_cutoff
2269         for manager thread.
2270         * specific.c (__libc_alloca_cutoff): New function.
2271         * no-tsd.c (__libc_alloca_cutoff): New function.
2272         * Versions: Export __libc_alloca_cutoff@@GLIBC_PRIVATE from libc
2273         and libpthread.
2275 2002-10-02  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2277         * sysdeps/sh/pt-machine.h: Make C code ifndef'ed with __ASSEMBLER__.
2278         * sysdeps/sh/tls.h: Likewise.
2279         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
2281 2002-09-29  Jakub Jelinek  <jakub@redhat.com>
2283         * sysdeps/pthread/tst-timer.c (main): Clear
2284         SIGEV2.sigev_notify_attributes.
2286 2002-09-29  Ulrich Drepper  <drepper@redhat.com>
2288         * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Don't use
2289         INLINE_SYSCALL for set_thread_area syscall.
2291 2002-09-28  Roland McGrath  <roland@redhat.com>
2293         * pthread.c (__pthread_reset_main_thread) [FLOATING_STACKS]:
2294         Don't call setrlimit, since we did no prior bogon we need to undo.
2296 2002-09-27  Roland McGrath  <roland@redhat.com>
2298         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Don't include <pt-machine.h>.
2300 2002-09-24  Roland McGrath  <roland@redhat.com>
2302         * sysdeps/x86_64/tls.h: New file.
2304 2002-09-23  Roland McGrath  <roland@redhat.com>
2306         * Examples/ex13.c (dump_mut): int -> size_t for counter.
2308 2002-09-18  Bruno Haible  <bruno@clisp.org>
2310         * Examples/ex10.c (thread): Fail if pthread_mutex_timedlock() returns
2311         an unexpected error code.
2313         * internals.h (__pthread_message): Add const to first parameter type.
2314         * pthread.c (__pthread_message): Likewise.
2316         * sysdeps/unix/sysv/linux/configure: Moved to ../sysdeps/pthread.
2318 2002-09-17  Roland McGrath  <roland@redhat.com>
2320         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT, TLS_DO_SET_THREAD_AREA):
2321         Set the descriptor limit to the full 4GB, so %gs:OFFSET works for any
2322         offset (positive or negative) relative to the thread struct.
2323         * sysdeps/i386/useldt.h (DO_MODIFY_LDT, DO_SET_THREAD_AREA): Likewise.
2325 2002-09-12  Jakub Jelinek  <jakub@redhat.com>
2327         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Move...
2328         * sysdeps/unix/sysv/linux/sparc/Makefile: ...here.
2329         Replace /usr/lib/crt[in].o with crt[in].o too.
2331 2002-09-11  Steven Munroe  <sjmunroe@us.ibm.com>
2333         * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
2335 2002-09-04  Bruno Haible  <bruno@clisp.org>
2337         * pthread.c: Include <sys/time.h>.
2338         (is_smp_system): Move to sysdeps/unix/sysv/linux/smp.h.
2339         * sysdeps/unix/sysv/linux/smp.h: New file, extracted from pthread.c.
2340         * Makefile (distribute): Add smp.h to the list.
2342 2002-09-04  Bruno Haible  <bruno@clisp.org>
2344         * sysdeps/alpha/pt-machine.h: Choose different include file location
2345         on non-Linux platforms.
2347         * wrapsyscall.c (PROMOTE_INTEGRAL_TYPE): New macro.
2348         (open, open64): Change va_arg argument type to the integral type to
2349         which mode_t promotes.
2351         * sysdeps/pthread/tst-timer.c (main): Don't assume anything about
2352         the structure of 'struct sigevent'.
2354         * errno.c (__errno_location, __h_errno_location, __res_state):
2355         Use prototype function definitions.
2357 2002-07-29  Steven Munroe  <sjmunroe@us.ibm.com>
2359         * shlib-versions: Set libpthread version to 2.3 for powerpc64.
2360         * sysdeps/powerpc/pt-machine.h: moved to...
2361         * sysdeps/powerpc/powerpc32/pt-machine.h: ...here
2362         * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
2364 2002-09-02  Roland McGrath  <roland@redhat.com>
2366         * sysdeps/powerpc/Makefile (CFLAGS-pt-initfini.s): New variable.
2368 2002-09-01  Roland McGrath  <roland@redhat.com>
2370         * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t): Add new keys
2371         CTYPE_B, CTYPE_TOLOWER, CTYPE_TOUPPER.
2373         * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_address): New macro.
2374         (__libc_internal_tsd_address): Declare it.
2375         * Versions (libc, ld, libpthread: GLIBC_PRIVATE): Add
2376         __libc_internal_tsd_address.
2377         * specific.c (libc_internal_tsd_address): New function.
2378         (__libc_internal_tsd_address): New variable.
2379         * no-tsd.c (__libc_internal_tsd_address): New variable.
2381 2002-08-31  Ulrich Drepper  <drepper@redhat.com>
2383         * Makefile: Don't use rule for crt%.o, spell it out as rules for
2384         crti.o and crtn.o.
2386 2002-08-30  Roland McGrath  <roland@redhat.com>
2388         * Makefile (extra-objs, omit-deps): Add crtn.
2389         ($(objpfx)libpthread.so): Depend on $(objpfx)crtn.o.
2390         ($(objpfx)libpthread.so: +postinit): Append $(objpfx)crtn.o.
2391         ($(objpfx)crtn.S): New target.
2392         ($(objpfx)crt%.o): Pattern rule replaces crti.o target.
2393         (generated): Add crtn.S.
2395         * sysdeps/unix/sysv/linux/x86_64/Makefile ($(objpfx)specs): Massage
2396         crtn.o pathname too.
2398 2002-08-30  Jakub Jelinek  <jakub@redhat.com>
2400         * pthread.c (__pthread_initialize_minimal): Call __uselocale even
2401         if [! SHARED].
2403 2002-08-30  Roland McGrath  <roland@redhat.com>
2405         * tst-static-locale.c: New file.
2406         * Makefile (tests, tests-static): Add it.
2408 2002-04-24  Steven Munroe  <sjmunroe@us.ibm.com>
2410         * spinlock.c (__pthread_lock): Fix spurious wakeup
2411         handling.  Don't clear lowest bit of list pointer as sign the thread
2412         is still on the wait list.  Don't restart after spurious wakeup
2413         with spinning to get the lock.
2414         (__pthread_unlock): Take set lowest bit into account when handling
2415         pointer to list elements.
2416         Patch by Steve Munroe <sjmunroe@us.ibm.com>.
2418 2002-08-28  Roland McGrath  <roland@redhat.com>
2420         * sysdeps/pthread/timer_routines.c (thread_func): Fix type in cast.
2422 2002-08-28  Jakub Jelinek  <jakub@redhat.com>
2424         * sysdeps/unix/sysv/linux/hppa/aio_cancel.c: New file.
2425         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
2426         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
2428 2002-08-28  Ulrich Drepper  <drepper@redhat.com>
2430         * sysdeps/pthread/timer_routines.c (thread_func): Change return
2431         type to void and add casts in use to avoid warnings with all gcc
2432         versions.
2434 2002-08-08  Jakub Jelinek  <jakub@redhat.com>
2436         * sysdeps/unix/sysv/linux/bits/local_lim.h (PTHREAD_THREADS_MAX):
2437         Bump to 16384.
2438         * manager.c (__pthread_handles): Remove.
2439         * pthandles.c: New file.
2440         * pthread.c (__pthread_initialize_minimal): Initialize
2441         __pthread_handles[0] and __pthread_handles[1].
2442         * Makefile (libpthread-routines): Add pthandles (must be last).
2444 2002-08-26  Brian Youmans  <3diff@gnu.org>
2446         * Examples/ex10.c: Corrected version number in Lesser GPL copying
2447         permission notice from 2 to 2.1.
2448         * Examples/ex11.c: Likewise.
2449         * Examples/ex13.c: Likewise.
2450         * Examples/ex8.c: Likewise.
2451         * Examples/ex9.c: Likewise.
2452         * barrier.c: Likewise.
2453         * events.c: Likewise.
2454         * lockfile.c: Likewise.
2455         * no-tsd.c: Likewise.
2456         * pt-machine.c: Likewise.
2457         * ptclock_gettime.c: Likewise.
2458         * ptclock_settime.c: Likewise.
2459         * rwlock.c: Likewise.
2460         * sysdeps/alpha/pspinlock.c: Likewise.
2461         * sysdeps/alpha/pt-machine.h: Likewise.
2462         * sysdeps/arm/pspinlock.c: Likewise.
2463         * sysdeps/arm/pt-machine.h: Likewise.
2464         * sysdeps/cris/pspinlock.c: Likewise.
2465         * sysdeps/cris/pt-machine.h: Likewise.
2466         * sysdeps/hppa/pspinlock.c: Likewise.
2467         * sysdeps/hppa/pt-machine.h: Likewise.
2468         * sysdeps/i386/i686/pt-machine.h: Likewise.
2469         * sysdeps/i386/pspinlock.c: Likewise.
2470         * sysdeps/i386/pt-machine.h: Likewise.
2471         * sysdeps/i386/useldt.h: Likewise.
2472         * sysdeps/ia64/pspinlock.c: Likewise.
2473         * sysdeps/ia64/pt-machine.h: Likewise.
2474         * sysdeps/m68k/pspinlock.c: Likewise.
2475         * sysdeps/m68k/pt-machine.h: Likewise.
2476         * sysdeps/mips/pspinlock.c: Likewise.
2477         * sysdeps/mips/pt-machine.h: Likewise.
2478         * sysdeps/powerpc/pspinlock.c: Likewise.
2479         * sysdeps/powerpc/pt-machine.h: Likewise.
2480         * sysdeps/pthread/bits/initspin.h: Likewise.
2481         * sysdeps/pthread/bits/libc-lock.h: Likewise.
2482         * sysdeps/pthread/bits/libc-tsd.h: Likewise.
2483         * sysdeps/pthread/getcpuclockid.c: Likewise.
2484         * sysdeps/pthread/posix-timer.h: Likewise.
2485         * sysdeps/pthread/timer_create.c: Likewise.
2486         * sysdeps/pthread/timer_delete.c: Likewise.
2487         * sysdeps/pthread/timer_getoverr.c: Likewise.
2488         * sysdeps/pthread/timer_gettime.c: Likewise.
2489         * sysdeps/pthread/timer_routines.c: Likewise.
2490         * sysdeps/pthread/timer_settime.c: Likewise.
2491         * sysdeps/pthread/tst-timer.c: Likewise.
2492         * sysdeps/s390/pspinlock.c: Likewise.
2493         * sysdeps/s390/s390-32/pt-machine.h: Likewise.
2494         * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2495         * sysdeps/sh/pspinlock.c: Likewise.
2496         * sysdeps/sh/pt-machine.h: Likewise.
2497         * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
2498         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2499         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
2500         * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
2501         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2502         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
2503         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
2504         * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
2505         * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
2506         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2507         * tststack.c: Likewise.
2508         * unload.c: Likewise.
2509         * weaks.c: Likewise.
2510         * wrapsyscall.c: Likewise.
2512         * sysdeps/pthread/pt-initfini.c: Changed copying
2513         permission notice to Lesser GPL from Library GPL, including the
2514         references in the special exception.
2515         * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Likewise.
2516         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Likewise.
2517         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c:
2518         Likewise.
2519         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c:
2520         Likewise.
2521         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Likewise.
2523 2002-08-26  Ulrich Drepper  <drepper@redhat.com>
2525         * Examples/ex10.c (thread): tv_nsec == 1000000000 is already
2526         overflow [PR libc/4244].
2528 2002-08-25  Ulrich Drepper  <drepper@redhat.com>
2530         * sysdeps/pthread/timer_routines.c (thread_func): Make the
2531         compiler happy by adding a return statement which will never be
2532         reached.
2534         * tst-context.c (main): Cast to long before casting to pointer.
2536         * Examples/ex17.c (main): Use correct format string.
2538         * Examples/ex9.c (thread): Remove incorrect return statement.
2540 2002-08-23  Ulrich Drepper  <drepper@redhat.com>
2542         * pthread.c (__linuxthreads_version): New global constant.
2544 2002-08-23  Andreas Jaeger  <aj@suse.de>
2546         * sysdeps/x86_64/pt-machine.h: Use %fs instead of %gs
2547         as thread specific register.
2548         (testandset): Fix inline asm.
2549         (THREAD_GETMEM): Fix inline asm.
2551 2002-08-22  Roland McGrath  <roland@redhat.com>
2553         * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Remove [HAVE_TLS_SUPPORT]
2554         conditional.
2555         (INIT_THREAD_SELF): Pass second arg to DO_SET_THREAD_AREA.
2556         (DO_SET_THREAD_AREA): Take second arg, pass to DO_SET_THREAD_AREA_REUSE
2557         macro.  That chooses whether to reuse %gs value or let kernel set it.
2558         [USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, always 1.
2559         [!USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, true if arg is
2560         not constant 0.
2562 2002-08-21  Ulrich Drepper  <drepper@redhat.com>
2564         * sysdeps/i386/tls.h (TLS_SETUP_GS_SEGMENT): Add new parameter
2565         also to the third definition of this macro.
2567 2002-06-17  Andreas Jaeger  <aj@suse.de>
2569         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
2570         Set it.
2572 2002-08-20  Ulrich Drepper  <drepper@redhat.com>
2574         * sysdeps/i386/useldt.h: Go back to using 16-bit instructions when
2575         loading/reading segment registers.  Some old hardware doesn't
2576         handle the 32-bit instructions as expected.
2577         * sysdeps/i386/tls.h: Likewise.
2579         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Second parameter is
2580         renamed to secondcall and use is negated.
2581         (TLS_SETUP_GS_SEGMENT): Likewise.
2582         (TLS_INIT_TP): Likewise.
2583         * sysdeps/sh/tls.h (TLS_INIT_TP): Second parameter is renamed to
2584         secondcall.
2586         * sysdeps/i386/tls.h: Use 32-bit operations when handling segment
2587         registers.  No need to mask upper 16 bits in this case.
2588         * sysdeps/i386/useldt.h: Likewise.
2589         (DO_SET_THREAD_AREA): We have to load %gs again even if the value
2590         is the same since the GDT content changed.
2592         * sysdeps/i386/tls.h (TLS_INIT_TP): Add new parameter and pass it on
2593         to TLS_SETUP_GS_SEGMENT.
2594         (TLS_SETUP_GS_SEGMENT): Add new parameter and pass it on to
2595         TLS_DO_SET_THREAD_AREA.
2596         (TLS_DO_SET_THREAD_AREA): If new parameter is zero determine
2597         entry number from %gs value.
2598         * sysdeps/sh/tls.h (TLS_INIT_TP): Add new parameter and simply
2599         ignore it.
2601         * manager.c (pthread_handle_create): Pass NULL to _dl_allocate_tls.
2602         Pass true to _dl_deallocate_tls.
2603         (pthread_free): Likewise.
2604         * pthread.c (__pthread_initialize_manager): Likewise.
2606 2002-08-19  Ulrich Drepper  <drepper@redhat.com>
2608         * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Use correct shift when
2609         computing index from %gs value.
2611 2002-08-16  Roland McGrath  <roland@redhat.com>
2613         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Calculate segment
2614         register value from entry number properly.
2616         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Rewrite asm to use %ebx
2617         optimally conditional on [__PIC__].
2618         (TLS_DO_SET_THREAD_AREA): New macro, implement inline syscall
2619         without touching errno, and use latest modify_ldt-like interface.
2620         (TLS_SETUP_GS_SEGMENT): Use that instead of INLINE_SYSCALL.
2621         * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Set %gs in this macro.
2622         (DO_SET_THREAD_AREA): New macro, uses current syscall interface with
2623         existing %gs value as the segment to set.
2624         (INIT_THREAD_SELF): Rewritten using those.  Use set_thread_area only
2625         under [HAVE_TLS_SUPPORT] so we can rely on the initialization done
2626         by the first thread's early TLS setup.
2628 2002-08-15  Roland McGrath  <roland@redhat.com>
2630         * sysdeps/i386/tls.h (TLS_INIT_TP): Use statement expression and
2631         return a value as callers now expect.
2633 2002-08-11  Roland McGrath  <roland@redhat.com>
2635         * pthread.c (__pthread_initialize_manager): Initialize
2636         p_header.data.tcb field of manager thread's descriptor.
2637         (__pthread_initialize_minimal): Don't initialize p_header.data.self
2638         field, already done by TLS_INIT_TP.
2640         * manager.c (pthread_handle_create): Move p_header field initializers
2641         together.
2643 2002-08-08  Ulrich Drepper  <drepper@redhat.com>
2645         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Removed.
2647 2002-08-07  Ulrich Drepper  <drepper@redhat.com>
2649         * pthread.c (__linuxthreads_initial_report_events): New variable.
2650         (__pthread_initialize_manager): Use it to initialize p_report_events
2651         of initial thread.
2652         [TLS]: Store pointer to descriptor of manager in __pthread_handles.
2654 2002-08-07  Roland McGrath  <roland@redhat.com>
2656         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Add an extra argument with
2657         an "m" constraint to the asm so the compiler knows LDT_ENTRY was used.
2659 2002-08-02  Roland McGrath  <roland@redhat.com>
2661         * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t):
2662         Add _LIBC_TSD_KEY_LOCALE.
2663         * manager.c (pthread_start_thread) [!(USE_TLS && HAVE___THREAD)]:
2664         Call __uselocale to initialize our per-thread locale pointer to
2665         the global one.
2666         * pthread.c (__pthread_initialize_minimal): Likewise.
2668         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Add missing \s.
2670 2002-08-02  Ulrich Drepper  <drepper@redhat.com>
2672         * pthread.c: Declare _errno, _h_errno, and _res unless we use TLS
2673         internally.
2675         * cancel.c (__pthread_perform_cleanup) [USE_TLS && HAVE___THREAD]:
2676         Don't use p_libc_specific element in thread descriptor.
2678 2002-07-30  Roland McGrath  <roland@redhat.com>
2680         * sysdeps/pthread/bits/libc-tsd.h: Include <tls.h>.
2681         [USE_TLS && HAVE___THREAD]: Just include the sysdeps/generic file,
2682         which does the right thing when __thread support is available.
2683         * descr.h (struct _pthread_descr_struct) [USE_TLS && HAVE___THREAD]:
2684         Omit `p_libc_specific', `p_errnop', `p_errno', `p_h_errnop',
2685         `p_h_errno', `p_resp', and `p_res' members.
2686         * pthread.c (__pthread_initialize_minimal) [USE_TLS && HAVE___THREAD]:
2687         Don't initialize `p_errnop' and `p_h_errnop' members.
2688         (__pthread_reset_main_thread): Likewise.
2689         (__pthread_initialize_manager): Likewise.
2690         * manager.c (__pthread_manager, pthread_handle_create): Likewise.
2691         * pthread.c (pthread_initialize) [USE_TLS && HAVE___THREAD]:
2692         Don't initialize `p_resp' member.
2693         (__pthread_reset_main_thread): Likewise.
2694         * manager.c (pthread_handle_create): Likewise.
2695         * specific.c (libc_internal_tsd_set, libc_internal_tsd_get):
2696         Conditionalize these on [!(USE_TLS && HAVE___THREAD)].
2697         * no-tsd.c: Conditionalize contents on [!(USE_TLS && HAVE___THREAD)].
2698         * errno.c [USE_TLS && HAVE___THREAD]
2699         (__h_errno_location, __res_state): Don't define these at all.
2701         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens around arguments!
2702         (INSTALL_NEW_DTV, GET_DTV): Likewise.
2703         * sysdeps/sh/tls.h (INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV): Likewise.
2705         * weaks.c: Don't include <errno.h> here.
2707 2002-08-01  Roland McGrath  <roland@redhat.com>
2709         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): New macro, broken out of
2710         TLS_INIT_TP.
2711         (TLS_DO_SET_THREAD_AREA): New macro, uses thread_set_area syscall.
2712         (TLS_SETUP_GS_SEGMENT): New macro, try one or the other or both.
2713         (TLS_INIT_TP): Use that.
2715 2002-08-02  Jakub Jelinek  <jakub@redhat.com>
2717         * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Move from INIT_THREAD_SELF.
2718         (INIT_THREAD_SELF): Use sys_thread_area syscall instead if available.
2719         (FREE_THREAD): Avoid modify_ldt if using GDT.
2720         * sysdeps/i386/pspinlock.c (__have_no_set_thread_area): New variable.
2722 2002-07-25  Jakub Jelinek  <jakub@redhat.com>
2724         * sysdeps/i386/tls.h: Use __ASSEMBLER__ test macro not ASSEMBLER.
2725         * sysdeps/i386/pt-machine.h: Likewise.
2726         * sysdeps/i386/useldt.h: Likewise.
2728 2002-07-22  Ulrich Drepper  <drepper@redhat.com>
2730         * pthread.c (__pthread_initialize_minimal): If !SHARED and TLS
2731         call __libc_setup_tls first.
2732         * Makefile: Actually create tst-signal.out file when running the test.
2733         (tests): Add tststatic.
2734         * Examples/tststatic.c: New file.
2736 2002-07-19  Ulrich Drepper  <drepper@redhat.com>
2738         * errno.c (__errno_location): Don't define unless !USE_TLS
2739         || !HAVE___THREAD.
2740         * sysdeps/i386/pt-machine.c: Protect C code with #ifndef ASSEMBLER.
2741         * sysdeps/i386/tls.h: Likewise.
2742         * sysdeps/i386/useldt.h: Likewise.
2743         * sysdeps/i386/i686/pt-machine.h: Likewise.
2745 2002-07-02  H.J. Lu  <hjl@gnu.org>
2747         * sysdeps/mips/pspinlock.c: Don't include <sgidefs.h>.  Always
2748         use ll/sc.
2749         * sysdeps/mips/pt-machine.h: Likewise.
2751 2002-07-14  Ulrich Drepper  <drepper@redhat.com>
2753         * manager.c (pthread_handle_create): Initialize self-reference in
2754         descriptor.
2756 2002-07-01  Jakub Jelinek  <jakub@redhat.com>
2758         * Examples/ex9.c (main): Remove unused th variable.
2760 2002-07-10  Ulrich Drepper  <drepper@redhat.com>
2762         * wrapsyscall.c: Add __nanosleep alias.
2763         * Versions (GLIBC_2.2.6): Add __nanosleep.
2764         * bug-sleep.c: New file.
2765         * Makefile (tests): Add bug-sleep.
2767 2002-06-19  Steven Munroe  <sjmunroe@vnet.ibm.com>
2769         * Examples/ex9.c (main):  Use list of children and join them.
2770         (thread): Do not call exit.
2772 2002-06-20  Ulrich Drepper  <drepper@redhat.com>
2774         * spinlock.c (wait_node_alloc): We cannot use compare-and-exchange.
2775         Unconditionally use the code using spinlock.  Use __pthread_release
2776         to free a spinlock.
2777         (wait_node_free): Likewise.
2778         (__pthread_acquire, __pthread_release): Unconditionally define.
2780 2002-06-07  Jakub Jelinek  <jakub@redhat.com>
2782         * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Fix typo.
2784 2002-05-24  Ulrich Drepper  <drepper@redhat.com>
2786         * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Use __sync_synchronize.
2788 2002-05-21  Ulrich Drepper  <drepper@redhat.com>
2790         * sysdeps/pthread/pthread.h (pthread_create): Rename first
2791         parameter.
2792         (pthread_cancel): Likewise.
2793         * internals.h (__pthread_create_2_1): Likewise.
2794         * sysdeps/unix/sysv/linux/bits/sigthread.h (pthread_kill): Likewise.
2796 2002-05-20  Ulrich Drepper  <drepper@redhat.com>
2798         * sysdeps/alpha/pt-machine.c (THREAD_SELF): Remove clobber.
2799         Patch by Glen Nakamura <gen@flex.com>.
2801 2002-05-03  Ulrich Drepper  <drepper@redhat.com>
2803         * signals.c: Move sighandler functions to...
2804         * sighandler.c: ...here.  New file.
2805         * signals.c: Move signal handler related type definitions to...
2806         * internals.h: ...here.  Add prototypes for signal handlers.
2807         * Makefile (libpthread-routines): Add sighandler.
2808         (CFLAGS-sighandler.c): Add $(exceptions).
2810 2002-04-30  Jakub Jelinek  <jakub@redhat.com>
2812         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
2814 2002-04-08  Ulrich Drepper  <drepper@redhat.com>
2816         * sysdeps/pthread/timer_getoverr.c: Return real overrun.
2817         * sysdeps/pthread/posix-timer.h (struct timer_node): Add overrun_count.
2818         * sysdeps/pthread/timer_routines.c (thread_func): Schedule next timeout
2819         based on previous one and not on current time.  Count overruns.
2820         Patch by Eric F. Sorton <eric@cctcorp.com>.
2822         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add DELAYTIMER_MAX.
2824 2002-04-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
2826         * sysdeps/sh/pt-machine.h: Define _PT_MACHINE_H
2827         if it isn't defined yet.
2828         (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Defined.
2829         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
2830         Likewise.
2831         * sysdeps/sh/tls.h: New file.
2833 2002-04-08  Jakub Jelinek  <jakub@redhat.com>
2835         * manager.c (__pthread_manager_event): Use self instead of arg
2836         for INIT_THREAD_SELF.
2837         * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Use sizeof (struct
2838         _pthread_descr_struct) instead of sizeof (*descr).
2840 2002-04-05  Ulrich Drepper  <drepper@redhat.com>
2842         * sysdeps/ia64/pt-machine.h: Protect against multiple inclusion.
2843         * sysdeps/alpha/pt-machine.h: Likewise.
2844         * sysdeps/arm/pt-machine.h: Likewise.
2845         * sysdeps/cris/pt-machine.h: Likewise.
2846         * sysdeps/hppa/pt-machine.h: Likewise.
2847         * sysdeps/m68k/pt-machine.h: Likewise.
2848         * sysdeps/mips/pt-machine.h: Likewise.
2849         * sysdeps/powerpc/pt-machine.h: Likewise.
2850         * sysdeps/s390/s390-32/pt-machine.h: Likewise.
2851         * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2852         * sysdeps/sh/pt-machine.h: Likewise.
2853         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2854         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2855         * sysdeps/x86_64/pt-machine.h: Likewise.
2857 2002-04-05  Jakub Jelinek  <jakub@redhat.com>
2859         * man/pthread_mutexattr_init.man (pthread_mutexattr_settype): Document
2860         instead of pthread_mutexattr_setkind_np.
2861         (pthread_mutexattr_gettype): Similarly.
2862         * man/pthread_mutexattr_setkind_np.man: New.
2863         * man/Makefile (SOURCES): Add pthread_mutexattr_setkind_np.man.
2865 2002-04-02  Ulrich Drepper  <drepper@redhat.com>
2867         * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Define.
2869 2002-03-22  Jakub Jelinek  <jakub@redhat.com>
2871         * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Remove.
2873 2002-03-22  Ulrich Drepper  <drepper@redhat.com>
2875         * internals.h (MEMORY_BARRIER): Define as asm with memory as clobber.
2877 2002-03-17  Andreas Jaeger  <aj@suse.de>
2879         * sysdeps/i386/pt-machine.h: Add testandset and __compare_and_swap
2880         prototpyes.
2881         * sysdeps/alpha/pt-machine.h: Likewise.
2882         * sysdeps/arm/pt-machine.h: Likewise.
2883         * sysdeps/cris/pt-machine.h: Likewise.
2884         * sysdeps/hppa/pt-machine.h: Likewise.
2885         * sysdeps/i386/i686/pt-machine.h: Likewise.
2886         * sysdeps/ia64/pt-machine.h: Likewise.
2887         * sysdeps/m68k/pt-machine.h: Likewise.
2888         * sysdeps/mips/pt-machine.h: Likewise.
2889         * sysdeps/powerpc/pt-machine.h: Likewise.
2890         * sysdeps/s390/s390-32/pt-machine.h: Likewise.
2891         * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2892         * sysdeps/sh/pt-machine.h: Likewise.
2893         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2894         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2895         * sysdeps/x86_64/pt-machine.h: Likewise.
2897         * internals.h: Move testandset and __compare_and_swap prototypes
2898         to pt-machine.h.
2900 2002-03-03  Andreas Jaeger  <aj@suse.de>
2902         * errno.c: Include resolv.h to avoid warning.
2904 2002-02-27  Ulrich Drepper  <drepper@redhat.com>
2906         * pthread.c [USE_TLS] (thread_self_stack): Correct check for upper
2907         stack limit.
2909 2002-02-23  Ulrich Drepper  <drepper@redhat.com>
2911         * attr.c (pthread_getattr_np): Don't take thread descriptor size
2912         into account if USE_TLS.
2913         * manager.c (pthread_handle_create): Free TLS data structures if call
2914         failed.  Pass correct stack to clone if USE_TLS.
2915         * sysdeps/i386/pt-machine.h: Handle multiple inclusion.
2916         * sysdeps/i386/i686/pt-machine.h: Likewise.
2917         * sysdeps/i386/tls.h: Unconditionally include <pt-machine.h>.
2919         * descr.h (struct _pthread_descr_struct): Update p_header for TLS.
2920         Add p_stackaddr element #if USE_TLS.
2921         * internals.c: Include <tls.h>.
2922         * manager.c: Integrate creating and handling of thread descriptor
2923         for TLS.
2924         * pthread.c: Likewise.
2925         * sysdeps/i386/tls.h (tcbhead_t): Add self pointer.
2926         Include <linuxthreads/descr.h> only if TLS is really used.
2927         (GET_DTV): New macro.
2928         (TLS_INIT_TP): Initialize self pointer.
2930 2002-02-17  Andreas Schwab  <schwab@suse.de>
2932         * signals.c (sigwait): Check for old sighandler being SIG_ERR,
2933         not NULL.
2935 2002-02-12  Ulrich Drepper  <drepper@redhat.com>
2937         * sysdeps/i386/tls.c (INSTALL_NEW_DTV): Define.
2938         (INSTALL_DTV): Adjust for being passed pointer to element with length.
2940 2002-02-08  Ulrich Drepper  <drepper@redhat.com>
2942         * sysdeps/i386/tls.h (TLS_INIT_TP): Also initialize %gs.
2944 2002-02-08  Richard Henderson  <rth@redhat.com>
2946         * sysdeps/alpha/elf/pt-initfini.c: Use \n\ for multiline string.
2948 2002-02-08  Ulrich Drepper  <drepper@redhat.com>
2950         * sysdeps/i386/tls.h: TLS cannot be supported with FLOATING_STACKS
2951         after all.
2953 2002-02-07  H.J. Lu  <hjl@gnu.org>
2955         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Silence the
2956         gcc warning.
2957         (__pthread_spin_lock): Remove ".set noreorder".
2958         * sysdeps/mips/pt-machine.h (__compare_and_swap): Liekwise.
2960 2002-02-05  H.J. Lu  <hjl@gnu.org>
2962         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Not use
2963         branch likely.
2964         * sysdeps/mips/pt-machine.h (testandset): Likewise.
2965         (__compare_and_swap): Likewise.
2967 2002-02-07  Ulrich Drepper  <drepper@redhat.com>
2969         * internals.h: Move declarations/definitions of
2970         __pthread_initial_thread_bos, __pthread_initial_thread,
2971         __pthread_manager_thread_bos, __pthread_manager_thread_tos,
2972         __pthread_manager_thread, __pthread_nonstandard_stacks, STACK_SIZE,
2973         CURRENT_STACK_FRAME, __pthread_find_self, and thread_self...
2974         * descr.h: ...here.
2975         * sysdeps/i386/tls.h: Add TLS definitions also for !FLOATING_STACKS.
2976         Define THREAD_GETMEM accordingly.
2978 2002-02-06  Ulrich Drepper  <drepper@redhat.com>
2980         * sysdeps/i386/tls.h: Include <stddef.h> for size_t.
2982         * sysdeps/i386/tls.h: Define THREAD_DTV.
2984 2002-02-04  Ulrich Drepper  <drepper@redhat.com>
2986         * internals.h: Move thread descriptor definition...
2987         * descr.h.: ...here.  New file.
2988         * sysdeps/i386/tls.h: New file.
2990 2002-02-01  H.J. Lu  <hjl@gnu.org>
2992         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Use a
2993         different register in the delayed slot.  Use branch likely.
2995         * sysdeps/mips/pt-machine.h (testandset): Call _test_and_set.
2996         (__compare_and_swap): Return 0 only when failed to compare. Use
2997         branch likely.
2999 2002-02-01  Jakub Jelinek  <jakub@redhat.com>
3001         * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set,
3002         __pthread_kill_other_threads_np): Move to GLIBC_PRIVATE.
3003         * sysdeps/i386/i586/Versions: Move all symbols to GLIBC_PRIVATE.
3004         * sysdeps/i386/i686/Versions: Move all symbols to GLIBC_PRIVATE.
3005         * sysdeps/sparc/sparc32/sparcv9/Versions: New file.
3006         * sysdeps/sparc/sparc64/Versions: New file.
3007         * sysdeps/ia64/Versions: Move all symbols to GLIBC_PRIVATE.
3009 2002-01-31  Ulrich Drepper  <drepper@redhat.com>
3011         * pthread.c: _dl_cpuclock_offset is not any longer a global variable
3012         in SHARED code, use GL(dl_cpuclock_offset).
3014 2002-01-28  Andreas Jaeger  <aj@suse.de>
3016         * sysdeps/mips/pspinlock.c (__pthread_spin_init): Clear *LOCK to
3017         0. Patch by Machida Hiroyuki <machida@sm.sony.co.jp>.
3019 2002-01-16  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3021         * sysdeps/s390/s390-32/pt-machine.h (MEMORY_BARRIER): Define.
3022         (CURRENT_STACK_FRAME): Remove duplicate definition.
3023         * sysdeps/s390/s390-64/pt-machine.h: Likewise.
3025 2002-01-14  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3027         * Makefile (CFLAGS-tst-cancel.c): Add -fno-inline-functions to prevent
3028         automatic inline.
3030 2002-01-12  Andreas Schwab  <schwab@suse.de>
3032         * Makefile (test-srcs): Add tst-signal.
3033         (tests): Run tst-signal.
3034         (distribute): Add tst-signal.sh.
3035         * tst-signal.c, tst-signal.sh: New files.
3037 2002-01-14  Andreas Jaeger  <aj@suse.de>
3039         * sysdeps/x86_64/pt-machine.h (INIT_THREAD_SELF): Avoid warning.
3041 2002-01-11  Andreas Schwab  <schwab@suse.de>
3043         * signals.c (sighandler): Initialize all elements to SIG_ERR.
3044         (__sigaction): Don't use value from sighandler if it is SIG_ERR.
3046 2002-01-06  Richard Henderson  <rth@redhat.com>
3048         * sysdeps/alpha/elf/pt-initfini.c: New file.
3050 2001-12-29  Andreas Jaeger  <aj@suse.de>
3052         * Examples/ex9.c: Add noreturn attribute for thread.
3053         * Examples/ex10.c: Likewise.
3054         * Examples/ex13.c (thread_start): Likewise.
3055         * Examples/ex15.c (worker): Likewise.
3057         * Examples/ex18.c: Include unistd.h for prototype of sleep.
3059 2001-12-14  Ulrich Drepper  <drepper@redhat.com>
3061         * man/pthread_atfork.man: Adjust description of mutex handling
3062         after fork for current implementation.
3063         * linuxthreads.texi: Likewise [PR libc/2519].
3065 2001-12-13  Andreas Schwab  <schwab@suse.de>
3067         * specific.c (pthread_key_delete): Don't contact the thread
3068         manager if no threads have been created yet.
3070 2001-12-12  NIIBE Yutaka  <gniibe@m17n.org>
3072         * sysdeps/sh/pt-machine.h (INIT_THREAD_SELF): Added __volatile__
3073         qualifier to be safe.
3075 2001-11-30  Andreas Schwab  <schwab@suse.de>
3077         * pthread.c (pthread_handle_sigcancel) [THREAD_SELF]: Double check
3078         that self is the manager thread, and initialize the thread
3079         register if not.
3080         (thread_self_stack) [THREAD_SELF]: New function to find self via
3081         stack pointer.
3082         * manager.c (pthread_handle_create): Don't block cancel signal any
3083         more.
3085 2001-11-29  Andreas Jaeger  <aj@suse.de>
3087         * sysdeps/x86_64/pt-machine.h: Use %gs as thread specific register.
3088         (THREAD_SELF): New.
3089         (INIT_THREAD_SELF): New.
3090         (THREAD_GETMEM): New.
3091         (THREAD_GETMEM_NC):
3092         (THREAD_SETMEM): New.
3093         (THREAD_SETMEM_NC): New.
3094         (FLOATING_STACKS): Define.
3095         (ARCH_STACK_MAX_SIZE): Define.
3097 2001-11-28  Kaz Kylheku  <kaz@ashi.footprints.net>
3099         Bugfix to pthread_key_delete. It was iterating over the thread
3100         manager's linked list of threads, behind the thread manager's
3101         back causing a race. The fix is to have the manager iterate over
3102         the threads instead, using a new request type for doing so.
3103         * internals.h (struct pthread_request): New manager request type
3104         REQ_FOR_EACH_THREAD.
3105         * manager.c (pthread_for_each_thread): New function.
3106         (__pthread_manager): Handle new REQ_FOR_EACH_THREAD request.
3107         * specific.c (struct pthread_key_delete_helper_args): New type.
3108         (pthread_key_delete_helper): New static function.
3109         (pthread_key_delete): Use the new thread manager
3110         REQ_FOR_EACH_THREAD function to iterate over the threads and set
3111         the delete key slot to a null value in each thread.
3112         * Examples/ex18.c: New test.
3113         * Makefile (tests): Add ex18.
3115 2001-11-22  Wolfram Gloger  <wg@malloc.de>
3117         * pthread.c (pthread_onexit_process): Don't call free
3118         after threads have been asynchronously terminated.
3120         * manager.c (pthread_handle_exit): Surround cancellation
3121         of threads with __flockfilelist()/__funlockfilelist().
3123 2001-11-26  Andreas Schwab  <schwab@suse.de>
3125         * manager.c (pthread_handle_create): Start the child thread with
3126         the cancel signal blocked, so that it does not handle it before
3127         the thread register is set up.  Save errno from failed clone call.
3129 2001-11-15  Ulrich Drepper  <drepper@redhat.com>
3131         * sysdeps/i386/i686/Implies: Removed.
3132         * sysdeps/i386/i686/Versions: New file.
3134 2001-10-31  Andreas Jaeger  <aj@suse.de>
3136         * sysdeps/x86_64/Makefile: Remove, we do not need it anymore.
3138 2001-10-05  Kevin Buettner  <kevinb@cygnus.com>
3140         * pthread.c (__linuxthread_pthread_sizeof_descr): Change name
3141         to __linuxthreads_pthread_sizeof_descr to match name used by
3142         symbol_list_arr[LINUXTHREADS_PTHREAD_SIZEOF_DESCR] in
3143         linuxthreads_db/td_symbol_list.c.
3145 2001-09-22  Andreas Jaeger  <aj@suse.de>
3147         * linuxthreads/tst-context.c: Avoid compile warning.
3149 2001-09-20  Andreas Jaeger  <aj@suse.de>
3151         * shlib-versions: Add x86-64.
3153 2001-09-19  Andreas Jaeger  <aj@suse.de>
3155         * sysdeps/x86_64/Makefile: New file.
3156         * sysdeps/x86_64/pspinlock.c: New file.
3157         * sysdeps/x86_64/pt-machine.h: New file.
3159 2001-09-12  Jakub Jelinek  <jakub@redhat.com>
3161         * sysdeps/pthread/timer_delete.c (timer_delete): Thread may be NULL
3162         for SIGEV_NONE.
3163         * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
3165 2001-09-11  Ulrich Drepper  <drepper@redhat.com>
3166             Wolfram Gloger <wg@malloc.de>
3168         * join.c: Protect all communications from and to manager with
3169         TEMP_FAILURE_RETRY.
3170         * manager.c: Likewise.
3171         * pthread.c: Likewise.
3172         * smeaphore.c: Likewise.
3174 2001-08-29  Ulrich Drepper  <drepper@redhat.com>
3176         * spinlock.c (__pthread_lock): Top max_count value with
3177         MAX_ADAPTIVE_SPIN_COUNT.
3178         * internals.h (MAX_ADAPTIVE_SPIN_COUNT): Define if not already done.
3180         * sysdeps/i386/i686/pt-machine.h (BUSY_WAIT_NOP): New macro to
3181         help P4.
3183 2001-08-27  Jakub Jelinek  <jakub@redhat.com>
3185         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_t): Only define to
3186         non-opaque type if __USE_UNIX98.
3188 2001-08-26  Jakub Jelinek  <jakub@redhat.com>
3190         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_t): Define
3191         non-opaque lock types also if _IO_MTSAFE_IO is defined.
3193 2001-08-23  Roland McGrath  <roland@frob.com>
3195         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start): Take
3196         new first argument, skip the cleanup handler if it's zero.
3197         (_LIBC_LOCK_RECURSIVE_INITIALIZER): New macro.
3198         (__libc_lock_define_initialized_recursive): Use it.
3199         * sysdeps/pthread/bits/stdio-lock.h: File removed.
3200         The sysdeps/generic file from the main tree now suffices.
3202 2001-08-22  Roland McGrath  <roland@frob.com>
3204         * sysdeps/pthread/bits/stdio-lock.h: Include <bits/libc-lock.h>
3205         instead of <pthread.h>.
3206         (_IO_lock_t): Define this typedef using __libc_lock_define_recursive.
3207         (_IO_lock_initializer): Add braces.
3208         (_IO_lock_lock): Use __libc_lock_lock_recursive.
3209         (_IO_lock_unlock): Use __libc_lock_unlock_recursive.
3211         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_recursive_t): New type.
3212         (__libc_lock_define_initialized_recursive): Use it.
3213         (__libc_lock_init_recursive): Likewise.
3214         (__libc_lock_fini_recursive): Likewise.
3215         (__libc_lock_lock_recursive): Likewise.
3216         (__libc_lock_trylock_recursive): Likewise.
3217         (__libc_lock_unlock_recursive): Likewise.
3218         (__libc_lock_define_recursive): New macro.
3220 2001-08-14  Jakub Jelinek  <jakub@redhat.com>
3222         * lockfile.c (__pthread_provide_lockfile): New variable.
3223         * pthread.c (__pthread_require_lockfile): New variable.
3224         * cancel.c (__pthread_require_lockfile): New variable.
3226 2001-07-31  Ulrich Drepper  <drepper@redhat.com>
3228         * tst-context.c (threadfct): Initialize context before calling
3229         makecontext.
3231         * Examples/ex17.c: Make sure test thread is around long enough.
3233 2001-07-26  kaz Kojima  <kkojima@rr.iij4u.or.jp>
3235         * sysdeps/sh/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF): Defined.
3237 2001-07-24  Ulrich Drepper  <drepper@redhat.com>
3239         * tst-context.c (main): Print explanation before bailing out
3240         because context handling is not supported.
3242 2001-07-23  Ulrich Drepper  <drepper@redhat.com>
3244         * Makefile (tests): Add tst-context.
3245         * tst-context.c: New file.
3247         * sysdeps/pthread/bits/stdio-lock.h: Define
3248         _IO_cleanup_region_start_noarg.
3250 2001-07-23  Jakub Jelinek  <jakub@redhat.com>
3252         * sysdeps/alpha/pt-machine.h (FLOATING_STACKS): Define.
3253         (ARCH_STACK_MAX_SIZE): Define.
3254         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
3255         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3257 2001-07-19  Jakub Jelinek  <jakub@redhat.com>
3259         * sysdeps/i386/useldt.h: Fix typo in ARCH_STACK_MAX_SIZE comment.
3261         * sysdeps/ia64/pt-machine.h (FLOATING_STACKS): Define.
3262         (ARCH_STACK_MAX_SIZE): Define.
3263         * manager.c (pthread_allocate_stack): Handle FLOATING_STACKS with
3264         NEED_SEPARATE_REGISTER_STACK.
3266 2001-07-16  Andreas Schwab  <schwab@suse.de>
3268         * Makefile (before-compile): Don't add $(objpfx)crti.o.
3269         (omit-deps): Add crti.
3270         ($(objpfx)libpthread.so): Depend on $(objpfx)crti.o, but make sure
3271         it is filtered out of the link command.
3273 2001-07-16  Ulrich Drepper  <drepper@redhat.com>
3275         * pthread.c (pthread_initialize): For FLOATING_STACKS don't bother
3276         to find the right value for __pthread_initial_thread_bos, it's not
3277         used.  If not FLOATING_STACKS first run
3278         __pthread_init_max_stacksize.
3280 2001-06-16  H.J. Lu  <hjl@gnu.org>
3282         * internals.h: Include <stackinfo.h>.
3284         * attr.c: Don't include <stackinfo.h> here.
3285         * cancel.c: Likewise.
3286         * manager.c: Likewise.
3287         * pthread.c: Likewise.
3288         * ptlongjmp.c: Likewise.
3290 2001-03-23  Matthew Wilcox  <willy@ldl.fc.hp.com>
3292         * attr.c: Make _STACK_GROWS_UP work.
3293         * internals.h: Likewise.
3294         * manager.c: Likewise.
3295         * pthread.c: Likewise.
3297 2001-06-15  H.J. Lu  <hjl@gnu.org>
3299         * pthread.c (__pthread_reset_main_thread): Fix a typo.
3301 2001-02-02  John S. Marvin  <jsm@udlkern.fc.hp.com>
3303         * semaphore.h: Use struct _pthread_fastlock as an element of
3304         sem_t instead of an identical struct.
3305         * rwlock.c: Remove casts.
3306         * semaphore.c: Likewise.
3308 2001-04-30  Alan Modra  <amodra@one.net.au>
3310         * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: New.
3312 2001-05-25  Bruce Mitchener  <bruce@cubik.org>
3314         * linuxthreads.texi: Spelling corrections.
3316 2001-05-25  Ulrich Drepper  <drepper@redhat.com>
3318         * oldsemaphore.c (__old_sem_wait): Clear p_nextwaiting before
3319         returning successfully.
3320         Patch by Gene Cooperman <gene@ccs.neu.edu>.
3322 2001-05-24  Ulrich Drepper  <drepper@redhat.com>
3324         * spinlock.c (__pthread_lock) [HAS_COMPARE_AND_SWAP]: Before doing any
3325         serious work try once whether the lock is uncontested.
3326         Remove duplicate reading of __status before loop.
3327         Change suggested by Hans Boehm <hans_boehm@hp.com>.
3329         * spinlock.h (__pthread_trylock): Remove need for oldstatus variable.
3330         (__pthread_alt_trylock): Likewise.
3332 2001-05-01  Kaz Kylheku  <kaz@ashi.footprints.net>
3334         Memory barrier overhaul following line by line inspection.
3335         * mutex.c (pthread_once): Missing memory barriers added.
3336         * pthread.c (__pthread_wait_for_restart_signal,
3337         __pthread_timedsuspend_new, __pthread_restart_new): Added
3338         memory barriers ``just in case'' and for documentary value.
3339         * spinlock.c (__pthread_release): New inline function for releasing
3340         spinlock, to complement __pthread_acquire.  Includes memory
3341         barrier prior to assignment to spinlock, and __asm __volatile
3342         dance to prevent reordering or optimization of the spinlock access.
3343         * spinlock.c (__pthread_unlock, __pthread_alt_lock,
3344         __pthread_alt_timedlock, __pthread_alt_unlock,
3345         __pthread_compare_and_swap): Updated to use new __pthread_release
3346         instead of updating spinlock directly.
3347         * spinlock.c (__pthread_lock, __pthread_unlock, wait_node_alloc,
3348         wait_node_free, wait_node_dequeue, __pthread_alt_lock,
3349         __pthread_alt_timedlock, __pthread_alt_unlock, __pthread_acquire):
3350         Memory barrier overhaul.  Lots of missing memory barriers added,
3351         a couple needless ones removed.
3352         * spinlock.c (__pthread_compare_and_swap): testandset optimization
3353         removed, just calls __pthread_acquire, which has the new read
3354         barrier in it before its testandset.
3356 2001-05-20  Roland McGrath  <roland@frob.com>
3358         * Makeconfig: New file, variables used to be in main libc Makeconfig.
3360 2001-05-09  Geoff Keating  <geoffk@redhat.com>
3362         * sysdeps/powerpc/pt-machine.h
3363         (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): Define.
3364         (__compare_and_swap): Remove memory barriers.
3365         (__compare_and_swap_with_release_semantics): New function.
3367 2001-04-24  Andreas Jaeger  <aj@suse.de>
3369         * wrapsyscall.c: send* and recv* return ssize_t.
3371         * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Unlock the
3372         mutex instead of double locking it.
3373         Reported by Pierre Artaud <partaud@sodatec.com>.
3375 2001-04-23  Ulrich Drepper  <drepper@redhat.com>
3377         * sysdeps/pthread/getcpuclockid.c: Make function generic, test
3378         using #ifdef whether the clock is available.
3379         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: Removed.
3381         * sysdeps/ia64/Versions: New file.
3383         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init): We don't
3384         have to call __gmon_start__ in the libpthread DSO.
3385         * sysdeps/pthread/pt-initfini.c (_init): Likewise.
3387         * Makefile (libpthread-routines): Add ptclock_gettime and
3388         ptclock_settime.
3389         * internals.h: Don't use cpuclock-init.h definitions, use
3390         hp-timing.h definitions.
3391         * pthread.c: Likewise.
3392         * manager.c: Likewise.
3393         * ptclock_gettime.c: New file.
3394         * ptclock_settime.c: New file.
3395         * internals.h: Fix parameter type for __pthread_clock_gettime and
3396         __pthread_clock_settime.
3398         * sysdeps/i386/i586/ptclock_gettime.c: Removed.
3399         * sysdeps/i386/i586/ptclock_settime.c: Removed.
3400         * sysdeps/i386/i586/Makefile: Removed.
3402 2001-04-22  Ulrich Drepper  <drepper@redhat.com>
3404         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_ASYNCH_IO.
3405         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3407 2001-04-21  Andreas Jaeger  <aj@suse.de>
3409         * sysdeps/pthread/timer_routines.c (thread_func): Add noreturn
3410         attribute, remove statements that will never be executed.
3411         (thread_func): Remove mutex_unlock call since it's never executed.
3412         (thread_func): Fix comment as suggested by Jakub Jelinek.
3414         * manager.c (__pthread_manager): Add noreturn
3415         attribute.
3416         (pthread_start_thread): Likewise, remove return statement.
3417         (pthread_start_thread_event): Likewise.
3418         Add noreturn attribute for pthread_handle_exit.
3419         * weaks.c: Add noreturn attribute for pthread_exit.
3421         * internals.h: Add __pthread_clock_gettime and
3422         __pthread_clock_settime prototypes.
3424 2001-04-21  Ulrich Drepper  <drepper@redhat.com>
3426         * internals.h: Include <cpuclock-init.h>.
3427         (struct _pthread_descr_struct): Add p_cpuclock_offset field if
3428         CPUCLOCK_VARDEF is defined.
3429         * pthread.c (__pthread_initialize_minimal): Initialize
3430         p_cpuclock_offset field for main thread if CPUCLOCK_INIT is defined.
3431         * manager.c (pthread_start_thread): Set p_cpuclock_offset field
3432         for new thread to current CPU clock value.
3434         * sysdeps/i386/useldt.h: Extend all the macros to handle 8-byte values.
3436         * sysdeps/i386/i586/Makefile: New file.
3437         * sysdeps/i386/i586/Versions: New file.
3438         * sysdeps/i386/i586/ptclock_gettime.c: New file.
3439         * sysdeps/i386/i586/ptclock_settime.c: New file.
3440         * sysdeps/i386/i686/Implies: New file.
3442 2001-04-18  Jakub Jelinek  <jakub@redhat.com>
3444         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Put specs into
3445         $generated, not $postclean-generated.
3447 2001-04-18  Andreas Jaeger  <aj@suse.de>
3449         * Makefile (otherlibs): Added.
3451 2001-04-18  Jakub Jelinek  <jakub@redhat.com>
3453         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
3455 2001-04-16  Ulrich Drepper  <drepper@redhat.com>
3457         * signals.c (sigwait): NSIG is no signal number.  Block all
3458         signals while in signal handler for signals in SET.
3459         Patch by Manfred Spraul <manfred@colorfullife.com>.
3461 2001-04-12  Ulrich Drepper  <drepper@redhat.com>
3463         * tst-cancel.c: Disable most tests.  Add new test where all
3464         cleanup handlers must run.
3465         * Makefile (tests): Add tst-cancel again.
3467         * cancel.c (__pthread_perform_cleanup): Correct condition for
3468         leaving cleanup loop early.
3470         * sysdeps/i386/Makefile: Make sure gcc uses a frame pointer for
3471         all the files which use CURRENT_STACK_FRAME.
3472         * sysdeps/i386/pt-machine.h (CURRENT_STACK_FRAME): Define using
3473         __builtin_frame_address.
3474         * sysdeps/i386/i686/pt-machine.h: Likewise.
3476 2001-04-11  Ulrich Drepper  <drepper@redhat.com>
3478         * Makefile (tests): Comment out tst-cancel for now.
3480         * tst-cancel.c (main): Cleanup 4 is supposed to run.  Create
3481         temporary file in object directory.
3482         * Makefile: Don't allow inlining when compiling tst-cancel.c.
3483         Pass $(objpfx) to tst-cancel.
3485 2001-04-11  David S. Miller  <davem@redhat.com>
3487         * sysdeps/sparc/sparc32/pt-machine.h (stack_pointer): Advance
3488         up closer to user local variables so that new cleanup heuristics work.
3489         * sysdeps/sparc/sparc64/pt-machine.h (stack_pointer): Likewise.
3491 2001-04-11  Ulrich Drepper  <drepper@redhat.com>
3493         * cancel.c (_pthread_cleanup_push): Catch invalid __prev buffer
3494         and remove it.
3495         (_pthread_cleanup_push_defer): Likewise.
3497         * tst-cancel.c (main): Fix loop printing cleanup output.
3499 2001-04-10  kaz Kojima  <kkojima@rr.iij4u.or.jp>
3501         * sysdeps/sh/pspinlock.c (__pthread_spin_lock): Fix a reverse
3502         test.
3503         (__pthread_spin_trylock): Likewise.
3504         * sysdeps/sh/pt-machine.h (testandset): Likewise.
3506 2001-04-10  Ulrich Drepper  <drepper@redhat.com>
3508         * join.c (pthread_exit): Move code to new function __pthread_do_exit
3509         which takes an extra parameter with the current frame pointer.
3510         Call new function with CURRENT_STACK_FRAME.
3511         (__pthread_do_exit): New function.  Call __pthread_perform_cleanup
3512         with the new parameter.
3513         (pthread_join): Call __pthread_do_exit instead of pthread_exit.
3514         * cancel.c (__pthread_perform_cleanup): Takes extra parameter.  Use
3515         this parameter as the initial value the cleanup handler records are
3516         compared against.  No active cleanup handler record must have an
3517         address lower than the previous one and the initial record must be
3518         above (below on PA) the frame address passed in.
3519         (pthread_setcancelstate): Call __pthread_do_exit instead of
3520         pthread_exit.
3521         (pthread_setcanceltype): Likewise.
3522         (pthread_testcancel): Likewise.
3523         (_pthread_cleanup_pop_restore): Likewise.
3524         * condvar.c (pthread_cond_wait): Likewise.
3525         (pthread_cond_timedwait_relative): Likewise.
3526         * manager.c (pthread_start_thread): Likewise.
3527         * oldsemaphore.c (__old_sem_wait): Likewise.
3528         * pthread.c (pthread_handle_sigcancel): Likewise.
3529         * semaphore.c (__new_sem_wait): Likewise.
3530         (sem_timedwait): Likewise.
3531         * ptlongjmp.c (pthread_cleanup_upto): Also use current stack frame
3532         to limit the cleanup handlers which get run.
3533         * internals.h: Add prototype for __pthread_do_exit.  Adjust prototype
3534         for __pthread_perform_cleanup.
3536         * Makefile (tests): Add tst-cancel.
3537         * tst-cancel.c: New file.
3539 2001-04-08  Hans-Peter Nilsson  <hp@axis.com>
3541         * sysdeps/cris/pt-machine.h: New file.
3542         * sysdeps/cris/pspinlock.c: New file.
3544 2001-04-09  Hans-Peter Nilsson  <hp@axis.com>
3546         * shlib-versions: Add case for Linux on CRIS.
3548 2001-03-26  Ulrich Drepper  <drepper@redhat.com>
3550         * attr.c (pthread_getattr_np): Correct computation of stack size
3551         for machiens with register stack.
3553         * Examples/ex17.c (main): Correct detection of failed mmap call.
3555 2001-03-21  Jakub Jelinek  <jakub@redhat.com>
3557         * pthread.c (__pthread_initialize_manager): Fix a typo.
3559 2001-03-21  Jakub Jelinek  <jakub@redhat.com>
3561         * attr.c (__pthread_attr_setstack): Fix alignment check.
3562         (pthread_getattr_np): __stackaddr is top of stack, not bottom.
3563         * Makefile (tests): Add ex17 test.
3564         * Examples/ex17.c: New test.
3566 2001-03-20  Ulrich Drepper  <drepper@redhat.com>
3568         * Makefile: Define -D_RPC_THREAD_SAFE_ for cancel.c.
3569         * cancel.c (__pthread_perform_cleanup): Call __rpc_thread_destroy.
3570         * sysdeps/pthread/bits/libc-tsd.h: Define _LIBC_TSD_KEY_VARS.
3572 2001-03-18  Ulrich Drepper  <drepper@redhat.com>
3574         * Makefile: When generating DSO link with libc_nonshared.a.
3576 2001-02-26  Jakub Jelinek  <jakub@redhat.com>
3578         * signals.c (pthread_sighandler): Use CALL_SIGHANDLER.
3580 2001-02-23  Jakub Jelinek  <jakub@redhat.com>
3582         * internals.h (__pthread_init_max_stacksize): New prototype.
3583         * attr.c (__pthread_attr_setstacksize): Call
3584         __pthread_init_max_stacksize if not yet initialized.
3585         * pthread.c (__pthread_init_max_stacksize): New function.
3586         (__pthread_initialize_manager): Call it.
3587         Patch by <dtc@cmucl.cons.org>.
3589 2001-03-16  Ulrich Drepper  <drepper@redhat.com>
3591         * attr.c (pthread_getattr_np): Fix __stacksize computation for IA-64.
3593 2001-03-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3595         * shlib-versions: Add rule for Linux on 64 bit S/390.
3596         * sysdeps/s390/s390-64/pt-machine.h: New file.
3597         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
3599 2001-03-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3601         * sysdeps/s390/pt-machine.h: Move to...
3602         * sysdeps/s390/s390-32/pt-machine.h: ...here.
3603         Add defines for FLOATING_STACK and ARCH_STACK_MAX_SIZE.
3605 2001-03-15  Ulrich Drepper  <drepper@redhat.com>
3607         * Versions [libpthread] (GLIBC_2.2.3): Add pthread_getattr_np.
3608         * attr.c: Implement pthread_getattr_np.
3609         * sysdeps/pthread/pthread.h: Add prototype for pthread_getattr_np.
3610         * internals.h (struct _pthread_descr_struct): Add p_inheritsched.
3611         * manager.c (pthread_handle_create): Initialize p_inheritsched.
3613 2001-03-09  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3615         * sysdeps/unix/sysv/linux/s390/pt-initfini.c: Use 0x07 padding for
3616         code alignment.
3618 2001-02-20  Hans Boehm  <hans_boehm@hp.com>
3620         * manager.c (manager_mask): Removed static vesion.  Now always local
3621         to __pthread_manager().
3622         (manager_mask_all): Removed completely.
3623         (__pthread_manager): Remove manager_mask_all initialization.
3624         (pthread_handle_create): Remove code to set and reset signal mask
3625         around __clone2() calls.
3627 2001-02-17  Jakub Jelinek  <jakub@redhat.com>
3629         * spinlock.c (__pthread_lock): Force lock->__status to be read from
3630         memory on every spin.
3632 2001-02-10  Andreas Jaeger  <aj@suse.de>
3634         * Makefile (extra-objs): New.
3636 2001-02-09  Jakub Jelinek  <jakub@redhat.com>
3638         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add
3639         __pthread_initialize_minimal prototype.
3641 2001-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
3643         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
3645 2001-02-06  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3647         * sysdeps/unix/sysv/linux/s390/pt-initfini.c: New file.
3649 2001-02-06  Ulrich Drepper  <drepper@redhat.com>
3651         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the
3652         broken code.  Patch by Jes Sorensen.
3654 2001-02-06  Andreas Jaeger  <aj@suse.de>
3656         * sysdeps/pthread/pthread.h: Move __pthread_initialize from here
3657         to...
3658         * internals.h: ...here.
3660 2001-02-05  Jes Sorensen  <jes@linuxcare.com>
3662         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
3664 2001-02-02  Ulrich Drepper  <drepper@redhat.com>
3666         * Versions: Remove __pthread_initialize_minimal.
3668 2001-02-01  Ulrich Drepper  <drepper@redhat.com>
3670         * Makefile: Add rules to build crti.o and make it being used in
3671         building libpthread.so.
3672         * sysdeps/i386/Makefile: New file.
3673         * sysdeps/pthread/pt-initfini.c: New file.
3675         * pthread.c: Cleanups.
3677 2001-01-28  Andreas Jaeger  <aj@suse.de>
3679         * oldsemaphore.c (__old_sem_init): Adjust for last change.
3680         * sysdeps/pthread/bits/libc-lock.h: Likewise.
3681         * spinlock.c: Likewise.
3683 2001-01-28  Ulrich Drepper  <drepper@redhat.com>
3685         * sysdeps/pthread/bits/initspin.h: Make all names namespace clean.
3686         * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
3687         * manager.c: Adjust for namespace cleanup in bits/initspin.h.
3688         * pthread.c: Likewise.
3689         * spinlock.h: Likewise.
3690         * sysdeps/pthread/pthread.h: Likewise.
3692 2001-01-26  Ulrich Drepper  <drepper@redhat.com>
3694         * sysdeps/pthread/bits/pthreadtypes.h: Define pthread_attr_t also
3695         as struct __pthread_attr_s.
3697         * semaphore.h (sem_t): Cleanup namespace, rename status and
3698         spinlock elements.
3700 2001-01-13  Jakub Jelinek  <jakub@redhat.com>
3702         * pthread.c (pthread_onexit_process): Clear
3703         __pthread_manager_thread_bos after freeing it.
3704         * Makefile (tests): Add ex16.
3705         * Examples/ex16.c: New file.
3707 2001-01-11  Jakub Jelinek  <jakub@redhat.com>
3709         * Makefile (CFLAGS-pthread.c): Pass -DHAVE_Z_NODELETE if ld supports
3710         -z nodelete.
3711         * pthread.c (pthread_exit_process): Rename to...
3712         (pthread_onexit_process): ...this.
3713         (pthread_atexit_process, pthread_atexit_retcode): New.
3714         (pthread_initialize): Call __cxa_atexit instead of __cxa_on_exit
3715         and only if HAVE_Z_NODELETE is not defined.
3716         (__pthread_initialize_manager): Register pthread_atexit_retcode
3717         with __cxa_atexit.
3719 2001-01-11  Ulrich Drepper  <drepper@redhat.com>
3721         * pthread.c (pthread_initialize): Use __cxs_on_exit not __cxa_atexit.
3723 2001-01-11  Jakub Jelinek  <jakub@redhat.com>
3725         * Makefile (tests): Add ex15.
3726         * Examples/ex15.c: New test.
3728 2001-01-08  Ulrich Drepper  <drepper@redhat.com>
3730         * pthread.c (pthread_exit_process): Free memory allocated for
3731         manager stack.
3733 2000-12-31  Ulrich Drepper  <drepper@redhat.com>
3735         * manager.c (pthread_alloca_stack): Remove MAP_FIXED from mmap calls.
3736         (pthread_free): Always unmap the stack.  It's safe now that we don't
3737         use MAP_FIXED to allocate stacks.
3739 2000-12-31  Ulrich Drepper  <drepper@redhat.com>
3741         * sysdeps/powerpc/pspinlock.c: Don't include pt-machine.h here.
3743         * manager.c (pthread_allocate_stack): Prepare for removal of MAP_FIXED.
3745 2000-11-15  Wolfram Gloger  <wg@malloc.de>
3747         * manager.c (pthread_free): [!FLOATING_STACKS]: Only remap the
3748         stack to PROT_NONE, don't unmap it, avoiding collisions with malloc.
3750 2000-12-27  Andreas Jaeger  <aj@suse.de>
3752         * Examples/ex13.c: Make local functions static.
3753         * ecmutex.c: Likewise.
3754         * joinrace.c: Likewise.
3755         * Examples/ex14.c: Likewise.
3757         * Examples/ex2.c: Make local functions static; reformat.
3758         * Examples/ex1.c: Likewise.
3759         * Examples/ex4.c: Likewise.
3760         * Examples/ex5.c: Likewise.
3761         * Examples/ex7.c: Likewise.
3763         * oldsemaphore.c: Add prototypes to shut up GCC.
3764         * pt-machine.c: Likewise.
3766         * weaks.c: Add prototype for pthread_exit.
3768         * internals.h: Add some prototypes, format prototypes and add
3769         missing externs.
3770         Move __libc_waitpid prototype to include/sys/wait.h.
3772         * rwlock.c: Include <bits/libc-lock.h> for prototypes.
3773         * mutex.c: Likewise.
3774         * specific.c: Likewise.
3775         * ptfork.c: Likewise.
3777         * lockfile.c: Include internals.h to get prototypes.
3778         * events.c: Likewise.
3779         * sysdeps/alpha/pspinlock.c: Likewise.
3780         * sysdeps/arm/pspinlock.c: Likewise.
3781         * sysdeps/hppa/pspinlock.c: Likewise.
3782         * sysdeps/i386/pspinlock.c: Likewise.
3783         * sysdeps/ia64/pspinlock.c: Likewise.
3784         * sysdeps/m68k/pspinlock.c: Likewise.
3785         * sysdeps/mips/pspinlock.c: Likewise.
3786         * sysdeps/powerpc/pspinlock.c: Likewise.
3787         * sysdeps/s390/pspinlock.c: Likewise.
3788         * sysdeps/sh/pspinlock.c: Likewise.
3789         * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
3790         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
3791         * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
3793 2000-12-27  Ulrich Drepper  <drepper@redhat.com>
3795         * attr.c (__pthread_attr_setstack): Fix setting of __stackaddr element.
3796         (__pthread_attr_getstack): Return correct address.
3797         Add warnings for using pthread_attr_getstackaddr and
3798         pthread_attr_setstackaddr.
3800 2000-12-26  Ulrich Drepper  <drepper@redhat.com>
3802         * Examples/ex6.c (test_thread): Make static.
3803         * Examples/ex12.c (test_thread): Make static and add noreturn
3804         attribute.
3806 2000-12-18  Jes Sorensen  <jes@linuxcare.com>
3808         * linuxthreads/sysdeps/ia64/pt-machine.h: __compare_and_swap
3809         and compare_and_swap_with_release_semantics returns int not long.
3811 2000-12-17  Andreas Jaeger  <aj@suse.de>
3813         * sysdeps/s390/pt-machine.h (testandset): Use long int as return
3814         value.
3815         * sysdeps/arm/pt-machine.h (testandset): Likewise.
3816         * sysdeps/hppa/pt-machine.h (testandset): Likewise.
3817         * sysdeps/m68k/pt-machine.h (testandset): Likewise.
3818         * sysdeps/sh/pt-machine.h (testandset): Likewise.
3819         * sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise.
3820         * sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise.
3822 2000-12-17  Ulrich Drepper  <drepper@redhat.com>
3824         * sysdeps/i386/pt-machine.h (testandset): Adjust for prototype change.
3825         * sysdeps/i386/i686/pt-machine.h (testandset): Likewise.
3827 2000-12-17  Andreas Jaeger  <aj@suse.de>
3829         * internals.h: Add prototypes for testandset and
3830         __compare_and_swap to shut up gcc warnings.
3832 2000-12-06  Wolfram Gloger  <wg@malloc.de>
3834         * join.c (pthread_detach): Allow case where the thread has already
3835         terminated.
3837 2000-12-05  Andreas Jaeger  <aj@suse.de>
3839         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't set mips2.
3840         * sysdeps/mips/pt-machine.h (testandset): Likewise.
3841         (__compare_and_swap): Likewise.
3842         Patches by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
3844 2000-11-20  Jakub Jelinek  <jakub@redhat.com>
3846         * Examples/ex3.c (main): Cast int to long before casting to void *.
3847         (search): Cast void * to long, not int.
3848         * Examples/ex8.c (main, thread): Similarly.
3849         * Examples/ex11.c (main): Similarly.
3850         * Examples/ex14.c (worker, do_test): Similarly.
3851         * ecmutex.c (worker, do_test): Similarly.
3852         (nlocks): Cast to int.
3854 2000-11-08  Bruce Mitchener  <bruce@cubik.org>
3856         * linuxthreads.texi:  Add documentation for pthreads attributes
3857         guardsize, stackaddr, stacksize, and stack.  Fix typo in previous
3858         patch.  Document pthread_[sg]etconcurrency().  Mark
3859         pthread_mutexattr_[sg]ettype() as POSIX rather than GNU.
3861 2000-11-07  Ulrich Drepper  <drepper@redhat.com>
3863         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
3864         Don't define it.
3865         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3866         Reported by Christopher Yeoh <cyeoh@linuxcare.com.au>.
3868 2000-11-06  Ulrich Drepper  <drepper@redhat.com>
3870         * cancel.c (pthread_cancel): Always set p_canceled, even if we are
3871         not doing it right now.
3872         Reported by Kaz Kylheku <kaz@ashi.footprints.net>.
3874 2000-10-30  Ulrich Drepper  <drepper@redhat.com>
3876         * Examples/ex4.c (main): Don't use exit() to avoid warning with
3877         broken compilers.
3879 2000-10-29  Ulrich Drepper  <drepper@redhat.com>
3881         * attr.c (__pthread_attr_setguardsize): Don't round guardsize
3882         here.  Reported by Bruce Mitchener <bruce@cubik.org>.
3884         * linuxthreads.texi: Changes terminology to 'type' from 'kind' when
3885         discussing mutexes. (As per the Unix98 name for the API.)
3886         Changes documentation for pthread_mutexattr_setkind_np() and
3887         pthread_mutexattr_getkind_np() over to the Unix98 APIs for the
3888         same: pthread_mutexattr_settype() and pthread_mutexattr_gettype().
3889         Changes references to PTHREAD_MUTEXATTR_FAST_NP to
3890         PTHREAD_MUTEXATTR_ADAPTIVE_NP.
3891         Begins to introduce discussion of the ``timed'' mutex type.  This
3892         discussion is currently incomplete.
3893         Patch by Bruce Mitchener <bruce@cubik.org>.
3895 2000-10-26  Kazumoto Kojima  <kkojima@rr.iij4u.or.jp>
3896             Yutaka Niibe  <gniibe@chroot.org>
3898         * sysdeps/sh/pt-machine.h (testandset): Since the operand of TAS.B
3899         has restrictions, use register.
3901 2000-10-23  Andreas Schwab  <schwab@suse.de>
3903         * Examples/ex14.c (TIMEOUT): Override default timeout.
3905 2000-10-16  Ulrich Drepper  <drepper@redhat.com>
3907         * specific.c: Protect tsd array modification in thread data
3908         structures by getting the thread lock in pthread_key_delete and
3909         __pthread_destroy_specifics.
3910         Patch by Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>.
3912 2000-10-12  Alan Modra <alan@linuxcare.com.au>
3914         * sysdeps/pthread/bits/initspin.h: New file.
3915         * spinlock.h: Move LOCK_INITIALIZER definition to <bits/initspin.h>.
3916         (__pthread_init_lock): Initialize lock with LT_SPINLOCK_INIT.
3917         (__pthread_alt_init_lock): Likewise.
3918         (__pthread_alt_trylock): Release lock with LT_SPINLOCK_INIT.
3920 2000-10-12  David Huggins-Daines  <dhd@linuxcare.com>
3922         * oldsemaphore.c (__old_sem_init): Release lock with
3923         LT_SPINLOCK_INIT, not zero.
3924         * spinlock.c (__pthread_unlock): Likewise.
3925         (__pthread_alt_lock): Likewise.
3926         (__pthread_alt_timedlock): Likewise.
3927         (__pthread_alt_unlock): Likewise.
3928         * sysdeps/pthread/bits/libc-lock.h: Initialize locks with
3929         LT_SPINLOCK_INIT if it is non-zero.  Likewise for init-once flags.
3930         * sysdeps/pthread/pthread.h: Include bits/initspin.h.  Use
3931         LT_SPINLOCK_INIT do initialize spinlocks not 0.
3933 2000-10-12  David Huggins-Daines <dhd@linuxcare.com>
3935         * shlib-versions: Add version definitions for hppa-linux.
3937 2000-10-12  Alan Modra <alan@linuxcare.com.au>
3939         * sysdeps/hppa/pspinlock.c: New file.
3940         * sysdeps/hppa/pt-machine.h: New file.
3941         * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: New file.
3943 2000-10-05  Jakub Jelinek  <jakub@redhat.com>
3945         * mutex.c (__pthread_mutex_destroy): Correct test of
3946         busy mutex for mutexes using alternate fastlocks.
3947         Patch by dtc@cmucl.cons.org.
3949 2000-09-28  Martin Schwidefsksy    <schwidefsky@de.ibm.com>
3951         * sysdeps/s390/pt-machine.h: Make %a0 the thread register.
3953 2000-09-28  Ulrich Drepper  <drepper@redhat.com>
3955         * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP
3956         test for owner first.
3957         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
3959         * cancel.c (pthread_cancel): Don't do anything if cancelation is
3960         disabled.
3962 2000-09-26  Ulrich Drepper  <drepper@redhat.com>
3964         * spinlock.h (__pthread_set_own_extricate_if): Optimize a bit.
3965         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
3967         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
3968         _POSIX_MONOTONIC_CLOCK.
3970         * spinlock.h (__pthread_set_own_extricate_if): Add back locking
3971         and explain why.
3973 2000-09-20  Andreas Jaeger  <aj@suse.de>
3975         * pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
3976         "testrtsig.h" conditional.
3978 2000-09-11  Ulrich Drepper  <drepper@redhat.com>
3980         * sysdeps/pthread/pthread.h: Declare pthread_attr_getstack and
3981         pthread_attr_setstack.
3982         * Versions [libpthread] (GLIBC_2.2): Export pthread_attr_getstack and
3983         pthread_attr_setstack.
3984         * attr.c (pthread_attr_getstack, pthread_attr_setstack): New functions.
3986 2000-09-05  Ulrich Drepper  <drepper@redhat.com>
3988         * Examples/ex14.c: New file.
3989         * Makefile (tests): Add ex14.
3991         * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
3992         mutex.  Patch by dtc@cmucl.cons.org.
3994         * ecmutex.c: New file.
3995         * Makefile (tests): Add ecmutex.
3997 2000-09-04  H.J. Lu  <hjl@gnu.org>
3999         * attr.c (__pthread_attr_setguardsize): Use page_roundup
4000         instead of roundup to round up to the page size.
4002 2000-09-03  Mark Kettenis  <kettenis@gnu.org>
4004         * manager.c (pthread_exited): Correctly report event as TD_REAP
4005         instead of TD_DEATH.  Fix comments.
4007 2000-09-03  Ulrich Drepper  <drepper@redhat.com>
4009         * spinlock.h (testandset): Add cast to avoid warning.
4010         Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
4012 2000-09-02  Andreas Jaeger  <aj@suse.de>
4014         * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
4015         prototype.
4017 2000-09-01  Ulrich Drepper  <drepper@redhat.com>
4019         * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
4020         Fix typo in last patch (_mode -> _flags).
4022         * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
4023         Provide definition which respects _IO_USER_LOCK flag.
4025 2000-08-30  Ulrich Drepper  <drepper@redhat.com>
4027         * manager.c (pthread_allocate_stack): Clear descriptor only if not
4028         mmaped.
4030 2000-08-25  Ulrich Drepper  <drepper@redhat.com>
4032         * Makefile: Add rules to build and run unload.
4033         * unload.c: New file.
4035         * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
4037         * sysdeps/pthread/pthread.h
4038         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
4039         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
4041 2000-08-24  Andreas Jaeger  <aj@suse.de>
4043         * Examples/ex13.c: Include <string.h> for strerror prototype and
4044         <stdlib.h> for abort prototype.
4045         (pthr_cond_signal_mutex): Rewrite to silence GCC.
4046         (thread_start): Remove unused variable err.
4047         (main): Silence GCC warnings.
4049 2000-08-22  Andreas Jaeger  <aj@suse.de>
4051         * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
4053         * Makefile (tests): Add ex13.
4055 2000-08-20  Ulrich Drepper  <drepper@redhat.com>
4057         * semaphore.h: Add restrict where required by AGd4.
4058         * sysdeps/pthread/pthread.h: Likewise.
4059         * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
4061 2000-08-15  Ulrich Drepper  <drepper@redhat.com>
4063         * Makefile (tests): Add ex12.  Add rule to build it.
4064         * Examples/ex12.c: New file.
4066 2000-08-13  Ulrich Drepper  <drepper@redhat.com>
4068         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
4069         even though the implementation is not quite complete (but it reports
4070         it).  Define _POSIX_MESSAGE_PASSING to -1.
4071         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4073 2000-08-12  Andreas Jaeger  <aj@suse.de>
4075         * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
4076         assembler.
4077         (__compare_and_swap): Likewise.
4078         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
4080 2000-08-10  Ulrich Drepper  <drepper@redhat.com>
4082         * pthread.c (__pthread_initial_thread): Initialize p_errnop and
4083         p_h_errnop correctly and not to NULL.
4085 2000-08-05  Ulrich Drepper  <drepper@redhat.com>
4087         * Banner: Bump version number to 0.9.
4089 2000-08-04  Ulrich Drepper  <drepper@redhat.com>
4091         * Makefile (tests): Add tststack.  Add rule to build the program.
4092         * tststack.c: New file.
4094         * internals.h: Declare __pthread_max_stacksize.
4095         * pthread.c (__pthread_max_stacksize): New variable.
4096         (__pthread_initialize_manager): Determine __pthread_initialize_manager
4097         value.
4098         * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
4099         (pthread_allocate_stack): Allow kernel to choose stack address if
4100         FLOATING_STACKS.  This also handles variable-sized stacks.
4101         Always allocate stack and guardpage together.  Use mprotect to
4102         change guardpage access.
4103         * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
4104         ARCH_STACK_MAX_SIZE.
4106         * attr.c (__pthread_attr_setstacksize): Also test value against
4107         upper limit.
4109         * manager.c (__pthread_nonstandard_stacks): Define only if
4110         THREAD_SELF is not defined.
4111         (pthread_allocate_stack): Always initialize gardaddr to a correct
4112         value.
4113         (pthread_handle_create): Unmap thread with one call.
4114         (pthread_free): Remove test for initial thread before removing stack.
4115         Unmap stack with one call.
4117         * pthread.c (__pthread_initial_thread): Initialize p_userstack to
4118         1 to avoid removing the stack.
4120 2000-07-27  Jes Sorensen  <jes@linuxcare.com>
4122         * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
4123         load of spin lock to prime the cache before the atomic compare and
4124         exchange operation (cmpxchg4). This avoids the spinning on the
4125         cmpxchg4 instruction and reduces movement of the cache line back
4126         and forth between the processors (explanation by Asis K. Mallick
4127         from Intel). This basically makes the implementation operate the
4128         same as the Linux kernel implementation.
4130         * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
4131         * sysdeps/ia64/pspinlock.c: New file.
4133 2000-08-03  Ulrich Drepper  <drepper@redhat.com>
4135         * pthread.c: Move definition of __pthread_set_own_extricate_if...
4136         * spinlock.h: ...here.  Remove locking.
4137         * internals.h: Remove __pthread_set_own_extricate_if prototype.
4139         * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
4140         (rwlock_rd_extricate_func): Don't determine self, let
4141         __pthread_lock do it.
4142         (rwlock_wr_extricate_func): Likewise.
4143         (rwlock_have_already): Optimize *pself handling a bit.
4145         * mutex.c: Use __builtin_expect.
4146         * pthread.c: Likewise.
4148 2000-08-02  Andreas Jaeger  <aj@suse.de>
4150         * sysdeps/s390/pspinlock.c: New file.
4151         * sysdeps/s390/pt-machine.h: New file.
4152         Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
4154 2000-07-12  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
4156         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
4157         R3K.
4158         * sysdeps/mips/pt-machine.h (testandset): Likewise.
4160 2000-07-26  Andreas Jaeger  <aj@suse.de>
4162         * pthread.c: Initialize p_sem_avail.
4164 2000-07-25  Ulrich Drepper  <drepper@redhat.com>
4166         * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
4167         * semaphore.c: Handle spurious wakeups.
4169         * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
4170         for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
4172         * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
4173         (__pthread_wait_for_restart): Likewise.
4175         * condvar.c (pthread_cond_wait): Also check whether thread is
4176         cancelable before aborting loop.
4177         (pthread_cond_timedwait): Likewise.
4179         * signals.c (pthread_sighandler): Remove special code to restrore
4180         %gs on x86.
4181         (pthread_sighandler_t): Likewise.
4183 2000-07-25  Mark Kettenis  <kettenis@gnu.org>
4185         * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
4186         * pthread.c: Include <resolv.h>.
4187         (_res): Undefine.  Add extern declaration.
4189 2000-07-24  Ulrich Drepper  <drepper@redhat.com>
4191         * pthread.c (__pthread_initial_thread): Update initializer.
4192         (__pthread_manager_thread): Likewise.
4193         (pthread_initialize): Move setrlimit call to...
4194         (__pthread_initialize_manager): ...here.
4195         (__pthread_reset_main_thread): Reset also soft limit on stack size.
4197         * condvar.c: Handle spurious wakeups.  [PR libc/1749].
4198         * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
4200 2000-07-21  Ulrich Drepper  <drepper@redhat.com>
4202         * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
4203         __compare_and_swap to define testandset.
4204         * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
4205         Define IMPLEMENT_TAS_WITH_CAS.
4207 2000-07-20  Ulrich Drepper  <drepper@redhat.com>
4209         * Makefile: Pass -z nodelete to linker for libpthread.so
4210         generation if it understand this option.
4212 2000-07-18  Mark Kettenis  <kettenis@gnu.org>
4214         * manager.c (pthread_handle_create): Remove initialization of
4215         new_thread->p_res._sock.
4217 2000-07-19  Kaz Kylheku  <kaz@ashi.footprints.net>
4219         Bugfixes to the variant of the code for machines with no compare
4220         and swap.
4222         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
4223         node was not being properly enqueued, due to failing to update
4224         the lock->__status field.
4226         * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
4227         being set inappropriately, causing the suspend function to be called
4228         with a null self pointer and crash.
4230 2000-07-18  Ulrich Drepper  <drepper@redhat.com>
4232         * spinlock.h (__pthread_alt_trylock): Fix code used if no
4233         compare&swap is available.
4235         * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
4236         compare_and_swap.
4238         * pthread.c (pthread_initialize): Don't use sysconf to determine
4239         whether the machine has more than one processor.
4241         * spinlock.c (__pthread_alt_timedlock): Add back one of the
4242         removed thread_self calls.
4244 2000-07-18  Kaz Kylheku  <kaz@ashi.footprints.net>
4246         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
4247         __compare_and_swap to compare_and_swap in code which assumes
4248         compare swap is available.
4250 2000-07-18  Kaz Kylheku  <kaz@ashi.footprints.net>
4252         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
4253         bug whereby thr field of waitnode structure would not be correctly
4254         set unless a null self pointer is passed to the functions.
4255         Eliminated redundant calls to thread_self().
4257 2000-07-18  Jakub Jelinek  <jakub@redhat.com>
4259         * pthread.c (__pthread_initialize_manager): Lock
4260         __pthread_manager_thread.p_lock before calling clone.
4262 2000-05-05  H.J. Lu  <hjl@gnu.org>
4264         * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
4265         have acquire semantics.
4266         (__compare_and_swap_with_release_semantics): New inline
4267         function.
4268         (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
4270 2000-01-28  Hans Boehm  <hboehm@exch.hpl.hp.com>
4272         * manager.c: Fix the problem with signals at startup.
4273         Change the way that thread stacks are allocated on IA64.
4274         Clean up some of the guard page allocation stuff.
4276 1999-12-19  H.J. Lu  <hjl@gnu.org>
4278         * internals.h (page_roundup): New.
4279         * attr.c (__pthread_attr_setguardsize); Use page_roundup
4280         instead of roundup.
4281         * manager.c (pthread_allocate_stack): Make sure guardaddr is
4282         page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
4283         is define.
4285 1999-12-17  Hans Boehm  <hboehm@exch.hpl.hp.com>
4287         * manager.c (pthread_allocate_stack): Unmap the stack top
4288         if failed to map the stack bottom.
4289         Fix the guard page.
4290         (pthread_free): Fix the guard page.
4292         * pthread.c (pthread_initialize): Set rlimit correctly for
4293         NEED_SEPARATE_REGISTER_STACK.
4295 1999-12-16  H.J. Lu  <hjl@gnu.org>
4297         * pthread.c (__pthread_initialize_manager): Pass
4298         __pthread_manager_thread_bos instead of
4299         __pthread_manager_thread_tos to __clone2.
4301 1999-12-16  H.J. Lu  <hjl@gnu.org>
4303         * manager.c (pthread_allocate_stack): Correct the calculation
4304         of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
4305         stack bottom.
4307 1999-12-13  H.J. Lu  <hjl@gnu.org>
4309         * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
4310         bit after setting ar.ccv.
4312 1999-12-12  H.J. Lu  <hjl@gnu.org>
4314         * manager.c (pthread_allocate_stack): Make the starting
4315         address of the stack bottom page aligned. FIXME: it may
4316         need changes in other places.
4317         (pthread_handle_create): Likewise.
4319 1999-12-11  Hans Boehm  <hboehm@exch.hpl.hp.com>
4321         * manager.c (pthread_allocate_stack): Handle
4322         NEED_SEPARATE_REGISTER_STACK.
4323         (pthread_handle_create): Likewise.
4324         * pthread.c (__pthread_initialize_manager): Likewise.
4326         * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
4328 1999-12-02  H.J. Lu  <hjl@gnu.org>
4330         * sysdeps/ia64/pt-machine.h: New.
4332 2000-07-13  Ulrich Drepper  <drepper@redhat.com>
4334         * wrapsyscall.c: Mark non-__ protected names as weak.
4335         PR libc/1466.
4337 2000-07-12  Bruno Haible  <haible@clisp.cons.org>
4339         * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
4341 2000-07-12  Ulrich Drepper  <drepper@redhat.com>
4343         * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
4344         Add tests also to new alternative spinlock implementation.
4345         * spinlock.h: Likewise.
4346         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4348 2000-07-06  Ulrich Drepper  <drepper@redhat.com>
4350         * Version: Export __sigaction.
4351         * signals.c: Define __sigaction alias.  Use __libc_sigaction instead
4352         of __sigaction.
4353         * pthread.c: Use __libc_sigaction instead of __sigaction.
4355         * condvar.c: Implement pthread_condattr_getpshared and
4356         pthread_condattr_setpshared.
4357         * mutex.c: Implement pthread_mutexattr_getpshared and
4358          pthread_mutexattr_setpshared.
4359         * Versions: Export new functions.
4360         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
4362         * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
4363         (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
4364         is not selected.
4366 2000-07-04  Greg McGary  <greg@mcgary.org>
4368         * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
4369         pragmas.  Include bp-sym.h only if _LIBC.
4371 2000-07-04  Ulrich Drepper  <drepper@redhat.com>
4373         * spinlock.c (__pthread_unlock): Properly place write barrier.
4374         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4376 2000-07-03  Ulrich Drepper  <drepper@redhat.com>
4378         * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
4379         faster on SMP systems.  No more emulation of compare&swap for adaptive
4380         spinlocks.
4381         * spinlock.h: Likewise.
4382         * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
4383         Replace fast with adaptive mutex.
4384         * mutex.c: Rewrite for replacement of fast by adaptive mutex.
4385         * condvar.c: Likewise.
4386         * pthread.c: Define and initialize __pthread_smp_kernel variable.
4387         * internals.h: Declare __pthread_smp_kernel.
4388         * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
4389         _pthread_fastlock structure.
4390         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4392         * pthread.c: Remove initialization to zero from global variables.
4394 2000-06-29  Jakub Jelinek  <jakub@redhat.com>
4396         * shlib-versions: Make sparc64 GLIBC_2.2+ only.
4398 2000-06-28  Greg McGary  <greg@mcgary.org>
4400         * weaks.c: Wrap BP_SYM () around weak extern declarations of
4401         pthread functions that have pointers in their return+arg signatures.
4403 2000-06-27  Greg McGary  <greg@mcgary.org>
4405         * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
4406         extern declarations of pthread functions that have pointers in
4407         their return+arg signatures.
4409 2000-06-26  Ulrich Drepper  <drepper@redhat.com>
4411         * Makefile (tests): Add ex11.  Add rules to build it.
4412         * Examples/ex11.c: New file.
4413         * rwlock.c: Fix complete braindamaged previous try to implement
4414         timedout functions.
4416         * spinlock.c: Pretty print.
4418 2000-06-25  Ulrich Drepper  <drepper@redhat.com>
4420         * Makefile (tests): Add ex10.  Add rules to build it.
4421         * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
4422         pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
4423         * condvar.c (pthread_cond_wait): Allow mutex of kind
4424         PTHREAD_MUTEX_TIMED_NP.
4425         (pthread_cond_timedwait_relative): Likewise.
4426         * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
4427         (__pthread_mutex_trylock): Use __pthread_alt_trylock for
4428         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
4429         (__pthread_mutex_lock): Use __pthread_alt_lock for
4430         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
4431         (__pthread_mutex_timedlock): New function.
4432         (__pthread_mutex_unlock): Use __pthread_alt_unlock for
4433         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
4434         (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
4435         (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
4436         * spinlock.c: Implement alternate fastlocks.
4437         * spinlock.h: Add prototypes.
4438         * Examples/ex10.c: New file.
4439         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
4440         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4442         * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
4443         (__pthread_rwlock_timedrdlock): New function.
4444         (__pthread_rwlock_timedwrlock): New function.
4445         Use laternate fastlock function everywhere.
4447 2000-06-21  Andreas Jaeger  <aj@suse.de>
4449         * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
4450         prototype.
4452         * join.c: Include <stdlib.h> for exit prototype.
4454 2000-06-20  Ulrich Drepper  <drepper@redhat.com>
4456         * sysdeps/i386/useldt.h: Include <stdlib.h>.
4458         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
4459         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4461         * Makefile (libpthread-routines): Add barrier.
4462         (tests): Add ex9.  Add rule to build ex9.
4463         * Versions: Export barrier functions.
4464         * barrier.c: New file.
4465         * Examples/ex9.c: New file.
4466         * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
4467         * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
4468         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4470 2000-06-19  H.J. Lu  <hjl@gnu.org>
4472         * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
4473         HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
4474         (compare_and_swap_with_release_semantics): New. Default to
4475         compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
4476         is not defined.
4478         * spinlock.c (__pthread_unlock): Call
4479         compare_and_swap_with_release_semantics () instead of
4480         compare_and_swap ().
4482 2000-06-19  Ulrich Drepper  <drepper@redhat.com>
4484         * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
4485         to errno directly.
4486         * sysdeps/pthread/timer_delete.c: Likewise.
4487         * sysdeps/pthread/timer_getoverr.c: Likewise.
4488         * sysdeps/pthread/timer_gettime.c: Likewise.
4489         * sysdeps/pthread/timer_settime.c: Likewise.
4491 2000-06-13  Kaz Kylheku  <kaz@ashi.footprints.net>
4493         Timer nodes are now reference counted, and can be marked
4494         as deleted. This allows for the safe release of the global mutex
4495         in the middle without losing the timer being operated on.
4497         * sysdeps/pthread/posix-timer.h (struct timer_node):  The inuse
4498         member is now an enum with three values, so that an intermediate
4499         state can be represented (deleted but not free for reuse yet).
4500         New refcount member added.
4501         * sysdeps/pthread/timer_routines.c: Likewise.
4503         * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
4504         timer_valid): New inline functions added.
4506         * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
4507         restructured, recursive deadlock bug fixed.
4509         * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
4510         timer_addref to ensure that timer won't be deleted while mutex is not
4511         held. Also uses timer_invalid to perform validation of timer handle.
4512         * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
4513         * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
4515 2000-06-14  Ulrich Drepper  <drepper@redhat.com>
4517         * shlib-versions: Add entry for SH.
4518         Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
4520 2000-06-13  Kaz Kylheku  <kaz@ashi.footprints.net>
4522         A few optimizations.  Got rid of unnecessary wakeups of timer threads,
4523         tightened up some critical regions and micro-optimized some list
4524         manipulation code.
4526         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
4527         Returns int value now to indicate whether timer was queued at head.
4528         * sysdeps/pthread/posix-timer.h: Likewise.
4529         * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
4530         new return value from __timer_thread_queue_timer to avoid waking
4531         up timer thread unnecessarily.
4533         * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
4534         inuse flag, because this requires mutex to be held.  Callers updated
4535         to do the check when they have the mutex.
4536         * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
4538         * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
4539         regions: avoids making system calls while holding timer mutex, and
4540         a few computations were moved outside of the mutex as well.
4541         * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
4543         * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
4544         to list_unlink_ip, meaning idempotent.  Pointer manipulation
4545         changed to get better better code out of gcc.
4546         * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
4547         version of list_unlink added here.
4548         * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
4549         function in all places: idempotent one for timers, non-idempotent
4550         one for thread nodes.
4551         * sysdeps/pthread/timer_settime: Likewise.
4552         * sysdeps/pthread/timer_routines.c: Likewise.
4554 2000-06-13  Ulrich Drepper  <drepper@redhat.com>
4556         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
4557         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4559         * sysdeps/pthread/Makefile: Remove tests definition.
4561 2000-06-12  Kazumoto Kojima  <kkojima@rr.iij4u.or.jp>
4562             Yutaka Niibe  <gniibe@chroot.org>
4564         * sysdeps/sh/pspinlock.c: New file.
4565         * sysdeps/sh/pt-machine.h: New file.
4567 2000-06-12  Ulrich Drepper  <drepper@redhat.com>
4569         * Makefile (tests): Add joinrace.
4571         * Examples/ex6.c: Test return value of pthread_join.
4573 2000-06-11  Geoff Keating  <geoffk@cygnus.com>
4575         * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
4576         (__pthread_spin_trylock): Implement.
4577         (__pthread_spin_unlock): Implement.
4578         (__pthread_spin_init): Implement.
4579         (__pthread_spin_destroy): Implement.
4581 2000-06-10  Ulrich Drepper  <drepper@redhat.com>
4583         * sysdeps/pthread/timer_routines.c (list_append): Little fix to
4584         really append the entry.
4586 2000-06-10  Andreas Jaeger  <aj@suse.de>
4588         * lockfile.c (__fresetlockfiles): Remove unused variable fp.
4590 2000-06-10  Kaz Kylheku  <kaz@ashi.footprints.net>
4592         * sysdeps/pthread/timer_create.c: Thread matching now done on
4593         clock type as well as thread attributes.
4594         There are individual global signal-delivering threads for
4595         different clock types.
4596         * sysdeps/pthread/posix-timer.h: Likewise.
4597         * sysdeps/pthread/timer_routines.c: Likewise.
4599         * sysdeps/pthread/timer_routines.c: Thread allocation and
4600         deallocation function now remembers to put thread on active
4601         list and remove from active list.
4602         Thus now the feature of binding multiple timers
4603         to a single thread actually works.
4605 2000-06-10  Ulrich Drepper  <drepper@redhat.com>
4607         * pthread.c (__pthread_create_2_1): Optimize a bit.
4609         * internals.h (invalid_handle): Also test for p_terminated != 0.
4610         (nonexisting_handle): New function.  Same as old invalid_handle.
4611         * join.c (pthread_join): Use nonexisting_handle instead of
4612         invalid_handle to test for acceptable thread handle.
4613         * manager.c (pthread_handle_free): Likewise.
4614         * joinrace.c: New file.
4615         Reported by Permaine Cheung <pcheung@cygnus.com>.
4617 2000-06-08  Ulrich Drepper  <drepper@redhat.com>
4619         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
4620         Correct handling of matching variable.
4622         * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
4623         avoid warnings.
4625         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
4626         Be prepared for empty timer list.
4628         * sysdeps/pthread/timer_create.c (timer_create): Correct names of
4629         CPUTIME clock ID.  Add support for thread clocks.
4631         * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
4632         subtraction were switched.
4634         * sysdeps/pthread/timer_routines.c (init_module): Use
4635         THREAD_MAXNODES threads.
4637         * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
4638         * sysdeps/pthread/timer_create.c: Fill in creator_pid.
4639         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
4640         with sigqueueinfo is this system call is available.
4642         * sysdeps/pthread/timer_create.c (timer_create): Allow
4643         CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
4645         * sysdeps/pthread/Makefile: New file.  Add rules to build timer
4646         functionality.
4647         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
4649 2000-06-04  Kaz Kylheku  <kaz@ashi.footprints.net>
4651         * sysdeps/pthread/posix-timer.h: New file.
4652         * sysdeps/pthread/timer_create.c: New file.
4653         * sysdeps/pthread/timer_delete.c: New file.
4654         * sysdeps/pthread/timer_getoverr.c: New file.
4655         * sysdeps/pthread/timer_gettime.c: New file.
4656         * sysdeps/pthread/timer_routines.c: New file.
4657         * sysdeps/pthread/timer_settime.c: New file.
4658         * sysdeps/pthread/tst-timer.c: New file.
4660 2000-06-08  Ulrich Drepper  <drepper@redhat.com>
4662         * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
4663         LINK_MAX definitions if necessary.
4665 2000-06-04  Kaz Kylheku  <kaz@ashi.footprints.net>
4667         Added missing fork time handling of global libio lock.
4669         * lockfile.c (__fresetlockfiles): Now also resets the list lock,
4670         not just the individual stream locks. Rewritten to use new
4671         iterator interface provided by libio rather than accessing
4672         global variable.
4674         * lockfile.c (__flockfilelist, _funlockfilelist): New functions
4675         which lock and unlock the stream list using the new interface
4676         provied by libio.
4677         * internals.h: Likewise.
4679         * ptfork.c (__fork): Now calls __flockfilelist before fork,
4680         and __funlockfilelist in the parent after the fork.
4681         Child still calls __fresetlockfiles as before.
4683         * linuxthreads.texi: Now explains what happens to streams at
4684         fork time. Also whole new section on forking and thread added.
4685         Definition of pthread_atfork moved out of Miscellaneous Functions
4686         to this new section.
4688 2000-06-04  Jakub Jelinek  <jakub@redhat.com>
4690         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
4691         Add missing register.
4692         * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
4694 2000-06-02  Jakub Jelinek  <jakub@redhat.com>
4696         * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
4697         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
4698         * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
4700 2000-05-31  Andreas Jaeger  <aj@suse.de>
4702         * sysdeps/mips/pspinlock.c: Implement spinlocks.
4704 2000-05-28  Ulrich Drepper  <drepper@redhat.com>
4706         * spinlock.c (__pthread_lock): Remove ASSERT.
4708         * Makefile (tests): Add ex8.
4709         * Examples/ex8.c: New file.
4711 2000-05-12  Kaz Kylheku  <kaz@ashi.footprints.net>
4713         Bugfix: The pthread_atfork mechanism now takes care of its
4714         own internal mutex at fork time.
4716         * ptfork.c (__fork): Revised so that the mutex is held across
4717         the fork operation and while the handlers are called, and so that
4718         the child resets the mutex.
4720         * linuxthreads.texi: Updated pthread_atfork documentation to make
4721         it clear that fork and pthread_atfork can't be reentered from
4722         atfork handlers, that pthread_atfork and fork are mutually atomic,
4723         and that the handlers are inherited by the child process.
4725 2000-05-24  Ulrich Drepper  <drepper@redhat.com>
4727         * Makefile (libpthread-routines): Add pspinlock.
4728         * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
4729         Use struct _pthread_fastlock instead of pthread_spinlock_t.
4730         * condvar.c: Likewise.
4731         * internals.h: Likewise.
4732         * join.c: Likewise.
4733         * manager.c: Likewise.
4734         * mutex.c: Likewise.
4735         * pthread.c: Likewise.
4736         * rwlock.c: Likewise.
4737         * semaphore.c: Likewise.
4738         * signals.c: Likewise.
4739         * spinlock.h: Likewise.
4740         * spinlock.c: Likewise.  Remove pthread_spin_lock functions.
4741         * sysdeps/alpha/pspinlock.c: New file.
4742         * sysdeps/arm/pspinlock.c: New file.
4743         * sysdeps/i386/pspinlock.c: New file.
4744         * sysdeps/m68k/pspinlock.c: New file.
4745         * sysdeps/mips/pspinlock.c: New file.
4746         * sysdeps/powerpc/pspinlock.c: New file.
4747         * sysdeps/sparc/sparc32/pspinlock.c: New file.
4748         * sysdeps/sparc/sparc64/pspinlock.c: New file.
4749         * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
4750         back to _pthread_fastlock.  Define new pthread_spinlock_t.
4752 2000-05-24  Andreas Jaeger  <aj@suse.de>
4754         * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
4756 2000-05-21  Jakub Jelinek  <jakub@redhat.com>
4758         * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
4760 2000-05-13  Jakub Jelinek  <jakub@redhat.com>
4762         * internals.h (__RES_PTHREAD_INTERNAL): Define.
4764 2000-05-06  Kaz Kylheku  <kaz@ashi.footprints.net>
4766         * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
4767         object state is represented with additional bits which distinguish
4768         whether that state was set up in the current process, or
4769         in an ancestor process. If that state was set in an ancestor,
4770         it means that a fork happened while thread was executing the init
4771         function. In that case, the state is reset to NEVER.
4772         * mutex.c (__pthread_once_fork_prepare): New function.
4773         (__pthread_once_fork_child): Likewise
4774         (__pthread_once_fork_parent): Likewise
4775         (__pthread_reset_pthread_once): Removed.
4776         * ptfork.c (__fork): Call new handlers in mutex.c.
4777         * internals.h: Declarations of new mutex.c functions added.
4778         Declaration of removed function deleted.
4779         * linuxthreads.texi: Updated documentation about pthread_once
4780         to clarify what happens under cancellation and forking.
4782 2000-05-06  Kaz Kylheku  <kaz@ashi.footprints.net>
4784         * internals.h: New thread manager request type, REQ_KICK.
4785         * join.c (pthread_exit): main thread now calls exit() instead
4786         of _exit() in order to proper process cleanup.
4787         * manager.c (__pthread_manager): Do not terminate manager
4788         after unblocking main thread; wait for main thread's
4789         REQ_PROCESS_EXIT request instead.
4790         Also, added REQ_KICK case to handle new request; this just does
4791         nothing.
4792         * manager.c (pthread_exited): Do not terminate manager after
4793         unblocking main thread.
4794         * manager.c (__pthread_manager_sighandler): If the main thread
4795         is waiting for all other threads to die, send a REQ_KICK into
4796         the thread manager request pipe to get it to clean out the threads
4797         and unblock the main thread as soon as possible. This fixes
4798         the 2000 millisecond hang on shutdown bug.
4799         * Examples/ex7.c: New file, tests shutdown behavior when all threads
4800         including the main one call pthread_exit(), or implicitly do so.
4801         * Makefile (tests): Add ex7.
4803 2000-05-05  Andreas Jaeger  <aj@suse.de>
4805         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
4806         (pthread_getcpuclockid): Correct test for ourselves.
4808 2000-05-05  Ulrich Drepper  <drepper@redhat.com>
4810         * internals.h (struct _pthread_descr_struct): Reorganization.
4811         Allocate room for 16 pointers at head of the structure for future
4812         thread-local data handling.  Move p_self member in this area.
4813         * manager.c (pthread_handle_create): Adjust use of p_self.
4814         * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
4815         * pthread.c (__pthread_initial_thread): Adjust initialization.
4816         (__pthread_manager_thread): Likewise.
4818 2000-04-29  Bruno Haible  <haible@clisp.cons.org>
4820         * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
4821         for eventmask larger than 1 word.
4823 2000-04-27  Ulrich Drepper  <drepper@redhat.com>
4825         * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
4826         * pthread.c (__pthread_initialize_minimal): New function.  Perform
4827         minimal initialization.
4828         (pthread_initialize): Remove this code here.
4829         * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again.  We
4830         are working around the problem in glibc.
4832 2000-04-25  Ulrich Drepper  <drepper@redhat.com>
4834         * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
4835         now.  First gcc must be fixed (more concrete: libgcc).
4837 2000-04-24  Ulrich Drepper  <drepper@redhat.com>
4839         * pthread.c: Remove special treatement for interrupt handlers on x86.
4840         * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
4841         * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
4842         necessary.
4843         * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
4845 2000-04-24  Mark Kettenis  <kettenis@gnu.org>
4847         * join.c (pthread_exit): Set p_terminated after reporting the
4848         termination event instead of before.
4850 2000-04-20  Jakub Jelinek  <jakub@redhat.com>
4852         * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
4853         if __USE_UNIX98.
4855 2000-04-18  Andreas Jaeger  <aj@suse.de>
4857         * Versions: Use ld instead of ld.so.
4859 2000-04-18  Jakub Jelinek  <jakub@redhat.com>
4861         * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
4862         Remove the typedef keyword.
4864 2000-04-18  Jakub Jelinek  <jakub@redhat.com>
4866         * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
4867         not stbar.
4868         (READ_MEMORY_BARRIER): Define.
4869         * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
4870         MEMORY_BARRIER.
4871         * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
4872         headers.
4874 2000-04-17  Ulrich Drepper  <drepper@redhat.com>
4876         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
4877         (pthread_getcpuclockid): Don't compare thread_id with thread_self,
4878         use thread_handle().
4880 2000-04-16  Ulrich Drepper  <drepper@redhat.com>
4882         * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
4883         if fast mutex is used.  Don't initialize `already_canceled' twice.
4884         Correctly test for return value of timedsuspend.
4886         * pthread.c: Correct long-time braino.  We never set SA_SIGINFO and
4887         therefore don't need the _rt versions of the signal handlers.
4889 2000-04-15  Ulrich Drepper  <drepper@redhat.com>
4891         * pthread.c (pthread_yield): New function.
4892         * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
4893         * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
4894         * internals.h: Declare __pthread_yield.
4896         * pthread.c (pthread_initialize): Avoid a bit more code if
4897         realtime signals are known to exist.
4899         * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
4900         to dynamically detect RT signals and avoid generating compatibility
4901         functions with old kernel.
4902         * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
4903         __pthread_restart_new directly.
4904         (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
4905         __pthread_wait_for_restart_signal directly.
4906         (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
4907         __pthread_timedsuspend_new directly.
4909 2000-04-15  Ulrich Drepper  <drepper@redhat.com>
4911         * condvar.c: Remove all the special code to handle cond_timedwait.
4912         Use timedsuspend instead.
4913         * internals.h: Declare __pthread_timedsuspend_old,
4914         __pthread_timedsuspend_new, and __pthread_timedsuspend.
4915         Remove declaration of __pthread_init_condvar.
4916         * pthread.c: Define __pthread_timedsuspend variable.
4917         (__pthread_timedsuspend_old): New function.  Timed suspension
4918         implementation for old Linux kernels.
4919         (__pthread_timedsuspend_new): New function.  Timed suspension
4920         implementation for new Linux kernels.
4921         * restart.h (timedsuspend): New function.  Call appropriate
4922         suspension function through __pthread_timedsuspend.
4923         * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
4924         the code.
4925         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4927         * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
4928         undefined.
4929         * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
4930         where possible.
4931         * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
4932         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
4934         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
4935         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4937 2000-04-14  Andreas Jaeger  <aj@suse.de>
4939         * weaks.c: Fix typo.
4941         * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
4942         2.2 for linuxthreads.
4944 2000-04-13  Ulrich Drepper  <drepper@redhat.com>
4946         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
4947         (pthread_getcpuclockid): Fix typo.
4949 2000-04-12  Ulrich Drepper  <drepper@redhat.com>
4951         * Makefile (libpthread-routines): Add getcpuclockid.
4952         * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
4953         * sysdeps/pthread/getcpuclockid.c: New file.
4954         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
4955         * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
4957         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
4958         Defined.
4959         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4961         * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
4962         pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
4963         and pthread_spin_unlock.
4964         * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
4965         into pthread_spinlock_t.  Change all uses.
4966         * spinlock.c: Implement pthread_spin_lock.
4967         Rename __pthread_unlock to __pthread_spin_unlock and define weak
4968         alias for real name.
4969         Define pthread_spin_trylock, pthread_spin_init, and
4970         pthread_spin_destroy.
4971         Change all uses of _pthread_fastlock to pthread_spinlock_t.
4972         * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
4973         Change all uses of _pthread_fastlock to pthread_spinlock_t.
4974         * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
4975         pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
4976         and pthread_spin_unlock.
4977         * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
4978         Change all uses of _pthread_fastlock to pthread_spinlock_t.
4979         * condvar.c: Likewise.
4980         * internals.h: Likewise.
4981         * join.c: Likewise.
4982         * manager.c: Likewise.
4983         * mutex.c: Likewise.
4984         * pthread.c: Likewise.
4985         * rwlock.c: Likewise.
4986         * semaphore.c: Likewise.
4987         * signals.c: Likewise.
4989         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
4990         macros.
4991         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
4993 2000-04-11  Ulrich Drepper  <drepper@redhat.com>
4995         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
4996         _POSIX_SHARED_MEMORY_OBJECTS.
4998 2000-04-11  Andreas Jaeger  <aj@suse.de>
5000         * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
5001         (__compare_and_swap): Mark as modifying memory.
5003 2000-04-11  Geoff Keating  <geoffk@cygnus.com>
5005         * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
5006         __volatile__.
5007         (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
5008         Don't have the 'asm' __volatile__.
5010 2000-04-11  Ulrich Drepper  <drepper@redhat.com>
5012         * internals.h: Define MEMORY_BARRIER as empty if not defined already.
5013         * spinlock.c (__pthread_lock): Add memory barriers.
5014         (__pthread_unlock): Likewise.
5015         * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
5016         instruction.
5017         (RELEASE): Not needed anymore.
5018         (__compare_and_swap): Mark asm as modifying memory.
5019         * sysdeps/powerpc/pt-machine.h (sync): Remove.  Replace with definition
5020         of MEMORY_BARRIER.
5021         (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
5022         * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
5023         (MEMORY_BARRIER): Define using stbar.
5024         * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
5025         stbar.
5026         (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
5027         Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
5028         Mike Burrows <m3b@pa.dec.com>.
5030 2000-04-09  Ulrich Drepper  <drepper@redhat.com>
5032         * signals.c (sigaction): Fix return value for the case SIG is one
5033         of the signals the implementation uses.
5034         Patch by Xavier.Leroy@inria.fr.
5036 2000-04-01  Andreas Jaeger  <aj@suse.de>
5038         * attr.c: Use shlib-compat macros.
5039         * oldsemaphore.c: Likewise.
5040         * pthread.c: Likewise.
5041         * weaks.c: Likewise.
5043 2000-03-26  Ulrich Drepper  <drepper@redhat.com>
5045         * semaphore.c (sem_timedwait): New function.
5046         Patch by Carl Mailloux <carlm@oricom.ca>.
5047         * semaphore.h: Declare sem_timedwait.
5048         * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
5050 2000-03-26  Roland McGrath  <roland@baalperazim.frob.com>
5052         * sysdeps/pthread/Makefile: File removed.
5054 2000-03-23  Ulrich Drepper  <drepper@redhat.com>
5056         * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
5057         * internals.h (__pthread_reset_pthread_once): Add prototype.
5058         * ptfork.c (__fork): Call __pthread_reset_pthread_once.
5060         * manager.c (pthread_handle_create): Store ID of new thread before
5061         clone call.
5063 2000-03-21  Ulrich Drepper  <drepper@redhat.com>
5065         * attr.c: Use new macros from shlib-compat.h to define versions.
5066         * oldsemaphore.c: Likewise.
5067         * semaphore.c: Likewise.
5068         * weaks.c: Likewise.
5070         * pthread.c: Update for new SHLIB_COMPAT definition.
5072         * manager.c (__pthread_manager): Unmask debug signal.
5074         * pthread.c (pthread_initialize): Test for address of __dso_handle
5075         being NULL, not value.  Use __on_exit, not on_exit.
5076         Patch by Andreas Jaeger <aj@suse.de>.
5078         * pthread.c: Use new macros from shlib-compat.h to define versions.
5080 2000-03-19  Ulrich Drepper  <drepper@redhat.com>
5082         * pthread.c (pthread_initialize): Instead of on_exit use
5083         __cxa_atexit if __dso_label is available to allow unloading the
5084         libpthread shared library.
5086 2000-03-16  Ulrich Drepper  <drepper@redhat.com>
5088         * condvar.c: Make tests for ownership of mutex less strict.
5090 2000-03-14  Ulrich Drepper  <drepper@redhat.com>
5092         * condvar.c (pthread_cond_wait): Check whether mutex is owned by
5093         current thread and return error if not.
5094         (pthread_cond_timedwait_relative_old): Likewise.
5095         (pthread_cond_timedwait_relative_new): Likewise.
5097         * mutex.c (__pthread_once): Handle cancelled init function correctly.
5098         (pthread_once_cancelhandler): New function.
5099         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
5101 2000-03-14  Andreas Jaeger  <aj@suse.de>
5103         * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
5104         REG_GS.
5105         (pthread_handle_sigrestart_rt): Likewise.
5106         * signals.c (pthread_sighandler_rt): Likewise.
5108 2000-03-02  Andreas Jaeger  <aj@suse.de>
5110         * sysdeps/pthread/bits/libc-lock.h: Fix typo.
5111         Reported by Sean Chen <sean.chen@turbolinux.com>.
5113 2000-02-28  Andreas Jaeger  <aj@suse.de>
5115         * rwlock.c: Fix typo.
5117 2000-02-27  Ulrich Drepper  <drepper@redhat.com>
5119         * rwlock.c: Define __* variants of the functions and make old names
5120         aliases.
5121         * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
5122         * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
5124 2000-02-25  Andreas Jaeger  <aj@suse.de>
5126         * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
5127         pwrite64, lseek64, open64, and __open64 with version 2.2.
5129 2000-02-22  Ulrich Drepper  <drepper@redhat.com>
5131         * semaphore.h (SEM_FAILED): Use 0 not NULL.
5133 2000-02-14  Ulrich Drepper  <drepper@redhat.com>
5135         * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
5136         nanosleep does not work either.  Get absolute time inside the
5137         loop.
5138         (pthread_cond_timedwait_relative_new): Likewise.
5139         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
5141 2000-02-13  Andreas Jaeger  <aj@suse.de>
5143         * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
5144         (pthread_cond_timedwait_relative_old): Likewise.
5146 2000-02-13  Ulrich Drepper  <drepper@redhat.com>
5148         * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
5149         but keep the code around.  A bug in the kernel prevent us from
5150         using the code.
5151         (pthread_cond_timedwait_relative_new): Likewise.
5152         (PR libc/1597 and libc/1598).
5154 2000-02-01  Kaz Kylheku  <kaz@ashi.footprints.net>
5156         * condvar.c (pthread_cond_timedwait_relative_old): Do tight
5157         loop around nanosleep calls instead of around most of the function
5158         (pthread_cond_timedwait_relative_new): Likewise.
5159         body.  Got rid of backwards goto and one local.
5161 2000-01-31  Ulrich Drepper  <drepper@redhat.com>
5163         * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
5164         before every nanosleep call to account for time spent in the rest
5165         of the function.
5166         (pthread_cond_timedwait_relative_new): Likewise.
5167         Patch by khendricks@ivey.uwo.ca (PR libc/1564).
5169 2000-01-29  Ulrich Drepper  <drepper@redhat.com>
5171         * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
5172         from nanosleep call so that in case we restart we only wait for the
5173         remaining time.
5174         (pthread_cond_timedwait_relative_new): Likewise.
5175         Patch by khendricks@ivey.uwo.ca (PR libc/1561).
5177 2000-01-18  Ulrich Drepper  <drepper@cygnus.com>
5179         * manager.c (pthread_allocate_stack): Compute guard page address
5180         correctly.  Patch by HJ Lu.
5182         * sysdeps/pthread/pthread.h: Define
5183         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
5185 2000-01-16  Ulrich Drepper  <drepper@cygnus.com>
5187         * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
5188         preference handling.
5189         (pthread_rwlockattr_setkind_np): Allow
5190         PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
5191         Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
5193 2000-01-12  Ulrich Drepper  <drepper@cygnus.com>
5195         * internals.h (pthread_readlock_info): New structure.
5196         (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
5197         p_untracked_readlock_count.
5198         * pthread.c (__pthread_initial_thread, pthread_manager_thread):
5199         Add initializers for new fields.
5200         * manager.c (pthread_free): Free read/write lock lists.
5201         * queue.h (queue_is_empty): New function.
5202         * rwlock.c: Implement requirements about when readers should get
5203         locks assigned.
5204         * sysdeps/pthread/pthread.h
5205         (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
5206         * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
5207         Define this name as well.
5208         Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
5210 2000-01-05  Ulrich Drepper  <drepper@cygnus.com>
5212         * pthread.c (__pthread_initial_thread, pthread_manager_thread):
5213         Adjust initializers for struct _pthread_descr_struct change.
5214         * internals.h (struct _pthread_descr_struct): Move new elements to
5215         the end.
5217 2000-01-03  Kaz Kylheku  <kaz@ashi.footprints.net>
5219         Redesigned how cancellation unblocks a thread from internal
5220         cancellation points (sem_wait, pthread_join,
5221         pthread_cond_{wait,timedwait}).
5222         Cancellation won't eat a signal in any of these functions
5223         (*required* by POSIX and Single Unix Spec!).
5224         * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
5225         simultaneous condition variable signal (not required by POSIX
5226         or Single Unix Spec, but nice).
5227         * spinlock.c: __pthread_lock queues back any received restarts
5228         that don't belong to it instead of assuming ownership of lock
5229         upon any restart; fastlock can no longer be acquired by two threads
5230         simultaneously.
5231         * restart.h: Restarts queue even on kernels that don't have
5232         queued real time signals (2.0, early 2.1), thanks to atomic counter,
5233         avoiding a rare race condition in pthread_cond_timedwait.
5235 1999-12-31  Andreas Jaeger  <aj@suse.de>
5237         * internals.h: Remove duplicate prototype declarations.
5239         * weaks.c: Remove __THROW from prototypes since the file is not
5240         compiled by a C++ compiler.
5241         * internals.h: Likewise.
5243 1999-12-30  Andreas Jaeger  <aj@suse.de>
5245         * sysdeps/pthread/pthread.h: Move internal functions to...
5246         * sysdeps/pthread/bits/libc-lock.h: ...here.
5248 1999-12-29  Andreas Jaeger  <aj@suse.de>
5250         * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
5252 1999-12-28  Ulrich Drepper  <drepper@cygnus.com>
5254         * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
5255         beginning.
5257         * manager.c (__pthread_start): Add one more cast to prevent
5258         warning on 64bit machines.
5260 1999-12-21  Ulrich Drepper  <drepper@cygnus.com>
5262         * manager.c (pthread_handle_create): Set p_pid of new thread
5263         before calling the callback function to report a new thread.
5265 1999-12-20  Andreas Jaeger  <aj@suse.de>
5267         * pthread.c (pthread_initialize): Move getrlimit call after
5268         setting of errno.
5270 1999-12-18  Ulrich Drepper  <drepper@cygnus.com>
5272         * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
5273         pwrite64, lseek64, open64, and __open64.
5274         * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
5275         pwrite64, lseek64, open64, and __open64.
5277         * manager.c (pthread_allocate_stack): Correct computation of
5278         new_thread_bottom.  Correct handling of stack size and when the
5279         rlimit method to guard for stack growth is used.
5280         * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
5281         minus one pagesize (not two).
5283 1999-12-03  Andreas Jaeger  <aj@suse.de>
5285         * Versions: Add __res_state with version GLIBC_2.2.
5287         * errno.c (__res_state): New function to return thread specific
5288         resolver state.
5290         * pthread.c (pthread_initialize): Initialize p_resp.
5291         (__pthread_reset_main_thread): Also set p_resp.
5293         * manager.c (pthread_handle_create): Initialize p_resp.
5295         * internals.h: Add thread specific resolver state.
5296         Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
5298 1999-12-01  Ulrich Drepper  <drepper@cygnus.com>
5300         * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
5301         beginning.
5302         * sysdeps/i386/i686/pt-machine.h: Likewise.
5303         Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
5305 1999-11-23  Ulrich Drepper  <drepper@cygnus.com>
5307         * manager.c (pthread_start_thread_event): Initialize p_pid already
5308         here.
5310 1999-11-22  Ulrich Drepper  <drepper@cygnus.com>
5312         * internals.h: Add prototype for __pthread_manager_event.
5313         * manager.c (__pthread_manager_event): New function.
5314         (pthread_start_thread_event): Correct computation of self.
5315         Use INIT_THREAD_SELF.
5316         * pthread.c (__pthread_manager_thread): Initialize p_lock.
5317         (__pthread_initialize_manager): Respect event flags also for creation
5318         of the manager thread.
5320 1999-11-08  Ulrich Drepper  <drepper@cygnus.com>
5322         * pthread.c (__pthread_initialize_manager): Initialize
5323         __pthread_manager_thread.p_tid.
5325 1999-11-02  Ulrich Drepper  <drepper@cygnus.com>
5327         * internals.h: Declare __pthread_last_event.
5328         * manager.c: Define __pthread_last_event.
5329         (pthread_handle_create): Set __pthread_last_event.
5330         (pthread_exited): Likewise.
5331         * join.c (pthread_exit): Likewise.
5333         * Makefile (libpthread-routines): Add events.
5334         * events.c: New file.
5335         * internals.h: Protect against multiple inclusion.
5336         Include thread_dbP.h header.
5337         (struct _pthread_descr_struct): Add new fields p_report_events and
5338         p_eventbuf.
5339         Declare event reporting functions.
5340         * join.c (pthread_exit): Signal event if this is wanted.
5341         * manager.c (__pthread_threads_events): New variable.
5342         (pthread_handle_create): Take new parameters with event information.
5343         Signal TD_CREATE event if wanted.
5344         (__pthread_manager): Adjust pthread_handle_create call.
5345         (pthread_start_thread_event): New function.  Block until manager is
5346         finished and then call pthread_start_thread.
5347         (pthread_exited): Signal TD_REAP event if wanted.
5349 1999-10-26  Ulrich Drepper  <drepper@cygnus.com>
5351         * restart.h (suspend_with_cancellation): Rewrite as a macro.
5353         * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
5355 1999-10-25  Andreas Jaeger  <aj@suse.de>
5357         * internals.h: Remove K&R compatibility.
5358         * no-tsd.c: Likewise.
5359         * semaphore.h: Likewise.
5360         * signals.c: Likewise.
5361         * sysdeps/pthread/bits/libc-tsd.h: Likewise.
5362         * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
5363         * weaks.c: Likewise.
5365 1999-10-21  Xavier Leroy  <Xavier.Leroy@inria.fr>
5367         * pthread.c: For i386, wrap pthread_handle_sigrestart and
5368         pthread_handle_sigcancel with functions that restore %gs from the
5369         signal context.  For each signal handling function, two wrappers
5370         are required, one for a non-RT signal and one for a RT signal.
5371         * signal.c: For i386, add code to restore %gs from the signal
5372         context in pthread_sighandler and pthread_sighandler_rt.
5374 1999-10-17  Ulrich Drepper  <drepper@cygnus.com>
5376         * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
5378 1999-10-14  Ulrich Drepper  <drepper@cygnus.com>
5380         * pthread.c (__pthread_initial_thread): Pass argument to
5381         PTHREAD_START_ARGS_INITIALIZER.
5382         (__pthread_manager_thread): Likewise.
5384         * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
5385         initialize function.
5387         * manager.c (pthread_handle_create): Remove p_startfct initialization.
5389         * internals.h (_pthread_descr_struct): We don't need p_startfct field.
5391 1999-10-12  Ulrich Drepper  <drepper@cygnus.com>
5393         * internals.h: Correct return types for __libc_read and __libc_write.
5395 1999-10-09  Andreas Jaeger  <aj@suse.de>
5397         * internals.h: Add __new_sem_post to get prototype in
5398         manager.c; include semaphore.h for needed types.
5400 1999-10-08  Ulrich Drepper  <drepper@cygnus.com>
5402         * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
5403         directly instead of calling sem_post which should not be necessary
5404         but is faster and might help in some case to work around problems.
5405         Patch by khendricks@ivey.uwo.ca [libc/1382].
5407 1999-10-08  Andreas Schwab  <schwab@suse.de>
5409         * sysdeps/pthread/Subdirs: New file.
5410         * Implies: Removed.
5412 1999-10-07  Ulrich Drepper  <drepper@cygnus.com>
5414         * Implies: New file.
5415         * internals.h (struct _pthread_descr_struct): Add p_startfct.
5416         * manager.c (pthread_handle_create): Initialize p_startfct.
5417         * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
5419 1999-09-25  Ulrich Drepper  <drepper@cygnus.com>
5421         * manager.c (__linuxthreads_pthread_threads_max): New variable.
5422         * specific.c (__linuxthreads_pthread_keys_max): New variable.
5423         (__linuxthreads_pthread_key_2ndlevel_size): New variable.
5425         * condvar.c (pthread_cond_timedwait_relative): Never return with
5426         EINTR.  Patch by Andreas Schwab.
5428 1999-09-19  Ulrich Drepper  <drepper@cygnus.com>
5430         * signals.c (sigaction): Correct last patch.  Don't select
5431         pthread_sighandler_rt based on the signal number but instead of
5432         the SA_SIGINFO flag.
5434 1999-09-23  Ulrich Drepper  <drepper@cygnus.com>
5436         * specific.c: Move definitions of struct pthread_key_struct and
5437         destr_function to ...
5438         * internals.h: ...here.
5440 1999-09-18  Ulrich Drepper  <drepper@cygnus.com>
5442         * pthread.c (pthread_handle_sigrestart_rt): New function.  Use
5443         this instead of pthread_handle_sigrestart if the signal is an RT
5444         signal.
5446         * signals.c: Handle passing through of sighandler arguments also
5447         for real-time signals.
5449 1999-09-03  Andreas Schwab  <schwab@suse.de>
5451         * ptfork.c (__fork): Renamed from fork and use __libc_fork.  Add
5452         fork as weak alias.
5453         (__vfork): New function, alias vfork.
5454         * Versions: Export __fork, vfork, and __vfork in libpthread.
5456 1999-08-23  Andreas Schwab  <schwab@suse.de>
5458         * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
5459         call to signal handler.
5461 1999-08-20  Ulrich Drepper  <drepper@cygnus.com>
5463         * pthread.c (__pthread_reset_main_thread): Undo last change.
5464         (__pthread_kill_other_threads_np): Reset signal handlers for the
5465         signals we used in the thread implementation here.
5467 1999-08-19  Ulrich Drepper  <drepper@cygnus.com>
5469         * pthread.c (__pthread_reset_main_thread): Reset signal handlers
5470         for the signals we used in the thread implementation [PR libc/1234].
5472         * Versions: Export __pthread_kill_other_threads_np from libpthread
5473         for GLIBC_2.1.2.
5475         * signals.c: Pass sigcontext through wrapper to the user function.
5477 1999-08-01  Ulrich Drepper  <drepper@cygnus.com>
5479         * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
5480         __libc_internal_tsd_set.
5482 1999-07-29  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5484         * manager.c: Remove inclusion of <linux/tasks.h> since it's not
5485         needed anymore.
5487 1999-07-16  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5489         * internals.h: Align _pthread_descr_struct to 32 bytes.
5490         Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
5491         libc/1206.
5493 1999-07-09  Ulrich Drepper  <drepper@cygnus.com>
5495         * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
5496         swap function.
5498 1999-07-09  Cristian Gafton  <gafton@redhat.com>
5500         * Makefile (libpthread-routines): Add oldsemaphore routine.
5501         * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
5502         sem_trywait, and sem_wait to GLIBC_2.1.
5503         * oldsemaphore.c: New file.
5504         * semaphore.c: Add default_symbol_versions for the changed functions.
5505         (__new_sem_init): Rename from sem_init.
5506         (__new_sem_post): Rename from sem_post.
5507         (__new_sem_wait): Rename from sem_wait.
5508         (__new_sem_trywait): Rename from sem_trywait.
5509         (__new_sem_getvalue): Rename from sem_getvalue.
5510         (__new_sem_destroy): Rename from sem_destroy.
5512 1999-06-23  Robey Pointer  <robey@netscape.com>
5514         * internals.h: Added p_nextlock entry to separate queueing for a
5515         lock from queueing for a CV (sometimes a thread queues on a lock
5516         to serialize removing itself from a CV queue).
5517         * pthread.c: Added p_nextlock to initializers.
5518         * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
5520 1999-07-09  Ulrich Drepper  <drepper@cygnus.com>
5522         * manager.c (pthread_handle_create): Free mmap region after stack
5523         if clone failed.  Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
5525 1999-05-23  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5527         * man/pthread_cond_init.man: Correct example.
5528         Reported by Tomas Berndtsson <tomas@nocrew.org>.
5530         * linuxthreads.texi (Condition Variables): Likewise.
5532 1999-05-18  Jakub Jelinek  <jj@ultra.linux.cz>
5534         * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
5535         casx not cas, also successful casx returns the old value in rd
5536         and not the new value.
5538 1999-05-16  Xavier Leroy  <Xavier.Leroy@inria.fr>
5540         * manager.c: If pthread_create() is given a NULL attribute
5541         and the thread manager runs with a realtime policy, set the
5542         scheduling policy of the newly created thread back to SCHED_OTHER.
5543         * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
5544         initialize the schedpolicy field of new_thread->p_start_args
5545         to that of the calling thread.
5547 1999-04-29  Ulrich Drepper  <drepper@cygnus.com>
5549         * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
5550         instruction does not allow memory element to use offset.
5552 1999-04-28  Ulrich Drepper  <drepper@cygnus.com>
5554         * manager.c (pthread_allocate_stack): Optimize initialization of new
5555         thread descriptor.
5557         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
5558         Don't use initializer since it is all zeroes.
5559         (__libc_once_define): Likewise.
5561 1999-04-16  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5563         * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
5564         doesn't exist anymore.
5565         * sysdeps/i386/Implies: Likewise.
5566         * sysdeps/m68k/Implies: Likewise.
5567         * sysdeps/mips/Implies: Likewise.
5568         * sysdeps/powerpc/Implies: Likewise.
5569         * sysdeps/sparc/sparc32/Implies: Likewise.
5570         * sysdeps/sparc/sparc64/Implies: Likewise.
5572 1999-04-15  Ulrich Drepper  <drepper@cygnus.com>
5574         * sysdeps/alpha/bits/semaphore.h: Removed.
5575         * sysdeps/powerpc/bits/semaphore.h: Removed.
5576         * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
5577         * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
5578         * Makefile (headers): Remove bits/semaphore.h.
5580         * semaphore.h: Define _pthread_descr if necessary.
5581         Don't include limits.h.  Define SEM_VALUE_MAX directly.
5582         Define SEM_FAILED.
5583         (sem_t): Protect element names with leading __.
5584         Add declarations for sem_close, sem_open, and sem_unlink.
5585         * semaphore.c: Adjust all functions for new element names.
5586         Define sem_close, sem_open, and sem_unlink.
5587         * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
5588         GLIBC_2.1.1.
5589         * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
5590         necessary.
5592 1999-03-16  H.J. Lu  <hjl@gnu.org>
5594         * specific.c (pthread_key_delete): Check th->p_terminated to see
5595         if the thread is running.
5597         * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
5598         Added to GLIBC_2.0 for libc.so.
5600 1999-02-12  H.J. Lu  <hjl@gnu.org>
5602         * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
5603         __libc_allocate_rtsig): Added to GLIBC_2.1.
5605         * internals.h (DEFAULT_SIG_RESTART): Removed.
5606         (DEFAULT_SIG_CANCEL): Removed.
5608         * pthread.c (init_rtsigs, __libc_current_sigrtmin,
5609         __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
5610         (__pthread_sig_restart, __pthread_sig_cancel,
5611         __pthread_sig_debug): Initialized.
5612         (pthread_initialize): Call init_rtsigs () to initialize
5613         real-time signals.
5615 1999-02-03  H.J. Lu  <hjl@gnu.org>
5617         * manager.c (__pthread_manager): Do block __pthread_sig_debug.
5618         Don't restart the thread which sent REQ_DEBUG.
5619         (pthread_start_thread): Check if __pthread_sig_debug > 0
5620         before debugging.
5622         * pthread.c (__pthread_initialize_manager): Suspend ourself
5623         after sending __pthread_sig_debug to gdb instead of
5624         __pthread_sig_cancel.
5626 1999-01-24  H.J. Lu  <hjl@gnu.org>
5628         * manager.c (__pthread_manager): Delete __pthread_sig_debug
5629         from mask if __pthread_sig_debug > 0.
5630         (pthread_handle_create): Increment __pthread_handles_num.
5632         * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
5633         * pthread.c (__pthread_initialize_manager): Likewise.
5635         * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
5636         instead of __libc_allocate_rtsig (2).
5637         (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
5638         instead of __pthread_sig_cancel.
5639         (pthread_handle_sigdebug): Fix comments.
5641 1999-01-21  Ulrich Drepper  <drepper@cygnus.com>
5643         * manager.c (pthread_allocate_stack): Set
5644         __pthread_nonstandard_stacks if user-specified stack is used.
5646 1999-01-16  Ulrich Drepper  <drepper@cygnus.com>
5648         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
5649         _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
5651 1999-01-07  Xavier Leroy  <Xavier.Leroy@inria.fr>
5653         * pthread.c: Use a third signal __pthread_sig_debug distinct
5654         from __pthread_sig_cancel to notify gdb when a thread is
5655         created
5656         * manager.c: Likewise.
5657         * internals.h: Likewise.
5658         * signals.c: The implementation of sigwait(s) assumed that
5659         all signals in s have signal handlers already attached.
5660         This is not required by the standard, so make it work
5661         also if some of the signals have no handlers.
5663 1999-01-05  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
5665         * linuxthreads.texi: Remove pointers from first @node.  Move old
5666         @node spec inside comment.
5668 1998-12-31  Ulrich Drepper  <drepper@cygnus.com>
5670         * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
5671         _IO_lock_unlock.
5673 1998-12-29  Ulrich Drepper  <drepper@cygnus.com>
5675         * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
5676         lock.  Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
5678 1998-12-21  Ulrich Drepper  <drepper@cygnus.com>
5680         * manager.c: Threads now send __pthread_sig_cancel on termination.
5681         Change clone call and signal masks.
5682         * thread.c (pthread_handle_sigrestart): Remove special code for
5683         manager.
5684         (pthread_handle_sigcancel): In manager thread call
5685         __pthread_manager_sighandler.
5686         * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
5687         * sysdeps/i386/i686/pt-machine.h: Likewise.
5688         Patches by Xavier Leroy.
5690 1998-12-14  Ulrich Drepper  <drepper@cygnus.com>
5692         * spinlock.c (__pthread_unlock): Don't crash if called for an
5693         untaken mutex.  Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
5695         * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
5696         overall runtime.
5698 1998-12-13  Ulrich Drepper  <drepper@cygnus.com>
5700         * Examples/ex3.c: Wait until all threads are started before
5701         searching for the number to avoid race condition on very fast
5702         systems.
5704 1998-12-08  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5706         * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
5707         declaration since it's not needed.
5709         * sysdeps/pthread/pthread.h: Move internal functions to ...
5710         * internals.h: ...here.
5712 1998-12-02  H.J. Lu  <hjl@gnu.org>
5714         * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
5715         SIGRTMIN is defined.
5716         (__pthread_sig_cancel): Likewise.
5718 1998-12-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5720         * wrapsyscall.c: Include <sys/mman.h> for msync,
5721         <stdlib.h> for system and <termios.h> for tcdrain prototype.
5722         Correct msync declaration.
5724 1998-11-29  Roland McGrath  <roland@baalperazim.frob.com>
5726         * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
5727         __libc_tsd_set): New macros for new interface.
5728         * no-tsd.c: New file, provide uninitialized defns of
5729         __libc_internal_tsd_get and __libc_internal_tsd_set.
5730         * Makefile (routines): Add no-tsd.
5732 1998-10-12  Roland McGrath  <roland@baalperazim.frob.com>
5734         * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
5735         * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
5736         __libc_internal_tsd_set): Move decls to ...
5737         * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
5738         declarations.
5740         * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
5741         __libc_internal_tsd_set): Make these pointers to functions, not
5742         functions; remove #pragma weak decls for them.
5743         * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
5744         Define static functions and initialized pointers to them.
5746 1998-11-18  Ulrich Drepper  <drepper@cygnus.com>
5748         * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
5749         (CFLAGS-specific.c): Likewise.
5750         (CFLAGS-pthread.c): Likewise.
5751         (CFLAGS-ptfork.c): Likewise.
5752         (CFLAGS-cancel.c): Likewise.
5753         * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
5754         as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
5756         * mutex.c (pthread_mutex_init): Define as strong symbol.
5757         (pthread_mutex_destroy): Likewise.
5758         (pthread_mutex_trylock): Likewise.
5759         (pthread_mutex_lock): Likewise.
5760         (pthread_mutex_unlock): Likewise.
5761         (pthread_mutexattr_init): Likewise.
5762         (pthread_mutexattr_destroy): Likewise.
5763         (pthread_once): Likewise.
5764         * ptfork.c (pthread_atfork): Likewise.
5765         * specific.c (pthread_key_create): Likewise.
5766         (pthread_setspecific): Likewise.
5767         (pthread_getspecific): Likewise.
5769 1998-11-15  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
5771         * linuxthreads.texi: Fix punctuation after xref.
5773 1998-11-10  H.J. Lu  <hjl@gnu.org>
5775         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
5776         if it is defined in <linux/limits.h>.
5778 1998-10-29 14:28  Ulrich Drepper  <drepper@cygnus.com>
5780         * spinlock.h (__pthread_trylock): Define inline.
5781         (__pthread_lock): Add extra parameter to declaration.  Declare
5782         using internal_function.
5783         (__pthread_unlock): Declare using internal_function.
5784         * spinlock.c (__pthread_lock): Add new parameter.  Use it instead
5785         of local variable self.  Avoid recomputing self.  Define using
5786         internal_function.
5787         (__pthread_trylock): Remove.
5788         (__pthread_unlock): Define using internal_function.
5789         * cancel.c: Adjust for __pthread_lock interface change.  Use already
5790         computed self value is possible.
5791         * condvar.c: Likewise.
5792         * join.c: Likewise.
5793         * manager.c: Likewise.
5794         * mutex.c: Likewise.
5795         * pthread.c: Likewise.
5796         * rwlock.c: Likewise.
5797         * semaphore.c: Likewise.
5798         * signals.c: Likewise.
5800 1998-10-27 13:46  Ulrich Drepper  <drepper@cygnus.com>
5802         * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
5803         __ to field names of the struct.
5804         * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
5805         Likewise.
5806         (pthread_attr_t): Likewise.
5807         (pthread_cond_t): Likewise.
5808         (pthread_condattr_t): Likewise.
5809         (pthread_mutex_t): Likewise.
5810         (pthread_mutexattr_t): Likewise.
5811         (pthread_rwlock_t): Likewise.
5812         (pthread_rwlockattr_t): Likewise.
5813         * attr.c: Adjust for pthread.h and pthreadtypes.h change.
5814         * cancel.c: Likewise.
5815         * condvar.c: Likewise.
5816         * manager.c: Likewise.
5817         * mutex.c: Likewise.
5818         * pthread.c: Likewise.
5819         * ptlongjmp.c: Likewise.
5820         * rwlock.c: Likewise.
5821         * spinlock.c: Likewise.
5823 1998-10-09  Ulrich Drepper  <drepper@cygnus.com>
5825         * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
5826         also with PT_EI.
5828         * sysdeps/i386/i686/pt-machine.h: Remove unused inline
5829         definitions.
5831         * Makefile (libpthread-routines): Add pt-machine.
5832         * pt-machine.c: New file.
5833         * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
5834         yet defined.  Use PT_EI in extern inline definitions.
5835         * sysdeps/arm/pt-machine.h: Likewise.
5836         * sysdeps/i386/pt-machine.h: Likewise.
5837         * sysdeps/i386/i686/pt-machine.h: Likewise.
5838         * sysdeps/m68k/pt-machine.h: Likewise.
5839         * sysdeps/mips/pt-machine.h: Likewise.
5840         * sysdeps/powerpc/pt-machine.h: Likewise.
5841         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
5842         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
5844 1998-10-02  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5846         * semaphore.h: Include <sys/types.h> so that _pthread_descr
5847         is declared.
5849 1998-09-15  David S. Miller  <davem@pierdol.cobaltmicro.com>
5851         * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
5852         argument.
5853         * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
5855 1998-09-12 14:24 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
5857         * sysdeps/unix/sysv/linux/bits/sigthread.h: Add multiple inclusion
5858         guard.
5860 1998-09-02 11:08  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
5862         * signals.c (sigaction): Check that sig is less than NSIG to avoid
5863         array index overflow.
5865 1998-09-06 10:56  Ulrich Drepper  <drepper@cygnus.com>
5867         * sysdeps/pthread/semaphore.h: New file.
5869 1998-09-06 09:08  Ulrich Drepper  <drepper@cygnus.com>
5871         * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
5872         _LIBC_TSD_KEY_DL_ERROR.
5874 1998-08-31  Ulrich Drepper  <drepper@cygnus.com>
5876         * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
5877         * sysdeps/i386/pt-machine.h: Likewise.
5878         Suggested by Roland McGrath.
5880 1998-08-28 13:58  Ulrich Drepper  <drepper@cygnus.com>
5882         * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
5883         access thread data with non-constant offsets.
5884         * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
5885         necessary.
5887         * sysdeps/i386/useldt.h: Fix typo.  Add THREAD_GETMEM_NC and
5888         THREAD_SETMEM_NC definitions.
5890         * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
5891         THREAD_SETMEM_NC.
5892         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
5894 1998-08-26 15:46  Ulrich Drepper  <drepper@cygnus.com>
5896         * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
5897         not already defined.
5898         (struct _pthread_descr_struct): Add p_self and p_nr field.
5899         * manager.c (__pthread_handles): Define second element to point
5900         to manager thread.
5901         (__pthread_handles_num): Initialize to 2.
5902         (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
5903         (pthread_start_thread): Likewise.
5904         (pthread_handle_create): Start search for free slot at entry 2.
5905         Initialize new fields p_self and p_nr.
5906         Call __clone with CLONE_PTRACE if available.
5907         (pthread_free): Call FREE_THREAD_SELF if available.
5908         * pthread.c (__pthread_initial_thread): Initialize new fields.
5909         (__pthread_manager_thread): Likewise.
5910         (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
5912         * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
5913         elements of the thread descriptor.
5914         * condvar.c: Likewise.
5915         * errno.c: Likewise.
5916         * join.c: Likewise.
5917         * manager.c: Likewise.
5918         * pthread.c: Likewise.
5919         * ptlongjmp.c: Likewise.
5920         * semaphore.c: Likewise.
5921         * signals.c: Likewise.
5922         * specific.c: Likewise.
5923         * spinlock.c: Likewise.
5925         * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
5927         * sysdeps/i386/useldt.h: New file.
5928         * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
5930         * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
5931         THREAD_SETMEM using __thread_self.
5932         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
5934 1998-08-24  Geoff Keating  <geoffk@ozemail.com.au>
5936         * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
5937         turned out that we didn't need to queue after all.
5939 1998-08-22  Geoff Keating  <geoffk@ozemail.com.au>
5941         * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
5942         and wastes space; correct types.
5944 1998-08-08 11:18  H.J. Lu  <hjl@gnu.org>
5946         * signals.c (sigaction): Handle NULL argument.
5948 1998-08-04  Ulrich Drepper  <drepper@cygnus.com>
5950         * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
5951         of sigset_t.
5953 1998-08-02  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
5955         * Makefile (linuxthreads-version): Extract correct number from
5956         Banner.
5958 1998-07-29  Xavier Leroy  <Xavier.Leroy@inria.fr>
5960         * Banner: Bump version number to 0.8
5961         * FAQ.html: Many updates, in particular w.r.t. debugging.
5962         * manager.c: Support for non-default stacksize for
5963         LinuxThreads-allocated stacks;
5964         don't use guard pages for stacks with default size, rely on
5965         rlimit(RLIMIT_STACK) instead (it's cheaper).
5966         * attr.c: Likewise.
5967         * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
5968         everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
5969         * condvar.c: Likewise.
5970         * internals.h: Likewise.
5971         * restart.h: Likewise.
5972         * signals.c: Likewise.
5973         * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
5975 1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
5977         * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
5978         __pthread_mutexattr_[sg]ettype.  Add more weak aliases.
5979         * Versions: Put __pthread_mutexattr_settype under version
5980         GLIBC_2.0.  Don't export __pthread_mutexattr_setkind_np and
5981         __pthread_mutexattr_gettype.
5983 1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
5985         * sysdeps/pthread/bits/libc-lock.h: Make
5986         __pthread_mutexattr_settype weak.  Don't make
5987         __pthread_mutexattr_setkind_np weak.
5989 1998-07-16 10:52  Ulrich Drepper  <drepper@cygnus.com>
5991         * manager.c (pthread_handle_create): Check whether sched_setscheduler
5992         call can succeed here.
5994         * mutex.c: Define __pthread_mutexattr_settype and make
5995         __pthread_mutexattr_setkind_np an alias.
5996         Likewise for __pthread_mutexattr_gettype.
5998 1998-07-15 11:00 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
6000         * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
6001         is root.
6003 1998-07-14 19:38  Ulrich Drepper  <drepper@cygnus.com>
6005         * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
6007 1998-07-11  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
6009         * Examples/ex6.c: Include <unistd.h> for usleep.
6011 1998-06-13 11:04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6013         * Examples/ex4.c (main): Use exit, not pthread_exit.
6015 1998-07-09 13:39  Ulrich Drepper  <drepper@cygnus.com>
6017         * Versions: Add __pthread_mutexattr_gettype and
6018         __pthread_mutexattr_settype.
6019         * lockfile.c: Use __pthread_mutexattr_settype instead of
6020         __pthread_mutexattr_setkind_np.
6021         * mutex.c: Define __pthread_mutexattr_gettype and
6022         __pthread_mutexattr_settype.
6023         * weak.c: Likewise.
6024         * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
6025         __pthread_mutexattr_settype.
6026         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
6027         Use __pthread_mutexattr_settype.
6029 1998-07-08 22:26  Ulrich Drepper  <drepper@cygnus.com>
6031         * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
6032         * mutex.c: Define weak alias pthread_mutexattr_gettype and
6033         pthread_mutexattr_settype.
6034         * sysdeps/pthread/pthread.h: Declare these functions.
6035         Move pthread_sigmask and pthread_kill declaration in separate header.
6036         * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
6038 1998-07-07 15:20  Ulrich Drepper  <drepper@cygnus.com>
6040         * Makefile: Add rules to compile and run tests.
6041         * Examples/ex1.c: Little changes to fix warnings.
6042         * Examples/ex2.c: Likewise.
6043         * Examples/ex3.c: Likewise.
6044         * Examples/ex4.c: Likewise.
6045         * Examples/ex5.c: Likewise.
6046         * Examples/ex6.c: New file.
6048 1998-07-05 11:54  Ulrich Drepper  <drepper@cygnus.com>
6050         * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
6052 1998-07-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
6054         * attr.c: Include <string.h>.
6056 1998-06-30 11:47  Ulrich Drepper  <drepper@cygnus.com>
6058         * attr.c: Include errno.h.  Use memcpy to copy sched_param.
6059         * internals.h: Include limits.h.
6060         * manager.c: Use memcpy to copy sched_param.
6061         * ptfork.c: Include errno.h.
6062         * pthread.c: Likewise.
6063         * semaphore.c: Likewise.
6064         * specific.c: Likewise.
6065         * spinlock.h: Likewise.
6066         * sysdeps/pthread/pthread.h: Include only allowed headers.  Move
6067         type definition to ...
6068         * sysdeps/pthread/bits/pthreadtypes.h: ...here.  New file.
6070 1998-06-29 12:34  Ulrich Drepper  <drepper@cygnus.com>
6072         * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
6074         * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
6075         as macros as demanded in POSIX.1, Annex C.
6077 1998-06-29 12:29  Ulrich Drepper  <drepper@cygnus.com>
6079         * internals.h (struct pthread_request): For free use pthread_t
6080         instead of pthread_descr.
6081         * join.c (pthread_join): Pass thread_id, not th to manager.
6082         (pthread_detach): Likewise.
6083         * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
6084         (pthread_exited): Remove detached queue code.
6085         (pthread_handle_free): Expect thread ID parameter and use it to
6086         validate the thread decsriptor.  Don't use detached queue.
6087         Patches by Xavier Leroy.
6089 1998-06-27  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6091         * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
6092         _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
6093         __pthread_atfork, __pthread_key_create, __pthread_once.
6094         * internals.h: Doc fix.
6095         * pthread.c (__pthread_initialize): Define again.
6097 1998-06-26  Ulrich Drepper  <drepper@cygnus.com>
6099         * manager.c (pthread_exited): If thread is not detached put it on
6100         special list.
6101         (pthread_handle_free): If thread is not on list with living threads
6102         search on list with detached threads.
6104         * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
6105         for new definition of pthread_rwlock_t.
6107         * spinlock.c: Correct test whether to compile
6108         __pthread_compare_and_swap or not.
6110 1998-06-25 19:27  Ulrich Drepper  <drepper@cygnus.com>
6112         * attr.c: Finish user stack support.  Change locking code to be safe
6113         in situations with different priorities.
6114         * cancel.c: Likewise.
6115         * condvar.c: Likewise.
6116         * internals.h: Likewise.
6117         * join.c: Likewise.
6118         * manager.c: Likewise.
6119         * mutex.c: Likewise.
6120         * pthread.c: Likewise.
6121         * ptlongjmp.c: Likewise.
6122         * queue.h: Likewise.
6123         * rwlock.c: Likewise.
6124         * semaphore.c: Likewise.
6125         * semaphore.h: Likewise.
6126         * signals.c: Likewise.
6127         * spinlock.c: Likewise.
6128         * spinlock.h: Likewise.
6129         * sysdeps/pthread/pthread.h: Likewise.
6130         Patches by Xavier Leroy.
6132         * sysdeps/i386/i686/pt-machine.h: New file.
6134 1998-06-25  Ulrich Drepper  <drepper@cygnus.com>
6136         * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
6137         [sg]et_stackaddr prototypes always available.
6139         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6140         _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
6142 1998-06-24  Ulrich Drepper  <drepper@cygnus.com>
6144         * manager.c (pthread_free): Undo patch from 980430.
6145         Reported by David Wragg <dpw@doc.ic.ac.uk>.
6147 1998-06-09 15:07  Ulrich Drepper  <drepper@cygnus.com>
6149         * manager.c: Define __pthread_manager_adjust_prio and use it to
6150         increase priority when needed.
6151         * internals.h: Add prototype for __pthread_manager_adjust_prio.
6152         * mutex.c: Optimize mutexes to wake up only one thread.
6153         * pthread.c: Move PID of manager for global variable in structure
6154         element.
6155         Patches by Xavier Leroy.
6157 1998-06-07 13:47  Ulrich Drepper  <drepper@cygnus.com>
6159         * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
6161 1998-06-03  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
6163         * attr.c: Correct typo.
6165 1998-05-01  Ulrich Drepper  <drepper@cygnus.com>
6167         * manager.c (pthread_free): Unmap guard before the stack.
6168         Patch by Matthias Urlichs.
6170 1998-04-30  Ulrich Drepper  <drepper@cygnus.com>
6172         * manager.c (pthread_free): Detect already free child.
6173         Patch by Xavier Leroy, reported by Matthias Urlichs.
6175 1998-04-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6177         * Makefile (linuxthreads-version): Renamed back from
6178         libpthread-version.
6180 1998-04-21  Ulrich Drepper  <drepper@cygnus.com>
6182         * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
6183         __libc_longjmp.
6185 1998-04-20 14:55  Ulrich Drepper  <drepper@cygnus.com>
6187         * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
6188         * internals.h: Add definitions for new spinlock implementation.
6189         * ptlongjmp.c: New file.
6190         * spinlock.c: New file.
6191         * spinlock.h (acquire): Don't reschedule using __sched_yield, use
6192         new function __pthread_acquire to prevent deadlocks with thread
6193         with different priorities.
6194         Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
6196 1998-03-16  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6198         * manager.c (__pthread_manager): Reduce first argument to select
6199         to include just the needed file descriptor.
6201 1998-03-17 00:06  Ulrich Drepper  <drepper@cygnus.com>
6203         * manager.c: Fix last patch which caused core dumps.
6205         * pthread.c: Correctly handle missing SIGRTMIN.
6207 1998-03-15  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6209         * libpthread.map: Add __libc_internal_tsd_get and
6210         __libc_internal_tsd_set.  Add missing cancelable functions. Export
6211         libc internal versions of the cancelable functions.
6213 1998-03-13 16:51  Ulrich Drepper  <drepper@cygnus.com>
6215         * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
6217 1998-03-13 00:46  Ulrich Drepper  <drepper@cygnus.com>
6219         * attr.c: Implement pthread_attr_[gs]etguardsize,
6220         pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
6221         Change pthread_attr_init to have two interfaces.
6222         * internals.h (struct _pthread_descr_struct): Add new fields for
6223         above functions.
6224         * libpthread.map: Add names in GLIBC_2.1 section.
6225         * manager.c (pthread_handle_create): Implement guardsize and
6226         user stack.
6227         (pthread_free): Likewise.
6228         * pthread.c (pthread_create): Add new interface for changed
6229         pthread_attr_t.
6230         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
6231         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
6232         PTHREAD_STACK_MIN.
6234 1998-03-11 00:42  Wolfram Gloger  <wmglo@dent.med.uni-muenchen.de>
6236         * manager.c: Enable resetting of the thread scheduling policy
6237         to SCHED_OTHER when the parent thread has a different one.
6239 1998-02-01 13:51  Ulrich Drepper  <drepper@cygnus.com>
6241         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6242         _POSIX_ASYNCHRONOUS_IO.
6244         * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
6245         mutexes.
6246         * mutex.c: Implement new mutex types.
6248         * internals.h: Include <signal.h>.
6250         * libpthread.map: Add __erno_location and __h_errno_location.
6252         * errno.c: Return pointer to variable actually in use.  This might
6253         not be the one in the thread structure.
6254         * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
6255         and p_h_errnop.
6256         * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
6257         of manager thread structure.
6258         (pthread_handle_create): Set p_errnop and p_h_errnop members for new
6259         thread.
6260         * pthread.c: Adapt initializer for thread structures.
6261         (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
6262         (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
6263         current thread to global variables.
6265 1998-01-31 17:27  Ulrich Drepper  <drepper@cygnus.com>
6267         * rwlock.c: New file.
6268         * Makefile (libpthread-routines): Add rwlock.
6269         * sysdeps/pthread/pthread.h: Define data structures and declare
6270         functions.
6271         * libpthread.map: Add new functions.
6273 1997-12-18 13:50  Philip Blundell  <pb@nexus.co.uk>
6275         * sysdeps/arm/pt-machine.h: New file; add ARM support.
6276         * sysdeps/arm/Implies: likewise.
6277         * README: Document it.
6279 1997-12-13  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6281         * signals.c: Remove unneeded initializer for sigwaited, saving a
6282         warning.
6284 1997-04-11 01:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6286         * semaphore.c (sem_init): Set sem_spinlock only if available.
6288 1997-12-04 01:48  Ulrich Drepper  <drepper@cygnus.com>
6290         * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
6291         * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
6293         * Makefile: Update from LinuxThreads 0.7.
6294         * internals.h. Likewise.
6295         * manager.c: Likewise.
6296         * mutex.c: Likewise.
6297         * pthread.c: Likewise.
6298         * signals.c: Likewise.
6299         * specific.c: Likewise.
6300         * Examples/ex3.c: Likewise.
6302 1997-11-20 18:13  Ulrich Drepper  <drepper@cygnus.com>
6304         * pthread.c (__pthread_reset_main_thread): Close pipe only if still
6305         open.
6307 1997-10-29 05:38  Ulrich Drepper  <drepper@cygnus.com>
6309         * wrapsyscall.c: Add socket functions which are also cancelation
6310         points.
6312 1997-10-19 21:40  Wolfram Gloger  <wg@wolfram.dent.med.uni-muenchen.de>
6314         * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
6315         New functions for fast thread specific data within libc.
6317         * internals.h: Add new array p_libc_specific to struct
6318         _pthread_descr_struct.
6320         * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
6322 1997-10-13 05:39  Ulrich Drepper  <drepper@cygnus.com>
6324         * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
6325         Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
6327 1997-08-29 03:05  Ulrich Drepper  <drepper@cygnus.com>
6329         * internals.h (struct _pthread_descr_struct): Add definitions for
6330         two-level specific key handling.
6331         * manager.c (pthread_handle_create): Initialize specific memory array.
6332         * specific.c: Implement two-level key handling.
6333         * weaks.c: Don't provide dummy key handling.
6334         * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
6335         Add definition of __libc_key_t.
6336         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
6337         as 1024.
6338         Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
6339         PTHREAD_DESTRUCTOR_ITERATIONS.
6341         * manager.c (pthread_handle_create): Compare mmap result with
6342         MAP_FAILED.
6344         * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
6345         * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
6347 1997-08-22 19:04  Richard Henderson  <rth@cygnus.com>
6349         sysdeps/sparc -> sysdeps/sparc/sparc32
6350         sysdeps/sparc64 -> sysdeps/sparc/sparc64
6352         * internals.h: Change definition of THREAD_SELF to be an expression,
6353         not a statement that did a return.
6354         * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
6355         * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
6356         Follow Solaris and use a "system reserved" register (%g6) to hold
6357         the thread descriptor.
6358         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
6360 1997-08-03 00:09  Ulrich Drepper  <drepper@cygnus.com>
6362         * mutex.c: Correct pthread_once.  Patch by Xavier Leroy.
6363         * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
6364         * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
6366         * semaphore.c: Include spinlock.h only when needed.
6368         * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
6369         keys for entries not in use.
6371         * weaks.c: Implement key handling functions for real.
6373 1997-06-29  01:04  Richard Henderson  <richard@gnu.ai.mit.edu>
6375         Initial sparc64-linux support:
6376         * sysdeps/sparc64/Implies: New file.
6377         * sysdeps/sparc64/pt-machine.h: Likewise.
6379 1997-06-29 00:48  Ulrich Drepper  <drepper@cygnus.com>
6381         * semaphore.c: Include spinlock.h at correct place.
6382         Patch by HJ Lu.
6384 1997-06-13 10:06  Richard Henderson  <rth@tamu.edu>
6386         The Great Bit File Move:
6387         * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
6388         * sysdeps/powerpc/semaphorebits.h: Likewise.
6389         * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
6390         * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
6391         * sysdeps/pthread/libc-lock.h: -> bits/
6392         * sysdeps/pthread/stdio-lock.h: Likewise.
6393         * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
6394         * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
6395         * semaphore.h: Likewise.
6396         * sysdeps/pthread/pthread.h: Likewise.
6398         * lockfile.c: <foo.h> -> <bits/foo.h>.
6399         * semaphore.h: Likewise.
6401         * Makefile: (headers): foo.h -> bits/foo.h.
6402         * sysdeps/pthread/Makefile: Likewise.
6404 1997-04-11 01:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6406         * semaphore.c (sem_init): Set sem_spinlock only if available.
6408         * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
6409         asm constraints.
6411 1997-04-09 03:00  Ulrich Drepper  <drepper@cygnus.com>
6413         Update from LinuxThreads 0.6.
6415         * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
6416         and __sched_get_priority_min instead of names without `__'.
6418         * manager.c: Rewrite large parts to implement opaque pthread_t.
6420         * cancel.c: Adapt for opaque pthread_t type.
6421         * condvar.c: Likewise.
6422         * errno.c: Likewise.
6423         * join.c: Likewise.
6424         * mutex.c: Likewise.
6425         * pthread.c: Likewise.
6426         * signals.c: Likewise.
6427         * specific.c: Likewise.
6428         * restart.h: Likewise.
6429         * queue.h: Likewise.
6430         * Examples/ex3.c: Likewise.
6431         * Examples/ex4.c: Likewise.
6432         * sysdeps/pthread/pthread.h: Likewise.
6434         * pthread.c: Accumulate time for all threads in thread manager.
6436         * semaphore.c: Implement fallback implementation for architectures
6437         sometimes missing compare-exchange operations.
6439         * cancel.c (pthread_cancel): Validate handle argument.
6440         * join.c (pthread_join): Likewise.
6441         (pthread_detach): Likewise.
6442         * signals.c (pthread_kill): Likewise.
6444         * spinlock.h (acquire): Use __sched_yield not sched_yield.
6446         * queue.h (enqueue): Enqueue thread according to priority.
6448         * internals.c (struct pthread_start_args): New struct for passing
6449         args to cloning function.
6450         (struct _pthread): Rename to _pthread_descr_struct and adapt for
6451         opaque pthread_t.
6453         * Examples/Makefile (clean): Pass -f option to rm.
6455         * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
6456         and define TEST_FOR_COMPARE_AND_SWAP.
6457         * sysdeps/i386/i486/pt-machine.h: Removed.
6459         * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
6460         to 1024.
6462 1997-04-04 16:38  Ulrich Drepper  <drepper@cygnus.com>
6464         * restart.h (suspend): Clear p_signal before suspending.
6465         (suspend_with_cancellation): Likewise.
6466         Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
6468         * weaks.c: Make __pthread_key_create return 1.
6469         * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
6470         __libc_getspecific, __libc_setspecific, and __libc_key_t.
6471         * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
6472         using libio.
6474 1997-03-19 15:13  Miguel de Icaza  <miguel@nuclecu.unam.mx>
6476         * sysdeps/sparc/pt-machine (RELEASE): Fix.
6478 1997-03-01 07:55  Geoff Keating  <geoffk@ozemail.com.au>
6480         * sysdeps/powerpc/Implies: Added.
6481         * sysdeps/powerpc/pt-machine.h: Added.
6482         * sysdeps/powerpc/semaphorebits.h: Added.
6484 1997-01-22 01:22  Ulrich Drepper  <drepper@cygnus.com>
6486         * pthread.c (__pthread_initial_thread): Correct
6487         initializer.
6488         (__pthread_manager_thread): Likewise.
6489         Reported by Andreas Jaeger.
6491 1997-01-18 22:15  Richard Henderson  <rth@tamu.edu>
6493         Since sigset_t no longer fits in a register, we can't pass in the
6494         thread's initial mask so easily.  Take this opportunity to simplify
6495         the clone implementation by only accepting a single void* argument.
6497         * manager.c (__pthread_manager): Put thread vitals in the thread
6498         struct instead of as arguments through clone.
6499         (pthread_start_thread): Look for them there.
6500         * internals.h (struct _pthread): Add p_initial_fn,
6501         p_initial_fn_arg, p_initial_mask.  Fix __pthread_manager proto.
6502         * pthread.c (pthread_initialize_manager): Revise clone invocation.