Update.
[glibc.git] / linuxthreads / ChangeLog
blobe31fd400e547b044d50bfb00d040a10f48c21cb7
1 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
3         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
4         for __USE_XOPEN2K.
5         * sysdeps/pthread/bits/pthreadtypes.h: Define rwlock types also
6         for __USE_XOPEN2K.  [BZ #320]
8 2004-09-04  Jakub Jelinek  <jakub@redhat.com>
10         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
12 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
14         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
15         the initialization function might throw.
17 2004-08-30  Roland McGrath  <roland@frob.com>
19         * Makefile (libpthread-abi-frozen): New variable.
21 2004-08-26  Roland McGrath  <roland@redhat.com>
23         * configure.in: New file.  If nptl add-on is also selected, barf if
24         explicit and elide ourselves if implicit.
25         * configure: Now generated.
27 2004-08-25  Richard Sandiford  <rsandifo@redhat.com>
29         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h (CENABLE, CDISABLE,
30         __local_multiple_threads): Fix definitions for IS_IN_librt.
31         * sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h: Likewise.
33 2004-08-22  Andreas Schwab  <schwab@suse.de>
35         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO) [IS_IN_librt]:
36         Save gp around CENABLE/CDISABLE calls.
38 2004-08-15  Roland McGrath  <roland@frob.com>
40         * pthread_atfork.c: Update copyright terms including special exception
41         for these trivial files, which are statically linked into executables
42         that use dynamic linking for the significant library code.
44 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
46         * libc-tsd.c: Move resolv.h include before the #if.
47         (__res_maybe_init): New function.  Add libc_hidden_def.
49 2004-08-02  Ulrich Drepper  <drepper@redhat.com>
51         * linuxthreads.texi (Cleanup Handlers): Fix typo.
52         Reported by Bjoern Engelmann <bjengelmann@gmx.de>.
54 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
56         [BZ #284]
57         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
58         instead of clockid_t.
60 2004-07-21  Roland McGrath  <roland@redhat.com>
62         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
64 2004-07-02  Roland McGrath  <roland@redhat.com>
66         * configure: Don't exit.
68 2004-07-20  Alexandre Oliva  <aoliva@redhat.com>
70         * sysdeps/mips/pt-machine.h: Use standard names for ABI macros,
71         include sgidefs.h.
72         * sysdeps/mips/atomicity.h: Likewise.
74 2004-07-19  Alexandre Oliva  <aoliva@redhat.com>
76         * sysdeps/unix/sysv/linux/mips/Makefile (CFLAGS-pt-initfini.s):
77         Remove redundant override that missed -g0.
79 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
81         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
82         (__local_multiple_threads): Define for librt.
83         (SINGLE_THREAD_P): Likewise.
85 2004-07-07  Jakub Jelinek  <jakub@redhat.com>
87         * sysdeps/pthread/getcpuclockid.c (pthread_getcpuclockid): Allow
88         using other thread's clock.
89         * ptclock_gettime.c (__pthread_clock_gettime): Likewise.
90         * ptclock_settime.c (__pthread_clock_settime): Likewise.
91         * internals.h (__pthread_clock_gettime, __pthread_clock_settime):
92         Remove prototypes.
93         Reported by Bernd Schmidt <bernds@redhat.com>.
94         * Makefile (librt-tests): Add tst-clock1.
95         * tst-clock1.c: New test.
97         * sysdeps/x86_64/Versions: New file.
98         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
99         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
101 2004-04-16  Andreas Schwab  <schwab@suse.de>
103         * sysdeps/ia64/tls.h (INIT_SYSINFO): Cast dl_sysinfo to void*.
105 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
107         * sysdeps/s390/pspinlock.c (__pthread_spin_lock,
108         __pthread_spin_trylock): Use constraint "m" instead of "0" for
109         futex.
110         * sysdeps/ia64/pt-machine.h (__compare_and_swap,
111         __compare_and_swap_with_release_semantic, testandset): Use
112         constraint "m" instead of "0" for futex.
114 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
116         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Fix
117         branch offset for a PLT entry.
118         (CDISABLE): Likewise.
120 2004-05-31  Andreas Jaeger  <aj@suse.de>
122         * sysdeps/unix/sysv/linux/mips/Makefile (CFLAGS-pt-initfini.s):
123         Set to -fno-unit-at-a-time.
124         Patch by Dan Kegel <dank@kegel.com>.
126 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
128         * tst-stack1.c: Don't include mcheck.h.
129         (do_test): Make sure user defined stacks aren't reused,
130         don't free them at the end.  [BZ #110]
132 2004-05-02  Jakub Jelinek  <jakub@redhat.com>
134         * manager.c: Include not-cancel.h.
135         (__pthread_manager): Use read_not_cancel instead of __libc_read.
136         (pthread_start_thread, __pthread_manager_sighandler): Use
137         write_not_cancel instead of __libc_write.
138         (pthread_reap_children): Use waitpid_not_cancel instead of
139         __libc_waitpid.
140         * pthread.c: Include not-cancel.h.
141         (__pthread_initialize_minimal, __pthread_create_2_1,
142         pthread_onexit_process, __pthread_message): Use
143         write_not_cancel instead of __libc_write.
144         (__pthread_initialize_manager): Likewise.  Use close_not_cancel
145         instead of __libc_close.
146         (__pthread_reset_main_thread): Use close_not_cancel instead of
147         __libc_close.
148         * join.c: Include not-cancel.h.
149         (__pthread_do_exit, pthread_join, pthread_detach): Use
150         write_not_cancel instead of __libc_write.
151         * semaphore.c: Include not-cancel.h.
152         (__new_sem_post): Use write_not_cancel instead of __libc_write.
153         * specific.c: Include not-cancel.h.
154         (pthread_key_delete): Use write_not_cancel instead of __libc_write.
156 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
158         * Versions (libc): Add __on_exit and __libc_sigaction.
160 2004-04-28  Jakub Jelinek  <jakub@redhat.com>
162         * semaphore.c (sem_timedwait): Return -1 and set errno instead of
163         returning error number [BZ #133].  Patch by <rmhaddad@yahoo.com>.
165 2004-04-22  SUGIOKA Toshinobu  <sugioka@itonet.co.jp>
167         * sysdeps/unix/sysv/linux/sh/vfork.S: Fix wrong function pointer
168         reference in PIC case.
170 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
172         * oldsemaphore.c (SEM_VALUE_MAX): Remove.
174 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
176         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Define
177         for librt.  Save the return value to a safe register.
178         (CDISABLE): Define for librt.  Set the function argument correctly.
180 2004-04-18  Jakub Jelinek  <jakub@redhat.com>
182         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
183         (PSEUDO_CANCEL): Define.
184         (PSEUDO): Use it.
185         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
186         CDISABLE): For librt, append @PLT.
188 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
190         * sysdeps/x86_64/tls.h [!__ASSEMBLER__]: Include tcb-offsets.h.
192         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
193         return it_value { 0, 0 }.
194         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
195         like SIGEV_SIGNAL.
196         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
197         assertion for SIGEV_NONE.
198         (thread_attr_compare): Compare all attributes, not just a partial
199         subset.
201         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
203 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
205         * semaphore.h (SEM_VALUE_MAX): Just use a plain number.
207 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
209         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix last patch.
211 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
213         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
215 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
217         * sysdeps/unix/sysv/linux/mq_notify.c: New file.
219         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE): Define
220         for librt.
221         (CDISABLE): Likewise.
223 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
225         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
226         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
227         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
228         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
229         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
230         Define.
231         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
232         (_POSIX_MESSAGE_PASSING): Define.
234 2004-04-10  Andreas Jaeger  <aj@suse.de>
236         * sysdeps/x86_64/pt-machine.h: Add used attribute to stack_pointer
237         to avoid warnings with GCC 3.5.
239 2004-04-09  Steven Munroe  <sjmunroe@us.ibm.com>
241         * sysdeps/powerpc/tls.h (TLS_INIT_TP): Eliminate lvalue cast from
242         __thread_self assignment.
243         (THREAD_DTV): Replace __thread_register with __thread_self.
244         (INIT_THREAD_SELF): Eliminate lvalue cast from __thread_self
245         assignment.
247 2004-04-08  Alexandre Oliva  <aoliva@redhat.com>
249         * signals.c (pthread_sigmask): Don't ever block or mask
250         __pthread_sig_debug.
252 2004-03-11  Steven Munroe  <sjmunroe@us.ibm.com>
254         * sysdeps/powerpc/tls.h: Remove __powerpc64__ conditional.
256 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
258         * sysdeps/ia64/pt-machine.h (BUSY_WAIT_NOP): Define.
259         * sysdeps/x86_64/pt-machine.h (BUSY_WAIT_NOP): Likewise.
261 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
263         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add HOST_NAME_MAX.
264         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
265         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
266         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
268 2004-03-08  Andreas Jaeger  <aj@suse.de>
270         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT_KERNEL_CHECK):
271         dl_osversion is readonly.
273 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
275         * sysdeps/i386/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
276         _rtlf_global_ro.
277         * sysdeps/ia64/tls.h (INIT_SYSINFO): Likewise.
279 2004-02-20  Steven Munroe  <sjmunroe@us.ibm.com>
281         * sysdeps/unix/sysv/linux/powerpc/ptlongjmp.c [SHARED]: Code only
282         valid for SHARED case.  Correct spelling of __vmx_longjmp.
284         * sysdeps/powerpc/pspinlock.c: Move from here.
285         * sysdeps/powerpc/powerpc32/pspinlock.c: To here.
286         * sysdeps/powerpc/powerpc64/pspinlock.c: New file.
287         * sysdeps/powerpc/powerpc64/pt-machine.h: Define __compare_and_swap32
288         and __compare_and_swap32_with_release_semantics.
290 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
292         * Makefile (generated): Remove tst-stack1.mtrace and tst-stack1-mem.
293         (tests): Remove $(objpfx)tst-stack1-mem.
294         (tst-stack1-ENV): Remove.
295         ($(objpfx)tst-stack1-mem): Remove.
297         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
298         (__syscall_error_handler2): Call CDISABLE.
299         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
300         (__syscall_error_handler2): Call CDISABLE.
302         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
304 2004-02-10  Steven Munroe  <sjmunroe@us.ibm.com>
306         * Makefile (libpthread-routines): Add ptcleanup.
307         * ptlongjmp.c: Removed.
308         * ptcleanup.c: Copied __pthread_cleanup_upto to here. New file.
309         * sysdeps/pthread/ptlongjmp.c: Copied longjmp to here. New file.
310         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
311         Version longjmp, siglongjmp for GLIBC_2.3.4.
312         * sysdeps/unix/sysv/linux/powerpc/ptlongjmp.c: New File.
314 2004-01-22  Andreas Jaeger  <aj@suse.de>
316         * spinlock.c (__pthread_lock): Fix contraint to avoid warning.
317         (__pthread_release): Likewise.
319 2004-01-16  Richard Henderson  <rth@redhat.com>
321         * attr.c: Include ldsodefs.h.
322         (pthread_getattr_np): Don't declare __libc_stack_end.
324 2004-01-09  Steven Munroe  <sjmunroe@us.ibm.com>
326         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
327         [!HAVE_TLS_SUPPORT]: Define SINGLE_THREAD_P using static
328         __lib*_multiple_threads.
329         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
330         [!HAVE_TLS_SUPPORT]: Likewise.
332 2004-01-13  Roland McGrath  <roland@redhat.com>
334         * sysdeps/powerpc/tcb-offsets.sym: Put -- separator line before any
335         conditionals.
337 2004-01-10  Andreas Jaeger  <aj@suse.de>
339         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Add cfi directives.
341 2004-01-01  Andreas Jaeger  <aj@suse.de>
343         * Makefile (generated): Add missing files.
345 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
347         * attr.c (pthread_getattr_np): Make sure stack info returned for
348         main thread does not overlap with any other VMA.
349         Patch by Jakub Jelinek.
351 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
353         * sysdeps/ia64/tls.h: Include dl-sysdep.h.
354         (INIT_SYSINFO): Define.
355         (TLS_INIT_TP): Use it.
357 2003-12-28  Carlos O'Donell  <carlos@baldric.uwo.ca>
359         * attr.c (pthread_getattr_np): Add _STACK_GROWS_UP case.
361 2003-12-26  Jakub Jelinek  <jakub@redhat.com>
363         * sysdeps/pthread/pthread.h (pthread_setcancelstate,
364         pthread_setcanceltype, pthread_cancel, pthread_testcancel): Remove
365         __THROW.
366         * semaphore.h (sem_wait, sem_timedwait): Likewise.
368 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
370         * manager.c (pthread_free): Call _dl_deallocate_tls even for
371         p_userstack threads.
372         * pthread.c (__pthread_initialize_manager): Call _dl_deallocate_tls
373         on error.
374         (pthread_onexit_process): Update comment.
375         * Makefile (tests): Add tst-stack1.  Depend on $(objpfx)tst-stack1-mem.
376         (generated): Add tst-stack1.mtrace and tst-stack1-mem.
377         (tst-stack1-ENV): Set.
378         ($(objpfx)tst-stack1-mem): New.
379         * tst-stack1.c: New test.
381 2003-12-16  Steven Munroe  <sjmunroe@us.ibm.com>
383         * sysdeps/powerpc/tcb-offsets.sym [!__powerpc64__]: Remove
384         conditional so MULTIPLE_THREADS_OFFSET is generated for both.
385         * sysdeps/powerpc/tls.h [!__powerpc64__]: Remove conditional
386         so TLS_MULTIPLE_THREADS_IN_TCB is generated for both.
387         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h:
388         Include tls.h.
390 2003-12-04  Steven Munroe  <sjmunroe@us.ibm.com>
392         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
393         (SINGLE_THREAD_P): Test using thread local p_multiple_threads field.
395 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
397         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Update copyright
398         message.  Add include of <stddef.h>.
399         (INIT_NEW_WAY): New macro.
400         (INIT_OLD_WAY): Likewise.
401         (_init): Add unwind directives.  Invoke
402         __pthread_initialize_minimal() via INIT_NEW_WAY or INIT_OLD_WAY,
403         respectively.
404         (_init_EPILOG_BEGINS): Add unwind-directives.  Drop unused .regstk
405         directive.
406         (_fini): Add unwind directives.  Drop unnecessary .align 16
407         directive (bundles are always 16-byte aligned).
408         (_fini_EPILOG_BEGINS): Add unwind-directives.
410 2003-11-19  David Mosberger  <davidm@hpl.hp.com>
412         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
414 2003-12-10  Andreas Jaeger  <aj@suse.de>
415             Ruediger Oertel  <ro@suse.de>
417         * sysdeps/alpha/elf/pt-initfini.c (__asm__): Remove extra .prologue.
419 2003-11-30  Andreas Jaeger  <aj@suse.de>
421         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
422         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
423         Likewise.
425 2003-11-04  Jakub Jelinek  <jakub@redhat.com>
427         * signals.c (__pthread_sigaction): Set __sighandler[sig].old before
428         __libc_sigaction if it has been one of the special values before.
430 2003-10-06  Carlos O'Donell <carlos@baldric.uwo.ca>
432         * pthread.c (__pthread_self_stack): _STACK_GROWS_UP case added.
433         (__pthread_find_self): Likewise.
434         * manager.c (thread_segment): _STACK_GROWS_UP case added.
436 2003-10-10  Carlos O'Donell  <carlos@baldric.uwo.ca>
438         * linuxthreads/sysdeps/unix/sysv/linux/hppa/malloc-machine.h: New file.
440 2003-10-10  Carlos O'Donell  <carlos@baldric.uwo.ca>
442         * sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h: New file.
444 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
446         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
447         changes.
448         (SAVE_OLDTYPE_0): Fix a typo.
450 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
452         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
453         correct offset.
455 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
457         * Makefile (tests): Add tst-cancel8.
458         * tst-cancel8.c: New test.
460 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
462         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
463         restoring of the old cancellation type.
465 2003-09-10  Chris Demetriou  <cgd@broadcom.com>
467         * sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h: New file.
469 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
471         * sysdeps/pthread/malloc-machine.h [!__libc_maybe_call2] (mutex_init,
472         mutex_lock, mutex_trylock, mutex_unlock): Remove.
474 2003-09-27  Wolfram Gloger  <wg@malloc.de>
476         * sysdeps/pthread/malloc-machine.h: New file.
478 2003-09-18  H.J. Lu  <hongjiu.lu@intel.com>
480         * attr.c (__pthread_attr_init_2_1): Double __guardsize size
481         if NEED_SEPARATE_REGISTER_STACK is defined.
483 2003-09-22  Philip Blundell  <philb@gnu.org>
485         * forward.c: Add _pthread_cleanup_push, _pthread_cleanup_pop.
486         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
487         Likewise.
488         * pthread.c (__pthread_elements): Initialise these new elements.
489         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Use
490         __libc_maybe_call.
491         (__libc_cleanup_pop): Likewise.
493 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
495         * attr.c: Include stdlib.h.
497 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
499         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
501         * tst-attr1.c: New test.
502         * Makefile (tests): Add tst-attr1.
504 2003-09-17  Philip Blundell  <philb@gnu.org>
506         * sysdeps/unix/sysv/linux/arm/vfork.S: Branch to fork if
507         libpthread is loaded.  Elide backwards compatibility code when not
508         required.
510 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
512         * descr.h (manager_thread): Rename to...
513         (__pthread_manager_threadp): ... this.
514         * pthread.c (manager_thread): Define to __pthread_manager_threadp.
515         (__pthread_manager_threadp): New variable.
516         * internals.h (__manager_thread): Define to
517         __pthread_manager_threadp if USE_TLS.
519 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
521         * sysdeps/i386/Makefile (CFLAGS-cancel.c, CFLAGS-manager.c,
522         CFLAGS-pthread.c, CFLAGS-sighandler.c): Add
523         -mpreferred-stack-boundary=4.
525 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
527         * attr.c (pthread_getattr_np): Correctly fill in the stack-related
528         values for the initial thread.
530 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
532         * pthread.c (manager_thread): Remove static, add attribute_hidden.
533         (thread_self_stack): Rename to...
534         (__pthread_self_stack): ... this.  Remove static.
535         (pthread_handle_sigcancel): Use check_thread_self ().
536         (pthread_handle_sigrestart): Likewise.
537         * sighandler.c (__pthread_sighandler, __pthread_sighandler_rt):
538         Likewise.
539         * descr.h (manager_thread): Declare.
540         * internals.h (__pthread_self_stack): New prototype.
541         (__manager_thread): Define.
542         (check_thread_self): New function.
544 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
546         * Makefile (CFLAGS-mutex.c): Add $(uses-callbacks).
547         (CFLAGS-sighandler.c): Change $(exceptions) into $(uses-callbacks).
549 2003-09-12  Jakub Jelinek  <jakub@redhat.com>
551         * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: New.
552         (__SSIZE_T_TYPE): Define to __SWORD_TYPE for gcc 2.95.x and
553         __SLONGWORD_TYPE otherwise.
555 2003-09-11  Steven Munroe  <sjmunroe@us.ibm.com>
557         * sysdeps/powerpc/powerpc64/pt-machine.h [MEMORY_BARRIER]: Use lwsync.
558         [READ_MEMORY_BARRIER]: Define.
559         [WRITE_MEMORY_BARRIER]: Define.
561 2003-09-10  Jakub Jelinek  <jakub@redhat.com>
563         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Move
564         ptr___pthread_cond_timedwait to the end of the structure to avoid
565         breaking Wine unnecessarily.
567 2003-09-08  Jakub Jelinek  <jakub@redhat.com>
569         * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: Remove.
571 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
573         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
574         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
575         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
576         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
577         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
578         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
579         * attr.c (__old_pthread_attr_setstacksize,
580         __old_pthread_attr_setstack): New functions.
581         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
582         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
583         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
584         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
585         * tststack.c: Include limits.h and sys/param.h.
586         (main): Set size to MAX (70 * 1024, PTHREAD_STACK_MIN).
588         * barrier.c (__pthread_barrierattr_getpshared): Always
589         return PTHREAD_PROCESS_PRIVATE.
590         (pthread_barrierattr_setpshared): Return EINVAL if pshared
591         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
593 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
595         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
596         (DL_SYSINFO_IMPLEMENTATION): Add CFI and make sure the code ends
597         up in .text.
599         * barrier.c (pthread_barrierattr_setpshared): We don't handle
600         inter-process barriers.
602 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
604         * Makefile (tests): Add tst-tls1.
605         (module-names): Add tst-tls1mod{,a,b,c,d,e,f}.
606         ($(objpfx)tst-tls1mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
607         ($(objpfx)tst-tls1): New.
608         ($(objpfx)tst-tls2.out): Likewise.
609         (tests): Depend on $(objpfx)tst-tls2.out.
610         * tst-tls1.c: New test.
611         * tst-tls1.h: New.
612         * tst-tls1mod.c: New.
613         * tst-tls1moda.c: New.
614         * tst-tls1modb.c: New.
615         * tst-tls1modc.c: New.
616         * tst-tls1modd.c: New.
617         * tst-tls1mode.c: New.
618         * tst-tls1modf.c: New.
619         * tst-tls2.sh: New test.
621         * internals.h (__pthread_cond_timedwait): New prototype.
622         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
623         ptr___pthread_cond_timedwait.
624         * pthread.c (__pthread_functions): Initialize them.
625         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
626         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
627         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
628         pthread_cond_timedwait@@GLIBC_2.3.2.
630 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
632         * sysdeps/pthread/pthread.h: Don't mark pthread_exit,
633         pthread_join, pthread_cond_wait, and pthread_cond_timedwait with
634         __THROW to match NPTL.
636 2003-08-13  Ulrich Drepper  <drepper@redhat.com>
638         * sysdeps/pthread/Makefile [subdir=rt] (CPPFLAGS): Add
639         -DBROKEN_THREAD_SIGNALS.
641 2003-08-11  Steven Munroe  <sjmunroe@us.ibm.com>
643         * manager.c (pthread_start_thread) [!(USE_TLS && HAVE___THREAD)]:
644         Correct spelling of per thread resolver state.
646 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
648         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
649         (__rtld_lock_default_lock_recursive,
650         __rtld_lock_default_unlock_recursive): Define.
651         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
652         __rtld_lock_unlock_recursive): Define using
653         GL(_dl_rtld_*lock_recursive).
654         * pthread.c (pthread_initialize): Initialize _dl_rtld_lock_recursive
655         and _dl_rtld_unlock_recursive.  Lock GL(_dl_load_lock) the same
656         number of times as GL(_dl_load_lock) using non-mt implementation was
657         nested.
659 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
661         * sysdeps/pthread/bits/typesizes.h (__SSIZE_T_TYPE): Define.
662         * sysdeps/unix/sysv/linux/alpha/bits/typesizes.h (__SSIZE_T_TYPE):
663         Likewise.
664         * sysdeps/unix/sysv/linux/sparc/bits/typesizes.h (__SSIZE_T_TYPE):
665         Likewise.
666         * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: New file.
668         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
669         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
670         PTHREAD_STACK_MIN in comments.
672         * sysdeps/alpha/pt-machine.h (PT_EI): Add
673         __attribute__((always_inline)).
674         * sysdeps/arm/pt-machine.h (PT_EI): Likewise.
675         * sysdeps/cris/pt-machine.h (PT_EI): Likewise.
676         * sysdeps/hppa/pt-machine.h (PT_EI): Likewise.
677         * sysdeps/i386/i686/pt-machine.h (PT_EI): Likewise.
678         * sysdeps/i386/pt-machine.h (PT_EI): Likewise.
679         * sysdeps/ia64/pt-machine.h (PT_EI): Likewise.
680         * sysdeps/m68k/pt-machine.h (PT_EI): Likewise.
681         * sysdeps/mips/pt-machine.h (PT_EI): Likewise.
682         * sysdeps/powerpc/powerpc32/pt-machine.h (PT_EI): Likewise.
683         * sysdeps/powerpc/powerpc64/pt-machine.h (PT_EI): Likewise.
684         * sysdeps/s390/s390-32/pt-machine.h (PT_EI): Likewise.
685         * sysdeps/s390/s390-64/pt-machine.h (PT_EI): Likewise.
686         * sysdeps/sh/pt-machine.h (PT_EI): Likewise.
687         * sysdeps/sparc/sparc32/pt-machine.h (PT_EI): Likewise.
688         * sysdeps/sparc/sparc64/pt-machine.h (PT_EI): Likewise.
689         * sysdeps/x86_64/pt-machine.h (PT_EI): Likewise.
690         * spinlock.h (__pthread_set_own_extricate_if): Likewise.
691         * sysdeps/ia64/tls.h (TLS_INIT_TP): Cast tcbp to __typeof
692         (__thread_self).
693         * Examples/ex13.c (main): Change res type to void * to avoid
694         warnings.
695         * tst-cancel.c (cleanup, inner, tf1, tf2, tf3): Comment out.
697 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
699         * pthread.c (init_one_static_tls, __pthread_init_static_tls): New
700         functions.
701         (pthread_initialize): Initialize GL(dl_init_static_tls).
703 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
705         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
706         before __timer_dealloc.
707         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
708         Don't call list_unlink.
710 2003-07-29  Roland McGrath  <roland@redhat.com>
712         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
714 2003-07-25  Roland McGrath  <roland@redhat.com>
716         * manager.c (pthread_start_thread): Fix typo in last change.
718 2003-07-14  Guido Guenther  <agx@sigxcpu.org>
720         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: Add IS_IN_librt,
721         use L() for local labels.
723 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
725         * descr.h (struct _pthread_descr_struct): Provide p_res member
726         even if USE_TLS && HAVE___THREAD.
727         * sysdeps/pthread/res-state.c (__res_state): Return __resp
728         if USE___THREAD.
729         * manager.c: Include resolv.h.
730         (pthread_start_thread): Initialize __resp.
731         * libc-tls-loc.c (__res_state): Return __resp.
732         * Makefile (tests): Add tst-_res1.
733         (modules-names, extra-objs, test-extras, test-modules): Add support
734         for test modules.
735         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
736         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
737         -lpthread.
738         * tst-_res1.c: New test.
739         * tst-_res1mod1.c: New test.
740         * tst-_res1mod2.c: New test.
742 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
744         * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_push and
745         __libc_cleanup_pop.
747         * tst-cancel-wrappers.sh: lseek and llseek are no cancellation points.
749 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
751         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Fix typo
752         in test for compilation in libc.
754 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
756         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
757         different symbol for the cancellation syscall wrapper and
758         non-cancellation syscall wrapper.
759         (PSEUDO_END): Define.
761 2003-07-05  Richard Henderson  <rth@redhat.com>
763         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
765 2003-06-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
767         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Support cancellation
768         in librt.
770 2003-06-21  Andreas Schwab  <schwab@suse.de>
772         * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Support cancellation
773         in librt.
775 2003-06-20  Richard Henderson  <rth@redhat.com>
777         * sysdeps/unix/sysv/linux/alpha/Makefile (libpthread-routines):
778         Remove ptw-osf_sigprocmask.
780 2003-06-18  Jakub Jelinek  <jakub@redhat.com>
782         * internals.h (__librt_multiple_threads, __librt_enable_asynccancel,
783         __librt_disable_asynccancel): Declare.
784         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET, LIBC_CANCEL_HANDLED): Define
785         for IS_IN_librt.
786         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Support cancellation
787         in librt.
788         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
789         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
790         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
791         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
792         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
793         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
794         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
795         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
796         * sysdeps/x86_64/tcb-offsets.sym: New file.
797         * sysdeps/x86_64/Makefile: New file.
798         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
799         * Versions (libc): Export __librt_enable_asynccancel,
800         __librt_disable_asynccancel and __librt_multiple_threads as
801         GLIBC_PRIVATE.
802         * libc-cancellation.c (__librt_multiple_threads,
803         __librt_enable_asynccancel, __librt_disable_asynccancel): New aliases.
805 2003-06-12  Steven Munroe  <sjmunroe@us.ibm.com>
807         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
808         (SINGLE_THREAD_P): Replace @ got notation with @toc.
810 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
812         * sysdeps/powerpc/pspinlock.c (__pthread_spin_init): Fix
813         initializer [PR libc/5052].
815 2003-06-09  Andreas Schwab  <schwab@suse.de>
817         * Makefile: Move inclusion of ../Rules down after extra-objs is
818         fully known.
820 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
822         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: New sequences for
823         5+ arg syscalls only needed for PIC.
824         Patch by Ralph Siemsen <ralphs@netwinder.org>.
826 2003-06-05  Richard Henderson  <rth@redhat.com>
828         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use
829         and require CFI assembler directives.
830         * sysdeps/unix/sysv/linux/alpha/vfork.S: Likewise.
832 2003-05-30  Andreas Jaeger  <aj@suse.de>
834         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h
835         (SAVESTK_0): Add CFI directives.
836         (SAVESTK_3): Likewise.
837         (SAVESTK_5): Likewise.
838         (RESTSTK_0): Likewise.
839         (RESTSTK_3): Likewise.
840         (RESTSTK_5): Likewise.
842 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
844         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Add \n to error
845         messages.
847 2003-05-04  Roland McGrath  <roland@redhat.com>
849         * Makefile ($(objpfx)../libc.so): New target.
851 2003-04-26  Ulrich Drepper  <drepper@redhat.com>
853         * pthread.c (__pthread_initialize_manager): Remove one last
854         p_multiple_threads call.
856 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
858         * pthread.c (__pthread_initialize_manager): Subtract
859         TLS_PRE_TCB_SIZE bytes from tcbp to get to descr.
860         * manager.c (pthread_handle_create): Subtract or add TLS_PRE_TCB_SIZE
861         instead of sizeof (pthread_descr).
862         (pthread_free): Add TLS_PRE_TCB_SIZE instead of sizeof (pthread_descr).
863         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define to 0.
864         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
865         pthread_descr.
866         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
867         to TLS_TCB_ALIGN.
868         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
869         tcbp.
870         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
871         unneccessarily.
872         (NO_TLS_OFFSET): Define.
874 2003-04-22  Roland McGrath  <roland@redhat.com>
876         * Makeconfig (shared-thread-library): Reverse link order to work
877         around linker bug.
879 2003-04-20  Ulrich Drepper  <drepper@redhat.com>
881         * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Make sure the
882         compiler knows we use the ldt_entry variable and that the syscall
883         modifies the memory.
885         * internals.h: Split pthread_functions definition into...
886         * sysdeps/pthread/pthread-functions.h: ...new file.
888         * sysdeps/i386/useldt.h: Include <sysdep.h>.
890 2003-04-13  Jakub Jelinek  <jakub@redhat.com>
892         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Rename macros to
893         match changes in NPTL sysdep-cancel.h.
895 2003-04-11  Roland McGrath  <roland@redhat.com>
897         * Makefile (multidir): Don't set the variable here with $(shell ...).
898         ($(objpfx)multidir.mk): New target, generated makefile; include that.
899         (generated): Append it.
901 2003-04-10  Jakub Jelinek  <jakub@redhat.com>
903         * Makefile (multidir, crti-objs, crtn-objs): New variables.
904         (generated-dirs): Add pathname component of multidir.
905         (omit-deps, extra-objs): Include $(multidir)/crt? as well.
906         ($(objpfx)libpthread.so): Depend on $(multidir)/crt?.o as well.
907         ($(objpfx)$(multidir), $(objpfx)$(multidir)/crti.o,
908         $(objpfx)$(multidir)/crtn.o): New.
909         * sysdeps/unix/sysv/linux/sparc/Makefile: Removed.
910         * sysdeps/unix/sysv/linux/x86_64/Makefile (LDFLAGS-pthread.so,
911         before-compile, generated): Don't generate and use specs.
912         ($(objpfx)specs): Remove.
914 2003-04-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
916         * sysdeps/s390/pspinlock.c (__pthread_spin_unlock): Fix asm contraints.
918 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
920         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h (PSEUDO): Add
921         missing ; after ENTRY use [PR libc/4997].
923 2003-04-03  Jakub Jelinek  <jakub@redhat.com>
925         * pthread.c (pthread_initialize): Unblock __pthread_sig_cancel
926         in case the parent blocked it.
928 2003-04-02  Jakub Jelinek  <jakub@redhat.com>
930         * Makefile (libpthread-routines): Add pthread_atfork.
931         (libpthread-static-only-routines): Add pthread_atfork.
933 2003-04-01  Jakub Jelinek  <jakub@redhat.com>
935         * pthread.c (__pthread_wait_for_restart_signal): Use
936         __pthread_sigsuspend instead of sigsuspend.
937         * internals.h (__pthread_sigsuspend): New prototype.
938         * Makefile (libpthread-routines): Add pt-sigsuspend.
939         (tests): Add tst-cancel7.
940         * sysdeps/unix/sysv/linux/pt-sigsuspend.c: New file.
941         * sysdeps/unix/sysv/linux/alpha/pt-sigsuspend.S: New file.
942         * sysdeps/unix/sysv/linux/ia64/pt-sigsuspend.c: New file.
943         * sysdeps/unix/sysv/linux/s390/s390-64/pt-sigsuspend.c: New file.
944         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-sigsuspend.c: New file.
945         * sysdeps/unix/sysv/linux/x86_64/pt-sigsuspend.c: New file.
946         * tst-cancel7.c: New test.
948 2003-03-31  Alexandre Oliva  <aoliva@redhat.com>
950         * alloca_cutoff.c: Include internals.h.
951         * sysdeps/pthread/errno-loc.c: Include linuxthreads/internals.h.
952         * sysdeps/pthread/herrno-loc.c: Likewise.
953         * sysdeps/pthread/res-state.c: Likewise.
955 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
957         * sysdeps/pthread/bits/typesizes.h: New file.
958         * sysdeps/unix/sysv/linux/alpha/bits/typesizes.h: New file.
959         * sysdeps/unix/sysv/linux/sparc/bits/typesizes.h: New file.
961 2003-03-24  Daniel Jacobowitz  <drow@mvista.com>
963         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
964         (DOARGS_5, DOARGS_6, DOARGS_7): Rewritten.
966 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
968         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
970 2003-03-21  Daniel Jacobowitz  <drow@mvista.com>
972         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
973         (SINGLE_THREAD_P_PIC): Use "reg" instead of "lr".
975 2003-03-21  Jakub Jelinek  <jakub@redhat.com>
977         * sysdeps/i386/tls.h [__ASSUME_SET_THREAD_AREA_SYSCALL]
978         (TLS_SETUP_GS_SEGMENT): Fix a typo.
980 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
982         * sysdeps/pthread/Makefile: Fix cut&paste error.
984 2003-03-18  Roland McGrath  <roland@redhat.com>
986         * Versions (libpthread: GLIBC_2.2): Remove
987         pthread_barrierattr_getpshared, never really existed.
988         (libpthread: GLIBC_2.0): Move __pthread_initialize to ...
989         (libpthread: GLIBC_PRIVATE): ... here.
991 2003-03-14  Jakub Jelinek  <jakub@redhat.com>
993         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
994         * sysdeps/unix/sysv/linux/sparc/Makefile ($(objpfx)specs): Use full
995         path for crt[in].o.
997 2003-03-14  Alexandre Oliva  <aoliva@redhat.com>
999         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't .set
1000         mips2 on new abi.
1001         * sysdeps/mips/pt-machine.h (__compare_and_swap): Likewise.
1002         Handle 64-bit longs on n64.
1004 2003-03-07  Jakub Jelinek  <jakub@redhat.com>
1006         * sysdeps/ia64/pspinlock.c (__pthread_spin_lock,
1007         __pthread_spin_trylock): Rewritten.
1009 2003-03-06  Ulrich Drepper  <drepper@redhat.com>
1011         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
1012         recent kernels.
1014 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
1016         * sysdeps/pthread/timer_create.c (timer_create): Return correct
1017         error for CPU clocks.
1019         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1020         _POSIX_MONOTONIC_CLOCK.
1021         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1023 2003-03-01  Roland McGrath  <roland@redhat.com>
1025         * sysdeps/powerpc/powerpc64/pt-machine.h
1026         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
1027         New macros.
1028         * sysdeps/powerpc/tls.h: Don't define those here.
1030         * sysdeps/powerpc/tls.h [! USE_TLS && !__powerpc64__]: Define
1031         tcbhead_t with multiple_threads member.
1032         [USE_TLS] (tcbhead_t): Define minimal one-word version.
1033         [USE_TLS && !__powerpc64__] (TLS_MULTIPLE_THREADS_IN_TCB): Define.
1034         * sysdeps/powerpc/tcb-offsets.sym [USE_TLS]: Use tls.h macros to
1035         derive thread register offset of p_multiple_threads member.
1037         * descr.h (struct _pthread_descr_struct) [!USE_TLS || !TLS_DTV_AT_TP]:
1038         Conditionalize p_header member on this.
1039         [TLS_MULTIPLE_THREADS_IN_TCB]: Add p_multiple_threads alternatively.
1040         * sysdeps/ia64/tls.h [USE_TLS] (TLS_MULTIPLE_THREADS_IN_TCB): Define.
1041         * sysdeps/sh/tls.h: Likewise.
1042         * sysdeps/ia64/tcb-offsets.sym [USE_TLS]: Use p_multiple_threads.
1043         * sysdeps/sh/tcb-offsets.sym: Likewise.
1044         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
1045         (SINGLE_THREAD_P): Likewise.
1046         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1047         (SINGLE_THREAD_P): Likewise.
1048         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1049         (SINGLE_THREAD_P): Likewise.
1050         * pthread.c (__pthread_initialize_manager): Likewise.
1051         * manager.c (pthread_handle_create): Likewise.
1053         * sysdeps/powerpc/tls.h [HAVE_TLS_SUPPORT]: Define USE_TLS and all
1054         related macros.
1056 2003-01-31  Steven Munroe  <sjmunroe@us.ibm.com>
1058         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S [SHARED]:
1059         Conditionalize .toc section magic on this.
1061 2003-02-21  Roland McGrath  <roland@redhat.com>
1063         * cancel.c (__pthread_perform_cleanup): Call __libc_thread_freeres
1064         instead of __rpc_thread_destroy.
1066 2003-02-21  Jakub Jelinek  <jakub@redhat.com>
1068         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Call
1069         __fork instead of branching to it if BROKEN_SPARC_WDISP22.
1070         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
1071         Fix typo.
1072         * sysdeps/unix/sysv/linux/sparc/Makefile (specs): Add ./ prefix
1073         to crti.o and crtn.o.
1074         * sysdeps/unix/sysv/linux/x86_64/Makefile (specs): Likewise.
1076 2003-02-21  Roland McGrath  <roland@redhat.com>
1078         * Makefile (install-lib-ldscripts): New variable.
1080 2003-02-20  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
1082         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: Avoid short
1083         interprocedure branches.
1085 2003-02-19  Ulrich Drepper  <drepper@redhat.com>
1087         * specific.c (pthread_key_delete_helper): Don't use GETMEM, we
1088         need the target thread's lock.
1090 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
1092         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
1093         and LOGIN_NAME_MAX.
1095 2003-02-17  Kevin B. Hendricks  <kevin.hendricks@sympatico.ca>
1096             Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
1098         * sysdeps/powerpc/Makefile: Handle tcb-offsets.sym.
1099         * sysdeps/powerpc/tcb-offsets.sym: New file.
1100         * sysdeps/powerpc/tls.h: New file.
1101         * sysdeps/powerpc/powerpc32/pt-machine.h (FLOATING_STACKS): Define.
1102         (ARCH_STACK_MAX_SIZE): Define.
1103         (THREAD_SELF): Define.
1104         (INIT_THREAD_SELF): Define.
1105         (THREAD_GETMEM): Define.
1106         (THREAD_GETMEM_NC): Define.
1107         (THREAD_SETMEM): Define.
1108         (THREAD_SETMEM_NC): Define.
1109         (__thread_self): Declare.
1110         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Adjust
1111         for thread register.
1113 2003-02-14  Steven Munroe  <sjmunroe@us.ibm.com>
1115         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
1116         Check pthread_create existance, not __pthread_fork.
1118 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
1120         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
1122 2003-02-10  Jakub Jelinek  <jakub@redhat.com>
1124         * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Check
1125         pthread_create existance, not __pthread_fork.
1126         * sysdeps/unix/sysv/linux/i386/vfork.S (__vfork): Likewise.
1127         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Likewise.
1128         * sysdeps/unix/sysv/linux/m68k/vfork.S (__vfork): Likewise.
1129         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
1130         Likewise.
1131         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
1132         * sysdeps/unix/sysv/linux/x86_64/vfork.S (__vfork): Likewise.
1133         * sysdeps/unix/sysv/linux/sh/vfork.S (__vfork): Likewise.
1134         Add .weak pthread_create.
1135         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Fix a typo.
1136         Check pthread_create existance, not __pthread_fork.
1137         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
1138         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Branch to
1139         __fork whenever libpthread.so is loaded.
1141 2003-02-09  Andreas Jaeger  <aj@suse.de>
1143         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h:
1144         Rework: %r9 is destroyed by functions so don't use it as
1145         temporary, align stack correctly, fix parameter for CDISABLE.
1147 2003-02-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1149         * sysdeps/sh/Makefile: New file.
1150         * sysdeps/sh/tcb-offsets.sym: Likewise.
1151         * sysdeps/sh/tls.h: Don't include sysdep.h. Move include
1152         of linuxthreads/descr.h after the definition of THREAD_SELF.
1153         (tcbhead_t): Use IA64 type tcbhead_t for TLS case.
1154         (TLS_TCB_SIZE): Set size of tcbhead_t.
1155         (TLS_PRE_TCB_SIZE): Define.
1156         (INSTALL_NEW_DTV): Set dtv of tcbhead_t structure instead of
1157         a member of thread structure.
1158         (THREAD_DTV): Likewise.
1159         (TLS_INIT_TP_EXPENSIVE): Remove.
1160         (TLS_INIT_TP): Set gbr register only.
1161         (THREAD_SELF): New.
1162         (INIT_THREAD_SELF): Likewise.
1163         (NONTLS_INIT_TP): New.
1164         * sysdeps/unix/sysv/linux/sh/pt-initfini.c (__fpscr_values):
1165         Remove.
1166         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Add
1167         SYSCALL_INST_PAD macro after DO_CALL.
1168         (SINGLE_THREAD_P): Fix non-PIC and TLS case so to read the
1169         correct variable.
1170         * sysdeps/unix/sysv/linux/sh/vfork.S (__vfork): Branch to __fork
1171         whenever libpthread.so is loaded.
1173 2003-02-08  Andreas Schwab  <schwab@suse.de>
1175         * sysdeps/unix/sysv/linux/m68k/vfork.S: Branch to __fork whenever
1176         libpthread.so is loaded.
1178 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
1180         * sysdeps/unix/sysv/linux/i386/vfork.S: Make sure
1181         __ASSUME_VFORK_SYSCALL is not defined if the kernel headers have
1182         no __NR_vfork definition.
1184 2003-02-07  Jakub Jelinek  <jakub@redhat.com>
1186         * tst-popen2.c: New test.
1187         * Makefile (tests): Add tst-popen2.
1188         * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Branch to __fork
1189         whenever libpthread.so is loaded.
1190         * sysdeps/unix/sysv/linux/i386/vfork.S (__vfork): Likewise.
1191         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Likewise.
1192         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
1193         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
1194         Likewise.
1195         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
1196         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
1197         * sysdeps/unix/sysv/linux/x86_64/vfork.S (__vfork): Likewise.
1199 2003-02-05  Ulrich Drepper  <drepper@redhat.com>
1201         * sysdeps/pthread/bits/libc-lock.h (__libc_once): Set control
1202         variable for non-libpthread case to the same value the
1203         pthread_once function would use.
1205 2003-02-03  Jakub Jelinek  <jakub@redhat.com>
1207         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): If
1208         BROKEN_SPARC_WDISP22, handle SHARED the same way as non-SHARED.
1210 2003-02-04  Andreas Jaeger  <aj@suse.de>
1212         * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Do not use
1213         multi-line strings.
1215 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
1217         * sysdeps/s390/tls.h (TLS_INIT_TP): Return NULL, not 0.
1219 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
1221         * sysdeps/alpha/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1222         THREAD_SETMEM, THREAD_SETMEM_NC): Avoid warnings about unused self
1223         variable.
1224         * sysdeps/ia64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1225         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1226         * sysdeps/s390/s390-32/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1227         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1228         * sysdeps/s390/s390-64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1229         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1230         * sysdeps/sh/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1231         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1232         * sysdeps/sparc/sparc32/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1233         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1234         * sysdeps/sparc/sparc64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1235         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1237 2003-01-27  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1239         * sysdeps/s390/s390-32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
1240         Define TLS versions.
1241         * sysdeps/s390/s390-64/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
1242         Likewise.
1243         * sysdeps/s390/tls.h [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE,
1244         TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE, TLS_TCB_ALIGN, TLS_TCB_AT_TP,
1245         INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_DTV):
1246         Define.
1247         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Use
1248         branch with 32 bit offset.
1249         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: Likewise.
1251 2003-01-24  Jakub Jelinek  <jakub@redhat.com>
1253         * sysdeps/sparc/sparc32/pt-machine.h (__thread_self): Change to %g7,
1254         as required by TLS ABI.
1255         * sysdeps/sparc/sparc64/pt-machine.h (__thread_self): Likewise.
1256         * sysdeps/sparc/tls.h [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE,
1257         TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE, TLS_TCB_ALIGN, TLS_TCB_AT_TP,
1258         INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_DTV):
1259         Define.
1260         [HAVE_TLS_SUPPORT]: Include descr.h and sysdep.h.
1261         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Use %g7
1262         instead of %g6 for thread pointer.
1263         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
1264         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1265         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
1267 2003-01-25  Guido Guenther  <agx@sigxcpu.org>
1269         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
1270         * sysdeps/unix/sysv/linux/mips/Makefile: New file.
1272 2003-01-20  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1274         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: Avoid non pc relative
1275         reference to __fork.
1277 2003-01-17  Richard Henderson  <rth@redhat.com>
1279         * sysdeps/alpha/tls.h (tcbhead_t): Clarify second member.
1280         (TLS_TCB_SIZE, TLS_TCB_ALIGN): Set for tcbhead_t.
1281         (TLS_PRE_TCB_SIZE): New.
1282         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Update for
1283         new ia64-style thread pointer layout.
1284         (THREAD_GETMEM, THREAD_GETMEM_NC): New.
1285         (THREAD_SETMEM, THREAD_SETMEM_NC): New.
1286         * sysdeps/unix/sysv/linux/alpha/vfork.S: Don't tail-call to __fork
1287         if !SHARED.
1289 2003-01-15  Jakub Jelinek  <jakub@redhat.com>
1291         * sysdeps/ia64/tls.h (tcbhead_t): Use the TLS ABI required layout
1292         if USE_TLS only.
1293         (NONTLS_INIT_TP): Revert last change.
1294         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define to
1295         offsetof (tcbhead_t, multiple_threads) if USE_TLS not defined.
1297 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
1299         * pthread.c (_pthread_initialize_minimal): Use
1300         GL(dl_tls_dtv_slotinfo_list) != NULL to check whether TLS has
1301         been already initialized.
1303 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
1305         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize head->sysinfo even
1306         if not SHARED.
1308 2003-01-15  Jakub Jelinek  <jakub@redhat.com>
1310         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init,
1311         __libc_lock_init_recursive): Initialize fields directly.
1313 2003-01-15  Jakub Jelinek  <jakub@redhat.com>
1315         * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Allow
1316         __fork to be far away from __vfork ifndef SHARED.
1317         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
1318         Likewise.
1319         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
1320         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
1321         Add a missing instruction.
1322         * sysdeps/unix/sysv/linux/arm/vfork.S (__vfork): Conditionally
1323         branch to __fork even if __NR_vfork is not defined.
1325 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
1327         * tst-cancel-wrappers.sh: Allow .__*_asynccancel functions names
1328         as well.
1330 2003-01-14  Steven Munroe  <sjmunroe@us.ibm.com>
1332         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
1334 2003-01-14  Jakub Jelinek  <jakub@redhat.com>
1336         * sysdeps/unix/sysv/linux/ia64/vfork.S (JUMPTARGET): Remove.
1338 2003-01-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1340         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Avoid
1341         unterminated string literals.
1342         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Likewise.
1344 2003-01-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1346         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
1347         (PSEUDO): Code reordering.  Move CENABLE and CDISABLE literals from
1348         PSEUDO_END to PSEUDO.
1349         (PSEUDO_END): Remove.
1350         (SINGLE_THREAD_P): Save an instruction.
1351         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add missing
1352         parameter to SINGLE_THREAD_P call.
1353         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
1354         Code reordering.
1356 2003-01-10  Andreas Schwab  <schwab@suse.de>
1358         * sysdeps/unix/sysv/linux/m68k/vfork.S: New file.
1360 2003-01-10  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1362         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Setup
1363         backchain in pseudo_cancel.  Minor code improvements.
1364         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
1365         Likewise.
1367 2003-01-10  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1369         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
1370         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
1372 2002-01-12  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
1374         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
1376 2002-01-09  Richard Henderson  <rth@redhat.com>
1378         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Assume only
1379         ret follows pseudo, and thus avoid branch-to-branch in cancel
1380         case.  Use SYSCALL_ERROR_LABEL.
1382 2003-01-11  Philip Blundell  <philb@gnu.org>
1384         * sysdeps/unix/sysv/linux/arm/vfork.S: New file.
1385         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h (PSEUDO_RET):
1386         Correctly unstack lr.
1387         (UNDOARGS_5): Fix ordering of pushes and pops.
1388         (SINGLE_THREAD_P_PIC): New.
1389         (SINGLE_THREAD_P_INT): New.
1390         (SINGLE_THREAD_P): Implement in terms of above.  Restore lr if it
1391         was stacked.
1392         (PSEUDO): Use SINGLE_THREAD_P_INT.
1394 2003-01-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1396         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
1398 2003-01-11  Jakub Jelinek  <jakub@redhat.com>
1400         * sysdeps/ia64/tls.h (tcbhead_t): Change into dtv_t *, void *.
1401         [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN,
1402         TLS_TCB_SIZE, TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, TLS_DTV_AT_TP,
1403         INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_SELF,
1404         INIT_THREAD_SELF): Define.
1405         [HAVE_TLS_SUPPORT]: Include descr.h.
1406         (NONTLS_INIT_TP): Point __thread_self at the end of dummy
1407         struct _pthread_descr_struct.
1408         * sysdeps/ia64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1409         THREAD_SETMEM, THREAD_SETMEM_NC): Define using THREAD_SELF,
1410         not __thread_self.
1411         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Adjust
1412         computation.
1413         * pthread.c (__pthread_initialize_minimal): Use tcbp, not self
1414         for TCB pointer.
1415         (__pthread_initialize_manager): Rename tcb to mgr.
1416         Use tcbp for TCB pointer, if TLS_DTV_AT_TP set mgr to sizeof (struct
1417         _pthread_descr) below tcbp, otherwise to tcbp.
1418         * manager.c (pthread_handle_create): If TLS_DTV_AT_TP, set
1419         new_thread to be below _dl_allocate_tls ().  Adjust new_thread back
1420         before freeing.  Fix clone arguments if report_events and USE_TLS.
1421         (pthread_free): Adjust th back before freeing.
1423 2003-01-10  Steven Munroe  <sjmunroe@us.ibm.com>
1425         * sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile: Moved to ...
1426         * sysdeps/unix/sysv/linux/powerpc/Makefile: ...here.
1427         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New File.
1429 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
1431         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
1432         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
1433         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1434         [__ASSEMBLER__] (SINGLE_THREAD_P): Remove trailing ;;.
1435         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
1436         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
1437         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
1438         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
1439         * tst-popen.c: New test.
1440         * Makefile (tests): Add tst-popen.
1442 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
1444         * sysdeps/unix/sysv/linux/sigwait.c (do_sigwait): Add
1445         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
1447 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
1449         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use
1450         PSEUDO_PREPARE_ARGS.  Fix branch condition after SINGLE_THREAD_P.
1452 2003-01-06  Philip Blundell  <philb@gnu.org>
1454         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: New file.
1456 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
1458         * internals.h (LIBC_CANCEL_HANDLED): Define.
1459         * sysdeps/unix/sysv/linux/sigwait.c (LIBC_CANCEL_HANDLED): Add.
1460         * signals.c (LIBC_CANCEL_HANDLED): Add.
1461         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
1462         * tst-cancel-wrappers.sh: Remove all exceptions.
1464         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
1466 2003-01-05  Andreas Schwab  <schwab@suse.de>
1468         * sysdeps/m68k/Makefile: New file, use -fPIC for nonshared
1469         objects.
1471         * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h (SINGLE_THREAD_P):
1472         Fix for PIC.
1473         (CENABLE): Likewise.
1474         (CDISABLE): Likewise.
1476 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
1478         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
1479         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
1481         * Makefile (libc.so-no-z-defs): Define to yes.
1483 2003-01-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1485         * sysdeps/sh/tls.h: Include dl-sysdep.h and stdint.h.
1486         (tcbhead_t): Add multiple_threads member.
1487         (TLS_INIT_TP_EXPENSIVE): Define.
1488         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Don't use multi-line
1489         strings.  Remove unused code.
1490         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
1492 2003-01-04  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
1494         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
1495         * sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile: New file.
1497 2003-01-04  Jakub Jelinek  <jakub@redhat.com>
1499         * internals.h (LIBC_THREAD_GETMEM, LIBC_THREAD_SETMEM): Define
1500         even if NOT_IN_libc is defined.
1502 2003-01-05  Jakub Jelinek  <jakub@redhat.com>
1504         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
1505         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
1506         * sysdeps/s390/Makefile: New file.
1507         * sysdeps/s390/tcb-offsets.sym: New file.
1508         * sysdeps/s390/tls.h: New file.
1510 2003-01-03  Richard Henderson  <rth@redhat.com>
1512         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
1514 2003-01-03  Andreas Jaeger  <aj@suse.de>
1516         * sysdeps/pthread/bits/libc-tsd.h: Declare weak_extern functions.
1518 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
1520         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
1522 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
1524         * tst-cancel-wrappers.sh: Exclude sigwait.c as well, it does not have
1525         cancellation tests.
1527 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
1529         * internals.h (struct pthread_functions): Rename
1530         ptr_pthread_cond_* fields to ptr___pthread_cond_*.
1531         * pthread.c (pthread_functions): Adjust.
1532         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
1533         pthread_cond_*@GLIBC_2.0 compatibility symbols.
1534         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
1535         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
1536         and pthread_cond_wait.
1538         * sysdeps/pthread/bits/pthreadtypes.h (__pthread_cond_align_t): New
1539         type.
1540         (pthread_cond_t): Add __align member, shorten __padding.
1541         * sysdeps/pthread/pthread.h (PHTREAD_COND_INITIALIZER): Initialize
1542         __padding and __align too.
1544         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call2): Add
1545         __builtin_expect.
1546         * sysdeps/pthread/sigaction.c: New file.
1547         * sysdeps/unix/sysv/linux/raise.c: New file.
1548         * sysdeps/unix/sysv/linux/sigwait.c: New file.
1549         * sysdeps/unix/sysv/linux/fork.c (__pthread_fork): Protect
1550         weak_extern with #ifndef SHARED.
1551         * sysdeps/unix/sysv/linux/jmp-unwind.c (__pthread_cleanup_upto):
1552         Likewise.
1553         * signals.c (__sigaction): Renamed to...
1554         (__pthread_sigaction): ... this.
1555         (__sigaction): New strong alias, #ifdef SHARED only.
1556         (sigaction): Protect with #ifdef SHARED.
1557         (sigwait): Renamed to...
1558         (__pthread_sigwait): ... this.
1559         (sigwait): New strong alias, #ifdef SHARED only.
1560         (raise): Renamed to...
1561         (__pthread_raise): ... this.
1562         (raise): New strong alias, #ifdef SHARED only.
1563         * internals.h (__pthread_sigaction, __pthread_sigwait,
1564         __pthread_raise): New prototypes.
1565         (struct pthread_functions): Add ptr_pthread_sigaction,
1566         ptr_pthread_sigwait, ptr_pthread_raise.
1567         * pthread.c (pthread_functions): Renamed to...
1568         (__pthread_functions): ... this.  No longer static, no longer
1569         SHARED only.  Initialize ptr_pthread_sigaction, ptr_pthread_sigwait
1570         and ptr_pthread_raise.
1571         [SHARED] (ptr_pthread_functions): Change to &__pthread_functions.
1572         * libc-cancellation.c (__pthread_thread_self): Remove weak_extern.
1573         * ptfork.c (__fork, __vfork): Protect with #ifdef SHARED.
1574         * ptlongjmp.c (siglongjmp, longjmp): Protect with #ifdef SHARED.
1576         * Makefile (tests, tests-static): Add tst-cancel-static.
1577         * tst-cancel-static.c: New test.
1579 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
1581         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
1583 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
1585         * sysdeps/pthread/bits/pthreadtypes.h (pthread_cond_t): Add padding.
1586         * condvar.c: Add symbol versioning.  The compatibility versions
1587         are the same as the change in the interface does not effect this
1588         implementation.
1589         * Versions [libpthread]: Add definitions for new pthread_cond_*
1590         interfaces for version GLIBC_2.3.2.
1592 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
1594         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
1595         __register_atfork.
1596         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
1597         for __register_atfork.
1599 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
1601         * sysdeps/i386/i686/pt-machine.h: Use __ASSEMBLER__ instead of
1602         ASSEMBLER test macro.
1603         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Likewise.
1604         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1605         * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Likewise.
1606         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1607         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1608         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1610         * sysdeps/pthread/errno-loc.c (__errno_location): Add
1611         libc_hidden_def.
1612         * sysdeps/pthread/herrno-loc.c (__h_errno_location): Likewise.
1613         * sysdeps/pthread/res-state.c (__res_state): Likewise.
1614         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
1615         __libc_current_sigrtmax): Likewise.
1616         * Versions [libc] (GLIBC_PRIVATE): Remove __libc_internal_tsd_get,
1617         __libc_internal_tsd_set, __libc_internal_tsd_address,
1618         __libc_alloca_cutoff.
1619         [libpthread] (GLIBC_PRIVATE): Remove __libc_internal_tsd_get,
1620         __libc_internal_tsd_set, __libc_internal_tsd_address.
1622         * sysdeps/pthread/list.h: Remove assert.h include.
1623         * sysdeps/unix/sysv/linux/fork.c: Include <fork.h>, not "fork.h".
1625         * sysdeps/pthread/list.h: New file.
1626         * sysdeps/unix/sysv/linux/jmp-unwind.c: New file.
1627         * sysdeps/unix/sysv/linux/fork.c: New file.
1628         * sysdeps/unix/sysv/linux/fork.h: New file.
1629         * sysdeps/unix/sysv/linux/ia64/fork.h: New file.
1630         * sysdeps/unix/sysv/linux/sparc/fork.h: New file.
1631         * sysdeps/unix/sysv/linux/register-atfork.c: New file.
1632         * sysdeps/unix/sysv/linux/unregister-atfork.c: New file.
1633         * sysdeps/unix/sysv/linux/Makefile: New file.
1634         * sysdeps/unix/sysv/linux/Versions: New file.
1635         * ptlongjmp.c (pthread_cleanup_upto): Rename to...
1636         (__pthread_cleanup_upto): ...this. Add targetframe argument,
1637         use it instead of currentframe.  No longer static.
1638         (siglongjmp, longjmp): Remove pthread_cleanup_upto calls.
1639         * internals.h (__pthread_cleanup_upto, __pthread_fork): New prototypes.
1640         (struct pthread_functions): Add ptr_pthread_fork,
1641         ptr_pthread_cleanup_upto.
1642         * pthread.c (pthread_functions): Initialize ptr_pthread_fork and
1643         ptr_pthread_cleanup_upto.
1644         * ptfork.c: Include fork.h.
1645         (struct handler_list, struct handler_list_block): Remove.
1646         (pthread_atfork_lock, pthread_atfork_prepare, pthread_atfork_parent,
1647         pthread_atfork_child): Remove.
1648         (pthread_insert_list, __pthread_atfork, pthread_call_handlers): Remove.
1649         (__pthread_fork): New function.
1650         (__fork, __vfork): Call __libc_fork.
1651         * Makefile (libpthread-routines): Add old_pthread_atfork.
1652         (libpthread-nonshared): Add pthread_atfork.
1653         (others): Depend on $(objpfx)libpthread_nonshared.a.
1654         ($(objpfx)libpthread_nonshared.a): New rule.
1655         (install): Depend on $(inst_libdir)/libpthread.so.
1656         ($(inst_libdir)/libpthread.so, $(inst_libdir)/libpthread_nonshared.a):
1657         New rules.
1658         (tests): Depend on libpthread_nonshared.a too.
1659         * old_pthread_atfork.c: New file.
1660         * pthread_atfork.c: New file.
1661         * Makeconfig (shared-thread-library): Include libpthread_nonshared.a
1662         too.
1664 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
1666         * forward.c: Make all functions available by default again.  It
1667         caused too much trouble.
1668         * internals.h (struct pthread_functions): Rename ptr_pthread_exit
1669         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
1670         ptr___pthread_attr_init_2_*.
1671         * pthread.c (pthread_functions): Adjust.
1673 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
1675         * libc_pthread_init.c (__libc_pthread_init): Remove
1676         MULTIPLE_THREADS_OFFSET check.
1677         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
1678         (SYSINFO_OFFSET): Remove.
1679         * sysdeps/i386/Makefile [csu] (gen-as-const-headers): Add
1680         tcb-offsets.sym.
1681         * sysdeps/i386/tcb-offsets.sym: New file.
1682         * sysdeps/pthread/tcb-offsets.h: New file.
1683         * sysdeps/sparc/sparc32/tls.h: Removed.
1684         * sysdeps/sparc/sparc64/tls.h: Move...
1685         * sysdeps/sparc/tls.h: ...here.  Include tcb-offsets.h in assembler.
1686         * sysdeps/sparc/Makefile: New file.
1687         * sysdeps/sparc/tcb-offsets.sym: New file.
1688         * sysdeps/ia64/tls.h: Include tcb-offsets.h in assembler.
1689         * sysdeps/ia64/Makefile: New file.
1690         * sysdeps/ia64/tcb-offsets.sym: New file.
1691         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
1692         (MULTIPLE_THREADS_OFFSET): Remove.
1693         Replace defined MULTIPLE_THREADS_OFFSET
1694         with defined FLOATING_STACKS && USE___THREAD.
1695         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1696         (MULTIPLE_THREADS_OFFSET): Remove.
1697         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1698         (MULTIPLE_THREADS_OFFSET): Remove.
1699         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1700         (MULTIPLE_THREADS_OFFSET): Remove.
1701         * pthread.c (__pthread_initialize_manager): Remove
1702         MULTIPLE_THREADS_OFFSET cbeck.
1704         * tst-cancel-wrappers.sh: Add line continuations.
1706 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
1708         * sysdeps/pthread/bits/libc-tsd.h: Include linuxthreads/descr.h
1709         and bits/libc-lock.h.
1710         (__libc_internal_tsd_get, __libc_internal_tsd_set,
1711         __libc_internal_tsd_address): Remove.
1712         (__pthread_internal_tsd_address, __pthread_internal_tsd_get,
1713         __pthread_internal_tsd_set): New weak_externs.
1714         (__libc_tsd_address, __libc_tsd_get, __libc_tsd_set): Define
1715         using __libc_maybe_call2.
1716         (__libc_tsd_key_t): Move to ...
1717         * descr.h (__libc_tsd_key_t): ...here.
1718         Remove bits/libc-tsd.h include.
1719         * sysdeps/pthread/errno-loc.c: New file.
1720         * sysdeps/pthread/herrno-loc.c: New file.
1721         * sysdeps/pthread/res-state.c: New file.
1722         * libc-cancellation.c (THREAD_GETMEM, THREAD_SETMEM): Remove.
1723         (__libc_enable_asynccancel, __libc_disable_asynccancel): Use
1724         thread_self unconditionally.  Use LIBC_THREAD_[SG]ETMEM instead
1725         of THREAD_[SG]ETMEM.
1726         * specific.c (libc_internal_tsd_set): Renamed to...
1727         __pthread_internal_tsd_set.  Remove static.
1728         (libc_internal_tsd_get): Renamed to...
1729         __pthread_internal_tsd_get.  Remove static.
1730         (libc_internal_tsd_address): Renamed to...
1731         __pthread_internal_tsd_address.  Remove static.
1732         (__libc_internal_tsd_set, __libc_internal_tsd_get,
1733         __libc_internal_tsd_address, __libc_alloca_cutoff): Remove.
1734         * internals.h [!NOT_IN_libc] (LIBC_THREAD_GETMEM, LIBC_THREAD_SETMEM):
1735         Define.
1736         (__pthread_internal_tsd_set, __pthread_internal_tsd_get,
1737         __pthread_internal_tsd_address): New prototypes.
1738         (struct pthread_functions): Add
1739         ptr_pthread_internal_tsd_([sg]et|address) fields.
1740         [!NOT_IN_libc && !FLOATING_STACKS] (thread_self): Define.
1741         * pthread.c (pthread_functions) [!USE_TLS && !HAVE___THREAD]:
1742         Initialize ptr_pthread_internal_tsd_([sg]et|address) fields.
1743         * Versions (libpthread): Remove __libc_alloca_cutoff@GLIBC_PRIVATE.
1744         * alloca_cutoff.c: New file.
1745         * no-tsd.c: Removed.
1746         * Makefile (routines): Remove no-tsd.  Add alloca_cutoff.
1747         * pt-system.c (system): Remove cancellation handling.
1748         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
1749         cancellation routines.
1751         * sysdeps/i386/tls.h: Include dl-sysdep.h and stdint.h.
1752         (tcbhead_t): Add sysinfo field.
1753         (SYSINFO_OFFSET, INIT_SYSINFO): Define.
1754         (TLS_INIT_TP): Use INIT_SYSINFO.
1755         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
1756         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
1757         (MULTIPLE_THREADS_OFFSET): Adjust.
1758         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1759         (MULTIPLE_THREADS_OFFSET): Likewise.
1760         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1761         (MULTIPLE_THREADS_OFFSET): Likewise.
1762         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1763         (MULTIPLE_THREADS_OFFSET): Likewise.
1764         * descr.h: Include stdint.h.
1765         (struct _pthread_descr_struct): Add p_header.data.sysinfo field.
1767 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
1769         * libc_pthread_init.c: Include stdlib.h.
1770         * sysdeps/i386/tls.h (tcbhead_t): Add multiple_threads member.
1771         (TLS_INIT_TP_EXPENSIVE): Define.
1772         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call,
1773         __libc_maybe_call2): In _LIBC check SHARED define.
1774         * sysdeps/ia64/tls.h: New file.
1775         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
1776         * sysdeps/unix/sysv/linux/ia64/Makefile: New file.
1777         * sysdeps/x86_64/tls.h (TLS_INIT_TP_EXPENSIVE): Define.
1778         * sysdeps/sparc/sparc32/tls.h: New file.
1779         * sysdeps/sparc/sparc64/tls.h: New file.
1780         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
1781         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
1782         * Makefile (tests): Add tst-cancel[1-6].
1783         (tests-reverse): Add tst-cancel5.
1784         Link libc.so before libpthread.so for tests-reverse.
1785         * tst-cancel1.c: New file.
1786         * tst-cancel2.c: New file.
1787         * tst-cancel3.c: New file.
1788         * tst-cancel4.c: New file.
1789         * tst-cancel5.c: New file.
1790         * tst-cancel6.c: New file.
1792 2002-12-27  Andreas Schwab  <schwab@suse.de>
1794         * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: New file.
1796 2002-12-22  Roland McGrath  <roland@redhat.com>
1798         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
1800 2002-12-21  Ulrich Drepper  <drepper@redhat.com>
1802         * pthread.c (init_rtsigs): Remove incomplete __builtin_expect.
1803         Reported by Art Hass <ahaas@airmail.net>.
1805 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
1807         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
1808         Use return 0 as 6th argument to FORWARD4.
1810 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
1812         * sysdeps/i386/useldt.h (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Only
1813         define if __ASSUME_LDT_WORKS > 0.
1814         * libc-cancellation.c (THREAD_GETMEM, THREAD_SETMEM): Redefine to
1815         struct member access if !FLOATING_STACKS.
1816         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
1818 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
1820         * internals.h (__pthread_thread_self): New prototype.
1821         (struct pthread_functions): Add ptr_pthread_thread_self field.
1822         * pthread.c (pthread_functions): Initialize ptr_pthread_thread_self.
1823         (__pthread_thread_self): New function.
1824         * libc-cancellation.c (__pthread_thread_self): Add weak_extern.
1825         (__libc_enable_asynccancel, __libc_disable_asynccancel): Don't
1826         use thread_self() directly if not FLOATING_STACKS.
1828 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
1830         * sysdeps/x86_64/pt-machine.h: Guard most of the header
1831         with #ifndef __ASSEMBLER__.
1832         * pthread.c (pthread_functions): Use SHLIB_COMPAT around
1833         pthread_attr_init_2_0 use.
1835 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
1837         * wrapsyscall.c: Removed.
1838         * weaks.c: Removed.
1839         * Makefile (distribute): Add tst-cancel-wrappers.sh.
1840         (routines): Remove weaks.  Add forward,
1841         libc_pthread_init, libc-cancellation.
1842         (shared-only-routines): Remove weaks.  Add forward.
1843         (libpthread-routines): Remove wrapsyscall.
1844         Add ptw-write, ptw-read, ptw-close, ptw-fcntl, ptw-accept,
1845         ptw-connect, ptw-recv, ptw-recvfrom, ptw-recvmsg, ptw-send,
1846         ptw-sendmsg, ptw-sendto, ptw-fsync, ptw-lseek, ptw-lseek64,
1847         ptw-llseek, ptw-msync, ptw-nanosleep, ptw-open, ptw-open64,
1848         ptw-pause, ptw-pread, ptw-pread64, ptw-pwrite, ptw-pwrite64,
1849         ptw-tcdrain, ptw-wait, ptw-waitpid, pt-system, pt-allocrtsig.
1850         (libpthread-shared-only-routines): Add pt-allocrtsig.
1851         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
1852         ($(objpfx)tst-cancel-wrappers.out): New rule.
1853         * sysdeps/pthread/bits/libc-lock.h: Include linuxthreads/internals.h
1854         if in libc.
1855         (__libc_maybe_call): In libpthread.* don't check for existance
1856         of the function.
1857         (__libc_maybe_call2): Define.
1858         (__libc_lock_init, __libc_lock_fini, __libc_lock_lock,
1859         __libc_lock_trylock, __libc_lock_unlock): Use it.
1860         * sysdeps/pthread/flockfile.c: New file.
1861         * sysdeps/pthread/ftrylockfile.c: New file.
1862         * sysdeps/pthread/funlockfile.c: New file.
1863         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
1864         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
1865         * sysdeps/unix/sysv/linux/allocrtsig.c: New file.
1866         * libc-cancellation.c: New file.
1867         * forward.c: New file.
1868         * libc_pthread_init.c: New file.
1869         * pt-system.c: New file.
1870         * pthread.c: Remove locale.h.
1871         (__pthread_manager_thread): Initialize multiple_threads.
1872         (__pthread_multiple_threads): Declare.
1873         (pthread_functions): New variable.
1874         (__pthread_initialize_minimal): Remove __uselocale call.
1875         Call __libc_pthread_init.
1876         (__pthread_initialize_manager): Initialize __pthread_multiple_threads,
1877         initial thread's multiple_threads and __libc_multiple_threads.
1878         Check MULTIPLE_THREADS_OFFSET value. Initialize manager thread's
1879         multiple_threads.
1880         (pthread_setschedparam, pthread_getschedparam): Rename to __
1881         prefixed variants.  Add strong_alias.
1882         (current_rtmin, current_rtmax, __libc_current_sigrtmin,
1883         __libc_current_sigrtmax, __libc_allocate_rtsig): Remove.
1884         (init_rtsigs): Use __libc_current_sigrtmin_private.
1885         (pthread_initialize): Only call init_rtsigs if
1886         !__ASSUME_REALTIME_SIGNALS.
1887         (__pthread_require_wrappers, __pthread_require_lockfile): Remove.
1888         * internals.h (__pthread_attr_destroy, __pthread_attr_setdetachstate,
1889         __pthread_attr_getdetachstate, __pthread_attr_setschedparam,
1890         __pthread_attr_getschedparam, __pthread_attr_setschedpolicy,
1891         __pthread_attr_getschedpolicy, __pthread_attr_setinheritsched,
1892         __pthread_attr_getinheritsched, __pthread_attr_setscope,
1893         __pthread_attr_getscope, __pthread_cond_init,
1894         __pthread_cond_destroy, __pthread_cond_wait,
1895         __pthread_cond_signal, __pthread_cond_broadcast,
1896         __pthread_condattr_init, __pthread_condattr_destroy,
1897         __pthread_equal, __pthread_getschedparam,
1898         __pthread_setschedparam, __pthread_setcancelstate,
1899         __pthread_setcanceltype, __pthread_enable_asynccancel,
1900         __libc_enable_asynccancel, __libc_pthread_init): New prototype.
1901         (__pthread_mutex_init, __pthread_mutex_destroy,
1902         __pthread_mutex_lock, __pthread_mutex_unlock,
1903         __pthread_mutex_trylock): Likewise.
1904         Add hidden_proto.
1905         (struct pthread_functions): New type.
1906         (__libc_pthread_functions): New variable.
1907         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define.
1908         * descr.h (struct _pthread_descr_struct): Add
1909         p_header.data.multiple_threads field.
1910         * manager.c (pthread_handle_create): Initialize multiple_threads.
1911         * cancel.c (__pthread_enable_asynccancel,
1912         __pthread_disable_asynccancel): New functions.
1913         (__pthread_provide_wrappers): Remove.
1914         (pthread_setcancelstate, pthread_setcanceltype): Rename to __
1915         prefixed variants.  Add strong_alias.
1916         * condvar.c (pthread_cond_init, pthread_cond_destroy,
1917         pthread_cond_wait, pthread_cond_signal, pthread_cond_broadcast,
1918         pthread_condattr_init, pthread_condattr_destroy): Likewise.
1919         * join.c (pthread_exit): Likewise.
1920         * attr.c (pthread_attr_destroy, pthread_attr_setdetachstate,
1921         pthread_attr_getdetachstate, pthread_attr_setschedparam,
1922         pthread_attr_getschedparam, pthread_attr_setschedpolicy,
1923         pthread_attr_getschedpolicy, pthread_attr_setinheritsched,
1924         pthread_attr_getinheritsched, pthread_attr_setscope,
1925         pthread_attr_getscope): Likewise.
1926         * mutex.c (__pthread_mutex_init, __pthread_mutex_destroy,
1927         __pthread_mutex_lock, __pthread_mutex_unlock,
1928         __pthread_mutex_trylock): Add hidden_def.
1929         * Versions (libc): Add __libc_pthread_init,
1930         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
1931         __libc_allocate_rtsig_private @@GLIBC_PRIVATE.
1932         * lockfile.c: Remove some USE_IN_LIBIO guards.
1933         (__pthread_provide_lockfile): Remove.
1934         * pt-allocrtsig.c: New file.
1935         * tst-cancel-wrappers.sh: New test.
1937 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
1939         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
1940         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
1941         * wrapsyscall.c: Remove creat, poll, pselect, readv, select,
1942         sigpause, sigsuspend, sigwaitinfo, waitid, and writev wrappers.
1944 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
1946         * wrapsyscall.c (CANCELABLE_SYSCALL): Don't define function as
1947         weak.  There is no reason for that.
1948         (CANCELABLE_SYSCALL_VA): Likewise.
1950 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
1952         * wrapsyscall.c: Add wrappers for creat, poll, pselect, readv, select,
1953         sigpause, __xpg_sigpause, sigsuspend, sigwaitinfo, waitid, and writev.
1954         * Versions: Export creat, poll, pselect, readv, select, sigpause,
1955         __xpg_sigpause, sigsuspend, sigwaitinfo, waitid, and writev from
1956         libpthread in version GLIBC_2.3.2.
1958 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
1960         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
1962 2002-12-05  Roland McGrath  <roland@redhat.com>
1964         * pthread.c (__pthread_initialize_minimal)
1965         [USE_TLS && SHARED && !USE___THREAD]: Initialize TLS and set up the
1966         TCB if the dynamic linker didn't do it at startup.
1968         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
1969         string.
1970         (TLS_DO_SET_THREAD_AREA, TLS_DO_MODIFY_LDT, TLS_SETUP_GS_SEGMENT):
1971         Submacros updated.
1972         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
1973         * sysdeps/alpha/tls.h (TLS_INIT_TP): Likewise (always zero).
1975 2002-12-03  Roland McGrath  <roland@redhat.com>
1977         * pthread.c (pthread_initialize) [SHARED]: Copy dl_error_tsd value
1978         from dynamic linker internal cell to new libc cell.
1980 2002-11-28  Roland McGrath  <roland@redhat.com>
1982         * tst-context.c: #define IS_IN_libpthread around #include <tls.h>
1983         before other headers, so FLOATING_STACKS is not defined wrongly.
1985         * sysdeps/i386/tls.h [!IS_IN_libpthread]: Enable TLS support
1986         even if [! FLOATING_STACKS].
1987         (TLS_DO_MODIFY_LDT_KERNEL_CHECK): New macro.
1988         If not under [__ASSUME_LDT_WORKS > 0], then do a runtime check of
1989         dl_osversion >= 2.3.99 and fatal if not.
1990         (TLS_DO_MODIFY_LDT): Use it.
1992 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
1994         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
1995         require it to 200112L.  Remove _POSIX_POLL and _POSIX_SELECT.
1996         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1998 2002-11-19  Ulrich Drepper  <drepper@redhat.com>
2000         * Versions (libc: GLIBC_2.0): Remove names of functions which are
2001         not defined in libc.
2002         * Makefile (shared-only-routines): Add weaks.
2003         * weaks.c: Remove functions which are not exported from libc.so.
2005 2002-11-14  Roland McGrath  <roland@redhat.com>
2007         * libc-tsd.c: New file.
2008         * Makefile (distribute): Add it.
2009         (libc-link.so): New variable.
2010         ($(objpfx)libpthread.so): Depend on that instead of libc.so file name.
2011         (libc-ok-for-link): New variable.
2012         [$(versioning) = yes]: Include $(common-objpfx)tls.make and define
2013         libc-ok-for-link to $(use-thread).
2014         [$(libc-ok-for-link) = no]
2015         (libc-link.so): Set to $(objpfx)libc.so, not $(common-objpfx)libc.so.
2016         ($(objpfx)libc_pic_lite.a,$(objpfx)libc_pic_lite.os, $(objpfx)libc.so):
2017         New targets.
2018         (generated): Append them.
2019         (extra-objs): Append libc-tsd.os.
2021         * libc-tls-loc.c: New file.
2022         * Makefile (libpthread-routines): Add it.
2024 2002-11-14  Andreas Schwab  <schwab@suse.de>
2026         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Fix unterminated
2027         string.
2029 2002-11-13  Roland McGrath  <roland@redhat.com>
2031         * Examples/ex6.c (main): Improve error reporting.
2033 2002-11-04  Ulrich Drepper  <drepper@redhat.com>
2035         * sysdeps/i386/Makefile: Compile pthread.c and sighandler.c with
2036         -fno-omit-frame-pointer.  Patch by Andreas Steinmetz <ast@domdv.de>.
2038         * sysdeps/i386/useldt.h [PIC] (USETLS_LOAD_EBX): Use correct input
2039         register number.
2040         (DO_SET_THREAD_AREA): Mark asm output specifiers correctly.
2042 2002-10-22  Jakub Jelinek  <jakub@redhat.com>
2044         * manager.c (pthread_start_thread): Call __uselocale even
2045         if [! SHARED].  Patch by Leon Kanter <leon@geon.donetsk.ua>.
2047 2002-10-17  Roland McGrath  <roland@redhat.com>
2049         * Makefile (unload): Don't link in libpthread.so.
2050         ($(objpfx)unload.out): Do depend on it.
2051         * unload.c (main): Improve error reporting.
2053 2002-10-09  Roland McGrath  <roland@redhat.com>
2055         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
2056         Under [__PIC__], call the function via the pointer fetched for
2057         comparison rather than a call by name that uses the PLT.
2058         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
2059         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
2060         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
2061         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
2062         (__libc_key_create, __libc_getspecific, __libc_setspecific)
2063         (__libc_atfork): Use it.
2065         * pthread.c [SHARED] (__libc_dl_error_tsd): New function.
2066         (pthread_initialize) [SHARED]: Set _dl_error_catch_tsd to that.
2067         * Versions (libc: GLIBC_PRIVATE): Add __libc_dl_error_tsd.
2068         (ld: GLIBC_PRIVATE): Set removed.
2070 2002-10-11  Ulrich Drepper  <drepper@redhat.com>
2072         * sysdeps/unix/sysv/linux/execve.c: New file.
2074 2002-10-09  Jakub Jelinek  <jakub@redhat.com>
2076         * no-tsd.c: Include stdlib.h.
2078 2002-10-07  Jakub Jelinek  <jakub@redhat.com>
2080         * sysdeps/unix/sysv/linux/allocalim.h: New file.
2081         * descr.h (struct _pthread_descr_struct): Add p_alloca_cutoff
2082         field.
2083         * manager.c (__pthread_allocate_stack): Add out_stacksize argument.
2084         Pass stack size to caller.
2085         (pthread_handle_create): Set p_alloca_cutoff.
2086         * pthread.c (__pthread_initial_thread): Use C99 designated
2087         initializers.  Set p_alloca_cutoff.
2088         (__pthread_manager_thread): Likewise.
2089         (__pthread_initialize_minimal) [USE_TLS]: Set p_alloca_cutoff
2090         for initial thread.
2091         (__pthread_init_max_stacksize): Possibly decrease p_alloca_cutoff
2092         for initial thread.
2093         (__pthread_initialize_manager) [USE_TLS]: Set p_alloca_cutoff
2094         for manager thread.
2095         * specific.c (__libc_alloca_cutoff): New function.
2096         * no-tsd.c (__libc_alloca_cutoff): New function.
2097         * Versions: Export __libc_alloca_cutoff@@GLIBC_PRIVATE from libc
2098         and libpthread.
2100 2002-10-02  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2102         * sysdeps/sh/pt-machine.h: Make C code ifndef'ed with __ASSEMBLER__.
2103         * sysdeps/sh/tls.h: Likewise.
2104         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
2106 2002-09-29  Jakub Jelinek  <jakub@redhat.com>
2108         * sysdeps/pthread/tst-timer.c (main): Clear
2109         SIGEV2.sigev_notify_attributes.
2111 2002-09-29  Ulrich Drepper  <drepper@redhat.com>
2113         * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Don't use
2114         INLINE_SYSCALL for set_thread_area syscall.
2116 2002-09-28  Roland McGrath  <roland@redhat.com>
2118         * pthread.c (__pthread_reset_main_thread) [FLOATING_STACKS]:
2119         Don't call setrlimit, since we did no prior bogon we need to undo.
2121 2002-09-27  Roland McGrath  <roland@redhat.com>
2123         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Don't include <pt-machine.h>.
2125 2002-09-24  Roland McGrath  <roland@redhat.com>
2127         * sysdeps/x86_64/tls.h: New file.
2129 2002-09-23  Roland McGrath  <roland@redhat.com>
2131         * Examples/ex13.c (dump_mut): int -> size_t for counter.
2133 2002-09-18  Bruno Haible  <bruno@clisp.org>
2135         * Examples/ex10.c (thread): Fail if pthread_mutex_timedlock() returns
2136         an unexpected error code.
2138         * internals.h (__pthread_message): Add const to first parameter type.
2139         * pthread.c (__pthread_message): Likewise.
2141         * sysdeps/unix/sysv/linux/configure: Moved to ../sysdeps/pthread.
2143 2002-09-17  Roland McGrath  <roland@redhat.com>
2145         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT, TLS_DO_SET_THREAD_AREA):
2146         Set the descriptor limit to the full 4GB, so %gs:OFFSET works for any
2147         offset (positive or negative) relative to the thread struct.
2148         * sysdeps/i386/useldt.h (DO_MODIFY_LDT, DO_SET_THREAD_AREA): Likewise.
2150 2002-09-12  Jakub Jelinek  <jakub@redhat.com>
2152         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Move...
2153         * sysdeps/unix/sysv/linux/sparc/Makefile: ...here.
2154         Replace /usr/lib/crt[in].o with crt[in].o too.
2156 2002-09-11  Steven Munroe  <sjmunroe@us.ibm.com>
2158         * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
2160 2002-09-04  Bruno Haible  <bruno@clisp.org>
2162         * pthread.c: Include <sys/time.h>.
2163         (is_smp_system): Move to sysdeps/unix/sysv/linux/smp.h.
2164         * sysdeps/unix/sysv/linux/smp.h: New file, extracted from pthread.c.
2165         * Makefile (distribute): Add smp.h to the list.
2167 2002-09-04  Bruno Haible  <bruno@clisp.org>
2169         * sysdeps/alpha/pt-machine.h: Choose different include file location
2170         on non-Linux platforms.
2172         * wrapsyscall.c (PROMOTE_INTEGRAL_TYPE): New macro.
2173         (open, open64): Change va_arg argument type to the integral type to
2174         which mode_t promotes.
2176         * sysdeps/pthread/tst-timer.c (main): Don't assume anything about
2177         the structure of 'struct sigevent'.
2179         * errno.c (__errno_location, __h_errno_location, __res_state):
2180         Use prototype function definitions.
2182 2002-07-29  Steven Munroe  <sjmunroe@us.ibm.com>
2184         * shlib-versions: Set libpthread version to 2.3 for powerpc64.
2185         * sysdeps/powerpc/pt-machine.h: moved to...
2186         * sysdeps/powerpc/powerpc32/pt-machine.h: ...here
2187         * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
2189 2002-09-02  Roland McGrath  <roland@redhat.com>
2191         * sysdeps/powerpc/Makefile (CFLAGS-pt-initfini.s): New variable.
2193 2002-09-01  Roland McGrath  <roland@redhat.com>
2195         * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t): Add new keys
2196         CTYPE_B, CTYPE_TOLOWER, CTYPE_TOUPPER.
2198         * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_address): New macro.
2199         (__libc_internal_tsd_address): Declare it.
2200         * Versions (libc, ld, libpthread: GLIBC_PRIVATE): Add
2201         __libc_internal_tsd_address.
2202         * specific.c (libc_internal_tsd_address): New function.
2203         (__libc_internal_tsd_address): New variable.
2204         * no-tsd.c (__libc_internal_tsd_address): New variable.
2206 2002-08-31  Ulrich Drepper  <drepper@redhat.com>
2208         * Makefile: Don't use rule for crt%.o, spell it out as rules for
2209         crti.o and crtn.o.
2211 2002-08-30  Roland McGrath  <roland@redhat.com>
2213         * Makefile (extra-objs, omit-deps): Add crtn.
2214         ($(objpfx)libpthread.so): Depend on $(objpfx)crtn.o.
2215         ($(objpfx)libpthread.so: +postinit): Append $(objpfx)crtn.o.
2216         ($(objpfx)crtn.S): New target.
2217         ($(objpfx)crt%.o): Pattern rule replaces crti.o target.
2218         (generated): Add crtn.S.
2220         * sysdeps/unix/sysv/linux/x86_64/Makefile ($(objpfx)specs): Massage
2221         crtn.o pathname too.
2223 2002-08-30  Jakub Jelinek  <jakub@redhat.com>
2225         * pthread.c (__pthread_initialize_minimal): Call __uselocale even
2226         if [! SHARED].
2228 2002-08-30  Roland McGrath  <roland@redhat.com>
2230         * tst-static-locale.c: New file.
2231         * Makefile (tests, tests-static): Add it.
2233 2002-04-24  Steven Munroe  <sjmunroe@us.ibm.com>
2235         * spinlock.c (__pthread_lock): Fix spurious wakeup
2236         handling.  Don't clear lowest bit of list pointer as sign the thread
2237         is still on the wait list.  Don't restart after spurious wakeup
2238         with spinning to get the lock.
2239         (__pthread_unlock): Take set lowest bit into account when handling
2240         pointer to list elements.
2241         Patch by Steve Munroe <sjmunroe@us.ibm.com>.
2243 2002-08-28  Roland McGrath  <roland@redhat.com>
2245         * sysdeps/pthread/timer_routines.c (thread_func): Fix type in cast.
2247 2002-08-28  Jakub Jelinek  <jakub@redhat.com>
2249         * sysdeps/unix/sysv/linux/hppa/aio_cancel.c: New file.
2250         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
2251         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
2253 2002-08-28  Ulrich Drepper  <drepper@redhat.com>
2255         * sysdeps/pthread/timer_routines.c (thread_func): Change return
2256         type to void and add casts in use to avoid warnings with all gcc
2257         versions.
2259 2002-08-08  Jakub Jelinek  <jakub@redhat.com>
2261         * sysdeps/unix/sysv/linux/bits/local_lim.h (PTHREAD_THREADS_MAX):
2262         Bump to 16384.
2263         * manager.c (__pthread_handles): Remove.
2264         * pthandles.c: New file.
2265         * pthread.c (__pthread_initialize_minimal): Initialize
2266         __pthread_handles[0] and __pthread_handles[1].
2267         * Makefile (libpthread-routines): Add pthandles (must be last).
2269 2002-08-26  Brian Youmans  <3diff@gnu.org>
2271         * Examples/ex10.c: Corrected version number in Lesser GPL copying
2272         permission notice from 2 to 2.1.
2273         * Examples/ex11.c: Likewise.
2274         * Examples/ex13.c: Likewise.
2275         * Examples/ex8.c: Likewise.
2276         * Examples/ex9.c: Likewise.
2277         * barrier.c: Likewise.
2278         * events.c: Likewise.
2279         * lockfile.c: Likewise.
2280         * no-tsd.c: Likewise.
2281         * pt-machine.c: Likewise.
2282         * ptclock_gettime.c: Likewise.
2283         * ptclock_settime.c: Likewise.
2284         * rwlock.c: Likewise.
2285         * sysdeps/alpha/pspinlock.c: Likewise.
2286         * sysdeps/alpha/pt-machine.h: Likewise.
2287         * sysdeps/arm/pspinlock.c: Likewise.
2288         * sysdeps/arm/pt-machine.h: Likewise.
2289         * sysdeps/cris/pspinlock.c: Likewise.
2290         * sysdeps/cris/pt-machine.h: Likewise.
2291         * sysdeps/hppa/pspinlock.c: Likewise.
2292         * sysdeps/hppa/pt-machine.h: Likewise.
2293         * sysdeps/i386/i686/pt-machine.h: Likewise.
2294         * sysdeps/i386/pspinlock.c: Likewise.
2295         * sysdeps/i386/pt-machine.h: Likewise.
2296         * sysdeps/i386/useldt.h: Likewise.
2297         * sysdeps/ia64/pspinlock.c: Likewise.
2298         * sysdeps/ia64/pt-machine.h: Likewise.
2299         * sysdeps/m68k/pspinlock.c: Likewise.
2300         * sysdeps/m68k/pt-machine.h: Likewise.
2301         * sysdeps/mips/pspinlock.c: Likewise.
2302         * sysdeps/mips/pt-machine.h: Likewise.
2303         * sysdeps/powerpc/pspinlock.c: Likewise.
2304         * sysdeps/powerpc/pt-machine.h: Likewise.
2305         * sysdeps/pthread/bits/initspin.h: Likewise.
2306         * sysdeps/pthread/bits/libc-lock.h: Likewise.
2307         * sysdeps/pthread/bits/libc-tsd.h: Likewise.
2308         * sysdeps/pthread/getcpuclockid.c: Likewise.
2309         * sysdeps/pthread/posix-timer.h: Likewise.
2310         * sysdeps/pthread/timer_create.c: Likewise.
2311         * sysdeps/pthread/timer_delete.c: Likewise.
2312         * sysdeps/pthread/timer_getoverr.c: Likewise.
2313         * sysdeps/pthread/timer_gettime.c: Likewise.
2314         * sysdeps/pthread/timer_routines.c: Likewise.
2315         * sysdeps/pthread/timer_settime.c: Likewise.
2316         * sysdeps/pthread/tst-timer.c: Likewise.
2317         * sysdeps/s390/pspinlock.c: Likewise.
2318         * sysdeps/s390/s390-32/pt-machine.h: Likewise.
2319         * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2320         * sysdeps/sh/pspinlock.c: Likewise.
2321         * sysdeps/sh/pt-machine.h: Likewise.
2322         * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
2323         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2324         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
2325         * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
2326         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2327         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
2328         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
2329         * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
2330         * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
2331         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2332         * tststack.c: Likewise.
2333         * unload.c: Likewise.
2334         * weaks.c: Likewise.
2335         * wrapsyscall.c: Likewise.
2337         * sysdeps/pthread/pt-initfini.c: Changed copying
2338         permission notice to Lesser GPL from Library GPL, including the
2339         references in the special exception.
2340         * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Likewise.
2341         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Likewise.
2342         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c:
2343         Likewise.
2344         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c:
2345         Likewise.
2346         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Likewise.
2348 2002-08-26  Ulrich Drepper  <drepper@redhat.com>
2350         * Examples/ex10.c (thread): tv_nsec == 1000000000 is already
2351         overflow [PR libc/4244].
2353 2002-08-25  Ulrich Drepper  <drepper@redhat.com>
2355         * sysdeps/pthread/timer_routines.c (thread_func): Make the
2356         compiler happy by adding a return statement which will never be
2357         reached.
2359         * tst-context.c (main): Cast to long before casting to pointer.
2361         * Examples/ex17.c (main): Use correct format string.
2363         * Examples/ex9.c (thread): Remove incorrect return statement.
2365 2002-08-23  Ulrich Drepper  <drepper@redhat.com>
2367         * pthread.c (__linuxthreads_version): New global constant.
2369 2002-08-23  Andreas Jaeger  <aj@suse.de>
2371         * sysdeps/x86_64/pt-machine.h: Use %fs instead of %gs
2372         as thread specific register.
2373         (testandset): Fix inline asm.
2374         (THREAD_GETMEM): Fix inline asm.
2376 2002-08-22  Roland McGrath  <roland@redhat.com>
2378         * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Remove [HAVE_TLS_SUPPORT]
2379         conditional.
2380         (INIT_THREAD_SELF): Pass second arg to DO_SET_THREAD_AREA.
2381         (DO_SET_THREAD_AREA): Take second arg, pass to DO_SET_THREAD_AREA_REUSE
2382         macro.  That chooses whether to reuse %gs value or let kernel set it.
2383         [USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, always 1.
2384         [!USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, true if arg is
2385         not constant 0.
2387 2002-08-21  Ulrich Drepper  <drepper@redhat.com>
2389         * sysdeps/i386/tls.h (TLS_SETUP_GS_SEGMENT): Add new parameter
2390         also to the third definition of this macro.
2392 2002-06-17  Andreas Jaeger  <aj@suse.de>
2394         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
2395         Set it.
2397 2002-08-20  Ulrich Drepper  <drepper@redhat.com>
2399         * sysdeps/i386/useldt.h: Go back to using 16-bit instructions when
2400         loading/reading segment registers.  Some old hardware doesn't
2401         handle the 32-bit instructions as expected.
2402         * sysdeps/i386/tls.h: Likewise.
2404         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Second parameter is
2405         renamed to secondcall and use is negated.
2406         (TLS_SETUP_GS_SEGMENT): Likewise.
2407         (TLS_INIT_TP): Likewise.
2408         * sysdeps/sh/tls.h (TLS_INIT_TP): Second parameter is renamed to
2409         secondcall.
2411         * sysdeps/i386/tls.h: Use 32-bit operations when handling segment
2412         registers.  No need to mask upper 16 bits in this case.
2413         * sysdeps/i386/useldt.h: Likewise.
2414         (DO_SET_THREAD_AREA): We have to load %gs again even if the value
2415         is the same since the GDT content changed.
2417         * sysdeps/i386/tls.h (TLS_INIT_TP): Add new parameter and pass it on
2418         to TLS_SETUP_GS_SEGMENT.
2419         (TLS_SETUP_GS_SEGMENT): Add new parameter and pass it on to
2420         TLS_DO_SET_THREAD_AREA.
2421         (TLS_DO_SET_THREAD_AREA): If new parameter is zero determine
2422         entry number from %gs value.
2423         * sysdeps/sh/tls.h (TLS_INIT_TP): Add new parameter and simply
2424         ignore it.
2426         * manager.c (pthread_handle_create): Pass NULL to _dl_allocate_tls.
2427         Pass true to _dl_deallocate_tls.
2428         (pthread_free): Likewise.
2429         * pthread.c (__pthread_initialize_manager): Likewise.
2431 2002-08-19  Ulrich Drepper  <drepper@redhat.com>
2433         * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Use correct shift when
2434         computing index from %gs value.
2436 2002-08-16  Roland McGrath  <roland@redhat.com>
2438         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Calculate segment
2439         register value from entry number properly.
2441         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Rewrite asm to use %ebx
2442         optimally conditional on [__PIC__].
2443         (TLS_DO_SET_THREAD_AREA): New macro, implement inline syscall
2444         without touching errno, and use latest modify_ldt-like interface.
2445         (TLS_SETUP_GS_SEGMENT): Use that instead of INLINE_SYSCALL.
2446         * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Set %gs in this macro.
2447         (DO_SET_THREAD_AREA): New macro, uses current syscall interface with
2448         existing %gs value as the segment to set.
2449         (INIT_THREAD_SELF): Rewritten using those.  Use set_thread_area only
2450         under [HAVE_TLS_SUPPORT] so we can rely on the initialization done
2451         by the first thread's early TLS setup.
2453 2002-08-15  Roland McGrath  <roland@redhat.com>
2455         * sysdeps/i386/tls.h (TLS_INIT_TP): Use statement expression and
2456         return a value as callers now expect.
2458 2002-08-11  Roland McGrath  <roland@redhat.com>
2460         * pthread.c (__pthread_initialize_manager): Initialize
2461         p_header.data.tcb field of manager thread's descriptor.
2462         (__pthread_initialize_minimal): Don't initialize p_header.data.self
2463         field, already done by TLS_INIT_TP.
2465         * manager.c (pthread_handle_create): Move p_header field initializers
2466         together.
2468 2002-08-08  Ulrich Drepper  <drepper@redhat.com>
2470         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Removed.
2472 2002-08-07  Ulrich Drepper  <drepper@redhat.com>
2474         * pthread.c (__linuxthreads_initial_report_events): New variable.
2475         (__pthread_initialize_manager): Use it to initialize p_report_events
2476         of initial thread.
2477         [TLS]: Store pointer to descriptor of manager in __pthread_handles.
2479 2002-08-07  Roland McGrath  <roland@redhat.com>
2481         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Add an extra argument with
2482         an "m" constraint to the asm so the compiler knows LDT_ENTRY was used.
2484 2002-08-02  Roland McGrath  <roland@redhat.com>
2486         * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t):
2487         Add _LIBC_TSD_KEY_LOCALE.
2488         * manager.c (pthread_start_thread) [!(USE_TLS && HAVE___THREAD)]:
2489         Call __uselocale to initialize our per-thread locale pointer to
2490         the global one.
2491         * pthread.c (__pthread_initialize_minimal): Likewise.
2493         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Add missing \s.
2495 2002-08-02  Ulrich Drepper  <drepper@redhat.com>
2497         * pthread.c: Declare _errno, _h_errno, and _res unless we use TLS
2498         internally.
2500         * cancel.c (__pthread_perform_cleanup) [USE_TLS && HAVE___THREAD]:
2501         Don't use p_libc_specific element in thread descriptor.
2503 2002-07-30  Roland McGrath  <roland@redhat.com>
2505         * sysdeps/pthread/bits/libc-tsd.h: Include <tls.h>.
2506         [USE_TLS && HAVE___THREAD]: Just include the sysdeps/generic file,
2507         which does the right thing when __thread support is available.
2508         * descr.h (struct _pthread_descr_struct) [USE_TLS && HAVE___THREAD]:
2509         Omit `p_libc_specific', `p_errnop', `p_errno', `p_h_errnop',
2510         `p_h_errno', `p_resp', and `p_res' members.
2511         * pthread.c (__pthread_initialize_minimal) [USE_TLS && HAVE___THREAD]:
2512         Don't initialize `p_errnop' and `p_h_errnop' members.
2513         (__pthread_reset_main_thread): Likewise.
2514         (__pthread_initialize_manager): Likewise.
2515         * manager.c (__pthread_manager, pthread_handle_create): Likewise.
2516         * pthread.c (pthread_initialize) [USE_TLS && HAVE___THREAD]:
2517         Don't initialize `p_resp' member.
2518         (__pthread_reset_main_thread): Likewise.
2519         * manager.c (pthread_handle_create): Likewise.
2520         * specific.c (libc_internal_tsd_set, libc_internal_tsd_get):
2521         Conditionalize these on [!(USE_TLS && HAVE___THREAD)].
2522         * no-tsd.c: Conditionalize contents on [!(USE_TLS && HAVE___THREAD)].
2523         * errno.c [USE_TLS && HAVE___THREAD]
2524         (__h_errno_location, __res_state): Don't define these at all.
2526         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens around arguments!
2527         (INSTALL_NEW_DTV, GET_DTV): Likewise.
2528         * sysdeps/sh/tls.h (INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV): Likewise.
2530         * weaks.c: Don't include <errno.h> here.
2532 2002-08-01  Roland McGrath  <roland@redhat.com>
2534         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): New macro, broken out of
2535         TLS_INIT_TP.
2536         (TLS_DO_SET_THREAD_AREA): New macro, uses thread_set_area syscall.
2537         (TLS_SETUP_GS_SEGMENT): New macro, try one or the other or both.
2538         (TLS_INIT_TP): Use that.
2540 2002-08-02  Jakub Jelinek  <jakub@redhat.com>
2542         * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Move from INIT_THREAD_SELF.
2543         (INIT_THREAD_SELF): Use sys_thread_area syscall instead if available.
2544         (FREE_THREAD): Avoid modify_ldt if using GDT.
2545         * sysdeps/i386/pspinlock.c (__have_no_set_thread_area): New variable.
2547 2002-07-25  Jakub Jelinek  <jakub@redhat.com>
2549         * sysdeps/i386/tls.h: Use __ASSEMBLER__ test macro not ASSEMBLER.
2550         * sysdeps/i386/pt-machine.h: Likewise.
2551         * sysdeps/i386/useldt.h: Likewise.
2553 2002-07-22  Ulrich Drepper  <drepper@redhat.com>
2555         * pthread.c (__pthread_initialize_minimal): If !SHARED and TLS
2556         call __libc_setup_tls first.
2557         * Makefile: Actually create tst-signal.out file when running the test.
2558         (tests): Add tststatic.
2559         * Examples/tststatic.c: New file.
2561 2002-07-19  Ulrich Drepper  <drepper@redhat.com>
2563         * errno.c (__errno_location): Don't define unless !USE_TLS
2564         || !HAVE___THREAD.
2565         * sysdeps/i386/pt-machine.c: Protect C code with #ifndef ASSEMBLER.
2566         * sysdeps/i386/tls.h: Likewise.
2567         * sysdeps/i386/useldt.h: Likewise.
2568         * sysdeps/i386/i686/pt-machine.h: Likewise.
2570 2002-07-02  H.J. Lu  <hjl@gnu.org>
2572         * sysdeps/mips/pspinlock.c: Don't include <sgidefs.h>.  Always
2573         use ll/sc.
2574         * sysdeps/mips/pt-machine.h: Likewise.
2576 2002-07-14  Ulrich Drepper  <drepper@redhat.com>
2578         * manager.c (pthread_handle_create): Initialize self-reference in
2579         descriptor.
2581 2002-07-01  Jakub Jelinek  <jakub@redhat.com>
2583         * Examples/ex9.c (main): Remove unused th variable.
2585 2002-07-10  Ulrich Drepper  <drepper@redhat.com>
2587         * wrapsyscall.c: Add __nanosleep alias.
2588         * Versions (GLIBC_2.2.6): Add __nanosleep.
2589         * bug-sleep.c: New file.
2590         * Makefile (tests): Add bug-sleep.
2592 2002-06-19  Steven Munroe  <sjmunroe@vnet.ibm.com>
2594         * Examples/ex9.c (main):  Use list of children and join them.
2595         (thread): Do not call exit.
2597 2002-06-20  Ulrich Drepper  <drepper@redhat.com>
2599         * spinlock.c (wait_node_alloc): We cannot use compare-and-exchange.
2600         Unconditionally use the code using spinlock.  Use __pthread_release
2601         to free a spinlock.
2602         (wait_node_free): Likewise.
2603         (__pthread_acquire, __pthread_release): Unconditionally define.
2605 2002-06-07  Jakub Jelinek  <jakub@redhat.com>
2607         * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Fix typo.
2609 2002-05-24  Ulrich Drepper  <drepper@redhat.com>
2611         * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Use __sync_synchronize.
2613 2002-05-21  Ulrich Drepper  <drepper@redhat.com>
2615         * sysdeps/pthread/pthread.h (pthread_create): Rename first
2616         parameter.
2617         (pthread_cancel): Likewise.
2618         * internals.h (__pthread_create_2_1): Likewise.
2619         * sysdeps/unix/sysv/linux/bits/sigthread.h (pthread_kill): Likewise.
2621 2002-05-20  Ulrich Drepper  <drepper@redhat.com>
2623         * sysdeps/alpha/pt-machine.c (THREAD_SELF): Remove clobber.
2624         Patch by Glen Nakamura <gen@flex.com>.
2626 2002-05-03  Ulrich Drepper  <drepper@redhat.com>
2628         * signals.c: Move sighandler functions to...
2629         * sighandler.c: ...here.  New file.
2630         * signals.c: Move signal handler related type definitions to...
2631         * internals.h: ...here.  Add prototypes for signal handlers.
2632         * Makefile (libpthread-routines): Add sighandler.
2633         (CFLAGS-sighandler.c): Add $(exceptions).
2635 2002-04-30  Jakub Jelinek  <jakub@redhat.com>
2637         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
2639 2002-04-08  Ulrich Drepper  <drepper@redhat.com>
2641         * sysdeps/pthread/timer_getoverr.c: Return real overrun.
2642         * sysdeps/pthread/posix-timer.h (struct timer_node): Add overrun_count.
2643         * sysdeps/pthread/timer_routines.c (thread_func): Schedule next timeout
2644         based on previous one and not on current time.  Count overruns.
2645         Patch by Eric F. Sorton <eric@cctcorp.com>.
2647         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add DELAYTIMER_MAX.
2649 2002-04-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
2651         * sysdeps/sh/pt-machine.h: Define _PT_MACHINE_H
2652         if it isn't defined yet.
2653         (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Defined.
2654         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
2655         Likewise.
2656         * sysdeps/sh/tls.h: New file.
2658 2002-04-08  Jakub Jelinek  <jakub@redhat.com>
2660         * manager.c (__pthread_manager_event): Use self instead of arg
2661         for INIT_THREAD_SELF.
2662         * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Use sizeof (struct
2663         _pthread_descr_struct) instead of sizeof (*descr).
2665 2002-04-05  Ulrich Drepper  <drepper@redhat.com>
2667         * sysdeps/ia64/pt-machine.h: Protect against multiple inclusion.
2668         * sysdeps/alpha/pt-machine.h: Likewise.
2669         * sysdeps/arm/pt-machine.h: Likewise.
2670         * sysdeps/cris/pt-machine.h: Likewise.
2671         * sysdeps/hppa/pt-machine.h: Likewise.
2672         * sysdeps/m68k/pt-machine.h: Likewise.
2673         * sysdeps/mips/pt-machine.h: Likewise.
2674         * sysdeps/powerpc/pt-machine.h: Likewise.
2675         * sysdeps/s390/s390-32/pt-machine.h: Likewise.
2676         * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2677         * sysdeps/sh/pt-machine.h: Likewise.
2678         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2679         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2680         * sysdeps/x86_64/pt-machine.h: Likewise.
2682 2002-04-05  Jakub Jelinek  <jakub@redhat.com>
2684         * man/pthread_mutexattr_init.man (pthread_mutexattr_settype): Document
2685         instead of pthread_mutexattr_setkind_np.
2686         (pthread_mutexattr_gettype): Similarly.
2687         * man/pthread_mutexattr_setkind_np.man: New.
2688         * man/Makefile (SOURCES): Add pthread_mutexattr_setkind_np.man.
2690 2002-04-02  Ulrich Drepper  <drepper@redhat.com>
2692         * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Define.
2694 2002-03-22  Jakub Jelinek  <jakub@redhat.com>
2696         * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Remove.
2698 2002-03-22  Ulrich Drepper  <drepper@redhat.com>
2700         * internals.h (MEMORY_BARRIER): Define as asm with memory as clobber.
2702 2002-03-17  Andreas Jaeger  <aj@suse.de>
2704         * sysdeps/i386/pt-machine.h: Add testandset and __compare_and_swap
2705         prototpyes.
2706         * sysdeps/alpha/pt-machine.h: Likewise.
2707         * sysdeps/arm/pt-machine.h: Likewise.
2708         * sysdeps/cris/pt-machine.h: Likewise.
2709         * sysdeps/hppa/pt-machine.h: Likewise.
2710         * sysdeps/i386/i686/pt-machine.h: Likewise.
2711         * sysdeps/ia64/pt-machine.h: Likewise.
2712         * sysdeps/m68k/pt-machine.h: Likewise.
2713         * sysdeps/mips/pt-machine.h: Likewise.
2714         * sysdeps/powerpc/pt-machine.h: Likewise.
2715         * sysdeps/s390/s390-32/pt-machine.h: Likewise.
2716         * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2717         * sysdeps/sh/pt-machine.h: Likewise.
2718         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2719         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2720         * sysdeps/x86_64/pt-machine.h: Likewise.
2722         * internals.h: Move testandset and __compare_and_swap prototypes
2723         to pt-machine.h.
2725 2002-03-03  Andreas Jaeger  <aj@suse.de>
2727         * errno.c: Include resolv.h to avoid warning.
2729 2002-02-27  Ulrich Drepper  <drepper@redhat.com>
2731         * pthread.c [USE_TLS] (thread_self_stack): Correct check for upper
2732         stack limit.
2734 2002-02-23  Ulrich Drepper  <drepper@redhat.com>
2736         * attr.c (pthread_getattr_np): Don't take thread descriptor size
2737         into account if USE_TLS.
2738         * manager.c (pthread_handle_create): Free TLS data structures if call
2739         failed.  Pass correct stack to clone if USE_TLS.
2740         * sysdeps/i386/pt-machine.h: Handle multiple inclusion.
2741         * sysdeps/i386/i686/pt-machine.h: Likewise.
2742         * sysdeps/i386/tls.h: Unconditionally include <pt-machine.h>.
2744         * descr.h (struct _pthread_descr_struct): Update p_header for TLS.
2745         Add p_stackaddr element #if USE_TLS.
2746         * internals.c: Include <tls.h>.
2747         * manager.c: Integrate creating and handling of thread descriptor
2748         for TLS.
2749         * pthread.c: Likewise.
2750         * sysdeps/i386/tls.h (tcbhead_t): Add self pointer.
2751         Include <linuxthreads/descr.h> only if TLS is really used.
2752         (GET_DTV): New macro.
2753         (TLS_INIT_TP): Initialize self pointer.
2755 2002-02-17  Andreas Schwab  <schwab@suse.de>
2757         * signals.c (sigwait): Check for old sighandler being SIG_ERR,
2758         not NULL.
2760 2002-02-12  Ulrich Drepper  <drepper@redhat.com>
2762         * sysdeps/i386/tls.c (INSTALL_NEW_DTV): Define.
2763         (INSTALL_DTV): Adjust for being passed pointer to element with length.
2765 2002-02-08  Ulrich Drepper  <drepper@redhat.com>
2767         * sysdeps/i386/tls.h (TLS_INIT_TP): Also initialize %gs.
2769 2002-02-08  Richard Henderson  <rth@redhat.com>
2771         * sysdeps/alpha/elf/pt-initfini.c: Use \n\ for multiline string.
2773 2002-02-08  Ulrich Drepper  <drepper@redhat.com>
2775         * sysdeps/i386/tls.h: TLS cannot be supported with FLOATING_STACKS
2776         after all.
2778 2002-02-07  H.J. Lu  <hjl@gnu.org>
2780         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Silence the
2781         gcc warning.
2782         (__pthread_spin_lock): Remove ".set noreorder".
2783         * sysdeps/mips/pt-machine.h (__compare_and_swap): Liekwise.
2785 2002-02-05  H.J. Lu  <hjl@gnu.org>
2787         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Not use
2788         branch likely.
2789         * sysdeps/mips/pt-machine.h (testandset): Likewise.
2790         (__compare_and_swap): Likewise.
2792 2002-02-07  Ulrich Drepper  <drepper@redhat.com>
2794         * internals.h: Move declarations/definitions of
2795         __pthread_initial_thread_bos, __pthread_initial_thread,
2796         __pthread_manager_thread_bos, __pthread_manager_thread_tos,
2797         __pthread_manager_thread, __pthread_nonstandard_stacks, STACK_SIZE,
2798         CURRENT_STACK_FRAME, __pthread_find_self, and thread_self...
2799         * descr.h: ...here.
2800         * sysdeps/i386/tls.h: Add TLS definitions also for !FLOATING_STACKS.
2801         Define THREAD_GETMEM accordingly.
2803 2002-02-06  Ulrich Drepper  <drepper@redhat.com>
2805         * sysdeps/i386/tls.h: Include <stddef.h> for size_t.
2807         * sysdeps/i386/tls.h: Define THREAD_DTV.
2809 2002-02-04  Ulrich Drepper  <drepper@redhat.com>
2811         * internals.h: Move thread descriptor definition...
2812         * descr.h.: ...here.  New file.
2813         * sysdeps/i386/tls.h: New file.
2815 2002-02-01  H.J. Lu  <hjl@gnu.org>
2817         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Use a
2818         different register in the delayed slot.  Use branch likely.
2820         * sysdeps/mips/pt-machine.h (testandset): Call _test_and_set.
2821         (__compare_and_swap): Return 0 only when failed to compare. Use
2822         branch likely.
2824 2002-02-01  Jakub Jelinek  <jakub@redhat.com>
2826         * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set,
2827         __pthread_kill_other_threads_np): Move to GLIBC_PRIVATE.
2828         * sysdeps/i386/i586/Versions: Move all symbols to GLIBC_PRIVATE.
2829         * sysdeps/i386/i686/Versions: Move all symbols to GLIBC_PRIVATE.
2830         * sysdeps/sparc/sparc32/sparcv9/Versions: New file.
2831         * sysdeps/sparc/sparc64/Versions: New file.
2832         * sysdeps/ia64/Versions: Move all symbols to GLIBC_PRIVATE.
2834 2002-01-31  Ulrich Drepper  <drepper@redhat.com>
2836         * pthread.c: _dl_cpuclock_offset is not any longer a global variable
2837         in SHARED code, use GL(dl_cpuclock_offset).
2839 2002-01-28  Andreas Jaeger  <aj@suse.de>
2841         * sysdeps/mips/pspinlock.c (__pthread_spin_init): Clear *LOCK to
2842         0. Patch by Machida Hiroyuki <machida@sm.sony.co.jp>.
2844 2002-01-16  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2846         * sysdeps/s390/s390-32/pt-machine.h (MEMORY_BARRIER): Define.
2847         (CURRENT_STACK_FRAME): Remove duplicate definition.
2848         * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2850 2002-01-14  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2852         * Makefile (CFLAGS-tst-cancel.c): Add -fno-inline-functions to prevent
2853         automatic inline.
2855 2002-01-12  Andreas Schwab  <schwab@suse.de>
2857         * Makefile (test-srcs): Add tst-signal.
2858         (tests): Run tst-signal.
2859         (distribute): Add tst-signal.sh.
2860         * tst-signal.c, tst-signal.sh: New files.
2862 2002-01-14  Andreas Jaeger  <aj@suse.de>
2864         * sysdeps/x86_64/pt-machine.h (INIT_THREAD_SELF): Avoid warning.
2866 2002-01-11  Andreas Schwab  <schwab@suse.de>
2868         * signals.c (sighandler): Initialize all elements to SIG_ERR.
2869         (__sigaction): Don't use value from sighandler if it is SIG_ERR.
2871 2002-01-06  Richard Henderson  <rth@redhat.com>
2873         * sysdeps/alpha/elf/pt-initfini.c: New file.
2875 2001-12-29  Andreas Jaeger  <aj@suse.de>
2877         * Examples/ex9.c: Add noreturn attribute for thread.
2878         * Examples/ex10.c: Likewise.
2879         * Examples/ex13.c (thread_start): Likewise.
2880         * Examples/ex15.c (worker): Likewise.
2882         * Examples/ex18.c: Include unistd.h for prototype of sleep.
2884 2001-12-14  Ulrich Drepper  <drepper@redhat.com>
2886         * man/pthread_atfork.man: Adjust description of mutex handling
2887         after fork for current implementation.
2888         * linuxthreads.texi: Likewise [PR libc/2519].
2890 2001-12-13  Andreas Schwab  <schwab@suse.de>
2892         * specific.c (pthread_key_delete): Don't contact the thread
2893         manager if no threads have been created yet.
2895 2001-12-12  NIIBE Yutaka  <gniibe@m17n.org>
2897         * sysdeps/sh/pt-machine.h (INIT_THREAD_SELF): Added __volatile__
2898         qualifier to be safe.
2900 2001-11-30  Andreas Schwab  <schwab@suse.de>
2902         * pthread.c (pthread_handle_sigcancel) [THREAD_SELF]: Double check
2903         that self is the manager thread, and initialize the thread
2904         register if not.
2905         (thread_self_stack) [THREAD_SELF]: New function to find self via
2906         stack pointer.
2907         * manager.c (pthread_handle_create): Don't block cancel signal any
2908         more.
2910 2001-11-29  Andreas Jaeger  <aj@suse.de>
2912         * sysdeps/x86_64/pt-machine.h: Use %gs as thread specific register.
2913         (THREAD_SELF): New.
2914         (INIT_THREAD_SELF): New.
2915         (THREAD_GETMEM): New.
2916         (THREAD_GETMEM_NC):
2917         (THREAD_SETMEM): New.
2918         (THREAD_SETMEM_NC): New.
2919         (FLOATING_STACKS): Define.
2920         (ARCH_STACK_MAX_SIZE): Define.
2922 2001-11-28  Kaz Kylheku  <kaz@ashi.footprints.net>
2924         Bugfix to pthread_key_delete. It was iterating over the thread
2925         manager's linked list of threads, behind the thread manager's
2926         back causing a race. The fix is to have the manager iterate over
2927         the threads instead, using a new request type for doing so.
2928         * internals.h (struct pthread_request): New manager request type
2929         REQ_FOR_EACH_THREAD.
2930         * manager.c (pthread_for_each_thread): New function.
2931         (__pthread_manager): Handle new REQ_FOR_EACH_THREAD request.
2932         * specific.c (struct pthread_key_delete_helper_args): New type.
2933         (pthread_key_delete_helper): New static function.
2934         (pthread_key_delete): Use the new thread manager
2935         REQ_FOR_EACH_THREAD function to iterate over the threads and set
2936         the delete key slot to a null value in each thread.
2937         * Examples/ex18.c: New test.
2938         * Makefile (tests): Add ex18.
2940 2001-11-22  Wolfram Gloger  <wg@malloc.de>
2942         * pthread.c (pthread_onexit_process): Don't call free
2943         after threads have been asynchronously terminated.
2945         * manager.c (pthread_handle_exit): Surround cancellation
2946         of threads with __flockfilelist()/__funlockfilelist().
2948 2001-11-26  Andreas Schwab  <schwab@suse.de>
2950         * manager.c (pthread_handle_create): Start the child thread with
2951         the cancel signal blocked, so that it does not handle it before
2952         the thread register is set up.  Save errno from failed clone call.
2954 2001-11-15  Ulrich Drepper  <drepper@redhat.com>
2956         * sysdeps/i386/i686/Implies: Removed.
2957         * sysdeps/i386/i686/Versions: New file.
2959 2001-10-31  Andreas Jaeger  <aj@suse.de>
2961         * sysdeps/x86_64/Makefile: Remove, we do not need it anymore.
2963 2001-10-05  Kevin Buettner  <kevinb@cygnus.com>
2965         * pthread.c (__linuxthread_pthread_sizeof_descr): Change name
2966         to __linuxthreads_pthread_sizeof_descr to match name used by
2967         symbol_list_arr[LINUXTHREADS_PTHREAD_SIZEOF_DESCR] in
2968         linuxthreads_db/td_symbol_list.c.
2970 2001-09-22  Andreas Jaeger  <aj@suse.de>
2972         * linuxthreads/tst-context.c: Avoid compile warning.
2974 2001-09-20  Andreas Jaeger  <aj@suse.de>
2976         * shlib-versions: Add x86-64.
2978 2001-09-19  Andreas Jaeger  <aj@suse.de>
2980         * sysdeps/x86_64/Makefile: New file.
2981         * sysdeps/x86_64/pspinlock.c: New file.
2982         * sysdeps/x86_64/pt-machine.h: New file.
2984 2001-09-12  Jakub Jelinek  <jakub@redhat.com>
2986         * sysdeps/pthread/timer_delete.c (timer_delete): Thread may be NULL
2987         for SIGEV_NONE.
2988         * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
2990 2001-09-11  Ulrich Drepper  <drepper@redhat.com>
2991             Wolfram Gloger <wg@malloc.de>
2993         * join.c: Protect all communications from and to manager with
2994         TEMP_FAILURE_RETRY.
2995         * manager.c: Likewise.
2996         * pthread.c: Likewise.
2997         * smeaphore.c: Likewise.
2999 2001-08-29  Ulrich Drepper  <drepper@redhat.com>
3001         * spinlock.c (__pthread_lock): Top max_count value with
3002         MAX_ADAPTIVE_SPIN_COUNT.
3003         * internals.h (MAX_ADAPTIVE_SPIN_COUNT): Define if not already done.
3005         * sysdeps/i386/i686/pt-machine.h (BUSY_WAIT_NOP): New macro to
3006         help P4.
3008 2001-08-27  Jakub Jelinek  <jakub@redhat.com>
3010         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_t): Only define to
3011         non-opaque type if __USE_UNIX98.
3013 2001-08-26  Jakub Jelinek  <jakub@redhat.com>
3015         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_t): Define
3016         non-opaque lock types also if _IO_MTSAFE_IO is defined.
3018 2001-08-23  Roland McGrath  <roland@frob.com>
3020         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start): Take
3021         new first argument, skip the cleanup handler if it's zero.
3022         (_LIBC_LOCK_RECURSIVE_INITIALIZER): New macro.
3023         (__libc_lock_define_initialized_recursive): Use it.
3024         * sysdeps/pthread/bits/stdio-lock.h: File removed.
3025         The sysdeps/generic file from the main tree now suffices.
3027 2001-08-22  Roland McGrath  <roland@frob.com>
3029         * sysdeps/pthread/bits/stdio-lock.h: Include <bits/libc-lock.h>
3030         instead of <pthread.h>.
3031         (_IO_lock_t): Define this typedef using __libc_lock_define_recursive.
3032         (_IO_lock_initializer): Add braces.
3033         (_IO_lock_lock): Use __libc_lock_lock_recursive.
3034         (_IO_lock_unlock): Use __libc_lock_unlock_recursive.
3036         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_recursive_t): New type.
3037         (__libc_lock_define_initialized_recursive): Use it.
3038         (__libc_lock_init_recursive): Likewise.
3039         (__libc_lock_fini_recursive): Likewise.
3040         (__libc_lock_lock_recursive): Likewise.
3041         (__libc_lock_trylock_recursive): Likewise.
3042         (__libc_lock_unlock_recursive): Likewise.
3043         (__libc_lock_define_recursive): New macro.
3045 2001-08-14  Jakub Jelinek  <jakub@redhat.com>
3047         * lockfile.c (__pthread_provide_lockfile): New variable.
3048         * pthread.c (__pthread_require_lockfile): New variable.
3049         * cancel.c (__pthread_require_lockfile): New variable.
3051 2001-07-31  Ulrich Drepper  <drepper@redhat.com>
3053         * tst-context.c (threadfct): Initialize context before calling
3054         makecontext.
3056         * Examples/ex17.c: Make sure test thread is around long enough.
3058 2001-07-26  kaz Kojima  <kkojima@rr.iij4u.or.jp>
3060         * sysdeps/sh/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF): Defined.
3062 2001-07-24  Ulrich Drepper  <drepper@redhat.com>
3064         * tst-context.c (main): Print explanation before bailing out
3065         because context handling is not supported.
3067 2001-07-23  Ulrich Drepper  <drepper@redhat.com>
3069         * Makefile (tests): Add tst-context.
3070         * tst-context.c: New file.
3072         * sysdeps/pthread/bits/stdio-lock.h: Define
3073         _IO_cleanup_region_start_noarg.
3075 2001-07-23  Jakub Jelinek  <jakub@redhat.com>
3077         * sysdeps/alpha/pt-machine.h (FLOATING_STACKS): Define.
3078         (ARCH_STACK_MAX_SIZE): Define.
3079         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
3080         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3082 2001-07-19  Jakub Jelinek  <jakub@redhat.com>
3084         * sysdeps/i386/useldt.h: Fix typo in ARCH_STACK_MAX_SIZE comment.
3086         * sysdeps/ia64/pt-machine.h (FLOATING_STACKS): Define.
3087         (ARCH_STACK_MAX_SIZE): Define.
3088         * manager.c (pthread_allocate_stack): Handle FLOATING_STACKS with
3089         NEED_SEPARATE_REGISTER_STACK.
3091 2001-07-16  Andreas Schwab  <schwab@suse.de>
3093         * Makefile (before-compile): Don't add $(objpfx)crti.o.
3094         (omit-deps): Add crti.
3095         ($(objpfx)libpthread.so): Depend on $(objpfx)crti.o, but make sure
3096         it is filtered out of the link command.
3098 2001-07-16  Ulrich Drepper  <drepper@redhat.com>
3100         * pthread.c (pthread_initialize): For FLOATING_STACKS don't bother
3101         to find the right value for __pthread_initial_thread_bos, it's not
3102         used.  If not FLOATING_STACKS first run
3103         __pthread_init_max_stacksize.
3105 2001-06-16  H.J. Lu  <hjl@gnu.org>
3107         * internals.h: Include <stackinfo.h>.
3109         * attr.c: Don't include <stackinfo.h> here.
3110         * cancel.c: Likewise.
3111         * manager.c: Likewise.
3112         * pthread.c: Likewise.
3113         * ptlongjmp.c: Likewise.
3115 2001-03-23  Matthew Wilcox  <willy@ldl.fc.hp.com>
3117         * attr.c: Make _STACK_GROWS_UP work.
3118         * internals.h: Likewise.
3119         * manager.c: Likewise.
3120         * pthread.c: Likewise.
3122 2001-06-15  H.J. Lu  <hjl@gnu.org>
3124         * pthread.c (__pthread_reset_main_thread): Fix a typo.
3126 2001-02-02  John S. Marvin  <jsm@udlkern.fc.hp.com>
3128         * semaphore.h: Use struct _pthread_fastlock as an element of
3129         sem_t instead of an identical struct.
3130         * rwlock.c: Remove casts.
3131         * semaphore.c: Likewise.
3133 2001-04-30  Alan Modra  <amodra@one.net.au>
3135         * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: New.
3137 2001-05-25  Bruce Mitchener  <bruce@cubik.org>
3139         * linuxthreads.texi: Spelling corrections.
3141 2001-05-25  Ulrich Drepper  <drepper@redhat.com>
3143         * oldsemaphore.c (__old_sem_wait): Clear p_nextwaiting before
3144         returning successfully.
3145         Patch by Gene Cooperman <gene@ccs.neu.edu>.
3147 2001-05-24  Ulrich Drepper  <drepper@redhat.com>
3149         * spinlock.c (__pthread_lock) [HAS_COMPARE_AND_SWAP]: Before doing any
3150         serious work try once whether the lock is uncontested.
3151         Remove duplicate reading of __status before loop.
3152         Change suggested by Hans Boehm <hans_boehm@hp.com>.
3154         * spinlock.h (__pthread_trylock): Remove need for oldstatus variable.
3155         (__pthread_alt_trylock): Likewise.
3157 2001-05-01  Kaz Kylheku  <kaz@ashi.footprints.net>
3159         Memory barrier overhaul following line by line inspection.
3160         * mutex.c (pthread_once): Missing memory barriers added.
3161         * pthread.c (__pthread_wait_for_restart_signal,
3162         __pthread_timedsuspend_new, __pthread_restart_new): Added
3163         memory barriers ``just in case'' and for documentary value.
3164         * spinlock.c (__pthread_release): New inline function for releasing
3165         spinlock, to complement __pthread_acquire.  Includes memory
3166         barrier prior to assignment to spinlock, and __asm __volatile
3167         dance to prevent reordering or optimization of the spinlock access.
3168         * spinlock.c (__pthread_unlock, __pthread_alt_lock,
3169         __pthread_alt_timedlock, __pthread_alt_unlock,
3170         __pthread_compare_and_swap): Updated to use new __pthread_release
3171         instead of updating spinlock directly.
3172         * spinlock.c (__pthread_lock, __pthread_unlock, wait_node_alloc,
3173         wait_node_free, wait_node_dequeue, __pthread_alt_lock,
3174         __pthread_alt_timedlock, __pthread_alt_unlock, __pthread_acquire):
3175         Memory barrier overhaul.  Lots of missing memory barriers added,
3176         a couple needless ones removed.
3177         * spinlock.c (__pthread_compare_and_swap): testandset optimization
3178         removed, just calls __pthread_acquire, which has the new read
3179         barrier in it before its testandset.
3181 2001-05-20  Roland McGrath  <roland@frob.com>
3183         * Makeconfig: New file, variables used to be in main libc Makeconfig.
3185 2001-05-09  Geoff Keating  <geoffk@redhat.com>
3187         * sysdeps/powerpc/pt-machine.h
3188         (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): Define.
3189         (__compare_and_swap): Remove memory barriers.
3190         (__compare_and_swap_with_release_semantics): New function.
3192 2001-04-24  Andreas Jaeger  <aj@suse.de>
3194         * wrapsyscall.c: send* and recv* return ssize_t.
3196         * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Unlock the
3197         mutex instead of double locking it.
3198         Reported by Pierre Artaud <partaud@sodatec.com>.
3200 2001-04-23  Ulrich Drepper  <drepper@redhat.com>
3202         * sysdeps/pthread/getcpuclockid.c: Make function generic, test
3203         using #ifdef whether the clock is available.
3204         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: Removed.
3206         * sysdeps/ia64/Versions: New file.
3208         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init): We don't
3209         have to call __gmon_start__ in the libpthread DSO.
3210         * sysdeps/pthread/pt-initfini.c (_init): Likewise.
3212         * Makefile (libpthread-routines): Add ptclock_gettime and
3213         ptclock_settime.
3214         * internals.h: Don't use cpuclock-init.h definitions, use
3215         hp-timing.h definitions.
3216         * pthread.c: Likewise.
3217         * manager.c: Likewise.
3218         * ptclock_gettime.c: New file.
3219         * ptclock_settime.c: New file.
3220         * internals.h: Fix parameter type for __pthread_clock_gettime and
3221         __pthread_clock_settime.
3223         * sysdeps/i386/i586/ptclock_gettime.c: Removed.
3224         * sysdeps/i386/i586/ptclock_settime.c: Removed.
3225         * sysdeps/i386/i586/Makefile: Removed.
3227 2001-04-22  Ulrich Drepper  <drepper@redhat.com>
3229         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_ASYNCH_IO.
3230         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3232 2001-04-21  Andreas Jaeger  <aj@suse.de>
3234         * sysdeps/pthread/timer_routines.c (thread_func): Add noreturn
3235         attribute, remove statements that will never be executed.
3236         (thread_func): Remove mutex_unlock call since it's never executed.
3237         (thread_func): Fix comment as suggested by Jakub Jelinek.
3239         * manager.c (__pthread_manager): Add noreturn
3240         attribute.
3241         (pthread_start_thread): Likewise, remove return statement.
3242         (pthread_start_thread_event): Likewise.
3243         Add noreturn attribute for pthread_handle_exit.
3244         * weaks.c: Add noreturn attribute for pthread_exit.
3246         * internals.h: Add __pthread_clock_gettime and
3247         __pthread_clock_settime prototypes.
3249 2001-04-21  Ulrich Drepper  <drepper@redhat.com>
3251         * internals.h: Include <cpuclock-init.h>.
3252         (struct _pthread_descr_struct): Add p_cpuclock_offset field if
3253         CPUCLOCK_VARDEF is defined.
3254         * pthread.c (__pthread_initialize_minimal): Initialize
3255         p_cpuclock_offset field for main thread if CPUCLOCK_INIT is defined.
3256         * manager.c (pthread_start_thread): Set p_cpuclock_offset field
3257         for new thread to current CPU clock value.
3259         * sysdeps/i386/useldt.h: Extend all the macros to handle 8-byte values.
3261         * sysdeps/i386/i586/Makefile: New file.
3262         * sysdeps/i386/i586/Versions: New file.
3263         * sysdeps/i386/i586/ptclock_gettime.c: New file.
3264         * sysdeps/i386/i586/ptclock_settime.c: New file.
3265         * sysdeps/i386/i686/Implies: New file.
3267 2001-04-18  Jakub Jelinek  <jakub@redhat.com>
3269         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Put specs into
3270         $generated, not $postclean-generated.
3272 2001-04-18  Andreas Jaeger  <aj@suse.de>
3274         * Makefile (otherlibs): Added.
3276 2001-04-18  Jakub Jelinek  <jakub@redhat.com>
3278         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
3280 2001-04-16  Ulrich Drepper  <drepper@redhat.com>
3282         * signals.c (sigwait): NSIG is no signal number.  Block all
3283         signals while in signal handler for signals in SET.
3284         Patch by Manfred Spraul <manfred@colorfullife.com>.
3286 2001-04-12  Ulrich Drepper  <drepper@redhat.com>
3288         * tst-cancel.c: Disable most tests.  Add new test where all
3289         cleanup handlers must run.
3290         * Makefile (tests): Add tst-cancel again.
3292         * cancel.c (__pthread_perform_cleanup): Correct condition for
3293         leaving cleanup loop early.
3295         * sysdeps/i386/Makefile: Make sure gcc uses a frame pointer for
3296         all the files which use CURRENT_STACK_FRAME.
3297         * sysdeps/i386/pt-machine.h (CURRENT_STACK_FRAME): Define using
3298         __builtin_frame_address.
3299         * sysdeps/i386/i686/pt-machine.h: Likewise.
3301 2001-04-11  Ulrich Drepper  <drepper@redhat.com>
3303         * Makefile (tests): Comment out tst-cancel for now.
3305         * tst-cancel.c (main): Cleanup 4 is supposed to run.  Create
3306         temporary file in object directory.
3307         * Makefile: Don't allow inlining when compiling tst-cancel.c.
3308         Pass $(objpfx) to tst-cancel.
3310 2001-04-11  David S. Miller  <davem@redhat.com>
3312         * sysdeps/sparc/sparc32/pt-machine.h (stack_pointer): Advance
3313         up closer to user local variables so that new cleanup heuristics work.
3314         * sysdeps/sparc/sparc64/pt-machine.h (stack_pointer): Likewise.
3316 2001-04-11  Ulrich Drepper  <drepper@redhat.com>
3318         * cancel.c (_pthread_cleanup_push): Catch invalid __prev buffer
3319         and remove it.
3320         (_pthread_cleanup_push_defer): Likewise.
3322         * tst-cancel.c (main): Fix loop printing cleanup output.
3324 2001-04-10  kaz Kojima  <kkojima@rr.iij4u.or.jp>
3326         * sysdeps/sh/pspinlock.c (__pthread_spin_lock): Fix a reverse
3327         test.
3328         (__pthread_spin_trylock): Likewise.
3329         * sysdeps/sh/pt-machine.h (testandset): Likewise.
3331 2001-04-10  Ulrich Drepper  <drepper@redhat.com>
3333         * join.c (pthread_exit): Move code to new function __pthread_do_exit
3334         which takes an extra parameter with the current frame pointer.
3335         Call new function with CURRENT_STACK_FRAME.
3336         (__pthread_do_exit): New function.  Call __pthread_perform_cleanup
3337         with the new parameter.
3338         (pthread_join): Call __pthread_do_exit instead of pthread_exit.
3339         * cancel.c (__pthread_perform_cleanup): Takes extra parameter.  Use
3340         this parameter as the initial value the cleanup handler records are
3341         compared against.  No active cleanup handler record must have an
3342         address lower than the previous one and the initial record must be
3343         above (below on PA) the frame address passed in.
3344         (pthread_setcancelstate): Call __pthread_do_exit instead of
3345         pthread_exit.
3346         (pthread_setcanceltype): Likewise.
3347         (pthread_testcancel): Likewise.
3348         (_pthread_cleanup_pop_restore): Likewise.
3349         * condvar.c (pthread_cond_wait): Likewise.
3350         (pthread_cond_timedwait_relative): Likewise.
3351         * manager.c (pthread_start_thread): Likewise.
3352         * oldsemaphore.c (__old_sem_wait): Likewise.
3353         * pthread.c (pthread_handle_sigcancel): Likewise.
3354         * semaphore.c (__new_sem_wait): Likewise.
3355         (sem_timedwait): Likewise.
3356         * ptlongjmp.c (pthread_cleanup_upto): Also use current stack frame
3357         to limit the cleanup handlers which get run.
3358         * internals.h: Add prototype for __pthread_do_exit.  Adjust prototype
3359         for __pthread_perform_cleanup.
3361         * Makefile (tests): Add tst-cancel.
3362         * tst-cancel.c: New file.
3364 2001-04-08  Hans-Peter Nilsson  <hp@axis.com>
3366         * sysdeps/cris/pt-machine.h: New file.
3367         * sysdeps/cris/pspinlock.c: New file.
3369 2001-04-09  Hans-Peter Nilsson  <hp@axis.com>
3371         * shlib-versions: Add case for Linux on CRIS.
3373 2001-03-26  Ulrich Drepper  <drepper@redhat.com>
3375         * attr.c (pthread_getattr_np): Correct computation of stack size
3376         for machiens with register stack.
3378         * Examples/ex17.c (main): Correct detection of failed mmap call.
3380 2001-03-21  Jakub Jelinek  <jakub@redhat.com>
3382         * pthread.c (__pthread_initialize_manager): Fix a typo.
3384 2001-03-21  Jakub Jelinek  <jakub@redhat.com>
3386         * attr.c (__pthread_attr_setstack): Fix alignment check.
3387         (pthread_getattr_np): __stackaddr is top of stack, not bottom.
3388         * Makefile (tests): Add ex17 test.
3389         * Examples/ex17.c: New test.
3391 2001-03-20  Ulrich Drepper  <drepper@redhat.com>
3393         * Makefile: Define -D_RPC_THREAD_SAFE_ for cancel.c.
3394         * cancel.c (__pthread_perform_cleanup): Call __rpc_thread_destroy.
3395         * sysdeps/pthread/bits/libc-tsd.h: Define _LIBC_TSD_KEY_VARS.
3397 2001-03-18  Ulrich Drepper  <drepper@redhat.com>
3399         * Makefile: When generating DSO link with libc_nonshared.a.
3401 2001-02-26  Jakub Jelinek  <jakub@redhat.com>
3403         * signals.c (pthread_sighandler): Use CALL_SIGHANDLER.
3405 2001-02-23  Jakub Jelinek  <jakub@redhat.com>
3407         * internals.h (__pthread_init_max_stacksize): New prototype.
3408         * attr.c (__pthread_attr_setstacksize): Call
3409         __pthread_init_max_stacksize if not yet initialized.
3410         * pthread.c (__pthread_init_max_stacksize): New function.
3411         (__pthread_initialize_manager): Call it.
3412         Patch by <dtc@cmucl.cons.org>.
3414 2001-03-16  Ulrich Drepper  <drepper@redhat.com>
3416         * attr.c (pthread_getattr_np): Fix __stacksize computation for IA-64.
3418 2001-03-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3420         * shlib-versions: Add rule for Linux on 64 bit S/390.
3421         * sysdeps/s390/s390-64/pt-machine.h: New file.
3422         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
3424 2001-03-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3426         * sysdeps/s390/pt-machine.h: Move to...
3427         * sysdeps/s390/s390-32/pt-machine.h: ...here.
3428         Add defines for FLOATING_STACK and ARCH_STACK_MAX_SIZE.
3430 2001-03-15  Ulrich Drepper  <drepper@redhat.com>
3432         * Versions [libpthread] (GLIBC_2.2.3): Add pthread_getattr_np.
3433         * attr.c: Implement pthread_getattr_np.
3434         * sysdeps/pthread/pthread.h: Add prototype for pthread_getattr_np.
3435         * internals.h (struct _pthread_descr_struct): Add p_inheritsched.
3436         * manager.c (pthread_handle_create): Initialize p_inheritsched.
3438 2001-03-09  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3440         * sysdeps/unix/sysv/linux/s390/pt-initfini.c: Use 0x07 padding for
3441         code alignment.
3443 2001-02-20  Hans Boehm  <hans_boehm@hp.com>
3445         * manager.c (manager_mask): Removed static vesion.  Now always local
3446         to __pthread_manager().
3447         (manager_mask_all): Removed completely.
3448         (__pthread_manager): Remove manager_mask_all initialization.
3449         (pthread_handle_create): Remove code to set and reset signal mask
3450         around __clone2() calls.
3452 2001-02-17  Jakub Jelinek  <jakub@redhat.com>
3454         * spinlock.c (__pthread_lock): Force lock->__status to be read from
3455         memory on every spin.
3457 2001-02-10  Andreas Jaeger  <aj@suse.de>
3459         * Makefile (extra-objs): New.
3461 2001-02-09  Jakub Jelinek  <jakub@redhat.com>
3463         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add
3464         __pthread_initialize_minimal prototype.
3466 2001-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
3468         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
3470 2001-02-06  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3472         * sysdeps/unix/sysv/linux/s390/pt-initfini.c: New file.
3474 2001-02-06  Ulrich Drepper  <drepper@redhat.com>
3476         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the
3477         broken code.  Patch by Jes Sorensen.
3479 2001-02-06  Andreas Jaeger  <aj@suse.de>
3481         * sysdeps/pthread/pthread.h: Move __pthread_initialize from here
3482         to...
3483         * internals.h: ...here.
3485 2001-02-05  Jes Sorensen  <jes@linuxcare.com>
3487         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
3489 2001-02-02  Ulrich Drepper  <drepper@redhat.com>
3491         * Versions: Remove __pthread_initialize_minimal.
3493 2001-02-01  Ulrich Drepper  <drepper@redhat.com>
3495         * Makefile: Add rules to build crti.o and make it being used in
3496         building libpthread.so.
3497         * sysdeps/i386/Makefile: New file.
3498         * sysdeps/pthread/pt-initfini.c: New file.
3500         * pthread.c: Cleanups.
3502 2001-01-28  Andreas Jaeger  <aj@suse.de>
3504         * oldsemaphore.c (__old_sem_init): Adjust for last change.
3505         * sysdeps/pthread/bits/libc-lock.h: Likewise.
3506         * spinlock.c: Likewise.
3508 2001-01-28  Ulrich Drepper  <drepper@redhat.com>
3510         * sysdeps/pthread/bits/initspin.h: Make all names namespace clean.
3511         * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
3512         * manager.c: Adjust for namespace cleanup in bits/initspin.h.
3513         * pthread.c: Likewise.
3514         * spinlock.h: Likewise.
3515         * sysdeps/pthread/pthread.h: Likewise.
3517 2001-01-26  Ulrich Drepper  <drepper@redhat.com>
3519         * sysdeps/pthread/bits/pthreadtypes.h: Define pthread_attr_t also
3520         as struct __pthread_attr_s.
3522         * semaphore.h (sem_t): Cleanup namespace, rename status and
3523         spinlock elements.
3525 2001-01-13  Jakub Jelinek  <jakub@redhat.com>
3527         * pthread.c (pthread_onexit_process): Clear
3528         __pthread_manager_thread_bos after freeing it.
3529         * Makefile (tests): Add ex16.
3530         * Examples/ex16.c: New file.
3532 2001-01-11  Jakub Jelinek  <jakub@redhat.com>
3534         * Makefile (CFLAGS-pthread.c): Pass -DHAVE_Z_NODELETE if ld supports
3535         -z nodelete.
3536         * pthread.c (pthread_exit_process): Rename to...
3537         (pthread_onexit_process): ...this.
3538         (pthread_atexit_process, pthread_atexit_retcode): New.
3539         (pthread_initialize): Call __cxa_atexit instead of __cxa_on_exit
3540         and only if HAVE_Z_NODELETE is not defined.
3541         (__pthread_initialize_manager): Register pthread_atexit_retcode
3542         with __cxa_atexit.
3544 2001-01-11  Ulrich Drepper  <drepper@redhat.com>
3546         * pthread.c (pthread_initialize): Use __cxs_on_exit not __cxa_atexit.
3548 2001-01-11  Jakub Jelinek  <jakub@redhat.com>
3550         * Makefile (tests): Add ex15.
3551         * Examples/ex15.c: New test.
3553 2001-01-08  Ulrich Drepper  <drepper@redhat.com>
3555         * pthread.c (pthread_exit_process): Free memory allocated for
3556         manager stack.
3558 2000-12-31  Ulrich Drepper  <drepper@redhat.com>
3560         * manager.c (pthread_alloca_stack): Remove MAP_FIXED from mmap calls.
3561         (pthread_free): Always unmap the stack.  It's safe now that we don't
3562         use MAP_FIXED to allocate stacks.
3564 2000-12-31  Ulrich Drepper  <drepper@redhat.com>
3566         * sysdeps/powerpc/pspinlock.c: Don't include pt-machine.h here.
3568         * manager.c (pthread_allocate_stack): Prepare for removal of MAP_FIXED.
3570 2000-11-15  Wolfram Gloger  <wg@malloc.de>
3572         * manager.c (pthread_free): [!FLOATING_STACKS]: Only remap the
3573         stack to PROT_NONE, don't unmap it, avoiding collisions with malloc.
3575 2000-12-27  Andreas Jaeger  <aj@suse.de>
3577         * Examples/ex13.c: Make local functions static.
3578         * ecmutex.c: Likewise.
3579         * joinrace.c: Likewise.
3580         * Examples/ex14.c: Likewise.
3582         * Examples/ex2.c: Make local functions static; reformat.
3583         * Examples/ex1.c: Likewise.
3584         * Examples/ex4.c: Likewise.
3585         * Examples/ex5.c: Likewise.
3586         * Examples/ex7.c: Likewise.
3588         * oldsemaphore.c: Add prototypes to shut up GCC.
3589         * pt-machine.c: Likewise.
3591         * weaks.c: Add prototype for pthread_exit.
3593         * internals.h: Add some prototypes, format prototypes and add
3594         missing externs.
3595         Move __libc_waitpid prototype to include/sys/wait.h.
3597         * rwlock.c: Include <bits/libc-lock.h> for prototypes.
3598         * mutex.c: Likewise.
3599         * specific.c: Likewise.
3600         * ptfork.c: Likewise.
3602         * lockfile.c: Include internals.h to get prototypes.
3603         * events.c: Likewise.
3604         * sysdeps/alpha/pspinlock.c: Likewise.
3605         * sysdeps/arm/pspinlock.c: Likewise.
3606         * sysdeps/hppa/pspinlock.c: Likewise.
3607         * sysdeps/i386/pspinlock.c: Likewise.
3608         * sysdeps/ia64/pspinlock.c: Likewise.
3609         * sysdeps/m68k/pspinlock.c: Likewise.
3610         * sysdeps/mips/pspinlock.c: Likewise.
3611         * sysdeps/powerpc/pspinlock.c: Likewise.
3612         * sysdeps/s390/pspinlock.c: Likewise.
3613         * sysdeps/sh/pspinlock.c: Likewise.
3614         * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
3615         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
3616         * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
3618 2000-12-27  Ulrich Drepper  <drepper@redhat.com>
3620         * attr.c (__pthread_attr_setstack): Fix setting of __stackaddr element.
3621         (__pthread_attr_getstack): Return correct address.
3622         Add warnings for using pthread_attr_getstackaddr and
3623         pthread_attr_setstackaddr.
3625 2000-12-26  Ulrich Drepper  <drepper@redhat.com>
3627         * Examples/ex6.c (test_thread): Make static.
3628         * Examples/ex12.c (test_thread): Make static and add noreturn
3629         attribute.
3631 2000-12-18  Jes Sorensen  <jes@linuxcare.com>
3633         * linuxthreads/sysdeps/ia64/pt-machine.h: __compare_and_swap
3634         and compare_and_swap_with_release_semantics returns int not long.
3636 2000-12-17  Andreas Jaeger  <aj@suse.de>
3638         * sysdeps/s390/pt-machine.h (testandset): Use long int as return
3639         value.
3640         * sysdeps/arm/pt-machine.h (testandset): Likewise.
3641         * sysdeps/hppa/pt-machine.h (testandset): Likewise.
3642         * sysdeps/m68k/pt-machine.h (testandset): Likewise.
3643         * sysdeps/sh/pt-machine.h (testandset): Likewise.
3644         * sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise.
3645         * sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise.
3647 2000-12-17  Ulrich Drepper  <drepper@redhat.com>
3649         * sysdeps/i386/pt-machine.h (testandset): Adjust for prototype change.
3650         * sysdeps/i386/i686/pt-machine.h (testandset): Likewise.
3652 2000-12-17  Andreas Jaeger  <aj@suse.de>
3654         * internals.h: Add prototypes for testandset and
3655         __compare_and_swap to shut up gcc warnings.
3657 2000-12-06  Wolfram Gloger  <wg@malloc.de>
3659         * join.c (pthread_detach): Allow case where the thread has already
3660         terminated.
3662 2000-12-05  Andreas Jaeger  <aj@suse.de>
3664         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't set mips2.
3665         * sysdeps/mips/pt-machine.h (testandset): Likewise.
3666         (__compare_and_swap): Likewise.
3667         Patches by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
3669 2000-11-20  Jakub Jelinek  <jakub@redhat.com>
3671         * Examples/ex3.c (main): Cast int to long before casting to void *.
3672         (search): Cast void * to long, not int.
3673         * Examples/ex8.c (main, thread): Similarly.
3674         * Examples/ex11.c (main): Similarly.
3675         * Examples/ex14.c (worker, do_test): Similarly.
3676         * ecmutex.c (worker, do_test): Similarly.
3677         (nlocks): Cast to int.
3679 2000-11-08  Bruce Mitchener  <bruce@cubik.org>
3681         * linuxthreads.texi:  Add documentation for pthreads attributes
3682         guardsize, stackaddr, stacksize, and stack.  Fix typo in previous
3683         patch.  Document pthread_[sg]etconcurrency().  Mark
3684         pthread_mutexattr_[sg]ettype() as POSIX rather than GNU.
3686 2000-11-07  Ulrich Drepper  <drepper@redhat.com>
3688         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
3689         Don't define it.
3690         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3691         Reported by Christopher Yeoh <cyeoh@linuxcare.com.au>.
3693 2000-11-06  Ulrich Drepper  <drepper@redhat.com>
3695         * cancel.c (pthread_cancel): Always set p_canceled, even if we are
3696         not doing it right now.
3697         Reported by Kaz Kylheku <kaz@ashi.footprints.net>.
3699 2000-10-30  Ulrich Drepper  <drepper@redhat.com>
3701         * Examples/ex4.c (main): Don't use exit() to avoid warning with
3702         broken compilers.
3704 2000-10-29  Ulrich Drepper  <drepper@redhat.com>
3706         * attr.c (__pthread_attr_setguardsize): Don't round guardsize
3707         here.  Reported by Bruce Mitchener <bruce@cubik.org>.
3709         * linuxthreads.texi: Changes terminology to 'type' from 'kind' when
3710         discussing mutexes. (As per the Unix98 name for the API.)
3711         Changes documentation for pthread_mutexattr_setkind_np() and
3712         pthread_mutexattr_getkind_np() over to the Unix98 APIs for the
3713         same: pthread_mutexattr_settype() and pthread_mutexattr_gettype().
3714         Changes references to PTHREAD_MUTEXATTR_FAST_NP to
3715         PTHREAD_MUTEXATTR_ADAPTIVE_NP.
3716         Begins to introduce discussion of the ``timed'' mutex type.  This
3717         discussion is currently incomplete.
3718         Patch by Bruce Mitchener <bruce@cubik.org>.
3720 2000-10-26  Kazumoto Kojima  <kkojima@rr.iij4u.or.jp>
3721             Yutaka Niibe  <gniibe@chroot.org>
3723         * sysdeps/sh/pt-machine.h (testandset): Since the operand of TAS.B
3724         has restrictions, use register.
3726 2000-10-23  Andreas Schwab  <schwab@suse.de>
3728         * Examples/ex14.c (TIMEOUT): Override default timeout.
3730 2000-10-16  Ulrich Drepper  <drepper@redhat.com>
3732         * specific.c: Protect tsd array modification in thread data
3733         structures by getting the thread lock in pthread_key_delete and
3734         __pthread_destroy_specifics.
3735         Patch by Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>.
3737 2000-10-12  Alan Modra <alan@linuxcare.com.au>
3739         * sysdeps/pthread/bits/initspin.h: New file.
3740         * spinlock.h: Move LOCK_INITIALIZER definition to <bits/initspin.h>.
3741         (__pthread_init_lock): Initialize lock with LT_SPINLOCK_INIT.
3742         (__pthread_alt_init_lock): Likewise.
3743         (__pthread_alt_trylock): Release lock with LT_SPINLOCK_INIT.
3745 2000-10-12  David Huggins-Daines  <dhd@linuxcare.com>
3747         * oldsemaphore.c (__old_sem_init): Release lock with
3748         LT_SPINLOCK_INIT, not zero.
3749         * spinlock.c (__pthread_unlock): Likewise.
3750         (__pthread_alt_lock): Likewise.
3751         (__pthread_alt_timedlock): Likewise.
3752         (__pthread_alt_unlock): Likewise.
3753         * sysdeps/pthread/bits/libc-lock.h: Initialize locks with
3754         LT_SPINLOCK_INIT if it is non-zero.  Likewise for init-once flags.
3755         * sysdeps/pthread/pthread.h: Include bits/initspin.h.  Use
3756         LT_SPINLOCK_INIT do initialize spinlocks not 0.
3758 2000-10-12  David Huggins-Daines <dhd@linuxcare.com>
3760         * shlib-versions: Add version definitions for hppa-linux.
3762 2000-10-12  Alan Modra <alan@linuxcare.com.au>
3764         * sysdeps/hppa/pspinlock.c: New file.
3765         * sysdeps/hppa/pt-machine.h: New file.
3766         * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: New file.
3768 2000-10-05  Jakub Jelinek  <jakub@redhat.com>
3770         * mutex.c (__pthread_mutex_destroy): Correct test of
3771         busy mutex for mutexes using alternate fastlocks.
3772         Patch by dtc@cmucl.cons.org.
3774 2000-09-28  Martin Schwidefsksy    <schwidefsky@de.ibm.com>
3776         * sysdeps/s390/pt-machine.h: Make %a0 the thread register.
3778 2000-09-28  Ulrich Drepper  <drepper@redhat.com>
3780         * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP
3781         test for owner first.
3782         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
3784         * cancel.c (pthread_cancel): Don't do anything if cancelation is
3785         disabled.
3787 2000-09-26  Ulrich Drepper  <drepper@redhat.com>
3789         * spinlock.h (__pthread_set_own_extricate_if): Optimize a bit.
3790         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
3792         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
3793         _POSIX_MONOTONIC_CLOCK.
3795         * spinlock.h (__pthread_set_own_extricate_if): Add back locking
3796         and explain why.
3798 2000-09-20  Andreas Jaeger  <aj@suse.de>
3800         * pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
3801         "testrtsig.h" conditional.
3803 2000-09-11  Ulrich Drepper  <drepper@redhat.com>
3805         * sysdeps/pthread/pthread.h: Declare pthread_attr_getstack and
3806         pthread_attr_setstack.
3807         * Versions [libpthread] (GLIBC_2.2): Export pthread_attr_getstack and
3808         pthread_attr_setstack.
3809         * attr.c (pthread_attr_getstack, pthread_attr_setstack): New functions.
3811 2000-09-05  Ulrich Drepper  <drepper@redhat.com>
3813         * Examples/ex14.c: New file.
3814         * Makefile (tests): Add ex14.
3816         * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
3817         mutex.  Patch by dtc@cmucl.cons.org.
3819         * ecmutex.c: New file.
3820         * Makefile (tests): Add ecmutex.
3822 2000-09-04  H.J. Lu  <hjl@gnu.org>
3824         * attr.c (__pthread_attr_setguardsize): Use page_roundup
3825         instead of roundup to round up to the page size.
3827 2000-09-03  Mark Kettenis  <kettenis@gnu.org>
3829         * manager.c (pthread_exited): Correctly report event as TD_REAP
3830         instead of TD_DEATH.  Fix comments.
3832 2000-09-03  Ulrich Drepper  <drepper@redhat.com>
3834         * spinlock.h (testandset): Add cast to avoid warning.
3835         Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
3837 2000-09-02  Andreas Jaeger  <aj@suse.de>
3839         * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
3840         prototype.
3842 2000-09-01  Ulrich Drepper  <drepper@redhat.com>
3844         * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
3845         Fix typo in last patch (_mode -> _flags).
3847         * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
3848         Provide definition which respects _IO_USER_LOCK flag.
3850 2000-08-30  Ulrich Drepper  <drepper@redhat.com>
3852         * manager.c (pthread_allocate_stack): Clear descriptor only if not
3853         mmaped.
3855 2000-08-25  Ulrich Drepper  <drepper@redhat.com>
3857         * Makefile: Add rules to build and run unload.
3858         * unload.c: New file.
3860         * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
3862         * sysdeps/pthread/pthread.h
3863         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
3864         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
3866 2000-08-24  Andreas Jaeger  <aj@suse.de>
3868         * Examples/ex13.c: Include <string.h> for strerror prototype and
3869         <stdlib.h> for abort prototype.
3870         (pthr_cond_signal_mutex): Rewrite to silence GCC.
3871         (thread_start): Remove unused variable err.
3872         (main): Silence GCC warnings.
3874 2000-08-22  Andreas Jaeger  <aj@suse.de>
3876         * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
3878         * Makefile (tests): Add ex13.
3880 2000-08-20  Ulrich Drepper  <drepper@redhat.com>
3882         * semaphore.h: Add restrict where required by AGd4.
3883         * sysdeps/pthread/pthread.h: Likewise.
3884         * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
3886 2000-08-15  Ulrich Drepper  <drepper@redhat.com>
3888         * Makefile (tests): Add ex12.  Add rule to build it.
3889         * Examples/ex12.c: New file.
3891 2000-08-13  Ulrich Drepper  <drepper@redhat.com>
3893         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
3894         even though the implementation is not quite complete (but it reports
3895         it).  Define _POSIX_MESSAGE_PASSING to -1.
3896         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3898 2000-08-12  Andreas Jaeger  <aj@suse.de>
3900         * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
3901         assembler.
3902         (__compare_and_swap): Likewise.
3903         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
3905 2000-08-10  Ulrich Drepper  <drepper@redhat.com>
3907         * pthread.c (__pthread_initial_thread): Initialize p_errnop and
3908         p_h_errnop correctly and not to NULL.
3910 2000-08-05  Ulrich Drepper  <drepper@redhat.com>
3912         * Banner: Bump version number to 0.9.
3914 2000-08-04  Ulrich Drepper  <drepper@redhat.com>
3916         * Makefile (tests): Add tststack.  Add rule to build the program.
3917         * tststack.c: New file.
3919         * internals.h: Declare __pthread_max_stacksize.
3920         * pthread.c (__pthread_max_stacksize): New variable.
3921         (__pthread_initialize_manager): Determine __pthread_initialize_manager
3922         value.
3923         * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
3924         (pthread_allocate_stack): Allow kernel to choose stack address if
3925         FLOATING_STACKS.  This also handles variable-sized stacks.
3926         Always allocate stack and guardpage together.  Use mprotect to
3927         change guardpage access.
3928         * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
3929         ARCH_STACK_MAX_SIZE.
3931         * attr.c (__pthread_attr_setstacksize): Also test value against
3932         upper limit.
3934         * manager.c (__pthread_nonstandard_stacks): Define only if
3935         THREAD_SELF is not defined.
3936         (pthread_allocate_stack): Always initialize gardaddr to a correct
3937         value.
3938         (pthread_handle_create): Unmap thread with one call.
3939         (pthread_free): Remove test for initial thread before removing stack.
3940         Unmap stack with one call.
3942         * pthread.c (__pthread_initial_thread): Initialize p_userstack to
3943         1 to avoid removing the stack.
3945 2000-07-27  Jes Sorensen  <jes@linuxcare.com>
3947         * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
3948         load of spin lock to prime the cache before the atomic compare and
3949         exchange operation (cmpxchg4). This avoids the spinning on the
3950         cmpxchg4 instruction and reduces movement of the cache line back
3951         and forth between the processors (explanation by Asis K. Mallick
3952         from Intel). This basically makes the implementation operate the
3953         same as the Linux kernel implementation.
3955         * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
3956         * sysdeps/ia64/pspinlock.c: New file.
3958 2000-08-03  Ulrich Drepper  <drepper@redhat.com>
3960         * pthread.c: Move definition of __pthread_set_own_extricate_if...
3961         * spinlock.h: ...here.  Remove locking.
3962         * internals.h: Remove __pthread_set_own_extricate_if prototype.
3964         * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
3965         (rwlock_rd_extricate_func): Don't determine self, let
3966         __pthread_lock do it.
3967         (rwlock_wr_extricate_func): Likewise.
3968         (rwlock_have_already): Optimize *pself handling a bit.
3970         * mutex.c: Use __builtin_expect.
3971         * pthread.c: Likewise.
3973 2000-08-02  Andreas Jaeger  <aj@suse.de>
3975         * sysdeps/s390/pspinlock.c: New file.
3976         * sysdeps/s390/pt-machine.h: New file.
3977         Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
3979 2000-07-12  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
3981         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
3982         R3K.
3983         * sysdeps/mips/pt-machine.h (testandset): Likewise.
3985 2000-07-26  Andreas Jaeger  <aj@suse.de>
3987         * pthread.c: Initialize p_sem_avail.
3989 2000-07-25  Ulrich Drepper  <drepper@redhat.com>
3991         * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
3992         * semaphore.c: Handle spurious wakeups.
3994         * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
3995         for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
3997         * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
3998         (__pthread_wait_for_restart): Likewise.
4000         * condvar.c (pthread_cond_wait): Also check whether thread is
4001         cancelable before aborting loop.
4002         (pthread_cond_timedwait): Likewise.
4004         * signals.c (pthread_sighandler): Remove special code to restrore
4005         %gs on x86.
4006         (pthread_sighandler_t): Likewise.
4008 2000-07-25  Mark Kettenis  <kettenis@gnu.org>
4010         * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
4011         * pthread.c: Include <resolv.h>.
4012         (_res): Undefine.  Add extern declaration.
4014 2000-07-24  Ulrich Drepper  <drepper@redhat.com>
4016         * pthread.c (__pthread_initial_thread): Update initializer.
4017         (__pthread_manager_thread): Likewise.
4018         (pthread_initialize): Move setrlimit call to...
4019         (__pthread_initialize_manager): ...here.
4020         (__pthread_reset_main_thread): Reset also soft limit on stack size.
4022         * condvar.c: Handle spurious wakeups.  [PR libc/1749].
4023         * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
4025 2000-07-21  Ulrich Drepper  <drepper@redhat.com>
4027         * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
4028         __compare_and_swap to define testandset.
4029         * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
4030         Define IMPLEMENT_TAS_WITH_CAS.
4032 2000-07-20  Ulrich Drepper  <drepper@redhat.com>
4034         * Makefile: Pass -z nodelete to linker for libpthread.so
4035         generation if it understand this option.
4037 2000-07-18  Mark Kettenis  <kettenis@gnu.org>
4039         * manager.c (pthread_handle_create): Remove initialization of
4040         new_thread->p_res._sock.
4042 2000-07-19  Kaz Kylheku  <kaz@ashi.footprints.net>
4044         Bugfixes to the variant of the code for machines with no compare
4045         and swap.
4047         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
4048         node was not being properly enqueued, due to failing to update
4049         the lock->__status field.
4051         * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
4052         being set inappropriately, causing the suspend function to be called
4053         with a null self pointer and crash.
4055 2000-07-18  Ulrich Drepper  <drepper@redhat.com>
4057         * spinlock.h (__pthread_alt_trylock): Fix code used if no
4058         compare&swap is available.
4060         * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
4061         compare_and_swap.
4063         * pthread.c (pthread_initialize): Don't use sysconf to determine
4064         whether the machine has more than one processor.
4066         * spinlock.c (__pthread_alt_timedlock): Add back one of the
4067         removed thread_self calls.
4069 2000-07-18  Kaz Kylheku  <kaz@ashi.footprints.net>
4071         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
4072         __compare_and_swap to compare_and_swap in code which assumes
4073         compare swap is available.
4075 2000-07-18  Kaz Kylheku  <kaz@ashi.footprints.net>
4077         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
4078         bug whereby thr field of waitnode structure would not be correctly
4079         set unless a null self pointer is passed to the functions.
4080         Eliminated redundant calls to thread_self().
4082 2000-07-18  Jakub Jelinek  <jakub@redhat.com>
4084         * pthread.c (__pthread_initialize_manager): Lock
4085         __pthread_manager_thread.p_lock before calling clone.
4087 2000-05-05  H.J. Lu  <hjl@gnu.org>
4089         * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
4090         have acquire semantics.
4091         (__compare_and_swap_with_release_semantics): New inline
4092         function.
4093         (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
4095 2000-01-28  Hans Boehm  <hboehm@exch.hpl.hp.com>
4097         * manager.c: Fix the problem with signals at startup.
4098         Change the way that thread stacks are allocated on IA64.
4099         Clean up some of the guard page allocation stuff.
4101 1999-12-19  H.J. Lu  <hjl@gnu.org>
4103         * internals.h (page_roundup): New.
4104         * attr.c (__pthread_attr_setguardsize); Use page_roundup
4105         instead of roundup.
4106         * manager.c (pthread_allocate_stack): Make sure guardaddr is
4107         page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
4108         is define.
4110 1999-12-17  Hans Boehm  <hboehm@exch.hpl.hp.com>
4112         * manager.c (pthread_allocate_stack): Unmap the stack top
4113         if failed to map the stack bottom.
4114         Fix the guard page.
4115         (pthread_free): Fix the guard page.
4117         * pthread.c (pthread_initialize): Set rlimit correctly for
4118         NEED_SEPARATE_REGISTER_STACK.
4120 1999-12-16  H.J. Lu  <hjl@gnu.org>
4122         * pthread.c (__pthread_initialize_manager): Pass
4123         __pthread_manager_thread_bos instead of
4124         __pthread_manager_thread_tos to __clone2.
4126 1999-12-16  H.J. Lu  <hjl@gnu.org>
4128         * manager.c (pthread_allocate_stack): Correct the calculation
4129         of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
4130         stack bottom.
4132 1999-12-13  H.J. Lu  <hjl@gnu.org>
4134         * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
4135         bit after setting ar.ccv.
4137 1999-12-12  H.J. Lu  <hjl@gnu.org>
4139         * manager.c (pthread_allocate_stack): Make the starting
4140         address of the stack bottom page aligned. FIXME: it may
4141         need changes in other places.
4142         (pthread_handle_create): Likewise.
4144 1999-12-11  Hans Boehm  <hboehm@exch.hpl.hp.com>
4146         * manager.c (pthread_allocate_stack): Handle
4147         NEED_SEPARATE_REGISTER_STACK.
4148         (pthread_handle_create): Likewise.
4149         * pthread.c (__pthread_initialize_manager): Likewise.
4151         * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
4153 1999-12-02  H.J. Lu  <hjl@gnu.org>
4155         * sysdeps/ia64/pt-machine.h: New.
4157 2000-07-13  Ulrich Drepper  <drepper@redhat.com>
4159         * wrapsyscall.c: Mark non-__ protected names as weak.
4160         PR libc/1466.
4162 2000-07-12  Bruno Haible  <haible@clisp.cons.org>
4164         * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
4166 2000-07-12  Ulrich Drepper  <drepper@redhat.com>
4168         * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
4169         Add tests also to new alternative spinlock implementation.
4170         * spinlock.h: Likewise.
4171         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4173 2000-07-06  Ulrich Drepper  <drepper@redhat.com>
4175         * Version: Export __sigaction.
4176         * signals.c: Define __sigaction alias.  Use __libc_sigaction instead
4177         of __sigaction.
4178         * pthread.c: Use __libc_sigaction instead of __sigaction.
4180         * condvar.c: Implement pthread_condattr_getpshared and
4181         pthread_condattr_setpshared.
4182         * mutex.c: Implement pthread_mutexattr_getpshared and
4183          pthread_mutexattr_setpshared.
4184         * Versions: Export new functions.
4185         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
4187         * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
4188         (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
4189         is not selected.
4191 2000-07-04  Greg McGary  <greg@mcgary.org>
4193         * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
4194         pragmas.  Include bp-sym.h only if _LIBC.
4196 2000-07-04  Ulrich Drepper  <drepper@redhat.com>
4198         * spinlock.c (__pthread_unlock): Properly place write barrier.
4199         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4201 2000-07-03  Ulrich Drepper  <drepper@redhat.com>
4203         * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
4204         faster on SMP systems.  No more emulation of compare&swap for adaptive
4205         spinlocks.
4206         * spinlock.h: Likewise.
4207         * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
4208         Replace fast with adaptive mutex.
4209         * mutex.c: Rewrite for replacement of fast by adaptive mutex.
4210         * condvar.c: Likewise.
4211         * pthread.c: Define and initialize __pthread_smp_kernel variable.
4212         * internals.h: Declare __pthread_smp_kernel.
4213         * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
4214         _pthread_fastlock structure.
4215         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4217         * pthread.c: Remove initialization to zero from global variables.
4219 2000-06-29  Jakub Jelinek  <jakub@redhat.com>
4221         * shlib-versions: Make sparc64 GLIBC_2.2+ only.
4223 2000-06-28  Greg McGary  <greg@mcgary.org>
4225         * weaks.c: Wrap BP_SYM () around weak extern declarations of
4226         pthread functions that have pointers in their return+arg signatures.
4228 2000-06-27  Greg McGary  <greg@mcgary.org>
4230         * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
4231         extern declarations of pthread functions that have pointers in
4232         their return+arg signatures.
4234 2000-06-26  Ulrich Drepper  <drepper@redhat.com>
4236         * Makefile (tests): Add ex11.  Add rules to build it.
4237         * Examples/ex11.c: New file.
4238         * rwlock.c: Fix complete braindamaged previous try to implement
4239         timedout functions.
4241         * spinlock.c: Pretty print.
4243 2000-06-25  Ulrich Drepper  <drepper@redhat.com>
4245         * Makefile (tests): Add ex10.  Add rules to build it.
4246         * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
4247         pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
4248         * condvar.c (pthread_cond_wait): Allow mutex of kind
4249         PTHREAD_MUTEX_TIMED_NP.
4250         (pthread_cond_timedwait_relative): Likewise.
4251         * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
4252         (__pthread_mutex_trylock): Use __pthread_alt_trylock for
4253         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
4254         (__pthread_mutex_lock): Use __pthread_alt_lock for
4255         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
4256         (__pthread_mutex_timedlock): New function.
4257         (__pthread_mutex_unlock): Use __pthread_alt_unlock for
4258         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
4259         (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
4260         (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
4261         * spinlock.c: Implement alternate fastlocks.
4262         * spinlock.h: Add prototypes.
4263         * Examples/ex10.c: New file.
4264         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
4265         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4267         * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
4268         (__pthread_rwlock_timedrdlock): New function.
4269         (__pthread_rwlock_timedwrlock): New function.
4270         Use laternate fastlock function everywhere.
4272 2000-06-21  Andreas Jaeger  <aj@suse.de>
4274         * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
4275         prototype.
4277         * join.c: Include <stdlib.h> for exit prototype.
4279 2000-06-20  Ulrich Drepper  <drepper@redhat.com>
4281         * sysdeps/i386/useldt.h: Include <stdlib.h>.
4283         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
4284         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4286         * Makefile (libpthread-routines): Add barrier.
4287         (tests): Add ex9.  Add rule to build ex9.
4288         * Versions: Export barrier functions.
4289         * barrier.c: New file.
4290         * Examples/ex9.c: New file.
4291         * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
4292         * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
4293         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4295 2000-06-19  H.J. Lu  <hjl@gnu.org>
4297         * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
4298         HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
4299         (compare_and_swap_with_release_semantics): New. Default to
4300         compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
4301         is not defined.
4303         * spinlock.c (__pthread_unlock): Call
4304         compare_and_swap_with_release_semantics () instead of
4305         compare_and_swap ().
4307 2000-06-19  Ulrich Drepper  <drepper@redhat.com>
4309         * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
4310         to errno directly.
4311         * sysdeps/pthread/timer_delete.c: Likewise.
4312         * sysdeps/pthread/timer_getoverr.c: Likewise.
4313         * sysdeps/pthread/timer_gettime.c: Likewise.
4314         * sysdeps/pthread/timer_settime.c: Likewise.
4316 2000-06-13  Kaz Kylheku  <kaz@ashi.footprints.net>
4318         Timer nodes are now reference counted, and can be marked
4319         as deleted. This allows for the safe release of the global mutex
4320         in the middle without losing the timer being operated on.
4322         * sysdeps/pthread/posix-timer.h (struct timer_node):  The inuse
4323         member is now an enum with three values, so that an intermediate
4324         state can be represented (deleted but not free for reuse yet).
4325         New refcount member added.
4326         * sysdeps/pthread/timer_routines.c: Likewise.
4328         * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
4329         timer_valid): New inline functions added.
4331         * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
4332         restructured, recursive deadlock bug fixed.
4334         * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
4335         timer_addref to ensure that timer won't be deleted while mutex is not
4336         held. Also uses timer_invalid to perform validation of timer handle.
4337         * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
4338         * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
4340 2000-06-14  Ulrich Drepper  <drepper@redhat.com>
4342         * shlib-versions: Add entry for SH.
4343         Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
4345 2000-06-13  Kaz Kylheku  <kaz@ashi.footprints.net>
4347         A few optimizations.  Got rid of unnecessary wakeups of timer threads,
4348         tightened up some critical regions and micro-optimized some list
4349         manipulation code.
4351         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
4352         Returns int value now to indicate whether timer was queued at head.
4353         * sysdeps/pthread/posix-timer.h: Likewise.
4354         * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
4355         new return value from __timer_thread_queue_timer to avoid waking
4356         up timer thread unnecessarily.
4358         * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
4359         inuse flag, because this requires mutex to be held.  Callers updated
4360         to do the check when they have the mutex.
4361         * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
4363         * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
4364         regions: avoids making system calls while holding timer mutex, and
4365         a few computations were moved outside of the mutex as well.
4366         * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
4368         * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
4369         to list_unlink_ip, meaning idempotent.  Pointer manipulation
4370         changed to get better better code out of gcc.
4371         * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
4372         version of list_unlink added here.
4373         * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
4374         function in all places: idempotent one for timers, non-idempotent
4375         one for thread nodes.
4376         * sysdeps/pthread/timer_settime: Likewise.
4377         * sysdeps/pthread/timer_routines.c: Likewise.
4379 2000-06-13  Ulrich Drepper  <drepper@redhat.com>
4381         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
4382         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4384         * sysdeps/pthread/Makefile: Remove tests definition.
4386 2000-06-12  Kazumoto Kojima  <kkojima@rr.iij4u.or.jp>
4387             Yutaka Niibe  <gniibe@chroot.org>
4389         * sysdeps/sh/pspinlock.c: New file.
4390         * sysdeps/sh/pt-machine.h: New file.
4392 2000-06-12  Ulrich Drepper  <drepper@redhat.com>
4394         * Makefile (tests): Add joinrace.
4396         * Examples/ex6.c: Test return value of pthread_join.
4398 2000-06-11  Geoff Keating  <geoffk@cygnus.com>
4400         * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
4401         (__pthread_spin_trylock): Implement.
4402         (__pthread_spin_unlock): Implement.
4403         (__pthread_spin_init): Implement.
4404         (__pthread_spin_destroy): Implement.
4406 2000-06-10  Ulrich Drepper  <drepper@redhat.com>
4408         * sysdeps/pthread/timer_routines.c (list_append): Little fix to
4409         really append the entry.
4411 2000-06-10  Andreas Jaeger  <aj@suse.de>
4413         * lockfile.c (__fresetlockfiles): Remove unused variable fp.
4415 2000-06-10  Kaz Kylheku  <kaz@ashi.footprints.net>
4417         * sysdeps/pthread/timer_create.c: Thread matching now done on
4418         clock type as well as thread attributes.
4419         There are individual global signal-delivering threads for
4420         different clock types.
4421         * sysdeps/pthread/posix-timer.h: Likewise.
4422         * sysdeps/pthread/timer_routines.c: Likewise.
4424         * sysdeps/pthread/timer_routines.c: Thread allocation and
4425         deallocation function now remembers to put thread on active
4426         list and remove from active list.
4427         Thus now the feature of binding multiple timers
4428         to a single thread actually works.
4430 2000-06-10  Ulrich Drepper  <drepper@redhat.com>
4432         * pthread.c (__pthread_create_2_1): Optimize a bit.
4434         * internals.h (invalid_handle): Also test for p_terminated != 0.
4435         (nonexisting_handle): New function.  Same as old invalid_handle.
4436         * join.c (pthread_join): Use nonexisting_handle instead of
4437         invalid_handle to test for acceptable thread handle.
4438         * manager.c (pthread_handle_free): Likewise.
4439         * joinrace.c: New file.
4440         Reported by Permaine Cheung <pcheung@cygnus.com>.
4442 2000-06-08  Ulrich Drepper  <drepper@redhat.com>
4444         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
4445         Correct handling of matching variable.
4447         * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
4448         avoid warnings.
4450         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
4451         Be prepared for empty timer list.
4453         * sysdeps/pthread/timer_create.c (timer_create): Correct names of
4454         CPUTIME clock ID.  Add support for thread clocks.
4456         * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
4457         subtraction were switched.
4459         * sysdeps/pthread/timer_routines.c (init_module): Use
4460         THREAD_MAXNODES threads.
4462         * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
4463         * sysdeps/pthread/timer_create.c: Fill in creator_pid.
4464         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
4465         with sigqueueinfo is this system call is available.
4467         * sysdeps/pthread/timer_create.c (timer_create): Allow
4468         CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
4470         * sysdeps/pthread/Makefile: New file.  Add rules to build timer
4471         functionality.
4472         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
4474 2000-06-04  Kaz Kylheku  <kaz@ashi.footprints.net>
4476         * sysdeps/pthread/posix-timer.h: New file.
4477         * sysdeps/pthread/timer_create.c: New file.
4478         * sysdeps/pthread/timer_delete.c: New file.
4479         * sysdeps/pthread/timer_getoverr.c: New file.
4480         * sysdeps/pthread/timer_gettime.c: New file.
4481         * sysdeps/pthread/timer_routines.c: New file.
4482         * sysdeps/pthread/timer_settime.c: New file.
4483         * sysdeps/pthread/tst-timer.c: New file.
4485 2000-06-08  Ulrich Drepper  <drepper@redhat.com>
4487         * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
4488         LINK_MAX definitions if necessary.
4490 2000-06-04  Kaz Kylheku  <kaz@ashi.footprints.net>
4492         Added missing fork time handling of global libio lock.
4494         * lockfile.c (__fresetlockfiles): Now also resets the list lock,
4495         not just the individual stream locks. Rewritten to use new
4496         iterator interface provided by libio rather than accessing
4497         global variable.
4499         * lockfile.c (__flockfilelist, _funlockfilelist): New functions
4500         which lock and unlock the stream list using the new interface
4501         provied by libio.
4502         * internals.h: Likewise.
4504         * ptfork.c (__fork): Now calls __flockfilelist before fork,
4505         and __funlockfilelist in the parent after the fork.
4506         Child still calls __fresetlockfiles as before.
4508         * linuxthreads.texi: Now explains what happens to streams at
4509         fork time. Also whole new section on forking and thread added.
4510         Definition of pthread_atfork moved out of Miscellaneous Functions
4511         to this new section.
4513 2000-06-04  Jakub Jelinek  <jakub@redhat.com>
4515         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
4516         Add missing register.
4517         * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
4519 2000-06-02  Jakub Jelinek  <jakub@redhat.com>
4521         * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
4522         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
4523         * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
4525 2000-05-31  Andreas Jaeger  <aj@suse.de>
4527         * sysdeps/mips/pspinlock.c: Implement spinlocks.
4529 2000-05-28  Ulrich Drepper  <drepper@redhat.com>
4531         * spinlock.c (__pthread_lock): Remove ASSERT.
4533         * Makefile (tests): Add ex8.
4534         * Examples/ex8.c: New file.
4536 2000-05-12  Kaz Kylheku  <kaz@ashi.footprints.net>
4538         Bugfix: The pthread_atfork mechanism now takes care of its
4539         own internal mutex at fork time.
4541         * ptfork.c (__fork): Revised so that the mutex is held across
4542         the fork operation and while the handlers are called, and so that
4543         the child resets the mutex.
4545         * linuxthreads.texi: Updated pthread_atfork documentation to make
4546         it clear that fork and pthread_atfork can't be reentered from
4547         atfork handlers, that pthread_atfork and fork are mutually atomic,
4548         and that the handlers are inherited by the child process.
4550 2000-05-24  Ulrich Drepper  <drepper@redhat.com>
4552         * Makefile (libpthread-routines): Add pspinlock.
4553         * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
4554         Use struct _pthread_fastlock instead of pthread_spinlock_t.
4555         * condvar.c: Likewise.
4556         * internals.h: Likewise.
4557         * join.c: Likewise.
4558         * manager.c: Likewise.
4559         * mutex.c: Likewise.
4560         * pthread.c: Likewise.
4561         * rwlock.c: Likewise.
4562         * semaphore.c: Likewise.
4563         * signals.c: Likewise.
4564         * spinlock.h: Likewise.
4565         * spinlock.c: Likewise.  Remove pthread_spin_lock functions.
4566         * sysdeps/alpha/pspinlock.c: New file.
4567         * sysdeps/arm/pspinlock.c: New file.
4568         * sysdeps/i386/pspinlock.c: New file.
4569         * sysdeps/m68k/pspinlock.c: New file.
4570         * sysdeps/mips/pspinlock.c: New file.
4571         * sysdeps/powerpc/pspinlock.c: New file.
4572         * sysdeps/sparc/sparc32/pspinlock.c: New file.
4573         * sysdeps/sparc/sparc64/pspinlock.c: New file.
4574         * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
4575         back to _pthread_fastlock.  Define new pthread_spinlock_t.
4577 2000-05-24  Andreas Jaeger  <aj@suse.de>
4579         * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
4581 2000-05-21  Jakub Jelinek  <jakub@redhat.com>
4583         * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
4585 2000-05-13  Jakub Jelinek  <jakub@redhat.com>
4587         * internals.h (__RES_PTHREAD_INTERNAL): Define.
4589 2000-05-06  Kaz Kylheku  <kaz@ashi.footprints.net>
4591         * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
4592         object state is represented with additional bits which distinguish
4593         whether that state was set up in the current process, or
4594         in an ancestor process. If that state was set in an ancestor,
4595         it means that a fork happened while thread was executing the init
4596         function. In that case, the state is reset to NEVER.
4597         * mutex.c (__pthread_once_fork_prepare): New function.
4598         (__pthread_once_fork_child): Likewise
4599         (__pthread_once_fork_parent): Likewise
4600         (__pthread_reset_pthread_once): Removed.
4601         * ptfork.c (__fork): Call new handlers in mutex.c.
4602         * internals.h: Declarations of new mutex.c functions added.
4603         Declaration of removed function deleted.
4604         * linuxthreads.texi: Updated documentation about pthread_once
4605         to clarify what happens under cancellation and forking.
4607 2000-05-06  Kaz Kylheku  <kaz@ashi.footprints.net>
4609         * internals.h: New thread manager request type, REQ_KICK.
4610         * join.c (pthread_exit): main thread now calls exit() instead
4611         of _exit() in order to proper process cleanup.
4612         * manager.c (__pthread_manager): Do not terminate manager
4613         after unblocking main thread; wait for main thread's
4614         REQ_PROCESS_EXIT request instead.
4615         Also, added REQ_KICK case to handle new request; this just does
4616         nothing.
4617         * manager.c (pthread_exited): Do not terminate manager after
4618         unblocking main thread.
4619         * manager.c (__pthread_manager_sighandler): If the main thread
4620         is waiting for all other threads to die, send a REQ_KICK into
4621         the thread manager request pipe to get it to clean out the threads
4622         and unblock the main thread as soon as possible. This fixes
4623         the 2000 millisecond hang on shutdown bug.
4624         * Examples/ex7.c: New file, tests shutdown behavior when all threads
4625         including the main one call pthread_exit(), or implicitly do so.
4626         * Makefile (tests): Add ex7.
4628 2000-05-05  Andreas Jaeger  <aj@suse.de>
4630         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
4631         (pthread_getcpuclockid): Correct test for ourselves.
4633 2000-05-05  Ulrich Drepper  <drepper@redhat.com>
4635         * internals.h (struct _pthread_descr_struct): Reorganization.
4636         Allocate room for 16 pointers at head of the structure for future
4637         thread-local data handling.  Move p_self member in this area.
4638         * manager.c (pthread_handle_create): Adjust use of p_self.
4639         * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
4640         * pthread.c (__pthread_initial_thread): Adjust initialization.
4641         (__pthread_manager_thread): Likewise.
4643 2000-04-29  Bruno Haible  <haible@clisp.cons.org>
4645         * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
4646         for eventmask larger than 1 word.
4648 2000-04-27  Ulrich Drepper  <drepper@redhat.com>
4650         * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
4651         * pthread.c (__pthread_initialize_minimal): New function.  Perform
4652         minimal initialization.
4653         (pthread_initialize): Remove this code here.
4654         * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again.  We
4655         are working around the problem in glibc.
4657 2000-04-25  Ulrich Drepper  <drepper@redhat.com>
4659         * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
4660         now.  First gcc must be fixed (more concrete: libgcc).
4662 2000-04-24  Ulrich Drepper  <drepper@redhat.com>
4664         * pthread.c: Remove special treatement for interrupt handlers on x86.
4665         * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
4666         * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
4667         necessary.
4668         * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
4670 2000-04-24  Mark Kettenis  <kettenis@gnu.org>
4672         * join.c (pthread_exit): Set p_terminated after reporting the
4673         termination event instead of before.
4675 2000-04-20  Jakub Jelinek  <jakub@redhat.com>
4677         * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
4678         if __USE_UNIX98.
4680 2000-04-18  Andreas Jaeger  <aj@suse.de>
4682         * Versions: Use ld instead of ld.so.
4684 2000-04-18  Jakub Jelinek  <jakub@redhat.com>
4686         * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
4687         Remove the typedef keyword.
4689 2000-04-18  Jakub Jelinek  <jakub@redhat.com>
4691         * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
4692         not stbar.
4693         (READ_MEMORY_BARRIER): Define.
4694         * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
4695         MEMORY_BARRIER.
4696         * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
4697         headers.
4699 2000-04-17  Ulrich Drepper  <drepper@redhat.com>
4701         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
4702         (pthread_getcpuclockid): Don't compare thread_id with thread_self,
4703         use thread_handle().
4705 2000-04-16  Ulrich Drepper  <drepper@redhat.com>
4707         * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
4708         if fast mutex is used.  Don't initialize `already_canceled' twice.
4709         Correctly test for return value of timedsuspend.
4711         * pthread.c: Correct long-time braino.  We never set SA_SIGINFO and
4712         therefore don't need the _rt versions of the signal handlers.
4714 2000-04-15  Ulrich Drepper  <drepper@redhat.com>
4716         * pthread.c (pthread_yield): New function.
4717         * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
4718         * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
4719         * internals.h: Declare __pthread_yield.
4721         * pthread.c (pthread_initialize): Avoid a bit more code if
4722         realtime signals are known to exist.
4724         * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
4725         to dynamically detect RT signals and avoid generating compatibility
4726         functions with old kernel.
4727         * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
4728         __pthread_restart_new directly.
4729         (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
4730         __pthread_wait_for_restart_signal directly.
4731         (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
4732         __pthread_timedsuspend_new directly.
4734 2000-04-15  Ulrich Drepper  <drepper@redhat.com>
4736         * condvar.c: Remove all the special code to handle cond_timedwait.
4737         Use timedsuspend instead.
4738         * internals.h: Declare __pthread_timedsuspend_old,
4739         __pthread_timedsuspend_new, and __pthread_timedsuspend.
4740         Remove declaration of __pthread_init_condvar.
4741         * pthread.c: Define __pthread_timedsuspend variable.
4742         (__pthread_timedsuspend_old): New function.  Timed suspension
4743         implementation for old Linux kernels.
4744         (__pthread_timedsuspend_new): New function.  Timed suspension
4745         implementation for new Linux kernels.
4746         * restart.h (timedsuspend): New function.  Call appropriate
4747         suspension function through __pthread_timedsuspend.
4748         * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
4749         the code.
4750         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4752         * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
4753         undefined.
4754         * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
4755         where possible.
4756         * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
4757         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
4759         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
4760         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4762 2000-04-14  Andreas Jaeger  <aj@suse.de>
4764         * weaks.c: Fix typo.
4766         * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
4767         2.2 for linuxthreads.
4769 2000-04-13  Ulrich Drepper  <drepper@redhat.com>
4771         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
4772         (pthread_getcpuclockid): Fix typo.
4774 2000-04-12  Ulrich Drepper  <drepper@redhat.com>
4776         * Makefile (libpthread-routines): Add getcpuclockid.
4777         * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
4778         * sysdeps/pthread/getcpuclockid.c: New file.
4779         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
4780         * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
4782         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
4783         Defined.
4784         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4786         * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
4787         pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
4788         and pthread_spin_unlock.
4789         * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
4790         into pthread_spinlock_t.  Change all uses.
4791         * spinlock.c: Implement pthread_spin_lock.
4792         Rename __pthread_unlock to __pthread_spin_unlock and define weak
4793         alias for real name.
4794         Define pthread_spin_trylock, pthread_spin_init, and
4795         pthread_spin_destroy.
4796         Change all uses of _pthread_fastlock to pthread_spinlock_t.
4797         * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
4798         Change all uses of _pthread_fastlock to pthread_spinlock_t.
4799         * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
4800         pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
4801         and pthread_spin_unlock.
4802         * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
4803         Change all uses of _pthread_fastlock to pthread_spinlock_t.
4804         * condvar.c: Likewise.
4805         * internals.h: Likewise.
4806         * join.c: Likewise.
4807         * manager.c: Likewise.
4808         * mutex.c: Likewise.
4809         * pthread.c: Likewise.
4810         * rwlock.c: Likewise.
4811         * semaphore.c: Likewise.
4812         * signals.c: Likewise.
4814         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
4815         macros.
4816         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
4818 2000-04-11  Ulrich Drepper  <drepper@redhat.com>
4820         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
4821         _POSIX_SHARED_MEMORY_OBJECTS.
4823 2000-04-11  Andreas Jaeger  <aj@suse.de>
4825         * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
4826         (__compare_and_swap): Mark as modifying memory.
4828 2000-04-11  Geoff Keating  <geoffk@cygnus.com>
4830         * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
4831         __volatile__.
4832         (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
4833         Don't have the 'asm' __volatile__.
4835 2000-04-11  Ulrich Drepper  <drepper@redhat.com>
4837         * internals.h: Define MEMORY_BARRIER as empty if not defined already.
4838         * spinlock.c (__pthread_lock): Add memory barriers.
4839         (__pthread_unlock): Likewise.
4840         * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
4841         instruction.
4842         (RELEASE): Not needed anymore.
4843         (__compare_and_swap): Mark asm as modifying memory.
4844         * sysdeps/powerpc/pt-machine.h (sync): Remove.  Replace with definition
4845         of MEMORY_BARRIER.
4846         (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
4847         * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
4848         (MEMORY_BARRIER): Define using stbar.
4849         * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
4850         stbar.
4851         (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
4852         Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
4853         Mike Burrows <m3b@pa.dec.com>.
4855 2000-04-09  Ulrich Drepper  <drepper@redhat.com>
4857         * signals.c (sigaction): Fix return value for the case SIG is one
4858         of the signals the implementation uses.
4859         Patch by Xavier.Leroy@inria.fr.
4861 2000-04-01  Andreas Jaeger  <aj@suse.de>
4863         * attr.c: Use shlib-compat macros.
4864         * oldsemaphore.c: Likewise.
4865         * pthread.c: Likewise.
4866         * weaks.c: Likewise.
4868 2000-03-26  Ulrich Drepper  <drepper@redhat.com>
4870         * semaphore.c (sem_timedwait): New function.
4871         Patch by Carl Mailloux <carlm@oricom.ca>.
4872         * semaphore.h: Declare sem_timedwait.
4873         * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
4875 2000-03-26  Roland McGrath  <roland@baalperazim.frob.com>
4877         * sysdeps/pthread/Makefile: File removed.
4879 2000-03-23  Ulrich Drepper  <drepper@redhat.com>
4881         * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
4882         * internals.h (__pthread_reset_pthread_once): Add prototype.
4883         * ptfork.c (__fork): Call __pthread_reset_pthread_once.
4885         * manager.c (pthread_handle_create): Store ID of new thread before
4886         clone call.
4888 2000-03-21  Ulrich Drepper  <drepper@redhat.com>
4890         * attr.c: Use new macros from shlib-compat.h to define versions.
4891         * oldsemaphore.c: Likewise.
4892         * semaphore.c: Likewise.
4893         * weaks.c: Likewise.
4895         * pthread.c: Update for new SHLIB_COMPAT definition.
4897         * manager.c (__pthread_manager): Unmask debug signal.
4899         * pthread.c (pthread_initialize): Test for address of __dso_handle
4900         being NULL, not value.  Use __on_exit, not on_exit.
4901         Patch by Andreas Jaeger <aj@suse.de>.
4903         * pthread.c: Use new macros from shlib-compat.h to define versions.
4905 2000-03-19  Ulrich Drepper  <drepper@redhat.com>
4907         * pthread.c (pthread_initialize): Instead of on_exit use
4908         __cxa_atexit if __dso_label is available to allow unloading the
4909         libpthread shared library.
4911 2000-03-16  Ulrich Drepper  <drepper@redhat.com>
4913         * condvar.c: Make tests for ownership of mutex less strict.
4915 2000-03-14  Ulrich Drepper  <drepper@redhat.com>
4917         * condvar.c (pthread_cond_wait): Check whether mutex is owned by
4918         current thread and return error if not.
4919         (pthread_cond_timedwait_relative_old): Likewise.
4920         (pthread_cond_timedwait_relative_new): Likewise.
4922         * mutex.c (__pthread_once): Handle cancelled init function correctly.
4923         (pthread_once_cancelhandler): New function.
4924         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4926 2000-03-14  Andreas Jaeger  <aj@suse.de>
4928         * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
4929         REG_GS.
4930         (pthread_handle_sigrestart_rt): Likewise.
4931         * signals.c (pthread_sighandler_rt): Likewise.
4933 2000-03-02  Andreas Jaeger  <aj@suse.de>
4935         * sysdeps/pthread/bits/libc-lock.h: Fix typo.
4936         Reported by Sean Chen <sean.chen@turbolinux.com>.
4938 2000-02-28  Andreas Jaeger  <aj@suse.de>
4940         * rwlock.c: Fix typo.
4942 2000-02-27  Ulrich Drepper  <drepper@redhat.com>
4944         * rwlock.c: Define __* variants of the functions and make old names
4945         aliases.
4946         * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
4947         * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
4949 2000-02-25  Andreas Jaeger  <aj@suse.de>
4951         * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
4952         pwrite64, lseek64, open64, and __open64 with version 2.2.
4954 2000-02-22  Ulrich Drepper  <drepper@redhat.com>
4956         * semaphore.h (SEM_FAILED): Use 0 not NULL.
4958 2000-02-14  Ulrich Drepper  <drepper@redhat.com>
4960         * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
4961         nanosleep does not work either.  Get absolute time inside the
4962         loop.
4963         (pthread_cond_timedwait_relative_new): Likewise.
4964         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4966 2000-02-13  Andreas Jaeger  <aj@suse.de>
4968         * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
4969         (pthread_cond_timedwait_relative_old): Likewise.
4971 2000-02-13  Ulrich Drepper  <drepper@redhat.com>
4973         * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
4974         but keep the code around.  A bug in the kernel prevent us from
4975         using the code.
4976         (pthread_cond_timedwait_relative_new): Likewise.
4977         (PR libc/1597 and libc/1598).
4979 2000-02-01  Kaz Kylheku  <kaz@ashi.footprints.net>
4981         * condvar.c (pthread_cond_timedwait_relative_old): Do tight
4982         loop around nanosleep calls instead of around most of the function
4983         (pthread_cond_timedwait_relative_new): Likewise.
4984         body.  Got rid of backwards goto and one local.
4986 2000-01-31  Ulrich Drepper  <drepper@redhat.com>
4988         * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
4989         before every nanosleep call to account for time spent in the rest
4990         of the function.
4991         (pthread_cond_timedwait_relative_new): Likewise.
4992         Patch by khendricks@ivey.uwo.ca (PR libc/1564).
4994 2000-01-29  Ulrich Drepper  <drepper@redhat.com>
4996         * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
4997         from nanosleep call so that in case we restart we only wait for the
4998         remaining time.
4999         (pthread_cond_timedwait_relative_new): Likewise.
5000         Patch by khendricks@ivey.uwo.ca (PR libc/1561).
5002 2000-01-18  Ulrich Drepper  <drepper@cygnus.com>
5004         * manager.c (pthread_allocate_stack): Compute guard page address
5005         correctly.  Patch by HJ Lu.
5007         * sysdeps/pthread/pthread.h: Define
5008         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
5010 2000-01-16  Ulrich Drepper  <drepper@cygnus.com>
5012         * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
5013         preference handling.
5014         (pthread_rwlockattr_setkind_np): Allow
5015         PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
5016         Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
5018 2000-01-12  Ulrich Drepper  <drepper@cygnus.com>
5020         * internals.h (pthread_readlock_info): New structure.
5021         (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
5022         p_untracked_readlock_count.
5023         * pthread.c (__pthread_initial_thread, pthread_manager_thread):
5024         Add initializers for new fields.
5025         * manager.c (pthread_free): Free read/write lock lists.
5026         * queue.h (queue_is_empty): New function.
5027         * rwlock.c: Implement requirements about when readers should get
5028         locks assigned.
5029         * sysdeps/pthread/pthread.h
5030         (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
5031         * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
5032         Define this name as well.
5033         Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
5035 2000-01-05  Ulrich Drepper  <drepper@cygnus.com>
5037         * pthread.c (__pthread_initial_thread, pthread_manager_thread):
5038         Adjust initializers for struct _pthread_descr_struct change.
5039         * internals.h (struct _pthread_descr_struct): Move new elements to
5040         the end.
5042 2000-01-03  Kaz Kylheku  <kaz@ashi.footprints.net>
5044         Redesigned how cancellation unblocks a thread from internal
5045         cancellation points (sem_wait, pthread_join,
5046         pthread_cond_{wait,timedwait}).
5047         Cancellation won't eat a signal in any of these functions
5048         (*required* by POSIX and Single Unix Spec!).
5049         * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
5050         simultaneous condition variable signal (not required by POSIX
5051         or Single Unix Spec, but nice).
5052         * spinlock.c: __pthread_lock queues back any received restarts
5053         that don't belong to it instead of assuming ownership of lock
5054         upon any restart; fastlock can no longer be acquired by two threads
5055         simultaneously.
5056         * restart.h: Restarts queue even on kernels that don't have
5057         queued real time signals (2.0, early 2.1), thanks to atomic counter,
5058         avoiding a rare race condition in pthread_cond_timedwait.
5060 1999-12-31  Andreas Jaeger  <aj@suse.de>
5062         * internals.h: Remove duplicate prototype declarations.
5064         * weaks.c: Remove __THROW from prototypes since the file is not
5065         compiled by a C++ compiler.
5066         * internals.h: Likewise.
5068 1999-12-30  Andreas Jaeger  <aj@suse.de>
5070         * sysdeps/pthread/pthread.h: Move internal functions to...
5071         * sysdeps/pthread/bits/libc-lock.h: ...here.
5073 1999-12-29  Andreas Jaeger  <aj@suse.de>
5075         * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
5077 1999-12-28  Ulrich Drepper  <drepper@cygnus.com>
5079         * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
5080         beginning.
5082         * manager.c (__pthread_start): Add one more cast to prevent
5083         warning on 64bit machines.
5085 1999-12-21  Ulrich Drepper  <drepper@cygnus.com>
5087         * manager.c (pthread_handle_create): Set p_pid of new thread
5088         before calling the callback function to report a new thread.
5090 1999-12-20  Andreas Jaeger  <aj@suse.de>
5092         * pthread.c (pthread_initialize): Move getrlimit call after
5093         setting of errno.
5095 1999-12-18  Ulrich Drepper  <drepper@cygnus.com>
5097         * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
5098         pwrite64, lseek64, open64, and __open64.
5099         * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
5100         pwrite64, lseek64, open64, and __open64.
5102         * manager.c (pthread_allocate_stack): Correct computation of
5103         new_thread_bottom.  Correct handling of stack size and when the
5104         rlimit method to guard for stack growth is used.
5105         * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
5106         minus one pagesize (not two).
5108 1999-12-03  Andreas Jaeger  <aj@suse.de>
5110         * Versions: Add __res_state with version GLIBC_2.2.
5112         * errno.c (__res_state): New function to return thread specific
5113         resolver state.
5115         * pthread.c (pthread_initialize): Initialize p_resp.
5116         (__pthread_reset_main_thread): Also set p_resp.
5118         * manager.c (pthread_handle_create): Initialize p_resp.
5120         * internals.h: Add thread specific resolver state.
5121         Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
5123 1999-12-01  Ulrich Drepper  <drepper@cygnus.com>
5125         * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
5126         beginning.
5127         * sysdeps/i386/i686/pt-machine.h: Likewise.
5128         Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
5130 1999-11-23  Ulrich Drepper  <drepper@cygnus.com>
5132         * manager.c (pthread_start_thread_event): Initialize p_pid already
5133         here.
5135 1999-11-22  Ulrich Drepper  <drepper@cygnus.com>
5137         * internals.h: Add prototype for __pthread_manager_event.
5138         * manager.c (__pthread_manager_event): New function.
5139         (pthread_start_thread_event): Correct computation of self.
5140         Use INIT_THREAD_SELF.
5141         * pthread.c (__pthread_manager_thread): Initialize p_lock.
5142         (__pthread_initialize_manager): Respect event flags also for creation
5143         of the manager thread.
5145 1999-11-08  Ulrich Drepper  <drepper@cygnus.com>
5147         * pthread.c (__pthread_initialize_manager): Initialize
5148         __pthread_manager_thread.p_tid.
5150 1999-11-02  Ulrich Drepper  <drepper@cygnus.com>
5152         * internals.h: Declare __pthread_last_event.
5153         * manager.c: Define __pthread_last_event.
5154         (pthread_handle_create): Set __pthread_last_event.
5155         (pthread_exited): Likewise.
5156         * join.c (pthread_exit): Likewise.
5158         * Makefile (libpthread-routines): Add events.
5159         * events.c: New file.
5160         * internals.h: Protect against multiple inclusion.
5161         Include thread_dbP.h header.
5162         (struct _pthread_descr_struct): Add new fields p_report_events and
5163         p_eventbuf.
5164         Declare event reporting functions.
5165         * join.c (pthread_exit): Signal event if this is wanted.
5166         * manager.c (__pthread_threads_events): New variable.
5167         (pthread_handle_create): Take new parameters with event information.
5168         Signal TD_CREATE event if wanted.
5169         (__pthread_manager): Adjust pthread_handle_create call.
5170         (pthread_start_thread_event): New function.  Block until manager is
5171         finished and then call pthread_start_thread.
5172         (pthread_exited): Signal TD_REAP event if wanted.
5174 1999-10-26  Ulrich Drepper  <drepper@cygnus.com>
5176         * restart.h (suspend_with_cancellation): Rewrite as a macro.
5178         * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
5180 1999-10-25  Andreas Jaeger  <aj@suse.de>
5182         * internals.h: Remove K&R compatibility.
5183         * no-tsd.c: Likewise.
5184         * semaphore.h: Likewise.
5185         * signals.c: Likewise.
5186         * sysdeps/pthread/bits/libc-tsd.h: Likewise.
5187         * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
5188         * weaks.c: Likewise.
5190 1999-10-21  Xavier Leroy  <Xavier.Leroy@inria.fr>
5192         * pthread.c: For i386, wrap pthread_handle_sigrestart and
5193         pthread_handle_sigcancel with functions that restore %gs from the
5194         signal context.  For each signal handling function, two wrappers
5195         are required, one for a non-RT signal and one for a RT signal.
5196         * signal.c: For i386, add code to restore %gs from the signal
5197         context in pthread_sighandler and pthread_sighandler_rt.
5199 1999-10-17  Ulrich Drepper  <drepper@cygnus.com>
5201         * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
5203 1999-10-14  Ulrich Drepper  <drepper@cygnus.com>
5205         * pthread.c (__pthread_initial_thread): Pass argument to
5206         PTHREAD_START_ARGS_INITIALIZER.
5207         (__pthread_manager_thread): Likewise.
5209         * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
5210         initialize function.
5212         * manager.c (pthread_handle_create): Remove p_startfct initialization.
5214         * internals.h (_pthread_descr_struct): We don't need p_startfct field.
5216 1999-10-12  Ulrich Drepper  <drepper@cygnus.com>
5218         * internals.h: Correct return types for __libc_read and __libc_write.
5220 1999-10-09  Andreas Jaeger  <aj@suse.de>
5222         * internals.h: Add __new_sem_post to get prototype in
5223         manager.c; include semaphore.h for needed types.
5225 1999-10-08  Ulrich Drepper  <drepper@cygnus.com>
5227         * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
5228         directly instead of calling sem_post which should not be necessary
5229         but is faster and might help in some case to work around problems.
5230         Patch by khendricks@ivey.uwo.ca [libc/1382].
5232 1999-10-08  Andreas Schwab  <schwab@suse.de>
5234         * sysdeps/pthread/Subdirs: New file.
5235         * Implies: Removed.
5237 1999-10-07  Ulrich Drepper  <drepper@cygnus.com>
5239         * Implies: New file.
5240         * internals.h (struct _pthread_descr_struct): Add p_startfct.
5241         * manager.c (pthread_handle_create): Initialize p_startfct.
5242         * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
5244 1999-09-25  Ulrich Drepper  <drepper@cygnus.com>
5246         * manager.c (__linuxthreads_pthread_threads_max): New variable.
5247         * specific.c (__linuxthreads_pthread_keys_max): New variable.
5248         (__linuxthreads_pthread_key_2ndlevel_size): New variable.
5250         * condvar.c (pthread_cond_timedwait_relative): Never return with
5251         EINTR.  Patch by Andreas Schwab.
5253 1999-09-19  Ulrich Drepper  <drepper@cygnus.com>
5255         * signals.c (sigaction): Correct last patch.  Don't select
5256         pthread_sighandler_rt based on the signal number but instead of
5257         the SA_SIGINFO flag.
5259 1999-09-23  Ulrich Drepper  <drepper@cygnus.com>
5261         * specific.c: Move definitions of struct pthread_key_struct and
5262         destr_function to ...
5263         * internals.h: ...here.
5265 1999-09-18  Ulrich Drepper  <drepper@cygnus.com>
5267         * pthread.c (pthread_handle_sigrestart_rt): New function.  Use
5268         this instead of pthread_handle_sigrestart if the signal is an RT
5269         signal.
5271         * signals.c: Handle passing through of sighandler arguments also
5272         for real-time signals.
5274 1999-09-03  Andreas Schwab  <schwab@suse.de>
5276         * ptfork.c (__fork): Renamed from fork and use __libc_fork.  Add
5277         fork as weak alias.
5278         (__vfork): New function, alias vfork.
5279         * Versions: Export __fork, vfork, and __vfork in libpthread.
5281 1999-08-23  Andreas Schwab  <schwab@suse.de>
5283         * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
5284         call to signal handler.
5286 1999-08-20  Ulrich Drepper  <drepper@cygnus.com>
5288         * pthread.c (__pthread_reset_main_thread): Undo last change.
5289         (__pthread_kill_other_threads_np): Reset signal handlers for the
5290         signals we used in the thread implementation here.
5292 1999-08-19  Ulrich Drepper  <drepper@cygnus.com>
5294         * pthread.c (__pthread_reset_main_thread): Reset signal handlers
5295         for the signals we used in the thread implementation [PR libc/1234].
5297         * Versions: Export __pthread_kill_other_threads_np from libpthread
5298         for GLIBC_2.1.2.
5300         * signals.c: Pass sigcontext through wrapper to the user function.
5302 1999-08-01  Ulrich Drepper  <drepper@cygnus.com>
5304         * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
5305         __libc_internal_tsd_set.
5307 1999-07-29  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5309         * manager.c: Remove inclusion of <linux/tasks.h> since it's not
5310         needed anymore.
5312 1999-07-16  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5314         * internals.h: Align _pthread_descr_struct to 32 bytes.
5315         Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
5316         libc/1206.
5318 1999-07-09  Ulrich Drepper  <drepper@cygnus.com>
5320         * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
5321         swap function.
5323 1999-07-09  Cristian Gafton  <gafton@redhat.com>
5325         * Makefile (libpthread-routines): Add oldsemaphore routine.
5326         * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
5327         sem_trywait, and sem_wait to GLIBC_2.1.
5328         * oldsemaphore.c: New file.
5329         * semaphore.c: Add default_symbol_versions for the changed functions.
5330         (__new_sem_init): Rename from sem_init.
5331         (__new_sem_post): Rename from sem_post.
5332         (__new_sem_wait): Rename from sem_wait.
5333         (__new_sem_trywait): Rename from sem_trywait.
5334         (__new_sem_getvalue): Rename from sem_getvalue.
5335         (__new_sem_destroy): Rename from sem_destroy.
5337 1999-06-23  Robey Pointer  <robey@netscape.com>
5339         * internals.h: Added p_nextlock entry to separate queueing for a
5340         lock from queueing for a CV (sometimes a thread queues on a lock
5341         to serialize removing itself from a CV queue).
5342         * pthread.c: Added p_nextlock to initializers.
5343         * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
5345 1999-07-09  Ulrich Drepper  <drepper@cygnus.com>
5347         * manager.c (pthread_handle_create): Free mmap region after stack
5348         if clone failed.  Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
5350 1999-05-23  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5352         * man/pthread_cond_init.man: Correct example.
5353         Reported by Tomas Berndtsson <tomas@nocrew.org>.
5355         * linuxthreads.texi (Condition Variables): Likewise.
5357 1999-05-18  Jakub Jelinek  <jj@ultra.linux.cz>
5359         * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
5360         casx not cas, also successful casx returns the old value in rd
5361         and not the new value.
5363 1999-05-16  Xavier Leroy  <Xavier.Leroy@inria.fr>
5365         * manager.c: If pthread_create() is given a NULL attribute
5366         and the thread manager runs with a realtime policy, set the
5367         scheduling policy of the newly created thread back to SCHED_OTHER.
5368         * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
5369         initialize the schedpolicy field of new_thread->p_start_args
5370         to that of the calling thread.
5372 1999-04-29  Ulrich Drepper  <drepper@cygnus.com>
5374         * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
5375         instruction does not allow memory element to use offset.
5377 1999-04-28  Ulrich Drepper  <drepper@cygnus.com>
5379         * manager.c (pthread_allocate_stack): Optimize initialization of new
5380         thread descriptor.
5382         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
5383         Don't use initializer since it is all zeroes.
5384         (__libc_once_define): Likewise.
5386 1999-04-16  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5388         * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
5389         doesn't exist anymore.
5390         * sysdeps/i386/Implies: Likewise.
5391         * sysdeps/m68k/Implies: Likewise.
5392         * sysdeps/mips/Implies: Likewise.
5393         * sysdeps/powerpc/Implies: Likewise.
5394         * sysdeps/sparc/sparc32/Implies: Likewise.
5395         * sysdeps/sparc/sparc64/Implies: Likewise.
5397 1999-04-15  Ulrich Drepper  <drepper@cygnus.com>
5399         * sysdeps/alpha/bits/semaphore.h: Removed.
5400         * sysdeps/powerpc/bits/semaphore.h: Removed.
5401         * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
5402         * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
5403         * Makefile (headers): Remove bits/semaphore.h.
5405         * semaphore.h: Define _pthread_descr if necessary.
5406         Don't include limits.h.  Define SEM_VALUE_MAX directly.
5407         Define SEM_FAILED.
5408         (sem_t): Protect element names with leading __.
5409         Add declarations for sem_close, sem_open, and sem_unlink.
5410         * semaphore.c: Adjust all functions for new element names.
5411         Define sem_close, sem_open, and sem_unlink.
5412         * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
5413         GLIBC_2.1.1.
5414         * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
5415         necessary.
5417 1999-03-16  H.J. Lu  <hjl@gnu.org>
5419         * specific.c (pthread_key_delete): Check th->p_terminated to see
5420         if the thread is running.
5422         * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
5423         Added to GLIBC_2.0 for libc.so.
5425 1999-02-12  H.J. Lu  <hjl@gnu.org>
5427         * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
5428         __libc_allocate_rtsig): Added to GLIBC_2.1.
5430         * internals.h (DEFAULT_SIG_RESTART): Removed.
5431         (DEFAULT_SIG_CANCEL): Removed.
5433         * pthread.c (init_rtsigs, __libc_current_sigrtmin,
5434         __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
5435         (__pthread_sig_restart, __pthread_sig_cancel,
5436         __pthread_sig_debug): Initialized.
5437         (pthread_initialize): Call init_rtsigs () to initialize
5438         real-time signals.
5440 1999-02-03  H.J. Lu  <hjl@gnu.org>
5442         * manager.c (__pthread_manager): Do block __pthread_sig_debug.
5443         Don't restart the thread which sent REQ_DEBUG.
5444         (pthread_start_thread): Check if __pthread_sig_debug > 0
5445         before debugging.
5447         * pthread.c (__pthread_initialize_manager): Suspend ourself
5448         after sending __pthread_sig_debug to gdb instead of
5449         __pthread_sig_cancel.
5451 1999-01-24  H.J. Lu  <hjl@gnu.org>
5453         * manager.c (__pthread_manager): Delete __pthread_sig_debug
5454         from mask if __pthread_sig_debug > 0.
5455         (pthread_handle_create): Increment __pthread_handles_num.
5457         * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
5458         * pthread.c (__pthread_initialize_manager): Likewise.
5460         * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
5461         instead of __libc_allocate_rtsig (2).
5462         (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
5463         instead of __pthread_sig_cancel.
5464         (pthread_handle_sigdebug): Fix comments.
5466 1999-01-21  Ulrich Drepper  <drepper@cygnus.com>
5468         * manager.c (pthread_allocate_stack): Set
5469         __pthread_nonstandard_stacks if user-specified stack is used.
5471 1999-01-16  Ulrich Drepper  <drepper@cygnus.com>
5473         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
5474         _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
5476 1999-01-07  Xavier Leroy  <Xavier.Leroy@inria.fr>
5478         * pthread.c: Use a third signal __pthread_sig_debug distinct
5479         from __pthread_sig_cancel to notify gdb when a thread is
5480         created
5481         * manager.c: Likewise.
5482         * internals.h: Likewise.
5483         * signals.c: The implementation of sigwait(s) assumed that
5484         all signals in s have signal handlers already attached.
5485         This is not required by the standard, so make it work
5486         also if some of the signals have no handlers.
5488 1999-01-05  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
5490         * linuxthreads.texi: Remove pointers from first @node.  Move old
5491         @node spec inside comment.
5493 1998-12-31  Ulrich Drepper  <drepper@cygnus.com>
5495         * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
5496         _IO_lock_unlock.
5498 1998-12-29  Ulrich Drepper  <drepper@cygnus.com>
5500         * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
5501         lock.  Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
5503 1998-12-21  Ulrich Drepper  <drepper@cygnus.com>
5505         * manager.c: Threads now send __pthread_sig_cancel on termination.
5506         Change clone call and signal masks.
5507         * thread.c (pthread_handle_sigrestart): Remove special code for
5508         manager.
5509         (pthread_handle_sigcancel): In manager thread call
5510         __pthread_manager_sighandler.
5511         * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
5512         * sysdeps/i386/i686/pt-machine.h: Likewise.
5513         Patches by Xavier Leroy.
5515 1998-12-14  Ulrich Drepper  <drepper@cygnus.com>
5517         * spinlock.c (__pthread_unlock): Don't crash if called for an
5518         untaken mutex.  Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
5520         * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
5521         overall runtime.
5523 1998-12-13  Ulrich Drepper  <drepper@cygnus.com>
5525         * Examples/ex3.c: Wait until all threads are started before
5526         searching for the number to avoid race condition on very fast
5527         systems.
5529 1998-12-08  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5531         * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
5532         declaration since it's not needed.
5534         * sysdeps/pthread/pthread.h: Move internal functions to ...
5535         * internals.h: ...here.
5537 1998-12-02  H.J. Lu  <hjl@gnu.org>
5539         * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
5540         SIGRTMIN is defined.
5541         (__pthread_sig_cancel): Likewise.
5543 1998-12-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5545         * wrapsyscall.c: Include <sys/mman.h> for msync,
5546         <stdlib.h> for system and <termios.h> for tcdrain prototype.
5547         Correct msync declaration.
5549 1998-11-29  Roland McGrath  <roland@baalperazim.frob.com>
5551         * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
5552         __libc_tsd_set): New macros for new interface.
5553         * no-tsd.c: New file, provide uninitialized defns of
5554         __libc_internal_tsd_get and __libc_internal_tsd_set.
5555         * Makefile (routines): Add no-tsd.
5557 1998-10-12  Roland McGrath  <roland@baalperazim.frob.com>
5559         * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
5560         * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
5561         __libc_internal_tsd_set): Move decls to ...
5562         * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
5563         declarations.
5565         * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
5566         __libc_internal_tsd_set): Make these pointers to functions, not
5567         functions; remove #pragma weak decls for them.
5568         * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
5569         Define static functions and initialized pointers to them.
5571 1998-11-18  Ulrich Drepper  <drepper@cygnus.com>
5573         * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
5574         (CFLAGS-specific.c): Likewise.
5575         (CFLAGS-pthread.c): Likewise.
5576         (CFLAGS-ptfork.c): Likewise.
5577         (CFLAGS-cancel.c): Likewise.
5578         * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
5579         as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
5581         * mutex.c (pthread_mutex_init): Define as strong symbol.
5582         (pthread_mutex_destroy): Likewise.
5583         (pthread_mutex_trylock): Likewise.
5584         (pthread_mutex_lock): Likewise.
5585         (pthread_mutex_unlock): Likewise.
5586         (pthread_mutexattr_init): Likewise.
5587         (pthread_mutexattr_destroy): Likewise.
5588         (pthread_once): Likewise.
5589         * ptfork.c (pthread_atfork): Likewise.
5590         * specific.c (pthread_key_create): Likewise.
5591         (pthread_setspecific): Likewise.
5592         (pthread_getspecific): Likewise.
5594 1998-11-15  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
5596         * linuxthreads.texi: Fix punctuation after xref.
5598 1998-11-10  H.J. Lu  <hjl@gnu.org>
5600         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
5601         if it is defined in <linux/limits.h>.
5603 1998-10-29 14:28  Ulrich Drepper  <drepper@cygnus.com>
5605         * spinlock.h (__pthread_trylock): Define inline.
5606         (__pthread_lock): Add extra parameter to declaration.  Declare
5607         using internal_function.
5608         (__pthread_unlock): Declare using internal_function.
5609         * spinlock.c (__pthread_lock): Add new parameter.  Use it instead
5610         of local variable self.  Avoid recomputing self.  Define using
5611         internal_function.
5612         (__pthread_trylock): Remove.
5613         (__pthread_unlock): Define using internal_function.
5614         * cancel.c: Adjust for __pthread_lock interface change.  Use already
5615         computed self value is possible.
5616         * condvar.c: Likewise.
5617         * join.c: Likewise.
5618         * manager.c: Likewise.
5619         * mutex.c: Likewise.
5620         * pthread.c: Likewise.
5621         * rwlock.c: Likewise.
5622         * semaphore.c: Likewise.
5623         * signals.c: Likewise.
5625 1998-10-27 13:46  Ulrich Drepper  <drepper@cygnus.com>
5627         * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
5628         __ to field names of the struct.
5629         * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
5630         Likewise.
5631         (pthread_attr_t): Likewise.
5632         (pthread_cond_t): Likewise.
5633         (pthread_condattr_t): Likewise.
5634         (pthread_mutex_t): Likewise.
5635         (pthread_mutexattr_t): Likewise.
5636         (pthread_rwlock_t): Likewise.
5637         (pthread_rwlockattr_t): Likewise.
5638         * attr.c: Adjust for pthread.h and pthreadtypes.h change.
5639         * cancel.c: Likewise.
5640         * condvar.c: Likewise.
5641         * manager.c: Likewise.
5642         * mutex.c: Likewise.
5643         * pthread.c: Likewise.
5644         * ptlongjmp.c: Likewise.
5645         * rwlock.c: Likewise.
5646         * spinlock.c: Likewise.
5648 1998-10-09  Ulrich Drepper  <drepper@cygnus.com>
5650         * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
5651         also with PT_EI.
5653         * sysdeps/i386/i686/pt-machine.h: Remove unused inline
5654         definitions.
5656         * Makefile (libpthread-routines): Add pt-machine.
5657         * pt-machine.c: New file.
5658         * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
5659         yet defined.  Use PT_EI in extern inline definitions.
5660         * sysdeps/arm/pt-machine.h: Likewise.
5661         * sysdeps/i386/pt-machine.h: Likewise.
5662         * sysdeps/i386/i686/pt-machine.h: Likewise.
5663         * sysdeps/m68k/pt-machine.h: Likewise.
5664         * sysdeps/mips/pt-machine.h: Likewise.
5665         * sysdeps/powerpc/pt-machine.h: Likewise.
5666         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
5667         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
5669 1998-10-02  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5671         * semaphore.h: Include <sys/types.h> so that _pthread_descr
5672         is declared.
5674 1998-09-15  David S. Miller  <davem@pierdol.cobaltmicro.com>
5676         * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
5677         argument.
5678         * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
5680 1998-09-12 14:24 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
5682         * sysdeps/unix/sysv/linux/bits/sigthread.h: Add multiple inclusion
5683         guard.
5685 1998-09-02 11:08  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
5687         * signals.c (sigaction): Check that sig is less than NSIG to avoid
5688         array index overflow.
5690 1998-09-06 10:56  Ulrich Drepper  <drepper@cygnus.com>
5692         * sysdeps/pthread/semaphore.h: New file.
5694 1998-09-06 09:08  Ulrich Drepper  <drepper@cygnus.com>
5696         * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
5697         _LIBC_TSD_KEY_DL_ERROR.
5699 1998-08-31  Ulrich Drepper  <drepper@cygnus.com>
5701         * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
5702         * sysdeps/i386/pt-machine.h: Likewise.
5703         Suggested by Roland McGrath.
5705 1998-08-28 13:58  Ulrich Drepper  <drepper@cygnus.com>
5707         * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
5708         access thread data with non-constant offsets.
5709         * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
5710         necessary.
5712         * sysdeps/i386/useldt.h: Fix typo.  Add THREAD_GETMEM_NC and
5713         THREAD_SETMEM_NC definitions.
5715         * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
5716         THREAD_SETMEM_NC.
5717         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
5719 1998-08-26 15:46  Ulrich Drepper  <drepper@cygnus.com>
5721         * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
5722         not already defined.
5723         (struct _pthread_descr_struct): Add p_self and p_nr field.
5724         * manager.c (__pthread_handles): Define second element to point
5725         to manager thread.
5726         (__pthread_handles_num): Initialize to 2.
5727         (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
5728         (pthread_start_thread): Likewise.
5729         (pthread_handle_create): Start search for free slot at entry 2.
5730         Initialize new fields p_self and p_nr.
5731         Call __clone with CLONE_PTRACE if available.
5732         (pthread_free): Call FREE_THREAD_SELF if available.
5733         * pthread.c (__pthread_initial_thread): Initialize new fields.
5734         (__pthread_manager_thread): Likewise.
5735         (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
5737         * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
5738         elements of the thread descriptor.
5739         * condvar.c: Likewise.
5740         * errno.c: Likewise.
5741         * join.c: Likewise.
5742         * manager.c: Likewise.
5743         * pthread.c: Likewise.
5744         * ptlongjmp.c: Likewise.
5745         * semaphore.c: Likewise.
5746         * signals.c: Likewise.
5747         * specific.c: Likewise.
5748         * spinlock.c: Likewise.
5750         * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
5752         * sysdeps/i386/useldt.h: New file.
5753         * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
5755         * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
5756         THREAD_SETMEM using __thread_self.
5757         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
5759 1998-08-24  Geoff Keating  <geoffk@ozemail.com.au>
5761         * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
5762         turned out that we didn't need to queue after all.
5764 1998-08-22  Geoff Keating  <geoffk@ozemail.com.au>
5766         * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
5767         and wastes space; correct types.
5769 1998-08-08 11:18  H.J. Lu  <hjl@gnu.org>
5771         * signals.c (sigaction): Handle NULL argument.
5773 1998-08-04  Ulrich Drepper  <drepper@cygnus.com>
5775         * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
5776         of sigset_t.
5778 1998-08-02  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
5780         * Makefile (linuxthreads-version): Extract correct number from
5781         Banner.
5783 1998-07-29  Xavier Leroy  <Xavier.Leroy@inria.fr>
5785         * Banner: Bump version number to 0.8
5786         * FAQ.html: Many updates, in particular w.r.t. debugging.
5787         * manager.c: Support for non-default stacksize for
5788         LinuxThreads-allocated stacks;
5789         don't use guard pages for stacks with default size, rely on
5790         rlimit(RLIMIT_STACK) instead (it's cheaper).
5791         * attr.c: Likewise.
5792         * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
5793         everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
5794         * condvar.c: Likewise.
5795         * internals.h: Likewise.
5796         * restart.h: Likewise.
5797         * signals.c: Likewise.
5798         * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
5800 1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
5802         * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
5803         __pthread_mutexattr_[sg]ettype.  Add more weak aliases.
5804         * Versions: Put __pthread_mutexattr_settype under version
5805         GLIBC_2.0.  Don't export __pthread_mutexattr_setkind_np and
5806         __pthread_mutexattr_gettype.
5808 1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
5810         * sysdeps/pthread/bits/libc-lock.h: Make
5811         __pthread_mutexattr_settype weak.  Don't make
5812         __pthread_mutexattr_setkind_np weak.
5814 1998-07-16 10:52  Ulrich Drepper  <drepper@cygnus.com>
5816         * manager.c (pthread_handle_create): Check whether sched_setscheduler
5817         call can succeed here.
5819         * mutex.c: Define __pthread_mutexattr_settype and make
5820         __pthread_mutexattr_setkind_np an alias.
5821         Likewise for __pthread_mutexattr_gettype.
5823 1998-07-15 11:00 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
5825         * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
5826         is root.
5828 1998-07-14 19:38  Ulrich Drepper  <drepper@cygnus.com>
5830         * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
5832 1998-07-11  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5834         * Examples/ex6.c: Include <unistd.h> for usleep.
5836 1998-06-13 11:04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
5838         * Examples/ex4.c (main): Use exit, not pthread_exit.
5840 1998-07-09 13:39  Ulrich Drepper  <drepper@cygnus.com>
5842         * Versions: Add __pthread_mutexattr_gettype and
5843         __pthread_mutexattr_settype.
5844         * lockfile.c: Use __pthread_mutexattr_settype instead of
5845         __pthread_mutexattr_setkind_np.
5846         * mutex.c: Define __pthread_mutexattr_gettype and
5847         __pthread_mutexattr_settype.
5848         * weak.c: Likewise.
5849         * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
5850         __pthread_mutexattr_settype.
5851         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
5852         Use __pthread_mutexattr_settype.
5854 1998-07-08 22:26  Ulrich Drepper  <drepper@cygnus.com>
5856         * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
5857         * mutex.c: Define weak alias pthread_mutexattr_gettype and
5858         pthread_mutexattr_settype.
5859         * sysdeps/pthread/pthread.h: Declare these functions.
5860         Move pthread_sigmask and pthread_kill declaration in separate header.
5861         * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
5863 1998-07-07 15:20  Ulrich Drepper  <drepper@cygnus.com>
5865         * Makefile: Add rules to compile and run tests.
5866         * Examples/ex1.c: Little changes to fix warnings.
5867         * Examples/ex2.c: Likewise.
5868         * Examples/ex3.c: Likewise.
5869         * Examples/ex4.c: Likewise.
5870         * Examples/ex5.c: Likewise.
5871         * Examples/ex6.c: New file.
5873 1998-07-05 11:54  Ulrich Drepper  <drepper@cygnus.com>
5875         * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
5877 1998-07-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5879         * attr.c: Include <string.h>.
5881 1998-06-30 11:47  Ulrich Drepper  <drepper@cygnus.com>
5883         * attr.c: Include errno.h.  Use memcpy to copy sched_param.
5884         * internals.h: Include limits.h.
5885         * manager.c: Use memcpy to copy sched_param.
5886         * ptfork.c: Include errno.h.
5887         * pthread.c: Likewise.
5888         * semaphore.c: Likewise.
5889         * specific.c: Likewise.
5890         * spinlock.h: Likewise.
5891         * sysdeps/pthread/pthread.h: Include only allowed headers.  Move
5892         type definition to ...
5893         * sysdeps/pthread/bits/pthreadtypes.h: ...here.  New file.
5895 1998-06-29 12:34  Ulrich Drepper  <drepper@cygnus.com>
5897         * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
5899         * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
5900         as macros as demanded in POSIX.1, Annex C.
5902 1998-06-29 12:29  Ulrich Drepper  <drepper@cygnus.com>
5904         * internals.h (struct pthread_request): For free use pthread_t
5905         instead of pthread_descr.
5906         * join.c (pthread_join): Pass thread_id, not th to manager.
5907         (pthread_detach): Likewise.
5908         * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
5909         (pthread_exited): Remove detached queue code.
5910         (pthread_handle_free): Expect thread ID parameter and use it to
5911         validate the thread decsriptor.  Don't use detached queue.
5912         Patches by Xavier Leroy.
5914 1998-06-27  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
5916         * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
5917         _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
5918         __pthread_atfork, __pthread_key_create, __pthread_once.
5919         * internals.h: Doc fix.
5920         * pthread.c (__pthread_initialize): Define again.
5922 1998-06-26  Ulrich Drepper  <drepper@cygnus.com>
5924         * manager.c (pthread_exited): If thread is not detached put it on
5925         special list.
5926         (pthread_handle_free): If thread is not on list with living threads
5927         search on list with detached threads.
5929         * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
5930         for new definition of pthread_rwlock_t.
5932         * spinlock.c: Correct test whether to compile
5933         __pthread_compare_and_swap or not.
5935 1998-06-25 19:27  Ulrich Drepper  <drepper@cygnus.com>
5937         * attr.c: Finish user stack support.  Change locking code to be safe
5938         in situations with different priorities.
5939         * cancel.c: Likewise.
5940         * condvar.c: Likewise.
5941         * internals.h: Likewise.
5942         * join.c: Likewise.
5943         * manager.c: Likewise.
5944         * mutex.c: Likewise.
5945         * pthread.c: Likewise.
5946         * ptlongjmp.c: Likewise.
5947         * queue.h: Likewise.
5948         * rwlock.c: Likewise.
5949         * semaphore.c: Likewise.
5950         * semaphore.h: Likewise.
5951         * signals.c: Likewise.
5952         * spinlock.c: Likewise.
5953         * spinlock.h: Likewise.
5954         * sysdeps/pthread/pthread.h: Likewise.
5955         Patches by Xavier Leroy.
5957         * sysdeps/i386/i686/pt-machine.h: New file.
5959 1998-06-25  Ulrich Drepper  <drepper@cygnus.com>
5961         * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
5962         [sg]et_stackaddr prototypes always available.
5964         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5965         _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
5967 1998-06-24  Ulrich Drepper  <drepper@cygnus.com>
5969         * manager.c (pthread_free): Undo patch from 980430.
5970         Reported by David Wragg <dpw@doc.ic.ac.uk>.
5972 1998-06-09 15:07  Ulrich Drepper  <drepper@cygnus.com>
5974         * manager.c: Define __pthread_manager_adjust_prio and use it to
5975         increase priority when needed.
5976         * internals.h: Add prototype for __pthread_manager_adjust_prio.
5977         * mutex.c: Optimize mutexes to wake up only one thread.
5978         * pthread.c: Move PID of manager for global variable in structure
5979         element.
5980         Patches by Xavier Leroy.
5982 1998-06-07 13:47  Ulrich Drepper  <drepper@cygnus.com>
5984         * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
5986 1998-06-03  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5988         * attr.c: Correct typo.
5990 1998-05-01  Ulrich Drepper  <drepper@cygnus.com>
5992         * manager.c (pthread_free): Unmap guard before the stack.
5993         Patch by Matthias Urlichs.
5995 1998-04-30  Ulrich Drepper  <drepper@cygnus.com>
5997         * manager.c (pthread_free): Detect already free child.
5998         Patch by Xavier Leroy, reported by Matthias Urlichs.
6000 1998-04-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6002         * Makefile (linuxthreads-version): Renamed back from
6003         libpthread-version.
6005 1998-04-21  Ulrich Drepper  <drepper@cygnus.com>
6007         * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
6008         __libc_longjmp.
6010 1998-04-20 14:55  Ulrich Drepper  <drepper@cygnus.com>
6012         * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
6013         * internals.h: Add definitions for new spinlock implementation.
6014         * ptlongjmp.c: New file.
6015         * spinlock.c: New file.
6016         * spinlock.h (acquire): Don't reschedule using __sched_yield, use
6017         new function __pthread_acquire to prevent deadlocks with thread
6018         with different priorities.
6019         Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
6021 1998-03-16  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6023         * manager.c (__pthread_manager): Reduce first argument to select
6024         to include just the needed file descriptor.
6026 1998-03-17 00:06  Ulrich Drepper  <drepper@cygnus.com>
6028         * manager.c: Fix last patch which caused core dumps.
6030         * pthread.c: Correctly handle missing SIGRTMIN.
6032 1998-03-15  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6034         * libpthread.map: Add __libc_internal_tsd_get and
6035         __libc_internal_tsd_set.  Add missing cancelable functions. Export
6036         libc internal versions of the cancelable functions.
6038 1998-03-13 16:51  Ulrich Drepper  <drepper@cygnus.com>
6040         * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
6042 1998-03-13 00:46  Ulrich Drepper  <drepper@cygnus.com>
6044         * attr.c: Implement pthread_attr_[gs]etguardsize,
6045         pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
6046         Change pthread_attr_init to have two interfaces.
6047         * internals.h (struct _pthread_descr_struct): Add new fields for
6048         above functions.
6049         * libpthread.map: Add names in GLIBC_2.1 section.
6050         * manager.c (pthread_handle_create): Implement guardsize and
6051         user stack.
6052         (pthread_free): Likewise.
6053         * pthread.c (pthread_create): Add new interface for changed
6054         pthread_attr_t.
6055         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
6056         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
6057         PTHREAD_STACK_MIN.
6059 1998-03-11 00:42  Wolfram Gloger  <wmglo@dent.med.uni-muenchen.de>
6061         * manager.c: Enable resetting of the thread scheduling policy
6062         to SCHED_OTHER when the parent thread has a different one.
6064 1998-02-01 13:51  Ulrich Drepper  <drepper@cygnus.com>
6066         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6067         _POSIX_ASYNCHRONOUS_IO.
6069         * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
6070         mutexes.
6071         * mutex.c: Implement new mutex types.
6073         * internals.h: Include <signal.h>.
6075         * libpthread.map: Add __erno_location and __h_errno_location.
6077         * errno.c: Return pointer to variable actually in use.  This might
6078         not be the one in the thread structure.
6079         * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
6080         and p_h_errnop.
6081         * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
6082         of manager thread structure.
6083         (pthread_handle_create): Set p_errnop and p_h_errnop members for new
6084         thread.
6085         * pthread.c: Adapt initializer for thread structures.
6086         (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
6087         (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
6088         current thread to global variables.
6090 1998-01-31 17:27  Ulrich Drepper  <drepper@cygnus.com>
6092         * rwlock.c: New file.
6093         * Makefile (libpthread-routines): Add rwlock.
6094         * sysdeps/pthread/pthread.h: Define data structures and declare
6095         functions.
6096         * libpthread.map: Add new functions.
6098 1997-12-18 13:50  Philip Blundell  <pb@nexus.co.uk>
6100         * sysdeps/arm/pt-machine.h: New file; add ARM support.
6101         * sysdeps/arm/Implies: likewise.
6102         * README: Document it.
6104 1997-12-13  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6106         * signals.c: Remove unneeded initializer for sigwaited, saving a
6107         warning.
6109 1997-04-11 01:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6111         * semaphore.c (sem_init): Set sem_spinlock only if available.
6113 1997-12-04 01:48  Ulrich Drepper  <drepper@cygnus.com>
6115         * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
6116         * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
6118         * Makefile: Update from LinuxThreads 0.7.
6119         * internals.h. Likewise.
6120         * manager.c: Likewise.
6121         * mutex.c: Likewise.
6122         * pthread.c: Likewise.
6123         * signals.c: Likewise.
6124         * specific.c: Likewise.
6125         * Examples/ex3.c: Likewise.
6127 1997-11-20 18:13  Ulrich Drepper  <drepper@cygnus.com>
6129         * pthread.c (__pthread_reset_main_thread): Close pipe only if still
6130         open.
6132 1997-10-29 05:38  Ulrich Drepper  <drepper@cygnus.com>
6134         * wrapsyscall.c: Add socket functions which are also cancelation
6135         points.
6137 1997-10-19 21:40  Wolfram Gloger  <wg@wolfram.dent.med.uni-muenchen.de>
6139         * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
6140         New functions for fast thread specific data within libc.
6142         * internals.h: Add new array p_libc_specific to struct
6143         _pthread_descr_struct.
6145         * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
6147 1997-10-13 05:39  Ulrich Drepper  <drepper@cygnus.com>
6149         * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
6150         Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
6152 1997-08-29 03:05  Ulrich Drepper  <drepper@cygnus.com>
6154         * internals.h (struct _pthread_descr_struct): Add definitions for
6155         two-level specific key handling.
6156         * manager.c (pthread_handle_create): Initialize specific memory array.
6157         * specific.c: Implement two-level key handling.
6158         * weaks.c: Don't provide dummy key handling.
6159         * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
6160         Add definition of __libc_key_t.
6161         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
6162         as 1024.
6163         Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
6164         PTHREAD_DESTRUCTOR_ITERATIONS.
6166         * manager.c (pthread_handle_create): Compare mmap result with
6167         MAP_FAILED.
6169         * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
6170         * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
6172 1997-08-22 19:04  Richard Henderson  <rth@cygnus.com>
6174         sysdeps/sparc -> sysdeps/sparc/sparc32
6175         sysdeps/sparc64 -> sysdeps/sparc/sparc64
6177         * internals.h: Change definition of THREAD_SELF to be an expression,
6178         not a statement that did a return.
6179         * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
6180         * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
6181         Follow Solaris and use a "system reserved" register (%g6) to hold
6182         the thread descriptor.
6183         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
6185 1997-08-03 00:09  Ulrich Drepper  <drepper@cygnus.com>
6187         * mutex.c: Correct pthread_once.  Patch by Xavier Leroy.
6188         * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
6189         * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
6191         * semaphore.c: Include spinlock.h only when needed.
6193         * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
6194         keys for entries not in use.
6196         * weaks.c: Implement key handling functions for real.
6198 1997-06-29  01:04  Richard Henderson  <richard@gnu.ai.mit.edu>
6200         Initial sparc64-linux support:
6201         * sysdeps/sparc64/Implies: New file.
6202         * sysdeps/sparc64/pt-machine.h: Likewise.
6204 1997-06-29 00:48  Ulrich Drepper  <drepper@cygnus.com>
6206         * semaphore.c: Include spinlock.h at correct place.
6207         Patch by HJ Lu.
6209 1997-06-13 10:06  Richard Henderson  <rth@tamu.edu>
6211         The Great Bit File Move:
6212         * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
6213         * sysdeps/powerpc/semaphorebits.h: Likewise.
6214         * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
6215         * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
6216         * sysdeps/pthread/libc-lock.h: -> bits/
6217         * sysdeps/pthread/stdio-lock.h: Likewise.
6218         * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
6219         * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
6220         * semaphore.h: Likewise.
6221         * sysdeps/pthread/pthread.h: Likewise.
6223         * lockfile.c: <foo.h> -> <bits/foo.h>.
6224         * semaphore.h: Likewise.
6226         * Makefile: (headers): foo.h -> bits/foo.h.
6227         * sysdeps/pthread/Makefile: Likewise.
6229 1997-04-11 01:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6231         * semaphore.c (sem_init): Set sem_spinlock only if available.
6233         * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
6234         asm constraints.
6236 1997-04-09 03:00  Ulrich Drepper  <drepper@cygnus.com>
6238         Update from LinuxThreads 0.6.
6240         * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
6241         and __sched_get_priority_min instead of names without `__'.
6243         * manager.c: Rewrite large parts to implement opaque pthread_t.
6245         * cancel.c: Adapt for opaque pthread_t type.
6246         * condvar.c: Likewise.
6247         * errno.c: Likewise.
6248         * join.c: Likewise.
6249         * mutex.c: Likewise.
6250         * pthread.c: Likewise.
6251         * signals.c: Likewise.
6252         * specific.c: Likewise.
6253         * restart.h: Likewise.
6254         * queue.h: Likewise.
6255         * Examples/ex3.c: Likewise.
6256         * Examples/ex4.c: Likewise.
6257         * sysdeps/pthread/pthread.h: Likewise.
6259         * pthread.c: Accumulate time for all threads in thread manager.
6261         * semaphore.c: Implement fallback implementation for architectures
6262         sometimes missing compare-exchange operations.
6264         * cancel.c (pthread_cancel): Validate handle argument.
6265         * join.c (pthread_join): Likewise.
6266         (pthread_detach): Likewise.
6267         * signals.c (pthread_kill): Likewise.
6269         * spinlock.h (acquire): Use __sched_yield not sched_yield.
6271         * queue.h (enqueue): Enqueue thread according to priority.
6273         * internals.c (struct pthread_start_args): New struct for passing
6274         args to cloning function.
6275         (struct _pthread): Rename to _pthread_descr_struct and adapt for
6276         opaque pthread_t.
6278         * Examples/Makefile (clean): Pass -f option to rm.
6280         * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
6281         and define TEST_FOR_COMPARE_AND_SWAP.
6282         * sysdeps/i386/i486/pt-machine.h: Removed.
6284         * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
6285         to 1024.
6287 1997-04-04 16:38  Ulrich Drepper  <drepper@cygnus.com>
6289         * restart.h (suspend): Clear p_signal before suspending.
6290         (suspend_with_cancellation): Likewise.
6291         Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
6293         * weaks.c: Make __pthread_key_create return 1.
6294         * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
6295         __libc_getspecific, __libc_setspecific, and __libc_key_t.
6296         * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
6297         using libio.
6299 1997-03-19 15:13  Miguel de Icaza  <miguel@nuclecu.unam.mx>
6301         * sysdeps/sparc/pt-machine (RELEASE): Fix.
6303 1997-03-01 07:55  Geoff Keating  <geoffk@ozemail.com.au>
6305         * sysdeps/powerpc/Implies: Added.
6306         * sysdeps/powerpc/pt-machine.h: Added.
6307         * sysdeps/powerpc/semaphorebits.h: Added.
6309 1997-01-22 01:22  Ulrich Drepper  <drepper@cygnus.com>
6311         * pthread.c (__pthread_initial_thread): Correct
6312         initializer.
6313         (__pthread_manager_thread): Likewise.
6314         Reported by Andreas Jaeger.
6316 1997-01-18 22:15  Richard Henderson  <rth@tamu.edu>
6318         Since sigset_t no longer fits in a register, we can't pass in the
6319         thread's initial mask so easily.  Take this opportunity to simplify
6320         the clone implementation by only accepting a single void* argument.
6322         * manager.c (__pthread_manager): Put thread vitals in the thread
6323         struct instead of as arguments through clone.
6324         (pthread_start_thread): Look for them there.
6325         * internals.h (struct _pthread): Add p_initial_fn,
6326         p_initial_fn_arg, p_initial_mask.  Fix __pthread_manager proto.
6327         * pthread.c (pthread_initialize_manager): Revise clone invocation.