Temporarily remove setaltroot and key*
[glibc/history.git] / linuxthreads / ChangeLog
blobe15dc08a10222105bcc9443dc3388ac71c245964
1 2004-10-18  Roland McGrath  <roland@redhat.com>
3         [BZ #406]
4         * Makefile (linuxthreads-CPPFLAGS): New variable;
5         adds -DIS_IN_linuxthreads=1.
6         * sysdeps/i386/tls.h: Protect "useldt.h" with
7         [!IS_IN_linuxthreads && !DO_MODIFY_LDT].
8         * sysdeps/i386/i686/pt-machine.h: Revert last change.
10 2004-10-14  Jakub Jelinek  <jakub@redhat.com>
12         * sysdeps/pthread/errno-loc.c: Don't undef #errno
13         if RTLD_PRIVATE_ERRNO.
15 2004-10-05  Dwayne Grant McConnell  <dgm69@us.ibm.com>
17         * pthread.c: Mask restart signal during cancel signal handler.
19 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
21         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
22         _POSIX_THREAD_CPUTIME): Define to 0.
24 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
26         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Set _POSIX_CPUTIME
27         and _POSIX_THREAD_CPUTIME to zero.
28         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
30         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
31         _POSIX_THREAD_PROCESS_SHARED and _POSIX_CLOCK_SELECTION as -1.
32         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
33         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
34         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
36 2004-09-25  Roland McGrath  <roland@redhat.com>
38         [BZ #406]
39         * sysdeps/i386/i686/pt-machine.h: Don't #include "../useldt.h" if
40         [_TLS_H], since sysdeps/i386/tls.h includes it after including us.
42 2004-09-24  Roland McGrath  <roland@redhat.com>
44         [BZ #406]
45         * sysdeps/i386/tls.h: Move #include "useldt.h" outside
46         of [__ASSUME_LDT_WORKS > 0] test.
47         Reported by Carlos Velasco <carlos.velasco@newipnet.com>.
49 2004-09-21  Roland McGrath  <roland@redhat.com>
51         * Versions: Add comment about linuxthreads' frozen ABI.
53 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
55         * Versions: Remove exports for pthread_set*id_np functions.
56         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
57         for now.
58         * Makefile: Don't build pthread_set*id code for now.
60 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
62         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
63         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
64         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
65         and pthread_setresuid_np.
66         * pthread_setgid_np.c: New file.
67         * pthread_setuid_np.c: New file.
68         * pthread_setegid_np.c: New file.
69         * pthread_seteuid_np.c: New file.
70         * pthread_setregid_np.c: New file.
71         * pthread_setreuid_np.c: New file.
72         * pthread_setresgid_np.c: New file.
73         * pthread_setresuid_np.c: New file.
74         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
75         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
76         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
77         and pthread_setresuid_np.
78         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
79         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
80         pthread_setregid, and pthread_setresgid.
82 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
84         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
85         for __USE_XOPEN2K.
86         * sysdeps/pthread/bits/pthreadtypes.h: Define rwlock types also
87         for __USE_XOPEN2K.  [BZ #320]
89 2004-09-04  Jakub Jelinek  <jakub@redhat.com>
91         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
93 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
95         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
96         the initialization function might throw.
98 2004-08-30  Roland McGrath  <roland@frob.com>
100         * Makefile (libpthread-abi-frozen): New variable.
102 2004-08-26  Roland McGrath  <roland@redhat.com>
104         * configure.in: New file.  If nptl add-on is also selected, barf if
105         explicit and elide ourselves if implicit.
106         * configure: Now generated.
108 2004-08-25  Richard Sandiford  <rsandifo@redhat.com>
110         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h (CENABLE, CDISABLE,
111         __local_multiple_threads): Fix definitions for IS_IN_librt.
112         * sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h: Likewise.
114 2004-08-22  Andreas Schwab  <schwab@suse.de>
116         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO) [IS_IN_librt]:
117         Save gp around CENABLE/CDISABLE calls.
119 2004-08-15  Roland McGrath  <roland@frob.com>
121         * pthread_atfork.c: Update copyright terms including special exception
122         for these trivial files, which are statically linked into executables
123         that use dynamic linking for the significant library code.
125 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
127         * libc-tsd.c: Move resolv.h include before the #if.
128         (__res_maybe_init): New function.  Add libc_hidden_def.
130 2004-08-02  Ulrich Drepper  <drepper@redhat.com>
132         * linuxthreads.texi (Cleanup Handlers): Fix typo.
133         Reported by Bjoern Engelmann <bjengelmann@gmx.de>.
135 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
137         [BZ #284]
138         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
139         instead of clockid_t.
141 2004-07-21  Roland McGrath  <roland@redhat.com>
143         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
145 2004-07-02  Roland McGrath  <roland@redhat.com>
147         * configure: Don't exit.
149 2004-07-20  Alexandre Oliva  <aoliva@redhat.com>
151         * sysdeps/mips/pt-machine.h: Use standard names for ABI macros,
152         include sgidefs.h.
153         * sysdeps/mips/atomicity.h: Likewise.
155 2004-07-19  Alexandre Oliva  <aoliva@redhat.com>
157         * sysdeps/unix/sysv/linux/mips/Makefile (CFLAGS-pt-initfini.s):
158         Remove redundant override that missed -g0.
160 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
162         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
163         (__local_multiple_threads): Define for librt.
164         (SINGLE_THREAD_P): Likewise.
166 2004-07-07  Jakub Jelinek  <jakub@redhat.com>
168         * sysdeps/pthread/getcpuclockid.c (pthread_getcpuclockid): Allow
169         using other thread's clock.
170         * ptclock_gettime.c (__pthread_clock_gettime): Likewise.
171         * ptclock_settime.c (__pthread_clock_settime): Likewise.
172         * internals.h (__pthread_clock_gettime, __pthread_clock_settime):
173         Remove prototypes.
174         Reported by Bernd Schmidt <bernds@redhat.com>.
175         * Makefile (librt-tests): Add tst-clock1.
176         * tst-clock1.c: New test.
178         * sysdeps/x86_64/Versions: New file.
179         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
180         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
182 2004-04-16  Andreas Schwab  <schwab@suse.de>
184         * sysdeps/ia64/tls.h (INIT_SYSINFO): Cast dl_sysinfo to void*.
186 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
188         * sysdeps/s390/pspinlock.c (__pthread_spin_lock,
189         __pthread_spin_trylock): Use constraint "m" instead of "0" for
190         futex.
191         * sysdeps/ia64/pt-machine.h (__compare_and_swap,
192         __compare_and_swap_with_release_semantic, testandset): Use
193         constraint "m" instead of "0" for futex.
195 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
197         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Fix
198         branch offset for a PLT entry.
199         (CDISABLE): Likewise.
201 2004-05-31  Andreas Jaeger  <aj@suse.de>
203         * sysdeps/unix/sysv/linux/mips/Makefile (CFLAGS-pt-initfini.s):
204         Set to -fno-unit-at-a-time.
205         Patch by Dan Kegel <dank@kegel.com>.
207 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
209         * tst-stack1.c: Don't include mcheck.h.
210         (do_test): Make sure user defined stacks aren't reused,
211         don't free them at the end.  [BZ #110]
213 2004-05-02  Jakub Jelinek  <jakub@redhat.com>
215         * manager.c: Include not-cancel.h.
216         (__pthread_manager): Use read_not_cancel instead of __libc_read.
217         (pthread_start_thread, __pthread_manager_sighandler): Use
218         write_not_cancel instead of __libc_write.
219         (pthread_reap_children): Use waitpid_not_cancel instead of
220         __libc_waitpid.
221         * pthread.c: Include not-cancel.h.
222         (__pthread_initialize_minimal, __pthread_create_2_1,
223         pthread_onexit_process, __pthread_message): Use
224         write_not_cancel instead of __libc_write.
225         (__pthread_initialize_manager): Likewise.  Use close_not_cancel
226         instead of __libc_close.
227         (__pthread_reset_main_thread): Use close_not_cancel instead of
228         __libc_close.
229         * join.c: Include not-cancel.h.
230         (__pthread_do_exit, pthread_join, pthread_detach): Use
231         write_not_cancel instead of __libc_write.
232         * semaphore.c: Include not-cancel.h.
233         (__new_sem_post): Use write_not_cancel instead of __libc_write.
234         * specific.c: Include not-cancel.h.
235         (pthread_key_delete): Use write_not_cancel instead of __libc_write.
237 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
239         * Versions (libc): Add __on_exit and __libc_sigaction.
241 2004-04-28  Jakub Jelinek  <jakub@redhat.com>
243         * semaphore.c (sem_timedwait): Return -1 and set errno instead of
244         returning error number [BZ #133].  Patch by <rmhaddad@yahoo.com>.
246 2004-04-22  SUGIOKA Toshinobu  <sugioka@itonet.co.jp>
248         * sysdeps/unix/sysv/linux/sh/vfork.S: Fix wrong function pointer
249         reference in PIC case.
251 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
253         * oldsemaphore.c (SEM_VALUE_MAX): Remove.
255 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
257         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Define
258         for librt.  Save the return value to a safe register.
259         (CDISABLE): Define for librt.  Set the function argument correctly.
261 2004-04-18  Jakub Jelinek  <jakub@redhat.com>
263         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
264         (PSEUDO_CANCEL): Define.
265         (PSEUDO): Use it.
266         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
267         CDISABLE): For librt, append @PLT.
269 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
271         * sysdeps/x86_64/tls.h [!__ASSEMBLER__]: Include tcb-offsets.h.
273         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
274         return it_value { 0, 0 }.
275         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
276         like SIGEV_SIGNAL.
277         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
278         assertion for SIGEV_NONE.
279         (thread_attr_compare): Compare all attributes, not just a partial
280         subset.
282         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
284 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
286         * semaphore.h (SEM_VALUE_MAX): Just use a plain number.
288 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
290         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix last patch.
292 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
294         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
296 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
298         * sysdeps/unix/sysv/linux/mq_notify.c: New file.
300         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE): Define
301         for librt.
302         (CDISABLE): Likewise.
304 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
306         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
307         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
308         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
309         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
310         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
311         Define.
312         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
313         (_POSIX_MESSAGE_PASSING): Define.
315 2004-04-10  Andreas Jaeger  <aj@suse.de>
317         * sysdeps/x86_64/pt-machine.h: Add used attribute to stack_pointer
318         to avoid warnings with GCC 3.5.
320 2004-04-09  Steven Munroe  <sjmunroe@us.ibm.com>
322         * sysdeps/powerpc/tls.h (TLS_INIT_TP): Eliminate lvalue cast from
323         __thread_self assignment.
324         (THREAD_DTV): Replace __thread_register with __thread_self.
325         (INIT_THREAD_SELF): Eliminate lvalue cast from __thread_self
326         assignment.
328 2004-04-08  Alexandre Oliva  <aoliva@redhat.com>
330         * signals.c (pthread_sigmask): Don't ever block or mask
331         __pthread_sig_debug.
333 2004-03-11  Steven Munroe  <sjmunroe@us.ibm.com>
335         * sysdeps/powerpc/tls.h: Remove __powerpc64__ conditional.
337 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
339         * sysdeps/ia64/pt-machine.h (BUSY_WAIT_NOP): Define.
340         * sysdeps/x86_64/pt-machine.h (BUSY_WAIT_NOP): Likewise.
342 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
344         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add HOST_NAME_MAX.
345         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
346         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
347         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
349 2004-03-08  Andreas Jaeger  <aj@suse.de>
351         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT_KERNEL_CHECK):
352         dl_osversion is readonly.
354 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
356         * sysdeps/i386/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
357         _rtlf_global_ro.
358         * sysdeps/ia64/tls.h (INIT_SYSINFO): Likewise.
360 2004-02-20  Steven Munroe  <sjmunroe@us.ibm.com>
362         * sysdeps/unix/sysv/linux/powerpc/ptlongjmp.c [SHARED]: Code only
363         valid for SHARED case.  Correct spelling of __vmx_longjmp.
365         * sysdeps/powerpc/pspinlock.c: Move from here.
366         * sysdeps/powerpc/powerpc32/pspinlock.c: To here.
367         * sysdeps/powerpc/powerpc64/pspinlock.c: New file.
368         * sysdeps/powerpc/powerpc64/pt-machine.h: Define __compare_and_swap32
369         and __compare_and_swap32_with_release_semantics.
371 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
373         * Makefile (generated): Remove tst-stack1.mtrace and tst-stack1-mem.
374         (tests): Remove $(objpfx)tst-stack1-mem.
375         (tst-stack1-ENV): Remove.
376         ($(objpfx)tst-stack1-mem): Remove.
378         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
379         (__syscall_error_handler2): Call CDISABLE.
380         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
381         (__syscall_error_handler2): Call CDISABLE.
383         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
385 2004-02-10  Steven Munroe  <sjmunroe@us.ibm.com>
387         * Makefile (libpthread-routines): Add ptcleanup.
388         * ptlongjmp.c: Removed.
389         * ptcleanup.c: Copied __pthread_cleanup_upto to here. New file.
390         * sysdeps/pthread/ptlongjmp.c: Copied longjmp to here. New file.
391         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
392         Version longjmp, siglongjmp for GLIBC_2.3.4.
393         * sysdeps/unix/sysv/linux/powerpc/ptlongjmp.c: New File.
395 2004-01-22  Andreas Jaeger  <aj@suse.de>
397         * spinlock.c (__pthread_lock): Fix contraint to avoid warning.
398         (__pthread_release): Likewise.
400 2004-01-16  Richard Henderson  <rth@redhat.com>
402         * attr.c: Include ldsodefs.h.
403         (pthread_getattr_np): Don't declare __libc_stack_end.
405 2004-01-09  Steven Munroe  <sjmunroe@us.ibm.com>
407         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
408         [!HAVE_TLS_SUPPORT]: Define SINGLE_THREAD_P using static
409         __lib*_multiple_threads.
410         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
411         [!HAVE_TLS_SUPPORT]: Likewise.
413 2004-01-13  Roland McGrath  <roland@redhat.com>
415         * sysdeps/powerpc/tcb-offsets.sym: Put -- separator line before any
416         conditionals.
418 2004-01-10  Andreas Jaeger  <aj@suse.de>
420         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Add cfi directives.
422 2004-01-01  Andreas Jaeger  <aj@suse.de>
424         * Makefile (generated): Add missing files.
426 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
428         * attr.c (pthread_getattr_np): Make sure stack info returned for
429         main thread does not overlap with any other VMA.
430         Patch by Jakub Jelinek.
432 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
434         * sysdeps/ia64/tls.h: Include dl-sysdep.h.
435         (INIT_SYSINFO): Define.
436         (TLS_INIT_TP): Use it.
438 2003-12-28  Carlos O'Donell  <carlos@baldric.uwo.ca>
440         * attr.c (pthread_getattr_np): Add _STACK_GROWS_UP case.
442 2003-12-26  Jakub Jelinek  <jakub@redhat.com>
444         * sysdeps/pthread/pthread.h (pthread_setcancelstate,
445         pthread_setcanceltype, pthread_cancel, pthread_testcancel): Remove
446         __THROW.
447         * semaphore.h (sem_wait, sem_timedwait): Likewise.
449 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
451         * manager.c (pthread_free): Call _dl_deallocate_tls even for
452         p_userstack threads.
453         * pthread.c (__pthread_initialize_manager): Call _dl_deallocate_tls
454         on error.
455         (pthread_onexit_process): Update comment.
456         * Makefile (tests): Add tst-stack1.  Depend on $(objpfx)tst-stack1-mem.
457         (generated): Add tst-stack1.mtrace and tst-stack1-mem.
458         (tst-stack1-ENV): Set.
459         ($(objpfx)tst-stack1-mem): New.
460         * tst-stack1.c: New test.
462 2003-12-16  Steven Munroe  <sjmunroe@us.ibm.com>
464         * sysdeps/powerpc/tcb-offsets.sym [!__powerpc64__]: Remove
465         conditional so MULTIPLE_THREADS_OFFSET is generated for both.
466         * sysdeps/powerpc/tls.h [!__powerpc64__]: Remove conditional
467         so TLS_MULTIPLE_THREADS_IN_TCB is generated for both.
468         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h:
469         Include tls.h.
471 2003-12-04  Steven Munroe  <sjmunroe@us.ibm.com>
473         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
474         (SINGLE_THREAD_P): Test using thread local p_multiple_threads field.
476 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
478         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Update copyright
479         message.  Add include of <stddef.h>.
480         (INIT_NEW_WAY): New macro.
481         (INIT_OLD_WAY): Likewise.
482         (_init): Add unwind directives.  Invoke
483         __pthread_initialize_minimal() via INIT_NEW_WAY or INIT_OLD_WAY,
484         respectively.
485         (_init_EPILOG_BEGINS): Add unwind-directives.  Drop unused .regstk
486         directive.
487         (_fini): Add unwind directives.  Drop unnecessary .align 16
488         directive (bundles are always 16-byte aligned).
489         (_fini_EPILOG_BEGINS): Add unwind-directives.
491 2003-11-19  David Mosberger  <davidm@hpl.hp.com>
493         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
495 2003-12-10  Andreas Jaeger  <aj@suse.de>
496             Ruediger Oertel  <ro@suse.de>
498         * sysdeps/alpha/elf/pt-initfini.c (__asm__): Remove extra .prologue.
500 2003-11-30  Andreas Jaeger  <aj@suse.de>
502         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
503         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
504         Likewise.
506 2003-11-04  Jakub Jelinek  <jakub@redhat.com>
508         * signals.c (__pthread_sigaction): Set __sighandler[sig].old before
509         __libc_sigaction if it has been one of the special values before.
511 2003-10-06  Carlos O'Donell <carlos@baldric.uwo.ca>
513         * pthread.c (__pthread_self_stack): _STACK_GROWS_UP case added.
514         (__pthread_find_self): Likewise.
515         * manager.c (thread_segment): _STACK_GROWS_UP case added.
517 2003-10-10  Carlos O'Donell  <carlos@baldric.uwo.ca>
519         * linuxthreads/sysdeps/unix/sysv/linux/hppa/malloc-machine.h: New file.
521 2003-10-10  Carlos O'Donell  <carlos@baldric.uwo.ca>
523         * sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h: New file.
525 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
527         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
528         changes.
529         (SAVE_OLDTYPE_0): Fix a typo.
531 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
533         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
534         correct offset.
536 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
538         * Makefile (tests): Add tst-cancel8.
539         * tst-cancel8.c: New test.
541 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
543         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
544         restoring of the old cancellation type.
546 2003-09-10  Chris Demetriou  <cgd@broadcom.com>
548         * sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h: New file.
550 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
552         * sysdeps/pthread/malloc-machine.h [!__libc_maybe_call2] (mutex_init,
553         mutex_lock, mutex_trylock, mutex_unlock): Remove.
555 2003-09-27  Wolfram Gloger  <wg@malloc.de>
557         * sysdeps/pthread/malloc-machine.h: New file.
559 2003-09-18  H.J. Lu  <hongjiu.lu@intel.com>
561         * attr.c (__pthread_attr_init_2_1): Double __guardsize size
562         if NEED_SEPARATE_REGISTER_STACK is defined.
564 2003-09-22  Philip Blundell  <philb@gnu.org>
566         * forward.c: Add _pthread_cleanup_push, _pthread_cleanup_pop.
567         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
568         Likewise.
569         * pthread.c (__pthread_elements): Initialise these new elements.
570         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Use
571         __libc_maybe_call.
572         (__libc_cleanup_pop): Likewise.
574 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
576         * attr.c: Include stdlib.h.
578 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
580         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
582         * tst-attr1.c: New test.
583         * Makefile (tests): Add tst-attr1.
585 2003-09-17  Philip Blundell  <philb@gnu.org>
587         * sysdeps/unix/sysv/linux/arm/vfork.S: Branch to fork if
588         libpthread is loaded.  Elide backwards compatibility code when not
589         required.
591 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
593         * descr.h (manager_thread): Rename to...
594         (__pthread_manager_threadp): ... this.
595         * pthread.c (manager_thread): Define to __pthread_manager_threadp.
596         (__pthread_manager_threadp): New variable.
597         * internals.h (__manager_thread): Define to
598         __pthread_manager_threadp if USE_TLS.
600 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
602         * sysdeps/i386/Makefile (CFLAGS-cancel.c, CFLAGS-manager.c,
603         CFLAGS-pthread.c, CFLAGS-sighandler.c): Add
604         -mpreferred-stack-boundary=4.
606 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
608         * attr.c (pthread_getattr_np): Correctly fill in the stack-related
609         values for the initial thread.
611 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
613         * pthread.c (manager_thread): Remove static, add attribute_hidden.
614         (thread_self_stack): Rename to...
615         (__pthread_self_stack): ... this.  Remove static.
616         (pthread_handle_sigcancel): Use check_thread_self ().
617         (pthread_handle_sigrestart): Likewise.
618         * sighandler.c (__pthread_sighandler, __pthread_sighandler_rt):
619         Likewise.
620         * descr.h (manager_thread): Declare.
621         * internals.h (__pthread_self_stack): New prototype.
622         (__manager_thread): Define.
623         (check_thread_self): New function.
625 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
627         * Makefile (CFLAGS-mutex.c): Add $(uses-callbacks).
628         (CFLAGS-sighandler.c): Change $(exceptions) into $(uses-callbacks).
630 2003-09-12  Jakub Jelinek  <jakub@redhat.com>
632         * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: New.
633         (__SSIZE_T_TYPE): Define to __SWORD_TYPE for gcc 2.95.x and
634         __SLONGWORD_TYPE otherwise.
636 2003-09-11  Steven Munroe  <sjmunroe@us.ibm.com>
638         * sysdeps/powerpc/powerpc64/pt-machine.h [MEMORY_BARRIER]: Use lwsync.
639         [READ_MEMORY_BARRIER]: Define.
640         [WRITE_MEMORY_BARRIER]: Define.
642 2003-09-10  Jakub Jelinek  <jakub@redhat.com>
644         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Move
645         ptr___pthread_cond_timedwait to the end of the structure to avoid
646         breaking Wine unnecessarily.
648 2003-09-08  Jakub Jelinek  <jakub@redhat.com>
650         * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: Remove.
652 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
654         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
655         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
656         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
657         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
658         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
659         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
660         * attr.c (__old_pthread_attr_setstacksize,
661         __old_pthread_attr_setstack): New functions.
662         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
663         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
664         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
665         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
666         * tststack.c: Include limits.h and sys/param.h.
667         (main): Set size to MAX (70 * 1024, PTHREAD_STACK_MIN).
669         * barrier.c (__pthread_barrierattr_getpshared): Always
670         return PTHREAD_PROCESS_PRIVATE.
671         (pthread_barrierattr_setpshared): Return EINVAL if pshared
672         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
674 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
676         * sysdeps/sparc/tls.h (TLS_TCB_SIZE): If in ld.so and NPTL struct
677         pthread is bigger than struct _pthread_descr_struct, use NPTL struct
678         pthread size.
680 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
682         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
683         (DL_SYSINFO_IMPLEMENTATION): Add CFI and make sure the code ends
684         up in .text.
686         * barrier.c (pthread_barrierattr_setpshared): We don't handle
687         inter-process barriers.
689 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
691         * Makefile (tests): Add tst-tls1.
692         (module-names): Add tst-tls1mod{,a,b,c,d,e,f}.
693         ($(objpfx)tst-tls1mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
694         ($(objpfx)tst-tls1): New.
695         ($(objpfx)tst-tls2.out): Likewise.
696         (tests): Depend on $(objpfx)tst-tls2.out.
697         * tst-tls1.c: New test.
698         * tst-tls1.h: New.
699         * tst-tls1mod.c: New.
700         * tst-tls1moda.c: New.
701         * tst-tls1modb.c: New.
702         * tst-tls1modc.c: New.
703         * tst-tls1modd.c: New.
704         * tst-tls1mode.c: New.
705         * tst-tls1modf.c: New.
706         * tst-tls2.sh: New test.
708         * internals.h (__pthread_cond_timedwait): New prototype.
709         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
710         ptr___pthread_cond_timedwait.
711         * pthread.c (__pthread_functions): Initialize them.
712         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
713         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
714         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
715         pthread_cond_timedwait@@GLIBC_2.3.2.
717 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
719         * sysdeps/pthread/pthread.h: Don't mark pthread_exit,
720         pthread_join, pthread_cond_wait, and pthread_cond_timedwait with
721         __THROW to match NPTL.
723 2003-08-13  Ulrich Drepper  <drepper@redhat.com>
725         * sysdeps/pthread/Makefile [subdir=rt] (CPPFLAGS): Add
726         -DBROKEN_THREAD_SIGNALS.
728 2003-08-11  Steven Munroe  <sjmunroe@us.ibm.com>
730         * manager.c (pthread_start_thread) [!(USE_TLS && HAVE___THREAD)]:
731         Correct spelling of per thread resolver state.
733 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
735         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
736         (__rtld_lock_default_lock_recursive,
737         __rtld_lock_default_unlock_recursive): Define.
738         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
739         __rtld_lock_unlock_recursive): Define using
740         GL(_dl_rtld_*lock_recursive).
741         * pthread.c (pthread_initialize): Initialize _dl_rtld_lock_recursive
742         and _dl_rtld_unlock_recursive.  Lock GL(_dl_load_lock) the same
743         number of times as GL(_dl_load_lock) using non-mt implementation was
744         nested.
746 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
748         * sysdeps/pthread/bits/typesizes.h (__SSIZE_T_TYPE): Define.
749         * sysdeps/unix/sysv/linux/alpha/bits/typesizes.h (__SSIZE_T_TYPE):
750         Likewise.
751         * sysdeps/unix/sysv/linux/sparc/bits/typesizes.h (__SSIZE_T_TYPE):
752         Likewise.
753         * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: New file.
755         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
756         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
757         PTHREAD_STACK_MIN in comments.
759         * sysdeps/alpha/pt-machine.h (PT_EI): Add
760         __attribute__((always_inline)).
761         * sysdeps/arm/pt-machine.h (PT_EI): Likewise.
762         * sysdeps/cris/pt-machine.h (PT_EI): Likewise.
763         * sysdeps/hppa/pt-machine.h (PT_EI): Likewise.
764         * sysdeps/i386/i686/pt-machine.h (PT_EI): Likewise.
765         * sysdeps/i386/pt-machine.h (PT_EI): Likewise.
766         * sysdeps/ia64/pt-machine.h (PT_EI): Likewise.
767         * sysdeps/m68k/pt-machine.h (PT_EI): Likewise.
768         * sysdeps/mips/pt-machine.h (PT_EI): Likewise.
769         * sysdeps/powerpc/powerpc32/pt-machine.h (PT_EI): Likewise.
770         * sysdeps/powerpc/powerpc64/pt-machine.h (PT_EI): Likewise.
771         * sysdeps/s390/s390-32/pt-machine.h (PT_EI): Likewise.
772         * sysdeps/s390/s390-64/pt-machine.h (PT_EI): Likewise.
773         * sysdeps/sh/pt-machine.h (PT_EI): Likewise.
774         * sysdeps/sparc/sparc32/pt-machine.h (PT_EI): Likewise.
775         * sysdeps/sparc/sparc64/pt-machine.h (PT_EI): Likewise.
776         * sysdeps/x86_64/pt-machine.h (PT_EI): Likewise.
777         * spinlock.h (__pthread_set_own_extricate_if): Likewise.
778         * sysdeps/ia64/tls.h (TLS_INIT_TP): Cast tcbp to __typeof
779         (__thread_self).
780         * Examples/ex13.c (main): Change res type to void * to avoid
781         warnings.
782         * tst-cancel.c (cleanup, inner, tf1, tf2, tf3): Comment out.
784 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
786         * pthread.c (init_one_static_tls, __pthread_init_static_tls): New
787         functions.
788         (pthread_initialize): Initialize GL(dl_init_static_tls).
790 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
792         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
793         before __timer_dealloc.
794         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
795         Don't call list_unlink.
797 2003-07-29  Roland McGrath  <roland@redhat.com>
799         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
801 2003-07-25  Roland McGrath  <roland@redhat.com>
803         * manager.c (pthread_start_thread): Fix typo in last change.
805 2003-07-14  Guido Guenther  <agx@sigxcpu.org>
807         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: Add IS_IN_librt,
808         use L() for local labels.
810 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
812         * sysdeps/alpha/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Change to 0.
813         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Alignment of struct
814         _pthread_descr_struct.
815         (TLS_PRE_TCB_SIZE): Add sizeof (tcbhead_t) and pad to align.
816         If in ld.so and NPTL struct pthread is bigger than struct
817         _pthread_descr_struct, use NPTL struct pthread size.
818         (TLS_TCB_OFFSET): Define.
819         (INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_DTV,
820         THREAD_SELF, INIT_THREAD_SELF): Changed to match NPTL tls.h
821         definitions.
822         * sysdeps/i386/tls.h (TLS_TCB_SIZE): If in ld.so and NPTL struct
823         pthread is bigger than struct _pthread_descr_struct, use NPTL struct
824         pthread size.
825         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Likewise.
826         * sysdeps/powerpc/tls.h (TLS_PRE_TCB_SIZE): Likewise.
827         * sysdeps/s390/tls.h (TLS_TCB_SIZE): Likewise.
828         * sysdeps/sh/tls.h (TLS_PRE_TCB_SIZE): Likewise.
829         * sysdeps/x86_64/tls.h (TLS_TCB_SIZE): Likewise.
830         * sysdeps/pthread/Makefile (gen-as-const-headers): Add
831         nptl-struct-pthread.sym if nptl tree is present.
832         (before-compile): Add $(common-objpfx)nptl-struct-pthread.h
833         if nptl tree is not present.
834         (common-generated): Add nptl-struct-pthread.h.
835         ($(common-objpfx)nptl-struct-pthread.h): New rule.
836         * sysdeps/pthread/nptl-struct-pthread.sym: New file.
838 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
840         * descr.h (struct _pthread_descr_struct): Provide p_res member
841         even if USE_TLS && HAVE___THREAD.
842         * sysdeps/pthread/res-state.c (__res_state): Return __resp
843         if USE___THREAD.
844         * manager.c: Include resolv.h.
845         (pthread_start_thread): Initialize __resp.
846         * libc-tls-loc.c (__res_state): Return __resp.
847         * Makefile (tests): Add tst-_res1.
848         (modules-names, extra-objs, test-extras, test-modules): Add support
849         for test modules.
850         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
851         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
852         -lpthread.
853         * tst-_res1.c: New test.
854         * tst-_res1mod1.c: New test.
855         * tst-_res1mod2.c: New test.
857 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
859         * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_push and
860         __libc_cleanup_pop.
862         * tst-cancel-wrappers.sh: lseek and llseek are no cancellation points.
864 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
866         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Fix typo
867         in test for compilation in libc.
869 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
871         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
872         different symbol for the cancellation syscall wrapper and
873         non-cancellation syscall wrapper.
874         (PSEUDO_END): Define.
876 2003-07-05  Richard Henderson  <rth@redhat.com>
878         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
880 2003-06-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
882         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Support cancellation
883         in librt.
885 2003-06-21  Andreas Schwab  <schwab@suse.de>
887         * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Support cancellation
888         in librt.
890 2003-06-20  Richard Henderson  <rth@redhat.com>
892         * sysdeps/unix/sysv/linux/alpha/Makefile (libpthread-routines):
893         Remove ptw-osf_sigprocmask.
895 2003-06-18  Jakub Jelinek  <jakub@redhat.com>
897         * internals.h (__librt_multiple_threads, __librt_enable_asynccancel,
898         __librt_disable_asynccancel): Declare.
899         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET, LIBC_CANCEL_HANDLED): Define
900         for IS_IN_librt.
901         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Support cancellation
902         in librt.
903         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
904         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
905         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
906         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
907         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
908         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
909         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
910         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
911         * sysdeps/x86_64/tcb-offsets.sym: New file.
912         * sysdeps/x86_64/Makefile: New file.
913         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
914         * Versions (libc): Export __librt_enable_asynccancel,
915         __librt_disable_asynccancel and __librt_multiple_threads as
916         GLIBC_PRIVATE.
917         * libc-cancellation.c (__librt_multiple_threads,
918         __librt_enable_asynccancel, __librt_disable_asynccancel): New aliases.
920 2003-06-12  Steven Munroe  <sjmunroe@us.ibm.com>
922         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
923         (SINGLE_THREAD_P): Replace @ got notation with @toc.
925 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
927         * sysdeps/powerpc/pspinlock.c (__pthread_spin_init): Fix
928         initializer [PR libc/5052].
930 2003-06-09  Andreas Schwab  <schwab@suse.de>
932         * Makefile: Move inclusion of ../Rules down after extra-objs is
933         fully known.
935 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
937         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: New sequences for
938         5+ arg syscalls only needed for PIC.
939         Patch by Ralph Siemsen <ralphs@netwinder.org>.
941 2003-06-05  Richard Henderson  <rth@redhat.com>
943         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use
944         and require CFI assembler directives.
945         * sysdeps/unix/sysv/linux/alpha/vfork.S: Likewise.
947 2003-05-30  Andreas Jaeger  <aj@suse.de>
949         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h
950         (SAVESTK_0): Add CFI directives.
951         (SAVESTK_3): Likewise.
952         (SAVESTK_5): Likewise.
953         (RESTSTK_0): Likewise.
954         (RESTSTK_3): Likewise.
955         (RESTSTK_5): Likewise.
957 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
959         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Add \n to error
960         messages.
962 2003-05-04  Roland McGrath  <roland@redhat.com>
964         * Makefile ($(objpfx)../libc.so): New target.
966 2003-04-26  Ulrich Drepper  <drepper@redhat.com>
968         * pthread.c (__pthread_initialize_manager): Remove one last
969         p_multiple_threads call.
971 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
973         * pthread.c (__pthread_initialize_manager): Subtract
974         TLS_PRE_TCB_SIZE bytes from tcbp to get to descr.
975         * manager.c (pthread_handle_create): Subtract or add TLS_PRE_TCB_SIZE
976         instead of sizeof (pthread_descr).
977         (pthread_free): Add TLS_PRE_TCB_SIZE instead of sizeof (pthread_descr).
978         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define to 0.
979         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
980         pthread_descr.
981         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
982         to TLS_TCB_ALIGN.
983         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
984         tcbp.
985         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
986         unneccessarily.
987         (NO_TLS_OFFSET): Define.
989 2003-04-22  Roland McGrath  <roland@redhat.com>
991         * Makeconfig (shared-thread-library): Reverse link order to work
992         around linker bug.
994 2003-04-20  Ulrich Drepper  <drepper@redhat.com>
996         * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Make sure the
997         compiler knows we use the ldt_entry variable and that the syscall
998         modifies the memory.
1000         * internals.h: Split pthread_functions definition into...
1001         * sysdeps/pthread/pthread-functions.h: ...new file.
1003         * sysdeps/i386/useldt.h: Include <sysdep.h>.
1005 2003-04-13  Jakub Jelinek  <jakub@redhat.com>
1007         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Rename macros to
1008         match changes in NPTL sysdep-cancel.h.
1010 2003-04-11  Roland McGrath  <roland@redhat.com>
1012         * Makefile (multidir): Don't set the variable here with $(shell ...).
1013         ($(objpfx)multidir.mk): New target, generated makefile; include that.
1014         (generated): Append it.
1016 2003-04-10  Jakub Jelinek  <jakub@redhat.com>
1018         * Makefile (multidir, crti-objs, crtn-objs): New variables.
1019         (generated-dirs): Add pathname component of multidir.
1020         (omit-deps, extra-objs): Include $(multidir)/crt? as well.
1021         ($(objpfx)libpthread.so): Depend on $(multidir)/crt?.o as well.
1022         ($(objpfx)$(multidir), $(objpfx)$(multidir)/crti.o,
1023         $(objpfx)$(multidir)/crtn.o): New.
1024         * sysdeps/unix/sysv/linux/sparc/Makefile: Removed.
1025         * sysdeps/unix/sysv/linux/x86_64/Makefile (LDFLAGS-pthread.so,
1026         before-compile, generated): Don't generate and use specs.
1027         ($(objpfx)specs): Remove.
1029 2003-04-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1031         * sysdeps/s390/pspinlock.c (__pthread_spin_unlock): Fix asm contraints.
1033 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
1035         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h (PSEUDO): Add
1036         missing ; after ENTRY use [PR libc/4997].
1038 2003-04-03  Jakub Jelinek  <jakub@redhat.com>
1040         * pthread.c (pthread_initialize): Unblock __pthread_sig_cancel
1041         in case the parent blocked it.
1043 2003-04-02  Jakub Jelinek  <jakub@redhat.com>
1045         * Makefile (libpthread-routines): Add pthread_atfork.
1046         (libpthread-static-only-routines): Add pthread_atfork.
1048 2003-04-01  Jakub Jelinek  <jakub@redhat.com>
1050         * pthread.c (__pthread_wait_for_restart_signal): Use
1051         __pthread_sigsuspend instead of sigsuspend.
1052         * internals.h (__pthread_sigsuspend): New prototype.
1053         * Makefile (libpthread-routines): Add pt-sigsuspend.
1054         (tests): Add tst-cancel7.
1055         * sysdeps/unix/sysv/linux/pt-sigsuspend.c: New file.
1056         * sysdeps/unix/sysv/linux/alpha/pt-sigsuspend.S: New file.
1057         * sysdeps/unix/sysv/linux/ia64/pt-sigsuspend.c: New file.
1058         * sysdeps/unix/sysv/linux/s390/s390-64/pt-sigsuspend.c: New file.
1059         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-sigsuspend.c: New file.
1060         * sysdeps/unix/sysv/linux/x86_64/pt-sigsuspend.c: New file.
1061         * tst-cancel7.c: New test.
1063 2003-03-31  Alexandre Oliva  <aoliva@redhat.com>
1065         * alloca_cutoff.c: Include internals.h.
1066         * sysdeps/pthread/errno-loc.c: Include linuxthreads/internals.h.
1067         * sysdeps/pthread/herrno-loc.c: Likewise.
1068         * sysdeps/pthread/res-state.c: Likewise.
1070 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
1072         * sysdeps/pthread/bits/typesizes.h: New file.
1073         * sysdeps/unix/sysv/linux/alpha/bits/typesizes.h: New file.
1074         * sysdeps/unix/sysv/linux/sparc/bits/typesizes.h: New file.
1076 2003-03-24  Daniel Jacobowitz  <drow@mvista.com>
1078         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
1079         (DOARGS_5, DOARGS_6, DOARGS_7): Rewritten.
1081 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
1083         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
1085 2003-03-21  Daniel Jacobowitz  <drow@mvista.com>
1087         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
1088         (SINGLE_THREAD_P_PIC): Use "reg" instead of "lr".
1090 2003-03-21  Jakub Jelinek  <jakub@redhat.com>
1092         * sysdeps/i386/tls.h [__ASSUME_SET_THREAD_AREA_SYSCALL]
1093         (TLS_SETUP_GS_SEGMENT): Fix a typo.
1095 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
1097         * sysdeps/pthread/Makefile: Fix cut&paste error.
1099 2003-03-18  Roland McGrath  <roland@redhat.com>
1101         * Versions (libpthread: GLIBC_2.2): Remove
1102         pthread_barrierattr_getpshared, never really existed.
1103         (libpthread: GLIBC_2.0): Move __pthread_initialize to ...
1104         (libpthread: GLIBC_PRIVATE): ... here.
1106 2003-03-14  Jakub Jelinek  <jakub@redhat.com>
1108         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
1109         * sysdeps/unix/sysv/linux/sparc/Makefile ($(objpfx)specs): Use full
1110         path for crt[in].o.
1112 2003-03-14  Alexandre Oliva  <aoliva@redhat.com>
1114         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't .set
1115         mips2 on new abi.
1116         * sysdeps/mips/pt-machine.h (__compare_and_swap): Likewise.
1117         Handle 64-bit longs on n64.
1119 2003-03-07  Jakub Jelinek  <jakub@redhat.com>
1121         * sysdeps/ia64/pspinlock.c (__pthread_spin_lock,
1122         __pthread_spin_trylock): Rewritten.
1124 2003-03-06  Ulrich Drepper  <drepper@redhat.com>
1126         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
1127         recent kernels.
1129 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
1131         * sysdeps/pthread/timer_create.c (timer_create): Return correct
1132         error for CPU clocks.
1134         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1135         _POSIX_MONOTONIC_CLOCK.
1136         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1138 2003-03-01  Roland McGrath  <roland@redhat.com>
1140         * sysdeps/powerpc/powerpc64/pt-machine.h
1141         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
1142         New macros.
1143         * sysdeps/powerpc/tls.h: Don't define those here.
1145         * sysdeps/powerpc/tls.h [! USE_TLS && !__powerpc64__]: Define
1146         tcbhead_t with multiple_threads member.
1147         [USE_TLS] (tcbhead_t): Define minimal one-word version.
1148         [USE_TLS && !__powerpc64__] (TLS_MULTIPLE_THREADS_IN_TCB): Define.
1149         * sysdeps/powerpc/tcb-offsets.sym [USE_TLS]: Use tls.h macros to
1150         derive thread register offset of p_multiple_threads member.
1152         * descr.h (struct _pthread_descr_struct) [!USE_TLS || !TLS_DTV_AT_TP]:
1153         Conditionalize p_header member on this.
1154         [TLS_MULTIPLE_THREADS_IN_TCB]: Add p_multiple_threads alternatively.
1155         * sysdeps/ia64/tls.h [USE_TLS] (TLS_MULTIPLE_THREADS_IN_TCB): Define.
1156         * sysdeps/sh/tls.h: Likewise.
1157         * sysdeps/ia64/tcb-offsets.sym [USE_TLS]: Use p_multiple_threads.
1158         * sysdeps/sh/tcb-offsets.sym: Likewise.
1159         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
1160         (SINGLE_THREAD_P): Likewise.
1161         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1162         (SINGLE_THREAD_P): Likewise.
1163         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1164         (SINGLE_THREAD_P): Likewise.
1165         * pthread.c (__pthread_initialize_manager): Likewise.
1166         * manager.c (pthread_handle_create): Likewise.
1168         * sysdeps/powerpc/tls.h [HAVE_TLS_SUPPORT]: Define USE_TLS and all
1169         related macros.
1171 2003-01-31  Steven Munroe  <sjmunroe@us.ibm.com>
1173         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S [SHARED]:
1174         Conditionalize .toc section magic on this.
1176 2003-02-21  Roland McGrath  <roland@redhat.com>
1178         * cancel.c (__pthread_perform_cleanup): Call __libc_thread_freeres
1179         instead of __rpc_thread_destroy.
1181 2003-02-21  Jakub Jelinek  <jakub@redhat.com>
1183         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Call
1184         __fork instead of branching to it if BROKEN_SPARC_WDISP22.
1185         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
1186         Fix typo.
1187         * sysdeps/unix/sysv/linux/sparc/Makefile (specs): Add ./ prefix
1188         to crti.o and crtn.o.
1189         * sysdeps/unix/sysv/linux/x86_64/Makefile (specs): Likewise.
1191 2003-02-21  Roland McGrath  <roland@redhat.com>
1193         * Makefile (install-lib-ldscripts): New variable.
1195 2003-02-20  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
1197         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: Avoid short
1198         interprocedure branches.
1200 2003-02-19  Ulrich Drepper  <drepper@redhat.com>
1202         * specific.c (pthread_key_delete_helper): Don't use GETMEM, we
1203         need the target thread's lock.
1205 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
1207         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
1208         and LOGIN_NAME_MAX.
1210 2003-02-17  Kevin B. Hendricks  <kevin.hendricks@sympatico.ca>
1211             Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
1213         * sysdeps/powerpc/Makefile: Handle tcb-offsets.sym.
1214         * sysdeps/powerpc/tcb-offsets.sym: New file.
1215         * sysdeps/powerpc/tls.h: New file.
1216         * sysdeps/powerpc/powerpc32/pt-machine.h (FLOATING_STACKS): Define.
1217         (ARCH_STACK_MAX_SIZE): Define.
1218         (THREAD_SELF): Define.
1219         (INIT_THREAD_SELF): Define.
1220         (THREAD_GETMEM): Define.
1221         (THREAD_GETMEM_NC): Define.
1222         (THREAD_SETMEM): Define.
1223         (THREAD_SETMEM_NC): Define.
1224         (__thread_self): Declare.
1225         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Adjust
1226         for thread register.
1228 2003-02-14  Steven Munroe  <sjmunroe@us.ibm.com>
1230         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
1231         Check pthread_create existance, not __pthread_fork.
1233 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
1235         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
1237 2003-02-10  Jakub Jelinek  <jakub@redhat.com>
1239         * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Check
1240         pthread_create existance, not __pthread_fork.
1241         * sysdeps/unix/sysv/linux/i386/vfork.S (__vfork): Likewise.
1242         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Likewise.
1243         * sysdeps/unix/sysv/linux/m68k/vfork.S (__vfork): Likewise.
1244         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
1245         Likewise.
1246         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
1247         * sysdeps/unix/sysv/linux/x86_64/vfork.S (__vfork): Likewise.
1248         * sysdeps/unix/sysv/linux/sh/vfork.S (__vfork): Likewise.
1249         Add .weak pthread_create.
1250         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Fix a typo.
1251         Check pthread_create existance, not __pthread_fork.
1252         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
1253         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Branch to
1254         __fork whenever libpthread.so is loaded.
1256 2003-02-09  Andreas Jaeger  <aj@suse.de>
1258         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h:
1259         Rework: %r9 is destroyed by functions so don't use it as
1260         temporary, align stack correctly, fix parameter for CDISABLE.
1262 2003-02-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1264         * sysdeps/sh/Makefile: New file.
1265         * sysdeps/sh/tcb-offsets.sym: Likewise.
1266         * sysdeps/sh/tls.h: Don't include sysdep.h. Move include
1267         of linuxthreads/descr.h after the definition of THREAD_SELF.
1268         (tcbhead_t): Use IA64 type tcbhead_t for TLS case.
1269         (TLS_TCB_SIZE): Set size of tcbhead_t.
1270         (TLS_PRE_TCB_SIZE): Define.
1271         (INSTALL_NEW_DTV): Set dtv of tcbhead_t structure instead of
1272         a member of thread structure.
1273         (THREAD_DTV): Likewise.
1274         (TLS_INIT_TP_EXPENSIVE): Remove.
1275         (TLS_INIT_TP): Set gbr register only.
1276         (THREAD_SELF): New.
1277         (INIT_THREAD_SELF): Likewise.
1278         (NONTLS_INIT_TP): New.
1279         * sysdeps/unix/sysv/linux/sh/pt-initfini.c (__fpscr_values):
1280         Remove.
1281         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Add
1282         SYSCALL_INST_PAD macro after DO_CALL.
1283         (SINGLE_THREAD_P): Fix non-PIC and TLS case so to read the
1284         correct variable.
1285         * sysdeps/unix/sysv/linux/sh/vfork.S (__vfork): Branch to __fork
1286         whenever libpthread.so is loaded.
1288 2003-02-08  Andreas Schwab  <schwab@suse.de>
1290         * sysdeps/unix/sysv/linux/m68k/vfork.S: Branch to __fork whenever
1291         libpthread.so is loaded.
1293 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
1295         * sysdeps/unix/sysv/linux/i386/vfork.S: Make sure
1296         __ASSUME_VFORK_SYSCALL is not defined if the kernel headers have
1297         no __NR_vfork definition.
1299 2003-02-07  Jakub Jelinek  <jakub@redhat.com>
1301         * tst-popen2.c: New test.
1302         * Makefile (tests): Add tst-popen2.
1303         * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Branch to __fork
1304         whenever libpthread.so is loaded.
1305         * sysdeps/unix/sysv/linux/i386/vfork.S (__vfork): Likewise.
1306         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Likewise.
1307         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
1308         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
1309         Likewise.
1310         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
1311         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
1312         * sysdeps/unix/sysv/linux/x86_64/vfork.S (__vfork): Likewise.
1314 2003-02-05  Ulrich Drepper  <drepper@redhat.com>
1316         * sysdeps/pthread/bits/libc-lock.h (__libc_once): Set control
1317         variable for non-libpthread case to the same value the
1318         pthread_once function would use.
1320 2003-02-03  Jakub Jelinek  <jakub@redhat.com>
1322         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): If
1323         BROKEN_SPARC_WDISP22, handle SHARED the same way as non-SHARED.
1325 2003-02-04  Andreas Jaeger  <aj@suse.de>
1327         * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Do not use
1328         multi-line strings.
1330 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
1332         * sysdeps/s390/tls.h (TLS_INIT_TP): Return NULL, not 0.
1334 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
1336         * sysdeps/alpha/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1337         THREAD_SETMEM, THREAD_SETMEM_NC): Avoid warnings about unused self
1338         variable.
1339         * sysdeps/ia64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1340         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1341         * sysdeps/s390/s390-32/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1342         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1343         * sysdeps/s390/s390-64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1344         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1345         * sysdeps/sh/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1346         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1347         * sysdeps/sparc/sparc32/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1348         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1349         * sysdeps/sparc/sparc64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1350         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1352 2003-01-27  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1354         * sysdeps/s390/s390-32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
1355         Define TLS versions.
1356         * sysdeps/s390/s390-64/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
1357         Likewise.
1358         * sysdeps/s390/tls.h [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE,
1359         TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE, TLS_TCB_ALIGN, TLS_TCB_AT_TP,
1360         INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_DTV):
1361         Define.
1362         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Use
1363         branch with 32 bit offset.
1364         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: Likewise.
1366 2003-01-24  Jakub Jelinek  <jakub@redhat.com>
1368         * sysdeps/sparc/sparc32/pt-machine.h (__thread_self): Change to %g7,
1369         as required by TLS ABI.
1370         * sysdeps/sparc/sparc64/pt-machine.h (__thread_self): Likewise.
1371         * sysdeps/sparc/tls.h [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE,
1372         TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE, TLS_TCB_ALIGN, TLS_TCB_AT_TP,
1373         INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_DTV):
1374         Define.
1375         [HAVE_TLS_SUPPORT]: Include descr.h and sysdep.h.
1376         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Use %g7
1377         instead of %g6 for thread pointer.
1378         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
1379         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1380         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
1382 2003-01-25  Guido Guenther  <agx@sigxcpu.org>
1384         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
1385         * sysdeps/unix/sysv/linux/mips/Makefile: New file.
1387 2003-01-20  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1389         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: Avoid non pc relative
1390         reference to __fork.
1392 2003-01-17  Richard Henderson  <rth@redhat.com>
1394         * sysdeps/alpha/tls.h (tcbhead_t): Clarify second member.
1395         (TLS_TCB_SIZE, TLS_TCB_ALIGN): Set for tcbhead_t.
1396         (TLS_PRE_TCB_SIZE): New.
1397         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Update for
1398         new ia64-style thread pointer layout.
1399         (THREAD_GETMEM, THREAD_GETMEM_NC): New.
1400         (THREAD_SETMEM, THREAD_SETMEM_NC): New.
1401         * sysdeps/unix/sysv/linux/alpha/vfork.S: Don't tail-call to __fork
1402         if !SHARED.
1404 2003-01-15  Jakub Jelinek  <jakub@redhat.com>
1406         * sysdeps/ia64/tls.h (tcbhead_t): Use the TLS ABI required layout
1407         if USE_TLS only.
1408         (NONTLS_INIT_TP): Revert last change.
1409         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define to
1410         offsetof (tcbhead_t, multiple_threads) if USE_TLS not defined.
1412 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
1414         * pthread.c (_pthread_initialize_minimal): Use
1415         GL(dl_tls_dtv_slotinfo_list) != NULL to check whether TLS has
1416         been already initialized.
1418 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
1420         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize head->sysinfo even
1421         if not SHARED.
1423 2003-01-15  Jakub Jelinek  <jakub@redhat.com>
1425         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init,
1426         __libc_lock_init_recursive): Initialize fields directly.
1428 2003-01-15  Jakub Jelinek  <jakub@redhat.com>
1430         * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Allow
1431         __fork to be far away from __vfork ifndef SHARED.
1432         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
1433         Likewise.
1434         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
1435         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
1436         Add a missing instruction.
1437         * sysdeps/unix/sysv/linux/arm/vfork.S (__vfork): Conditionally
1438         branch to __fork even if __NR_vfork is not defined.
1440 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
1442         * tst-cancel-wrappers.sh: Allow .__*_asynccancel functions names
1443         as well.
1445 2003-01-14  Steven Munroe  <sjmunroe@us.ibm.com>
1447         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
1449 2003-01-14  Jakub Jelinek  <jakub@redhat.com>
1451         * sysdeps/unix/sysv/linux/ia64/vfork.S (JUMPTARGET): Remove.
1453 2003-01-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1455         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Avoid
1456         unterminated string literals.
1457         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Likewise.
1459 2003-01-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1461         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
1462         (PSEUDO): Code reordering.  Move CENABLE and CDISABLE literals from
1463         PSEUDO_END to PSEUDO.
1464         (PSEUDO_END): Remove.
1465         (SINGLE_THREAD_P): Save an instruction.
1466         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add missing
1467         parameter to SINGLE_THREAD_P call.
1468         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
1469         Code reordering.
1471 2003-01-10  Andreas Schwab  <schwab@suse.de>
1473         * sysdeps/unix/sysv/linux/m68k/vfork.S: New file.
1475 2003-01-10  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1477         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Setup
1478         backchain in pseudo_cancel.  Minor code improvements.
1479         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
1480         Likewise.
1482 2003-01-10  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1484         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
1485         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
1487 2002-01-12  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
1489         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
1491 2002-01-09  Richard Henderson  <rth@redhat.com>
1493         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Assume only
1494         ret follows pseudo, and thus avoid branch-to-branch in cancel
1495         case.  Use SYSCALL_ERROR_LABEL.
1497 2003-01-11  Philip Blundell  <philb@gnu.org>
1499         * sysdeps/unix/sysv/linux/arm/vfork.S: New file.
1500         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h (PSEUDO_RET):
1501         Correctly unstack lr.
1502         (UNDOARGS_5): Fix ordering of pushes and pops.
1503         (SINGLE_THREAD_P_PIC): New.
1504         (SINGLE_THREAD_P_INT): New.
1505         (SINGLE_THREAD_P): Implement in terms of above.  Restore lr if it
1506         was stacked.
1507         (PSEUDO): Use SINGLE_THREAD_P_INT.
1509 2003-01-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1511         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
1513 2003-01-11  Jakub Jelinek  <jakub@redhat.com>
1515         * sysdeps/ia64/tls.h (tcbhead_t): Change into dtv_t *, void *.
1516         [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN,
1517         TLS_TCB_SIZE, TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, TLS_DTV_AT_TP,
1518         INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_SELF,
1519         INIT_THREAD_SELF): Define.
1520         [HAVE_TLS_SUPPORT]: Include descr.h.
1521         (NONTLS_INIT_TP): Point __thread_self at the end of dummy
1522         struct _pthread_descr_struct.
1523         * sysdeps/ia64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1524         THREAD_SETMEM, THREAD_SETMEM_NC): Define using THREAD_SELF,
1525         not __thread_self.
1526         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Adjust
1527         computation.
1528         * pthread.c (__pthread_initialize_minimal): Use tcbp, not self
1529         for TCB pointer.
1530         (__pthread_initialize_manager): Rename tcb to mgr.
1531         Use tcbp for TCB pointer, if TLS_DTV_AT_TP set mgr to sizeof (struct
1532         _pthread_descr) below tcbp, otherwise to tcbp.
1533         * manager.c (pthread_handle_create): If TLS_DTV_AT_TP, set
1534         new_thread to be below _dl_allocate_tls ().  Adjust new_thread back
1535         before freeing.  Fix clone arguments if report_events and USE_TLS.
1536         (pthread_free): Adjust th back before freeing.
1538 2003-01-10  Steven Munroe  <sjmunroe@us.ibm.com>
1540         * sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile: Moved to ...
1541         * sysdeps/unix/sysv/linux/powerpc/Makefile: ...here.
1542         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New File.
1544 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
1546         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
1547         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
1548         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1549         [__ASSEMBLER__] (SINGLE_THREAD_P): Remove trailing ;;.
1550         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
1551         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
1552         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
1553         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
1554         * tst-popen.c: New test.
1555         * Makefile (tests): Add tst-popen.
1557 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
1559         * sysdeps/unix/sysv/linux/sigwait.c (do_sigwait): Add
1560         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
1562 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
1564         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use
1565         PSEUDO_PREPARE_ARGS.  Fix branch condition after SINGLE_THREAD_P.
1567 2003-01-06  Philip Blundell  <philb@gnu.org>
1569         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: New file.
1571 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
1573         * internals.h (LIBC_CANCEL_HANDLED): Define.
1574         * sysdeps/unix/sysv/linux/sigwait.c (LIBC_CANCEL_HANDLED): Add.
1575         * signals.c (LIBC_CANCEL_HANDLED): Add.
1576         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
1577         * tst-cancel-wrappers.sh: Remove all exceptions.
1579         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
1581 2003-01-05  Andreas Schwab  <schwab@suse.de>
1583         * sysdeps/m68k/Makefile: New file, use -fPIC for nonshared
1584         objects.
1586         * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h (SINGLE_THREAD_P):
1587         Fix for PIC.
1588         (CENABLE): Likewise.
1589         (CDISABLE): Likewise.
1591 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
1593         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
1594         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
1596         * Makefile (libc.so-no-z-defs): Define to yes.
1598 2003-01-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1600         * sysdeps/sh/tls.h: Include dl-sysdep.h and stdint.h.
1601         (tcbhead_t): Add multiple_threads member.
1602         (TLS_INIT_TP_EXPENSIVE): Define.
1603         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Don't use multi-line
1604         strings.  Remove unused code.
1605         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
1607 2003-01-04  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
1609         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
1610         * sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile: New file.
1612 2003-01-04  Jakub Jelinek  <jakub@redhat.com>
1614         * internals.h (LIBC_THREAD_GETMEM, LIBC_THREAD_SETMEM): Define
1615         even if NOT_IN_libc is defined.
1617 2003-01-05  Jakub Jelinek  <jakub@redhat.com>
1619         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
1620         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
1621         * sysdeps/s390/Makefile: New file.
1622         * sysdeps/s390/tcb-offsets.sym: New file.
1623         * sysdeps/s390/tls.h: New file.
1625 2003-01-03  Richard Henderson  <rth@redhat.com>
1627         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
1629 2003-01-03  Andreas Jaeger  <aj@suse.de>
1631         * sysdeps/pthread/bits/libc-tsd.h: Declare weak_extern functions.
1633 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
1635         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
1637 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
1639         * tst-cancel-wrappers.sh: Exclude sigwait.c as well, it does not have
1640         cancellation tests.
1642 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
1644         * internals.h (struct pthread_functions): Rename
1645         ptr_pthread_cond_* fields to ptr___pthread_cond_*.
1646         * pthread.c (pthread_functions): Adjust.
1647         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
1648         pthread_cond_*@GLIBC_2.0 compatibility symbols.
1649         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
1650         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
1651         and pthread_cond_wait.
1653         * sysdeps/pthread/bits/pthreadtypes.h (__pthread_cond_align_t): New
1654         type.
1655         (pthread_cond_t): Add __align member, shorten __padding.
1656         * sysdeps/pthread/pthread.h (PHTREAD_COND_INITIALIZER): Initialize
1657         __padding and __align too.
1659         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call2): Add
1660         __builtin_expect.
1661         * sysdeps/pthread/sigaction.c: New file.
1662         * sysdeps/unix/sysv/linux/raise.c: New file.
1663         * sysdeps/unix/sysv/linux/sigwait.c: New file.
1664         * sysdeps/unix/sysv/linux/fork.c (__pthread_fork): Protect
1665         weak_extern with #ifndef SHARED.
1666         * sysdeps/unix/sysv/linux/jmp-unwind.c (__pthread_cleanup_upto):
1667         Likewise.
1668         * signals.c (__sigaction): Renamed to...
1669         (__pthread_sigaction): ... this.
1670         (__sigaction): New strong alias, #ifdef SHARED only.
1671         (sigaction): Protect with #ifdef SHARED.
1672         (sigwait): Renamed to...
1673         (__pthread_sigwait): ... this.
1674         (sigwait): New strong alias, #ifdef SHARED only.
1675         (raise): Renamed to...
1676         (__pthread_raise): ... this.
1677         (raise): New strong alias, #ifdef SHARED only.
1678         * internals.h (__pthread_sigaction, __pthread_sigwait,
1679         __pthread_raise): New prototypes.
1680         (struct pthread_functions): Add ptr_pthread_sigaction,
1681         ptr_pthread_sigwait, ptr_pthread_raise.
1682         * pthread.c (pthread_functions): Renamed to...
1683         (__pthread_functions): ... this.  No longer static, no longer
1684         SHARED only.  Initialize ptr_pthread_sigaction, ptr_pthread_sigwait
1685         and ptr_pthread_raise.
1686         [SHARED] (ptr_pthread_functions): Change to &__pthread_functions.
1687         * libc-cancellation.c (__pthread_thread_self): Remove weak_extern.
1688         * ptfork.c (__fork, __vfork): Protect with #ifdef SHARED.
1689         * ptlongjmp.c (siglongjmp, longjmp): Protect with #ifdef SHARED.
1691         * Makefile (tests, tests-static): Add tst-cancel-static.
1692         * tst-cancel-static.c: New test.
1694 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
1696         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
1698 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
1700         * sysdeps/pthread/bits/pthreadtypes.h (pthread_cond_t): Add padding.
1701         * condvar.c: Add symbol versioning.  The compatibility versions
1702         are the same as the change in the interface does not effect this
1703         implementation.
1704         * Versions [libpthread]: Add definitions for new pthread_cond_*
1705         interfaces for version GLIBC_2.3.2.
1707 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
1709         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
1710         __register_atfork.
1711         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
1712         for __register_atfork.
1714 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
1716         * sysdeps/i386/i686/pt-machine.h: Use __ASSEMBLER__ instead of
1717         ASSEMBLER test macro.
1718         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Likewise.
1719         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1720         * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Likewise.
1721         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1722         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1723         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1725         * sysdeps/pthread/errno-loc.c (__errno_location): Add
1726         libc_hidden_def.
1727         * sysdeps/pthread/herrno-loc.c (__h_errno_location): Likewise.
1728         * sysdeps/pthread/res-state.c (__res_state): Likewise.
1729         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
1730         __libc_current_sigrtmax): Likewise.
1731         * Versions [libc] (GLIBC_PRIVATE): Remove __libc_internal_tsd_get,
1732         __libc_internal_tsd_set, __libc_internal_tsd_address,
1733         __libc_alloca_cutoff.
1734         [libpthread] (GLIBC_PRIVATE): Remove __libc_internal_tsd_get,
1735         __libc_internal_tsd_set, __libc_internal_tsd_address.
1737         * sysdeps/pthread/list.h: Remove assert.h include.
1738         * sysdeps/unix/sysv/linux/fork.c: Include <fork.h>, not "fork.h".
1740         * sysdeps/pthread/list.h: New file.
1741         * sysdeps/unix/sysv/linux/jmp-unwind.c: New file.
1742         * sysdeps/unix/sysv/linux/fork.c: New file.
1743         * sysdeps/unix/sysv/linux/fork.h: New file.
1744         * sysdeps/unix/sysv/linux/ia64/fork.h: New file.
1745         * sysdeps/unix/sysv/linux/sparc/fork.h: New file.
1746         * sysdeps/unix/sysv/linux/register-atfork.c: New file.
1747         * sysdeps/unix/sysv/linux/unregister-atfork.c: New file.
1748         * sysdeps/unix/sysv/linux/Makefile: New file.
1749         * sysdeps/unix/sysv/linux/Versions: New file.
1750         * ptlongjmp.c (pthread_cleanup_upto): Rename to...
1751         (__pthread_cleanup_upto): ...this. Add targetframe argument,
1752         use it instead of currentframe.  No longer static.
1753         (siglongjmp, longjmp): Remove pthread_cleanup_upto calls.
1754         * internals.h (__pthread_cleanup_upto, __pthread_fork): New prototypes.
1755         (struct pthread_functions): Add ptr_pthread_fork,
1756         ptr_pthread_cleanup_upto.
1757         * pthread.c (pthread_functions): Initialize ptr_pthread_fork and
1758         ptr_pthread_cleanup_upto.
1759         * ptfork.c: Include fork.h.
1760         (struct handler_list, struct handler_list_block): Remove.
1761         (pthread_atfork_lock, pthread_atfork_prepare, pthread_atfork_parent,
1762         pthread_atfork_child): Remove.
1763         (pthread_insert_list, __pthread_atfork, pthread_call_handlers): Remove.
1764         (__pthread_fork): New function.
1765         (__fork, __vfork): Call __libc_fork.
1766         * Makefile (libpthread-routines): Add old_pthread_atfork.
1767         (libpthread-nonshared): Add pthread_atfork.
1768         (others): Depend on $(objpfx)libpthread_nonshared.a.
1769         ($(objpfx)libpthread_nonshared.a): New rule.
1770         (install): Depend on $(inst_libdir)/libpthread.so.
1771         ($(inst_libdir)/libpthread.so, $(inst_libdir)/libpthread_nonshared.a):
1772         New rules.
1773         (tests): Depend on libpthread_nonshared.a too.
1774         * old_pthread_atfork.c: New file.
1775         * pthread_atfork.c: New file.
1776         * Makeconfig (shared-thread-library): Include libpthread_nonshared.a
1777         too.
1779 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
1781         * forward.c: Make all functions available by default again.  It
1782         caused too much trouble.
1783         * internals.h (struct pthread_functions): Rename ptr_pthread_exit
1784         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
1785         ptr___pthread_attr_init_2_*.
1786         * pthread.c (pthread_functions): Adjust.
1788 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
1790         * libc_pthread_init.c (__libc_pthread_init): Remove
1791         MULTIPLE_THREADS_OFFSET check.
1792         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
1793         (SYSINFO_OFFSET): Remove.
1794         * sysdeps/i386/Makefile [csu] (gen-as-const-headers): Add
1795         tcb-offsets.sym.
1796         * sysdeps/i386/tcb-offsets.sym: New file.
1797         * sysdeps/pthread/tcb-offsets.h: New file.
1798         * sysdeps/sparc/sparc32/tls.h: Removed.
1799         * sysdeps/sparc/sparc64/tls.h: Move...
1800         * sysdeps/sparc/tls.h: ...here.  Include tcb-offsets.h in assembler.
1801         * sysdeps/sparc/Makefile: New file.
1802         * sysdeps/sparc/tcb-offsets.sym: New file.
1803         * sysdeps/ia64/tls.h: Include tcb-offsets.h in assembler.
1804         * sysdeps/ia64/Makefile: New file.
1805         * sysdeps/ia64/tcb-offsets.sym: New file.
1806         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
1807         (MULTIPLE_THREADS_OFFSET): Remove.
1808         Replace defined MULTIPLE_THREADS_OFFSET
1809         with defined FLOATING_STACKS && USE___THREAD.
1810         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1811         (MULTIPLE_THREADS_OFFSET): Remove.
1812         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1813         (MULTIPLE_THREADS_OFFSET): Remove.
1814         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1815         (MULTIPLE_THREADS_OFFSET): Remove.
1816         * pthread.c (__pthread_initialize_manager): Remove
1817         MULTIPLE_THREADS_OFFSET cbeck.
1819         * tst-cancel-wrappers.sh: Add line continuations.
1821 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
1823         * sysdeps/pthread/bits/libc-tsd.h: Include linuxthreads/descr.h
1824         and bits/libc-lock.h.
1825         (__libc_internal_tsd_get, __libc_internal_tsd_set,
1826         __libc_internal_tsd_address): Remove.
1827         (__pthread_internal_tsd_address, __pthread_internal_tsd_get,
1828         __pthread_internal_tsd_set): New weak_externs.
1829         (__libc_tsd_address, __libc_tsd_get, __libc_tsd_set): Define
1830         using __libc_maybe_call2.
1831         (__libc_tsd_key_t): Move to ...
1832         * descr.h (__libc_tsd_key_t): ...here.
1833         Remove bits/libc-tsd.h include.
1834         * sysdeps/pthread/errno-loc.c: New file.
1835         * sysdeps/pthread/herrno-loc.c: New file.
1836         * sysdeps/pthread/res-state.c: New file.
1837         * libc-cancellation.c (THREAD_GETMEM, THREAD_SETMEM): Remove.
1838         (__libc_enable_asynccancel, __libc_disable_asynccancel): Use
1839         thread_self unconditionally.  Use LIBC_THREAD_[SG]ETMEM instead
1840         of THREAD_[SG]ETMEM.
1841         * specific.c (libc_internal_tsd_set): Renamed to...
1842         __pthread_internal_tsd_set.  Remove static.
1843         (libc_internal_tsd_get): Renamed to...
1844         __pthread_internal_tsd_get.  Remove static.
1845         (libc_internal_tsd_address): Renamed to...
1846         __pthread_internal_tsd_address.  Remove static.
1847         (__libc_internal_tsd_set, __libc_internal_tsd_get,
1848         __libc_internal_tsd_address, __libc_alloca_cutoff): Remove.
1849         * internals.h [!NOT_IN_libc] (LIBC_THREAD_GETMEM, LIBC_THREAD_SETMEM):
1850         Define.
1851         (__pthread_internal_tsd_set, __pthread_internal_tsd_get,
1852         __pthread_internal_tsd_address): New prototypes.
1853         (struct pthread_functions): Add
1854         ptr_pthread_internal_tsd_([sg]et|address) fields.
1855         [!NOT_IN_libc && !FLOATING_STACKS] (thread_self): Define.
1856         * pthread.c (pthread_functions) [!USE_TLS && !HAVE___THREAD]:
1857         Initialize ptr_pthread_internal_tsd_([sg]et|address) fields.
1858         * Versions (libpthread): Remove __libc_alloca_cutoff@GLIBC_PRIVATE.
1859         * alloca_cutoff.c: New file.
1860         * no-tsd.c: Removed.
1861         * Makefile (routines): Remove no-tsd.  Add alloca_cutoff.
1862         * pt-system.c (system): Remove cancellation handling.
1863         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
1864         cancellation routines.
1866         * sysdeps/i386/tls.h: Include dl-sysdep.h and stdint.h.
1867         (tcbhead_t): Add sysinfo field.
1868         (SYSINFO_OFFSET, INIT_SYSINFO): Define.
1869         (TLS_INIT_TP): Use INIT_SYSINFO.
1870         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
1871         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
1872         (MULTIPLE_THREADS_OFFSET): Adjust.
1873         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1874         (MULTIPLE_THREADS_OFFSET): Likewise.
1875         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1876         (MULTIPLE_THREADS_OFFSET): Likewise.
1877         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1878         (MULTIPLE_THREADS_OFFSET): Likewise.
1879         * descr.h: Include stdint.h.
1880         (struct _pthread_descr_struct): Add p_header.data.sysinfo field.
1882 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
1884         * libc_pthread_init.c: Include stdlib.h.
1885         * sysdeps/i386/tls.h (tcbhead_t): Add multiple_threads member.
1886         (TLS_INIT_TP_EXPENSIVE): Define.
1887         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call,
1888         __libc_maybe_call2): In _LIBC check SHARED define.
1889         * sysdeps/ia64/tls.h: New file.
1890         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
1891         * sysdeps/unix/sysv/linux/ia64/Makefile: New file.
1892         * sysdeps/x86_64/tls.h (TLS_INIT_TP_EXPENSIVE): Define.
1893         * sysdeps/sparc/sparc32/tls.h: New file.
1894         * sysdeps/sparc/sparc64/tls.h: New file.
1895         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
1896         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
1897         * Makefile (tests): Add tst-cancel[1-6].
1898         (tests-reverse): Add tst-cancel5.
1899         Link libc.so before libpthread.so for tests-reverse.
1900         * tst-cancel1.c: New file.
1901         * tst-cancel2.c: New file.
1902         * tst-cancel3.c: New file.
1903         * tst-cancel4.c: New file.
1904         * tst-cancel5.c: New file.
1905         * tst-cancel6.c: New file.
1907 2002-12-27  Andreas Schwab  <schwab@suse.de>
1909         * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: New file.
1911 2002-12-22  Roland McGrath  <roland@redhat.com>
1913         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
1915 2002-12-21  Ulrich Drepper  <drepper@redhat.com>
1917         * pthread.c (init_rtsigs): Remove incomplete __builtin_expect.
1918         Reported by Art Hass <ahaas@airmail.net>.
1920 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
1922         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
1923         Use return 0 as 6th argument to FORWARD4.
1925 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
1927         * sysdeps/i386/useldt.h (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Only
1928         define if __ASSUME_LDT_WORKS > 0.
1929         * libc-cancellation.c (THREAD_GETMEM, THREAD_SETMEM): Redefine to
1930         struct member access if !FLOATING_STACKS.
1931         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
1933 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
1935         * internals.h (__pthread_thread_self): New prototype.
1936         (struct pthread_functions): Add ptr_pthread_thread_self field.
1937         * pthread.c (pthread_functions): Initialize ptr_pthread_thread_self.
1938         (__pthread_thread_self): New function.
1939         * libc-cancellation.c (__pthread_thread_self): Add weak_extern.
1940         (__libc_enable_asynccancel, __libc_disable_asynccancel): Don't
1941         use thread_self() directly if not FLOATING_STACKS.
1943 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
1945         * sysdeps/x86_64/pt-machine.h: Guard most of the header
1946         with #ifndef __ASSEMBLER__.
1947         * pthread.c (pthread_functions): Use SHLIB_COMPAT around
1948         pthread_attr_init_2_0 use.
1950 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
1952         * wrapsyscall.c: Removed.
1953         * weaks.c: Removed.
1954         * Makefile (distribute): Add tst-cancel-wrappers.sh.
1955         (routines): Remove weaks.  Add forward,
1956         libc_pthread_init, libc-cancellation.
1957         (shared-only-routines): Remove weaks.  Add forward.
1958         (libpthread-routines): Remove wrapsyscall.
1959         Add ptw-write, ptw-read, ptw-close, ptw-fcntl, ptw-accept,
1960         ptw-connect, ptw-recv, ptw-recvfrom, ptw-recvmsg, ptw-send,
1961         ptw-sendmsg, ptw-sendto, ptw-fsync, ptw-lseek, ptw-lseek64,
1962         ptw-llseek, ptw-msync, ptw-nanosleep, ptw-open, ptw-open64,
1963         ptw-pause, ptw-pread, ptw-pread64, ptw-pwrite, ptw-pwrite64,
1964         ptw-tcdrain, ptw-wait, ptw-waitpid, pt-system, pt-allocrtsig.
1965         (libpthread-shared-only-routines): Add pt-allocrtsig.
1966         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
1967         ($(objpfx)tst-cancel-wrappers.out): New rule.
1968         * sysdeps/pthread/bits/libc-lock.h: Include linuxthreads/internals.h
1969         if in libc.
1970         (__libc_maybe_call): In libpthread.* don't check for existance
1971         of the function.
1972         (__libc_maybe_call2): Define.
1973         (__libc_lock_init, __libc_lock_fini, __libc_lock_lock,
1974         __libc_lock_trylock, __libc_lock_unlock): Use it.
1975         * sysdeps/pthread/flockfile.c: New file.
1976         * sysdeps/pthread/ftrylockfile.c: New file.
1977         * sysdeps/pthread/funlockfile.c: New file.
1978         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
1979         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
1980         * sysdeps/unix/sysv/linux/allocrtsig.c: New file.
1981         * libc-cancellation.c: New file.
1982         * forward.c: New file.
1983         * libc_pthread_init.c: New file.
1984         * pt-system.c: New file.
1985         * pthread.c: Remove locale.h.
1986         (__pthread_manager_thread): Initialize multiple_threads.
1987         (__pthread_multiple_threads): Declare.
1988         (pthread_functions): New variable.
1989         (__pthread_initialize_minimal): Remove __uselocale call.
1990         Call __libc_pthread_init.
1991         (__pthread_initialize_manager): Initialize __pthread_multiple_threads,
1992         initial thread's multiple_threads and __libc_multiple_threads.
1993         Check MULTIPLE_THREADS_OFFSET value. Initialize manager thread's
1994         multiple_threads.
1995         (pthread_setschedparam, pthread_getschedparam): Rename to __
1996         prefixed variants.  Add strong_alias.
1997         (current_rtmin, current_rtmax, __libc_current_sigrtmin,
1998         __libc_current_sigrtmax, __libc_allocate_rtsig): Remove.
1999         (init_rtsigs): Use __libc_current_sigrtmin_private.
2000         (pthread_initialize): Only call init_rtsigs if
2001         !__ASSUME_REALTIME_SIGNALS.
2002         (__pthread_require_wrappers, __pthread_require_lockfile): Remove.
2003         * internals.h (__pthread_attr_destroy, __pthread_attr_setdetachstate,
2004         __pthread_attr_getdetachstate, __pthread_attr_setschedparam,
2005         __pthread_attr_getschedparam, __pthread_attr_setschedpolicy,
2006         __pthread_attr_getschedpolicy, __pthread_attr_setinheritsched,
2007         __pthread_attr_getinheritsched, __pthread_attr_setscope,
2008         __pthread_attr_getscope, __pthread_cond_init,
2009         __pthread_cond_destroy, __pthread_cond_wait,
2010         __pthread_cond_signal, __pthread_cond_broadcast,
2011         __pthread_condattr_init, __pthread_condattr_destroy,
2012         __pthread_equal, __pthread_getschedparam,
2013         __pthread_setschedparam, __pthread_setcancelstate,
2014         __pthread_setcanceltype, __pthread_enable_asynccancel,
2015         __libc_enable_asynccancel, __libc_pthread_init): New prototype.
2016         (__pthread_mutex_init, __pthread_mutex_destroy,
2017         __pthread_mutex_lock, __pthread_mutex_unlock,
2018         __pthread_mutex_trylock): Likewise.
2019         Add hidden_proto.
2020         (struct pthread_functions): New type.
2021         (__libc_pthread_functions): New variable.
2022         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define.
2023         * descr.h (struct _pthread_descr_struct): Add
2024         p_header.data.multiple_threads field.
2025         * manager.c (pthread_handle_create): Initialize multiple_threads.
2026         * cancel.c (__pthread_enable_asynccancel,
2027         __pthread_disable_asynccancel): New functions.
2028         (__pthread_provide_wrappers): Remove.
2029         (pthread_setcancelstate, pthread_setcanceltype): Rename to __
2030         prefixed variants.  Add strong_alias.
2031         * condvar.c (pthread_cond_init, pthread_cond_destroy,
2032         pthread_cond_wait, pthread_cond_signal, pthread_cond_broadcast,
2033         pthread_condattr_init, pthread_condattr_destroy): Likewise.
2034         * join.c (pthread_exit): Likewise.
2035         * attr.c (pthread_attr_destroy, pthread_attr_setdetachstate,
2036         pthread_attr_getdetachstate, pthread_attr_setschedparam,
2037         pthread_attr_getschedparam, pthread_attr_setschedpolicy,
2038         pthread_attr_getschedpolicy, pthread_attr_setinheritsched,
2039         pthread_attr_getinheritsched, pthread_attr_setscope,
2040         pthread_attr_getscope): Likewise.
2041         * mutex.c (__pthread_mutex_init, __pthread_mutex_destroy,
2042         __pthread_mutex_lock, __pthread_mutex_unlock,
2043         __pthread_mutex_trylock): Add hidden_def.
2044         * Versions (libc): Add __libc_pthread_init,
2045         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
2046         __libc_allocate_rtsig_private @@GLIBC_PRIVATE.
2047         * lockfile.c: Remove some USE_IN_LIBIO guards.
2048         (__pthread_provide_lockfile): Remove.
2049         * pt-allocrtsig.c: New file.
2050         * tst-cancel-wrappers.sh: New test.
2052 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
2054         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
2055         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
2056         * wrapsyscall.c: Remove creat, poll, pselect, readv, select,
2057         sigpause, sigsuspend, sigwaitinfo, waitid, and writev wrappers.
2059 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
2061         * wrapsyscall.c (CANCELABLE_SYSCALL): Don't define function as
2062         weak.  There is no reason for that.
2063         (CANCELABLE_SYSCALL_VA): Likewise.
2065 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
2067         * wrapsyscall.c: Add wrappers for creat, poll, pselect, readv, select,
2068         sigpause, __xpg_sigpause, sigsuspend, sigwaitinfo, waitid, and writev.
2069         * Versions: Export creat, poll, pselect, readv, select, sigpause,
2070         __xpg_sigpause, sigsuspend, sigwaitinfo, waitid, and writev from
2071         libpthread in version GLIBC_2.3.2.
2073 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
2075         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
2077 2002-12-05  Roland McGrath  <roland@redhat.com>
2079         * pthread.c (__pthread_initialize_minimal)
2080         [USE_TLS && SHARED && !USE___THREAD]: Initialize TLS and set up the
2081         TCB if the dynamic linker didn't do it at startup.
2083         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
2084         string.
2085         (TLS_DO_SET_THREAD_AREA, TLS_DO_MODIFY_LDT, TLS_SETUP_GS_SEGMENT):
2086         Submacros updated.
2087         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
2088         * sysdeps/alpha/tls.h (TLS_INIT_TP): Likewise (always zero).
2090 2002-12-03  Roland McGrath  <roland@redhat.com>
2092         * pthread.c (pthread_initialize) [SHARED]: Copy dl_error_tsd value
2093         from dynamic linker internal cell to new libc cell.
2095 2002-11-28  Roland McGrath  <roland@redhat.com>
2097         * tst-context.c: #define IS_IN_libpthread around #include <tls.h>
2098         before other headers, so FLOATING_STACKS is not defined wrongly.
2100         * sysdeps/i386/tls.h [!IS_IN_libpthread]: Enable TLS support
2101         even if [! FLOATING_STACKS].
2102         (TLS_DO_MODIFY_LDT_KERNEL_CHECK): New macro.
2103         If not under [__ASSUME_LDT_WORKS > 0], then do a runtime check of
2104         dl_osversion >= 2.3.99 and fatal if not.
2105         (TLS_DO_MODIFY_LDT): Use it.
2107 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
2109         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
2110         require it to 200112L.  Remove _POSIX_POLL and _POSIX_SELECT.
2111         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2113 2002-11-19  Ulrich Drepper  <drepper@redhat.com>
2115         * Versions (libc: GLIBC_2.0): Remove names of functions which are
2116         not defined in libc.
2117         * Makefile (shared-only-routines): Add weaks.
2118         * weaks.c: Remove functions which are not exported from libc.so.
2120 2002-11-14  Roland McGrath  <roland@redhat.com>
2122         * libc-tsd.c: New file.
2123         * Makefile (distribute): Add it.
2124         (libc-link.so): New variable.
2125         ($(objpfx)libpthread.so): Depend on that instead of libc.so file name.
2126         (libc-ok-for-link): New variable.
2127         [$(versioning) = yes]: Include $(common-objpfx)tls.make and define
2128         libc-ok-for-link to $(use-thread).
2129         [$(libc-ok-for-link) = no]
2130         (libc-link.so): Set to $(objpfx)libc.so, not $(common-objpfx)libc.so.
2131         ($(objpfx)libc_pic_lite.a,$(objpfx)libc_pic_lite.os, $(objpfx)libc.so):
2132         New targets.
2133         (generated): Append them.
2134         (extra-objs): Append libc-tsd.os.
2136         * libc-tls-loc.c: New file.
2137         * Makefile (libpthread-routines): Add it.
2139 2002-11-14  Andreas Schwab  <schwab@suse.de>
2141         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Fix unterminated
2142         string.
2144 2002-11-13  Roland McGrath  <roland@redhat.com>
2146         * Examples/ex6.c (main): Improve error reporting.
2148 2002-11-04  Ulrich Drepper  <drepper@redhat.com>
2150         * sysdeps/i386/Makefile: Compile pthread.c and sighandler.c with
2151         -fno-omit-frame-pointer.  Patch by Andreas Steinmetz <ast@domdv.de>.
2153         * sysdeps/i386/useldt.h [PIC] (USETLS_LOAD_EBX): Use correct input
2154         register number.
2155         (DO_SET_THREAD_AREA): Mark asm output specifiers correctly.
2157 2002-10-22  Jakub Jelinek  <jakub@redhat.com>
2159         * manager.c (pthread_start_thread): Call __uselocale even
2160         if [! SHARED].  Patch by Leon Kanter <leon@geon.donetsk.ua>.
2162 2002-10-17  Roland McGrath  <roland@redhat.com>
2164         * Makefile (unload): Don't link in libpthread.so.
2165         ($(objpfx)unload.out): Do depend on it.
2166         * unload.c (main): Improve error reporting.
2168 2002-10-09  Roland McGrath  <roland@redhat.com>
2170         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
2171         Under [__PIC__], call the function via the pointer fetched for
2172         comparison rather than a call by name that uses the PLT.
2173         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
2174         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
2175         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
2176         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
2177         (__libc_key_create, __libc_getspecific, __libc_setspecific)
2178         (__libc_atfork): Use it.
2180         * pthread.c [SHARED] (__libc_dl_error_tsd): New function.
2181         (pthread_initialize) [SHARED]: Set _dl_error_catch_tsd to that.
2182         * Versions (libc: GLIBC_PRIVATE): Add __libc_dl_error_tsd.
2183         (ld: GLIBC_PRIVATE): Set removed.
2185 2002-10-11  Ulrich Drepper  <drepper@redhat.com>
2187         * sysdeps/unix/sysv/linux/execve.c: New file.
2189 2002-10-09  Jakub Jelinek  <jakub@redhat.com>
2191         * no-tsd.c: Include stdlib.h.
2193 2002-10-07  Jakub Jelinek  <jakub@redhat.com>
2195         * sysdeps/unix/sysv/linux/allocalim.h: New file.
2196         * descr.h (struct _pthread_descr_struct): Add p_alloca_cutoff
2197         field.
2198         * manager.c (__pthread_allocate_stack): Add out_stacksize argument.
2199         Pass stack size to caller.
2200         (pthread_handle_create): Set p_alloca_cutoff.
2201         * pthread.c (__pthread_initial_thread): Use C99 designated
2202         initializers.  Set p_alloca_cutoff.
2203         (__pthread_manager_thread): Likewise.
2204         (__pthread_initialize_minimal) [USE_TLS]: Set p_alloca_cutoff
2205         for initial thread.
2206         (__pthread_init_max_stacksize): Possibly decrease p_alloca_cutoff
2207         for initial thread.
2208         (__pthread_initialize_manager) [USE_TLS]: Set p_alloca_cutoff
2209         for manager thread.
2210         * specific.c (__libc_alloca_cutoff): New function.
2211         * no-tsd.c (__libc_alloca_cutoff): New function.
2212         * Versions: Export __libc_alloca_cutoff@@GLIBC_PRIVATE from libc
2213         and libpthread.
2215 2002-10-02  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2217         * sysdeps/sh/pt-machine.h: Make C code ifndef'ed with __ASSEMBLER__.
2218         * sysdeps/sh/tls.h: Likewise.
2219         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
2221 2002-09-29  Jakub Jelinek  <jakub@redhat.com>
2223         * sysdeps/pthread/tst-timer.c (main): Clear
2224         SIGEV2.sigev_notify_attributes.
2226 2002-09-29  Ulrich Drepper  <drepper@redhat.com>
2228         * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Don't use
2229         INLINE_SYSCALL for set_thread_area syscall.
2231 2002-09-28  Roland McGrath  <roland@redhat.com>
2233         * pthread.c (__pthread_reset_main_thread) [FLOATING_STACKS]:
2234         Don't call setrlimit, since we did no prior bogon we need to undo.
2236 2002-09-27  Roland McGrath  <roland@redhat.com>
2238         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Don't include <pt-machine.h>.
2240 2002-09-24  Roland McGrath  <roland@redhat.com>
2242         * sysdeps/x86_64/tls.h: New file.
2244 2002-09-23  Roland McGrath  <roland@redhat.com>
2246         * Examples/ex13.c (dump_mut): int -> size_t for counter.
2248 2002-09-18  Bruno Haible  <bruno@clisp.org>
2250         * Examples/ex10.c (thread): Fail if pthread_mutex_timedlock() returns
2251         an unexpected error code.
2253         * internals.h (__pthread_message): Add const to first parameter type.
2254         * pthread.c (__pthread_message): Likewise.
2256         * sysdeps/unix/sysv/linux/configure: Moved to ../sysdeps/pthread.
2258 2002-09-17  Roland McGrath  <roland@redhat.com>
2260         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT, TLS_DO_SET_THREAD_AREA):
2261         Set the descriptor limit to the full 4GB, so %gs:OFFSET works for any
2262         offset (positive or negative) relative to the thread struct.
2263         * sysdeps/i386/useldt.h (DO_MODIFY_LDT, DO_SET_THREAD_AREA): Likewise.
2265 2002-09-12  Jakub Jelinek  <jakub@redhat.com>
2267         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Move...
2268         * sysdeps/unix/sysv/linux/sparc/Makefile: ...here.
2269         Replace /usr/lib/crt[in].o with crt[in].o too.
2271 2002-09-11  Steven Munroe  <sjmunroe@us.ibm.com>
2273         * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
2275 2002-09-04  Bruno Haible  <bruno@clisp.org>
2277         * pthread.c: Include <sys/time.h>.
2278         (is_smp_system): Move to sysdeps/unix/sysv/linux/smp.h.
2279         * sysdeps/unix/sysv/linux/smp.h: New file, extracted from pthread.c.
2280         * Makefile (distribute): Add smp.h to the list.
2282 2002-09-04  Bruno Haible  <bruno@clisp.org>
2284         * sysdeps/alpha/pt-machine.h: Choose different include file location
2285         on non-Linux platforms.
2287         * wrapsyscall.c (PROMOTE_INTEGRAL_TYPE): New macro.
2288         (open, open64): Change va_arg argument type to the integral type to
2289         which mode_t promotes.
2291         * sysdeps/pthread/tst-timer.c (main): Don't assume anything about
2292         the structure of 'struct sigevent'.
2294         * errno.c (__errno_location, __h_errno_location, __res_state):
2295         Use prototype function definitions.
2297 2002-07-29  Steven Munroe  <sjmunroe@us.ibm.com>
2299         * shlib-versions: Set libpthread version to 2.3 for powerpc64.
2300         * sysdeps/powerpc/pt-machine.h: moved to...
2301         * sysdeps/powerpc/powerpc32/pt-machine.h: ...here
2302         * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
2304 2002-09-02  Roland McGrath  <roland@redhat.com>
2306         * sysdeps/powerpc/Makefile (CFLAGS-pt-initfini.s): New variable.
2308 2002-09-01  Roland McGrath  <roland@redhat.com>
2310         * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t): Add new keys
2311         CTYPE_B, CTYPE_TOLOWER, CTYPE_TOUPPER.
2313         * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_address): New macro.
2314         (__libc_internal_tsd_address): Declare it.
2315         * Versions (libc, ld, libpthread: GLIBC_PRIVATE): Add
2316         __libc_internal_tsd_address.
2317         * specific.c (libc_internal_tsd_address): New function.
2318         (__libc_internal_tsd_address): New variable.
2319         * no-tsd.c (__libc_internal_tsd_address): New variable.
2321 2002-08-31  Ulrich Drepper  <drepper@redhat.com>
2323         * Makefile: Don't use rule for crt%.o, spell it out as rules for
2324         crti.o and crtn.o.
2326 2002-08-30  Roland McGrath  <roland@redhat.com>
2328         * Makefile (extra-objs, omit-deps): Add crtn.
2329         ($(objpfx)libpthread.so): Depend on $(objpfx)crtn.o.
2330         ($(objpfx)libpthread.so: +postinit): Append $(objpfx)crtn.o.
2331         ($(objpfx)crtn.S): New target.
2332         ($(objpfx)crt%.o): Pattern rule replaces crti.o target.
2333         (generated): Add crtn.S.
2335         * sysdeps/unix/sysv/linux/x86_64/Makefile ($(objpfx)specs): Massage
2336         crtn.o pathname too.
2338 2002-08-30  Jakub Jelinek  <jakub@redhat.com>
2340         * pthread.c (__pthread_initialize_minimal): Call __uselocale even
2341         if [! SHARED].
2343 2002-08-30  Roland McGrath  <roland@redhat.com>
2345         * tst-static-locale.c: New file.
2346         * Makefile (tests, tests-static): Add it.
2348 2002-04-24  Steven Munroe  <sjmunroe@us.ibm.com>
2350         * spinlock.c (__pthread_lock): Fix spurious wakeup
2351         handling.  Don't clear lowest bit of list pointer as sign the thread
2352         is still on the wait list.  Don't restart after spurious wakeup
2353         with spinning to get the lock.
2354         (__pthread_unlock): Take set lowest bit into account when handling
2355         pointer to list elements.
2356         Patch by Steve Munroe <sjmunroe@us.ibm.com>.
2358 2002-08-28  Roland McGrath  <roland@redhat.com>
2360         * sysdeps/pthread/timer_routines.c (thread_func): Fix type in cast.
2362 2002-08-28  Jakub Jelinek  <jakub@redhat.com>
2364         * sysdeps/unix/sysv/linux/hppa/aio_cancel.c: New file.
2365         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
2366         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
2368 2002-08-28  Ulrich Drepper  <drepper@redhat.com>
2370         * sysdeps/pthread/timer_routines.c (thread_func): Change return
2371         type to void and add casts in use to avoid warnings with all gcc
2372         versions.
2374 2002-08-08  Jakub Jelinek  <jakub@redhat.com>
2376         * sysdeps/unix/sysv/linux/bits/local_lim.h (PTHREAD_THREADS_MAX):
2377         Bump to 16384.
2378         * manager.c (__pthread_handles): Remove.
2379         * pthandles.c: New file.
2380         * pthread.c (__pthread_initialize_minimal): Initialize
2381         __pthread_handles[0] and __pthread_handles[1].
2382         * Makefile (libpthread-routines): Add pthandles (must be last).
2384 2002-08-26  Brian Youmans  <3diff@gnu.org>
2386         * Examples/ex10.c: Corrected version number in Lesser GPL copying
2387         permission notice from 2 to 2.1.
2388         * Examples/ex11.c: Likewise.
2389         * Examples/ex13.c: Likewise.
2390         * Examples/ex8.c: Likewise.
2391         * Examples/ex9.c: Likewise.
2392         * barrier.c: Likewise.
2393         * events.c: Likewise.
2394         * lockfile.c: Likewise.
2395         * no-tsd.c: Likewise.
2396         * pt-machine.c: Likewise.
2397         * ptclock_gettime.c: Likewise.
2398         * ptclock_settime.c: Likewise.
2399         * rwlock.c: Likewise.
2400         * sysdeps/alpha/pspinlock.c: Likewise.
2401         * sysdeps/alpha/pt-machine.h: Likewise.
2402         * sysdeps/arm/pspinlock.c: Likewise.
2403         * sysdeps/arm/pt-machine.h: Likewise.
2404         * sysdeps/cris/pspinlock.c: Likewise.
2405         * sysdeps/cris/pt-machine.h: Likewise.
2406         * sysdeps/hppa/pspinlock.c: Likewise.
2407         * sysdeps/hppa/pt-machine.h: Likewise.
2408         * sysdeps/i386/i686/pt-machine.h: Likewise.
2409         * sysdeps/i386/pspinlock.c: Likewise.
2410         * sysdeps/i386/pt-machine.h: Likewise.
2411         * sysdeps/i386/useldt.h: Likewise.
2412         * sysdeps/ia64/pspinlock.c: Likewise.
2413         * sysdeps/ia64/pt-machine.h: Likewise.
2414         * sysdeps/m68k/pspinlock.c: Likewise.
2415         * sysdeps/m68k/pt-machine.h: Likewise.
2416         * sysdeps/mips/pspinlock.c: Likewise.
2417         * sysdeps/mips/pt-machine.h: Likewise.
2418         * sysdeps/powerpc/pspinlock.c: Likewise.
2419         * sysdeps/powerpc/pt-machine.h: Likewise.
2420         * sysdeps/pthread/bits/initspin.h: Likewise.
2421         * sysdeps/pthread/bits/libc-lock.h: Likewise.
2422         * sysdeps/pthread/bits/libc-tsd.h: Likewise.
2423         * sysdeps/pthread/getcpuclockid.c: Likewise.
2424         * sysdeps/pthread/posix-timer.h: Likewise.
2425         * sysdeps/pthread/timer_create.c: Likewise.
2426         * sysdeps/pthread/timer_delete.c: Likewise.
2427         * sysdeps/pthread/timer_getoverr.c: Likewise.
2428         * sysdeps/pthread/timer_gettime.c: Likewise.
2429         * sysdeps/pthread/timer_routines.c: Likewise.
2430         * sysdeps/pthread/timer_settime.c: Likewise.
2431         * sysdeps/pthread/tst-timer.c: Likewise.
2432         * sysdeps/s390/pspinlock.c: Likewise.
2433         * sysdeps/s390/s390-32/pt-machine.h: Likewise.
2434         * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2435         * sysdeps/sh/pspinlock.c: Likewise.
2436         * sysdeps/sh/pt-machine.h: Likewise.
2437         * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
2438         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2439         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
2440         * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
2441         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2442         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
2443         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
2444         * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
2445         * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
2446         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2447         * tststack.c: Likewise.
2448         * unload.c: Likewise.
2449         * weaks.c: Likewise.
2450         * wrapsyscall.c: Likewise.
2452         * sysdeps/pthread/pt-initfini.c: Changed copying
2453         permission notice to Lesser GPL from Library GPL, including the
2454         references in the special exception.
2455         * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Likewise.
2456         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Likewise.
2457         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c:
2458         Likewise.
2459         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c:
2460         Likewise.
2461         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Likewise.
2463 2002-08-26  Ulrich Drepper  <drepper@redhat.com>
2465         * Examples/ex10.c (thread): tv_nsec == 1000000000 is already
2466         overflow [PR libc/4244].
2468 2002-08-25  Ulrich Drepper  <drepper@redhat.com>
2470         * sysdeps/pthread/timer_routines.c (thread_func): Make the
2471         compiler happy by adding a return statement which will never be
2472         reached.
2474         * tst-context.c (main): Cast to long before casting to pointer.
2476         * Examples/ex17.c (main): Use correct format string.
2478         * Examples/ex9.c (thread): Remove incorrect return statement.
2480 2002-08-23  Ulrich Drepper  <drepper@redhat.com>
2482         * pthread.c (__linuxthreads_version): New global constant.
2484 2002-08-23  Andreas Jaeger  <aj@suse.de>
2486         * sysdeps/x86_64/pt-machine.h: Use %fs instead of %gs
2487         as thread specific register.
2488         (testandset): Fix inline asm.
2489         (THREAD_GETMEM): Fix inline asm.
2491 2002-08-22  Roland McGrath  <roland@redhat.com>
2493         * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Remove [HAVE_TLS_SUPPORT]
2494         conditional.
2495         (INIT_THREAD_SELF): Pass second arg to DO_SET_THREAD_AREA.
2496         (DO_SET_THREAD_AREA): Take second arg, pass to DO_SET_THREAD_AREA_REUSE
2497         macro.  That chooses whether to reuse %gs value or let kernel set it.
2498         [USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, always 1.
2499         [!USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, true if arg is
2500         not constant 0.
2502 2002-08-21  Ulrich Drepper  <drepper@redhat.com>
2504         * sysdeps/i386/tls.h (TLS_SETUP_GS_SEGMENT): Add new parameter
2505         also to the third definition of this macro.
2507 2002-06-17  Andreas Jaeger  <aj@suse.de>
2509         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
2510         Set it.
2512 2002-08-20  Ulrich Drepper  <drepper@redhat.com>
2514         * sysdeps/i386/useldt.h: Go back to using 16-bit instructions when
2515         loading/reading segment registers.  Some old hardware doesn't
2516         handle the 32-bit instructions as expected.
2517         * sysdeps/i386/tls.h: Likewise.
2519         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Second parameter is
2520         renamed to secondcall and use is negated.
2521         (TLS_SETUP_GS_SEGMENT): Likewise.
2522         (TLS_INIT_TP): Likewise.
2523         * sysdeps/sh/tls.h (TLS_INIT_TP): Second parameter is renamed to
2524         secondcall.
2526         * sysdeps/i386/tls.h: Use 32-bit operations when handling segment
2527         registers.  No need to mask upper 16 bits in this case.
2528         * sysdeps/i386/useldt.h: Likewise.
2529         (DO_SET_THREAD_AREA): We have to load %gs again even if the value
2530         is the same since the GDT content changed.
2532         * sysdeps/i386/tls.h (TLS_INIT_TP): Add new parameter and pass it on
2533         to TLS_SETUP_GS_SEGMENT.
2534         (TLS_SETUP_GS_SEGMENT): Add new parameter and pass it on to
2535         TLS_DO_SET_THREAD_AREA.
2536         (TLS_DO_SET_THREAD_AREA): If new parameter is zero determine
2537         entry number from %gs value.
2538         * sysdeps/sh/tls.h (TLS_INIT_TP): Add new parameter and simply
2539         ignore it.
2541         * manager.c (pthread_handle_create): Pass NULL to _dl_allocate_tls.
2542         Pass true to _dl_deallocate_tls.
2543         (pthread_free): Likewise.
2544         * pthread.c (__pthread_initialize_manager): Likewise.
2546 2002-08-19  Ulrich Drepper  <drepper@redhat.com>
2548         * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Use correct shift when
2549         computing index from %gs value.
2551 2002-08-16  Roland McGrath  <roland@redhat.com>
2553         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Calculate segment
2554         register value from entry number properly.
2556         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Rewrite asm to use %ebx
2557         optimally conditional on [__PIC__].
2558         (TLS_DO_SET_THREAD_AREA): New macro, implement inline syscall
2559         without touching errno, and use latest modify_ldt-like interface.
2560         (TLS_SETUP_GS_SEGMENT): Use that instead of INLINE_SYSCALL.
2561         * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Set %gs in this macro.
2562         (DO_SET_THREAD_AREA): New macro, uses current syscall interface with
2563         existing %gs value as the segment to set.
2564         (INIT_THREAD_SELF): Rewritten using those.  Use set_thread_area only
2565         under [HAVE_TLS_SUPPORT] so we can rely on the initialization done
2566         by the first thread's early TLS setup.
2568 2002-08-15  Roland McGrath  <roland@redhat.com>
2570         * sysdeps/i386/tls.h (TLS_INIT_TP): Use statement expression and
2571         return a value as callers now expect.
2573 2002-08-11  Roland McGrath  <roland@redhat.com>
2575         * pthread.c (__pthread_initialize_manager): Initialize
2576         p_header.data.tcb field of manager thread's descriptor.
2577         (__pthread_initialize_minimal): Don't initialize p_header.data.self
2578         field, already done by TLS_INIT_TP.
2580         * manager.c (pthread_handle_create): Move p_header field initializers
2581         together.
2583 2002-08-08  Ulrich Drepper  <drepper@redhat.com>
2585         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Removed.
2587 2002-08-07  Ulrich Drepper  <drepper@redhat.com>
2589         * pthread.c (__linuxthreads_initial_report_events): New variable.
2590         (__pthread_initialize_manager): Use it to initialize p_report_events
2591         of initial thread.
2592         [TLS]: Store pointer to descriptor of manager in __pthread_handles.
2594 2002-08-07  Roland McGrath  <roland@redhat.com>
2596         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Add an extra argument with
2597         an "m" constraint to the asm so the compiler knows LDT_ENTRY was used.
2599 2002-08-02  Roland McGrath  <roland@redhat.com>
2601         * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t):
2602         Add _LIBC_TSD_KEY_LOCALE.
2603         * manager.c (pthread_start_thread) [!(USE_TLS && HAVE___THREAD)]:
2604         Call __uselocale to initialize our per-thread locale pointer to
2605         the global one.
2606         * pthread.c (__pthread_initialize_minimal): Likewise.
2608         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Add missing \s.
2610 2002-08-02  Ulrich Drepper  <drepper@redhat.com>
2612         * pthread.c: Declare _errno, _h_errno, and _res unless we use TLS
2613         internally.
2615         * cancel.c (__pthread_perform_cleanup) [USE_TLS && HAVE___THREAD]:
2616         Don't use p_libc_specific element in thread descriptor.
2618 2002-07-30  Roland McGrath  <roland@redhat.com>
2620         * sysdeps/pthread/bits/libc-tsd.h: Include <tls.h>.
2621         [USE_TLS && HAVE___THREAD]: Just include the sysdeps/generic file,
2622         which does the right thing when __thread support is available.
2623         * descr.h (struct _pthread_descr_struct) [USE_TLS && HAVE___THREAD]:
2624         Omit `p_libc_specific', `p_errnop', `p_errno', `p_h_errnop',
2625         `p_h_errno', `p_resp', and `p_res' members.
2626         * pthread.c (__pthread_initialize_minimal) [USE_TLS && HAVE___THREAD]:
2627         Don't initialize `p_errnop' and `p_h_errnop' members.
2628         (__pthread_reset_main_thread): Likewise.
2629         (__pthread_initialize_manager): Likewise.
2630         * manager.c (__pthread_manager, pthread_handle_create): Likewise.
2631         * pthread.c (pthread_initialize) [USE_TLS && HAVE___THREAD]:
2632         Don't initialize `p_resp' member.
2633         (__pthread_reset_main_thread): Likewise.
2634         * manager.c (pthread_handle_create): Likewise.
2635         * specific.c (libc_internal_tsd_set, libc_internal_tsd_get):
2636         Conditionalize these on [!(USE_TLS && HAVE___THREAD)].
2637         * no-tsd.c: Conditionalize contents on [!(USE_TLS && HAVE___THREAD)].
2638         * errno.c [USE_TLS && HAVE___THREAD]
2639         (__h_errno_location, __res_state): Don't define these at all.
2641         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens around arguments!
2642         (INSTALL_NEW_DTV, GET_DTV): Likewise.
2643         * sysdeps/sh/tls.h (INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV): Likewise.
2645         * weaks.c: Don't include <errno.h> here.
2647 2002-08-01  Roland McGrath  <roland@redhat.com>
2649         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): New macro, broken out of
2650         TLS_INIT_TP.
2651         (TLS_DO_SET_THREAD_AREA): New macro, uses thread_set_area syscall.
2652         (TLS_SETUP_GS_SEGMENT): New macro, try one or the other or both.
2653         (TLS_INIT_TP): Use that.
2655 2002-08-02  Jakub Jelinek  <jakub@redhat.com>
2657         * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Move from INIT_THREAD_SELF.
2658         (INIT_THREAD_SELF): Use sys_thread_area syscall instead if available.
2659         (FREE_THREAD): Avoid modify_ldt if using GDT.
2660         * sysdeps/i386/pspinlock.c (__have_no_set_thread_area): New variable.
2662 2002-07-25  Jakub Jelinek  <jakub@redhat.com>
2664         * sysdeps/i386/tls.h: Use __ASSEMBLER__ test macro not ASSEMBLER.
2665         * sysdeps/i386/pt-machine.h: Likewise.
2666         * sysdeps/i386/useldt.h: Likewise.
2668 2002-07-22  Ulrich Drepper  <drepper@redhat.com>
2670         * pthread.c (__pthread_initialize_minimal): If !SHARED and TLS
2671         call __libc_setup_tls first.
2672         * Makefile: Actually create tst-signal.out file when running the test.
2673         (tests): Add tststatic.
2674         * Examples/tststatic.c: New file.
2676 2002-07-19  Ulrich Drepper  <drepper@redhat.com>
2678         * errno.c (__errno_location): Don't define unless !USE_TLS
2679         || !HAVE___THREAD.
2680         * sysdeps/i386/pt-machine.c: Protect C code with #ifndef ASSEMBLER.
2681         * sysdeps/i386/tls.h: Likewise.
2682         * sysdeps/i386/useldt.h: Likewise.
2683         * sysdeps/i386/i686/pt-machine.h: Likewise.
2685 2002-07-02  H.J. Lu  <hjl@gnu.org>
2687         * sysdeps/mips/pspinlock.c: Don't include <sgidefs.h>.  Always
2688         use ll/sc.
2689         * sysdeps/mips/pt-machine.h: Likewise.
2691 2002-07-14  Ulrich Drepper  <drepper@redhat.com>
2693         * manager.c (pthread_handle_create): Initialize self-reference in
2694         descriptor.
2696 2002-07-01  Jakub Jelinek  <jakub@redhat.com>
2698         * Examples/ex9.c (main): Remove unused th variable.
2700 2002-07-10  Ulrich Drepper  <drepper@redhat.com>
2702         * wrapsyscall.c: Add __nanosleep alias.
2703         * Versions (GLIBC_2.2.6): Add __nanosleep.
2704         * bug-sleep.c: New file.
2705         * Makefile (tests): Add bug-sleep.
2707 2002-06-19  Steven Munroe  <sjmunroe@vnet.ibm.com>
2709         * Examples/ex9.c (main):  Use list of children and join them.
2710         (thread): Do not call exit.
2712 2002-06-20  Ulrich Drepper  <drepper@redhat.com>
2714         * spinlock.c (wait_node_alloc): We cannot use compare-and-exchange.
2715         Unconditionally use the code using spinlock.  Use __pthread_release
2716         to free a spinlock.
2717         (wait_node_free): Likewise.
2718         (__pthread_acquire, __pthread_release): Unconditionally define.
2720 2002-06-07  Jakub Jelinek  <jakub@redhat.com>
2722         * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Fix typo.
2724 2002-05-24  Ulrich Drepper  <drepper@redhat.com>
2726         * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Use __sync_synchronize.
2728 2002-05-21  Ulrich Drepper  <drepper@redhat.com>
2730         * sysdeps/pthread/pthread.h (pthread_create): Rename first
2731         parameter.
2732         (pthread_cancel): Likewise.
2733         * internals.h (__pthread_create_2_1): Likewise.
2734         * sysdeps/unix/sysv/linux/bits/sigthread.h (pthread_kill): Likewise.
2736 2002-05-20  Ulrich Drepper  <drepper@redhat.com>
2738         * sysdeps/alpha/pt-machine.c (THREAD_SELF): Remove clobber.
2739         Patch by Glen Nakamura <gen@flex.com>.
2741 2002-05-03  Ulrich Drepper  <drepper@redhat.com>
2743         * signals.c: Move sighandler functions to...
2744         * sighandler.c: ...here.  New file.
2745         * signals.c: Move signal handler related type definitions to...
2746         * internals.h: ...here.  Add prototypes for signal handlers.
2747         * Makefile (libpthread-routines): Add sighandler.
2748         (CFLAGS-sighandler.c): Add $(exceptions).
2750 2002-04-30  Jakub Jelinek  <jakub@redhat.com>
2752         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
2754 2002-04-08  Ulrich Drepper  <drepper@redhat.com>
2756         * sysdeps/pthread/timer_getoverr.c: Return real overrun.
2757         * sysdeps/pthread/posix-timer.h (struct timer_node): Add overrun_count.
2758         * sysdeps/pthread/timer_routines.c (thread_func): Schedule next timeout
2759         based on previous one and not on current time.  Count overruns.
2760         Patch by Eric F. Sorton <eric@cctcorp.com>.
2762         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add DELAYTIMER_MAX.
2764 2002-04-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
2766         * sysdeps/sh/pt-machine.h: Define _PT_MACHINE_H
2767         if it isn't defined yet.
2768         (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Defined.
2769         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
2770         Likewise.
2771         * sysdeps/sh/tls.h: New file.
2773 2002-04-08  Jakub Jelinek  <jakub@redhat.com>
2775         * manager.c (__pthread_manager_event): Use self instead of arg
2776         for INIT_THREAD_SELF.
2777         * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Use sizeof (struct
2778         _pthread_descr_struct) instead of sizeof (*descr).
2780 2002-04-05  Ulrich Drepper  <drepper@redhat.com>
2782         * sysdeps/ia64/pt-machine.h: Protect against multiple inclusion.
2783         * sysdeps/alpha/pt-machine.h: Likewise.
2784         * sysdeps/arm/pt-machine.h: Likewise.
2785         * sysdeps/cris/pt-machine.h: Likewise.
2786         * sysdeps/hppa/pt-machine.h: Likewise.
2787         * sysdeps/m68k/pt-machine.h: Likewise.
2788         * sysdeps/mips/pt-machine.h: Likewise.
2789         * sysdeps/powerpc/pt-machine.h: Likewise.
2790         * sysdeps/s390/s390-32/pt-machine.h: Likewise.
2791         * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2792         * sysdeps/sh/pt-machine.h: Likewise.
2793         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2794         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2795         * sysdeps/x86_64/pt-machine.h: Likewise.
2797 2002-04-05  Jakub Jelinek  <jakub@redhat.com>
2799         * man/pthread_mutexattr_init.man (pthread_mutexattr_settype): Document
2800         instead of pthread_mutexattr_setkind_np.
2801         (pthread_mutexattr_gettype): Similarly.
2802         * man/pthread_mutexattr_setkind_np.man: New.
2803         * man/Makefile (SOURCES): Add pthread_mutexattr_setkind_np.man.
2805 2002-04-02  Ulrich Drepper  <drepper@redhat.com>
2807         * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Define.
2809 2002-03-22  Jakub Jelinek  <jakub@redhat.com>
2811         * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Remove.
2813 2002-03-22  Ulrich Drepper  <drepper@redhat.com>
2815         * internals.h (MEMORY_BARRIER): Define as asm with memory as clobber.
2817 2002-03-17  Andreas Jaeger  <aj@suse.de>
2819         * sysdeps/i386/pt-machine.h: Add testandset and __compare_and_swap
2820         prototpyes.
2821         * sysdeps/alpha/pt-machine.h: Likewise.
2822         * sysdeps/arm/pt-machine.h: Likewise.
2823         * sysdeps/cris/pt-machine.h: Likewise.
2824         * sysdeps/hppa/pt-machine.h: Likewise.
2825         * sysdeps/i386/i686/pt-machine.h: Likewise.
2826         * sysdeps/ia64/pt-machine.h: Likewise.
2827         * sysdeps/m68k/pt-machine.h: Likewise.
2828         * sysdeps/mips/pt-machine.h: Likewise.
2829         * sysdeps/powerpc/pt-machine.h: Likewise.
2830         * sysdeps/s390/s390-32/pt-machine.h: Likewise.
2831         * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2832         * sysdeps/sh/pt-machine.h: Likewise.
2833         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2834         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2835         * sysdeps/x86_64/pt-machine.h: Likewise.
2837         * internals.h: Move testandset and __compare_and_swap prototypes
2838         to pt-machine.h.
2840 2002-03-03  Andreas Jaeger  <aj@suse.de>
2842         * errno.c: Include resolv.h to avoid warning.
2844 2002-02-27  Ulrich Drepper  <drepper@redhat.com>
2846         * pthread.c [USE_TLS] (thread_self_stack): Correct check for upper
2847         stack limit.
2849 2002-02-23  Ulrich Drepper  <drepper@redhat.com>
2851         * attr.c (pthread_getattr_np): Don't take thread descriptor size
2852         into account if USE_TLS.
2853         * manager.c (pthread_handle_create): Free TLS data structures if call
2854         failed.  Pass correct stack to clone if USE_TLS.
2855         * sysdeps/i386/pt-machine.h: Handle multiple inclusion.
2856         * sysdeps/i386/i686/pt-machine.h: Likewise.
2857         * sysdeps/i386/tls.h: Unconditionally include <pt-machine.h>.
2859         * descr.h (struct _pthread_descr_struct): Update p_header for TLS.
2860         Add p_stackaddr element #if USE_TLS.
2861         * internals.c: Include <tls.h>.
2862         * manager.c: Integrate creating and handling of thread descriptor
2863         for TLS.
2864         * pthread.c: Likewise.
2865         * sysdeps/i386/tls.h (tcbhead_t): Add self pointer.
2866         Include <linuxthreads/descr.h> only if TLS is really used.
2867         (GET_DTV): New macro.
2868         (TLS_INIT_TP): Initialize self pointer.
2870 2002-02-17  Andreas Schwab  <schwab@suse.de>
2872         * signals.c (sigwait): Check for old sighandler being SIG_ERR,
2873         not NULL.
2875 2002-02-12  Ulrich Drepper  <drepper@redhat.com>
2877         * sysdeps/i386/tls.c (INSTALL_NEW_DTV): Define.
2878         (INSTALL_DTV): Adjust for being passed pointer to element with length.
2880 2002-02-08  Ulrich Drepper  <drepper@redhat.com>
2882         * sysdeps/i386/tls.h (TLS_INIT_TP): Also initialize %gs.
2884 2002-02-08  Richard Henderson  <rth@redhat.com>
2886         * sysdeps/alpha/elf/pt-initfini.c: Use \n\ for multiline string.
2888 2002-02-08  Ulrich Drepper  <drepper@redhat.com>
2890         * sysdeps/i386/tls.h: TLS cannot be supported with FLOATING_STACKS
2891         after all.
2893 2002-02-07  H.J. Lu  <hjl@gnu.org>
2895         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Silence the
2896         gcc warning.
2897         (__pthread_spin_lock): Remove ".set noreorder".
2898         * sysdeps/mips/pt-machine.h (__compare_and_swap): Liekwise.
2900 2002-02-05  H.J. Lu  <hjl@gnu.org>
2902         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Not use
2903         branch likely.
2904         * sysdeps/mips/pt-machine.h (testandset): Likewise.
2905         (__compare_and_swap): Likewise.
2907 2002-02-07  Ulrich Drepper  <drepper@redhat.com>
2909         * internals.h: Move declarations/definitions of
2910         __pthread_initial_thread_bos, __pthread_initial_thread,
2911         __pthread_manager_thread_bos, __pthread_manager_thread_tos,
2912         __pthread_manager_thread, __pthread_nonstandard_stacks, STACK_SIZE,
2913         CURRENT_STACK_FRAME, __pthread_find_self, and thread_self...
2914         * descr.h: ...here.
2915         * sysdeps/i386/tls.h: Add TLS definitions also for !FLOATING_STACKS.
2916         Define THREAD_GETMEM accordingly.
2918 2002-02-06  Ulrich Drepper  <drepper@redhat.com>
2920         * sysdeps/i386/tls.h: Include <stddef.h> for size_t.
2922         * sysdeps/i386/tls.h: Define THREAD_DTV.
2924 2002-02-04  Ulrich Drepper  <drepper@redhat.com>
2926         * internals.h: Move thread descriptor definition...
2927         * descr.h.: ...here.  New file.
2928         * sysdeps/i386/tls.h: New file.
2930 2002-02-01  H.J. Lu  <hjl@gnu.org>
2932         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Use a
2933         different register in the delayed slot.  Use branch likely.
2935         * sysdeps/mips/pt-machine.h (testandset): Call _test_and_set.
2936         (__compare_and_swap): Return 0 only when failed to compare. Use
2937         branch likely.
2939 2002-02-01  Jakub Jelinek  <jakub@redhat.com>
2941         * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set,
2942         __pthread_kill_other_threads_np): Move to GLIBC_PRIVATE.
2943         * sysdeps/i386/i586/Versions: Move all symbols to GLIBC_PRIVATE.
2944         * sysdeps/i386/i686/Versions: Move all symbols to GLIBC_PRIVATE.
2945         * sysdeps/sparc/sparc32/sparcv9/Versions: New file.
2946         * sysdeps/sparc/sparc64/Versions: New file.
2947         * sysdeps/ia64/Versions: Move all symbols to GLIBC_PRIVATE.
2949 2002-01-31  Ulrich Drepper  <drepper@redhat.com>
2951         * pthread.c: _dl_cpuclock_offset is not any longer a global variable
2952         in SHARED code, use GL(dl_cpuclock_offset).
2954 2002-01-28  Andreas Jaeger  <aj@suse.de>
2956         * sysdeps/mips/pspinlock.c (__pthread_spin_init): Clear *LOCK to
2957         0. Patch by Machida Hiroyuki <machida@sm.sony.co.jp>.
2959 2002-01-16  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2961         * sysdeps/s390/s390-32/pt-machine.h (MEMORY_BARRIER): Define.
2962         (CURRENT_STACK_FRAME): Remove duplicate definition.
2963         * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2965 2002-01-14  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2967         * Makefile (CFLAGS-tst-cancel.c): Add -fno-inline-functions to prevent
2968         automatic inline.
2970 2002-01-12  Andreas Schwab  <schwab@suse.de>
2972         * Makefile (test-srcs): Add tst-signal.
2973         (tests): Run tst-signal.
2974         (distribute): Add tst-signal.sh.
2975         * tst-signal.c, tst-signal.sh: New files.
2977 2002-01-14  Andreas Jaeger  <aj@suse.de>
2979         * sysdeps/x86_64/pt-machine.h (INIT_THREAD_SELF): Avoid warning.
2981 2002-01-11  Andreas Schwab  <schwab@suse.de>
2983         * signals.c (sighandler): Initialize all elements to SIG_ERR.
2984         (__sigaction): Don't use value from sighandler if it is SIG_ERR.
2986 2002-01-06  Richard Henderson  <rth@redhat.com>
2988         * sysdeps/alpha/elf/pt-initfini.c: New file.
2990 2001-12-29  Andreas Jaeger  <aj@suse.de>
2992         * Examples/ex9.c: Add noreturn attribute for thread.
2993         * Examples/ex10.c: Likewise.
2994         * Examples/ex13.c (thread_start): Likewise.
2995         * Examples/ex15.c (worker): Likewise.
2997         * Examples/ex18.c: Include unistd.h for prototype of sleep.
2999 2001-12-14  Ulrich Drepper  <drepper@redhat.com>
3001         * man/pthread_atfork.man: Adjust description of mutex handling
3002         after fork for current implementation.
3003         * linuxthreads.texi: Likewise [PR libc/2519].
3005 2001-12-13  Andreas Schwab  <schwab@suse.de>
3007         * specific.c (pthread_key_delete): Don't contact the thread
3008         manager if no threads have been created yet.
3010 2001-12-12  NIIBE Yutaka  <gniibe@m17n.org>
3012         * sysdeps/sh/pt-machine.h (INIT_THREAD_SELF): Added __volatile__
3013         qualifier to be safe.
3015 2001-11-30  Andreas Schwab  <schwab@suse.de>
3017         * pthread.c (pthread_handle_sigcancel) [THREAD_SELF]: Double check
3018         that self is the manager thread, and initialize the thread
3019         register if not.
3020         (thread_self_stack) [THREAD_SELF]: New function to find self via
3021         stack pointer.
3022         * manager.c (pthread_handle_create): Don't block cancel signal any
3023         more.
3025 2001-11-29  Andreas Jaeger  <aj@suse.de>
3027         * sysdeps/x86_64/pt-machine.h: Use %gs as thread specific register.
3028         (THREAD_SELF): New.
3029         (INIT_THREAD_SELF): New.
3030         (THREAD_GETMEM): New.
3031         (THREAD_GETMEM_NC):
3032         (THREAD_SETMEM): New.
3033         (THREAD_SETMEM_NC): New.
3034         (FLOATING_STACKS): Define.
3035         (ARCH_STACK_MAX_SIZE): Define.
3037 2001-11-28  Kaz Kylheku  <kaz@ashi.footprints.net>
3039         Bugfix to pthread_key_delete. It was iterating over the thread
3040         manager's linked list of threads, behind the thread manager's
3041         back causing a race. The fix is to have the manager iterate over
3042         the threads instead, using a new request type for doing so.
3043         * internals.h (struct pthread_request): New manager request type
3044         REQ_FOR_EACH_THREAD.
3045         * manager.c (pthread_for_each_thread): New function.
3046         (__pthread_manager): Handle new REQ_FOR_EACH_THREAD request.
3047         * specific.c (struct pthread_key_delete_helper_args): New type.
3048         (pthread_key_delete_helper): New static function.
3049         (pthread_key_delete): Use the new thread manager
3050         REQ_FOR_EACH_THREAD function to iterate over the threads and set
3051         the delete key slot to a null value in each thread.
3052         * Examples/ex18.c: New test.
3053         * Makefile (tests): Add ex18.
3055 2001-11-22  Wolfram Gloger  <wg@malloc.de>
3057         * pthread.c (pthread_onexit_process): Don't call free
3058         after threads have been asynchronously terminated.
3060         * manager.c (pthread_handle_exit): Surround cancellation
3061         of threads with __flockfilelist()/__funlockfilelist().
3063 2001-11-26  Andreas Schwab  <schwab@suse.de>
3065         * manager.c (pthread_handle_create): Start the child thread with
3066         the cancel signal blocked, so that it does not handle it before
3067         the thread register is set up.  Save errno from failed clone call.
3069 2001-11-15  Ulrich Drepper  <drepper@redhat.com>
3071         * sysdeps/i386/i686/Implies: Removed.
3072         * sysdeps/i386/i686/Versions: New file.
3074 2001-10-31  Andreas Jaeger  <aj@suse.de>
3076         * sysdeps/x86_64/Makefile: Remove, we do not need it anymore.
3078 2001-10-05  Kevin Buettner  <kevinb@cygnus.com>
3080         * pthread.c (__linuxthread_pthread_sizeof_descr): Change name
3081         to __linuxthreads_pthread_sizeof_descr to match name used by
3082         symbol_list_arr[LINUXTHREADS_PTHREAD_SIZEOF_DESCR] in
3083         linuxthreads_db/td_symbol_list.c.
3085 2001-09-22  Andreas Jaeger  <aj@suse.de>
3087         * linuxthreads/tst-context.c: Avoid compile warning.
3089 2001-09-20  Andreas Jaeger  <aj@suse.de>
3091         * shlib-versions: Add x86-64.
3093 2001-09-19  Andreas Jaeger  <aj@suse.de>
3095         * sysdeps/x86_64/Makefile: New file.
3096         * sysdeps/x86_64/pspinlock.c: New file.
3097         * sysdeps/x86_64/pt-machine.h: New file.
3099 2001-09-12  Jakub Jelinek  <jakub@redhat.com>
3101         * sysdeps/pthread/timer_delete.c (timer_delete): Thread may be NULL
3102         for SIGEV_NONE.
3103         * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
3105 2001-09-11  Ulrich Drepper  <drepper@redhat.com>
3106             Wolfram Gloger <wg@malloc.de>
3108         * join.c: Protect all communications from and to manager with
3109         TEMP_FAILURE_RETRY.
3110         * manager.c: Likewise.
3111         * pthread.c: Likewise.
3112         * smeaphore.c: Likewise.
3114 2001-08-29  Ulrich Drepper  <drepper@redhat.com>
3116         * spinlock.c (__pthread_lock): Top max_count value with
3117         MAX_ADAPTIVE_SPIN_COUNT.
3118         * internals.h (MAX_ADAPTIVE_SPIN_COUNT): Define if not already done.
3120         * sysdeps/i386/i686/pt-machine.h (BUSY_WAIT_NOP): New macro to
3121         help P4.
3123 2001-08-27  Jakub Jelinek  <jakub@redhat.com>
3125         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_t): Only define to
3126         non-opaque type if __USE_UNIX98.
3128 2001-08-26  Jakub Jelinek  <jakub@redhat.com>
3130         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_t): Define
3131         non-opaque lock types also if _IO_MTSAFE_IO is defined.
3133 2001-08-23  Roland McGrath  <roland@frob.com>
3135         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start): Take
3136         new first argument, skip the cleanup handler if it's zero.
3137         (_LIBC_LOCK_RECURSIVE_INITIALIZER): New macro.
3138         (__libc_lock_define_initialized_recursive): Use it.
3139         * sysdeps/pthread/bits/stdio-lock.h: File removed.
3140         The sysdeps/generic file from the main tree now suffices.
3142 2001-08-22  Roland McGrath  <roland@frob.com>
3144         * sysdeps/pthread/bits/stdio-lock.h: Include <bits/libc-lock.h>
3145         instead of <pthread.h>.
3146         (_IO_lock_t): Define this typedef using __libc_lock_define_recursive.
3147         (_IO_lock_initializer): Add braces.
3148         (_IO_lock_lock): Use __libc_lock_lock_recursive.
3149         (_IO_lock_unlock): Use __libc_lock_unlock_recursive.
3151         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_recursive_t): New type.
3152         (__libc_lock_define_initialized_recursive): Use it.
3153         (__libc_lock_init_recursive): Likewise.
3154         (__libc_lock_fini_recursive): Likewise.
3155         (__libc_lock_lock_recursive): Likewise.
3156         (__libc_lock_trylock_recursive): Likewise.
3157         (__libc_lock_unlock_recursive): Likewise.
3158         (__libc_lock_define_recursive): New macro.
3160 2001-08-14  Jakub Jelinek  <jakub@redhat.com>
3162         * lockfile.c (__pthread_provide_lockfile): New variable.
3163         * pthread.c (__pthread_require_lockfile): New variable.
3164         * cancel.c (__pthread_require_lockfile): New variable.
3166 2001-07-31  Ulrich Drepper  <drepper@redhat.com>
3168         * tst-context.c (threadfct): Initialize context before calling
3169         makecontext.
3171         * Examples/ex17.c: Make sure test thread is around long enough.
3173 2001-07-26  kaz Kojima  <kkojima@rr.iij4u.or.jp>
3175         * sysdeps/sh/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF): Defined.
3177 2001-07-24  Ulrich Drepper  <drepper@redhat.com>
3179         * tst-context.c (main): Print explanation before bailing out
3180         because context handling is not supported.
3182 2001-07-23  Ulrich Drepper  <drepper@redhat.com>
3184         * Makefile (tests): Add tst-context.
3185         * tst-context.c: New file.
3187         * sysdeps/pthread/bits/stdio-lock.h: Define
3188         _IO_cleanup_region_start_noarg.
3190 2001-07-23  Jakub Jelinek  <jakub@redhat.com>
3192         * sysdeps/alpha/pt-machine.h (FLOATING_STACKS): Define.
3193         (ARCH_STACK_MAX_SIZE): Define.
3194         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
3195         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3197 2001-07-19  Jakub Jelinek  <jakub@redhat.com>
3199         * sysdeps/i386/useldt.h: Fix typo in ARCH_STACK_MAX_SIZE comment.
3201         * sysdeps/ia64/pt-machine.h (FLOATING_STACKS): Define.
3202         (ARCH_STACK_MAX_SIZE): Define.
3203         * manager.c (pthread_allocate_stack): Handle FLOATING_STACKS with
3204         NEED_SEPARATE_REGISTER_STACK.
3206 2001-07-16  Andreas Schwab  <schwab@suse.de>
3208         * Makefile (before-compile): Don't add $(objpfx)crti.o.
3209         (omit-deps): Add crti.
3210         ($(objpfx)libpthread.so): Depend on $(objpfx)crti.o, but make sure
3211         it is filtered out of the link command.
3213 2001-07-16  Ulrich Drepper  <drepper@redhat.com>
3215         * pthread.c (pthread_initialize): For FLOATING_STACKS don't bother
3216         to find the right value for __pthread_initial_thread_bos, it's not
3217         used.  If not FLOATING_STACKS first run
3218         __pthread_init_max_stacksize.
3220 2001-06-16  H.J. Lu  <hjl@gnu.org>
3222         * internals.h: Include <stackinfo.h>.
3224         * attr.c: Don't include <stackinfo.h> here.
3225         * cancel.c: Likewise.
3226         * manager.c: Likewise.
3227         * pthread.c: Likewise.
3228         * ptlongjmp.c: Likewise.
3230 2001-03-23  Matthew Wilcox  <willy@ldl.fc.hp.com>
3232         * attr.c: Make _STACK_GROWS_UP work.
3233         * internals.h: Likewise.
3234         * manager.c: Likewise.
3235         * pthread.c: Likewise.
3237 2001-06-15  H.J. Lu  <hjl@gnu.org>
3239         * pthread.c (__pthread_reset_main_thread): Fix a typo.
3241 2001-02-02  John S. Marvin  <jsm@udlkern.fc.hp.com>
3243         * semaphore.h: Use struct _pthread_fastlock as an element of
3244         sem_t instead of an identical struct.
3245         * rwlock.c: Remove casts.
3246         * semaphore.c: Likewise.
3248 2001-04-30  Alan Modra  <amodra@one.net.au>
3250         * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: New.
3252 2001-05-25  Bruce Mitchener  <bruce@cubik.org>
3254         * linuxthreads.texi: Spelling corrections.
3256 2001-05-25  Ulrich Drepper  <drepper@redhat.com>
3258         * oldsemaphore.c (__old_sem_wait): Clear p_nextwaiting before
3259         returning successfully.
3260         Patch by Gene Cooperman <gene@ccs.neu.edu>.
3262 2001-05-24  Ulrich Drepper  <drepper@redhat.com>
3264         * spinlock.c (__pthread_lock) [HAS_COMPARE_AND_SWAP]: Before doing any
3265         serious work try once whether the lock is uncontested.
3266         Remove duplicate reading of __status before loop.
3267         Change suggested by Hans Boehm <hans_boehm@hp.com>.
3269         * spinlock.h (__pthread_trylock): Remove need for oldstatus variable.
3270         (__pthread_alt_trylock): Likewise.
3272 2001-05-01  Kaz Kylheku  <kaz@ashi.footprints.net>
3274         Memory barrier overhaul following line by line inspection.
3275         * mutex.c (pthread_once): Missing memory barriers added.
3276         * pthread.c (__pthread_wait_for_restart_signal,
3277         __pthread_timedsuspend_new, __pthread_restart_new): Added
3278         memory barriers ``just in case'' and for documentary value.
3279         * spinlock.c (__pthread_release): New inline function for releasing
3280         spinlock, to complement __pthread_acquire.  Includes memory
3281         barrier prior to assignment to spinlock, and __asm __volatile
3282         dance to prevent reordering or optimization of the spinlock access.
3283         * spinlock.c (__pthread_unlock, __pthread_alt_lock,
3284         __pthread_alt_timedlock, __pthread_alt_unlock,
3285         __pthread_compare_and_swap): Updated to use new __pthread_release
3286         instead of updating spinlock directly.
3287         * spinlock.c (__pthread_lock, __pthread_unlock, wait_node_alloc,
3288         wait_node_free, wait_node_dequeue, __pthread_alt_lock,
3289         __pthread_alt_timedlock, __pthread_alt_unlock, __pthread_acquire):
3290         Memory barrier overhaul.  Lots of missing memory barriers added,
3291         a couple needless ones removed.
3292         * spinlock.c (__pthread_compare_and_swap): testandset optimization
3293         removed, just calls __pthread_acquire, which has the new read
3294         barrier in it before its testandset.
3296 2001-05-20  Roland McGrath  <roland@frob.com>
3298         * Makeconfig: New file, variables used to be in main libc Makeconfig.
3300 2001-05-09  Geoff Keating  <geoffk@redhat.com>
3302         * sysdeps/powerpc/pt-machine.h
3303         (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): Define.
3304         (__compare_and_swap): Remove memory barriers.
3305         (__compare_and_swap_with_release_semantics): New function.
3307 2001-04-24  Andreas Jaeger  <aj@suse.de>
3309         * wrapsyscall.c: send* and recv* return ssize_t.
3311         * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Unlock the
3312         mutex instead of double locking it.
3313         Reported by Pierre Artaud <partaud@sodatec.com>.
3315 2001-04-23  Ulrich Drepper  <drepper@redhat.com>
3317         * sysdeps/pthread/getcpuclockid.c: Make function generic, test
3318         using #ifdef whether the clock is available.
3319         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: Removed.
3321         * sysdeps/ia64/Versions: New file.
3323         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init): We don't
3324         have to call __gmon_start__ in the libpthread DSO.
3325         * sysdeps/pthread/pt-initfini.c (_init): Likewise.
3327         * Makefile (libpthread-routines): Add ptclock_gettime and
3328         ptclock_settime.
3329         * internals.h: Don't use cpuclock-init.h definitions, use
3330         hp-timing.h definitions.
3331         * pthread.c: Likewise.
3332         * manager.c: Likewise.
3333         * ptclock_gettime.c: New file.
3334         * ptclock_settime.c: New file.
3335         * internals.h: Fix parameter type for __pthread_clock_gettime and
3336         __pthread_clock_settime.
3338         * sysdeps/i386/i586/ptclock_gettime.c: Removed.
3339         * sysdeps/i386/i586/ptclock_settime.c: Removed.
3340         * sysdeps/i386/i586/Makefile: Removed.
3342 2001-04-22  Ulrich Drepper  <drepper@redhat.com>
3344         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_ASYNCH_IO.
3345         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3347 2001-04-21  Andreas Jaeger  <aj@suse.de>
3349         * sysdeps/pthread/timer_routines.c (thread_func): Add noreturn
3350         attribute, remove statements that will never be executed.
3351         (thread_func): Remove mutex_unlock call since it's never executed.
3352         (thread_func): Fix comment as suggested by Jakub Jelinek.
3354         * manager.c (__pthread_manager): Add noreturn
3355         attribute.
3356         (pthread_start_thread): Likewise, remove return statement.
3357         (pthread_start_thread_event): Likewise.
3358         Add noreturn attribute for pthread_handle_exit.
3359         * weaks.c: Add noreturn attribute for pthread_exit.
3361         * internals.h: Add __pthread_clock_gettime and
3362         __pthread_clock_settime prototypes.
3364 2001-04-21  Ulrich Drepper  <drepper@redhat.com>
3366         * internals.h: Include <cpuclock-init.h>.
3367         (struct _pthread_descr_struct): Add p_cpuclock_offset field if
3368         CPUCLOCK_VARDEF is defined.
3369         * pthread.c (__pthread_initialize_minimal): Initialize
3370         p_cpuclock_offset field for main thread if CPUCLOCK_INIT is defined.
3371         * manager.c (pthread_start_thread): Set p_cpuclock_offset field
3372         for new thread to current CPU clock value.
3374         * sysdeps/i386/useldt.h: Extend all the macros to handle 8-byte values.
3376         * sysdeps/i386/i586/Makefile: New file.
3377         * sysdeps/i386/i586/Versions: New file.
3378         * sysdeps/i386/i586/ptclock_gettime.c: New file.
3379         * sysdeps/i386/i586/ptclock_settime.c: New file.
3380         * sysdeps/i386/i686/Implies: New file.
3382 2001-04-18  Jakub Jelinek  <jakub@redhat.com>
3384         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Put specs into
3385         $generated, not $postclean-generated.
3387 2001-04-18  Andreas Jaeger  <aj@suse.de>
3389         * Makefile (otherlibs): Added.
3391 2001-04-18  Jakub Jelinek  <jakub@redhat.com>
3393         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
3395 2001-04-16  Ulrich Drepper  <drepper@redhat.com>
3397         * signals.c (sigwait): NSIG is no signal number.  Block all
3398         signals while in signal handler for signals in SET.
3399         Patch by Manfred Spraul <manfred@colorfullife.com>.
3401 2001-04-12  Ulrich Drepper  <drepper@redhat.com>
3403         * tst-cancel.c: Disable most tests.  Add new test where all
3404         cleanup handlers must run.
3405         * Makefile (tests): Add tst-cancel again.
3407         * cancel.c (__pthread_perform_cleanup): Correct condition for
3408         leaving cleanup loop early.
3410         * sysdeps/i386/Makefile: Make sure gcc uses a frame pointer for
3411         all the files which use CURRENT_STACK_FRAME.
3412         * sysdeps/i386/pt-machine.h (CURRENT_STACK_FRAME): Define using
3413         __builtin_frame_address.
3414         * sysdeps/i386/i686/pt-machine.h: Likewise.
3416 2001-04-11  Ulrich Drepper  <drepper@redhat.com>
3418         * Makefile (tests): Comment out tst-cancel for now.
3420         * tst-cancel.c (main): Cleanup 4 is supposed to run.  Create
3421         temporary file in object directory.
3422         * Makefile: Don't allow inlining when compiling tst-cancel.c.
3423         Pass $(objpfx) to tst-cancel.
3425 2001-04-11  David S. Miller  <davem@redhat.com>
3427         * sysdeps/sparc/sparc32/pt-machine.h (stack_pointer): Advance
3428         up closer to user local variables so that new cleanup heuristics work.
3429         * sysdeps/sparc/sparc64/pt-machine.h (stack_pointer): Likewise.
3431 2001-04-11  Ulrich Drepper  <drepper@redhat.com>
3433         * cancel.c (_pthread_cleanup_push): Catch invalid __prev buffer
3434         and remove it.
3435         (_pthread_cleanup_push_defer): Likewise.
3437         * tst-cancel.c (main): Fix loop printing cleanup output.
3439 2001-04-10  kaz Kojima  <kkojima@rr.iij4u.or.jp>
3441         * sysdeps/sh/pspinlock.c (__pthread_spin_lock): Fix a reverse
3442         test.
3443         (__pthread_spin_trylock): Likewise.
3444         * sysdeps/sh/pt-machine.h (testandset): Likewise.
3446 2001-04-10  Ulrich Drepper  <drepper@redhat.com>
3448         * join.c (pthread_exit): Move code to new function __pthread_do_exit
3449         which takes an extra parameter with the current frame pointer.
3450         Call new function with CURRENT_STACK_FRAME.
3451         (__pthread_do_exit): New function.  Call __pthread_perform_cleanup
3452         with the new parameter.
3453         (pthread_join): Call __pthread_do_exit instead of pthread_exit.
3454         * cancel.c (__pthread_perform_cleanup): Takes extra parameter.  Use
3455         this parameter as the initial value the cleanup handler records are
3456         compared against.  No active cleanup handler record must have an
3457         address lower than the previous one and the initial record must be
3458         above (below on PA) the frame address passed in.
3459         (pthread_setcancelstate): Call __pthread_do_exit instead of
3460         pthread_exit.
3461         (pthread_setcanceltype): Likewise.
3462         (pthread_testcancel): Likewise.
3463         (_pthread_cleanup_pop_restore): Likewise.
3464         * condvar.c (pthread_cond_wait): Likewise.
3465         (pthread_cond_timedwait_relative): Likewise.
3466         * manager.c (pthread_start_thread): Likewise.
3467         * oldsemaphore.c (__old_sem_wait): Likewise.
3468         * pthread.c (pthread_handle_sigcancel): Likewise.
3469         * semaphore.c (__new_sem_wait): Likewise.
3470         (sem_timedwait): Likewise.
3471         * ptlongjmp.c (pthread_cleanup_upto): Also use current stack frame
3472         to limit the cleanup handlers which get run.
3473         * internals.h: Add prototype for __pthread_do_exit.  Adjust prototype
3474         for __pthread_perform_cleanup.
3476         * Makefile (tests): Add tst-cancel.
3477         * tst-cancel.c: New file.
3479 2001-04-08  Hans-Peter Nilsson  <hp@axis.com>
3481         * sysdeps/cris/pt-machine.h: New file.
3482         * sysdeps/cris/pspinlock.c: New file.
3484 2001-04-09  Hans-Peter Nilsson  <hp@axis.com>
3486         * shlib-versions: Add case for Linux on CRIS.
3488 2001-03-26  Ulrich Drepper  <drepper@redhat.com>
3490         * attr.c (pthread_getattr_np): Correct computation of stack size
3491         for machiens with register stack.
3493         * Examples/ex17.c (main): Correct detection of failed mmap call.
3495 2001-03-21  Jakub Jelinek  <jakub@redhat.com>
3497         * pthread.c (__pthread_initialize_manager): Fix a typo.
3499 2001-03-21  Jakub Jelinek  <jakub@redhat.com>
3501         * attr.c (__pthread_attr_setstack): Fix alignment check.
3502         (pthread_getattr_np): __stackaddr is top of stack, not bottom.
3503         * Makefile (tests): Add ex17 test.
3504         * Examples/ex17.c: New test.
3506 2001-03-20  Ulrich Drepper  <drepper@redhat.com>
3508         * Makefile: Define -D_RPC_THREAD_SAFE_ for cancel.c.
3509         * cancel.c (__pthread_perform_cleanup): Call __rpc_thread_destroy.
3510         * sysdeps/pthread/bits/libc-tsd.h: Define _LIBC_TSD_KEY_VARS.
3512 2001-03-18  Ulrich Drepper  <drepper@redhat.com>
3514         * Makefile: When generating DSO link with libc_nonshared.a.
3516 2001-02-26  Jakub Jelinek  <jakub@redhat.com>
3518         * signals.c (pthread_sighandler): Use CALL_SIGHANDLER.
3520 2001-02-23  Jakub Jelinek  <jakub@redhat.com>
3522         * internals.h (__pthread_init_max_stacksize): New prototype.
3523         * attr.c (__pthread_attr_setstacksize): Call
3524         __pthread_init_max_stacksize if not yet initialized.
3525         * pthread.c (__pthread_init_max_stacksize): New function.
3526         (__pthread_initialize_manager): Call it.
3527         Patch by <dtc@cmucl.cons.org>.
3529 2001-03-16  Ulrich Drepper  <drepper@redhat.com>
3531         * attr.c (pthread_getattr_np): Fix __stacksize computation for IA-64.
3533 2001-03-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3535         * shlib-versions: Add rule for Linux on 64 bit S/390.
3536         * sysdeps/s390/s390-64/pt-machine.h: New file.
3537         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
3539 2001-03-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3541         * sysdeps/s390/pt-machine.h: Move to...
3542         * sysdeps/s390/s390-32/pt-machine.h: ...here.
3543         Add defines for FLOATING_STACK and ARCH_STACK_MAX_SIZE.
3545 2001-03-15  Ulrich Drepper  <drepper@redhat.com>
3547         * Versions [libpthread] (GLIBC_2.2.3): Add pthread_getattr_np.
3548         * attr.c: Implement pthread_getattr_np.
3549         * sysdeps/pthread/pthread.h: Add prototype for pthread_getattr_np.
3550         * internals.h (struct _pthread_descr_struct): Add p_inheritsched.
3551         * manager.c (pthread_handle_create): Initialize p_inheritsched.
3553 2001-03-09  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3555         * sysdeps/unix/sysv/linux/s390/pt-initfini.c: Use 0x07 padding for
3556         code alignment.
3558 2001-02-20  Hans Boehm  <hans_boehm@hp.com>
3560         * manager.c (manager_mask): Removed static vesion.  Now always local
3561         to __pthread_manager().
3562         (manager_mask_all): Removed completely.
3563         (__pthread_manager): Remove manager_mask_all initialization.
3564         (pthread_handle_create): Remove code to set and reset signal mask
3565         around __clone2() calls.
3567 2001-02-17  Jakub Jelinek  <jakub@redhat.com>
3569         * spinlock.c (__pthread_lock): Force lock->__status to be read from
3570         memory on every spin.
3572 2001-02-10  Andreas Jaeger  <aj@suse.de>
3574         * Makefile (extra-objs): New.
3576 2001-02-09  Jakub Jelinek  <jakub@redhat.com>
3578         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add
3579         __pthread_initialize_minimal prototype.
3581 2001-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
3583         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
3585 2001-02-06  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3587         * sysdeps/unix/sysv/linux/s390/pt-initfini.c: New file.
3589 2001-02-06  Ulrich Drepper  <drepper@redhat.com>
3591         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the
3592         broken code.  Patch by Jes Sorensen.
3594 2001-02-06  Andreas Jaeger  <aj@suse.de>
3596         * sysdeps/pthread/pthread.h: Move __pthread_initialize from here
3597         to...
3598         * internals.h: ...here.
3600 2001-02-05  Jes Sorensen  <jes@linuxcare.com>
3602         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
3604 2001-02-02  Ulrich Drepper  <drepper@redhat.com>
3606         * Versions: Remove __pthread_initialize_minimal.
3608 2001-02-01  Ulrich Drepper  <drepper@redhat.com>
3610         * Makefile: Add rules to build crti.o and make it being used in
3611         building libpthread.so.
3612         * sysdeps/i386/Makefile: New file.
3613         * sysdeps/pthread/pt-initfini.c: New file.
3615         * pthread.c: Cleanups.
3617 2001-01-28  Andreas Jaeger  <aj@suse.de>
3619         * oldsemaphore.c (__old_sem_init): Adjust for last change.
3620         * sysdeps/pthread/bits/libc-lock.h: Likewise.
3621         * spinlock.c: Likewise.
3623 2001-01-28  Ulrich Drepper  <drepper@redhat.com>
3625         * sysdeps/pthread/bits/initspin.h: Make all names namespace clean.
3626         * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
3627         * manager.c: Adjust for namespace cleanup in bits/initspin.h.
3628         * pthread.c: Likewise.
3629         * spinlock.h: Likewise.
3630         * sysdeps/pthread/pthread.h: Likewise.
3632 2001-01-26  Ulrich Drepper  <drepper@redhat.com>
3634         * sysdeps/pthread/bits/pthreadtypes.h: Define pthread_attr_t also
3635         as struct __pthread_attr_s.
3637         * semaphore.h (sem_t): Cleanup namespace, rename status and
3638         spinlock elements.
3640 2001-01-13  Jakub Jelinek  <jakub@redhat.com>
3642         * pthread.c (pthread_onexit_process): Clear
3643         __pthread_manager_thread_bos after freeing it.
3644         * Makefile (tests): Add ex16.
3645         * Examples/ex16.c: New file.
3647 2001-01-11  Jakub Jelinek  <jakub@redhat.com>
3649         * Makefile (CFLAGS-pthread.c): Pass -DHAVE_Z_NODELETE if ld supports
3650         -z nodelete.
3651         * pthread.c (pthread_exit_process): Rename to...
3652         (pthread_onexit_process): ...this.
3653         (pthread_atexit_process, pthread_atexit_retcode): New.
3654         (pthread_initialize): Call __cxa_atexit instead of __cxa_on_exit
3655         and only if HAVE_Z_NODELETE is not defined.
3656         (__pthread_initialize_manager): Register pthread_atexit_retcode
3657         with __cxa_atexit.
3659 2001-01-11  Ulrich Drepper  <drepper@redhat.com>
3661         * pthread.c (pthread_initialize): Use __cxs_on_exit not __cxa_atexit.
3663 2001-01-11  Jakub Jelinek  <jakub@redhat.com>
3665         * Makefile (tests): Add ex15.
3666         * Examples/ex15.c: New test.
3668 2001-01-08  Ulrich Drepper  <drepper@redhat.com>
3670         * pthread.c (pthread_exit_process): Free memory allocated for
3671         manager stack.
3673 2000-12-31  Ulrich Drepper  <drepper@redhat.com>
3675         * manager.c (pthread_alloca_stack): Remove MAP_FIXED from mmap calls.
3676         (pthread_free): Always unmap the stack.  It's safe now that we don't
3677         use MAP_FIXED to allocate stacks.
3679 2000-12-31  Ulrich Drepper  <drepper@redhat.com>
3681         * sysdeps/powerpc/pspinlock.c: Don't include pt-machine.h here.
3683         * manager.c (pthread_allocate_stack): Prepare for removal of MAP_FIXED.
3685 2000-11-15  Wolfram Gloger  <wg@malloc.de>
3687         * manager.c (pthread_free): [!FLOATING_STACKS]: Only remap the
3688         stack to PROT_NONE, don't unmap it, avoiding collisions with malloc.
3690 2000-12-27  Andreas Jaeger  <aj@suse.de>
3692         * Examples/ex13.c: Make local functions static.
3693         * ecmutex.c: Likewise.
3694         * joinrace.c: Likewise.
3695         * Examples/ex14.c: Likewise.
3697         * Examples/ex2.c: Make local functions static; reformat.
3698         * Examples/ex1.c: Likewise.
3699         * Examples/ex4.c: Likewise.
3700         * Examples/ex5.c: Likewise.
3701         * Examples/ex7.c: Likewise.
3703         * oldsemaphore.c: Add prototypes to shut up GCC.
3704         * pt-machine.c: Likewise.
3706         * weaks.c: Add prototype for pthread_exit.
3708         * internals.h: Add some prototypes, format prototypes and add
3709         missing externs.
3710         Move __libc_waitpid prototype to include/sys/wait.h.
3712         * rwlock.c: Include <bits/libc-lock.h> for prototypes.
3713         * mutex.c: Likewise.
3714         * specific.c: Likewise.
3715         * ptfork.c: Likewise.
3717         * lockfile.c: Include internals.h to get prototypes.
3718         * events.c: Likewise.
3719         * sysdeps/alpha/pspinlock.c: Likewise.
3720         * sysdeps/arm/pspinlock.c: Likewise.
3721         * sysdeps/hppa/pspinlock.c: Likewise.
3722         * sysdeps/i386/pspinlock.c: Likewise.
3723         * sysdeps/ia64/pspinlock.c: Likewise.
3724         * sysdeps/m68k/pspinlock.c: Likewise.
3725         * sysdeps/mips/pspinlock.c: Likewise.
3726         * sysdeps/powerpc/pspinlock.c: Likewise.
3727         * sysdeps/s390/pspinlock.c: Likewise.
3728         * sysdeps/sh/pspinlock.c: Likewise.
3729         * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
3730         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
3731         * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
3733 2000-12-27  Ulrich Drepper  <drepper@redhat.com>
3735         * attr.c (__pthread_attr_setstack): Fix setting of __stackaddr element.
3736         (__pthread_attr_getstack): Return correct address.
3737         Add warnings for using pthread_attr_getstackaddr and
3738         pthread_attr_setstackaddr.
3740 2000-12-26  Ulrich Drepper  <drepper@redhat.com>
3742         * Examples/ex6.c (test_thread): Make static.
3743         * Examples/ex12.c (test_thread): Make static and add noreturn
3744         attribute.
3746 2000-12-18  Jes Sorensen  <jes@linuxcare.com>
3748         * linuxthreads/sysdeps/ia64/pt-machine.h: __compare_and_swap
3749         and compare_and_swap_with_release_semantics returns int not long.
3751 2000-12-17  Andreas Jaeger  <aj@suse.de>
3753         * sysdeps/s390/pt-machine.h (testandset): Use long int as return
3754         value.
3755         * sysdeps/arm/pt-machine.h (testandset): Likewise.
3756         * sysdeps/hppa/pt-machine.h (testandset): Likewise.
3757         * sysdeps/m68k/pt-machine.h (testandset): Likewise.
3758         * sysdeps/sh/pt-machine.h (testandset): Likewise.
3759         * sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise.
3760         * sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise.
3762 2000-12-17  Ulrich Drepper  <drepper@redhat.com>
3764         * sysdeps/i386/pt-machine.h (testandset): Adjust for prototype change.
3765         * sysdeps/i386/i686/pt-machine.h (testandset): Likewise.
3767 2000-12-17  Andreas Jaeger  <aj@suse.de>
3769         * internals.h: Add prototypes for testandset and
3770         __compare_and_swap to shut up gcc warnings.
3772 2000-12-06  Wolfram Gloger  <wg@malloc.de>
3774         * join.c (pthread_detach): Allow case where the thread has already
3775         terminated.
3777 2000-12-05  Andreas Jaeger  <aj@suse.de>
3779         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't set mips2.
3780         * sysdeps/mips/pt-machine.h (testandset): Likewise.
3781         (__compare_and_swap): Likewise.
3782         Patches by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
3784 2000-11-20  Jakub Jelinek  <jakub@redhat.com>
3786         * Examples/ex3.c (main): Cast int to long before casting to void *.
3787         (search): Cast void * to long, not int.
3788         * Examples/ex8.c (main, thread): Similarly.
3789         * Examples/ex11.c (main): Similarly.
3790         * Examples/ex14.c (worker, do_test): Similarly.
3791         * ecmutex.c (worker, do_test): Similarly.
3792         (nlocks): Cast to int.
3794 2000-11-08  Bruce Mitchener  <bruce@cubik.org>
3796         * linuxthreads.texi:  Add documentation for pthreads attributes
3797         guardsize, stackaddr, stacksize, and stack.  Fix typo in previous
3798         patch.  Document pthread_[sg]etconcurrency().  Mark
3799         pthread_mutexattr_[sg]ettype() as POSIX rather than GNU.
3801 2000-11-07  Ulrich Drepper  <drepper@redhat.com>
3803         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
3804         Don't define it.
3805         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3806         Reported by Christopher Yeoh <cyeoh@linuxcare.com.au>.
3808 2000-11-06  Ulrich Drepper  <drepper@redhat.com>
3810         * cancel.c (pthread_cancel): Always set p_canceled, even if we are
3811         not doing it right now.
3812         Reported by Kaz Kylheku <kaz@ashi.footprints.net>.
3814 2000-10-30  Ulrich Drepper  <drepper@redhat.com>
3816         * Examples/ex4.c (main): Don't use exit() to avoid warning with
3817         broken compilers.
3819 2000-10-29  Ulrich Drepper  <drepper@redhat.com>
3821         * attr.c (__pthread_attr_setguardsize): Don't round guardsize
3822         here.  Reported by Bruce Mitchener <bruce@cubik.org>.
3824         * linuxthreads.texi: Changes terminology to 'type' from 'kind' when
3825         discussing mutexes. (As per the Unix98 name for the API.)
3826         Changes documentation for pthread_mutexattr_setkind_np() and
3827         pthread_mutexattr_getkind_np() over to the Unix98 APIs for the
3828         same: pthread_mutexattr_settype() and pthread_mutexattr_gettype().
3829         Changes references to PTHREAD_MUTEXATTR_FAST_NP to
3830         PTHREAD_MUTEXATTR_ADAPTIVE_NP.
3831         Begins to introduce discussion of the ``timed'' mutex type.  This
3832         discussion is currently incomplete.
3833         Patch by Bruce Mitchener <bruce@cubik.org>.
3835 2000-10-26  Kazumoto Kojima  <kkojima@rr.iij4u.or.jp>
3836             Yutaka Niibe  <gniibe@chroot.org>
3838         * sysdeps/sh/pt-machine.h (testandset): Since the operand of TAS.B
3839         has restrictions, use register.
3841 2000-10-23  Andreas Schwab  <schwab@suse.de>
3843         * Examples/ex14.c (TIMEOUT): Override default timeout.
3845 2000-10-16  Ulrich Drepper  <drepper@redhat.com>
3847         * specific.c: Protect tsd array modification in thread data
3848         structures by getting the thread lock in pthread_key_delete and
3849         __pthread_destroy_specifics.
3850         Patch by Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>.
3852 2000-10-12  Alan Modra <alan@linuxcare.com.au>
3854         * sysdeps/pthread/bits/initspin.h: New file.
3855         * spinlock.h: Move LOCK_INITIALIZER definition to <bits/initspin.h>.
3856         (__pthread_init_lock): Initialize lock with LT_SPINLOCK_INIT.
3857         (__pthread_alt_init_lock): Likewise.
3858         (__pthread_alt_trylock): Release lock with LT_SPINLOCK_INIT.
3860 2000-10-12  David Huggins-Daines  <dhd@linuxcare.com>
3862         * oldsemaphore.c (__old_sem_init): Release lock with
3863         LT_SPINLOCK_INIT, not zero.
3864         * spinlock.c (__pthread_unlock): Likewise.
3865         (__pthread_alt_lock): Likewise.
3866         (__pthread_alt_timedlock): Likewise.
3867         (__pthread_alt_unlock): Likewise.
3868         * sysdeps/pthread/bits/libc-lock.h: Initialize locks with
3869         LT_SPINLOCK_INIT if it is non-zero.  Likewise for init-once flags.
3870         * sysdeps/pthread/pthread.h: Include bits/initspin.h.  Use
3871         LT_SPINLOCK_INIT do initialize spinlocks not 0.
3873 2000-10-12  David Huggins-Daines <dhd@linuxcare.com>
3875         * shlib-versions: Add version definitions for hppa-linux.
3877 2000-10-12  Alan Modra <alan@linuxcare.com.au>
3879         * sysdeps/hppa/pspinlock.c: New file.
3880         * sysdeps/hppa/pt-machine.h: New file.
3881         * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: New file.
3883 2000-10-05  Jakub Jelinek  <jakub@redhat.com>
3885         * mutex.c (__pthread_mutex_destroy): Correct test of
3886         busy mutex for mutexes using alternate fastlocks.
3887         Patch by dtc@cmucl.cons.org.
3889 2000-09-28  Martin Schwidefsksy    <schwidefsky@de.ibm.com>
3891         * sysdeps/s390/pt-machine.h: Make %a0 the thread register.
3893 2000-09-28  Ulrich Drepper  <drepper@redhat.com>
3895         * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP
3896         test for owner first.
3897         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
3899         * cancel.c (pthread_cancel): Don't do anything if cancelation is
3900         disabled.
3902 2000-09-26  Ulrich Drepper  <drepper@redhat.com>
3904         * spinlock.h (__pthread_set_own_extricate_if): Optimize a bit.
3905         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
3907         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
3908         _POSIX_MONOTONIC_CLOCK.
3910         * spinlock.h (__pthread_set_own_extricate_if): Add back locking
3911         and explain why.
3913 2000-09-20  Andreas Jaeger  <aj@suse.de>
3915         * pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
3916         "testrtsig.h" conditional.
3918 2000-09-11  Ulrich Drepper  <drepper@redhat.com>
3920         * sysdeps/pthread/pthread.h: Declare pthread_attr_getstack and
3921         pthread_attr_setstack.
3922         * Versions [libpthread] (GLIBC_2.2): Export pthread_attr_getstack and
3923         pthread_attr_setstack.
3924         * attr.c (pthread_attr_getstack, pthread_attr_setstack): New functions.
3926 2000-09-05  Ulrich Drepper  <drepper@redhat.com>
3928         * Examples/ex14.c: New file.
3929         * Makefile (tests): Add ex14.
3931         * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
3932         mutex.  Patch by dtc@cmucl.cons.org.
3934         * ecmutex.c: New file.
3935         * Makefile (tests): Add ecmutex.
3937 2000-09-04  H.J. Lu  <hjl@gnu.org>
3939         * attr.c (__pthread_attr_setguardsize): Use page_roundup
3940         instead of roundup to round up to the page size.
3942 2000-09-03  Mark Kettenis  <kettenis@gnu.org>
3944         * manager.c (pthread_exited): Correctly report event as TD_REAP
3945         instead of TD_DEATH.  Fix comments.
3947 2000-09-03  Ulrich Drepper  <drepper@redhat.com>
3949         * spinlock.h (testandset): Add cast to avoid warning.
3950         Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
3952 2000-09-02  Andreas Jaeger  <aj@suse.de>
3954         * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
3955         prototype.
3957 2000-09-01  Ulrich Drepper  <drepper@redhat.com>
3959         * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
3960         Fix typo in last patch (_mode -> _flags).
3962         * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
3963         Provide definition which respects _IO_USER_LOCK flag.
3965 2000-08-30  Ulrich Drepper  <drepper@redhat.com>
3967         * manager.c (pthread_allocate_stack): Clear descriptor only if not
3968         mmaped.
3970 2000-08-25  Ulrich Drepper  <drepper@redhat.com>
3972         * Makefile: Add rules to build and run unload.
3973         * unload.c: New file.
3975         * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
3977         * sysdeps/pthread/pthread.h
3978         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
3979         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
3981 2000-08-24  Andreas Jaeger  <aj@suse.de>
3983         * Examples/ex13.c: Include <string.h> for strerror prototype and
3984         <stdlib.h> for abort prototype.
3985         (pthr_cond_signal_mutex): Rewrite to silence GCC.
3986         (thread_start): Remove unused variable err.
3987         (main): Silence GCC warnings.
3989 2000-08-22  Andreas Jaeger  <aj@suse.de>
3991         * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
3993         * Makefile (tests): Add ex13.
3995 2000-08-20  Ulrich Drepper  <drepper@redhat.com>
3997         * semaphore.h: Add restrict where required by AGd4.
3998         * sysdeps/pthread/pthread.h: Likewise.
3999         * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
4001 2000-08-15  Ulrich Drepper  <drepper@redhat.com>
4003         * Makefile (tests): Add ex12.  Add rule to build it.
4004         * Examples/ex12.c: New file.
4006 2000-08-13  Ulrich Drepper  <drepper@redhat.com>
4008         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
4009         even though the implementation is not quite complete (but it reports
4010         it).  Define _POSIX_MESSAGE_PASSING to -1.
4011         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4013 2000-08-12  Andreas Jaeger  <aj@suse.de>
4015         * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
4016         assembler.
4017         (__compare_and_swap): Likewise.
4018         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
4020 2000-08-10  Ulrich Drepper  <drepper@redhat.com>
4022         * pthread.c (__pthread_initial_thread): Initialize p_errnop and
4023         p_h_errnop correctly and not to NULL.
4025 2000-08-05  Ulrich Drepper  <drepper@redhat.com>
4027         * Banner: Bump version number to 0.9.
4029 2000-08-04  Ulrich Drepper  <drepper@redhat.com>
4031         * Makefile (tests): Add tststack.  Add rule to build the program.
4032         * tststack.c: New file.
4034         * internals.h: Declare __pthread_max_stacksize.
4035         * pthread.c (__pthread_max_stacksize): New variable.
4036         (__pthread_initialize_manager): Determine __pthread_initialize_manager
4037         value.
4038         * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
4039         (pthread_allocate_stack): Allow kernel to choose stack address if
4040         FLOATING_STACKS.  This also handles variable-sized stacks.
4041         Always allocate stack and guardpage together.  Use mprotect to
4042         change guardpage access.
4043         * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
4044         ARCH_STACK_MAX_SIZE.
4046         * attr.c (__pthread_attr_setstacksize): Also test value against
4047         upper limit.
4049         * manager.c (__pthread_nonstandard_stacks): Define only if
4050         THREAD_SELF is not defined.
4051         (pthread_allocate_stack): Always initialize gardaddr to a correct
4052         value.
4053         (pthread_handle_create): Unmap thread with one call.
4054         (pthread_free): Remove test for initial thread before removing stack.
4055         Unmap stack with one call.
4057         * pthread.c (__pthread_initial_thread): Initialize p_userstack to
4058         1 to avoid removing the stack.
4060 2000-07-27  Jes Sorensen  <jes@linuxcare.com>
4062         * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
4063         load of spin lock to prime the cache before the atomic compare and
4064         exchange operation (cmpxchg4). This avoids the spinning on the
4065         cmpxchg4 instruction and reduces movement of the cache line back
4066         and forth between the processors (explanation by Asis K. Mallick
4067         from Intel). This basically makes the implementation operate the
4068         same as the Linux kernel implementation.
4070         * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
4071         * sysdeps/ia64/pspinlock.c: New file.
4073 2000-08-03  Ulrich Drepper  <drepper@redhat.com>
4075         * pthread.c: Move definition of __pthread_set_own_extricate_if...
4076         * spinlock.h: ...here.  Remove locking.
4077         * internals.h: Remove __pthread_set_own_extricate_if prototype.
4079         * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
4080         (rwlock_rd_extricate_func): Don't determine self, let
4081         __pthread_lock do it.
4082         (rwlock_wr_extricate_func): Likewise.
4083         (rwlock_have_already): Optimize *pself handling a bit.
4085         * mutex.c: Use __builtin_expect.
4086         * pthread.c: Likewise.
4088 2000-08-02  Andreas Jaeger  <aj@suse.de>
4090         * sysdeps/s390/pspinlock.c: New file.
4091         * sysdeps/s390/pt-machine.h: New file.
4092         Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
4094 2000-07-12  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
4096         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
4097         R3K.
4098         * sysdeps/mips/pt-machine.h (testandset): Likewise.
4100 2000-07-26  Andreas Jaeger  <aj@suse.de>
4102         * pthread.c: Initialize p_sem_avail.
4104 2000-07-25  Ulrich Drepper  <drepper@redhat.com>
4106         * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
4107         * semaphore.c: Handle spurious wakeups.
4109         * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
4110         for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
4112         * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
4113         (__pthread_wait_for_restart): Likewise.
4115         * condvar.c (pthread_cond_wait): Also check whether thread is
4116         cancelable before aborting loop.
4117         (pthread_cond_timedwait): Likewise.
4119         * signals.c (pthread_sighandler): Remove special code to restrore
4120         %gs on x86.
4121         (pthread_sighandler_t): Likewise.
4123 2000-07-25  Mark Kettenis  <kettenis@gnu.org>
4125         * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
4126         * pthread.c: Include <resolv.h>.
4127         (_res): Undefine.  Add extern declaration.
4129 2000-07-24  Ulrich Drepper  <drepper@redhat.com>
4131         * pthread.c (__pthread_initial_thread): Update initializer.
4132         (__pthread_manager_thread): Likewise.
4133         (pthread_initialize): Move setrlimit call to...
4134         (__pthread_initialize_manager): ...here.
4135         (__pthread_reset_main_thread): Reset also soft limit on stack size.
4137         * condvar.c: Handle spurious wakeups.  [PR libc/1749].
4138         * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
4140 2000-07-21  Ulrich Drepper  <drepper@redhat.com>
4142         * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
4143         __compare_and_swap to define testandset.
4144         * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
4145         Define IMPLEMENT_TAS_WITH_CAS.
4147 2000-07-20  Ulrich Drepper  <drepper@redhat.com>
4149         * Makefile: Pass -z nodelete to linker for libpthread.so
4150         generation if it understand this option.
4152 2000-07-18  Mark Kettenis  <kettenis@gnu.org>
4154         * manager.c (pthread_handle_create): Remove initialization of
4155         new_thread->p_res._sock.
4157 2000-07-19  Kaz Kylheku  <kaz@ashi.footprints.net>
4159         Bugfixes to the variant of the code for machines with no compare
4160         and swap.
4162         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
4163         node was not being properly enqueued, due to failing to update
4164         the lock->__status field.
4166         * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
4167         being set inappropriately, causing the suspend function to be called
4168         with a null self pointer and crash.
4170 2000-07-18  Ulrich Drepper  <drepper@redhat.com>
4172         * spinlock.h (__pthread_alt_trylock): Fix code used if no
4173         compare&swap is available.
4175         * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
4176         compare_and_swap.
4178         * pthread.c (pthread_initialize): Don't use sysconf to determine
4179         whether the machine has more than one processor.
4181         * spinlock.c (__pthread_alt_timedlock): Add back one of the
4182         removed thread_self calls.
4184 2000-07-18  Kaz Kylheku  <kaz@ashi.footprints.net>
4186         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
4187         __compare_and_swap to compare_and_swap in code which assumes
4188         compare swap is available.
4190 2000-07-18  Kaz Kylheku  <kaz@ashi.footprints.net>
4192         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
4193         bug whereby thr field of waitnode structure would not be correctly
4194         set unless a null self pointer is passed to the functions.
4195         Eliminated redundant calls to thread_self().
4197 2000-07-18  Jakub Jelinek  <jakub@redhat.com>
4199         * pthread.c (__pthread_initialize_manager): Lock
4200         __pthread_manager_thread.p_lock before calling clone.
4202 2000-05-05  H.J. Lu  <hjl@gnu.org>
4204         * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
4205         have acquire semantics.
4206         (__compare_and_swap_with_release_semantics): New inline
4207         function.
4208         (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
4210 2000-01-28  Hans Boehm  <hboehm@exch.hpl.hp.com>
4212         * manager.c: Fix the problem with signals at startup.
4213         Change the way that thread stacks are allocated on IA64.
4214         Clean up some of the guard page allocation stuff.
4216 1999-12-19  H.J. Lu  <hjl@gnu.org>
4218         * internals.h (page_roundup): New.
4219         * attr.c (__pthread_attr_setguardsize); Use page_roundup
4220         instead of roundup.
4221         * manager.c (pthread_allocate_stack): Make sure guardaddr is
4222         page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
4223         is define.
4225 1999-12-17  Hans Boehm  <hboehm@exch.hpl.hp.com>
4227         * manager.c (pthread_allocate_stack): Unmap the stack top
4228         if failed to map the stack bottom.
4229         Fix the guard page.
4230         (pthread_free): Fix the guard page.
4232         * pthread.c (pthread_initialize): Set rlimit correctly for
4233         NEED_SEPARATE_REGISTER_STACK.
4235 1999-12-16  H.J. Lu  <hjl@gnu.org>
4237         * pthread.c (__pthread_initialize_manager): Pass
4238         __pthread_manager_thread_bos instead of
4239         __pthread_manager_thread_tos to __clone2.
4241 1999-12-16  H.J. Lu  <hjl@gnu.org>
4243         * manager.c (pthread_allocate_stack): Correct the calculation
4244         of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
4245         stack bottom.
4247 1999-12-13  H.J. Lu  <hjl@gnu.org>
4249         * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
4250         bit after setting ar.ccv.
4252 1999-12-12  H.J. Lu  <hjl@gnu.org>
4254         * manager.c (pthread_allocate_stack): Make the starting
4255         address of the stack bottom page aligned. FIXME: it may
4256         need changes in other places.
4257         (pthread_handle_create): Likewise.
4259 1999-12-11  Hans Boehm  <hboehm@exch.hpl.hp.com>
4261         * manager.c (pthread_allocate_stack): Handle
4262         NEED_SEPARATE_REGISTER_STACK.
4263         (pthread_handle_create): Likewise.
4264         * pthread.c (__pthread_initialize_manager): Likewise.
4266         * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
4268 1999-12-02  H.J. Lu  <hjl@gnu.org>
4270         * sysdeps/ia64/pt-machine.h: New.
4272 2000-07-13  Ulrich Drepper  <drepper@redhat.com>
4274         * wrapsyscall.c: Mark non-__ protected names as weak.
4275         PR libc/1466.
4277 2000-07-12  Bruno Haible  <haible@clisp.cons.org>
4279         * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
4281 2000-07-12  Ulrich Drepper  <drepper@redhat.com>
4283         * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
4284         Add tests also to new alternative spinlock implementation.
4285         * spinlock.h: Likewise.
4286         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4288 2000-07-06  Ulrich Drepper  <drepper@redhat.com>
4290         * Version: Export __sigaction.
4291         * signals.c: Define __sigaction alias.  Use __libc_sigaction instead
4292         of __sigaction.
4293         * pthread.c: Use __libc_sigaction instead of __sigaction.
4295         * condvar.c: Implement pthread_condattr_getpshared and
4296         pthread_condattr_setpshared.
4297         * mutex.c: Implement pthread_mutexattr_getpshared and
4298          pthread_mutexattr_setpshared.
4299         * Versions: Export new functions.
4300         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
4302         * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
4303         (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
4304         is not selected.
4306 2000-07-04  Greg McGary  <greg@mcgary.org>
4308         * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
4309         pragmas.  Include bp-sym.h only if _LIBC.
4311 2000-07-04  Ulrich Drepper  <drepper@redhat.com>
4313         * spinlock.c (__pthread_unlock): Properly place write barrier.
4314         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4316 2000-07-03  Ulrich Drepper  <drepper@redhat.com>
4318         * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
4319         faster on SMP systems.  No more emulation of compare&swap for adaptive
4320         spinlocks.
4321         * spinlock.h: Likewise.
4322         * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
4323         Replace fast with adaptive mutex.
4324         * mutex.c: Rewrite for replacement of fast by adaptive mutex.
4325         * condvar.c: Likewise.
4326         * pthread.c: Define and initialize __pthread_smp_kernel variable.
4327         * internals.h: Declare __pthread_smp_kernel.
4328         * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
4329         _pthread_fastlock structure.
4330         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4332         * pthread.c: Remove initialization to zero from global variables.
4334 2000-06-29  Jakub Jelinek  <jakub@redhat.com>
4336         * shlib-versions: Make sparc64 GLIBC_2.2+ only.
4338 2000-06-28  Greg McGary  <greg@mcgary.org>
4340         * weaks.c: Wrap BP_SYM () around weak extern declarations of
4341         pthread functions that have pointers in their return+arg signatures.
4343 2000-06-27  Greg McGary  <greg@mcgary.org>
4345         * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
4346         extern declarations of pthread functions that have pointers in
4347         their return+arg signatures.
4349 2000-06-26  Ulrich Drepper  <drepper@redhat.com>
4351         * Makefile (tests): Add ex11.  Add rules to build it.
4352         * Examples/ex11.c: New file.
4353         * rwlock.c: Fix complete braindamaged previous try to implement
4354         timedout functions.
4356         * spinlock.c: Pretty print.
4358 2000-06-25  Ulrich Drepper  <drepper@redhat.com>
4360         * Makefile (tests): Add ex10.  Add rules to build it.
4361         * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
4362         pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
4363         * condvar.c (pthread_cond_wait): Allow mutex of kind
4364         PTHREAD_MUTEX_TIMED_NP.
4365         (pthread_cond_timedwait_relative): Likewise.
4366         * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
4367         (__pthread_mutex_trylock): Use __pthread_alt_trylock for
4368         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
4369         (__pthread_mutex_lock): Use __pthread_alt_lock for
4370         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
4371         (__pthread_mutex_timedlock): New function.
4372         (__pthread_mutex_unlock): Use __pthread_alt_unlock for
4373         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
4374         (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
4375         (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
4376         * spinlock.c: Implement alternate fastlocks.
4377         * spinlock.h: Add prototypes.
4378         * Examples/ex10.c: New file.
4379         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
4380         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4382         * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
4383         (__pthread_rwlock_timedrdlock): New function.
4384         (__pthread_rwlock_timedwrlock): New function.
4385         Use laternate fastlock function everywhere.
4387 2000-06-21  Andreas Jaeger  <aj@suse.de>
4389         * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
4390         prototype.
4392         * join.c: Include <stdlib.h> for exit prototype.
4394 2000-06-20  Ulrich Drepper  <drepper@redhat.com>
4396         * sysdeps/i386/useldt.h: Include <stdlib.h>.
4398         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
4399         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4401         * Makefile (libpthread-routines): Add barrier.
4402         (tests): Add ex9.  Add rule to build ex9.
4403         * Versions: Export barrier functions.
4404         * barrier.c: New file.
4405         * Examples/ex9.c: New file.
4406         * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
4407         * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
4408         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4410 2000-06-19  H.J. Lu  <hjl@gnu.org>
4412         * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
4413         HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
4414         (compare_and_swap_with_release_semantics): New. Default to
4415         compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
4416         is not defined.
4418         * spinlock.c (__pthread_unlock): Call
4419         compare_and_swap_with_release_semantics () instead of
4420         compare_and_swap ().
4422 2000-06-19  Ulrich Drepper  <drepper@redhat.com>
4424         * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
4425         to errno directly.
4426         * sysdeps/pthread/timer_delete.c: Likewise.
4427         * sysdeps/pthread/timer_getoverr.c: Likewise.
4428         * sysdeps/pthread/timer_gettime.c: Likewise.
4429         * sysdeps/pthread/timer_settime.c: Likewise.
4431 2000-06-13  Kaz Kylheku  <kaz@ashi.footprints.net>
4433         Timer nodes are now reference counted, and can be marked
4434         as deleted. This allows for the safe release of the global mutex
4435         in the middle without losing the timer being operated on.
4437         * sysdeps/pthread/posix-timer.h (struct timer_node):  The inuse
4438         member is now an enum with three values, so that an intermediate
4439         state can be represented (deleted but not free for reuse yet).
4440         New refcount member added.
4441         * sysdeps/pthread/timer_routines.c: Likewise.
4443         * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
4444         timer_valid): New inline functions added.
4446         * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
4447         restructured, recursive deadlock bug fixed.
4449         * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
4450         timer_addref to ensure that timer won't be deleted while mutex is not
4451         held. Also uses timer_invalid to perform validation of timer handle.
4452         * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
4453         * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
4455 2000-06-14  Ulrich Drepper  <drepper@redhat.com>
4457         * shlib-versions: Add entry for SH.
4458         Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
4460 2000-06-13  Kaz Kylheku  <kaz@ashi.footprints.net>
4462         A few optimizations.  Got rid of unnecessary wakeups of timer threads,
4463         tightened up some critical regions and micro-optimized some list
4464         manipulation code.
4466         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
4467         Returns int value now to indicate whether timer was queued at head.
4468         * sysdeps/pthread/posix-timer.h: Likewise.
4469         * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
4470         new return value from __timer_thread_queue_timer to avoid waking
4471         up timer thread unnecessarily.
4473         * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
4474         inuse flag, because this requires mutex to be held.  Callers updated
4475         to do the check when they have the mutex.
4476         * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
4478         * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
4479         regions: avoids making system calls while holding timer mutex, and
4480         a few computations were moved outside of the mutex as well.
4481         * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
4483         * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
4484         to list_unlink_ip, meaning idempotent.  Pointer manipulation
4485         changed to get better better code out of gcc.
4486         * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
4487         version of list_unlink added here.
4488         * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
4489         function in all places: idempotent one for timers, non-idempotent
4490         one for thread nodes.
4491         * sysdeps/pthread/timer_settime: Likewise.
4492         * sysdeps/pthread/timer_routines.c: Likewise.
4494 2000-06-13  Ulrich Drepper  <drepper@redhat.com>
4496         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
4497         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4499         * sysdeps/pthread/Makefile: Remove tests definition.
4501 2000-06-12  Kazumoto Kojima  <kkojima@rr.iij4u.or.jp>
4502             Yutaka Niibe  <gniibe@chroot.org>
4504         * sysdeps/sh/pspinlock.c: New file.
4505         * sysdeps/sh/pt-machine.h: New file.
4507 2000-06-12  Ulrich Drepper  <drepper@redhat.com>
4509         * Makefile (tests): Add joinrace.
4511         * Examples/ex6.c: Test return value of pthread_join.
4513 2000-06-11  Geoff Keating  <geoffk@cygnus.com>
4515         * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
4516         (__pthread_spin_trylock): Implement.
4517         (__pthread_spin_unlock): Implement.
4518         (__pthread_spin_init): Implement.
4519         (__pthread_spin_destroy): Implement.
4521 2000-06-10  Ulrich Drepper  <drepper@redhat.com>
4523         * sysdeps/pthread/timer_routines.c (list_append): Little fix to
4524         really append the entry.
4526 2000-06-10  Andreas Jaeger  <aj@suse.de>
4528         * lockfile.c (__fresetlockfiles): Remove unused variable fp.
4530 2000-06-10  Kaz Kylheku  <kaz@ashi.footprints.net>
4532         * sysdeps/pthread/timer_create.c: Thread matching now done on
4533         clock type as well as thread attributes.
4534         There are individual global signal-delivering threads for
4535         different clock types.
4536         * sysdeps/pthread/posix-timer.h: Likewise.
4537         * sysdeps/pthread/timer_routines.c: Likewise.
4539         * sysdeps/pthread/timer_routines.c: Thread allocation and
4540         deallocation function now remembers to put thread on active
4541         list and remove from active list.
4542         Thus now the feature of binding multiple timers
4543         to a single thread actually works.
4545 2000-06-10  Ulrich Drepper  <drepper@redhat.com>
4547         * pthread.c (__pthread_create_2_1): Optimize a bit.
4549         * internals.h (invalid_handle): Also test for p_terminated != 0.
4550         (nonexisting_handle): New function.  Same as old invalid_handle.
4551         * join.c (pthread_join): Use nonexisting_handle instead of
4552         invalid_handle to test for acceptable thread handle.
4553         * manager.c (pthread_handle_free): Likewise.
4554         * joinrace.c: New file.
4555         Reported by Permaine Cheung <pcheung@cygnus.com>.
4557 2000-06-08  Ulrich Drepper  <drepper@redhat.com>
4559         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
4560         Correct handling of matching variable.
4562         * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
4563         avoid warnings.
4565         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
4566         Be prepared for empty timer list.
4568         * sysdeps/pthread/timer_create.c (timer_create): Correct names of
4569         CPUTIME clock ID.  Add support for thread clocks.
4571         * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
4572         subtraction were switched.
4574         * sysdeps/pthread/timer_routines.c (init_module): Use
4575         THREAD_MAXNODES threads.
4577         * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
4578         * sysdeps/pthread/timer_create.c: Fill in creator_pid.
4579         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
4580         with sigqueueinfo is this system call is available.
4582         * sysdeps/pthread/timer_create.c (timer_create): Allow
4583         CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
4585         * sysdeps/pthread/Makefile: New file.  Add rules to build timer
4586         functionality.
4587         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
4589 2000-06-04  Kaz Kylheku  <kaz@ashi.footprints.net>
4591         * sysdeps/pthread/posix-timer.h: New file.
4592         * sysdeps/pthread/timer_create.c: New file.
4593         * sysdeps/pthread/timer_delete.c: New file.
4594         * sysdeps/pthread/timer_getoverr.c: New file.
4595         * sysdeps/pthread/timer_gettime.c: New file.
4596         * sysdeps/pthread/timer_routines.c: New file.
4597         * sysdeps/pthread/timer_settime.c: New file.
4598         * sysdeps/pthread/tst-timer.c: New file.
4600 2000-06-08  Ulrich Drepper  <drepper@redhat.com>
4602         * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
4603         LINK_MAX definitions if necessary.
4605 2000-06-04  Kaz Kylheku  <kaz@ashi.footprints.net>
4607         Added missing fork time handling of global libio lock.
4609         * lockfile.c (__fresetlockfiles): Now also resets the list lock,
4610         not just the individual stream locks. Rewritten to use new
4611         iterator interface provided by libio rather than accessing
4612         global variable.
4614         * lockfile.c (__flockfilelist, _funlockfilelist): New functions
4615         which lock and unlock the stream list using the new interface
4616         provied by libio.
4617         * internals.h: Likewise.
4619         * ptfork.c (__fork): Now calls __flockfilelist before fork,
4620         and __funlockfilelist in the parent after the fork.
4621         Child still calls __fresetlockfiles as before.
4623         * linuxthreads.texi: Now explains what happens to streams at
4624         fork time. Also whole new section on forking and thread added.
4625         Definition of pthread_atfork moved out of Miscellaneous Functions
4626         to this new section.
4628 2000-06-04  Jakub Jelinek  <jakub@redhat.com>
4630         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
4631         Add missing register.
4632         * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
4634 2000-06-02  Jakub Jelinek  <jakub@redhat.com>
4636         * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
4637         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
4638         * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
4640 2000-05-31  Andreas Jaeger  <aj@suse.de>
4642         * sysdeps/mips/pspinlock.c: Implement spinlocks.
4644 2000-05-28  Ulrich Drepper  <drepper@redhat.com>
4646         * spinlock.c (__pthread_lock): Remove ASSERT.
4648         * Makefile (tests): Add ex8.
4649         * Examples/ex8.c: New file.
4651 2000-05-12  Kaz Kylheku  <kaz@ashi.footprints.net>
4653         Bugfix: The pthread_atfork mechanism now takes care of its
4654         own internal mutex at fork time.
4656         * ptfork.c (__fork): Revised so that the mutex is held across
4657         the fork operation and while the handlers are called, and so that
4658         the child resets the mutex.
4660         * linuxthreads.texi: Updated pthread_atfork documentation to make
4661         it clear that fork and pthread_atfork can't be reentered from
4662         atfork handlers, that pthread_atfork and fork are mutually atomic,
4663         and that the handlers are inherited by the child process.
4665 2000-05-24  Ulrich Drepper  <drepper@redhat.com>
4667         * Makefile (libpthread-routines): Add pspinlock.
4668         * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
4669         Use struct _pthread_fastlock instead of pthread_spinlock_t.
4670         * condvar.c: Likewise.
4671         * internals.h: Likewise.
4672         * join.c: Likewise.
4673         * manager.c: Likewise.
4674         * mutex.c: Likewise.
4675         * pthread.c: Likewise.
4676         * rwlock.c: Likewise.
4677         * semaphore.c: Likewise.
4678         * signals.c: Likewise.
4679         * spinlock.h: Likewise.
4680         * spinlock.c: Likewise.  Remove pthread_spin_lock functions.
4681         * sysdeps/alpha/pspinlock.c: New file.
4682         * sysdeps/arm/pspinlock.c: New file.
4683         * sysdeps/i386/pspinlock.c: New file.
4684         * sysdeps/m68k/pspinlock.c: New file.
4685         * sysdeps/mips/pspinlock.c: New file.
4686         * sysdeps/powerpc/pspinlock.c: New file.
4687         * sysdeps/sparc/sparc32/pspinlock.c: New file.
4688         * sysdeps/sparc/sparc64/pspinlock.c: New file.
4689         * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
4690         back to _pthread_fastlock.  Define new pthread_spinlock_t.
4692 2000-05-24  Andreas Jaeger  <aj@suse.de>
4694         * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
4696 2000-05-21  Jakub Jelinek  <jakub@redhat.com>
4698         * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
4700 2000-05-13  Jakub Jelinek  <jakub@redhat.com>
4702         * internals.h (__RES_PTHREAD_INTERNAL): Define.
4704 2000-05-06  Kaz Kylheku  <kaz@ashi.footprints.net>
4706         * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
4707         object state is represented with additional bits which distinguish
4708         whether that state was set up in the current process, or
4709         in an ancestor process. If that state was set in an ancestor,
4710         it means that a fork happened while thread was executing the init
4711         function. In that case, the state is reset to NEVER.
4712         * mutex.c (__pthread_once_fork_prepare): New function.
4713         (__pthread_once_fork_child): Likewise
4714         (__pthread_once_fork_parent): Likewise
4715         (__pthread_reset_pthread_once): Removed.
4716         * ptfork.c (__fork): Call new handlers in mutex.c.
4717         * internals.h: Declarations of new mutex.c functions added.
4718         Declaration of removed function deleted.
4719         * linuxthreads.texi: Updated documentation about pthread_once
4720         to clarify what happens under cancellation and forking.
4722 2000-05-06  Kaz Kylheku  <kaz@ashi.footprints.net>
4724         * internals.h: New thread manager request type, REQ_KICK.
4725         * join.c (pthread_exit): main thread now calls exit() instead
4726         of _exit() in order to proper process cleanup.
4727         * manager.c (__pthread_manager): Do not terminate manager
4728         after unblocking main thread; wait for main thread's
4729         REQ_PROCESS_EXIT request instead.
4730         Also, added REQ_KICK case to handle new request; this just does
4731         nothing.
4732         * manager.c (pthread_exited): Do not terminate manager after
4733         unblocking main thread.
4734         * manager.c (__pthread_manager_sighandler): If the main thread
4735         is waiting for all other threads to die, send a REQ_KICK into
4736         the thread manager request pipe to get it to clean out the threads
4737         and unblock the main thread as soon as possible. This fixes
4738         the 2000 millisecond hang on shutdown bug.
4739         * Examples/ex7.c: New file, tests shutdown behavior when all threads
4740         including the main one call pthread_exit(), or implicitly do so.
4741         * Makefile (tests): Add ex7.
4743 2000-05-05  Andreas Jaeger  <aj@suse.de>
4745         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
4746         (pthread_getcpuclockid): Correct test for ourselves.
4748 2000-05-05  Ulrich Drepper  <drepper@redhat.com>
4750         * internals.h (struct _pthread_descr_struct): Reorganization.
4751         Allocate room for 16 pointers at head of the structure for future
4752         thread-local data handling.  Move p_self member in this area.
4753         * manager.c (pthread_handle_create): Adjust use of p_self.
4754         * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
4755         * pthread.c (__pthread_initial_thread): Adjust initialization.
4756         (__pthread_manager_thread): Likewise.
4758 2000-04-29  Bruno Haible  <haible@clisp.cons.org>
4760         * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
4761         for eventmask larger than 1 word.
4763 2000-04-27  Ulrich Drepper  <drepper@redhat.com>
4765         * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
4766         * pthread.c (__pthread_initialize_minimal): New function.  Perform
4767         minimal initialization.
4768         (pthread_initialize): Remove this code here.
4769         * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again.  We
4770         are working around the problem in glibc.
4772 2000-04-25  Ulrich Drepper  <drepper@redhat.com>
4774         * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
4775         now.  First gcc must be fixed (more concrete: libgcc).
4777 2000-04-24  Ulrich Drepper  <drepper@redhat.com>
4779         * pthread.c: Remove special treatement for interrupt handlers on x86.
4780         * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
4781         * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
4782         necessary.
4783         * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
4785 2000-04-24  Mark Kettenis  <kettenis@gnu.org>
4787         * join.c (pthread_exit): Set p_terminated after reporting the
4788         termination event instead of before.
4790 2000-04-20  Jakub Jelinek  <jakub@redhat.com>
4792         * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
4793         if __USE_UNIX98.
4795 2000-04-18  Andreas Jaeger  <aj@suse.de>
4797         * Versions: Use ld instead of ld.so.
4799 2000-04-18  Jakub Jelinek  <jakub@redhat.com>
4801         * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
4802         Remove the typedef keyword.
4804 2000-04-18  Jakub Jelinek  <jakub@redhat.com>
4806         * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
4807         not stbar.
4808         (READ_MEMORY_BARRIER): Define.
4809         * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
4810         MEMORY_BARRIER.
4811         * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
4812         headers.
4814 2000-04-17  Ulrich Drepper  <drepper@redhat.com>
4816         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
4817         (pthread_getcpuclockid): Don't compare thread_id with thread_self,
4818         use thread_handle().
4820 2000-04-16  Ulrich Drepper  <drepper@redhat.com>
4822         * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
4823         if fast mutex is used.  Don't initialize `already_canceled' twice.
4824         Correctly test for return value of timedsuspend.
4826         * pthread.c: Correct long-time braino.  We never set SA_SIGINFO and
4827         therefore don't need the _rt versions of the signal handlers.
4829 2000-04-15  Ulrich Drepper  <drepper@redhat.com>
4831         * pthread.c (pthread_yield): New function.
4832         * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
4833         * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
4834         * internals.h: Declare __pthread_yield.
4836         * pthread.c (pthread_initialize): Avoid a bit more code if
4837         realtime signals are known to exist.
4839         * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
4840         to dynamically detect RT signals and avoid generating compatibility
4841         functions with old kernel.
4842         * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
4843         __pthread_restart_new directly.
4844         (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
4845         __pthread_wait_for_restart_signal directly.
4846         (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
4847         __pthread_timedsuspend_new directly.
4849 2000-04-15  Ulrich Drepper  <drepper@redhat.com>
4851         * condvar.c: Remove all the special code to handle cond_timedwait.
4852         Use timedsuspend instead.
4853         * internals.h: Declare __pthread_timedsuspend_old,
4854         __pthread_timedsuspend_new, and __pthread_timedsuspend.
4855         Remove declaration of __pthread_init_condvar.
4856         * pthread.c: Define __pthread_timedsuspend variable.
4857         (__pthread_timedsuspend_old): New function.  Timed suspension
4858         implementation for old Linux kernels.
4859         (__pthread_timedsuspend_new): New function.  Timed suspension
4860         implementation for new Linux kernels.
4861         * restart.h (timedsuspend): New function.  Call appropriate
4862         suspension function through __pthread_timedsuspend.
4863         * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
4864         the code.
4865         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4867         * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
4868         undefined.
4869         * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
4870         where possible.
4871         * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
4872         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
4874         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
4875         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4877 2000-04-14  Andreas Jaeger  <aj@suse.de>
4879         * weaks.c: Fix typo.
4881         * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
4882         2.2 for linuxthreads.
4884 2000-04-13  Ulrich Drepper  <drepper@redhat.com>
4886         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
4887         (pthread_getcpuclockid): Fix typo.
4889 2000-04-12  Ulrich Drepper  <drepper@redhat.com>
4891         * Makefile (libpthread-routines): Add getcpuclockid.
4892         * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
4893         * sysdeps/pthread/getcpuclockid.c: New file.
4894         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
4895         * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
4897         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
4898         Defined.
4899         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4901         * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
4902         pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
4903         and pthread_spin_unlock.
4904         * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
4905         into pthread_spinlock_t.  Change all uses.
4906         * spinlock.c: Implement pthread_spin_lock.
4907         Rename __pthread_unlock to __pthread_spin_unlock and define weak
4908         alias for real name.
4909         Define pthread_spin_trylock, pthread_spin_init, and
4910         pthread_spin_destroy.
4911         Change all uses of _pthread_fastlock to pthread_spinlock_t.
4912         * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
4913         Change all uses of _pthread_fastlock to pthread_spinlock_t.
4914         * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
4915         pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
4916         and pthread_spin_unlock.
4917         * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
4918         Change all uses of _pthread_fastlock to pthread_spinlock_t.
4919         * condvar.c: Likewise.
4920         * internals.h: Likewise.
4921         * join.c: Likewise.
4922         * manager.c: Likewise.
4923         * mutex.c: Likewise.
4924         * pthread.c: Likewise.
4925         * rwlock.c: Likewise.
4926         * semaphore.c: Likewise.
4927         * signals.c: Likewise.
4929         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
4930         macros.
4931         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
4933 2000-04-11  Ulrich Drepper  <drepper@redhat.com>
4935         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
4936         _POSIX_SHARED_MEMORY_OBJECTS.
4938 2000-04-11  Andreas Jaeger  <aj@suse.de>
4940         * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
4941         (__compare_and_swap): Mark as modifying memory.
4943 2000-04-11  Geoff Keating  <geoffk@cygnus.com>
4945         * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
4946         __volatile__.
4947         (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
4948         Don't have the 'asm' __volatile__.
4950 2000-04-11  Ulrich Drepper  <drepper@redhat.com>
4952         * internals.h: Define MEMORY_BARRIER as empty if not defined already.
4953         * spinlock.c (__pthread_lock): Add memory barriers.
4954         (__pthread_unlock): Likewise.
4955         * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
4956         instruction.
4957         (RELEASE): Not needed anymore.
4958         (__compare_and_swap): Mark asm as modifying memory.
4959         * sysdeps/powerpc/pt-machine.h (sync): Remove.  Replace with definition
4960         of MEMORY_BARRIER.
4961         (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
4962         * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
4963         (MEMORY_BARRIER): Define using stbar.
4964         * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
4965         stbar.
4966         (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
4967         Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
4968         Mike Burrows <m3b@pa.dec.com>.
4970 2000-04-09  Ulrich Drepper  <drepper@redhat.com>
4972         * signals.c (sigaction): Fix return value for the case SIG is one
4973         of the signals the implementation uses.
4974         Patch by Xavier.Leroy@inria.fr.
4976 2000-04-01  Andreas Jaeger  <aj@suse.de>
4978         * attr.c: Use shlib-compat macros.
4979         * oldsemaphore.c: Likewise.
4980         * pthread.c: Likewise.
4981         * weaks.c: Likewise.
4983 2000-03-26  Ulrich Drepper  <drepper@redhat.com>
4985         * semaphore.c (sem_timedwait): New function.
4986         Patch by Carl Mailloux <carlm@oricom.ca>.
4987         * semaphore.h: Declare sem_timedwait.
4988         * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
4990 2000-03-26  Roland McGrath  <roland@baalperazim.frob.com>
4992         * sysdeps/pthread/Makefile: File removed.
4994 2000-03-23  Ulrich Drepper  <drepper@redhat.com>
4996         * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
4997         * internals.h (__pthread_reset_pthread_once): Add prototype.
4998         * ptfork.c (__fork): Call __pthread_reset_pthread_once.
5000         * manager.c (pthread_handle_create): Store ID of new thread before
5001         clone call.
5003 2000-03-21  Ulrich Drepper  <drepper@redhat.com>
5005         * attr.c: Use new macros from shlib-compat.h to define versions.
5006         * oldsemaphore.c: Likewise.
5007         * semaphore.c: Likewise.
5008         * weaks.c: Likewise.
5010         * pthread.c: Update for new SHLIB_COMPAT definition.
5012         * manager.c (__pthread_manager): Unmask debug signal.
5014         * pthread.c (pthread_initialize): Test for address of __dso_handle
5015         being NULL, not value.  Use __on_exit, not on_exit.
5016         Patch by Andreas Jaeger <aj@suse.de>.
5018         * pthread.c: Use new macros from shlib-compat.h to define versions.
5020 2000-03-19  Ulrich Drepper  <drepper@redhat.com>
5022         * pthread.c (pthread_initialize): Instead of on_exit use
5023         __cxa_atexit if __dso_label is available to allow unloading the
5024         libpthread shared library.
5026 2000-03-16  Ulrich Drepper  <drepper@redhat.com>
5028         * condvar.c: Make tests for ownership of mutex less strict.
5030 2000-03-14  Ulrich Drepper  <drepper@redhat.com>
5032         * condvar.c (pthread_cond_wait): Check whether mutex is owned by
5033         current thread and return error if not.
5034         (pthread_cond_timedwait_relative_old): Likewise.
5035         (pthread_cond_timedwait_relative_new): Likewise.
5037         * mutex.c (__pthread_once): Handle cancelled init function correctly.
5038         (pthread_once_cancelhandler): New function.
5039         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
5041 2000-03-14  Andreas Jaeger  <aj@suse.de>
5043         * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
5044         REG_GS.
5045         (pthread_handle_sigrestart_rt): Likewise.
5046         * signals.c (pthread_sighandler_rt): Likewise.
5048 2000-03-02  Andreas Jaeger  <aj@suse.de>
5050         * sysdeps/pthread/bits/libc-lock.h: Fix typo.
5051         Reported by Sean Chen <sean.chen@turbolinux.com>.
5053 2000-02-28  Andreas Jaeger  <aj@suse.de>
5055         * rwlock.c: Fix typo.
5057 2000-02-27  Ulrich Drepper  <drepper@redhat.com>
5059         * rwlock.c: Define __* variants of the functions and make old names
5060         aliases.
5061         * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
5062         * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
5064 2000-02-25  Andreas Jaeger  <aj@suse.de>
5066         * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
5067         pwrite64, lseek64, open64, and __open64 with version 2.2.
5069 2000-02-22  Ulrich Drepper  <drepper@redhat.com>
5071         * semaphore.h (SEM_FAILED): Use 0 not NULL.
5073 2000-02-14  Ulrich Drepper  <drepper@redhat.com>
5075         * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
5076         nanosleep does not work either.  Get absolute time inside the
5077         loop.
5078         (pthread_cond_timedwait_relative_new): Likewise.
5079         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
5081 2000-02-13  Andreas Jaeger  <aj@suse.de>
5083         * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
5084         (pthread_cond_timedwait_relative_old): Likewise.
5086 2000-02-13  Ulrich Drepper  <drepper@redhat.com>
5088         * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
5089         but keep the code around.  A bug in the kernel prevent us from
5090         using the code.
5091         (pthread_cond_timedwait_relative_new): Likewise.
5092         (PR libc/1597 and libc/1598).
5094 2000-02-01  Kaz Kylheku  <kaz@ashi.footprints.net>
5096         * condvar.c (pthread_cond_timedwait_relative_old): Do tight
5097         loop around nanosleep calls instead of around most of the function
5098         (pthread_cond_timedwait_relative_new): Likewise.
5099         body.  Got rid of backwards goto and one local.
5101 2000-01-31  Ulrich Drepper  <drepper@redhat.com>
5103         * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
5104         before every nanosleep call to account for time spent in the rest
5105         of the function.
5106         (pthread_cond_timedwait_relative_new): Likewise.
5107         Patch by khendricks@ivey.uwo.ca (PR libc/1564).
5109 2000-01-29  Ulrich Drepper  <drepper@redhat.com>
5111         * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
5112         from nanosleep call so that in case we restart we only wait for the
5113         remaining time.
5114         (pthread_cond_timedwait_relative_new): Likewise.
5115         Patch by khendricks@ivey.uwo.ca (PR libc/1561).
5117 2000-01-18  Ulrich Drepper  <drepper@cygnus.com>
5119         * manager.c (pthread_allocate_stack): Compute guard page address
5120         correctly.  Patch by HJ Lu.
5122         * sysdeps/pthread/pthread.h: Define
5123         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
5125 2000-01-16  Ulrich Drepper  <drepper@cygnus.com>
5127         * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
5128         preference handling.
5129         (pthread_rwlockattr_setkind_np): Allow
5130         PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
5131         Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
5133 2000-01-12  Ulrich Drepper  <drepper@cygnus.com>
5135         * internals.h (pthread_readlock_info): New structure.
5136         (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
5137         p_untracked_readlock_count.
5138         * pthread.c (__pthread_initial_thread, pthread_manager_thread):
5139         Add initializers for new fields.
5140         * manager.c (pthread_free): Free read/write lock lists.
5141         * queue.h (queue_is_empty): New function.
5142         * rwlock.c: Implement requirements about when readers should get
5143         locks assigned.
5144         * sysdeps/pthread/pthread.h
5145         (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
5146         * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
5147         Define this name as well.
5148         Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
5150 2000-01-05  Ulrich Drepper  <drepper@cygnus.com>
5152         * pthread.c (__pthread_initial_thread, pthread_manager_thread):
5153         Adjust initializers for struct _pthread_descr_struct change.
5154         * internals.h (struct _pthread_descr_struct): Move new elements to
5155         the end.
5157 2000-01-03  Kaz Kylheku  <kaz@ashi.footprints.net>
5159         Redesigned how cancellation unblocks a thread from internal
5160         cancellation points (sem_wait, pthread_join,
5161         pthread_cond_{wait,timedwait}).
5162         Cancellation won't eat a signal in any of these functions
5163         (*required* by POSIX and Single Unix Spec!).
5164         * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
5165         simultaneous condition variable signal (not required by POSIX
5166         or Single Unix Spec, but nice).
5167         * spinlock.c: __pthread_lock queues back any received restarts
5168         that don't belong to it instead of assuming ownership of lock
5169         upon any restart; fastlock can no longer be acquired by two threads
5170         simultaneously.
5171         * restart.h: Restarts queue even on kernels that don't have
5172         queued real time signals (2.0, early 2.1), thanks to atomic counter,
5173         avoiding a rare race condition in pthread_cond_timedwait.
5175 1999-12-31  Andreas Jaeger  <aj@suse.de>
5177         * internals.h: Remove duplicate prototype declarations.
5179         * weaks.c: Remove __THROW from prototypes since the file is not
5180         compiled by a C++ compiler.
5181         * internals.h: Likewise.
5183 1999-12-30  Andreas Jaeger  <aj@suse.de>
5185         * sysdeps/pthread/pthread.h: Move internal functions to...
5186         * sysdeps/pthread/bits/libc-lock.h: ...here.
5188 1999-12-29  Andreas Jaeger  <aj@suse.de>
5190         * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
5192 1999-12-28  Ulrich Drepper  <drepper@cygnus.com>
5194         * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
5195         beginning.
5197         * manager.c (__pthread_start): Add one more cast to prevent
5198         warning on 64bit machines.
5200 1999-12-21  Ulrich Drepper  <drepper@cygnus.com>
5202         * manager.c (pthread_handle_create): Set p_pid of new thread
5203         before calling the callback function to report a new thread.
5205 1999-12-20  Andreas Jaeger  <aj@suse.de>
5207         * pthread.c (pthread_initialize): Move getrlimit call after
5208         setting of errno.
5210 1999-12-18  Ulrich Drepper  <drepper@cygnus.com>
5212         * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
5213         pwrite64, lseek64, open64, and __open64.
5214         * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
5215         pwrite64, lseek64, open64, and __open64.
5217         * manager.c (pthread_allocate_stack): Correct computation of
5218         new_thread_bottom.  Correct handling of stack size and when the
5219         rlimit method to guard for stack growth is used.
5220         * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
5221         minus one pagesize (not two).
5223 1999-12-03  Andreas Jaeger  <aj@suse.de>
5225         * Versions: Add __res_state with version GLIBC_2.2.
5227         * errno.c (__res_state): New function to return thread specific
5228         resolver state.
5230         * pthread.c (pthread_initialize): Initialize p_resp.
5231         (__pthread_reset_main_thread): Also set p_resp.
5233         * manager.c (pthread_handle_create): Initialize p_resp.
5235         * internals.h: Add thread specific resolver state.
5236         Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
5238 1999-12-01  Ulrich Drepper  <drepper@cygnus.com>
5240         * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
5241         beginning.
5242         * sysdeps/i386/i686/pt-machine.h: Likewise.
5243         Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
5245 1999-11-23  Ulrich Drepper  <drepper@cygnus.com>
5247         * manager.c (pthread_start_thread_event): Initialize p_pid already
5248         here.
5250 1999-11-22  Ulrich Drepper  <drepper@cygnus.com>
5252         * internals.h: Add prototype for __pthread_manager_event.
5253         * manager.c (__pthread_manager_event): New function.
5254         (pthread_start_thread_event): Correct computation of self.
5255         Use INIT_THREAD_SELF.
5256         * pthread.c (__pthread_manager_thread): Initialize p_lock.
5257         (__pthread_initialize_manager): Respect event flags also for creation
5258         of the manager thread.
5260 1999-11-08  Ulrich Drepper  <drepper@cygnus.com>
5262         * pthread.c (__pthread_initialize_manager): Initialize
5263         __pthread_manager_thread.p_tid.
5265 1999-11-02  Ulrich Drepper  <drepper@cygnus.com>
5267         * internals.h: Declare __pthread_last_event.
5268         * manager.c: Define __pthread_last_event.
5269         (pthread_handle_create): Set __pthread_last_event.
5270         (pthread_exited): Likewise.
5271         * join.c (pthread_exit): Likewise.
5273         * Makefile (libpthread-routines): Add events.
5274         * events.c: New file.
5275         * internals.h: Protect against multiple inclusion.
5276         Include thread_dbP.h header.
5277         (struct _pthread_descr_struct): Add new fields p_report_events and
5278         p_eventbuf.
5279         Declare event reporting functions.
5280         * join.c (pthread_exit): Signal event if this is wanted.
5281         * manager.c (__pthread_threads_events): New variable.
5282         (pthread_handle_create): Take new parameters with event information.
5283         Signal TD_CREATE event if wanted.
5284         (__pthread_manager): Adjust pthread_handle_create call.
5285         (pthread_start_thread_event): New function.  Block until manager is
5286         finished and then call pthread_start_thread.
5287         (pthread_exited): Signal TD_REAP event if wanted.
5289 1999-10-26  Ulrich Drepper  <drepper@cygnus.com>
5291         * restart.h (suspend_with_cancellation): Rewrite as a macro.
5293         * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
5295 1999-10-25  Andreas Jaeger  <aj@suse.de>
5297         * internals.h: Remove K&R compatibility.
5298         * no-tsd.c: Likewise.
5299         * semaphore.h: Likewise.
5300         * signals.c: Likewise.
5301         * sysdeps/pthread/bits/libc-tsd.h: Likewise.
5302         * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
5303         * weaks.c: Likewise.
5305 1999-10-21  Xavier Leroy  <Xavier.Leroy@inria.fr>
5307         * pthread.c: For i386, wrap pthread_handle_sigrestart and
5308         pthread_handle_sigcancel with functions that restore %gs from the
5309         signal context.  For each signal handling function, two wrappers
5310         are required, one for a non-RT signal and one for a RT signal.
5311         * signal.c: For i386, add code to restore %gs from the signal
5312         context in pthread_sighandler and pthread_sighandler_rt.
5314 1999-10-17  Ulrich Drepper  <drepper@cygnus.com>
5316         * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
5318 1999-10-14  Ulrich Drepper  <drepper@cygnus.com>
5320         * pthread.c (__pthread_initial_thread): Pass argument to
5321         PTHREAD_START_ARGS_INITIALIZER.
5322         (__pthread_manager_thread): Likewise.
5324         * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
5325         initialize function.
5327         * manager.c (pthread_handle_create): Remove p_startfct initialization.
5329         * internals.h (_pthread_descr_struct): We don't need p_startfct field.
5331 1999-10-12  Ulrich Drepper  <drepper@cygnus.com>
5333         * internals.h: Correct return types for __libc_read and __libc_write.
5335 1999-10-09  Andreas Jaeger  <aj@suse.de>
5337         * internals.h: Add __new_sem_post to get prototype in
5338         manager.c; include semaphore.h for needed types.
5340 1999-10-08  Ulrich Drepper  <drepper@cygnus.com>
5342         * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
5343         directly instead of calling sem_post which should not be necessary
5344         but is faster and might help in some case to work around problems.
5345         Patch by khendricks@ivey.uwo.ca [libc/1382].
5347 1999-10-08  Andreas Schwab  <schwab@suse.de>
5349         * sysdeps/pthread/Subdirs: New file.
5350         * Implies: Removed.
5352 1999-10-07  Ulrich Drepper  <drepper@cygnus.com>
5354         * Implies: New file.
5355         * internals.h (struct _pthread_descr_struct): Add p_startfct.
5356         * manager.c (pthread_handle_create): Initialize p_startfct.
5357         * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
5359 1999-09-25  Ulrich Drepper  <drepper@cygnus.com>
5361         * manager.c (__linuxthreads_pthread_threads_max): New variable.
5362         * specific.c (__linuxthreads_pthread_keys_max): New variable.
5363         (__linuxthreads_pthread_key_2ndlevel_size): New variable.
5365         * condvar.c (pthread_cond_timedwait_relative): Never return with
5366         EINTR.  Patch by Andreas Schwab.
5368 1999-09-19  Ulrich Drepper  <drepper@cygnus.com>
5370         * signals.c (sigaction): Correct last patch.  Don't select
5371         pthread_sighandler_rt based on the signal number but instead of
5372         the SA_SIGINFO flag.
5374 1999-09-23  Ulrich Drepper  <drepper@cygnus.com>
5376         * specific.c: Move definitions of struct pthread_key_struct and
5377         destr_function to ...
5378         * internals.h: ...here.
5380 1999-09-18  Ulrich Drepper  <drepper@cygnus.com>
5382         * pthread.c (pthread_handle_sigrestart_rt): New function.  Use
5383         this instead of pthread_handle_sigrestart if the signal is an RT
5384         signal.
5386         * signals.c: Handle passing through of sighandler arguments also
5387         for real-time signals.
5389 1999-09-03  Andreas Schwab  <schwab@suse.de>
5391         * ptfork.c (__fork): Renamed from fork and use __libc_fork.  Add
5392         fork as weak alias.
5393         (__vfork): New function, alias vfork.
5394         * Versions: Export __fork, vfork, and __vfork in libpthread.
5396 1999-08-23  Andreas Schwab  <schwab@suse.de>
5398         * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
5399         call to signal handler.
5401 1999-08-20  Ulrich Drepper  <drepper@cygnus.com>
5403         * pthread.c (__pthread_reset_main_thread): Undo last change.
5404         (__pthread_kill_other_threads_np): Reset signal handlers for the
5405         signals we used in the thread implementation here.
5407 1999-08-19  Ulrich Drepper  <drepper@cygnus.com>
5409         * pthread.c (__pthread_reset_main_thread): Reset signal handlers
5410         for the signals we used in the thread implementation [PR libc/1234].
5412         * Versions: Export __pthread_kill_other_threads_np from libpthread
5413         for GLIBC_2.1.2.
5415         * signals.c: Pass sigcontext through wrapper to the user function.
5417 1999-08-01  Ulrich Drepper  <drepper@cygnus.com>
5419         * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
5420         __libc_internal_tsd_set.
5422 1999-07-29  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5424         * manager.c: Remove inclusion of <linux/tasks.h> since it's not
5425         needed anymore.
5427 1999-07-16  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5429         * internals.h: Align _pthread_descr_struct to 32 bytes.
5430         Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
5431         libc/1206.
5433 1999-07-09  Ulrich Drepper  <drepper@cygnus.com>
5435         * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
5436         swap function.
5438 1999-07-09  Cristian Gafton  <gafton@redhat.com>
5440         * Makefile (libpthread-routines): Add oldsemaphore routine.
5441         * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
5442         sem_trywait, and sem_wait to GLIBC_2.1.
5443         * oldsemaphore.c: New file.
5444         * semaphore.c: Add default_symbol_versions for the changed functions.
5445         (__new_sem_init): Rename from sem_init.
5446         (__new_sem_post): Rename from sem_post.
5447         (__new_sem_wait): Rename from sem_wait.
5448         (__new_sem_trywait): Rename from sem_trywait.
5449         (__new_sem_getvalue): Rename from sem_getvalue.
5450         (__new_sem_destroy): Rename from sem_destroy.
5452 1999-06-23  Robey Pointer  <robey@netscape.com>
5454         * internals.h: Added p_nextlock entry to separate queueing for a
5455         lock from queueing for a CV (sometimes a thread queues on a lock
5456         to serialize removing itself from a CV queue).
5457         * pthread.c: Added p_nextlock to initializers.
5458         * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
5460 1999-07-09  Ulrich Drepper  <drepper@cygnus.com>
5462         * manager.c (pthread_handle_create): Free mmap region after stack
5463         if clone failed.  Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
5465 1999-05-23  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5467         * man/pthread_cond_init.man: Correct example.
5468         Reported by Tomas Berndtsson <tomas@nocrew.org>.
5470         * linuxthreads.texi (Condition Variables): Likewise.
5472 1999-05-18  Jakub Jelinek  <jj@ultra.linux.cz>
5474         * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
5475         casx not cas, also successful casx returns the old value in rd
5476         and not the new value.
5478 1999-05-16  Xavier Leroy  <Xavier.Leroy@inria.fr>
5480         * manager.c: If pthread_create() is given a NULL attribute
5481         and the thread manager runs with a realtime policy, set the
5482         scheduling policy of the newly created thread back to SCHED_OTHER.
5483         * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
5484         initialize the schedpolicy field of new_thread->p_start_args
5485         to that of the calling thread.
5487 1999-04-29  Ulrich Drepper  <drepper@cygnus.com>
5489         * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
5490         instruction does not allow memory element to use offset.
5492 1999-04-28  Ulrich Drepper  <drepper@cygnus.com>
5494         * manager.c (pthread_allocate_stack): Optimize initialization of new
5495         thread descriptor.
5497         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
5498         Don't use initializer since it is all zeroes.
5499         (__libc_once_define): Likewise.
5501 1999-04-16  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5503         * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
5504         doesn't exist anymore.
5505         * sysdeps/i386/Implies: Likewise.
5506         * sysdeps/m68k/Implies: Likewise.
5507         * sysdeps/mips/Implies: Likewise.
5508         * sysdeps/powerpc/Implies: Likewise.
5509         * sysdeps/sparc/sparc32/Implies: Likewise.
5510         * sysdeps/sparc/sparc64/Implies: Likewise.
5512 1999-04-15  Ulrich Drepper  <drepper@cygnus.com>
5514         * sysdeps/alpha/bits/semaphore.h: Removed.
5515         * sysdeps/powerpc/bits/semaphore.h: Removed.
5516         * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
5517         * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
5518         * Makefile (headers): Remove bits/semaphore.h.
5520         * semaphore.h: Define _pthread_descr if necessary.
5521         Don't include limits.h.  Define SEM_VALUE_MAX directly.
5522         Define SEM_FAILED.
5523         (sem_t): Protect element names with leading __.
5524         Add declarations for sem_close, sem_open, and sem_unlink.
5525         * semaphore.c: Adjust all functions for new element names.
5526         Define sem_close, sem_open, and sem_unlink.
5527         * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
5528         GLIBC_2.1.1.
5529         * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
5530         necessary.
5532 1999-03-16  H.J. Lu  <hjl@gnu.org>
5534         * specific.c (pthread_key_delete): Check th->p_terminated to see
5535         if the thread is running.
5537         * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
5538         Added to GLIBC_2.0 for libc.so.
5540 1999-02-12  H.J. Lu  <hjl@gnu.org>
5542         * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
5543         __libc_allocate_rtsig): Added to GLIBC_2.1.
5545         * internals.h (DEFAULT_SIG_RESTART): Removed.
5546         (DEFAULT_SIG_CANCEL): Removed.
5548         * pthread.c (init_rtsigs, __libc_current_sigrtmin,
5549         __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
5550         (__pthread_sig_restart, __pthread_sig_cancel,
5551         __pthread_sig_debug): Initialized.
5552         (pthread_initialize): Call init_rtsigs () to initialize
5553         real-time signals.
5555 1999-02-03  H.J. Lu  <hjl@gnu.org>
5557         * manager.c (__pthread_manager): Do block __pthread_sig_debug.
5558         Don't restart the thread which sent REQ_DEBUG.
5559         (pthread_start_thread): Check if __pthread_sig_debug > 0
5560         before debugging.
5562         * pthread.c (__pthread_initialize_manager): Suspend ourself
5563         after sending __pthread_sig_debug to gdb instead of
5564         __pthread_sig_cancel.
5566 1999-01-24  H.J. Lu  <hjl@gnu.org>
5568         * manager.c (__pthread_manager): Delete __pthread_sig_debug
5569         from mask if __pthread_sig_debug > 0.
5570         (pthread_handle_create): Increment __pthread_handles_num.
5572         * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
5573         * pthread.c (__pthread_initialize_manager): Likewise.
5575         * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
5576         instead of __libc_allocate_rtsig (2).
5577         (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
5578         instead of __pthread_sig_cancel.
5579         (pthread_handle_sigdebug): Fix comments.
5581 1999-01-21  Ulrich Drepper  <drepper@cygnus.com>
5583         * manager.c (pthread_allocate_stack): Set
5584         __pthread_nonstandard_stacks if user-specified stack is used.
5586 1999-01-16  Ulrich Drepper  <drepper@cygnus.com>
5588         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
5589         _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
5591 1999-01-07  Xavier Leroy  <Xavier.Leroy@inria.fr>
5593         * pthread.c: Use a third signal __pthread_sig_debug distinct
5594         from __pthread_sig_cancel to notify gdb when a thread is
5595         created
5596         * manager.c: Likewise.
5597         * internals.h: Likewise.
5598         * signals.c: The implementation of sigwait(s) assumed that
5599         all signals in s have signal handlers already attached.
5600         This is not required by the standard, so make it work
5601         also if some of the signals have no handlers.
5603 1999-01-05  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
5605         * linuxthreads.texi: Remove pointers from first @node.  Move old
5606         @node spec inside comment.
5608 1998-12-31  Ulrich Drepper  <drepper@cygnus.com>
5610         * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
5611         _IO_lock_unlock.
5613 1998-12-29  Ulrich Drepper  <drepper@cygnus.com>
5615         * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
5616         lock.  Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
5618 1998-12-21  Ulrich Drepper  <drepper@cygnus.com>
5620         * manager.c: Threads now send __pthread_sig_cancel on termination.
5621         Change clone call and signal masks.
5622         * thread.c (pthread_handle_sigrestart): Remove special code for
5623         manager.
5624         (pthread_handle_sigcancel): In manager thread call
5625         __pthread_manager_sighandler.
5626         * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
5627         * sysdeps/i386/i686/pt-machine.h: Likewise.
5628         Patches by Xavier Leroy.
5630 1998-12-14  Ulrich Drepper  <drepper@cygnus.com>
5632         * spinlock.c (__pthread_unlock): Don't crash if called for an
5633         untaken mutex.  Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
5635         * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
5636         overall runtime.
5638 1998-12-13  Ulrich Drepper  <drepper@cygnus.com>
5640         * Examples/ex3.c: Wait until all threads are started before
5641         searching for the number to avoid race condition on very fast
5642         systems.
5644 1998-12-08  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5646         * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
5647         declaration since it's not needed.
5649         * sysdeps/pthread/pthread.h: Move internal functions to ...
5650         * internals.h: ...here.
5652 1998-12-02  H.J. Lu  <hjl@gnu.org>
5654         * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
5655         SIGRTMIN is defined.
5656         (__pthread_sig_cancel): Likewise.
5658 1998-12-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5660         * wrapsyscall.c: Include <sys/mman.h> for msync,
5661         <stdlib.h> for system and <termios.h> for tcdrain prototype.
5662         Correct msync declaration.
5664 1998-11-29  Roland McGrath  <roland@baalperazim.frob.com>
5666         * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
5667         __libc_tsd_set): New macros for new interface.
5668         * no-tsd.c: New file, provide uninitialized defns of
5669         __libc_internal_tsd_get and __libc_internal_tsd_set.
5670         * Makefile (routines): Add no-tsd.
5672 1998-10-12  Roland McGrath  <roland@baalperazim.frob.com>
5674         * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
5675         * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
5676         __libc_internal_tsd_set): Move decls to ...
5677         * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
5678         declarations.
5680         * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
5681         __libc_internal_tsd_set): Make these pointers to functions, not
5682         functions; remove #pragma weak decls for them.
5683         * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
5684         Define static functions and initialized pointers to them.
5686 1998-11-18  Ulrich Drepper  <drepper@cygnus.com>
5688         * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
5689         (CFLAGS-specific.c): Likewise.
5690         (CFLAGS-pthread.c): Likewise.
5691         (CFLAGS-ptfork.c): Likewise.
5692         (CFLAGS-cancel.c): Likewise.
5693         * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
5694         as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
5696         * mutex.c (pthread_mutex_init): Define as strong symbol.
5697         (pthread_mutex_destroy): Likewise.
5698         (pthread_mutex_trylock): Likewise.
5699         (pthread_mutex_lock): Likewise.
5700         (pthread_mutex_unlock): Likewise.
5701         (pthread_mutexattr_init): Likewise.
5702         (pthread_mutexattr_destroy): Likewise.
5703         (pthread_once): Likewise.
5704         * ptfork.c (pthread_atfork): Likewise.
5705         * specific.c (pthread_key_create): Likewise.
5706         (pthread_setspecific): Likewise.
5707         (pthread_getspecific): Likewise.
5709 1998-11-15  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
5711         * linuxthreads.texi: Fix punctuation after xref.
5713 1998-11-10  H.J. Lu  <hjl@gnu.org>
5715         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
5716         if it is defined in <linux/limits.h>.
5718 1998-10-29 14:28  Ulrich Drepper  <drepper@cygnus.com>
5720         * spinlock.h (__pthread_trylock): Define inline.
5721         (__pthread_lock): Add extra parameter to declaration.  Declare
5722         using internal_function.
5723         (__pthread_unlock): Declare using internal_function.
5724         * spinlock.c (__pthread_lock): Add new parameter.  Use it instead
5725         of local variable self.  Avoid recomputing self.  Define using
5726         internal_function.
5727         (__pthread_trylock): Remove.
5728         (__pthread_unlock): Define using internal_function.
5729         * cancel.c: Adjust for __pthread_lock interface change.  Use already
5730         computed self value is possible.
5731         * condvar.c: Likewise.
5732         * join.c: Likewise.
5733         * manager.c: Likewise.
5734         * mutex.c: Likewise.
5735         * pthread.c: Likewise.
5736         * rwlock.c: Likewise.
5737         * semaphore.c: Likewise.
5738         * signals.c: Likewise.
5740 1998-10-27 13:46  Ulrich Drepper  <drepper@cygnus.com>
5742         * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
5743         __ to field names of the struct.
5744         * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
5745         Likewise.
5746         (pthread_attr_t): Likewise.
5747         (pthread_cond_t): Likewise.
5748         (pthread_condattr_t): Likewise.
5749         (pthread_mutex_t): Likewise.
5750         (pthread_mutexattr_t): Likewise.
5751         (pthread_rwlock_t): Likewise.
5752         (pthread_rwlockattr_t): Likewise.
5753         * attr.c: Adjust for pthread.h and pthreadtypes.h change.
5754         * cancel.c: Likewise.
5755         * condvar.c: Likewise.
5756         * manager.c: Likewise.
5757         * mutex.c: Likewise.
5758         * pthread.c: Likewise.
5759         * ptlongjmp.c: Likewise.
5760         * rwlock.c: Likewise.
5761         * spinlock.c: Likewise.
5763 1998-10-09  Ulrich Drepper  <drepper@cygnus.com>
5765         * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
5766         also with PT_EI.
5768         * sysdeps/i386/i686/pt-machine.h: Remove unused inline
5769         definitions.
5771         * Makefile (libpthread-routines): Add pt-machine.
5772         * pt-machine.c: New file.
5773         * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
5774         yet defined.  Use PT_EI in extern inline definitions.
5775         * sysdeps/arm/pt-machine.h: Likewise.
5776         * sysdeps/i386/pt-machine.h: Likewise.
5777         * sysdeps/i386/i686/pt-machine.h: Likewise.
5778         * sysdeps/m68k/pt-machine.h: Likewise.
5779         * sysdeps/mips/pt-machine.h: Likewise.
5780         * sysdeps/powerpc/pt-machine.h: Likewise.
5781         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
5782         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
5784 1998-10-02  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5786         * semaphore.h: Include <sys/types.h> so that _pthread_descr
5787         is declared.
5789 1998-09-15  David S. Miller  <davem@pierdol.cobaltmicro.com>
5791         * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
5792         argument.
5793         * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
5795 1998-09-12 14:24 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
5797         * sysdeps/unix/sysv/linux/bits/sigthread.h: Add multiple inclusion
5798         guard.
5800 1998-09-02 11:08  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
5802         * signals.c (sigaction): Check that sig is less than NSIG to avoid
5803         array index overflow.
5805 1998-09-06 10:56  Ulrich Drepper  <drepper@cygnus.com>
5807         * sysdeps/pthread/semaphore.h: New file.
5809 1998-09-06 09:08  Ulrich Drepper  <drepper@cygnus.com>
5811         * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
5812         _LIBC_TSD_KEY_DL_ERROR.
5814 1998-08-31  Ulrich Drepper  <drepper@cygnus.com>
5816         * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
5817         * sysdeps/i386/pt-machine.h: Likewise.
5818         Suggested by Roland McGrath.
5820 1998-08-28 13:58  Ulrich Drepper  <drepper@cygnus.com>
5822         * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
5823         access thread data with non-constant offsets.
5824         * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
5825         necessary.
5827         * sysdeps/i386/useldt.h: Fix typo.  Add THREAD_GETMEM_NC and
5828         THREAD_SETMEM_NC definitions.
5830         * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
5831         THREAD_SETMEM_NC.
5832         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
5834 1998-08-26 15:46  Ulrich Drepper  <drepper@cygnus.com>
5836         * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
5837         not already defined.
5838         (struct _pthread_descr_struct): Add p_self and p_nr field.
5839         * manager.c (__pthread_handles): Define second element to point
5840         to manager thread.
5841         (__pthread_handles_num): Initialize to 2.
5842         (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
5843         (pthread_start_thread): Likewise.
5844         (pthread_handle_create): Start search for free slot at entry 2.
5845         Initialize new fields p_self and p_nr.
5846         Call __clone with CLONE_PTRACE if available.
5847         (pthread_free): Call FREE_THREAD_SELF if available.
5848         * pthread.c (__pthread_initial_thread): Initialize new fields.
5849         (__pthread_manager_thread): Likewise.
5850         (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
5852         * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
5853         elements of the thread descriptor.
5854         * condvar.c: Likewise.
5855         * errno.c: Likewise.
5856         * join.c: Likewise.
5857         * manager.c: Likewise.
5858         * pthread.c: Likewise.
5859         * ptlongjmp.c: Likewise.
5860         * semaphore.c: Likewise.
5861         * signals.c: Likewise.
5862         * specific.c: Likewise.
5863         * spinlock.c: Likewise.
5865         * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
5867         * sysdeps/i386/useldt.h: New file.
5868         * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
5870         * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
5871         THREAD_SETMEM using __thread_self.
5872         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
5874 1998-08-24  Geoff Keating  <geoffk@ozemail.com.au>
5876         * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
5877         turned out that we didn't need to queue after all.
5879 1998-08-22  Geoff Keating  <geoffk@ozemail.com.au>
5881         * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
5882         and wastes space; correct types.
5884 1998-08-08 11:18  H.J. Lu  <hjl@gnu.org>
5886         * signals.c (sigaction): Handle NULL argument.
5888 1998-08-04  Ulrich Drepper  <drepper@cygnus.com>
5890         * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
5891         of sigset_t.
5893 1998-08-02  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
5895         * Makefile (linuxthreads-version): Extract correct number from
5896         Banner.
5898 1998-07-29  Xavier Leroy  <Xavier.Leroy@inria.fr>
5900         * Banner: Bump version number to 0.8
5901         * FAQ.html: Many updates, in particular w.r.t. debugging.
5902         * manager.c: Support for non-default stacksize for
5903         LinuxThreads-allocated stacks;
5904         don't use guard pages for stacks with default size, rely on
5905         rlimit(RLIMIT_STACK) instead (it's cheaper).
5906         * attr.c: Likewise.
5907         * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
5908         everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
5909         * condvar.c: Likewise.
5910         * internals.h: Likewise.
5911         * restart.h: Likewise.
5912         * signals.c: Likewise.
5913         * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
5915 1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
5917         * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
5918         __pthread_mutexattr_[sg]ettype.  Add more weak aliases.
5919         * Versions: Put __pthread_mutexattr_settype under version
5920         GLIBC_2.0.  Don't export __pthread_mutexattr_setkind_np and
5921         __pthread_mutexattr_gettype.
5923 1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
5925         * sysdeps/pthread/bits/libc-lock.h: Make
5926         __pthread_mutexattr_settype weak.  Don't make
5927         __pthread_mutexattr_setkind_np weak.
5929 1998-07-16 10:52  Ulrich Drepper  <drepper@cygnus.com>
5931         * manager.c (pthread_handle_create): Check whether sched_setscheduler
5932         call can succeed here.
5934         * mutex.c: Define __pthread_mutexattr_settype and make
5935         __pthread_mutexattr_setkind_np an alias.
5936         Likewise for __pthread_mutexattr_gettype.
5938 1998-07-15 11:00 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
5940         * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
5941         is root.
5943 1998-07-14 19:38  Ulrich Drepper  <drepper@cygnus.com>
5945         * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
5947 1998-07-11  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5949         * Examples/ex6.c: Include <unistd.h> for usleep.
5951 1998-06-13 11:04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
5953         * Examples/ex4.c (main): Use exit, not pthread_exit.
5955 1998-07-09 13:39  Ulrich Drepper  <drepper@cygnus.com>
5957         * Versions: Add __pthread_mutexattr_gettype and
5958         __pthread_mutexattr_settype.
5959         * lockfile.c: Use __pthread_mutexattr_settype instead of
5960         __pthread_mutexattr_setkind_np.
5961         * mutex.c: Define __pthread_mutexattr_gettype and
5962         __pthread_mutexattr_settype.
5963         * weak.c: Likewise.
5964         * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
5965         __pthread_mutexattr_settype.
5966         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
5967         Use __pthread_mutexattr_settype.
5969 1998-07-08 22:26  Ulrich Drepper  <drepper@cygnus.com>
5971         * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
5972         * mutex.c: Define weak alias pthread_mutexattr_gettype and
5973         pthread_mutexattr_settype.
5974         * sysdeps/pthread/pthread.h: Declare these functions.
5975         Move pthread_sigmask and pthread_kill declaration in separate header.
5976         * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
5978 1998-07-07 15:20  Ulrich Drepper  <drepper@cygnus.com>
5980         * Makefile: Add rules to compile and run tests.
5981         * Examples/ex1.c: Little changes to fix warnings.
5982         * Examples/ex2.c: Likewise.
5983         * Examples/ex3.c: Likewise.
5984         * Examples/ex4.c: Likewise.
5985         * Examples/ex5.c: Likewise.
5986         * Examples/ex6.c: New file.
5988 1998-07-05 11:54  Ulrich Drepper  <drepper@cygnus.com>
5990         * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
5992 1998-07-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5994         * attr.c: Include <string.h>.
5996 1998-06-30 11:47  Ulrich Drepper  <drepper@cygnus.com>
5998         * attr.c: Include errno.h.  Use memcpy to copy sched_param.
5999         * internals.h: Include limits.h.
6000         * manager.c: Use memcpy to copy sched_param.
6001         * ptfork.c: Include errno.h.
6002         * pthread.c: Likewise.
6003         * semaphore.c: Likewise.
6004         * specific.c: Likewise.
6005         * spinlock.h: Likewise.
6006         * sysdeps/pthread/pthread.h: Include only allowed headers.  Move
6007         type definition to ...
6008         * sysdeps/pthread/bits/pthreadtypes.h: ...here.  New file.
6010 1998-06-29 12:34  Ulrich Drepper  <drepper@cygnus.com>
6012         * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
6014         * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
6015         as macros as demanded in POSIX.1, Annex C.
6017 1998-06-29 12:29  Ulrich Drepper  <drepper@cygnus.com>
6019         * internals.h (struct pthread_request): For free use pthread_t
6020         instead of pthread_descr.
6021         * join.c (pthread_join): Pass thread_id, not th to manager.
6022         (pthread_detach): Likewise.
6023         * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
6024         (pthread_exited): Remove detached queue code.
6025         (pthread_handle_free): Expect thread ID parameter and use it to
6026         validate the thread decsriptor.  Don't use detached queue.
6027         Patches by Xavier Leroy.
6029 1998-06-27  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6031         * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
6032         _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
6033         __pthread_atfork, __pthread_key_create, __pthread_once.
6034         * internals.h: Doc fix.
6035         * pthread.c (__pthread_initialize): Define again.
6037 1998-06-26  Ulrich Drepper  <drepper@cygnus.com>
6039         * manager.c (pthread_exited): If thread is not detached put it on
6040         special list.
6041         (pthread_handle_free): If thread is not on list with living threads
6042         search on list with detached threads.
6044         * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
6045         for new definition of pthread_rwlock_t.
6047         * spinlock.c: Correct test whether to compile
6048         __pthread_compare_and_swap or not.
6050 1998-06-25 19:27  Ulrich Drepper  <drepper@cygnus.com>
6052         * attr.c: Finish user stack support.  Change locking code to be safe
6053         in situations with different priorities.
6054         * cancel.c: Likewise.
6055         * condvar.c: Likewise.
6056         * internals.h: Likewise.
6057         * join.c: Likewise.
6058         * manager.c: Likewise.
6059         * mutex.c: Likewise.
6060         * pthread.c: Likewise.
6061         * ptlongjmp.c: Likewise.
6062         * queue.h: Likewise.
6063         * rwlock.c: Likewise.
6064         * semaphore.c: Likewise.
6065         * semaphore.h: Likewise.
6066         * signals.c: Likewise.
6067         * spinlock.c: Likewise.
6068         * spinlock.h: Likewise.
6069         * sysdeps/pthread/pthread.h: Likewise.
6070         Patches by Xavier Leroy.
6072         * sysdeps/i386/i686/pt-machine.h: New file.
6074 1998-06-25  Ulrich Drepper  <drepper@cygnus.com>
6076         * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
6077         [sg]et_stackaddr prototypes always available.
6079         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6080         _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
6082 1998-06-24  Ulrich Drepper  <drepper@cygnus.com>
6084         * manager.c (pthread_free): Undo patch from 980430.
6085         Reported by David Wragg <dpw@doc.ic.ac.uk>.
6087 1998-06-09 15:07  Ulrich Drepper  <drepper@cygnus.com>
6089         * manager.c: Define __pthread_manager_adjust_prio and use it to
6090         increase priority when needed.
6091         * internals.h: Add prototype for __pthread_manager_adjust_prio.
6092         * mutex.c: Optimize mutexes to wake up only one thread.
6093         * pthread.c: Move PID of manager for global variable in structure
6094         element.
6095         Patches by Xavier Leroy.
6097 1998-06-07 13:47  Ulrich Drepper  <drepper@cygnus.com>
6099         * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
6101 1998-06-03  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
6103         * attr.c: Correct typo.
6105 1998-05-01  Ulrich Drepper  <drepper@cygnus.com>
6107         * manager.c (pthread_free): Unmap guard before the stack.
6108         Patch by Matthias Urlichs.
6110 1998-04-30  Ulrich Drepper  <drepper@cygnus.com>
6112         * manager.c (pthread_free): Detect already free child.
6113         Patch by Xavier Leroy, reported by Matthias Urlichs.
6115 1998-04-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6117         * Makefile (linuxthreads-version): Renamed back from
6118         libpthread-version.
6120 1998-04-21  Ulrich Drepper  <drepper@cygnus.com>
6122         * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
6123         __libc_longjmp.
6125 1998-04-20 14:55  Ulrich Drepper  <drepper@cygnus.com>
6127         * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
6128         * internals.h: Add definitions for new spinlock implementation.
6129         * ptlongjmp.c: New file.
6130         * spinlock.c: New file.
6131         * spinlock.h (acquire): Don't reschedule using __sched_yield, use
6132         new function __pthread_acquire to prevent deadlocks with thread
6133         with different priorities.
6134         Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
6136 1998-03-16  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6138         * manager.c (__pthread_manager): Reduce first argument to select
6139         to include just the needed file descriptor.
6141 1998-03-17 00:06  Ulrich Drepper  <drepper@cygnus.com>
6143         * manager.c: Fix last patch which caused core dumps.
6145         * pthread.c: Correctly handle missing SIGRTMIN.
6147 1998-03-15  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6149         * libpthread.map: Add __libc_internal_tsd_get and
6150         __libc_internal_tsd_set.  Add missing cancelable functions. Export
6151         libc internal versions of the cancelable functions.
6153 1998-03-13 16:51  Ulrich Drepper  <drepper@cygnus.com>
6155         * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
6157 1998-03-13 00:46  Ulrich Drepper  <drepper@cygnus.com>
6159         * attr.c: Implement pthread_attr_[gs]etguardsize,
6160         pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
6161         Change pthread_attr_init to have two interfaces.
6162         * internals.h (struct _pthread_descr_struct): Add new fields for
6163         above functions.
6164         * libpthread.map: Add names in GLIBC_2.1 section.
6165         * manager.c (pthread_handle_create): Implement guardsize and
6166         user stack.
6167         (pthread_free): Likewise.
6168         * pthread.c (pthread_create): Add new interface for changed
6169         pthread_attr_t.
6170         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
6171         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
6172         PTHREAD_STACK_MIN.
6174 1998-03-11 00:42  Wolfram Gloger  <wmglo@dent.med.uni-muenchen.de>
6176         * manager.c: Enable resetting of the thread scheduling policy
6177         to SCHED_OTHER when the parent thread has a different one.
6179 1998-02-01 13:51  Ulrich Drepper  <drepper@cygnus.com>
6181         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6182         _POSIX_ASYNCHRONOUS_IO.
6184         * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
6185         mutexes.
6186         * mutex.c: Implement new mutex types.
6188         * internals.h: Include <signal.h>.
6190         * libpthread.map: Add __erno_location and __h_errno_location.
6192         * errno.c: Return pointer to variable actually in use.  This might
6193         not be the one in the thread structure.
6194         * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
6195         and p_h_errnop.
6196         * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
6197         of manager thread structure.
6198         (pthread_handle_create): Set p_errnop and p_h_errnop members for new
6199         thread.
6200         * pthread.c: Adapt initializer for thread structures.
6201         (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
6202         (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
6203         current thread to global variables.
6205 1998-01-31 17:27  Ulrich Drepper  <drepper@cygnus.com>
6207         * rwlock.c: New file.
6208         * Makefile (libpthread-routines): Add rwlock.
6209         * sysdeps/pthread/pthread.h: Define data structures and declare
6210         functions.
6211         * libpthread.map: Add new functions.
6213 1997-12-18 13:50  Philip Blundell  <pb@nexus.co.uk>
6215         * sysdeps/arm/pt-machine.h: New file; add ARM support.
6216         * sysdeps/arm/Implies: likewise.
6217         * README: Document it.
6219 1997-12-13  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6221         * signals.c: Remove unneeded initializer for sigwaited, saving a
6222         warning.
6224 1997-04-11 01:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6226         * semaphore.c (sem_init): Set sem_spinlock only if available.
6228 1997-12-04 01:48  Ulrich Drepper  <drepper@cygnus.com>
6230         * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
6231         * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
6233         * Makefile: Update from LinuxThreads 0.7.
6234         * internals.h. Likewise.
6235         * manager.c: Likewise.
6236         * mutex.c: Likewise.
6237         * pthread.c: Likewise.
6238         * signals.c: Likewise.
6239         * specific.c: Likewise.
6240         * Examples/ex3.c: Likewise.
6242 1997-11-20 18:13  Ulrich Drepper  <drepper@cygnus.com>
6244         * pthread.c (__pthread_reset_main_thread): Close pipe only if still
6245         open.
6247 1997-10-29 05:38  Ulrich Drepper  <drepper@cygnus.com>
6249         * wrapsyscall.c: Add socket functions which are also cancelation
6250         points.
6252 1997-10-19 21:40  Wolfram Gloger  <wg@wolfram.dent.med.uni-muenchen.de>
6254         * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
6255         New functions for fast thread specific data within libc.
6257         * internals.h: Add new array p_libc_specific to struct
6258         _pthread_descr_struct.
6260         * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
6262 1997-10-13 05:39  Ulrich Drepper  <drepper@cygnus.com>
6264         * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
6265         Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
6267 1997-08-29 03:05  Ulrich Drepper  <drepper@cygnus.com>
6269         * internals.h (struct _pthread_descr_struct): Add definitions for
6270         two-level specific key handling.
6271         * manager.c (pthread_handle_create): Initialize specific memory array.
6272         * specific.c: Implement two-level key handling.
6273         * weaks.c: Don't provide dummy key handling.
6274         * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
6275         Add definition of __libc_key_t.
6276         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
6277         as 1024.
6278         Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
6279         PTHREAD_DESTRUCTOR_ITERATIONS.
6281         * manager.c (pthread_handle_create): Compare mmap result with
6282         MAP_FAILED.
6284         * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
6285         * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
6287 1997-08-22 19:04  Richard Henderson  <rth@cygnus.com>
6289         sysdeps/sparc -> sysdeps/sparc/sparc32
6290         sysdeps/sparc64 -> sysdeps/sparc/sparc64
6292         * internals.h: Change definition of THREAD_SELF to be an expression,
6293         not a statement that did a return.
6294         * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
6295         * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
6296         Follow Solaris and use a "system reserved" register (%g6) to hold
6297         the thread descriptor.
6298         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
6300 1997-08-03 00:09  Ulrich Drepper  <drepper@cygnus.com>
6302         * mutex.c: Correct pthread_once.  Patch by Xavier Leroy.
6303         * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
6304         * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
6306         * semaphore.c: Include spinlock.h only when needed.
6308         * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
6309         keys for entries not in use.
6311         * weaks.c: Implement key handling functions for real.
6313 1997-06-29  01:04  Richard Henderson  <richard@gnu.ai.mit.edu>
6315         Initial sparc64-linux support:
6316         * sysdeps/sparc64/Implies: New file.
6317         * sysdeps/sparc64/pt-machine.h: Likewise.
6319 1997-06-29 00:48  Ulrich Drepper  <drepper@cygnus.com>
6321         * semaphore.c: Include spinlock.h at correct place.
6322         Patch by HJ Lu.
6324 1997-06-13 10:06  Richard Henderson  <rth@tamu.edu>
6326         The Great Bit File Move:
6327         * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
6328         * sysdeps/powerpc/semaphorebits.h: Likewise.
6329         * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
6330         * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
6331         * sysdeps/pthread/libc-lock.h: -> bits/
6332         * sysdeps/pthread/stdio-lock.h: Likewise.
6333         * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
6334         * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
6335         * semaphore.h: Likewise.
6336         * sysdeps/pthread/pthread.h: Likewise.
6338         * lockfile.c: <foo.h> -> <bits/foo.h>.
6339         * semaphore.h: Likewise.
6341         * Makefile: (headers): foo.h -> bits/foo.h.
6342         * sysdeps/pthread/Makefile: Likewise.
6344 1997-04-11 01:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6346         * semaphore.c (sem_init): Set sem_spinlock only if available.
6348         * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
6349         asm constraints.
6351 1997-04-09 03:00  Ulrich Drepper  <drepper@cygnus.com>
6353         Update from LinuxThreads 0.6.
6355         * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
6356         and __sched_get_priority_min instead of names without `__'.
6358         * manager.c: Rewrite large parts to implement opaque pthread_t.
6360         * cancel.c: Adapt for opaque pthread_t type.
6361         * condvar.c: Likewise.
6362         * errno.c: Likewise.
6363         * join.c: Likewise.
6364         * mutex.c: Likewise.
6365         * pthread.c: Likewise.
6366         * signals.c: Likewise.
6367         * specific.c: Likewise.
6368         * restart.h: Likewise.
6369         * queue.h: Likewise.
6370         * Examples/ex3.c: Likewise.
6371         * Examples/ex4.c: Likewise.
6372         * sysdeps/pthread/pthread.h: Likewise.
6374         * pthread.c: Accumulate time for all threads in thread manager.
6376         * semaphore.c: Implement fallback implementation for architectures
6377         sometimes missing compare-exchange operations.
6379         * cancel.c (pthread_cancel): Validate handle argument.
6380         * join.c (pthread_join): Likewise.
6381         (pthread_detach): Likewise.
6382         * signals.c (pthread_kill): Likewise.
6384         * spinlock.h (acquire): Use __sched_yield not sched_yield.
6386         * queue.h (enqueue): Enqueue thread according to priority.
6388         * internals.c (struct pthread_start_args): New struct for passing
6389         args to cloning function.
6390         (struct _pthread): Rename to _pthread_descr_struct and adapt for
6391         opaque pthread_t.
6393         * Examples/Makefile (clean): Pass -f option to rm.
6395         * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
6396         and define TEST_FOR_COMPARE_AND_SWAP.
6397         * sysdeps/i386/i486/pt-machine.h: Removed.
6399         * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
6400         to 1024.
6402 1997-04-04 16:38  Ulrich Drepper  <drepper@cygnus.com>
6404         * restart.h (suspend): Clear p_signal before suspending.
6405         (suspend_with_cancellation): Likewise.
6406         Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
6408         * weaks.c: Make __pthread_key_create return 1.
6409         * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
6410         __libc_getspecific, __libc_setspecific, and __libc_key_t.
6411         * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
6412         using libio.
6414 1997-03-19 15:13  Miguel de Icaza  <miguel@nuclecu.unam.mx>
6416         * sysdeps/sparc/pt-machine (RELEASE): Fix.
6418 1997-03-01 07:55  Geoff Keating  <geoffk@ozemail.com.au>
6420         * sysdeps/powerpc/Implies: Added.
6421         * sysdeps/powerpc/pt-machine.h: Added.
6422         * sysdeps/powerpc/semaphorebits.h: Added.
6424 1997-01-22 01:22  Ulrich Drepper  <drepper@cygnus.com>
6426         * pthread.c (__pthread_initial_thread): Correct
6427         initializer.
6428         (__pthread_manager_thread): Likewise.
6429         Reported by Andreas Jaeger.
6431 1997-01-18 22:15  Richard Henderson  <rth@tamu.edu>
6433         Since sigset_t no longer fits in a register, we can't pass in the
6434         thread's initial mask so easily.  Take this opportunity to simplify
6435         the clone implementation by only accepting a single void* argument.
6437         * manager.c (__pthread_manager): Put thread vitals in the thread
6438         struct instead of as arguments through clone.
6439         (pthread_start_thread): Look for them there.
6440         * internals.h (struct _pthread): Add p_initial_fn,
6441         p_initial_fn_arg, p_initial_mask.  Fix __pthread_manager proto.
6442         * pthread.c (pthread_initialize_manager): Revise clone invocation.