[BZ #377]
[glibc.git] / linuxthreads / ChangeLog
blob4d6ee30e731e20ae6806f2307a7954a19217c706
1 2004-09-04  Jakub Jelinek  <jakub@redhat.com>
3         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
5 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
7         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
8         the initialization function might throw.
10 2004-08-30  Roland McGrath  <roland@frob.com>
12         * Makefile (libpthread-abi-frozen): New variable.
14 2004-08-26  Roland McGrath  <roland@redhat.com>
16         * configure.in: New file.  If nptl add-on is also selected, barf if
17         explicit and elide ourselves if implicit.
18         * configure: Now generated.
20 2004-08-25  Richard Sandiford  <rsandifo@redhat.com>
22         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h (CENABLE, CDISABLE,
23         __local_multiple_threads): Fix definitions for IS_IN_librt.
24         * sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h: Likewise.
26 2004-08-22  Andreas Schwab  <schwab@suse.de>
28         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO) [IS_IN_librt]:
29         Save gp around CENABLE/CDISABLE calls.
31 2004-08-15  Roland McGrath  <roland@frob.com>
33         * pthread_atfork.c: Update copyright terms including special exception
34         for these trivial files, which are statically linked into executables
35         that use dynamic linking for the significant library code.
37 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
39         * libc-tsd.c: Move resolv.h include before the #if.
40         (__res_maybe_init): New function.  Add libc_hidden_def.
42 2004-08-02  Ulrich Drepper  <drepper@redhat.com>
44         * linuxthreads.texi (Cleanup Handlers): Fix typo.
45         Reported by Bjoern Engelmann <bjengelmann@gmx.de>.
47 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
49         [BZ #284]
50         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
51         instead of clockid_t.
53 2004-07-21  Roland McGrath  <roland@redhat.com>
55         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
57 2004-07-02  Roland McGrath  <roland@redhat.com>
59         * configure: Don't exit.
61 2004-07-20  Alexandre Oliva  <aoliva@redhat.com>
63         * sysdeps/mips/pt-machine.h: Use standard names for ABI macros,
64         include sgidefs.h.
65         * sysdeps/mips/atomicity.h: Likewise.
67 2004-07-19  Alexandre Oliva  <aoliva@redhat.com>
69         * sysdeps/unix/sysv/linux/mips/Makefile (CFLAGS-pt-initfini.s):
70         Remove redundant override that missed -g0.
72 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
74         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
75         (__local_multiple_threads): Define for librt.
76         (SINGLE_THREAD_P): Likewise.
78 2004-07-07  Jakub Jelinek  <jakub@redhat.com>
80         * sysdeps/pthread/getcpuclockid.c (pthread_getcpuclockid): Allow
81         using other thread's clock.
82         * ptclock_gettime.c (__pthread_clock_gettime): Likewise.
83         * ptclock_settime.c (__pthread_clock_settime): Likewise.
84         * internals.h (__pthread_clock_gettime, __pthread_clock_settime):
85         Remove prototypes.
86         Reported by Bernd Schmidt <bernds@redhat.com>.
87         * Makefile (librt-tests): Add tst-clock1.
88         * tst-clock1.c: New test.
90         * sysdeps/x86_64/Versions: New file.
91         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
92         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
94 2004-04-16  Andreas Schwab  <schwab@suse.de>
96         * sysdeps/ia64/tls.h (INIT_SYSINFO): Cast dl_sysinfo to void*.
98 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
100         * sysdeps/s390/pspinlock.c (__pthread_spin_lock,
101         __pthread_spin_trylock): Use constraint "m" instead of "0" for
102         futex.
103         * sysdeps/ia64/pt-machine.h (__compare_and_swap,
104         __compare_and_swap_with_release_semantic, testandset): Use
105         constraint "m" instead of "0" for futex.
107 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
109         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Fix
110         branch offset for a PLT entry.
111         (CDISABLE): Likewise.
113 2004-05-31  Andreas Jaeger  <aj@suse.de>
115         * sysdeps/unix/sysv/linux/mips/Makefile (CFLAGS-pt-initfini.s):
116         Set to -fno-unit-at-a-time.
117         Patch by Dan Kegel <dank@kegel.com>.
119 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
121         * tst-stack1.c: Don't include mcheck.h.
122         (do_test): Make sure user defined stacks aren't reused,
123         don't free them at the end.  [BZ #110]
125 2004-05-02  Jakub Jelinek  <jakub@redhat.com>
127         * manager.c: Include not-cancel.h.
128         (__pthread_manager): Use read_not_cancel instead of __libc_read.
129         (pthread_start_thread, __pthread_manager_sighandler): Use
130         write_not_cancel instead of __libc_write.
131         (pthread_reap_children): Use waitpid_not_cancel instead of
132         __libc_waitpid.
133         * pthread.c: Include not-cancel.h.
134         (__pthread_initialize_minimal, __pthread_create_2_1,
135         pthread_onexit_process, __pthread_message): Use
136         write_not_cancel instead of __libc_write.
137         (__pthread_initialize_manager): Likewise.  Use close_not_cancel
138         instead of __libc_close.
139         (__pthread_reset_main_thread): Use close_not_cancel instead of
140         __libc_close.
141         * join.c: Include not-cancel.h.
142         (__pthread_do_exit, pthread_join, pthread_detach): Use
143         write_not_cancel instead of __libc_write.
144         * semaphore.c: Include not-cancel.h.
145         (__new_sem_post): Use write_not_cancel instead of __libc_write.
146         * specific.c: Include not-cancel.h.
147         (pthread_key_delete): Use write_not_cancel instead of __libc_write.
149 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
151         * Versions (libc): Add __on_exit and __libc_sigaction.
153 2004-04-28  Jakub Jelinek  <jakub@redhat.com>
155         * semaphore.c (sem_timedwait): Return -1 and set errno instead of
156         returning error number [BZ #133].  Patch by <rmhaddad@yahoo.com>.
158 2004-04-22  SUGIOKA Toshinobu  <sugioka@itonet.co.jp>
160         * sysdeps/unix/sysv/linux/sh/vfork.S: Fix wrong function pointer
161         reference in PIC case.
163 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
165         * oldsemaphore.c (SEM_VALUE_MAX): Remove.
167 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
169         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Define
170         for librt.  Save the return value to a safe register.
171         (CDISABLE): Define for librt.  Set the function argument correctly.
173 2004-04-18  Jakub Jelinek  <jakub@redhat.com>
175         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
176         (PSEUDO_CANCEL): Define.
177         (PSEUDO): Use it.
178         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
179         CDISABLE): For librt, append @PLT.
181 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
183         * sysdeps/x86_64/tls.h [!__ASSEMBLER__]: Include tcb-offsets.h.
185         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
186         return it_value { 0, 0 }.
187         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
188         like SIGEV_SIGNAL.
189         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
190         assertion for SIGEV_NONE.
191         (thread_attr_compare): Compare all attributes, not just a partial
192         subset.
194         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
196 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
198         * semaphore.h (SEM_VALUE_MAX): Just use a plain number.
200 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
202         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix last patch.
204 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
206         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
208 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
210         * sysdeps/unix/sysv/linux/mq_notify.c: New file.
212         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE): Define
213         for librt.
214         (CDISABLE): Likewise.
216 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
218         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
219         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
220         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
221         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
222         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
223         Define.
224         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
225         (_POSIX_MESSAGE_PASSING): Define.
227 2004-04-10  Andreas Jaeger  <aj@suse.de>
229         * sysdeps/x86_64/pt-machine.h: Add used attribute to stack_pointer
230         to avoid warnings with GCC 3.5.
232 2004-04-09  Steven Munroe  <sjmunroe@us.ibm.com>
234         * sysdeps/powerpc/tls.h (TLS_INIT_TP): Eliminate lvalue cast from
235         __thread_self assignment.
236         (THREAD_DTV): Replace __thread_register with __thread_self.
237         (INIT_THREAD_SELF): Eliminate lvalue cast from __thread_self
238         assignment.
240 2004-04-08  Alexandre Oliva  <aoliva@redhat.com>
242         * signals.c (pthread_sigmask): Don't ever block or mask
243         __pthread_sig_debug.
245 2004-03-11  Steven Munroe  <sjmunroe@us.ibm.com>
247         * sysdeps/powerpc/tls.h: Remove __powerpc64__ conditional.
249 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
251         * sysdeps/ia64/pt-machine.h (BUSY_WAIT_NOP): Define.
252         * sysdeps/x86_64/pt-machine.h (BUSY_WAIT_NOP): Likewise.
254 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
256         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add HOST_NAME_MAX.
257         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
258         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
259         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
261 2004-03-08  Andreas Jaeger  <aj@suse.de>
263         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT_KERNEL_CHECK):
264         dl_osversion is readonly.
266 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
268         * sysdeps/i386/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
269         _rtlf_global_ro.
270         * sysdeps/ia64/tls.h (INIT_SYSINFO): Likewise.
272 2004-02-20  Steven Munroe  <sjmunroe@us.ibm.com>
274         * sysdeps/unix/sysv/linux/powerpc/ptlongjmp.c [SHARED]: Code only
275         valid for SHARED case.  Correct spelling of __vmx_longjmp.
277         * sysdeps/powerpc/pspinlock.c: Move from here.
278         * sysdeps/powerpc/powerpc32/pspinlock.c: To here.
279         * sysdeps/powerpc/powerpc64/pspinlock.c: New file.
280         * sysdeps/powerpc/powerpc64/pt-machine.h: Define __compare_and_swap32
281         and __compare_and_swap32_with_release_semantics.
283 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
285         * Makefile (generated): Remove tst-stack1.mtrace and tst-stack1-mem.
286         (tests): Remove $(objpfx)tst-stack1-mem.
287         (tst-stack1-ENV): Remove.
288         ($(objpfx)tst-stack1-mem): Remove.
290         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
291         (__syscall_error_handler2): Call CDISABLE.
292         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
293         (__syscall_error_handler2): Call CDISABLE.
295         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
297 2004-02-10  Steven Munroe  <sjmunroe@us.ibm.com>
299         * Makefile (libpthread-routines): Add ptcleanup.
300         * ptlongjmp.c: Removed.
301         * ptcleanup.c: Copied __pthread_cleanup_upto to here. New file.
302         * sysdeps/pthread/ptlongjmp.c: Copied longjmp to here. New file.
303         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
304         Version longjmp, siglongjmp for GLIBC_2.3.4.
305         * sysdeps/unix/sysv/linux/powerpc/ptlongjmp.c: New File.
307 2004-01-22  Andreas Jaeger  <aj@suse.de>
309         * spinlock.c (__pthread_lock): Fix contraint to avoid warning.
310         (__pthread_release): Likewise.
312 2004-01-16  Richard Henderson  <rth@redhat.com>
314         * attr.c: Include ldsodefs.h.
315         (pthread_getattr_np): Don't declare __libc_stack_end.
317 2004-01-09  Steven Munroe  <sjmunroe@us.ibm.com>
319         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
320         [!HAVE_TLS_SUPPORT]: Define SINGLE_THREAD_P using static
321         __lib*_multiple_threads.
322         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
323         [!HAVE_TLS_SUPPORT]: Likewise.
325 2004-01-13  Roland McGrath  <roland@redhat.com>
327         * sysdeps/powerpc/tcb-offsets.sym: Put -- separator line before any
328         conditionals.
330 2004-01-10  Andreas Jaeger  <aj@suse.de>
332         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Add cfi directives.
334 2004-01-01  Andreas Jaeger  <aj@suse.de>
336         * Makefile (generated): Add missing files.
338 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
340         * attr.c (pthread_getattr_np): Make sure stack info returned for
341         main thread does not overlap with any other VMA.
342         Patch by Jakub Jelinek.
344 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
346         * sysdeps/ia64/tls.h: Include dl-sysdep.h.
347         (INIT_SYSINFO): Define.
348         (TLS_INIT_TP): Use it.
350 2003-12-28  Carlos O'Donell  <carlos@baldric.uwo.ca>
352         * attr.c (pthread_getattr_np): Add _STACK_GROWS_UP case.
354 2003-12-26  Jakub Jelinek  <jakub@redhat.com>
356         * sysdeps/pthread/pthread.h (pthread_setcancelstate,
357         pthread_setcanceltype, pthread_cancel, pthread_testcancel): Remove
358         __THROW.
359         * semaphore.h (sem_wait, sem_timedwait): Likewise.
361 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
363         * manager.c (pthread_free): Call _dl_deallocate_tls even for
364         p_userstack threads.
365         * pthread.c (__pthread_initialize_manager): Call _dl_deallocate_tls
366         on error.
367         (pthread_onexit_process): Update comment.
368         * Makefile (tests): Add tst-stack1.  Depend on $(objpfx)tst-stack1-mem.
369         (generated): Add tst-stack1.mtrace and tst-stack1-mem.
370         (tst-stack1-ENV): Set.
371         ($(objpfx)tst-stack1-mem): New.
372         * tst-stack1.c: New test.
374 2003-12-16  Steven Munroe  <sjmunroe@us.ibm.com>
376         * sysdeps/powerpc/tcb-offsets.sym [!__powerpc64__]: Remove
377         conditional so MULTIPLE_THREADS_OFFSET is generated for both.
378         * sysdeps/powerpc/tls.h [!__powerpc64__]: Remove conditional
379         so TLS_MULTIPLE_THREADS_IN_TCB is generated for both.
380         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h:
381         Include tls.h.
383 2003-12-04  Steven Munroe  <sjmunroe@us.ibm.com>
385         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
386         (SINGLE_THREAD_P): Test using thread local p_multiple_threads field.
388 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
390         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Update copyright
391         message.  Add include of <stddef.h>.
392         (INIT_NEW_WAY): New macro.
393         (INIT_OLD_WAY): Likewise.
394         (_init): Add unwind directives.  Invoke
395         __pthread_initialize_minimal() via INIT_NEW_WAY or INIT_OLD_WAY,
396         respectively.
397         (_init_EPILOG_BEGINS): Add unwind-directives.  Drop unused .regstk
398         directive.
399         (_fini): Add unwind directives.  Drop unnecessary .align 16
400         directive (bundles are always 16-byte aligned).
401         (_fini_EPILOG_BEGINS): Add unwind-directives.
403 2003-11-19  David Mosberger  <davidm@hpl.hp.com>
405         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
407 2003-12-10  Andreas Jaeger  <aj@suse.de>
408             Ruediger Oertel  <ro@suse.de>
410         * sysdeps/alpha/elf/pt-initfini.c (__asm__): Remove extra .prologue.
412 2003-11-30  Andreas Jaeger  <aj@suse.de>
414         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
415         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
416         Likewise.
418 2003-11-04  Jakub Jelinek  <jakub@redhat.com>
420         * signals.c (__pthread_sigaction): Set __sighandler[sig].old before
421         __libc_sigaction if it has been one of the special values before.
423 2003-10-06  Carlos O'Donell <carlos@baldric.uwo.ca>
425         * pthread.c (__pthread_self_stack): _STACK_GROWS_UP case added.
426         (__pthread_find_self): Likewise.
427         * manager.c (thread_segment): _STACK_GROWS_UP case added.
429 2003-10-10  Carlos O'Donell  <carlos@baldric.uwo.ca>
431         * linuxthreads/sysdeps/unix/sysv/linux/hppa/malloc-machine.h: New file.
433 2003-10-10  Carlos O'Donell  <carlos@baldric.uwo.ca>
435         * sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h: New file.
437 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
439         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
440         changes.
441         (SAVE_OLDTYPE_0): Fix a typo.
443 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
445         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
446         correct offset.
448 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
450         * Makefile (tests): Add tst-cancel8.
451         * tst-cancel8.c: New test.
453 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
455         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
456         restoring of the old cancellation type.
458 2003-09-10  Chris Demetriou  <cgd@broadcom.com>
460         * sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h: New file.
462 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
464         * sysdeps/pthread/malloc-machine.h [!__libc_maybe_call2] (mutex_init,
465         mutex_lock, mutex_trylock, mutex_unlock): Remove.
467 2003-09-27  Wolfram Gloger  <wg@malloc.de>
469         * sysdeps/pthread/malloc-machine.h: New file.
471 2003-09-18  H.J. Lu  <hongjiu.lu@intel.com>
473         * attr.c (__pthread_attr_init_2_1): Double __guardsize size
474         if NEED_SEPARATE_REGISTER_STACK is defined.
476 2003-09-22  Philip Blundell  <philb@gnu.org>
478         * forward.c: Add _pthread_cleanup_push, _pthread_cleanup_pop.
479         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
480         Likewise.
481         * pthread.c (__pthread_elements): Initialise these new elements.
482         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Use
483         __libc_maybe_call.
484         (__libc_cleanup_pop): Likewise.
486 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
488         * attr.c: Include stdlib.h.
490 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
492         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
494         * tst-attr1.c: New test.
495         * Makefile (tests): Add tst-attr1.
497 2003-09-17  Philip Blundell  <philb@gnu.org>
499         * sysdeps/unix/sysv/linux/arm/vfork.S: Branch to fork if
500         libpthread is loaded.  Elide backwards compatibility code when not
501         required.
503 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
505         * descr.h (manager_thread): Rename to...
506         (__pthread_manager_threadp): ... this.
507         * pthread.c (manager_thread): Define to __pthread_manager_threadp.
508         (__pthread_manager_threadp): New variable.
509         * internals.h (__manager_thread): Define to
510         __pthread_manager_threadp if USE_TLS.
512 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
514         * sysdeps/i386/Makefile (CFLAGS-cancel.c, CFLAGS-manager.c,
515         CFLAGS-pthread.c, CFLAGS-sighandler.c): Add
516         -mpreferred-stack-boundary=4.
518 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
520         * attr.c (pthread_getattr_np): Correctly fill in the stack-related
521         values for the initial thread.
523 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
525         * pthread.c (manager_thread): Remove static, add attribute_hidden.
526         (thread_self_stack): Rename to...
527         (__pthread_self_stack): ... this.  Remove static.
528         (pthread_handle_sigcancel): Use check_thread_self ().
529         (pthread_handle_sigrestart): Likewise.
530         * sighandler.c (__pthread_sighandler, __pthread_sighandler_rt):
531         Likewise.
532         * descr.h (manager_thread): Declare.
533         * internals.h (__pthread_self_stack): New prototype.
534         (__manager_thread): Define.
535         (check_thread_self): New function.
537 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
539         * Makefile (CFLAGS-mutex.c): Add $(uses-callbacks).
540         (CFLAGS-sighandler.c): Change $(exceptions) into $(uses-callbacks).
542 2003-09-12  Jakub Jelinek  <jakub@redhat.com>
544         * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: New.
545         (__SSIZE_T_TYPE): Define to __SWORD_TYPE for gcc 2.95.x and
546         __SLONGWORD_TYPE otherwise.
548 2003-09-11  Steven Munroe  <sjmunroe@us.ibm.com>
550         * sysdeps/powerpc/powerpc64/pt-machine.h [MEMORY_BARRIER]: Use lwsync.
551         [READ_MEMORY_BARRIER]: Define.
552         [WRITE_MEMORY_BARRIER]: Define.
554 2003-09-10  Jakub Jelinek  <jakub@redhat.com>
556         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Move
557         ptr___pthread_cond_timedwait to the end of the structure to avoid
558         breaking Wine unnecessarily.
560 2003-09-08  Jakub Jelinek  <jakub@redhat.com>
562         * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: Remove.
564 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
566         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
567         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
568         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
569         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
570         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
571         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
572         * attr.c (__old_pthread_attr_setstacksize,
573         __old_pthread_attr_setstack): New functions.
574         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
575         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
576         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
577         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
578         * tststack.c: Include limits.h and sys/param.h.
579         (main): Set size to MAX (70 * 1024, PTHREAD_STACK_MIN).
581         * barrier.c (__pthread_barrierattr_getpshared): Always
582         return PTHREAD_PROCESS_PRIVATE.
583         (pthread_barrierattr_setpshared): Return EINVAL if pshared
584         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
586 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
588         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
589         (DL_SYSINFO_IMPLEMENTATION): Add CFI and make sure the code ends
590         up in .text.
592         * barrier.c (pthread_barrierattr_setpshared): We don't handle
593         inter-process barriers.
595 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
597         * Makefile (tests): Add tst-tls1.
598         (module-names): Add tst-tls1mod{,a,b,c,d,e,f}.
599         ($(objpfx)tst-tls1mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
600         ($(objpfx)tst-tls1): New.
601         ($(objpfx)tst-tls2.out): Likewise.
602         (tests): Depend on $(objpfx)tst-tls2.out.
603         * tst-tls1.c: New test.
604         * tst-tls1.h: New.
605         * tst-tls1mod.c: New.
606         * tst-tls1moda.c: New.
607         * tst-tls1modb.c: New.
608         * tst-tls1modc.c: New.
609         * tst-tls1modd.c: New.
610         * tst-tls1mode.c: New.
611         * tst-tls1modf.c: New.
612         * tst-tls2.sh: New test.
614         * internals.h (__pthread_cond_timedwait): New prototype.
615         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
616         ptr___pthread_cond_timedwait.
617         * pthread.c (__pthread_functions): Initialize them.
618         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
619         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
620         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
621         pthread_cond_timedwait@@GLIBC_2.3.2.
623 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
625         * sysdeps/pthread/pthread.h: Don't mark pthread_exit,
626         pthread_join, pthread_cond_wait, and pthread_cond_timedwait with
627         __THROW to match NPTL.
629 2003-08-13  Ulrich Drepper  <drepper@redhat.com>
631         * sysdeps/pthread/Makefile [subdir=rt] (CPPFLAGS): Add
632         -DBROKEN_THREAD_SIGNALS.
634 2003-08-11  Steven Munroe  <sjmunroe@us.ibm.com>
636         * manager.c (pthread_start_thread) [!(USE_TLS && HAVE___THREAD)]:
637         Correct spelling of per thread resolver state.
639 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
641         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
642         (__rtld_lock_default_lock_recursive,
643         __rtld_lock_default_unlock_recursive): Define.
644         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
645         __rtld_lock_unlock_recursive): Define using
646         GL(_dl_rtld_*lock_recursive).
647         * pthread.c (pthread_initialize): Initialize _dl_rtld_lock_recursive
648         and _dl_rtld_unlock_recursive.  Lock GL(_dl_load_lock) the same
649         number of times as GL(_dl_load_lock) using non-mt implementation was
650         nested.
652 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
654         * sysdeps/pthread/bits/typesizes.h (__SSIZE_T_TYPE): Define.
655         * sysdeps/unix/sysv/linux/alpha/bits/typesizes.h (__SSIZE_T_TYPE):
656         Likewise.
657         * sysdeps/unix/sysv/linux/sparc/bits/typesizes.h (__SSIZE_T_TYPE):
658         Likewise.
659         * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: New file.
661         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
662         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
663         PTHREAD_STACK_MIN in comments.
665         * sysdeps/alpha/pt-machine.h (PT_EI): Add
666         __attribute__((always_inline)).
667         * sysdeps/arm/pt-machine.h (PT_EI): Likewise.
668         * sysdeps/cris/pt-machine.h (PT_EI): Likewise.
669         * sysdeps/hppa/pt-machine.h (PT_EI): Likewise.
670         * sysdeps/i386/i686/pt-machine.h (PT_EI): Likewise.
671         * sysdeps/i386/pt-machine.h (PT_EI): Likewise.
672         * sysdeps/ia64/pt-machine.h (PT_EI): Likewise.
673         * sysdeps/m68k/pt-machine.h (PT_EI): Likewise.
674         * sysdeps/mips/pt-machine.h (PT_EI): Likewise.
675         * sysdeps/powerpc/powerpc32/pt-machine.h (PT_EI): Likewise.
676         * sysdeps/powerpc/powerpc64/pt-machine.h (PT_EI): Likewise.
677         * sysdeps/s390/s390-32/pt-machine.h (PT_EI): Likewise.
678         * sysdeps/s390/s390-64/pt-machine.h (PT_EI): Likewise.
679         * sysdeps/sh/pt-machine.h (PT_EI): Likewise.
680         * sysdeps/sparc/sparc32/pt-machine.h (PT_EI): Likewise.
681         * sysdeps/sparc/sparc64/pt-machine.h (PT_EI): Likewise.
682         * sysdeps/x86_64/pt-machine.h (PT_EI): Likewise.
683         * spinlock.h (__pthread_set_own_extricate_if): Likewise.
684         * sysdeps/ia64/tls.h (TLS_INIT_TP): Cast tcbp to __typeof
685         (__thread_self).
686         * Examples/ex13.c (main): Change res type to void * to avoid
687         warnings.
688         * tst-cancel.c (cleanup, inner, tf1, tf2, tf3): Comment out.
690 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
692         * pthread.c (init_one_static_tls, __pthread_init_static_tls): New
693         functions.
694         (pthread_initialize): Initialize GL(dl_init_static_tls).
696 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
698         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
699         before __timer_dealloc.
700         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
701         Don't call list_unlink.
703 2003-07-29  Roland McGrath  <roland@redhat.com>
705         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
707 2003-07-25  Roland McGrath  <roland@redhat.com>
709         * manager.c (pthread_start_thread): Fix typo in last change.
711 2003-07-14  Guido Guenther  <agx@sigxcpu.org>
713         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: Add IS_IN_librt,
714         use L() for local labels.
716 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
718         * descr.h (struct _pthread_descr_struct): Provide p_res member
719         even if USE_TLS && HAVE___THREAD.
720         * sysdeps/pthread/res-state.c (__res_state): Return __resp
721         if USE___THREAD.
722         * manager.c: Include resolv.h.
723         (pthread_start_thread): Initialize __resp.
724         * libc-tls-loc.c (__res_state): Return __resp.
725         * Makefile (tests): Add tst-_res1.
726         (modules-names, extra-objs, test-extras, test-modules): Add support
727         for test modules.
728         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
729         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
730         -lpthread.
731         * tst-_res1.c: New test.
732         * tst-_res1mod1.c: New test.
733         * tst-_res1mod2.c: New test.
735 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
737         * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_push and
738         __libc_cleanup_pop.
740         * tst-cancel-wrappers.sh: lseek and llseek are no cancellation points.
742 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
744         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Fix typo
745         in test for compilation in libc.
747 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
749         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
750         different symbol for the cancellation syscall wrapper and
751         non-cancellation syscall wrapper.
752         (PSEUDO_END): Define.
754 2003-07-05  Richard Henderson  <rth@redhat.com>
756         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
758 2003-06-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
760         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Support cancellation
761         in librt.
763 2003-06-21  Andreas Schwab  <schwab@suse.de>
765         * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Support cancellation
766         in librt.
768 2003-06-20  Richard Henderson  <rth@redhat.com>
770         * sysdeps/unix/sysv/linux/alpha/Makefile (libpthread-routines):
771         Remove ptw-osf_sigprocmask.
773 2003-06-18  Jakub Jelinek  <jakub@redhat.com>
775         * internals.h (__librt_multiple_threads, __librt_enable_asynccancel,
776         __librt_disable_asynccancel): Declare.
777         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET, LIBC_CANCEL_HANDLED): Define
778         for IS_IN_librt.
779         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Support cancellation
780         in librt.
781         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
782         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
783         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
784         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
785         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
786         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
787         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
788         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
789         * sysdeps/x86_64/tcb-offsets.sym: New file.
790         * sysdeps/x86_64/Makefile: New file.
791         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
792         * Versions (libc): Export __librt_enable_asynccancel,
793         __librt_disable_asynccancel and __librt_multiple_threads as
794         GLIBC_PRIVATE.
795         * libc-cancellation.c (__librt_multiple_threads,
796         __librt_enable_asynccancel, __librt_disable_asynccancel): New aliases.
798 2003-06-12  Steven Munroe  <sjmunroe@us.ibm.com>
800         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
801         (SINGLE_THREAD_P): Replace @ got notation with @toc.
803 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
805         * sysdeps/powerpc/pspinlock.c (__pthread_spin_init): Fix
806         initializer [PR libc/5052].
808 2003-06-09  Andreas Schwab  <schwab@suse.de>
810         * Makefile: Move inclusion of ../Rules down after extra-objs is
811         fully known.
813 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
815         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: New sequences for
816         5+ arg syscalls only needed for PIC.
817         Patch by Ralph Siemsen <ralphs@netwinder.org>.
819 2003-06-05  Richard Henderson  <rth@redhat.com>
821         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use
822         and require CFI assembler directives.
823         * sysdeps/unix/sysv/linux/alpha/vfork.S: Likewise.
825 2003-05-30  Andreas Jaeger  <aj@suse.de>
827         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h
828         (SAVESTK_0): Add CFI directives.
829         (SAVESTK_3): Likewise.
830         (SAVESTK_5): Likewise.
831         (RESTSTK_0): Likewise.
832         (RESTSTK_3): Likewise.
833         (RESTSTK_5): Likewise.
835 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
837         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Add \n to error
838         messages.
840 2003-05-04  Roland McGrath  <roland@redhat.com>
842         * Makefile ($(objpfx)../libc.so): New target.
844 2003-04-26  Ulrich Drepper  <drepper@redhat.com>
846         * pthread.c (__pthread_initialize_manager): Remove one last
847         p_multiple_threads call.
849 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
851         * pthread.c (__pthread_initialize_manager): Subtract
852         TLS_PRE_TCB_SIZE bytes from tcbp to get to descr.
853         * manager.c (pthread_handle_create): Subtract or add TLS_PRE_TCB_SIZE
854         instead of sizeof (pthread_descr).
855         (pthread_free): Add TLS_PRE_TCB_SIZE instead of sizeof (pthread_descr).
856         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define to 0.
857         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
858         pthread_descr.
859         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
860         to TLS_TCB_ALIGN.
861         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
862         tcbp.
863         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
864         unneccessarily.
865         (NO_TLS_OFFSET): Define.
867 2003-04-22  Roland McGrath  <roland@redhat.com>
869         * Makeconfig (shared-thread-library): Reverse link order to work
870         around linker bug.
872 2003-04-20  Ulrich Drepper  <drepper@redhat.com>
874         * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Make sure the
875         compiler knows we use the ldt_entry variable and that the syscall
876         modifies the memory.
878         * internals.h: Split pthread_functions definition into...
879         * sysdeps/pthread/pthread-functions.h: ...new file.
881         * sysdeps/i386/useldt.h: Include <sysdep.h>.
883 2003-04-13  Jakub Jelinek  <jakub@redhat.com>
885         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Rename macros to
886         match changes in NPTL sysdep-cancel.h.
888 2003-04-11  Roland McGrath  <roland@redhat.com>
890         * Makefile (multidir): Don't set the variable here with $(shell ...).
891         ($(objpfx)multidir.mk): New target, generated makefile; include that.
892         (generated): Append it.
894 2003-04-10  Jakub Jelinek  <jakub@redhat.com>
896         * Makefile (multidir, crti-objs, crtn-objs): New variables.
897         (generated-dirs): Add pathname component of multidir.
898         (omit-deps, extra-objs): Include $(multidir)/crt? as well.
899         ($(objpfx)libpthread.so): Depend on $(multidir)/crt?.o as well.
900         ($(objpfx)$(multidir), $(objpfx)$(multidir)/crti.o,
901         $(objpfx)$(multidir)/crtn.o): New.
902         * sysdeps/unix/sysv/linux/sparc/Makefile: Removed.
903         * sysdeps/unix/sysv/linux/x86_64/Makefile (LDFLAGS-pthread.so,
904         before-compile, generated): Don't generate and use specs.
905         ($(objpfx)specs): Remove.
907 2003-04-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
909         * sysdeps/s390/pspinlock.c (__pthread_spin_unlock): Fix asm contraints.
911 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
913         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h (PSEUDO): Add
914         missing ; after ENTRY use [PR libc/4997].
916 2003-04-03  Jakub Jelinek  <jakub@redhat.com>
918         * pthread.c (pthread_initialize): Unblock __pthread_sig_cancel
919         in case the parent blocked it.
921 2003-04-02  Jakub Jelinek  <jakub@redhat.com>
923         * Makefile (libpthread-routines): Add pthread_atfork.
924         (libpthread-static-only-routines): Add pthread_atfork.
926 2003-04-01  Jakub Jelinek  <jakub@redhat.com>
928         * pthread.c (__pthread_wait_for_restart_signal): Use
929         __pthread_sigsuspend instead of sigsuspend.
930         * internals.h (__pthread_sigsuspend): New prototype.
931         * Makefile (libpthread-routines): Add pt-sigsuspend.
932         (tests): Add tst-cancel7.
933         * sysdeps/unix/sysv/linux/pt-sigsuspend.c: New file.
934         * sysdeps/unix/sysv/linux/alpha/pt-sigsuspend.S: New file.
935         * sysdeps/unix/sysv/linux/ia64/pt-sigsuspend.c: New file.
936         * sysdeps/unix/sysv/linux/s390/s390-64/pt-sigsuspend.c: New file.
937         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-sigsuspend.c: New file.
938         * sysdeps/unix/sysv/linux/x86_64/pt-sigsuspend.c: New file.
939         * tst-cancel7.c: New test.
941 2003-03-31  Alexandre Oliva  <aoliva@redhat.com>
943         * alloca_cutoff.c: Include internals.h.
944         * sysdeps/pthread/errno-loc.c: Include linuxthreads/internals.h.
945         * sysdeps/pthread/herrno-loc.c: Likewise.
946         * sysdeps/pthread/res-state.c: Likewise.
948 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
950         * sysdeps/pthread/bits/typesizes.h: New file.
951         * sysdeps/unix/sysv/linux/alpha/bits/typesizes.h: New file.
952         * sysdeps/unix/sysv/linux/sparc/bits/typesizes.h: New file.
954 2003-03-24  Daniel Jacobowitz  <drow@mvista.com>
956         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
957         (DOARGS_5, DOARGS_6, DOARGS_7): Rewritten.
959 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
961         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
963 2003-03-21  Daniel Jacobowitz  <drow@mvista.com>
965         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
966         (SINGLE_THREAD_P_PIC): Use "reg" instead of "lr".
968 2003-03-21  Jakub Jelinek  <jakub@redhat.com>
970         * sysdeps/i386/tls.h [__ASSUME_SET_THREAD_AREA_SYSCALL]
971         (TLS_SETUP_GS_SEGMENT): Fix a typo.
973 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
975         * sysdeps/pthread/Makefile: Fix cut&paste error.
977 2003-03-18  Roland McGrath  <roland@redhat.com>
979         * Versions (libpthread: GLIBC_2.2): Remove
980         pthread_barrierattr_getpshared, never really existed.
981         (libpthread: GLIBC_2.0): Move __pthread_initialize to ...
982         (libpthread: GLIBC_PRIVATE): ... here.
984 2003-03-14  Jakub Jelinek  <jakub@redhat.com>
986         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
987         * sysdeps/unix/sysv/linux/sparc/Makefile ($(objpfx)specs): Use full
988         path for crt[in].o.
990 2003-03-14  Alexandre Oliva  <aoliva@redhat.com>
992         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't .set
993         mips2 on new abi.
994         * sysdeps/mips/pt-machine.h (__compare_and_swap): Likewise.
995         Handle 64-bit longs on n64.
997 2003-03-07  Jakub Jelinek  <jakub@redhat.com>
999         * sysdeps/ia64/pspinlock.c (__pthread_spin_lock,
1000         __pthread_spin_trylock): Rewritten.
1002 2003-03-06  Ulrich Drepper  <drepper@redhat.com>
1004         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
1005         recent kernels.
1007 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
1009         * sysdeps/pthread/timer_create.c (timer_create): Return correct
1010         error for CPU clocks.
1012         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1013         _POSIX_MONOTONIC_CLOCK.
1014         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1016 2003-03-01  Roland McGrath  <roland@redhat.com>
1018         * sysdeps/powerpc/powerpc64/pt-machine.h
1019         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
1020         New macros.
1021         * sysdeps/powerpc/tls.h: Don't define those here.
1023         * sysdeps/powerpc/tls.h [! USE_TLS && !__powerpc64__]: Define
1024         tcbhead_t with multiple_threads member.
1025         [USE_TLS] (tcbhead_t): Define minimal one-word version.
1026         [USE_TLS && !__powerpc64__] (TLS_MULTIPLE_THREADS_IN_TCB): Define.
1027         * sysdeps/powerpc/tcb-offsets.sym [USE_TLS]: Use tls.h macros to
1028         derive thread register offset of p_multiple_threads member.
1030         * descr.h (struct _pthread_descr_struct) [!USE_TLS || !TLS_DTV_AT_TP]:
1031         Conditionalize p_header member on this.
1032         [TLS_MULTIPLE_THREADS_IN_TCB]: Add p_multiple_threads alternatively.
1033         * sysdeps/ia64/tls.h [USE_TLS] (TLS_MULTIPLE_THREADS_IN_TCB): Define.
1034         * sysdeps/sh/tls.h: Likewise.
1035         * sysdeps/ia64/tcb-offsets.sym [USE_TLS]: Use p_multiple_threads.
1036         * sysdeps/sh/tcb-offsets.sym: Likewise.
1037         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
1038         (SINGLE_THREAD_P): Likewise.
1039         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1040         (SINGLE_THREAD_P): Likewise.
1041         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1042         (SINGLE_THREAD_P): Likewise.
1043         * pthread.c (__pthread_initialize_manager): Likewise.
1044         * manager.c (pthread_handle_create): Likewise.
1046         * sysdeps/powerpc/tls.h [HAVE_TLS_SUPPORT]: Define USE_TLS and all
1047         related macros.
1049 2003-01-31  Steven Munroe  <sjmunroe@us.ibm.com>
1051         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S [SHARED]:
1052         Conditionalize .toc section magic on this.
1054 2003-02-21  Roland McGrath  <roland@redhat.com>
1056         * cancel.c (__pthread_perform_cleanup): Call __libc_thread_freeres
1057         instead of __rpc_thread_destroy.
1059 2003-02-21  Jakub Jelinek  <jakub@redhat.com>
1061         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Call
1062         __fork instead of branching to it if BROKEN_SPARC_WDISP22.
1063         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
1064         Fix typo.
1065         * sysdeps/unix/sysv/linux/sparc/Makefile (specs): Add ./ prefix
1066         to crti.o and crtn.o.
1067         * sysdeps/unix/sysv/linux/x86_64/Makefile (specs): Likewise.
1069 2003-02-21  Roland McGrath  <roland@redhat.com>
1071         * Makefile (install-lib-ldscripts): New variable.
1073 2003-02-20  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
1075         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: Avoid short
1076         interprocedure branches.
1078 2003-02-19  Ulrich Drepper  <drepper@redhat.com>
1080         * specific.c (pthread_key_delete_helper): Don't use GETMEM, we
1081         need the target thread's lock.
1083 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
1085         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
1086         and LOGIN_NAME_MAX.
1088 2003-02-17  Kevin B. Hendricks  <kevin.hendricks@sympatico.ca>
1089             Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
1091         * sysdeps/powerpc/Makefile: Handle tcb-offsets.sym.
1092         * sysdeps/powerpc/tcb-offsets.sym: New file.
1093         * sysdeps/powerpc/tls.h: New file.
1094         * sysdeps/powerpc/powerpc32/pt-machine.h (FLOATING_STACKS): Define.
1095         (ARCH_STACK_MAX_SIZE): Define.
1096         (THREAD_SELF): Define.
1097         (INIT_THREAD_SELF): Define.
1098         (THREAD_GETMEM): Define.
1099         (THREAD_GETMEM_NC): Define.
1100         (THREAD_SETMEM): Define.
1101         (THREAD_SETMEM_NC): Define.
1102         (__thread_self): Declare.
1103         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Adjust
1104         for thread register.
1106 2003-02-14  Steven Munroe  <sjmunroe@us.ibm.com>
1108         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
1109         Check pthread_create existance, not __pthread_fork.
1111 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
1113         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
1115 2003-02-10  Jakub Jelinek  <jakub@redhat.com>
1117         * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Check
1118         pthread_create existance, not __pthread_fork.
1119         * sysdeps/unix/sysv/linux/i386/vfork.S (__vfork): Likewise.
1120         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Likewise.
1121         * sysdeps/unix/sysv/linux/m68k/vfork.S (__vfork): Likewise.
1122         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
1123         Likewise.
1124         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
1125         * sysdeps/unix/sysv/linux/x86_64/vfork.S (__vfork): Likewise.
1126         * sysdeps/unix/sysv/linux/sh/vfork.S (__vfork): Likewise.
1127         Add .weak pthread_create.
1128         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Fix a typo.
1129         Check pthread_create existance, not __pthread_fork.
1130         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
1131         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Branch to
1132         __fork whenever libpthread.so is loaded.
1134 2003-02-09  Andreas Jaeger  <aj@suse.de>
1136         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h:
1137         Rework: %r9 is destroyed by functions so don't use it as
1138         temporary, align stack correctly, fix parameter for CDISABLE.
1140 2003-02-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1142         * sysdeps/sh/Makefile: New file.
1143         * sysdeps/sh/tcb-offsets.sym: Likewise.
1144         * sysdeps/sh/tls.h: Don't include sysdep.h. Move include
1145         of linuxthreads/descr.h after the definition of THREAD_SELF.
1146         (tcbhead_t): Use IA64 type tcbhead_t for TLS case.
1147         (TLS_TCB_SIZE): Set size of tcbhead_t.
1148         (TLS_PRE_TCB_SIZE): Define.
1149         (INSTALL_NEW_DTV): Set dtv of tcbhead_t structure instead of
1150         a member of thread structure.
1151         (THREAD_DTV): Likewise.
1152         (TLS_INIT_TP_EXPENSIVE): Remove.
1153         (TLS_INIT_TP): Set gbr register only.
1154         (THREAD_SELF): New.
1155         (INIT_THREAD_SELF): Likewise.
1156         (NONTLS_INIT_TP): New.
1157         * sysdeps/unix/sysv/linux/sh/pt-initfini.c (__fpscr_values):
1158         Remove.
1159         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Add
1160         SYSCALL_INST_PAD macro after DO_CALL.
1161         (SINGLE_THREAD_P): Fix non-PIC and TLS case so to read the
1162         correct variable.
1163         * sysdeps/unix/sysv/linux/sh/vfork.S (__vfork): Branch to __fork
1164         whenever libpthread.so is loaded.
1166 2003-02-08  Andreas Schwab  <schwab@suse.de>
1168         * sysdeps/unix/sysv/linux/m68k/vfork.S: Branch to __fork whenever
1169         libpthread.so is loaded.
1171 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
1173         * sysdeps/unix/sysv/linux/i386/vfork.S: Make sure
1174         __ASSUME_VFORK_SYSCALL is not defined if the kernel headers have
1175         no __NR_vfork definition.
1177 2003-02-07  Jakub Jelinek  <jakub@redhat.com>
1179         * tst-popen2.c: New test.
1180         * Makefile (tests): Add tst-popen2.
1181         * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Branch to __fork
1182         whenever libpthread.so is loaded.
1183         * sysdeps/unix/sysv/linux/i386/vfork.S (__vfork): Likewise.
1184         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Likewise.
1185         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
1186         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
1187         Likewise.
1188         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
1189         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
1190         * sysdeps/unix/sysv/linux/x86_64/vfork.S (__vfork): Likewise.
1192 2003-02-05  Ulrich Drepper  <drepper@redhat.com>
1194         * sysdeps/pthread/bits/libc-lock.h (__libc_once): Set control
1195         variable for non-libpthread case to the same value the
1196         pthread_once function would use.
1198 2003-02-03  Jakub Jelinek  <jakub@redhat.com>
1200         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): If
1201         BROKEN_SPARC_WDISP22, handle SHARED the same way as non-SHARED.
1203 2003-02-04  Andreas Jaeger  <aj@suse.de>
1205         * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Do not use
1206         multi-line strings.
1208 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
1210         * sysdeps/s390/tls.h (TLS_INIT_TP): Return NULL, not 0.
1212 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
1214         * sysdeps/alpha/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1215         THREAD_SETMEM, THREAD_SETMEM_NC): Avoid warnings about unused self
1216         variable.
1217         * sysdeps/ia64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1218         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1219         * sysdeps/s390/s390-32/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1220         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1221         * sysdeps/s390/s390-64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1222         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1223         * sysdeps/sh/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1224         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1225         * sysdeps/sparc/sparc32/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1226         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1227         * sysdeps/sparc/sparc64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1228         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1230 2003-01-27  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1232         * sysdeps/s390/s390-32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
1233         Define TLS versions.
1234         * sysdeps/s390/s390-64/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
1235         Likewise.
1236         * sysdeps/s390/tls.h [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE,
1237         TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE, TLS_TCB_ALIGN, TLS_TCB_AT_TP,
1238         INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_DTV):
1239         Define.
1240         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Use
1241         branch with 32 bit offset.
1242         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: Likewise.
1244 2003-01-24  Jakub Jelinek  <jakub@redhat.com>
1246         * sysdeps/sparc/sparc32/pt-machine.h (__thread_self): Change to %g7,
1247         as required by TLS ABI.
1248         * sysdeps/sparc/sparc64/pt-machine.h (__thread_self): Likewise.
1249         * sysdeps/sparc/tls.h [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE,
1250         TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE, TLS_TCB_ALIGN, TLS_TCB_AT_TP,
1251         INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_DTV):
1252         Define.
1253         [HAVE_TLS_SUPPORT]: Include descr.h and sysdep.h.
1254         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Use %g7
1255         instead of %g6 for thread pointer.
1256         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
1257         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1258         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
1260 2003-01-25  Guido Guenther  <agx@sigxcpu.org>
1262         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
1263         * sysdeps/unix/sysv/linux/mips/Makefile: New file.
1265 2003-01-20  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1267         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: Avoid non pc relative
1268         reference to __fork.
1270 2003-01-17  Richard Henderson  <rth@redhat.com>
1272         * sysdeps/alpha/tls.h (tcbhead_t): Clarify second member.
1273         (TLS_TCB_SIZE, TLS_TCB_ALIGN): Set for tcbhead_t.
1274         (TLS_PRE_TCB_SIZE): New.
1275         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Update for
1276         new ia64-style thread pointer layout.
1277         (THREAD_GETMEM, THREAD_GETMEM_NC): New.
1278         (THREAD_SETMEM, THREAD_SETMEM_NC): New.
1279         * sysdeps/unix/sysv/linux/alpha/vfork.S: Don't tail-call to __fork
1280         if !SHARED.
1282 2003-01-15  Jakub Jelinek  <jakub@redhat.com>
1284         * sysdeps/ia64/tls.h (tcbhead_t): Use the TLS ABI required layout
1285         if USE_TLS only.
1286         (NONTLS_INIT_TP): Revert last change.
1287         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define to
1288         offsetof (tcbhead_t, multiple_threads) if USE_TLS not defined.
1290 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
1292         * pthread.c (_pthread_initialize_minimal): Use
1293         GL(dl_tls_dtv_slotinfo_list) != NULL to check whether TLS has
1294         been already initialized.
1296 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
1298         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize head->sysinfo even
1299         if not SHARED.
1301 2003-01-15  Jakub Jelinek  <jakub@redhat.com>
1303         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init,
1304         __libc_lock_init_recursive): Initialize fields directly.
1306 2003-01-15  Jakub Jelinek  <jakub@redhat.com>
1308         * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Allow
1309         __fork to be far away from __vfork ifndef SHARED.
1310         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
1311         Likewise.
1312         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
1313         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
1314         Add a missing instruction.
1315         * sysdeps/unix/sysv/linux/arm/vfork.S (__vfork): Conditionally
1316         branch to __fork even if __NR_vfork is not defined.
1318 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
1320         * tst-cancel-wrappers.sh: Allow .__*_asynccancel functions names
1321         as well.
1323 2003-01-14  Steven Munroe  <sjmunroe@us.ibm.com>
1325         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
1327 2003-01-14  Jakub Jelinek  <jakub@redhat.com>
1329         * sysdeps/unix/sysv/linux/ia64/vfork.S (JUMPTARGET): Remove.
1331 2003-01-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1333         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Avoid
1334         unterminated string literals.
1335         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Likewise.
1337 2003-01-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1339         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
1340         (PSEUDO): Code reordering.  Move CENABLE and CDISABLE literals from
1341         PSEUDO_END to PSEUDO.
1342         (PSEUDO_END): Remove.
1343         (SINGLE_THREAD_P): Save an instruction.
1344         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add missing
1345         parameter to SINGLE_THREAD_P call.
1346         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
1347         Code reordering.
1349 2003-01-10  Andreas Schwab  <schwab@suse.de>
1351         * sysdeps/unix/sysv/linux/m68k/vfork.S: New file.
1353 2003-01-10  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1355         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Setup
1356         backchain in pseudo_cancel.  Minor code improvements.
1357         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
1358         Likewise.
1360 2003-01-10  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1362         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
1363         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
1365 2002-01-12  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
1367         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
1369 2002-01-09  Richard Henderson  <rth@redhat.com>
1371         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Assume only
1372         ret follows pseudo, and thus avoid branch-to-branch in cancel
1373         case.  Use SYSCALL_ERROR_LABEL.
1375 2003-01-11  Philip Blundell  <philb@gnu.org>
1377         * sysdeps/unix/sysv/linux/arm/vfork.S: New file.
1378         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h (PSEUDO_RET):
1379         Correctly unstack lr.
1380         (UNDOARGS_5): Fix ordering of pushes and pops.
1381         (SINGLE_THREAD_P_PIC): New.
1382         (SINGLE_THREAD_P_INT): New.
1383         (SINGLE_THREAD_P): Implement in terms of above.  Restore lr if it
1384         was stacked.
1385         (PSEUDO): Use SINGLE_THREAD_P_INT.
1387 2003-01-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1389         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
1391 2003-01-11  Jakub Jelinek  <jakub@redhat.com>
1393         * sysdeps/ia64/tls.h (tcbhead_t): Change into dtv_t *, void *.
1394         [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN,
1395         TLS_TCB_SIZE, TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, TLS_DTV_AT_TP,
1396         INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_SELF,
1397         INIT_THREAD_SELF): Define.
1398         [HAVE_TLS_SUPPORT]: Include descr.h.
1399         (NONTLS_INIT_TP): Point __thread_self at the end of dummy
1400         struct _pthread_descr_struct.
1401         * sysdeps/ia64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1402         THREAD_SETMEM, THREAD_SETMEM_NC): Define using THREAD_SELF,
1403         not __thread_self.
1404         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Adjust
1405         computation.
1406         * pthread.c (__pthread_initialize_minimal): Use tcbp, not self
1407         for TCB pointer.
1408         (__pthread_initialize_manager): Rename tcb to mgr.
1409         Use tcbp for TCB pointer, if TLS_DTV_AT_TP set mgr to sizeof (struct
1410         _pthread_descr) below tcbp, otherwise to tcbp.
1411         * manager.c (pthread_handle_create): If TLS_DTV_AT_TP, set
1412         new_thread to be below _dl_allocate_tls ().  Adjust new_thread back
1413         before freeing.  Fix clone arguments if report_events and USE_TLS.
1414         (pthread_free): Adjust th back before freeing.
1416 2003-01-10  Steven Munroe  <sjmunroe@us.ibm.com>
1418         * sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile: Moved to ...
1419         * sysdeps/unix/sysv/linux/powerpc/Makefile: ...here.
1420         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New File.
1422 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
1424         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
1425         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
1426         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1427         [__ASSEMBLER__] (SINGLE_THREAD_P): Remove trailing ;;.
1428         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
1429         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
1430         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
1431         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
1432         * tst-popen.c: New test.
1433         * Makefile (tests): Add tst-popen.
1435 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
1437         * sysdeps/unix/sysv/linux/sigwait.c (do_sigwait): Add
1438         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
1440 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
1442         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use
1443         PSEUDO_PREPARE_ARGS.  Fix branch condition after SINGLE_THREAD_P.
1445 2003-01-06  Philip Blundell  <philb@gnu.org>
1447         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: New file.
1449 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
1451         * internals.h (LIBC_CANCEL_HANDLED): Define.
1452         * sysdeps/unix/sysv/linux/sigwait.c (LIBC_CANCEL_HANDLED): Add.
1453         * signals.c (LIBC_CANCEL_HANDLED): Add.
1454         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
1455         * tst-cancel-wrappers.sh: Remove all exceptions.
1457         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
1459 2003-01-05  Andreas Schwab  <schwab@suse.de>
1461         * sysdeps/m68k/Makefile: New file, use -fPIC for nonshared
1462         objects.
1464         * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h (SINGLE_THREAD_P):
1465         Fix for PIC.
1466         (CENABLE): Likewise.
1467         (CDISABLE): Likewise.
1469 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
1471         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
1472         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
1474         * Makefile (libc.so-no-z-defs): Define to yes.
1476 2003-01-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1478         * sysdeps/sh/tls.h: Include dl-sysdep.h and stdint.h.
1479         (tcbhead_t): Add multiple_threads member.
1480         (TLS_INIT_TP_EXPENSIVE): Define.
1481         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Don't use multi-line
1482         strings.  Remove unused code.
1483         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
1485 2003-01-04  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
1487         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
1488         * sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile: New file.
1490 2003-01-04  Jakub Jelinek  <jakub@redhat.com>
1492         * internals.h (LIBC_THREAD_GETMEM, LIBC_THREAD_SETMEM): Define
1493         even if NOT_IN_libc is defined.
1495 2003-01-05  Jakub Jelinek  <jakub@redhat.com>
1497         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
1498         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
1499         * sysdeps/s390/Makefile: New file.
1500         * sysdeps/s390/tcb-offsets.sym: New file.
1501         * sysdeps/s390/tls.h: New file.
1503 2003-01-03  Richard Henderson  <rth@redhat.com>
1505         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
1507 2003-01-03  Andreas Jaeger  <aj@suse.de>
1509         * sysdeps/pthread/bits/libc-tsd.h: Declare weak_extern functions.
1511 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
1513         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
1515 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
1517         * tst-cancel-wrappers.sh: Exclude sigwait.c as well, it does not have
1518         cancellation tests.
1520 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
1522         * internals.h (struct pthread_functions): Rename
1523         ptr_pthread_cond_* fields to ptr___pthread_cond_*.
1524         * pthread.c (pthread_functions): Adjust.
1525         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
1526         pthread_cond_*@GLIBC_2.0 compatibility symbols.
1527         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
1528         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
1529         and pthread_cond_wait.
1531         * sysdeps/pthread/bits/pthreadtypes.h (__pthread_cond_align_t): New
1532         type.
1533         (pthread_cond_t): Add __align member, shorten __padding.
1534         * sysdeps/pthread/pthread.h (PHTREAD_COND_INITIALIZER): Initialize
1535         __padding and __align too.
1537         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call2): Add
1538         __builtin_expect.
1539         * sysdeps/pthread/sigaction.c: New file.
1540         * sysdeps/unix/sysv/linux/raise.c: New file.
1541         * sysdeps/unix/sysv/linux/sigwait.c: New file.
1542         * sysdeps/unix/sysv/linux/fork.c (__pthread_fork): Protect
1543         weak_extern with #ifndef SHARED.
1544         * sysdeps/unix/sysv/linux/jmp-unwind.c (__pthread_cleanup_upto):
1545         Likewise.
1546         * signals.c (__sigaction): Renamed to...
1547         (__pthread_sigaction): ... this.
1548         (__sigaction): New strong alias, #ifdef SHARED only.
1549         (sigaction): Protect with #ifdef SHARED.
1550         (sigwait): Renamed to...
1551         (__pthread_sigwait): ... this.
1552         (sigwait): New strong alias, #ifdef SHARED only.
1553         (raise): Renamed to...
1554         (__pthread_raise): ... this.
1555         (raise): New strong alias, #ifdef SHARED only.
1556         * internals.h (__pthread_sigaction, __pthread_sigwait,
1557         __pthread_raise): New prototypes.
1558         (struct pthread_functions): Add ptr_pthread_sigaction,
1559         ptr_pthread_sigwait, ptr_pthread_raise.
1560         * pthread.c (pthread_functions): Renamed to...
1561         (__pthread_functions): ... this.  No longer static, no longer
1562         SHARED only.  Initialize ptr_pthread_sigaction, ptr_pthread_sigwait
1563         and ptr_pthread_raise.
1564         [SHARED] (ptr_pthread_functions): Change to &__pthread_functions.
1565         * libc-cancellation.c (__pthread_thread_self): Remove weak_extern.
1566         * ptfork.c (__fork, __vfork): Protect with #ifdef SHARED.
1567         * ptlongjmp.c (siglongjmp, longjmp): Protect with #ifdef SHARED.
1569         * Makefile (tests, tests-static): Add tst-cancel-static.
1570         * tst-cancel-static.c: New test.
1572 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
1574         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
1576 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
1578         * sysdeps/pthread/bits/pthreadtypes.h (pthread_cond_t): Add padding.
1579         * condvar.c: Add symbol versioning.  The compatibility versions
1580         are the same as the change in the interface does not effect this
1581         implementation.
1582         * Versions [libpthread]: Add definitions for new pthread_cond_*
1583         interfaces for version GLIBC_2.3.2.
1585 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
1587         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
1588         __register_atfork.
1589         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
1590         for __register_atfork.
1592 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
1594         * sysdeps/i386/i686/pt-machine.h: Use __ASSEMBLER__ instead of
1595         ASSEMBLER test macro.
1596         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Likewise.
1597         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1598         * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Likewise.
1599         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1600         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1601         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1603         * sysdeps/pthread/errno-loc.c (__errno_location): Add
1604         libc_hidden_def.
1605         * sysdeps/pthread/herrno-loc.c (__h_errno_location): Likewise.
1606         * sysdeps/pthread/res-state.c (__res_state): Likewise.
1607         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
1608         __libc_current_sigrtmax): Likewise.
1609         * Versions [libc] (GLIBC_PRIVATE): Remove __libc_internal_tsd_get,
1610         __libc_internal_tsd_set, __libc_internal_tsd_address,
1611         __libc_alloca_cutoff.
1612         [libpthread] (GLIBC_PRIVATE): Remove __libc_internal_tsd_get,
1613         __libc_internal_tsd_set, __libc_internal_tsd_address.
1615         * sysdeps/pthread/list.h: Remove assert.h include.
1616         * sysdeps/unix/sysv/linux/fork.c: Include <fork.h>, not "fork.h".
1618         * sysdeps/pthread/list.h: New file.
1619         * sysdeps/unix/sysv/linux/jmp-unwind.c: New file.
1620         * sysdeps/unix/sysv/linux/fork.c: New file.
1621         * sysdeps/unix/sysv/linux/fork.h: New file.
1622         * sysdeps/unix/sysv/linux/ia64/fork.h: New file.
1623         * sysdeps/unix/sysv/linux/sparc/fork.h: New file.
1624         * sysdeps/unix/sysv/linux/register-atfork.c: New file.
1625         * sysdeps/unix/sysv/linux/unregister-atfork.c: New file.
1626         * sysdeps/unix/sysv/linux/Makefile: New file.
1627         * sysdeps/unix/sysv/linux/Versions: New file.
1628         * ptlongjmp.c (pthread_cleanup_upto): Rename to...
1629         (__pthread_cleanup_upto): ...this. Add targetframe argument,
1630         use it instead of currentframe.  No longer static.
1631         (siglongjmp, longjmp): Remove pthread_cleanup_upto calls.
1632         * internals.h (__pthread_cleanup_upto, __pthread_fork): New prototypes.
1633         (struct pthread_functions): Add ptr_pthread_fork,
1634         ptr_pthread_cleanup_upto.
1635         * pthread.c (pthread_functions): Initialize ptr_pthread_fork and
1636         ptr_pthread_cleanup_upto.
1637         * ptfork.c: Include fork.h.
1638         (struct handler_list, struct handler_list_block): Remove.
1639         (pthread_atfork_lock, pthread_atfork_prepare, pthread_atfork_parent,
1640         pthread_atfork_child): Remove.
1641         (pthread_insert_list, __pthread_atfork, pthread_call_handlers): Remove.
1642         (__pthread_fork): New function.
1643         (__fork, __vfork): Call __libc_fork.
1644         * Makefile (libpthread-routines): Add old_pthread_atfork.
1645         (libpthread-nonshared): Add pthread_atfork.
1646         (others): Depend on $(objpfx)libpthread_nonshared.a.
1647         ($(objpfx)libpthread_nonshared.a): New rule.
1648         (install): Depend on $(inst_libdir)/libpthread.so.
1649         ($(inst_libdir)/libpthread.so, $(inst_libdir)/libpthread_nonshared.a):
1650         New rules.
1651         (tests): Depend on libpthread_nonshared.a too.
1652         * old_pthread_atfork.c: New file.
1653         * pthread_atfork.c: New file.
1654         * Makeconfig (shared-thread-library): Include libpthread_nonshared.a
1655         too.
1657 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
1659         * forward.c: Make all functions available by default again.  It
1660         caused too much trouble.
1661         * internals.h (struct pthread_functions): Rename ptr_pthread_exit
1662         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
1663         ptr___pthread_attr_init_2_*.
1664         * pthread.c (pthread_functions): Adjust.
1666 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
1668         * libc_pthread_init.c (__libc_pthread_init): Remove
1669         MULTIPLE_THREADS_OFFSET check.
1670         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
1671         (SYSINFO_OFFSET): Remove.
1672         * sysdeps/i386/Makefile [csu] (gen-as-const-headers): Add
1673         tcb-offsets.sym.
1674         * sysdeps/i386/tcb-offsets.sym: New file.
1675         * sysdeps/pthread/tcb-offsets.h: New file.
1676         * sysdeps/sparc/sparc32/tls.h: Removed.
1677         * sysdeps/sparc/sparc64/tls.h: Move...
1678         * sysdeps/sparc/tls.h: ...here.  Include tcb-offsets.h in assembler.
1679         * sysdeps/sparc/Makefile: New file.
1680         * sysdeps/sparc/tcb-offsets.sym: New file.
1681         * sysdeps/ia64/tls.h: Include tcb-offsets.h in assembler.
1682         * sysdeps/ia64/Makefile: New file.
1683         * sysdeps/ia64/tcb-offsets.sym: New file.
1684         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
1685         (MULTIPLE_THREADS_OFFSET): Remove.
1686         Replace defined MULTIPLE_THREADS_OFFSET
1687         with defined FLOATING_STACKS && USE___THREAD.
1688         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1689         (MULTIPLE_THREADS_OFFSET): Remove.
1690         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1691         (MULTIPLE_THREADS_OFFSET): Remove.
1692         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1693         (MULTIPLE_THREADS_OFFSET): Remove.
1694         * pthread.c (__pthread_initialize_manager): Remove
1695         MULTIPLE_THREADS_OFFSET cbeck.
1697         * tst-cancel-wrappers.sh: Add line continuations.
1699 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
1701         * sysdeps/pthread/bits/libc-tsd.h: Include linuxthreads/descr.h
1702         and bits/libc-lock.h.
1703         (__libc_internal_tsd_get, __libc_internal_tsd_set,
1704         __libc_internal_tsd_address): Remove.
1705         (__pthread_internal_tsd_address, __pthread_internal_tsd_get,
1706         __pthread_internal_tsd_set): New weak_externs.
1707         (__libc_tsd_address, __libc_tsd_get, __libc_tsd_set): Define
1708         using __libc_maybe_call2.
1709         (__libc_tsd_key_t): Move to ...
1710         * descr.h (__libc_tsd_key_t): ...here.
1711         Remove bits/libc-tsd.h include.
1712         * sysdeps/pthread/errno-loc.c: New file.
1713         * sysdeps/pthread/herrno-loc.c: New file.
1714         * sysdeps/pthread/res-state.c: New file.
1715         * libc-cancellation.c (THREAD_GETMEM, THREAD_SETMEM): Remove.
1716         (__libc_enable_asynccancel, __libc_disable_asynccancel): Use
1717         thread_self unconditionally.  Use LIBC_THREAD_[SG]ETMEM instead
1718         of THREAD_[SG]ETMEM.
1719         * specific.c (libc_internal_tsd_set): Renamed to...
1720         __pthread_internal_tsd_set.  Remove static.
1721         (libc_internal_tsd_get): Renamed to...
1722         __pthread_internal_tsd_get.  Remove static.
1723         (libc_internal_tsd_address): Renamed to...
1724         __pthread_internal_tsd_address.  Remove static.
1725         (__libc_internal_tsd_set, __libc_internal_tsd_get,
1726         __libc_internal_tsd_address, __libc_alloca_cutoff): Remove.
1727         * internals.h [!NOT_IN_libc] (LIBC_THREAD_GETMEM, LIBC_THREAD_SETMEM):
1728         Define.
1729         (__pthread_internal_tsd_set, __pthread_internal_tsd_get,
1730         __pthread_internal_tsd_address): New prototypes.
1731         (struct pthread_functions): Add
1732         ptr_pthread_internal_tsd_([sg]et|address) fields.
1733         [!NOT_IN_libc && !FLOATING_STACKS] (thread_self): Define.
1734         * pthread.c (pthread_functions) [!USE_TLS && !HAVE___THREAD]:
1735         Initialize ptr_pthread_internal_tsd_([sg]et|address) fields.
1736         * Versions (libpthread): Remove __libc_alloca_cutoff@GLIBC_PRIVATE.
1737         * alloca_cutoff.c: New file.
1738         * no-tsd.c: Removed.
1739         * Makefile (routines): Remove no-tsd.  Add alloca_cutoff.
1740         * pt-system.c (system): Remove cancellation handling.
1741         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
1742         cancellation routines.
1744         * sysdeps/i386/tls.h: Include dl-sysdep.h and stdint.h.
1745         (tcbhead_t): Add sysinfo field.
1746         (SYSINFO_OFFSET, INIT_SYSINFO): Define.
1747         (TLS_INIT_TP): Use INIT_SYSINFO.
1748         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
1749         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
1750         (MULTIPLE_THREADS_OFFSET): Adjust.
1751         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1752         (MULTIPLE_THREADS_OFFSET): Likewise.
1753         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1754         (MULTIPLE_THREADS_OFFSET): Likewise.
1755         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1756         (MULTIPLE_THREADS_OFFSET): Likewise.
1757         * descr.h: Include stdint.h.
1758         (struct _pthread_descr_struct): Add p_header.data.sysinfo field.
1760 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
1762         * libc_pthread_init.c: Include stdlib.h.
1763         * sysdeps/i386/tls.h (tcbhead_t): Add multiple_threads member.
1764         (TLS_INIT_TP_EXPENSIVE): Define.
1765         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call,
1766         __libc_maybe_call2): In _LIBC check SHARED define.
1767         * sysdeps/ia64/tls.h: New file.
1768         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
1769         * sysdeps/unix/sysv/linux/ia64/Makefile: New file.
1770         * sysdeps/x86_64/tls.h (TLS_INIT_TP_EXPENSIVE): Define.
1771         * sysdeps/sparc/sparc32/tls.h: New file.
1772         * sysdeps/sparc/sparc64/tls.h: New file.
1773         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
1774         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
1775         * Makefile (tests): Add tst-cancel[1-6].
1776         (tests-reverse): Add tst-cancel5.
1777         Link libc.so before libpthread.so for tests-reverse.
1778         * tst-cancel1.c: New file.
1779         * tst-cancel2.c: New file.
1780         * tst-cancel3.c: New file.
1781         * tst-cancel4.c: New file.
1782         * tst-cancel5.c: New file.
1783         * tst-cancel6.c: New file.
1785 2002-12-27  Andreas Schwab  <schwab@suse.de>
1787         * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: New file.
1789 2002-12-22  Roland McGrath  <roland@redhat.com>
1791         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
1793 2002-12-21  Ulrich Drepper  <drepper@redhat.com>
1795         * pthread.c (init_rtsigs): Remove incomplete __builtin_expect.
1796         Reported by Art Hass <ahaas@airmail.net>.
1798 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
1800         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
1801         Use return 0 as 6th argument to FORWARD4.
1803 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
1805         * sysdeps/i386/useldt.h (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Only
1806         define if __ASSUME_LDT_WORKS > 0.
1807         * libc-cancellation.c (THREAD_GETMEM, THREAD_SETMEM): Redefine to
1808         struct member access if !FLOATING_STACKS.
1809         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
1811 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
1813         * internals.h (__pthread_thread_self): New prototype.
1814         (struct pthread_functions): Add ptr_pthread_thread_self field.
1815         * pthread.c (pthread_functions): Initialize ptr_pthread_thread_self.
1816         (__pthread_thread_self): New function.
1817         * libc-cancellation.c (__pthread_thread_self): Add weak_extern.
1818         (__libc_enable_asynccancel, __libc_disable_asynccancel): Don't
1819         use thread_self() directly if not FLOATING_STACKS.
1821 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
1823         * sysdeps/x86_64/pt-machine.h: Guard most of the header
1824         with #ifndef __ASSEMBLER__.
1825         * pthread.c (pthread_functions): Use SHLIB_COMPAT around
1826         pthread_attr_init_2_0 use.
1828 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
1830         * wrapsyscall.c: Removed.
1831         * weaks.c: Removed.
1832         * Makefile (distribute): Add tst-cancel-wrappers.sh.
1833         (routines): Remove weaks.  Add forward,
1834         libc_pthread_init, libc-cancellation.
1835         (shared-only-routines): Remove weaks.  Add forward.
1836         (libpthread-routines): Remove wrapsyscall.
1837         Add ptw-write, ptw-read, ptw-close, ptw-fcntl, ptw-accept,
1838         ptw-connect, ptw-recv, ptw-recvfrom, ptw-recvmsg, ptw-send,
1839         ptw-sendmsg, ptw-sendto, ptw-fsync, ptw-lseek, ptw-lseek64,
1840         ptw-llseek, ptw-msync, ptw-nanosleep, ptw-open, ptw-open64,
1841         ptw-pause, ptw-pread, ptw-pread64, ptw-pwrite, ptw-pwrite64,
1842         ptw-tcdrain, ptw-wait, ptw-waitpid, pt-system, pt-allocrtsig.
1843         (libpthread-shared-only-routines): Add pt-allocrtsig.
1844         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
1845         ($(objpfx)tst-cancel-wrappers.out): New rule.
1846         * sysdeps/pthread/bits/libc-lock.h: Include linuxthreads/internals.h
1847         if in libc.
1848         (__libc_maybe_call): In libpthread.* don't check for existance
1849         of the function.
1850         (__libc_maybe_call2): Define.
1851         (__libc_lock_init, __libc_lock_fini, __libc_lock_lock,
1852         __libc_lock_trylock, __libc_lock_unlock): Use it.
1853         * sysdeps/pthread/flockfile.c: New file.
1854         * sysdeps/pthread/ftrylockfile.c: New file.
1855         * sysdeps/pthread/funlockfile.c: New file.
1856         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
1857         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
1858         * sysdeps/unix/sysv/linux/allocrtsig.c: New file.
1859         * libc-cancellation.c: New file.
1860         * forward.c: New file.
1861         * libc_pthread_init.c: New file.
1862         * pt-system.c: New file.
1863         * pthread.c: Remove locale.h.
1864         (__pthread_manager_thread): Initialize multiple_threads.
1865         (__pthread_multiple_threads): Declare.
1866         (pthread_functions): New variable.
1867         (__pthread_initialize_minimal): Remove __uselocale call.
1868         Call __libc_pthread_init.
1869         (__pthread_initialize_manager): Initialize __pthread_multiple_threads,
1870         initial thread's multiple_threads and __libc_multiple_threads.
1871         Check MULTIPLE_THREADS_OFFSET value. Initialize manager thread's
1872         multiple_threads.
1873         (pthread_setschedparam, pthread_getschedparam): Rename to __
1874         prefixed variants.  Add strong_alias.
1875         (current_rtmin, current_rtmax, __libc_current_sigrtmin,
1876         __libc_current_sigrtmax, __libc_allocate_rtsig): Remove.
1877         (init_rtsigs): Use __libc_current_sigrtmin_private.
1878         (pthread_initialize): Only call init_rtsigs if
1879         !__ASSUME_REALTIME_SIGNALS.
1880         (__pthread_require_wrappers, __pthread_require_lockfile): Remove.
1881         * internals.h (__pthread_attr_destroy, __pthread_attr_setdetachstate,
1882         __pthread_attr_getdetachstate, __pthread_attr_setschedparam,
1883         __pthread_attr_getschedparam, __pthread_attr_setschedpolicy,
1884         __pthread_attr_getschedpolicy, __pthread_attr_setinheritsched,
1885         __pthread_attr_getinheritsched, __pthread_attr_setscope,
1886         __pthread_attr_getscope, __pthread_cond_init,
1887         __pthread_cond_destroy, __pthread_cond_wait,
1888         __pthread_cond_signal, __pthread_cond_broadcast,
1889         __pthread_condattr_init, __pthread_condattr_destroy,
1890         __pthread_equal, __pthread_getschedparam,
1891         __pthread_setschedparam, __pthread_setcancelstate,
1892         __pthread_setcanceltype, __pthread_enable_asynccancel,
1893         __libc_enable_asynccancel, __libc_pthread_init): New prototype.
1894         (__pthread_mutex_init, __pthread_mutex_destroy,
1895         __pthread_mutex_lock, __pthread_mutex_unlock,
1896         __pthread_mutex_trylock): Likewise.
1897         Add hidden_proto.
1898         (struct pthread_functions): New type.
1899         (__libc_pthread_functions): New variable.
1900         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define.
1901         * descr.h (struct _pthread_descr_struct): Add
1902         p_header.data.multiple_threads field.
1903         * manager.c (pthread_handle_create): Initialize multiple_threads.
1904         * cancel.c (__pthread_enable_asynccancel,
1905         __pthread_disable_asynccancel): New functions.
1906         (__pthread_provide_wrappers): Remove.
1907         (pthread_setcancelstate, pthread_setcanceltype): Rename to __
1908         prefixed variants.  Add strong_alias.
1909         * condvar.c (pthread_cond_init, pthread_cond_destroy,
1910         pthread_cond_wait, pthread_cond_signal, pthread_cond_broadcast,
1911         pthread_condattr_init, pthread_condattr_destroy): Likewise.
1912         * join.c (pthread_exit): Likewise.
1913         * attr.c (pthread_attr_destroy, pthread_attr_setdetachstate,
1914         pthread_attr_getdetachstate, pthread_attr_setschedparam,
1915         pthread_attr_getschedparam, pthread_attr_setschedpolicy,
1916         pthread_attr_getschedpolicy, pthread_attr_setinheritsched,
1917         pthread_attr_getinheritsched, pthread_attr_setscope,
1918         pthread_attr_getscope): Likewise.
1919         * mutex.c (__pthread_mutex_init, __pthread_mutex_destroy,
1920         __pthread_mutex_lock, __pthread_mutex_unlock,
1921         __pthread_mutex_trylock): Add hidden_def.
1922         * Versions (libc): Add __libc_pthread_init,
1923         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
1924         __libc_allocate_rtsig_private @@GLIBC_PRIVATE.
1925         * lockfile.c: Remove some USE_IN_LIBIO guards.
1926         (__pthread_provide_lockfile): Remove.
1927         * pt-allocrtsig.c: New file.
1928         * tst-cancel-wrappers.sh: New test.
1930 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
1932         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
1933         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
1934         * wrapsyscall.c: Remove creat, poll, pselect, readv, select,
1935         sigpause, sigsuspend, sigwaitinfo, waitid, and writev wrappers.
1937 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
1939         * wrapsyscall.c (CANCELABLE_SYSCALL): Don't define function as
1940         weak.  There is no reason for that.
1941         (CANCELABLE_SYSCALL_VA): Likewise.
1943 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
1945         * wrapsyscall.c: Add wrappers for creat, poll, pselect, readv, select,
1946         sigpause, __xpg_sigpause, sigsuspend, sigwaitinfo, waitid, and writev.
1947         * Versions: Export creat, poll, pselect, readv, select, sigpause,
1948         __xpg_sigpause, sigsuspend, sigwaitinfo, waitid, and writev from
1949         libpthread in version GLIBC_2.3.2.
1951 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
1953         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
1955 2002-12-05  Roland McGrath  <roland@redhat.com>
1957         * pthread.c (__pthread_initialize_minimal)
1958         [USE_TLS && SHARED && !USE___THREAD]: Initialize TLS and set up the
1959         TCB if the dynamic linker didn't do it at startup.
1961         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
1962         string.
1963         (TLS_DO_SET_THREAD_AREA, TLS_DO_MODIFY_LDT, TLS_SETUP_GS_SEGMENT):
1964         Submacros updated.
1965         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
1966         * sysdeps/alpha/tls.h (TLS_INIT_TP): Likewise (always zero).
1968 2002-12-03  Roland McGrath  <roland@redhat.com>
1970         * pthread.c (pthread_initialize) [SHARED]: Copy dl_error_tsd value
1971         from dynamic linker internal cell to new libc cell.
1973 2002-11-28  Roland McGrath  <roland@redhat.com>
1975         * tst-context.c: #define IS_IN_libpthread around #include <tls.h>
1976         before other headers, so FLOATING_STACKS is not defined wrongly.
1978         * sysdeps/i386/tls.h [!IS_IN_libpthread]: Enable TLS support
1979         even if [! FLOATING_STACKS].
1980         (TLS_DO_MODIFY_LDT_KERNEL_CHECK): New macro.
1981         If not under [__ASSUME_LDT_WORKS > 0], then do a runtime check of
1982         dl_osversion >= 2.3.99 and fatal if not.
1983         (TLS_DO_MODIFY_LDT): Use it.
1985 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
1987         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
1988         require it to 200112L.  Remove _POSIX_POLL and _POSIX_SELECT.
1989         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1991 2002-11-19  Ulrich Drepper  <drepper@redhat.com>
1993         * Versions (libc: GLIBC_2.0): Remove names of functions which are
1994         not defined in libc.
1995         * Makefile (shared-only-routines): Add weaks.
1996         * weaks.c: Remove functions which are not exported from libc.so.
1998 2002-11-14  Roland McGrath  <roland@redhat.com>
2000         * libc-tsd.c: New file.
2001         * Makefile (distribute): Add it.
2002         (libc-link.so): New variable.
2003         ($(objpfx)libpthread.so): Depend on that instead of libc.so file name.
2004         (libc-ok-for-link): New variable.
2005         [$(versioning) = yes]: Include $(common-objpfx)tls.make and define
2006         libc-ok-for-link to $(use-thread).
2007         [$(libc-ok-for-link) = no]
2008         (libc-link.so): Set to $(objpfx)libc.so, not $(common-objpfx)libc.so.
2009         ($(objpfx)libc_pic_lite.a,$(objpfx)libc_pic_lite.os, $(objpfx)libc.so):
2010         New targets.
2011         (generated): Append them.
2012         (extra-objs): Append libc-tsd.os.
2014         * libc-tls-loc.c: New file.
2015         * Makefile (libpthread-routines): Add it.
2017 2002-11-14  Andreas Schwab  <schwab@suse.de>
2019         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Fix unterminated
2020         string.
2022 2002-11-13  Roland McGrath  <roland@redhat.com>
2024         * Examples/ex6.c (main): Improve error reporting.
2026 2002-11-04  Ulrich Drepper  <drepper@redhat.com>
2028         * sysdeps/i386/Makefile: Compile pthread.c and sighandler.c with
2029         -fno-omit-frame-pointer.  Patch by Andreas Steinmetz <ast@domdv.de>.
2031         * sysdeps/i386/useldt.h [PIC] (USETLS_LOAD_EBX): Use correct input
2032         register number.
2033         (DO_SET_THREAD_AREA): Mark asm output specifiers correctly.
2035 2002-10-22  Jakub Jelinek  <jakub@redhat.com>
2037         * manager.c (pthread_start_thread): Call __uselocale even
2038         if [! SHARED].  Patch by Leon Kanter <leon@geon.donetsk.ua>.
2040 2002-10-17  Roland McGrath  <roland@redhat.com>
2042         * Makefile (unload): Don't link in libpthread.so.
2043         ($(objpfx)unload.out): Do depend on it.
2044         * unload.c (main): Improve error reporting.
2046 2002-10-09  Roland McGrath  <roland@redhat.com>
2048         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
2049         Under [__PIC__], call the function via the pointer fetched for
2050         comparison rather than a call by name that uses the PLT.
2051         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
2052         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
2053         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
2054         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
2055         (__libc_key_create, __libc_getspecific, __libc_setspecific)
2056         (__libc_atfork): Use it.
2058         * pthread.c [SHARED] (__libc_dl_error_tsd): New function.
2059         (pthread_initialize) [SHARED]: Set _dl_error_catch_tsd to that.
2060         * Versions (libc: GLIBC_PRIVATE): Add __libc_dl_error_tsd.
2061         (ld: GLIBC_PRIVATE): Set removed.
2063 2002-10-11  Ulrich Drepper  <drepper@redhat.com>
2065         * sysdeps/unix/sysv/linux/execve.c: New file.
2067 2002-10-09  Jakub Jelinek  <jakub@redhat.com>
2069         * no-tsd.c: Include stdlib.h.
2071 2002-10-07  Jakub Jelinek  <jakub@redhat.com>
2073         * sysdeps/unix/sysv/linux/allocalim.h: New file.
2074         * descr.h (struct _pthread_descr_struct): Add p_alloca_cutoff
2075         field.
2076         * manager.c (__pthread_allocate_stack): Add out_stacksize argument.
2077         Pass stack size to caller.
2078         (pthread_handle_create): Set p_alloca_cutoff.
2079         * pthread.c (__pthread_initial_thread): Use C99 designated
2080         initializers.  Set p_alloca_cutoff.
2081         (__pthread_manager_thread): Likewise.
2082         (__pthread_initialize_minimal) [USE_TLS]: Set p_alloca_cutoff
2083         for initial thread.
2084         (__pthread_init_max_stacksize): Possibly decrease p_alloca_cutoff
2085         for initial thread.
2086         (__pthread_initialize_manager) [USE_TLS]: Set p_alloca_cutoff
2087         for manager thread.
2088         * specific.c (__libc_alloca_cutoff): New function.
2089         * no-tsd.c (__libc_alloca_cutoff): New function.
2090         * Versions: Export __libc_alloca_cutoff@@GLIBC_PRIVATE from libc
2091         and libpthread.
2093 2002-10-02  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2095         * sysdeps/sh/pt-machine.h: Make C code ifndef'ed with __ASSEMBLER__.
2096         * sysdeps/sh/tls.h: Likewise.
2097         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
2099 2002-09-29  Jakub Jelinek  <jakub@redhat.com>
2101         * sysdeps/pthread/tst-timer.c (main): Clear
2102         SIGEV2.sigev_notify_attributes.
2104 2002-09-29  Ulrich Drepper  <drepper@redhat.com>
2106         * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Don't use
2107         INLINE_SYSCALL for set_thread_area syscall.
2109 2002-09-28  Roland McGrath  <roland@redhat.com>
2111         * pthread.c (__pthread_reset_main_thread) [FLOATING_STACKS]:
2112         Don't call setrlimit, since we did no prior bogon we need to undo.
2114 2002-09-27  Roland McGrath  <roland@redhat.com>
2116         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Don't include <pt-machine.h>.
2118 2002-09-24  Roland McGrath  <roland@redhat.com>
2120         * sysdeps/x86_64/tls.h: New file.
2122 2002-09-23  Roland McGrath  <roland@redhat.com>
2124         * Examples/ex13.c (dump_mut): int -> size_t for counter.
2126 2002-09-18  Bruno Haible  <bruno@clisp.org>
2128         * Examples/ex10.c (thread): Fail if pthread_mutex_timedlock() returns
2129         an unexpected error code.
2131         * internals.h (__pthread_message): Add const to first parameter type.
2132         * pthread.c (__pthread_message): Likewise.
2134         * sysdeps/unix/sysv/linux/configure: Moved to ../sysdeps/pthread.
2136 2002-09-17  Roland McGrath  <roland@redhat.com>
2138         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT, TLS_DO_SET_THREAD_AREA):
2139         Set the descriptor limit to the full 4GB, so %gs:OFFSET works for any
2140         offset (positive or negative) relative to the thread struct.
2141         * sysdeps/i386/useldt.h (DO_MODIFY_LDT, DO_SET_THREAD_AREA): Likewise.
2143 2002-09-12  Jakub Jelinek  <jakub@redhat.com>
2145         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Move...
2146         * sysdeps/unix/sysv/linux/sparc/Makefile: ...here.
2147         Replace /usr/lib/crt[in].o with crt[in].o too.
2149 2002-09-11  Steven Munroe  <sjmunroe@us.ibm.com>
2151         * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
2153 2002-09-04  Bruno Haible  <bruno@clisp.org>
2155         * pthread.c: Include <sys/time.h>.
2156         (is_smp_system): Move to sysdeps/unix/sysv/linux/smp.h.
2157         * sysdeps/unix/sysv/linux/smp.h: New file, extracted from pthread.c.
2158         * Makefile (distribute): Add smp.h to the list.
2160 2002-09-04  Bruno Haible  <bruno@clisp.org>
2162         * sysdeps/alpha/pt-machine.h: Choose different include file location
2163         on non-Linux platforms.
2165         * wrapsyscall.c (PROMOTE_INTEGRAL_TYPE): New macro.
2166         (open, open64): Change va_arg argument type to the integral type to
2167         which mode_t promotes.
2169         * sysdeps/pthread/tst-timer.c (main): Don't assume anything about
2170         the structure of 'struct sigevent'.
2172         * errno.c (__errno_location, __h_errno_location, __res_state):
2173         Use prototype function definitions.
2175 2002-07-29  Steven Munroe  <sjmunroe@us.ibm.com>
2177         * shlib-versions: Set libpthread version to 2.3 for powerpc64.
2178         * sysdeps/powerpc/pt-machine.h: moved to...
2179         * sysdeps/powerpc/powerpc32/pt-machine.h: ...here
2180         * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
2182 2002-09-02  Roland McGrath  <roland@redhat.com>
2184         * sysdeps/powerpc/Makefile (CFLAGS-pt-initfini.s): New variable.
2186 2002-09-01  Roland McGrath  <roland@redhat.com>
2188         * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t): Add new keys
2189         CTYPE_B, CTYPE_TOLOWER, CTYPE_TOUPPER.
2191         * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_address): New macro.
2192         (__libc_internal_tsd_address): Declare it.
2193         * Versions (libc, ld, libpthread: GLIBC_PRIVATE): Add
2194         __libc_internal_tsd_address.
2195         * specific.c (libc_internal_tsd_address): New function.
2196         (__libc_internal_tsd_address): New variable.
2197         * no-tsd.c (__libc_internal_tsd_address): New variable.
2199 2002-08-31  Ulrich Drepper  <drepper@redhat.com>
2201         * Makefile: Don't use rule for crt%.o, spell it out as rules for
2202         crti.o and crtn.o.
2204 2002-08-30  Roland McGrath  <roland@redhat.com>
2206         * Makefile (extra-objs, omit-deps): Add crtn.
2207         ($(objpfx)libpthread.so): Depend on $(objpfx)crtn.o.
2208         ($(objpfx)libpthread.so: +postinit): Append $(objpfx)crtn.o.
2209         ($(objpfx)crtn.S): New target.
2210         ($(objpfx)crt%.o): Pattern rule replaces crti.o target.
2211         (generated): Add crtn.S.
2213         * sysdeps/unix/sysv/linux/x86_64/Makefile ($(objpfx)specs): Massage
2214         crtn.o pathname too.
2216 2002-08-30  Jakub Jelinek  <jakub@redhat.com>
2218         * pthread.c (__pthread_initialize_minimal): Call __uselocale even
2219         if [! SHARED].
2221 2002-08-30  Roland McGrath  <roland@redhat.com>
2223         * tst-static-locale.c: New file.
2224         * Makefile (tests, tests-static): Add it.
2226 2002-04-24  Steven Munroe  <sjmunroe@us.ibm.com>
2228         * spinlock.c (__pthread_lock): Fix spurious wakeup
2229         handling.  Don't clear lowest bit of list pointer as sign the thread
2230         is still on the wait list.  Don't restart after spurious wakeup
2231         with spinning to get the lock.
2232         (__pthread_unlock): Take set lowest bit into account when handling
2233         pointer to list elements.
2234         Patch by Steve Munroe <sjmunroe@us.ibm.com>.
2236 2002-08-28  Roland McGrath  <roland@redhat.com>
2238         * sysdeps/pthread/timer_routines.c (thread_func): Fix type in cast.
2240 2002-08-28  Jakub Jelinek  <jakub@redhat.com>
2242         * sysdeps/unix/sysv/linux/hppa/aio_cancel.c: New file.
2243         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
2244         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
2246 2002-08-28  Ulrich Drepper  <drepper@redhat.com>
2248         * sysdeps/pthread/timer_routines.c (thread_func): Change return
2249         type to void and add casts in use to avoid warnings with all gcc
2250         versions.
2252 2002-08-08  Jakub Jelinek  <jakub@redhat.com>
2254         * sysdeps/unix/sysv/linux/bits/local_lim.h (PTHREAD_THREADS_MAX):
2255         Bump to 16384.
2256         * manager.c (__pthread_handles): Remove.
2257         * pthandles.c: New file.
2258         * pthread.c (__pthread_initialize_minimal): Initialize
2259         __pthread_handles[0] and __pthread_handles[1].
2260         * Makefile (libpthread-routines): Add pthandles (must be last).
2262 2002-08-26  Brian Youmans  <3diff@gnu.org>
2264         * Examples/ex10.c: Corrected version number in Lesser GPL copying
2265         permission notice from 2 to 2.1.
2266         * Examples/ex11.c: Likewise.
2267         * Examples/ex13.c: Likewise.
2268         * Examples/ex8.c: Likewise.
2269         * Examples/ex9.c: Likewise.
2270         * barrier.c: Likewise.
2271         * events.c: Likewise.
2272         * lockfile.c: Likewise.
2273         * no-tsd.c: Likewise.
2274         * pt-machine.c: Likewise.
2275         * ptclock_gettime.c: Likewise.
2276         * ptclock_settime.c: Likewise.
2277         * rwlock.c: Likewise.
2278         * sysdeps/alpha/pspinlock.c: Likewise.
2279         * sysdeps/alpha/pt-machine.h: Likewise.
2280         * sysdeps/arm/pspinlock.c: Likewise.
2281         * sysdeps/arm/pt-machine.h: Likewise.
2282         * sysdeps/cris/pspinlock.c: Likewise.
2283         * sysdeps/cris/pt-machine.h: Likewise.
2284         * sysdeps/hppa/pspinlock.c: Likewise.
2285         * sysdeps/hppa/pt-machine.h: Likewise.
2286         * sysdeps/i386/i686/pt-machine.h: Likewise.
2287         * sysdeps/i386/pspinlock.c: Likewise.
2288         * sysdeps/i386/pt-machine.h: Likewise.
2289         * sysdeps/i386/useldt.h: Likewise.
2290         * sysdeps/ia64/pspinlock.c: Likewise.
2291         * sysdeps/ia64/pt-machine.h: Likewise.
2292         * sysdeps/m68k/pspinlock.c: Likewise.
2293         * sysdeps/m68k/pt-machine.h: Likewise.
2294         * sysdeps/mips/pspinlock.c: Likewise.
2295         * sysdeps/mips/pt-machine.h: Likewise.
2296         * sysdeps/powerpc/pspinlock.c: Likewise.
2297         * sysdeps/powerpc/pt-machine.h: Likewise.
2298         * sysdeps/pthread/bits/initspin.h: Likewise.
2299         * sysdeps/pthread/bits/libc-lock.h: Likewise.
2300         * sysdeps/pthread/bits/libc-tsd.h: Likewise.
2301         * sysdeps/pthread/getcpuclockid.c: Likewise.
2302         * sysdeps/pthread/posix-timer.h: Likewise.
2303         * sysdeps/pthread/timer_create.c: Likewise.
2304         * sysdeps/pthread/timer_delete.c: Likewise.
2305         * sysdeps/pthread/timer_getoverr.c: Likewise.
2306         * sysdeps/pthread/timer_gettime.c: Likewise.
2307         * sysdeps/pthread/timer_routines.c: Likewise.
2308         * sysdeps/pthread/timer_settime.c: Likewise.
2309         * sysdeps/pthread/tst-timer.c: Likewise.
2310         * sysdeps/s390/pspinlock.c: Likewise.
2311         * sysdeps/s390/s390-32/pt-machine.h: Likewise.
2312         * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2313         * sysdeps/sh/pspinlock.c: Likewise.
2314         * sysdeps/sh/pt-machine.h: Likewise.
2315         * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
2316         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2317         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
2318         * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
2319         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2320         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
2321         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
2322         * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
2323         * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
2324         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2325         * tststack.c: Likewise.
2326         * unload.c: Likewise.
2327         * weaks.c: Likewise.
2328         * wrapsyscall.c: Likewise.
2330         * sysdeps/pthread/pt-initfini.c: Changed copying
2331         permission notice to Lesser GPL from Library GPL, including the
2332         references in the special exception.
2333         * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Likewise.
2334         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Likewise.
2335         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c:
2336         Likewise.
2337         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c:
2338         Likewise.
2339         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Likewise.
2341 2002-08-26  Ulrich Drepper  <drepper@redhat.com>
2343         * Examples/ex10.c (thread): tv_nsec == 1000000000 is already
2344         overflow [PR libc/4244].
2346 2002-08-25  Ulrich Drepper  <drepper@redhat.com>
2348         * sysdeps/pthread/timer_routines.c (thread_func): Make the
2349         compiler happy by adding a return statement which will never be
2350         reached.
2352         * tst-context.c (main): Cast to long before casting to pointer.
2354         * Examples/ex17.c (main): Use correct format string.
2356         * Examples/ex9.c (thread): Remove incorrect return statement.
2358 2002-08-23  Ulrich Drepper  <drepper@redhat.com>
2360         * pthread.c (__linuxthreads_version): New global constant.
2362 2002-08-23  Andreas Jaeger  <aj@suse.de>
2364         * sysdeps/x86_64/pt-machine.h: Use %fs instead of %gs
2365         as thread specific register.
2366         (testandset): Fix inline asm.
2367         (THREAD_GETMEM): Fix inline asm.
2369 2002-08-22  Roland McGrath  <roland@redhat.com>
2371         * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Remove [HAVE_TLS_SUPPORT]
2372         conditional.
2373         (INIT_THREAD_SELF): Pass second arg to DO_SET_THREAD_AREA.
2374         (DO_SET_THREAD_AREA): Take second arg, pass to DO_SET_THREAD_AREA_REUSE
2375         macro.  That chooses whether to reuse %gs value or let kernel set it.
2376         [USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, always 1.
2377         [!USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, true if arg is
2378         not constant 0.
2380 2002-08-21  Ulrich Drepper  <drepper@redhat.com>
2382         * sysdeps/i386/tls.h (TLS_SETUP_GS_SEGMENT): Add new parameter
2383         also to the third definition of this macro.
2385 2002-06-17  Andreas Jaeger  <aj@suse.de>
2387         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
2388         Set it.
2390 2002-08-20  Ulrich Drepper  <drepper@redhat.com>
2392         * sysdeps/i386/useldt.h: Go back to using 16-bit instructions when
2393         loading/reading segment registers.  Some old hardware doesn't
2394         handle the 32-bit instructions as expected.
2395         * sysdeps/i386/tls.h: Likewise.
2397         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Second parameter is
2398         renamed to secondcall and use is negated.
2399         (TLS_SETUP_GS_SEGMENT): Likewise.
2400         (TLS_INIT_TP): Likewise.
2401         * sysdeps/sh/tls.h (TLS_INIT_TP): Second parameter is renamed to
2402         secondcall.
2404         * sysdeps/i386/tls.h: Use 32-bit operations when handling segment
2405         registers.  No need to mask upper 16 bits in this case.
2406         * sysdeps/i386/useldt.h: Likewise.
2407         (DO_SET_THREAD_AREA): We have to load %gs again even if the value
2408         is the same since the GDT content changed.
2410         * sysdeps/i386/tls.h (TLS_INIT_TP): Add new parameter and pass it on
2411         to TLS_SETUP_GS_SEGMENT.
2412         (TLS_SETUP_GS_SEGMENT): Add new parameter and pass it on to
2413         TLS_DO_SET_THREAD_AREA.
2414         (TLS_DO_SET_THREAD_AREA): If new parameter is zero determine
2415         entry number from %gs value.
2416         * sysdeps/sh/tls.h (TLS_INIT_TP): Add new parameter and simply
2417         ignore it.
2419         * manager.c (pthread_handle_create): Pass NULL to _dl_allocate_tls.
2420         Pass true to _dl_deallocate_tls.
2421         (pthread_free): Likewise.
2422         * pthread.c (__pthread_initialize_manager): Likewise.
2424 2002-08-19  Ulrich Drepper  <drepper@redhat.com>
2426         * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Use correct shift when
2427         computing index from %gs value.
2429 2002-08-16  Roland McGrath  <roland@redhat.com>
2431         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Calculate segment
2432         register value from entry number properly.
2434         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Rewrite asm to use %ebx
2435         optimally conditional on [__PIC__].
2436         (TLS_DO_SET_THREAD_AREA): New macro, implement inline syscall
2437         without touching errno, and use latest modify_ldt-like interface.
2438         (TLS_SETUP_GS_SEGMENT): Use that instead of INLINE_SYSCALL.
2439         * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Set %gs in this macro.
2440         (DO_SET_THREAD_AREA): New macro, uses current syscall interface with
2441         existing %gs value as the segment to set.
2442         (INIT_THREAD_SELF): Rewritten using those.  Use set_thread_area only
2443         under [HAVE_TLS_SUPPORT] so we can rely on the initialization done
2444         by the first thread's early TLS setup.
2446 2002-08-15  Roland McGrath  <roland@redhat.com>
2448         * sysdeps/i386/tls.h (TLS_INIT_TP): Use statement expression and
2449         return a value as callers now expect.
2451 2002-08-11  Roland McGrath  <roland@redhat.com>
2453         * pthread.c (__pthread_initialize_manager): Initialize
2454         p_header.data.tcb field of manager thread's descriptor.
2455         (__pthread_initialize_minimal): Don't initialize p_header.data.self
2456         field, already done by TLS_INIT_TP.
2458         * manager.c (pthread_handle_create): Move p_header field initializers
2459         together.
2461 2002-08-08  Ulrich Drepper  <drepper@redhat.com>
2463         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Removed.
2465 2002-08-07  Ulrich Drepper  <drepper@redhat.com>
2467         * pthread.c (__linuxthreads_initial_report_events): New variable.
2468         (__pthread_initialize_manager): Use it to initialize p_report_events
2469         of initial thread.
2470         [TLS]: Store pointer to descriptor of manager in __pthread_handles.
2472 2002-08-07  Roland McGrath  <roland@redhat.com>
2474         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Add an extra argument with
2475         an "m" constraint to the asm so the compiler knows LDT_ENTRY was used.
2477 2002-08-02  Roland McGrath  <roland@redhat.com>
2479         * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t):
2480         Add _LIBC_TSD_KEY_LOCALE.
2481         * manager.c (pthread_start_thread) [!(USE_TLS && HAVE___THREAD)]:
2482         Call __uselocale to initialize our per-thread locale pointer to
2483         the global one.
2484         * pthread.c (__pthread_initialize_minimal): Likewise.
2486         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Add missing \s.
2488 2002-08-02  Ulrich Drepper  <drepper@redhat.com>
2490         * pthread.c: Declare _errno, _h_errno, and _res unless we use TLS
2491         internally.
2493         * cancel.c (__pthread_perform_cleanup) [USE_TLS && HAVE___THREAD]:
2494         Don't use p_libc_specific element in thread descriptor.
2496 2002-07-30  Roland McGrath  <roland@redhat.com>
2498         * sysdeps/pthread/bits/libc-tsd.h: Include <tls.h>.
2499         [USE_TLS && HAVE___THREAD]: Just include the sysdeps/generic file,
2500         which does the right thing when __thread support is available.
2501         * descr.h (struct _pthread_descr_struct) [USE_TLS && HAVE___THREAD]:
2502         Omit `p_libc_specific', `p_errnop', `p_errno', `p_h_errnop',
2503         `p_h_errno', `p_resp', and `p_res' members.
2504         * pthread.c (__pthread_initialize_minimal) [USE_TLS && HAVE___THREAD]:
2505         Don't initialize `p_errnop' and `p_h_errnop' members.
2506         (__pthread_reset_main_thread): Likewise.
2507         (__pthread_initialize_manager): Likewise.
2508         * manager.c (__pthread_manager, pthread_handle_create): Likewise.
2509         * pthread.c (pthread_initialize) [USE_TLS && HAVE___THREAD]:
2510         Don't initialize `p_resp' member.
2511         (__pthread_reset_main_thread): Likewise.
2512         * manager.c (pthread_handle_create): Likewise.
2513         * specific.c (libc_internal_tsd_set, libc_internal_tsd_get):
2514         Conditionalize these on [!(USE_TLS && HAVE___THREAD)].
2515         * no-tsd.c: Conditionalize contents on [!(USE_TLS && HAVE___THREAD)].
2516         * errno.c [USE_TLS && HAVE___THREAD]
2517         (__h_errno_location, __res_state): Don't define these at all.
2519         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens around arguments!
2520         (INSTALL_NEW_DTV, GET_DTV): Likewise.
2521         * sysdeps/sh/tls.h (INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV): Likewise.
2523         * weaks.c: Don't include <errno.h> here.
2525 2002-08-01  Roland McGrath  <roland@redhat.com>
2527         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): New macro, broken out of
2528         TLS_INIT_TP.
2529         (TLS_DO_SET_THREAD_AREA): New macro, uses thread_set_area syscall.
2530         (TLS_SETUP_GS_SEGMENT): New macro, try one or the other or both.
2531         (TLS_INIT_TP): Use that.
2533 2002-08-02  Jakub Jelinek  <jakub@redhat.com>
2535         * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Move from INIT_THREAD_SELF.
2536         (INIT_THREAD_SELF): Use sys_thread_area syscall instead if available.
2537         (FREE_THREAD): Avoid modify_ldt if using GDT.
2538         * sysdeps/i386/pspinlock.c (__have_no_set_thread_area): New variable.
2540 2002-07-25  Jakub Jelinek  <jakub@redhat.com>
2542         * sysdeps/i386/tls.h: Use __ASSEMBLER__ test macro not ASSEMBLER.
2543         * sysdeps/i386/pt-machine.h: Likewise.
2544         * sysdeps/i386/useldt.h: Likewise.
2546 2002-07-22  Ulrich Drepper  <drepper@redhat.com>
2548         * pthread.c (__pthread_initialize_minimal): If !SHARED and TLS
2549         call __libc_setup_tls first.
2550         * Makefile: Actually create tst-signal.out file when running the test.
2551         (tests): Add tststatic.
2552         * Examples/tststatic.c: New file.
2554 2002-07-19  Ulrich Drepper  <drepper@redhat.com>
2556         * errno.c (__errno_location): Don't define unless !USE_TLS
2557         || !HAVE___THREAD.
2558         * sysdeps/i386/pt-machine.c: Protect C code with #ifndef ASSEMBLER.
2559         * sysdeps/i386/tls.h: Likewise.
2560         * sysdeps/i386/useldt.h: Likewise.
2561         * sysdeps/i386/i686/pt-machine.h: Likewise.
2563 2002-07-02  H.J. Lu  <hjl@gnu.org>
2565         * sysdeps/mips/pspinlock.c: Don't include <sgidefs.h>.  Always
2566         use ll/sc.
2567         * sysdeps/mips/pt-machine.h: Likewise.
2569 2002-07-14  Ulrich Drepper  <drepper@redhat.com>
2571         * manager.c (pthread_handle_create): Initialize self-reference in
2572         descriptor.
2574 2002-07-01  Jakub Jelinek  <jakub@redhat.com>
2576         * Examples/ex9.c (main): Remove unused th variable.
2578 2002-07-10  Ulrich Drepper  <drepper@redhat.com>
2580         * wrapsyscall.c: Add __nanosleep alias.
2581         * Versions (GLIBC_2.2.6): Add __nanosleep.
2582         * bug-sleep.c: New file.
2583         * Makefile (tests): Add bug-sleep.
2585 2002-06-19  Steven Munroe  <sjmunroe@vnet.ibm.com>
2587         * Examples/ex9.c (main):  Use list of children and join them.
2588         (thread): Do not call exit.
2590 2002-06-20  Ulrich Drepper  <drepper@redhat.com>
2592         * spinlock.c (wait_node_alloc): We cannot use compare-and-exchange.
2593         Unconditionally use the code using spinlock.  Use __pthread_release
2594         to free a spinlock.
2595         (wait_node_free): Likewise.
2596         (__pthread_acquire, __pthread_release): Unconditionally define.
2598 2002-06-07  Jakub Jelinek  <jakub@redhat.com>
2600         * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Fix typo.
2602 2002-05-24  Ulrich Drepper  <drepper@redhat.com>
2604         * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Use __sync_synchronize.
2606 2002-05-21  Ulrich Drepper  <drepper@redhat.com>
2608         * sysdeps/pthread/pthread.h (pthread_create): Rename first
2609         parameter.
2610         (pthread_cancel): Likewise.
2611         * internals.h (__pthread_create_2_1): Likewise.
2612         * sysdeps/unix/sysv/linux/bits/sigthread.h (pthread_kill): Likewise.
2614 2002-05-20  Ulrich Drepper  <drepper@redhat.com>
2616         * sysdeps/alpha/pt-machine.c (THREAD_SELF): Remove clobber.
2617         Patch by Glen Nakamura <gen@flex.com>.
2619 2002-05-03  Ulrich Drepper  <drepper@redhat.com>
2621         * signals.c: Move sighandler functions to...
2622         * sighandler.c: ...here.  New file.
2623         * signals.c: Move signal handler related type definitions to...
2624         * internals.h: ...here.  Add prototypes for signal handlers.
2625         * Makefile (libpthread-routines): Add sighandler.
2626         (CFLAGS-sighandler.c): Add $(exceptions).
2628 2002-04-30  Jakub Jelinek  <jakub@redhat.com>
2630         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
2632 2002-04-08  Ulrich Drepper  <drepper@redhat.com>
2634         * sysdeps/pthread/timer_getoverr.c: Return real overrun.
2635         * sysdeps/pthread/posix-timer.h (struct timer_node): Add overrun_count.
2636         * sysdeps/pthread/timer_routines.c (thread_func): Schedule next timeout
2637         based on previous one and not on current time.  Count overruns.
2638         Patch by Eric F. Sorton <eric@cctcorp.com>.
2640         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add DELAYTIMER_MAX.
2642 2002-04-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
2644         * sysdeps/sh/pt-machine.h: Define _PT_MACHINE_H
2645         if it isn't defined yet.
2646         (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Defined.
2647         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
2648         Likewise.
2649         * sysdeps/sh/tls.h: New file.
2651 2002-04-08  Jakub Jelinek  <jakub@redhat.com>
2653         * manager.c (__pthread_manager_event): Use self instead of arg
2654         for INIT_THREAD_SELF.
2655         * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Use sizeof (struct
2656         _pthread_descr_struct) instead of sizeof (*descr).
2658 2002-04-05  Ulrich Drepper  <drepper@redhat.com>
2660         * sysdeps/ia64/pt-machine.h: Protect against multiple inclusion.
2661         * sysdeps/alpha/pt-machine.h: Likewise.
2662         * sysdeps/arm/pt-machine.h: Likewise.
2663         * sysdeps/cris/pt-machine.h: Likewise.
2664         * sysdeps/hppa/pt-machine.h: Likewise.
2665         * sysdeps/m68k/pt-machine.h: Likewise.
2666         * sysdeps/mips/pt-machine.h: Likewise.
2667         * sysdeps/powerpc/pt-machine.h: Likewise.
2668         * sysdeps/s390/s390-32/pt-machine.h: Likewise.
2669         * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2670         * sysdeps/sh/pt-machine.h: Likewise.
2671         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2672         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2673         * sysdeps/x86_64/pt-machine.h: Likewise.
2675 2002-04-05  Jakub Jelinek  <jakub@redhat.com>
2677         * man/pthread_mutexattr_init.man (pthread_mutexattr_settype): Document
2678         instead of pthread_mutexattr_setkind_np.
2679         (pthread_mutexattr_gettype): Similarly.
2680         * man/pthread_mutexattr_setkind_np.man: New.
2681         * man/Makefile (SOURCES): Add pthread_mutexattr_setkind_np.man.
2683 2002-04-02  Ulrich Drepper  <drepper@redhat.com>
2685         * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Define.
2687 2002-03-22  Jakub Jelinek  <jakub@redhat.com>
2689         * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Remove.
2691 2002-03-22  Ulrich Drepper  <drepper@redhat.com>
2693         * internals.h (MEMORY_BARRIER): Define as asm with memory as clobber.
2695 2002-03-17  Andreas Jaeger  <aj@suse.de>
2697         * sysdeps/i386/pt-machine.h: Add testandset and __compare_and_swap
2698         prototpyes.
2699         * sysdeps/alpha/pt-machine.h: Likewise.
2700         * sysdeps/arm/pt-machine.h: Likewise.
2701         * sysdeps/cris/pt-machine.h: Likewise.
2702         * sysdeps/hppa/pt-machine.h: Likewise.
2703         * sysdeps/i386/i686/pt-machine.h: Likewise.
2704         * sysdeps/ia64/pt-machine.h: Likewise.
2705         * sysdeps/m68k/pt-machine.h: Likewise.
2706         * sysdeps/mips/pt-machine.h: Likewise.
2707         * sysdeps/powerpc/pt-machine.h: Likewise.
2708         * sysdeps/s390/s390-32/pt-machine.h: Likewise.
2709         * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2710         * sysdeps/sh/pt-machine.h: Likewise.
2711         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2712         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2713         * sysdeps/x86_64/pt-machine.h: Likewise.
2715         * internals.h: Move testandset and __compare_and_swap prototypes
2716         to pt-machine.h.
2718 2002-03-03  Andreas Jaeger  <aj@suse.de>
2720         * errno.c: Include resolv.h to avoid warning.
2722 2002-02-27  Ulrich Drepper  <drepper@redhat.com>
2724         * pthread.c [USE_TLS] (thread_self_stack): Correct check for upper
2725         stack limit.
2727 2002-02-23  Ulrich Drepper  <drepper@redhat.com>
2729         * attr.c (pthread_getattr_np): Don't take thread descriptor size
2730         into account if USE_TLS.
2731         * manager.c (pthread_handle_create): Free TLS data structures if call
2732         failed.  Pass correct stack to clone if USE_TLS.
2733         * sysdeps/i386/pt-machine.h: Handle multiple inclusion.
2734         * sysdeps/i386/i686/pt-machine.h: Likewise.
2735         * sysdeps/i386/tls.h: Unconditionally include <pt-machine.h>.
2737         * descr.h (struct _pthread_descr_struct): Update p_header for TLS.
2738         Add p_stackaddr element #if USE_TLS.
2739         * internals.c: Include <tls.h>.
2740         * manager.c: Integrate creating and handling of thread descriptor
2741         for TLS.
2742         * pthread.c: Likewise.
2743         * sysdeps/i386/tls.h (tcbhead_t): Add self pointer.
2744         Include <linuxthreads/descr.h> only if TLS is really used.
2745         (GET_DTV): New macro.
2746         (TLS_INIT_TP): Initialize self pointer.
2748 2002-02-17  Andreas Schwab  <schwab@suse.de>
2750         * signals.c (sigwait): Check for old sighandler being SIG_ERR,
2751         not NULL.
2753 2002-02-12  Ulrich Drepper  <drepper@redhat.com>
2755         * sysdeps/i386/tls.c (INSTALL_NEW_DTV): Define.
2756         (INSTALL_DTV): Adjust for being passed pointer to element with length.
2758 2002-02-08  Ulrich Drepper  <drepper@redhat.com>
2760         * sysdeps/i386/tls.h (TLS_INIT_TP): Also initialize %gs.
2762 2002-02-08  Richard Henderson  <rth@redhat.com>
2764         * sysdeps/alpha/elf/pt-initfini.c: Use \n\ for multiline string.
2766 2002-02-08  Ulrich Drepper  <drepper@redhat.com>
2768         * sysdeps/i386/tls.h: TLS cannot be supported with FLOATING_STACKS
2769         after all.
2771 2002-02-07  H.J. Lu  <hjl@gnu.org>
2773         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Silence the
2774         gcc warning.
2775         (__pthread_spin_lock): Remove ".set noreorder".
2776         * sysdeps/mips/pt-machine.h (__compare_and_swap): Liekwise.
2778 2002-02-05  H.J. Lu  <hjl@gnu.org>
2780         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Not use
2781         branch likely.
2782         * sysdeps/mips/pt-machine.h (testandset): Likewise.
2783         (__compare_and_swap): Likewise.
2785 2002-02-07  Ulrich Drepper  <drepper@redhat.com>
2787         * internals.h: Move declarations/definitions of
2788         __pthread_initial_thread_bos, __pthread_initial_thread,
2789         __pthread_manager_thread_bos, __pthread_manager_thread_tos,
2790         __pthread_manager_thread, __pthread_nonstandard_stacks, STACK_SIZE,
2791         CURRENT_STACK_FRAME, __pthread_find_self, and thread_self...
2792         * descr.h: ...here.
2793         * sysdeps/i386/tls.h: Add TLS definitions also for !FLOATING_STACKS.
2794         Define THREAD_GETMEM accordingly.
2796 2002-02-06  Ulrich Drepper  <drepper@redhat.com>
2798         * sysdeps/i386/tls.h: Include <stddef.h> for size_t.
2800         * sysdeps/i386/tls.h: Define THREAD_DTV.
2802 2002-02-04  Ulrich Drepper  <drepper@redhat.com>
2804         * internals.h: Move thread descriptor definition...
2805         * descr.h.: ...here.  New file.
2806         * sysdeps/i386/tls.h: New file.
2808 2002-02-01  H.J. Lu  <hjl@gnu.org>
2810         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Use a
2811         different register in the delayed slot.  Use branch likely.
2813         * sysdeps/mips/pt-machine.h (testandset): Call _test_and_set.
2814         (__compare_and_swap): Return 0 only when failed to compare. Use
2815         branch likely.
2817 2002-02-01  Jakub Jelinek  <jakub@redhat.com>
2819         * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set,
2820         __pthread_kill_other_threads_np): Move to GLIBC_PRIVATE.
2821         * sysdeps/i386/i586/Versions: Move all symbols to GLIBC_PRIVATE.
2822         * sysdeps/i386/i686/Versions: Move all symbols to GLIBC_PRIVATE.
2823         * sysdeps/sparc/sparc32/sparcv9/Versions: New file.
2824         * sysdeps/sparc/sparc64/Versions: New file.
2825         * sysdeps/ia64/Versions: Move all symbols to GLIBC_PRIVATE.
2827 2002-01-31  Ulrich Drepper  <drepper@redhat.com>
2829         * pthread.c: _dl_cpuclock_offset is not any longer a global variable
2830         in SHARED code, use GL(dl_cpuclock_offset).
2832 2002-01-28  Andreas Jaeger  <aj@suse.de>
2834         * sysdeps/mips/pspinlock.c (__pthread_spin_init): Clear *LOCK to
2835         0. Patch by Machida Hiroyuki <machida@sm.sony.co.jp>.
2837 2002-01-16  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2839         * sysdeps/s390/s390-32/pt-machine.h (MEMORY_BARRIER): Define.
2840         (CURRENT_STACK_FRAME): Remove duplicate definition.
2841         * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2843 2002-01-14  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2845         * Makefile (CFLAGS-tst-cancel.c): Add -fno-inline-functions to prevent
2846         automatic inline.
2848 2002-01-12  Andreas Schwab  <schwab@suse.de>
2850         * Makefile (test-srcs): Add tst-signal.
2851         (tests): Run tst-signal.
2852         (distribute): Add tst-signal.sh.
2853         * tst-signal.c, tst-signal.sh: New files.
2855 2002-01-14  Andreas Jaeger  <aj@suse.de>
2857         * sysdeps/x86_64/pt-machine.h (INIT_THREAD_SELF): Avoid warning.
2859 2002-01-11  Andreas Schwab  <schwab@suse.de>
2861         * signals.c (sighandler): Initialize all elements to SIG_ERR.
2862         (__sigaction): Don't use value from sighandler if it is SIG_ERR.
2864 2002-01-06  Richard Henderson  <rth@redhat.com>
2866         * sysdeps/alpha/elf/pt-initfini.c: New file.
2868 2001-12-29  Andreas Jaeger  <aj@suse.de>
2870         * Examples/ex9.c: Add noreturn attribute for thread.
2871         * Examples/ex10.c: Likewise.
2872         * Examples/ex13.c (thread_start): Likewise.
2873         * Examples/ex15.c (worker): Likewise.
2875         * Examples/ex18.c: Include unistd.h for prototype of sleep.
2877 2001-12-14  Ulrich Drepper  <drepper@redhat.com>
2879         * man/pthread_atfork.man: Adjust description of mutex handling
2880         after fork for current implementation.
2881         * linuxthreads.texi: Likewise [PR libc/2519].
2883 2001-12-13  Andreas Schwab  <schwab@suse.de>
2885         * specific.c (pthread_key_delete): Don't contact the thread
2886         manager if no threads have been created yet.
2888 2001-12-12  NIIBE Yutaka  <gniibe@m17n.org>
2890         * sysdeps/sh/pt-machine.h (INIT_THREAD_SELF): Added __volatile__
2891         qualifier to be safe.
2893 2001-11-30  Andreas Schwab  <schwab@suse.de>
2895         * pthread.c (pthread_handle_sigcancel) [THREAD_SELF]: Double check
2896         that self is the manager thread, and initialize the thread
2897         register if not.
2898         (thread_self_stack) [THREAD_SELF]: New function to find self via
2899         stack pointer.
2900         * manager.c (pthread_handle_create): Don't block cancel signal any
2901         more.
2903 2001-11-29  Andreas Jaeger  <aj@suse.de>
2905         * sysdeps/x86_64/pt-machine.h: Use %gs as thread specific register.
2906         (THREAD_SELF): New.
2907         (INIT_THREAD_SELF): New.
2908         (THREAD_GETMEM): New.
2909         (THREAD_GETMEM_NC):
2910         (THREAD_SETMEM): New.
2911         (THREAD_SETMEM_NC): New.
2912         (FLOATING_STACKS): Define.
2913         (ARCH_STACK_MAX_SIZE): Define.
2915 2001-11-28  Kaz Kylheku  <kaz@ashi.footprints.net>
2917         Bugfix to pthread_key_delete. It was iterating over the thread
2918         manager's linked list of threads, behind the thread manager's
2919         back causing a race. The fix is to have the manager iterate over
2920         the threads instead, using a new request type for doing so.
2921         * internals.h (struct pthread_request): New manager request type
2922         REQ_FOR_EACH_THREAD.
2923         * manager.c (pthread_for_each_thread): New function.
2924         (__pthread_manager): Handle new REQ_FOR_EACH_THREAD request.
2925         * specific.c (struct pthread_key_delete_helper_args): New type.
2926         (pthread_key_delete_helper): New static function.
2927         (pthread_key_delete): Use the new thread manager
2928         REQ_FOR_EACH_THREAD function to iterate over the threads and set
2929         the delete key slot to a null value in each thread.
2930         * Examples/ex18.c: New test.
2931         * Makefile (tests): Add ex18.
2933 2001-11-22  Wolfram Gloger  <wg@malloc.de>
2935         * pthread.c (pthread_onexit_process): Don't call free
2936         after threads have been asynchronously terminated.
2938         * manager.c (pthread_handle_exit): Surround cancellation
2939         of threads with __flockfilelist()/__funlockfilelist().
2941 2001-11-26  Andreas Schwab  <schwab@suse.de>
2943         * manager.c (pthread_handle_create): Start the child thread with
2944         the cancel signal blocked, so that it does not handle it before
2945         the thread register is set up.  Save errno from failed clone call.
2947 2001-11-15  Ulrich Drepper  <drepper@redhat.com>
2949         * sysdeps/i386/i686/Implies: Removed.
2950         * sysdeps/i386/i686/Versions: New file.
2952 2001-10-31  Andreas Jaeger  <aj@suse.de>
2954         * sysdeps/x86_64/Makefile: Remove, we do not need it anymore.
2956 2001-10-05  Kevin Buettner  <kevinb@cygnus.com>
2958         * pthread.c (__linuxthread_pthread_sizeof_descr): Change name
2959         to __linuxthreads_pthread_sizeof_descr to match name used by
2960         symbol_list_arr[LINUXTHREADS_PTHREAD_SIZEOF_DESCR] in
2961         linuxthreads_db/td_symbol_list.c.
2963 2001-09-22  Andreas Jaeger  <aj@suse.de>
2965         * linuxthreads/tst-context.c: Avoid compile warning.
2967 2001-09-20  Andreas Jaeger  <aj@suse.de>
2969         * shlib-versions: Add x86-64.
2971 2001-09-19  Andreas Jaeger  <aj@suse.de>
2973         * sysdeps/x86_64/Makefile: New file.
2974         * sysdeps/x86_64/pspinlock.c: New file.
2975         * sysdeps/x86_64/pt-machine.h: New file.
2977 2001-09-12  Jakub Jelinek  <jakub@redhat.com>
2979         * sysdeps/pthread/timer_delete.c (timer_delete): Thread may be NULL
2980         for SIGEV_NONE.
2981         * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
2983 2001-09-11  Ulrich Drepper  <drepper@redhat.com>
2984             Wolfram Gloger <wg@malloc.de>
2986         * join.c: Protect all communications from and to manager with
2987         TEMP_FAILURE_RETRY.
2988         * manager.c: Likewise.
2989         * pthread.c: Likewise.
2990         * smeaphore.c: Likewise.
2992 2001-08-29  Ulrich Drepper  <drepper@redhat.com>
2994         * spinlock.c (__pthread_lock): Top max_count value with
2995         MAX_ADAPTIVE_SPIN_COUNT.
2996         * internals.h (MAX_ADAPTIVE_SPIN_COUNT): Define if not already done.
2998         * sysdeps/i386/i686/pt-machine.h (BUSY_WAIT_NOP): New macro to
2999         help P4.
3001 2001-08-27  Jakub Jelinek  <jakub@redhat.com>
3003         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_t): Only define to
3004         non-opaque type if __USE_UNIX98.
3006 2001-08-26  Jakub Jelinek  <jakub@redhat.com>
3008         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_t): Define
3009         non-opaque lock types also if _IO_MTSAFE_IO is defined.
3011 2001-08-23  Roland McGrath  <roland@frob.com>
3013         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start): Take
3014         new first argument, skip the cleanup handler if it's zero.
3015         (_LIBC_LOCK_RECURSIVE_INITIALIZER): New macro.
3016         (__libc_lock_define_initialized_recursive): Use it.
3017         * sysdeps/pthread/bits/stdio-lock.h: File removed.
3018         The sysdeps/generic file from the main tree now suffices.
3020 2001-08-22  Roland McGrath  <roland@frob.com>
3022         * sysdeps/pthread/bits/stdio-lock.h: Include <bits/libc-lock.h>
3023         instead of <pthread.h>.
3024         (_IO_lock_t): Define this typedef using __libc_lock_define_recursive.
3025         (_IO_lock_initializer): Add braces.
3026         (_IO_lock_lock): Use __libc_lock_lock_recursive.
3027         (_IO_lock_unlock): Use __libc_lock_unlock_recursive.
3029         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_recursive_t): New type.
3030         (__libc_lock_define_initialized_recursive): Use it.
3031         (__libc_lock_init_recursive): Likewise.
3032         (__libc_lock_fini_recursive): Likewise.
3033         (__libc_lock_lock_recursive): Likewise.
3034         (__libc_lock_trylock_recursive): Likewise.
3035         (__libc_lock_unlock_recursive): Likewise.
3036         (__libc_lock_define_recursive): New macro.
3038 2001-08-14  Jakub Jelinek  <jakub@redhat.com>
3040         * lockfile.c (__pthread_provide_lockfile): New variable.
3041         * pthread.c (__pthread_require_lockfile): New variable.
3042         * cancel.c (__pthread_require_lockfile): New variable.
3044 2001-07-31  Ulrich Drepper  <drepper@redhat.com>
3046         * tst-context.c (threadfct): Initialize context before calling
3047         makecontext.
3049         * Examples/ex17.c: Make sure test thread is around long enough.
3051 2001-07-26  kaz Kojima  <kkojima@rr.iij4u.or.jp>
3053         * sysdeps/sh/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF): Defined.
3055 2001-07-24  Ulrich Drepper  <drepper@redhat.com>
3057         * tst-context.c (main): Print explanation before bailing out
3058         because context handling is not supported.
3060 2001-07-23  Ulrich Drepper  <drepper@redhat.com>
3062         * Makefile (tests): Add tst-context.
3063         * tst-context.c: New file.
3065         * sysdeps/pthread/bits/stdio-lock.h: Define
3066         _IO_cleanup_region_start_noarg.
3068 2001-07-23  Jakub Jelinek  <jakub@redhat.com>
3070         * sysdeps/alpha/pt-machine.h (FLOATING_STACKS): Define.
3071         (ARCH_STACK_MAX_SIZE): Define.
3072         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
3073         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3075 2001-07-19  Jakub Jelinek  <jakub@redhat.com>
3077         * sysdeps/i386/useldt.h: Fix typo in ARCH_STACK_MAX_SIZE comment.
3079         * sysdeps/ia64/pt-machine.h (FLOATING_STACKS): Define.
3080         (ARCH_STACK_MAX_SIZE): Define.
3081         * manager.c (pthread_allocate_stack): Handle FLOATING_STACKS with
3082         NEED_SEPARATE_REGISTER_STACK.
3084 2001-07-16  Andreas Schwab  <schwab@suse.de>
3086         * Makefile (before-compile): Don't add $(objpfx)crti.o.
3087         (omit-deps): Add crti.
3088         ($(objpfx)libpthread.so): Depend on $(objpfx)crti.o, but make sure
3089         it is filtered out of the link command.
3091 2001-07-16  Ulrich Drepper  <drepper@redhat.com>
3093         * pthread.c (pthread_initialize): For FLOATING_STACKS don't bother
3094         to find the right value for __pthread_initial_thread_bos, it's not
3095         used.  If not FLOATING_STACKS first run
3096         __pthread_init_max_stacksize.
3098 2001-06-16  H.J. Lu  <hjl@gnu.org>
3100         * internals.h: Include <stackinfo.h>.
3102         * attr.c: Don't include <stackinfo.h> here.
3103         * cancel.c: Likewise.
3104         * manager.c: Likewise.
3105         * pthread.c: Likewise.
3106         * ptlongjmp.c: Likewise.
3108 2001-03-23  Matthew Wilcox  <willy@ldl.fc.hp.com>
3110         * attr.c: Make _STACK_GROWS_UP work.
3111         * internals.h: Likewise.
3112         * manager.c: Likewise.
3113         * pthread.c: Likewise.
3115 2001-06-15  H.J. Lu  <hjl@gnu.org>
3117         * pthread.c (__pthread_reset_main_thread): Fix a typo.
3119 2001-02-02  John S. Marvin  <jsm@udlkern.fc.hp.com>
3121         * semaphore.h: Use struct _pthread_fastlock as an element of
3122         sem_t instead of an identical struct.
3123         * rwlock.c: Remove casts.
3124         * semaphore.c: Likewise.
3126 2001-04-30  Alan Modra  <amodra@one.net.au>
3128         * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: New.
3130 2001-05-25  Bruce Mitchener  <bruce@cubik.org>
3132         * linuxthreads.texi: Spelling corrections.
3134 2001-05-25  Ulrich Drepper  <drepper@redhat.com>
3136         * oldsemaphore.c (__old_sem_wait): Clear p_nextwaiting before
3137         returning successfully.
3138         Patch by Gene Cooperman <gene@ccs.neu.edu>.
3140 2001-05-24  Ulrich Drepper  <drepper@redhat.com>
3142         * spinlock.c (__pthread_lock) [HAS_COMPARE_AND_SWAP]: Before doing any
3143         serious work try once whether the lock is uncontested.
3144         Remove duplicate reading of __status before loop.
3145         Change suggested by Hans Boehm <hans_boehm@hp.com>.
3147         * spinlock.h (__pthread_trylock): Remove need for oldstatus variable.
3148         (__pthread_alt_trylock): Likewise.
3150 2001-05-01  Kaz Kylheku  <kaz@ashi.footprints.net>
3152         Memory barrier overhaul following line by line inspection.
3153         * mutex.c (pthread_once): Missing memory barriers added.
3154         * pthread.c (__pthread_wait_for_restart_signal,
3155         __pthread_timedsuspend_new, __pthread_restart_new): Added
3156         memory barriers ``just in case'' and for documentary value.
3157         * spinlock.c (__pthread_release): New inline function for releasing
3158         spinlock, to complement __pthread_acquire.  Includes memory
3159         barrier prior to assignment to spinlock, and __asm __volatile
3160         dance to prevent reordering or optimization of the spinlock access.
3161         * spinlock.c (__pthread_unlock, __pthread_alt_lock,
3162         __pthread_alt_timedlock, __pthread_alt_unlock,
3163         __pthread_compare_and_swap): Updated to use new __pthread_release
3164         instead of updating spinlock directly.
3165         * spinlock.c (__pthread_lock, __pthread_unlock, wait_node_alloc,
3166         wait_node_free, wait_node_dequeue, __pthread_alt_lock,
3167         __pthread_alt_timedlock, __pthread_alt_unlock, __pthread_acquire):
3168         Memory barrier overhaul.  Lots of missing memory barriers added,
3169         a couple needless ones removed.
3170         * spinlock.c (__pthread_compare_and_swap): testandset optimization
3171         removed, just calls __pthread_acquire, which has the new read
3172         barrier in it before its testandset.
3174 2001-05-20  Roland McGrath  <roland@frob.com>
3176         * Makeconfig: New file, variables used to be in main libc Makeconfig.
3178 2001-05-09  Geoff Keating  <geoffk@redhat.com>
3180         * sysdeps/powerpc/pt-machine.h
3181         (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): Define.
3182         (__compare_and_swap): Remove memory barriers.
3183         (__compare_and_swap_with_release_semantics): New function.
3185 2001-04-24  Andreas Jaeger  <aj@suse.de>
3187         * wrapsyscall.c: send* and recv* return ssize_t.
3189         * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Unlock the
3190         mutex instead of double locking it.
3191         Reported by Pierre Artaud <partaud@sodatec.com>.
3193 2001-04-23  Ulrich Drepper  <drepper@redhat.com>
3195         * sysdeps/pthread/getcpuclockid.c: Make function generic, test
3196         using #ifdef whether the clock is available.
3197         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: Removed.
3199         * sysdeps/ia64/Versions: New file.
3201         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init): We don't
3202         have to call __gmon_start__ in the libpthread DSO.
3203         * sysdeps/pthread/pt-initfini.c (_init): Likewise.
3205         * Makefile (libpthread-routines): Add ptclock_gettime and
3206         ptclock_settime.
3207         * internals.h: Don't use cpuclock-init.h definitions, use
3208         hp-timing.h definitions.
3209         * pthread.c: Likewise.
3210         * manager.c: Likewise.
3211         * ptclock_gettime.c: New file.
3212         * ptclock_settime.c: New file.
3213         * internals.h: Fix parameter type for __pthread_clock_gettime and
3214         __pthread_clock_settime.
3216         * sysdeps/i386/i586/ptclock_gettime.c: Removed.
3217         * sysdeps/i386/i586/ptclock_settime.c: Removed.
3218         * sysdeps/i386/i586/Makefile: Removed.
3220 2001-04-22  Ulrich Drepper  <drepper@redhat.com>
3222         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_ASYNCH_IO.
3223         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3225 2001-04-21  Andreas Jaeger  <aj@suse.de>
3227         * sysdeps/pthread/timer_routines.c (thread_func): Add noreturn
3228         attribute, remove statements that will never be executed.
3229         (thread_func): Remove mutex_unlock call since it's never executed.
3230         (thread_func): Fix comment as suggested by Jakub Jelinek.
3232         * manager.c (__pthread_manager): Add noreturn
3233         attribute.
3234         (pthread_start_thread): Likewise, remove return statement.
3235         (pthread_start_thread_event): Likewise.
3236         Add noreturn attribute for pthread_handle_exit.
3237         * weaks.c: Add noreturn attribute for pthread_exit.
3239         * internals.h: Add __pthread_clock_gettime and
3240         __pthread_clock_settime prototypes.
3242 2001-04-21  Ulrich Drepper  <drepper@redhat.com>
3244         * internals.h: Include <cpuclock-init.h>.
3245         (struct _pthread_descr_struct): Add p_cpuclock_offset field if
3246         CPUCLOCK_VARDEF is defined.
3247         * pthread.c (__pthread_initialize_minimal): Initialize
3248         p_cpuclock_offset field for main thread if CPUCLOCK_INIT is defined.
3249         * manager.c (pthread_start_thread): Set p_cpuclock_offset field
3250         for new thread to current CPU clock value.
3252         * sysdeps/i386/useldt.h: Extend all the macros to handle 8-byte values.
3254         * sysdeps/i386/i586/Makefile: New file.
3255         * sysdeps/i386/i586/Versions: New file.
3256         * sysdeps/i386/i586/ptclock_gettime.c: New file.
3257         * sysdeps/i386/i586/ptclock_settime.c: New file.
3258         * sysdeps/i386/i686/Implies: New file.
3260 2001-04-18  Jakub Jelinek  <jakub@redhat.com>
3262         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Put specs into
3263         $generated, not $postclean-generated.
3265 2001-04-18  Andreas Jaeger  <aj@suse.de>
3267         * Makefile (otherlibs): Added.
3269 2001-04-18  Jakub Jelinek  <jakub@redhat.com>
3271         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
3273 2001-04-16  Ulrich Drepper  <drepper@redhat.com>
3275         * signals.c (sigwait): NSIG is no signal number.  Block all
3276         signals while in signal handler for signals in SET.
3277         Patch by Manfred Spraul <manfred@colorfullife.com>.
3279 2001-04-12  Ulrich Drepper  <drepper@redhat.com>
3281         * tst-cancel.c: Disable most tests.  Add new test where all
3282         cleanup handlers must run.
3283         * Makefile (tests): Add tst-cancel again.
3285         * cancel.c (__pthread_perform_cleanup): Correct condition for
3286         leaving cleanup loop early.
3288         * sysdeps/i386/Makefile: Make sure gcc uses a frame pointer for
3289         all the files which use CURRENT_STACK_FRAME.
3290         * sysdeps/i386/pt-machine.h (CURRENT_STACK_FRAME): Define using
3291         __builtin_frame_address.
3292         * sysdeps/i386/i686/pt-machine.h: Likewise.
3294 2001-04-11  Ulrich Drepper  <drepper@redhat.com>
3296         * Makefile (tests): Comment out tst-cancel for now.
3298         * tst-cancel.c (main): Cleanup 4 is supposed to run.  Create
3299         temporary file in object directory.
3300         * Makefile: Don't allow inlining when compiling tst-cancel.c.
3301         Pass $(objpfx) to tst-cancel.
3303 2001-04-11  David S. Miller  <davem@redhat.com>
3305         * sysdeps/sparc/sparc32/pt-machine.h (stack_pointer): Advance
3306         up closer to user local variables so that new cleanup heuristics work.
3307         * sysdeps/sparc/sparc64/pt-machine.h (stack_pointer): Likewise.
3309 2001-04-11  Ulrich Drepper  <drepper@redhat.com>
3311         * cancel.c (_pthread_cleanup_push): Catch invalid __prev buffer
3312         and remove it.
3313         (_pthread_cleanup_push_defer): Likewise.
3315         * tst-cancel.c (main): Fix loop printing cleanup output.
3317 2001-04-10  kaz Kojima  <kkojima@rr.iij4u.or.jp>
3319         * sysdeps/sh/pspinlock.c (__pthread_spin_lock): Fix a reverse
3320         test.
3321         (__pthread_spin_trylock): Likewise.
3322         * sysdeps/sh/pt-machine.h (testandset): Likewise.
3324 2001-04-10  Ulrich Drepper  <drepper@redhat.com>
3326         * join.c (pthread_exit): Move code to new function __pthread_do_exit
3327         which takes an extra parameter with the current frame pointer.
3328         Call new function with CURRENT_STACK_FRAME.
3329         (__pthread_do_exit): New function.  Call __pthread_perform_cleanup
3330         with the new parameter.
3331         (pthread_join): Call __pthread_do_exit instead of pthread_exit.
3332         * cancel.c (__pthread_perform_cleanup): Takes extra parameter.  Use
3333         this parameter as the initial value the cleanup handler records are
3334         compared against.  No active cleanup handler record must have an
3335         address lower than the previous one and the initial record must be
3336         above (below on PA) the frame address passed in.
3337         (pthread_setcancelstate): Call __pthread_do_exit instead of
3338         pthread_exit.
3339         (pthread_setcanceltype): Likewise.
3340         (pthread_testcancel): Likewise.
3341         (_pthread_cleanup_pop_restore): Likewise.
3342         * condvar.c (pthread_cond_wait): Likewise.
3343         (pthread_cond_timedwait_relative): Likewise.
3344         * manager.c (pthread_start_thread): Likewise.
3345         * oldsemaphore.c (__old_sem_wait): Likewise.
3346         * pthread.c (pthread_handle_sigcancel): Likewise.
3347         * semaphore.c (__new_sem_wait): Likewise.
3348         (sem_timedwait): Likewise.
3349         * ptlongjmp.c (pthread_cleanup_upto): Also use current stack frame
3350         to limit the cleanup handlers which get run.
3351         * internals.h: Add prototype for __pthread_do_exit.  Adjust prototype
3352         for __pthread_perform_cleanup.
3354         * Makefile (tests): Add tst-cancel.
3355         * tst-cancel.c: New file.
3357 2001-04-08  Hans-Peter Nilsson  <hp@axis.com>
3359         * sysdeps/cris/pt-machine.h: New file.
3360         * sysdeps/cris/pspinlock.c: New file.
3362 2001-04-09  Hans-Peter Nilsson  <hp@axis.com>
3364         * shlib-versions: Add case for Linux on CRIS.
3366 2001-03-26  Ulrich Drepper  <drepper@redhat.com>
3368         * attr.c (pthread_getattr_np): Correct computation of stack size
3369         for machiens with register stack.
3371         * Examples/ex17.c (main): Correct detection of failed mmap call.
3373 2001-03-21  Jakub Jelinek  <jakub@redhat.com>
3375         * pthread.c (__pthread_initialize_manager): Fix a typo.
3377 2001-03-21  Jakub Jelinek  <jakub@redhat.com>
3379         * attr.c (__pthread_attr_setstack): Fix alignment check.
3380         (pthread_getattr_np): __stackaddr is top of stack, not bottom.
3381         * Makefile (tests): Add ex17 test.
3382         * Examples/ex17.c: New test.
3384 2001-03-20  Ulrich Drepper  <drepper@redhat.com>
3386         * Makefile: Define -D_RPC_THREAD_SAFE_ for cancel.c.
3387         * cancel.c (__pthread_perform_cleanup): Call __rpc_thread_destroy.
3388         * sysdeps/pthread/bits/libc-tsd.h: Define _LIBC_TSD_KEY_VARS.
3390 2001-03-18  Ulrich Drepper  <drepper@redhat.com>
3392         * Makefile: When generating DSO link with libc_nonshared.a.
3394 2001-02-26  Jakub Jelinek  <jakub@redhat.com>
3396         * signals.c (pthread_sighandler): Use CALL_SIGHANDLER.
3398 2001-02-23  Jakub Jelinek  <jakub@redhat.com>
3400         * internals.h (__pthread_init_max_stacksize): New prototype.
3401         * attr.c (__pthread_attr_setstacksize): Call
3402         __pthread_init_max_stacksize if not yet initialized.
3403         * pthread.c (__pthread_init_max_stacksize): New function.
3404         (__pthread_initialize_manager): Call it.
3405         Patch by <dtc@cmucl.cons.org>.
3407 2001-03-16  Ulrich Drepper  <drepper@redhat.com>
3409         * attr.c (pthread_getattr_np): Fix __stacksize computation for IA-64.
3411 2001-03-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3413         * shlib-versions: Add rule for Linux on 64 bit S/390.
3414         * sysdeps/s390/s390-64/pt-machine.h: New file.
3415         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
3417 2001-03-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3419         * sysdeps/s390/pt-machine.h: Move to...
3420         * sysdeps/s390/s390-32/pt-machine.h: ...here.
3421         Add defines for FLOATING_STACK and ARCH_STACK_MAX_SIZE.
3423 2001-03-15  Ulrich Drepper  <drepper@redhat.com>
3425         * Versions [libpthread] (GLIBC_2.2.3): Add pthread_getattr_np.
3426         * attr.c: Implement pthread_getattr_np.
3427         * sysdeps/pthread/pthread.h: Add prototype for pthread_getattr_np.
3428         * internals.h (struct _pthread_descr_struct): Add p_inheritsched.
3429         * manager.c (pthread_handle_create): Initialize p_inheritsched.
3431 2001-03-09  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3433         * sysdeps/unix/sysv/linux/s390/pt-initfini.c: Use 0x07 padding for
3434         code alignment.
3436 2001-02-20  Hans Boehm  <hans_boehm@hp.com>
3438         * manager.c (manager_mask): Removed static vesion.  Now always local
3439         to __pthread_manager().
3440         (manager_mask_all): Removed completely.
3441         (__pthread_manager): Remove manager_mask_all initialization.
3442         (pthread_handle_create): Remove code to set and reset signal mask
3443         around __clone2() calls.
3445 2001-02-17  Jakub Jelinek  <jakub@redhat.com>
3447         * spinlock.c (__pthread_lock): Force lock->__status to be read from
3448         memory on every spin.
3450 2001-02-10  Andreas Jaeger  <aj@suse.de>
3452         * Makefile (extra-objs): New.
3454 2001-02-09  Jakub Jelinek  <jakub@redhat.com>
3456         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add
3457         __pthread_initialize_minimal prototype.
3459 2001-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
3461         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
3463 2001-02-06  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3465         * sysdeps/unix/sysv/linux/s390/pt-initfini.c: New file.
3467 2001-02-06  Ulrich Drepper  <drepper@redhat.com>
3469         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the
3470         broken code.  Patch by Jes Sorensen.
3472 2001-02-06  Andreas Jaeger  <aj@suse.de>
3474         * sysdeps/pthread/pthread.h: Move __pthread_initialize from here
3475         to...
3476         * internals.h: ...here.
3478 2001-02-05  Jes Sorensen  <jes@linuxcare.com>
3480         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
3482 2001-02-02  Ulrich Drepper  <drepper@redhat.com>
3484         * Versions: Remove __pthread_initialize_minimal.
3486 2001-02-01  Ulrich Drepper  <drepper@redhat.com>
3488         * Makefile: Add rules to build crti.o and make it being used in
3489         building libpthread.so.
3490         * sysdeps/i386/Makefile: New file.
3491         * sysdeps/pthread/pt-initfini.c: New file.
3493         * pthread.c: Cleanups.
3495 2001-01-28  Andreas Jaeger  <aj@suse.de>
3497         * oldsemaphore.c (__old_sem_init): Adjust for last change.
3498         * sysdeps/pthread/bits/libc-lock.h: Likewise.
3499         * spinlock.c: Likewise.
3501 2001-01-28  Ulrich Drepper  <drepper@redhat.com>
3503         * sysdeps/pthread/bits/initspin.h: Make all names namespace clean.
3504         * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
3505         * manager.c: Adjust for namespace cleanup in bits/initspin.h.
3506         * pthread.c: Likewise.
3507         * spinlock.h: Likewise.
3508         * sysdeps/pthread/pthread.h: Likewise.
3510 2001-01-26  Ulrich Drepper  <drepper@redhat.com>
3512         * sysdeps/pthread/bits/pthreadtypes.h: Define pthread_attr_t also
3513         as struct __pthread_attr_s.
3515         * semaphore.h (sem_t): Cleanup namespace, rename status and
3516         spinlock elements.
3518 2001-01-13  Jakub Jelinek  <jakub@redhat.com>
3520         * pthread.c (pthread_onexit_process): Clear
3521         __pthread_manager_thread_bos after freeing it.
3522         * Makefile (tests): Add ex16.
3523         * Examples/ex16.c: New file.
3525 2001-01-11  Jakub Jelinek  <jakub@redhat.com>
3527         * Makefile (CFLAGS-pthread.c): Pass -DHAVE_Z_NODELETE if ld supports
3528         -z nodelete.
3529         * pthread.c (pthread_exit_process): Rename to...
3530         (pthread_onexit_process): ...this.
3531         (pthread_atexit_process, pthread_atexit_retcode): New.
3532         (pthread_initialize): Call __cxa_atexit instead of __cxa_on_exit
3533         and only if HAVE_Z_NODELETE is not defined.
3534         (__pthread_initialize_manager): Register pthread_atexit_retcode
3535         with __cxa_atexit.
3537 2001-01-11  Ulrich Drepper  <drepper@redhat.com>
3539         * pthread.c (pthread_initialize): Use __cxs_on_exit not __cxa_atexit.
3541 2001-01-11  Jakub Jelinek  <jakub@redhat.com>
3543         * Makefile (tests): Add ex15.
3544         * Examples/ex15.c: New test.
3546 2001-01-08  Ulrich Drepper  <drepper@redhat.com>
3548         * pthread.c (pthread_exit_process): Free memory allocated for
3549         manager stack.
3551 2000-12-31  Ulrich Drepper  <drepper@redhat.com>
3553         * manager.c (pthread_alloca_stack): Remove MAP_FIXED from mmap calls.
3554         (pthread_free): Always unmap the stack.  It's safe now that we don't
3555         use MAP_FIXED to allocate stacks.
3557 2000-12-31  Ulrich Drepper  <drepper@redhat.com>
3559         * sysdeps/powerpc/pspinlock.c: Don't include pt-machine.h here.
3561         * manager.c (pthread_allocate_stack): Prepare for removal of MAP_FIXED.
3563 2000-11-15  Wolfram Gloger  <wg@malloc.de>
3565         * manager.c (pthread_free): [!FLOATING_STACKS]: Only remap the
3566         stack to PROT_NONE, don't unmap it, avoiding collisions with malloc.
3568 2000-12-27  Andreas Jaeger  <aj@suse.de>
3570         * Examples/ex13.c: Make local functions static.
3571         * ecmutex.c: Likewise.
3572         * joinrace.c: Likewise.
3573         * Examples/ex14.c: Likewise.
3575         * Examples/ex2.c: Make local functions static; reformat.
3576         * Examples/ex1.c: Likewise.
3577         * Examples/ex4.c: Likewise.
3578         * Examples/ex5.c: Likewise.
3579         * Examples/ex7.c: Likewise.
3581         * oldsemaphore.c: Add prototypes to shut up GCC.
3582         * pt-machine.c: Likewise.
3584         * weaks.c: Add prototype for pthread_exit.
3586         * internals.h: Add some prototypes, format prototypes and add
3587         missing externs.
3588         Move __libc_waitpid prototype to include/sys/wait.h.
3590         * rwlock.c: Include <bits/libc-lock.h> for prototypes.
3591         * mutex.c: Likewise.
3592         * specific.c: Likewise.
3593         * ptfork.c: Likewise.
3595         * lockfile.c: Include internals.h to get prototypes.
3596         * events.c: Likewise.
3597         * sysdeps/alpha/pspinlock.c: Likewise.
3598         * sysdeps/arm/pspinlock.c: Likewise.
3599         * sysdeps/hppa/pspinlock.c: Likewise.
3600         * sysdeps/i386/pspinlock.c: Likewise.
3601         * sysdeps/ia64/pspinlock.c: Likewise.
3602         * sysdeps/m68k/pspinlock.c: Likewise.
3603         * sysdeps/mips/pspinlock.c: Likewise.
3604         * sysdeps/powerpc/pspinlock.c: Likewise.
3605         * sysdeps/s390/pspinlock.c: Likewise.
3606         * sysdeps/sh/pspinlock.c: Likewise.
3607         * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
3608         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
3609         * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
3611 2000-12-27  Ulrich Drepper  <drepper@redhat.com>
3613         * attr.c (__pthread_attr_setstack): Fix setting of __stackaddr element.
3614         (__pthread_attr_getstack): Return correct address.
3615         Add warnings for using pthread_attr_getstackaddr and
3616         pthread_attr_setstackaddr.
3618 2000-12-26  Ulrich Drepper  <drepper@redhat.com>
3620         * Examples/ex6.c (test_thread): Make static.
3621         * Examples/ex12.c (test_thread): Make static and add noreturn
3622         attribute.
3624 2000-12-18  Jes Sorensen  <jes@linuxcare.com>
3626         * linuxthreads/sysdeps/ia64/pt-machine.h: __compare_and_swap
3627         and compare_and_swap_with_release_semantics returns int not long.
3629 2000-12-17  Andreas Jaeger  <aj@suse.de>
3631         * sysdeps/s390/pt-machine.h (testandset): Use long int as return
3632         value.
3633         * sysdeps/arm/pt-machine.h (testandset): Likewise.
3634         * sysdeps/hppa/pt-machine.h (testandset): Likewise.
3635         * sysdeps/m68k/pt-machine.h (testandset): Likewise.
3636         * sysdeps/sh/pt-machine.h (testandset): Likewise.
3637         * sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise.
3638         * sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise.
3640 2000-12-17  Ulrich Drepper  <drepper@redhat.com>
3642         * sysdeps/i386/pt-machine.h (testandset): Adjust for prototype change.
3643         * sysdeps/i386/i686/pt-machine.h (testandset): Likewise.
3645 2000-12-17  Andreas Jaeger  <aj@suse.de>
3647         * internals.h: Add prototypes for testandset and
3648         __compare_and_swap to shut up gcc warnings.
3650 2000-12-06  Wolfram Gloger  <wg@malloc.de>
3652         * join.c (pthread_detach): Allow case where the thread has already
3653         terminated.
3655 2000-12-05  Andreas Jaeger  <aj@suse.de>
3657         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't set mips2.
3658         * sysdeps/mips/pt-machine.h (testandset): Likewise.
3659         (__compare_and_swap): Likewise.
3660         Patches by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
3662 2000-11-20  Jakub Jelinek  <jakub@redhat.com>
3664         * Examples/ex3.c (main): Cast int to long before casting to void *.
3665         (search): Cast void * to long, not int.
3666         * Examples/ex8.c (main, thread): Similarly.
3667         * Examples/ex11.c (main): Similarly.
3668         * Examples/ex14.c (worker, do_test): Similarly.
3669         * ecmutex.c (worker, do_test): Similarly.
3670         (nlocks): Cast to int.
3672 2000-11-08  Bruce Mitchener  <bruce@cubik.org>
3674         * linuxthreads.texi:  Add documentation for pthreads attributes
3675         guardsize, stackaddr, stacksize, and stack.  Fix typo in previous
3676         patch.  Document pthread_[sg]etconcurrency().  Mark
3677         pthread_mutexattr_[sg]ettype() as POSIX rather than GNU.
3679 2000-11-07  Ulrich Drepper  <drepper@redhat.com>
3681         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
3682         Don't define it.
3683         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3684         Reported by Christopher Yeoh <cyeoh@linuxcare.com.au>.
3686 2000-11-06  Ulrich Drepper  <drepper@redhat.com>
3688         * cancel.c (pthread_cancel): Always set p_canceled, even if we are
3689         not doing it right now.
3690         Reported by Kaz Kylheku <kaz@ashi.footprints.net>.
3692 2000-10-30  Ulrich Drepper  <drepper@redhat.com>
3694         * Examples/ex4.c (main): Don't use exit() to avoid warning with
3695         broken compilers.
3697 2000-10-29  Ulrich Drepper  <drepper@redhat.com>
3699         * attr.c (__pthread_attr_setguardsize): Don't round guardsize
3700         here.  Reported by Bruce Mitchener <bruce@cubik.org>.
3702         * linuxthreads.texi: Changes terminology to 'type' from 'kind' when
3703         discussing mutexes. (As per the Unix98 name for the API.)
3704         Changes documentation for pthread_mutexattr_setkind_np() and
3705         pthread_mutexattr_getkind_np() over to the Unix98 APIs for the
3706         same: pthread_mutexattr_settype() and pthread_mutexattr_gettype().
3707         Changes references to PTHREAD_MUTEXATTR_FAST_NP to
3708         PTHREAD_MUTEXATTR_ADAPTIVE_NP.
3709         Begins to introduce discussion of the ``timed'' mutex type.  This
3710         discussion is currently incomplete.
3711         Patch by Bruce Mitchener <bruce@cubik.org>.
3713 2000-10-26  Kazumoto Kojima  <kkojima@rr.iij4u.or.jp>
3714             Yutaka Niibe  <gniibe@chroot.org>
3716         * sysdeps/sh/pt-machine.h (testandset): Since the operand of TAS.B
3717         has restrictions, use register.
3719 2000-10-23  Andreas Schwab  <schwab@suse.de>
3721         * Examples/ex14.c (TIMEOUT): Override default timeout.
3723 2000-10-16  Ulrich Drepper  <drepper@redhat.com>
3725         * specific.c: Protect tsd array modification in thread data
3726         structures by getting the thread lock in pthread_key_delete and
3727         __pthread_destroy_specifics.
3728         Patch by Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>.
3730 2000-10-12  Alan Modra <alan@linuxcare.com.au>
3732         * sysdeps/pthread/bits/initspin.h: New file.
3733         * spinlock.h: Move LOCK_INITIALIZER definition to <bits/initspin.h>.
3734         (__pthread_init_lock): Initialize lock with LT_SPINLOCK_INIT.
3735         (__pthread_alt_init_lock): Likewise.
3736         (__pthread_alt_trylock): Release lock with LT_SPINLOCK_INIT.
3738 2000-10-12  David Huggins-Daines  <dhd@linuxcare.com>
3740         * oldsemaphore.c (__old_sem_init): Release lock with
3741         LT_SPINLOCK_INIT, not zero.
3742         * spinlock.c (__pthread_unlock): Likewise.
3743         (__pthread_alt_lock): Likewise.
3744         (__pthread_alt_timedlock): Likewise.
3745         (__pthread_alt_unlock): Likewise.
3746         * sysdeps/pthread/bits/libc-lock.h: Initialize locks with
3747         LT_SPINLOCK_INIT if it is non-zero.  Likewise for init-once flags.
3748         * sysdeps/pthread/pthread.h: Include bits/initspin.h.  Use
3749         LT_SPINLOCK_INIT do initialize spinlocks not 0.
3751 2000-10-12  David Huggins-Daines <dhd@linuxcare.com>
3753         * shlib-versions: Add version definitions for hppa-linux.
3755 2000-10-12  Alan Modra <alan@linuxcare.com.au>
3757         * sysdeps/hppa/pspinlock.c: New file.
3758         * sysdeps/hppa/pt-machine.h: New file.
3759         * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: New file.
3761 2000-10-05  Jakub Jelinek  <jakub@redhat.com>
3763         * mutex.c (__pthread_mutex_destroy): Correct test of
3764         busy mutex for mutexes using alternate fastlocks.
3765         Patch by dtc@cmucl.cons.org.
3767 2000-09-28  Martin Schwidefsksy    <schwidefsky@de.ibm.com>
3769         * sysdeps/s390/pt-machine.h: Make %a0 the thread register.
3771 2000-09-28  Ulrich Drepper  <drepper@redhat.com>
3773         * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP
3774         test for owner first.
3775         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
3777         * cancel.c (pthread_cancel): Don't do anything if cancelation is
3778         disabled.
3780 2000-09-26  Ulrich Drepper  <drepper@redhat.com>
3782         * spinlock.h (__pthread_set_own_extricate_if): Optimize a bit.
3783         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
3785         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
3786         _POSIX_MONOTONIC_CLOCK.
3788         * spinlock.h (__pthread_set_own_extricate_if): Add back locking
3789         and explain why.
3791 2000-09-20  Andreas Jaeger  <aj@suse.de>
3793         * pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
3794         "testrtsig.h" conditional.
3796 2000-09-11  Ulrich Drepper  <drepper@redhat.com>
3798         * sysdeps/pthread/pthread.h: Declare pthread_attr_getstack and
3799         pthread_attr_setstack.
3800         * Versions [libpthread] (GLIBC_2.2): Export pthread_attr_getstack and
3801         pthread_attr_setstack.
3802         * attr.c (pthread_attr_getstack, pthread_attr_setstack): New functions.
3804 2000-09-05  Ulrich Drepper  <drepper@redhat.com>
3806         * Examples/ex14.c: New file.
3807         * Makefile (tests): Add ex14.
3809         * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
3810         mutex.  Patch by dtc@cmucl.cons.org.
3812         * ecmutex.c: New file.
3813         * Makefile (tests): Add ecmutex.
3815 2000-09-04  H.J. Lu  <hjl@gnu.org>
3817         * attr.c (__pthread_attr_setguardsize): Use page_roundup
3818         instead of roundup to round up to the page size.
3820 2000-09-03  Mark Kettenis  <kettenis@gnu.org>
3822         * manager.c (pthread_exited): Correctly report event as TD_REAP
3823         instead of TD_DEATH.  Fix comments.
3825 2000-09-03  Ulrich Drepper  <drepper@redhat.com>
3827         * spinlock.h (testandset): Add cast to avoid warning.
3828         Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
3830 2000-09-02  Andreas Jaeger  <aj@suse.de>
3832         * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
3833         prototype.
3835 2000-09-01  Ulrich Drepper  <drepper@redhat.com>
3837         * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
3838         Fix typo in last patch (_mode -> _flags).
3840         * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
3841         Provide definition which respects _IO_USER_LOCK flag.
3843 2000-08-30  Ulrich Drepper  <drepper@redhat.com>
3845         * manager.c (pthread_allocate_stack): Clear descriptor only if not
3846         mmaped.
3848 2000-08-25  Ulrich Drepper  <drepper@redhat.com>
3850         * Makefile: Add rules to build and run unload.
3851         * unload.c: New file.
3853         * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
3855         * sysdeps/pthread/pthread.h
3856         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
3857         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
3859 2000-08-24  Andreas Jaeger  <aj@suse.de>
3861         * Examples/ex13.c: Include <string.h> for strerror prototype and
3862         <stdlib.h> for abort prototype.
3863         (pthr_cond_signal_mutex): Rewrite to silence GCC.
3864         (thread_start): Remove unused variable err.
3865         (main): Silence GCC warnings.
3867 2000-08-22  Andreas Jaeger  <aj@suse.de>
3869         * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
3871         * Makefile (tests): Add ex13.
3873 2000-08-20  Ulrich Drepper  <drepper@redhat.com>
3875         * semaphore.h: Add restrict where required by AGd4.
3876         * sysdeps/pthread/pthread.h: Likewise.
3877         * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
3879 2000-08-15  Ulrich Drepper  <drepper@redhat.com>
3881         * Makefile (tests): Add ex12.  Add rule to build it.
3882         * Examples/ex12.c: New file.
3884 2000-08-13  Ulrich Drepper  <drepper@redhat.com>
3886         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
3887         even though the implementation is not quite complete (but it reports
3888         it).  Define _POSIX_MESSAGE_PASSING to -1.
3889         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3891 2000-08-12  Andreas Jaeger  <aj@suse.de>
3893         * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
3894         assembler.
3895         (__compare_and_swap): Likewise.
3896         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
3898 2000-08-10  Ulrich Drepper  <drepper@redhat.com>
3900         * pthread.c (__pthread_initial_thread): Initialize p_errnop and
3901         p_h_errnop correctly and not to NULL.
3903 2000-08-05  Ulrich Drepper  <drepper@redhat.com>
3905         * Banner: Bump version number to 0.9.
3907 2000-08-04  Ulrich Drepper  <drepper@redhat.com>
3909         * Makefile (tests): Add tststack.  Add rule to build the program.
3910         * tststack.c: New file.
3912         * internals.h: Declare __pthread_max_stacksize.
3913         * pthread.c (__pthread_max_stacksize): New variable.
3914         (__pthread_initialize_manager): Determine __pthread_initialize_manager
3915         value.
3916         * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
3917         (pthread_allocate_stack): Allow kernel to choose stack address if
3918         FLOATING_STACKS.  This also handles variable-sized stacks.
3919         Always allocate stack and guardpage together.  Use mprotect to
3920         change guardpage access.
3921         * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
3922         ARCH_STACK_MAX_SIZE.
3924         * attr.c (__pthread_attr_setstacksize): Also test value against
3925         upper limit.
3927         * manager.c (__pthread_nonstandard_stacks): Define only if
3928         THREAD_SELF is not defined.
3929         (pthread_allocate_stack): Always initialize gardaddr to a correct
3930         value.
3931         (pthread_handle_create): Unmap thread with one call.
3932         (pthread_free): Remove test for initial thread before removing stack.
3933         Unmap stack with one call.
3935         * pthread.c (__pthread_initial_thread): Initialize p_userstack to
3936         1 to avoid removing the stack.
3938 2000-07-27  Jes Sorensen  <jes@linuxcare.com>
3940         * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
3941         load of spin lock to prime the cache before the atomic compare and
3942         exchange operation (cmpxchg4). This avoids the spinning on the
3943         cmpxchg4 instruction and reduces movement of the cache line back
3944         and forth between the processors (explanation by Asis K. Mallick
3945         from Intel). This basically makes the implementation operate the
3946         same as the Linux kernel implementation.
3948         * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
3949         * sysdeps/ia64/pspinlock.c: New file.
3951 2000-08-03  Ulrich Drepper  <drepper@redhat.com>
3953         * pthread.c: Move definition of __pthread_set_own_extricate_if...
3954         * spinlock.h: ...here.  Remove locking.
3955         * internals.h: Remove __pthread_set_own_extricate_if prototype.
3957         * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
3958         (rwlock_rd_extricate_func): Don't determine self, let
3959         __pthread_lock do it.
3960         (rwlock_wr_extricate_func): Likewise.
3961         (rwlock_have_already): Optimize *pself handling a bit.
3963         * mutex.c: Use __builtin_expect.
3964         * pthread.c: Likewise.
3966 2000-08-02  Andreas Jaeger  <aj@suse.de>
3968         * sysdeps/s390/pspinlock.c: New file.
3969         * sysdeps/s390/pt-machine.h: New file.
3970         Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
3972 2000-07-12  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
3974         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
3975         R3K.
3976         * sysdeps/mips/pt-machine.h (testandset): Likewise.
3978 2000-07-26  Andreas Jaeger  <aj@suse.de>
3980         * pthread.c: Initialize p_sem_avail.
3982 2000-07-25  Ulrich Drepper  <drepper@redhat.com>
3984         * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
3985         * semaphore.c: Handle spurious wakeups.
3987         * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
3988         for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
3990         * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
3991         (__pthread_wait_for_restart): Likewise.
3993         * condvar.c (pthread_cond_wait): Also check whether thread is
3994         cancelable before aborting loop.
3995         (pthread_cond_timedwait): Likewise.
3997         * signals.c (pthread_sighandler): Remove special code to restrore
3998         %gs on x86.
3999         (pthread_sighandler_t): Likewise.
4001 2000-07-25  Mark Kettenis  <kettenis@gnu.org>
4003         * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
4004         * pthread.c: Include <resolv.h>.
4005         (_res): Undefine.  Add extern declaration.
4007 2000-07-24  Ulrich Drepper  <drepper@redhat.com>
4009         * pthread.c (__pthread_initial_thread): Update initializer.
4010         (__pthread_manager_thread): Likewise.
4011         (pthread_initialize): Move setrlimit call to...
4012         (__pthread_initialize_manager): ...here.
4013         (__pthread_reset_main_thread): Reset also soft limit on stack size.
4015         * condvar.c: Handle spurious wakeups.  [PR libc/1749].
4016         * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
4018 2000-07-21  Ulrich Drepper  <drepper@redhat.com>
4020         * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
4021         __compare_and_swap to define testandset.
4022         * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
4023         Define IMPLEMENT_TAS_WITH_CAS.
4025 2000-07-20  Ulrich Drepper  <drepper@redhat.com>
4027         * Makefile: Pass -z nodelete to linker for libpthread.so
4028         generation if it understand this option.
4030 2000-07-18  Mark Kettenis  <kettenis@gnu.org>
4032         * manager.c (pthread_handle_create): Remove initialization of
4033         new_thread->p_res._sock.
4035 2000-07-19  Kaz Kylheku  <kaz@ashi.footprints.net>
4037         Bugfixes to the variant of the code for machines with no compare
4038         and swap.
4040         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
4041         node was not being properly enqueued, due to failing to update
4042         the lock->__status field.
4044         * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
4045         being set inappropriately, causing the suspend function to be called
4046         with a null self pointer and crash.
4048 2000-07-18  Ulrich Drepper  <drepper@redhat.com>
4050         * spinlock.h (__pthread_alt_trylock): Fix code used if no
4051         compare&swap is available.
4053         * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
4054         compare_and_swap.
4056         * pthread.c (pthread_initialize): Don't use sysconf to determine
4057         whether the machine has more than one processor.
4059         * spinlock.c (__pthread_alt_timedlock): Add back one of the
4060         removed thread_self calls.
4062 2000-07-18  Kaz Kylheku  <kaz@ashi.footprints.net>
4064         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
4065         __compare_and_swap to compare_and_swap in code which assumes
4066         compare swap is available.
4068 2000-07-18  Kaz Kylheku  <kaz@ashi.footprints.net>
4070         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
4071         bug whereby thr field of waitnode structure would not be correctly
4072         set unless a null self pointer is passed to the functions.
4073         Eliminated redundant calls to thread_self().
4075 2000-07-18  Jakub Jelinek  <jakub@redhat.com>
4077         * pthread.c (__pthread_initialize_manager): Lock
4078         __pthread_manager_thread.p_lock before calling clone.
4080 2000-05-05  H.J. Lu  <hjl@gnu.org>
4082         * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
4083         have acquire semantics.
4084         (__compare_and_swap_with_release_semantics): New inline
4085         function.
4086         (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
4088 2000-01-28  Hans Boehm  <hboehm@exch.hpl.hp.com>
4090         * manager.c: Fix the problem with signals at startup.
4091         Change the way that thread stacks are allocated on IA64.
4092         Clean up some of the guard page allocation stuff.
4094 1999-12-19  H.J. Lu  <hjl@gnu.org>
4096         * internals.h (page_roundup): New.
4097         * attr.c (__pthread_attr_setguardsize); Use page_roundup
4098         instead of roundup.
4099         * manager.c (pthread_allocate_stack): Make sure guardaddr is
4100         page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
4101         is define.
4103 1999-12-17  Hans Boehm  <hboehm@exch.hpl.hp.com>
4105         * manager.c (pthread_allocate_stack): Unmap the stack top
4106         if failed to map the stack bottom.
4107         Fix the guard page.
4108         (pthread_free): Fix the guard page.
4110         * pthread.c (pthread_initialize): Set rlimit correctly for
4111         NEED_SEPARATE_REGISTER_STACK.
4113 1999-12-16  H.J. Lu  <hjl@gnu.org>
4115         * pthread.c (__pthread_initialize_manager): Pass
4116         __pthread_manager_thread_bos instead of
4117         __pthread_manager_thread_tos to __clone2.
4119 1999-12-16  H.J. Lu  <hjl@gnu.org>
4121         * manager.c (pthread_allocate_stack): Correct the calculation
4122         of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
4123         stack bottom.
4125 1999-12-13  H.J. Lu  <hjl@gnu.org>
4127         * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
4128         bit after setting ar.ccv.
4130 1999-12-12  H.J. Lu  <hjl@gnu.org>
4132         * manager.c (pthread_allocate_stack): Make the starting
4133         address of the stack bottom page aligned. FIXME: it may
4134         need changes in other places.
4135         (pthread_handle_create): Likewise.
4137 1999-12-11  Hans Boehm  <hboehm@exch.hpl.hp.com>
4139         * manager.c (pthread_allocate_stack): Handle
4140         NEED_SEPARATE_REGISTER_STACK.
4141         (pthread_handle_create): Likewise.
4142         * pthread.c (__pthread_initialize_manager): Likewise.
4144         * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
4146 1999-12-02  H.J. Lu  <hjl@gnu.org>
4148         * sysdeps/ia64/pt-machine.h: New.
4150 2000-07-13  Ulrich Drepper  <drepper@redhat.com>
4152         * wrapsyscall.c: Mark non-__ protected names as weak.
4153         PR libc/1466.
4155 2000-07-12  Bruno Haible  <haible@clisp.cons.org>
4157         * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
4159 2000-07-12  Ulrich Drepper  <drepper@redhat.com>
4161         * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
4162         Add tests also to new alternative spinlock implementation.
4163         * spinlock.h: Likewise.
4164         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4166 2000-07-06  Ulrich Drepper  <drepper@redhat.com>
4168         * Version: Export __sigaction.
4169         * signals.c: Define __sigaction alias.  Use __libc_sigaction instead
4170         of __sigaction.
4171         * pthread.c: Use __libc_sigaction instead of __sigaction.
4173         * condvar.c: Implement pthread_condattr_getpshared and
4174         pthread_condattr_setpshared.
4175         * mutex.c: Implement pthread_mutexattr_getpshared and
4176          pthread_mutexattr_setpshared.
4177         * Versions: Export new functions.
4178         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
4180         * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
4181         (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
4182         is not selected.
4184 2000-07-04  Greg McGary  <greg@mcgary.org>
4186         * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
4187         pragmas.  Include bp-sym.h only if _LIBC.
4189 2000-07-04  Ulrich Drepper  <drepper@redhat.com>
4191         * spinlock.c (__pthread_unlock): Properly place write barrier.
4192         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4194 2000-07-03  Ulrich Drepper  <drepper@redhat.com>
4196         * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
4197         faster on SMP systems.  No more emulation of compare&swap for adaptive
4198         spinlocks.
4199         * spinlock.h: Likewise.
4200         * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
4201         Replace fast with adaptive mutex.
4202         * mutex.c: Rewrite for replacement of fast by adaptive mutex.
4203         * condvar.c: Likewise.
4204         * pthread.c: Define and initialize __pthread_smp_kernel variable.
4205         * internals.h: Declare __pthread_smp_kernel.
4206         * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
4207         _pthread_fastlock structure.
4208         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4210         * pthread.c: Remove initialization to zero from global variables.
4212 2000-06-29  Jakub Jelinek  <jakub@redhat.com>
4214         * shlib-versions: Make sparc64 GLIBC_2.2+ only.
4216 2000-06-28  Greg McGary  <greg@mcgary.org>
4218         * weaks.c: Wrap BP_SYM () around weak extern declarations of
4219         pthread functions that have pointers in their return+arg signatures.
4221 2000-06-27  Greg McGary  <greg@mcgary.org>
4223         * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
4224         extern declarations of pthread functions that have pointers in
4225         their return+arg signatures.
4227 2000-06-26  Ulrich Drepper  <drepper@redhat.com>
4229         * Makefile (tests): Add ex11.  Add rules to build it.
4230         * Examples/ex11.c: New file.
4231         * rwlock.c: Fix complete braindamaged previous try to implement
4232         timedout functions.
4234         * spinlock.c: Pretty print.
4236 2000-06-25  Ulrich Drepper  <drepper@redhat.com>
4238         * Makefile (tests): Add ex10.  Add rules to build it.
4239         * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
4240         pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
4241         * condvar.c (pthread_cond_wait): Allow mutex of kind
4242         PTHREAD_MUTEX_TIMED_NP.
4243         (pthread_cond_timedwait_relative): Likewise.
4244         * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
4245         (__pthread_mutex_trylock): Use __pthread_alt_trylock for
4246         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
4247         (__pthread_mutex_lock): Use __pthread_alt_lock for
4248         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
4249         (__pthread_mutex_timedlock): New function.
4250         (__pthread_mutex_unlock): Use __pthread_alt_unlock for
4251         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
4252         (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
4253         (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
4254         * spinlock.c: Implement alternate fastlocks.
4255         * spinlock.h: Add prototypes.
4256         * Examples/ex10.c: New file.
4257         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
4258         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4260         * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
4261         (__pthread_rwlock_timedrdlock): New function.
4262         (__pthread_rwlock_timedwrlock): New function.
4263         Use laternate fastlock function everywhere.
4265 2000-06-21  Andreas Jaeger  <aj@suse.de>
4267         * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
4268         prototype.
4270         * join.c: Include <stdlib.h> for exit prototype.
4272 2000-06-20  Ulrich Drepper  <drepper@redhat.com>
4274         * sysdeps/i386/useldt.h: Include <stdlib.h>.
4276         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
4277         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4279         * Makefile (libpthread-routines): Add barrier.
4280         (tests): Add ex9.  Add rule to build ex9.
4281         * Versions: Export barrier functions.
4282         * barrier.c: New file.
4283         * Examples/ex9.c: New file.
4284         * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
4285         * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
4286         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4288 2000-06-19  H.J. Lu  <hjl@gnu.org>
4290         * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
4291         HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
4292         (compare_and_swap_with_release_semantics): New. Default to
4293         compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
4294         is not defined.
4296         * spinlock.c (__pthread_unlock): Call
4297         compare_and_swap_with_release_semantics () instead of
4298         compare_and_swap ().
4300 2000-06-19  Ulrich Drepper  <drepper@redhat.com>
4302         * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
4303         to errno directly.
4304         * sysdeps/pthread/timer_delete.c: Likewise.
4305         * sysdeps/pthread/timer_getoverr.c: Likewise.
4306         * sysdeps/pthread/timer_gettime.c: Likewise.
4307         * sysdeps/pthread/timer_settime.c: Likewise.
4309 2000-06-13  Kaz Kylheku  <kaz@ashi.footprints.net>
4311         Timer nodes are now reference counted, and can be marked
4312         as deleted. This allows for the safe release of the global mutex
4313         in the middle without losing the timer being operated on.
4315         * sysdeps/pthread/posix-timer.h (struct timer_node):  The inuse
4316         member is now an enum with three values, so that an intermediate
4317         state can be represented (deleted but not free for reuse yet).
4318         New refcount member added.
4319         * sysdeps/pthread/timer_routines.c: Likewise.
4321         * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
4322         timer_valid): New inline functions added.
4324         * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
4325         restructured, recursive deadlock bug fixed.
4327         * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
4328         timer_addref to ensure that timer won't be deleted while mutex is not
4329         held. Also uses timer_invalid to perform validation of timer handle.
4330         * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
4331         * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
4333 2000-06-14  Ulrich Drepper  <drepper@redhat.com>
4335         * shlib-versions: Add entry for SH.
4336         Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
4338 2000-06-13  Kaz Kylheku  <kaz@ashi.footprints.net>
4340         A few optimizations.  Got rid of unnecessary wakeups of timer threads,
4341         tightened up some critical regions and micro-optimized some list
4342         manipulation code.
4344         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
4345         Returns int value now to indicate whether timer was queued at head.
4346         * sysdeps/pthread/posix-timer.h: Likewise.
4347         * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
4348         new return value from __timer_thread_queue_timer to avoid waking
4349         up timer thread unnecessarily.
4351         * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
4352         inuse flag, because this requires mutex to be held.  Callers updated
4353         to do the check when they have the mutex.
4354         * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
4356         * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
4357         regions: avoids making system calls while holding timer mutex, and
4358         a few computations were moved outside of the mutex as well.
4359         * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
4361         * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
4362         to list_unlink_ip, meaning idempotent.  Pointer manipulation
4363         changed to get better better code out of gcc.
4364         * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
4365         version of list_unlink added here.
4366         * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
4367         function in all places: idempotent one for timers, non-idempotent
4368         one for thread nodes.
4369         * sysdeps/pthread/timer_settime: Likewise.
4370         * sysdeps/pthread/timer_routines.c: Likewise.
4372 2000-06-13  Ulrich Drepper  <drepper@redhat.com>
4374         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
4375         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4377         * sysdeps/pthread/Makefile: Remove tests definition.
4379 2000-06-12  Kazumoto Kojima  <kkojima@rr.iij4u.or.jp>
4380             Yutaka Niibe  <gniibe@chroot.org>
4382         * sysdeps/sh/pspinlock.c: New file.
4383         * sysdeps/sh/pt-machine.h: New file.
4385 2000-06-12  Ulrich Drepper  <drepper@redhat.com>
4387         * Makefile (tests): Add joinrace.
4389         * Examples/ex6.c: Test return value of pthread_join.
4391 2000-06-11  Geoff Keating  <geoffk@cygnus.com>
4393         * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
4394         (__pthread_spin_trylock): Implement.
4395         (__pthread_spin_unlock): Implement.
4396         (__pthread_spin_init): Implement.
4397         (__pthread_spin_destroy): Implement.
4399 2000-06-10  Ulrich Drepper  <drepper@redhat.com>
4401         * sysdeps/pthread/timer_routines.c (list_append): Little fix to
4402         really append the entry.
4404 2000-06-10  Andreas Jaeger  <aj@suse.de>
4406         * lockfile.c (__fresetlockfiles): Remove unused variable fp.
4408 2000-06-10  Kaz Kylheku  <kaz@ashi.footprints.net>
4410         * sysdeps/pthread/timer_create.c: Thread matching now done on
4411         clock type as well as thread attributes.
4412         There are individual global signal-delivering threads for
4413         different clock types.
4414         * sysdeps/pthread/posix-timer.h: Likewise.
4415         * sysdeps/pthread/timer_routines.c: Likewise.
4417         * sysdeps/pthread/timer_routines.c: Thread allocation and
4418         deallocation function now remembers to put thread on active
4419         list and remove from active list.
4420         Thus now the feature of binding multiple timers
4421         to a single thread actually works.
4423 2000-06-10  Ulrich Drepper  <drepper@redhat.com>
4425         * pthread.c (__pthread_create_2_1): Optimize a bit.
4427         * internals.h (invalid_handle): Also test for p_terminated != 0.
4428         (nonexisting_handle): New function.  Same as old invalid_handle.
4429         * join.c (pthread_join): Use nonexisting_handle instead of
4430         invalid_handle to test for acceptable thread handle.
4431         * manager.c (pthread_handle_free): Likewise.
4432         * joinrace.c: New file.
4433         Reported by Permaine Cheung <pcheung@cygnus.com>.
4435 2000-06-08  Ulrich Drepper  <drepper@redhat.com>
4437         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
4438         Correct handling of matching variable.
4440         * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
4441         avoid warnings.
4443         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
4444         Be prepared for empty timer list.
4446         * sysdeps/pthread/timer_create.c (timer_create): Correct names of
4447         CPUTIME clock ID.  Add support for thread clocks.
4449         * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
4450         subtraction were switched.
4452         * sysdeps/pthread/timer_routines.c (init_module): Use
4453         THREAD_MAXNODES threads.
4455         * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
4456         * sysdeps/pthread/timer_create.c: Fill in creator_pid.
4457         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
4458         with sigqueueinfo is this system call is available.
4460         * sysdeps/pthread/timer_create.c (timer_create): Allow
4461         CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
4463         * sysdeps/pthread/Makefile: New file.  Add rules to build timer
4464         functionality.
4465         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
4467 2000-06-04  Kaz Kylheku  <kaz@ashi.footprints.net>
4469         * sysdeps/pthread/posix-timer.h: New file.
4470         * sysdeps/pthread/timer_create.c: New file.
4471         * sysdeps/pthread/timer_delete.c: New file.
4472         * sysdeps/pthread/timer_getoverr.c: New file.
4473         * sysdeps/pthread/timer_gettime.c: New file.
4474         * sysdeps/pthread/timer_routines.c: New file.
4475         * sysdeps/pthread/timer_settime.c: New file.
4476         * sysdeps/pthread/tst-timer.c: New file.
4478 2000-06-08  Ulrich Drepper  <drepper@redhat.com>
4480         * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
4481         LINK_MAX definitions if necessary.
4483 2000-06-04  Kaz Kylheku  <kaz@ashi.footprints.net>
4485         Added missing fork time handling of global libio lock.
4487         * lockfile.c (__fresetlockfiles): Now also resets the list lock,
4488         not just the individual stream locks. Rewritten to use new
4489         iterator interface provided by libio rather than accessing
4490         global variable.
4492         * lockfile.c (__flockfilelist, _funlockfilelist): New functions
4493         which lock and unlock the stream list using the new interface
4494         provied by libio.
4495         * internals.h: Likewise.
4497         * ptfork.c (__fork): Now calls __flockfilelist before fork,
4498         and __funlockfilelist in the parent after the fork.
4499         Child still calls __fresetlockfiles as before.
4501         * linuxthreads.texi: Now explains what happens to streams at
4502         fork time. Also whole new section on forking and thread added.
4503         Definition of pthread_atfork moved out of Miscellaneous Functions
4504         to this new section.
4506 2000-06-04  Jakub Jelinek  <jakub@redhat.com>
4508         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
4509         Add missing register.
4510         * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
4512 2000-06-02  Jakub Jelinek  <jakub@redhat.com>
4514         * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
4515         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
4516         * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
4518 2000-05-31  Andreas Jaeger  <aj@suse.de>
4520         * sysdeps/mips/pspinlock.c: Implement spinlocks.
4522 2000-05-28  Ulrich Drepper  <drepper@redhat.com>
4524         * spinlock.c (__pthread_lock): Remove ASSERT.
4526         * Makefile (tests): Add ex8.
4527         * Examples/ex8.c: New file.
4529 2000-05-12  Kaz Kylheku  <kaz@ashi.footprints.net>
4531         Bugfix: The pthread_atfork mechanism now takes care of its
4532         own internal mutex at fork time.
4534         * ptfork.c (__fork): Revised so that the mutex is held across
4535         the fork operation and while the handlers are called, and so that
4536         the child resets the mutex.
4538         * linuxthreads.texi: Updated pthread_atfork documentation to make
4539         it clear that fork and pthread_atfork can't be reentered from
4540         atfork handlers, that pthread_atfork and fork are mutually atomic,
4541         and that the handlers are inherited by the child process.
4543 2000-05-24  Ulrich Drepper  <drepper@redhat.com>
4545         * Makefile (libpthread-routines): Add pspinlock.
4546         * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
4547         Use struct _pthread_fastlock instead of pthread_spinlock_t.
4548         * condvar.c: Likewise.
4549         * internals.h: Likewise.
4550         * join.c: Likewise.
4551         * manager.c: Likewise.
4552         * mutex.c: Likewise.
4553         * pthread.c: Likewise.
4554         * rwlock.c: Likewise.
4555         * semaphore.c: Likewise.
4556         * signals.c: Likewise.
4557         * spinlock.h: Likewise.
4558         * spinlock.c: Likewise.  Remove pthread_spin_lock functions.
4559         * sysdeps/alpha/pspinlock.c: New file.
4560         * sysdeps/arm/pspinlock.c: New file.
4561         * sysdeps/i386/pspinlock.c: New file.
4562         * sysdeps/m68k/pspinlock.c: New file.
4563         * sysdeps/mips/pspinlock.c: New file.
4564         * sysdeps/powerpc/pspinlock.c: New file.
4565         * sysdeps/sparc/sparc32/pspinlock.c: New file.
4566         * sysdeps/sparc/sparc64/pspinlock.c: New file.
4567         * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
4568         back to _pthread_fastlock.  Define new pthread_spinlock_t.
4570 2000-05-24  Andreas Jaeger  <aj@suse.de>
4572         * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
4574 2000-05-21  Jakub Jelinek  <jakub@redhat.com>
4576         * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
4578 2000-05-13  Jakub Jelinek  <jakub@redhat.com>
4580         * internals.h (__RES_PTHREAD_INTERNAL): Define.
4582 2000-05-06  Kaz Kylheku  <kaz@ashi.footprints.net>
4584         * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
4585         object state is represented with additional bits which distinguish
4586         whether that state was set up in the current process, or
4587         in an ancestor process. If that state was set in an ancestor,
4588         it means that a fork happened while thread was executing the init
4589         function. In that case, the state is reset to NEVER.
4590         * mutex.c (__pthread_once_fork_prepare): New function.
4591         (__pthread_once_fork_child): Likewise
4592         (__pthread_once_fork_parent): Likewise
4593         (__pthread_reset_pthread_once): Removed.
4594         * ptfork.c (__fork): Call new handlers in mutex.c.
4595         * internals.h: Declarations of new mutex.c functions added.
4596         Declaration of removed function deleted.
4597         * linuxthreads.texi: Updated documentation about pthread_once
4598         to clarify what happens under cancellation and forking.
4600 2000-05-06  Kaz Kylheku  <kaz@ashi.footprints.net>
4602         * internals.h: New thread manager request type, REQ_KICK.
4603         * join.c (pthread_exit): main thread now calls exit() instead
4604         of _exit() in order to proper process cleanup.
4605         * manager.c (__pthread_manager): Do not terminate manager
4606         after unblocking main thread; wait for main thread's
4607         REQ_PROCESS_EXIT request instead.
4608         Also, added REQ_KICK case to handle new request; this just does
4609         nothing.
4610         * manager.c (pthread_exited): Do not terminate manager after
4611         unblocking main thread.
4612         * manager.c (__pthread_manager_sighandler): If the main thread
4613         is waiting for all other threads to die, send a REQ_KICK into
4614         the thread manager request pipe to get it to clean out the threads
4615         and unblock the main thread as soon as possible. This fixes
4616         the 2000 millisecond hang on shutdown bug.
4617         * Examples/ex7.c: New file, tests shutdown behavior when all threads
4618         including the main one call pthread_exit(), or implicitly do so.
4619         * Makefile (tests): Add ex7.
4621 2000-05-05  Andreas Jaeger  <aj@suse.de>
4623         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
4624         (pthread_getcpuclockid): Correct test for ourselves.
4626 2000-05-05  Ulrich Drepper  <drepper@redhat.com>
4628         * internals.h (struct _pthread_descr_struct): Reorganization.
4629         Allocate room for 16 pointers at head of the structure for future
4630         thread-local data handling.  Move p_self member in this area.
4631         * manager.c (pthread_handle_create): Adjust use of p_self.
4632         * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
4633         * pthread.c (__pthread_initial_thread): Adjust initialization.
4634         (__pthread_manager_thread): Likewise.
4636 2000-04-29  Bruno Haible  <haible@clisp.cons.org>
4638         * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
4639         for eventmask larger than 1 word.
4641 2000-04-27  Ulrich Drepper  <drepper@redhat.com>
4643         * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
4644         * pthread.c (__pthread_initialize_minimal): New function.  Perform
4645         minimal initialization.
4646         (pthread_initialize): Remove this code here.
4647         * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again.  We
4648         are working around the problem in glibc.
4650 2000-04-25  Ulrich Drepper  <drepper@redhat.com>
4652         * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
4653         now.  First gcc must be fixed (more concrete: libgcc).
4655 2000-04-24  Ulrich Drepper  <drepper@redhat.com>
4657         * pthread.c: Remove special treatement for interrupt handlers on x86.
4658         * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
4659         * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
4660         necessary.
4661         * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
4663 2000-04-24  Mark Kettenis  <kettenis@gnu.org>
4665         * join.c (pthread_exit): Set p_terminated after reporting the
4666         termination event instead of before.
4668 2000-04-20  Jakub Jelinek  <jakub@redhat.com>
4670         * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
4671         if __USE_UNIX98.
4673 2000-04-18  Andreas Jaeger  <aj@suse.de>
4675         * Versions: Use ld instead of ld.so.
4677 2000-04-18  Jakub Jelinek  <jakub@redhat.com>
4679         * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
4680         Remove the typedef keyword.
4682 2000-04-18  Jakub Jelinek  <jakub@redhat.com>
4684         * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
4685         not stbar.
4686         (READ_MEMORY_BARRIER): Define.
4687         * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
4688         MEMORY_BARRIER.
4689         * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
4690         headers.
4692 2000-04-17  Ulrich Drepper  <drepper@redhat.com>
4694         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
4695         (pthread_getcpuclockid): Don't compare thread_id with thread_self,
4696         use thread_handle().
4698 2000-04-16  Ulrich Drepper  <drepper@redhat.com>
4700         * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
4701         if fast mutex is used.  Don't initialize `already_canceled' twice.
4702         Correctly test for return value of timedsuspend.
4704         * pthread.c: Correct long-time braino.  We never set SA_SIGINFO and
4705         therefore don't need the _rt versions of the signal handlers.
4707 2000-04-15  Ulrich Drepper  <drepper@redhat.com>
4709         * pthread.c (pthread_yield): New function.
4710         * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
4711         * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
4712         * internals.h: Declare __pthread_yield.
4714         * pthread.c (pthread_initialize): Avoid a bit more code if
4715         realtime signals are known to exist.
4717         * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
4718         to dynamically detect RT signals and avoid generating compatibility
4719         functions with old kernel.
4720         * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
4721         __pthread_restart_new directly.
4722         (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
4723         __pthread_wait_for_restart_signal directly.
4724         (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
4725         __pthread_timedsuspend_new directly.
4727 2000-04-15  Ulrich Drepper  <drepper@redhat.com>
4729         * condvar.c: Remove all the special code to handle cond_timedwait.
4730         Use timedsuspend instead.
4731         * internals.h: Declare __pthread_timedsuspend_old,
4732         __pthread_timedsuspend_new, and __pthread_timedsuspend.
4733         Remove declaration of __pthread_init_condvar.
4734         * pthread.c: Define __pthread_timedsuspend variable.
4735         (__pthread_timedsuspend_old): New function.  Timed suspension
4736         implementation for old Linux kernels.
4737         (__pthread_timedsuspend_new): New function.  Timed suspension
4738         implementation for new Linux kernels.
4739         * restart.h (timedsuspend): New function.  Call appropriate
4740         suspension function through __pthread_timedsuspend.
4741         * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
4742         the code.
4743         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4745         * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
4746         undefined.
4747         * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
4748         where possible.
4749         * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
4750         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
4752         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
4753         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4755 2000-04-14  Andreas Jaeger  <aj@suse.de>
4757         * weaks.c: Fix typo.
4759         * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
4760         2.2 for linuxthreads.
4762 2000-04-13  Ulrich Drepper  <drepper@redhat.com>
4764         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
4765         (pthread_getcpuclockid): Fix typo.
4767 2000-04-12  Ulrich Drepper  <drepper@redhat.com>
4769         * Makefile (libpthread-routines): Add getcpuclockid.
4770         * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
4771         * sysdeps/pthread/getcpuclockid.c: New file.
4772         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
4773         * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
4775         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
4776         Defined.
4777         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4779         * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
4780         pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
4781         and pthread_spin_unlock.
4782         * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
4783         into pthread_spinlock_t.  Change all uses.
4784         * spinlock.c: Implement pthread_spin_lock.
4785         Rename __pthread_unlock to __pthread_spin_unlock and define weak
4786         alias for real name.
4787         Define pthread_spin_trylock, pthread_spin_init, and
4788         pthread_spin_destroy.
4789         Change all uses of _pthread_fastlock to pthread_spinlock_t.
4790         * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
4791         Change all uses of _pthread_fastlock to pthread_spinlock_t.
4792         * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
4793         pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
4794         and pthread_spin_unlock.
4795         * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
4796         Change all uses of _pthread_fastlock to pthread_spinlock_t.
4797         * condvar.c: Likewise.
4798         * internals.h: Likewise.
4799         * join.c: Likewise.
4800         * manager.c: Likewise.
4801         * mutex.c: Likewise.
4802         * pthread.c: Likewise.
4803         * rwlock.c: Likewise.
4804         * semaphore.c: Likewise.
4805         * signals.c: Likewise.
4807         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
4808         macros.
4809         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
4811 2000-04-11  Ulrich Drepper  <drepper@redhat.com>
4813         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
4814         _POSIX_SHARED_MEMORY_OBJECTS.
4816 2000-04-11  Andreas Jaeger  <aj@suse.de>
4818         * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
4819         (__compare_and_swap): Mark as modifying memory.
4821 2000-04-11  Geoff Keating  <geoffk@cygnus.com>
4823         * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
4824         __volatile__.
4825         (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
4826         Don't have the 'asm' __volatile__.
4828 2000-04-11  Ulrich Drepper  <drepper@redhat.com>
4830         * internals.h: Define MEMORY_BARRIER as empty if not defined already.
4831         * spinlock.c (__pthread_lock): Add memory barriers.
4832         (__pthread_unlock): Likewise.
4833         * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
4834         instruction.
4835         (RELEASE): Not needed anymore.
4836         (__compare_and_swap): Mark asm as modifying memory.
4837         * sysdeps/powerpc/pt-machine.h (sync): Remove.  Replace with definition
4838         of MEMORY_BARRIER.
4839         (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
4840         * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
4841         (MEMORY_BARRIER): Define using stbar.
4842         * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
4843         stbar.
4844         (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
4845         Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
4846         Mike Burrows <m3b@pa.dec.com>.
4848 2000-04-09  Ulrich Drepper  <drepper@redhat.com>
4850         * signals.c (sigaction): Fix return value for the case SIG is one
4851         of the signals the implementation uses.
4852         Patch by Xavier.Leroy@inria.fr.
4854 2000-04-01  Andreas Jaeger  <aj@suse.de>
4856         * attr.c: Use shlib-compat macros.
4857         * oldsemaphore.c: Likewise.
4858         * pthread.c: Likewise.
4859         * weaks.c: Likewise.
4861 2000-03-26  Ulrich Drepper  <drepper@redhat.com>
4863         * semaphore.c (sem_timedwait): New function.
4864         Patch by Carl Mailloux <carlm@oricom.ca>.
4865         * semaphore.h: Declare sem_timedwait.
4866         * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
4868 2000-03-26  Roland McGrath  <roland@baalperazim.frob.com>
4870         * sysdeps/pthread/Makefile: File removed.
4872 2000-03-23  Ulrich Drepper  <drepper@redhat.com>
4874         * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
4875         * internals.h (__pthread_reset_pthread_once): Add prototype.
4876         * ptfork.c (__fork): Call __pthread_reset_pthread_once.
4878         * manager.c (pthread_handle_create): Store ID of new thread before
4879         clone call.
4881 2000-03-21  Ulrich Drepper  <drepper@redhat.com>
4883         * attr.c: Use new macros from shlib-compat.h to define versions.
4884         * oldsemaphore.c: Likewise.
4885         * semaphore.c: Likewise.
4886         * weaks.c: Likewise.
4888         * pthread.c: Update for new SHLIB_COMPAT definition.
4890         * manager.c (__pthread_manager): Unmask debug signal.
4892         * pthread.c (pthread_initialize): Test for address of __dso_handle
4893         being NULL, not value.  Use __on_exit, not on_exit.
4894         Patch by Andreas Jaeger <aj@suse.de>.
4896         * pthread.c: Use new macros from shlib-compat.h to define versions.
4898 2000-03-19  Ulrich Drepper  <drepper@redhat.com>
4900         * pthread.c (pthread_initialize): Instead of on_exit use
4901         __cxa_atexit if __dso_label is available to allow unloading the
4902         libpthread shared library.
4904 2000-03-16  Ulrich Drepper  <drepper@redhat.com>
4906         * condvar.c: Make tests for ownership of mutex less strict.
4908 2000-03-14  Ulrich Drepper  <drepper@redhat.com>
4910         * condvar.c (pthread_cond_wait): Check whether mutex is owned by
4911         current thread and return error if not.
4912         (pthread_cond_timedwait_relative_old): Likewise.
4913         (pthread_cond_timedwait_relative_new): Likewise.
4915         * mutex.c (__pthread_once): Handle cancelled init function correctly.
4916         (pthread_once_cancelhandler): New function.
4917         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4919 2000-03-14  Andreas Jaeger  <aj@suse.de>
4921         * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
4922         REG_GS.
4923         (pthread_handle_sigrestart_rt): Likewise.
4924         * signals.c (pthread_sighandler_rt): Likewise.
4926 2000-03-02  Andreas Jaeger  <aj@suse.de>
4928         * sysdeps/pthread/bits/libc-lock.h: Fix typo.
4929         Reported by Sean Chen <sean.chen@turbolinux.com>.
4931 2000-02-28  Andreas Jaeger  <aj@suse.de>
4933         * rwlock.c: Fix typo.
4935 2000-02-27  Ulrich Drepper  <drepper@redhat.com>
4937         * rwlock.c: Define __* variants of the functions and make old names
4938         aliases.
4939         * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
4940         * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
4942 2000-02-25  Andreas Jaeger  <aj@suse.de>
4944         * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
4945         pwrite64, lseek64, open64, and __open64 with version 2.2.
4947 2000-02-22  Ulrich Drepper  <drepper@redhat.com>
4949         * semaphore.h (SEM_FAILED): Use 0 not NULL.
4951 2000-02-14  Ulrich Drepper  <drepper@redhat.com>
4953         * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
4954         nanosleep does not work either.  Get absolute time inside the
4955         loop.
4956         (pthread_cond_timedwait_relative_new): Likewise.
4957         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4959 2000-02-13  Andreas Jaeger  <aj@suse.de>
4961         * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
4962         (pthread_cond_timedwait_relative_old): Likewise.
4964 2000-02-13  Ulrich Drepper  <drepper@redhat.com>
4966         * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
4967         but keep the code around.  A bug in the kernel prevent us from
4968         using the code.
4969         (pthread_cond_timedwait_relative_new): Likewise.
4970         (PR libc/1597 and libc/1598).
4972 2000-02-01  Kaz Kylheku  <kaz@ashi.footprints.net>
4974         * condvar.c (pthread_cond_timedwait_relative_old): Do tight
4975         loop around nanosleep calls instead of around most of the function
4976         (pthread_cond_timedwait_relative_new): Likewise.
4977         body.  Got rid of backwards goto and one local.
4979 2000-01-31  Ulrich Drepper  <drepper@redhat.com>
4981         * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
4982         before every nanosleep call to account for time spent in the rest
4983         of the function.
4984         (pthread_cond_timedwait_relative_new): Likewise.
4985         Patch by khendricks@ivey.uwo.ca (PR libc/1564).
4987 2000-01-29  Ulrich Drepper  <drepper@redhat.com>
4989         * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
4990         from nanosleep call so that in case we restart we only wait for the
4991         remaining time.
4992         (pthread_cond_timedwait_relative_new): Likewise.
4993         Patch by khendricks@ivey.uwo.ca (PR libc/1561).
4995 2000-01-18  Ulrich Drepper  <drepper@cygnus.com>
4997         * manager.c (pthread_allocate_stack): Compute guard page address
4998         correctly.  Patch by HJ Lu.
5000         * sysdeps/pthread/pthread.h: Define
5001         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
5003 2000-01-16  Ulrich Drepper  <drepper@cygnus.com>
5005         * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
5006         preference handling.
5007         (pthread_rwlockattr_setkind_np): Allow
5008         PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
5009         Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
5011 2000-01-12  Ulrich Drepper  <drepper@cygnus.com>
5013         * internals.h (pthread_readlock_info): New structure.
5014         (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
5015         p_untracked_readlock_count.
5016         * pthread.c (__pthread_initial_thread, pthread_manager_thread):
5017         Add initializers for new fields.
5018         * manager.c (pthread_free): Free read/write lock lists.
5019         * queue.h (queue_is_empty): New function.
5020         * rwlock.c: Implement requirements about when readers should get
5021         locks assigned.
5022         * sysdeps/pthread/pthread.h
5023         (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
5024         * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
5025         Define this name as well.
5026         Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
5028 2000-01-05  Ulrich Drepper  <drepper@cygnus.com>
5030         * pthread.c (__pthread_initial_thread, pthread_manager_thread):
5031         Adjust initializers for struct _pthread_descr_struct change.
5032         * internals.h (struct _pthread_descr_struct): Move new elements to
5033         the end.
5035 2000-01-03  Kaz Kylheku  <kaz@ashi.footprints.net>
5037         Redesigned how cancellation unblocks a thread from internal
5038         cancellation points (sem_wait, pthread_join,
5039         pthread_cond_{wait,timedwait}).
5040         Cancellation won't eat a signal in any of these functions
5041         (*required* by POSIX and Single Unix Spec!).
5042         * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
5043         simultaneous condition variable signal (not required by POSIX
5044         or Single Unix Spec, but nice).
5045         * spinlock.c: __pthread_lock queues back any received restarts
5046         that don't belong to it instead of assuming ownership of lock
5047         upon any restart; fastlock can no longer be acquired by two threads
5048         simultaneously.
5049         * restart.h: Restarts queue even on kernels that don't have
5050         queued real time signals (2.0, early 2.1), thanks to atomic counter,
5051         avoiding a rare race condition in pthread_cond_timedwait.
5053 1999-12-31  Andreas Jaeger  <aj@suse.de>
5055         * internals.h: Remove duplicate prototype declarations.
5057         * weaks.c: Remove __THROW from prototypes since the file is not
5058         compiled by a C++ compiler.
5059         * internals.h: Likewise.
5061 1999-12-30  Andreas Jaeger  <aj@suse.de>
5063         * sysdeps/pthread/pthread.h: Move internal functions to...
5064         * sysdeps/pthread/bits/libc-lock.h: ...here.
5066 1999-12-29  Andreas Jaeger  <aj@suse.de>
5068         * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
5070 1999-12-28  Ulrich Drepper  <drepper@cygnus.com>
5072         * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
5073         beginning.
5075         * manager.c (__pthread_start): Add one more cast to prevent
5076         warning on 64bit machines.
5078 1999-12-21  Ulrich Drepper  <drepper@cygnus.com>
5080         * manager.c (pthread_handle_create): Set p_pid of new thread
5081         before calling the callback function to report a new thread.
5083 1999-12-20  Andreas Jaeger  <aj@suse.de>
5085         * pthread.c (pthread_initialize): Move getrlimit call after
5086         setting of errno.
5088 1999-12-18  Ulrich Drepper  <drepper@cygnus.com>
5090         * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
5091         pwrite64, lseek64, open64, and __open64.
5092         * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
5093         pwrite64, lseek64, open64, and __open64.
5095         * manager.c (pthread_allocate_stack): Correct computation of
5096         new_thread_bottom.  Correct handling of stack size and when the
5097         rlimit method to guard for stack growth is used.
5098         * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
5099         minus one pagesize (not two).
5101 1999-12-03  Andreas Jaeger  <aj@suse.de>
5103         * Versions: Add __res_state with version GLIBC_2.2.
5105         * errno.c (__res_state): New function to return thread specific
5106         resolver state.
5108         * pthread.c (pthread_initialize): Initialize p_resp.
5109         (__pthread_reset_main_thread): Also set p_resp.
5111         * manager.c (pthread_handle_create): Initialize p_resp.
5113         * internals.h: Add thread specific resolver state.
5114         Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
5116 1999-12-01  Ulrich Drepper  <drepper@cygnus.com>
5118         * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
5119         beginning.
5120         * sysdeps/i386/i686/pt-machine.h: Likewise.
5121         Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
5123 1999-11-23  Ulrich Drepper  <drepper@cygnus.com>
5125         * manager.c (pthread_start_thread_event): Initialize p_pid already
5126         here.
5128 1999-11-22  Ulrich Drepper  <drepper@cygnus.com>
5130         * internals.h: Add prototype for __pthread_manager_event.
5131         * manager.c (__pthread_manager_event): New function.
5132         (pthread_start_thread_event): Correct computation of self.
5133         Use INIT_THREAD_SELF.
5134         * pthread.c (__pthread_manager_thread): Initialize p_lock.
5135         (__pthread_initialize_manager): Respect event flags also for creation
5136         of the manager thread.
5138 1999-11-08  Ulrich Drepper  <drepper@cygnus.com>
5140         * pthread.c (__pthread_initialize_manager): Initialize
5141         __pthread_manager_thread.p_tid.
5143 1999-11-02  Ulrich Drepper  <drepper@cygnus.com>
5145         * internals.h: Declare __pthread_last_event.
5146         * manager.c: Define __pthread_last_event.
5147         (pthread_handle_create): Set __pthread_last_event.
5148         (pthread_exited): Likewise.
5149         * join.c (pthread_exit): Likewise.
5151         * Makefile (libpthread-routines): Add events.
5152         * events.c: New file.
5153         * internals.h: Protect against multiple inclusion.
5154         Include thread_dbP.h header.
5155         (struct _pthread_descr_struct): Add new fields p_report_events and
5156         p_eventbuf.
5157         Declare event reporting functions.
5158         * join.c (pthread_exit): Signal event if this is wanted.
5159         * manager.c (__pthread_threads_events): New variable.
5160         (pthread_handle_create): Take new parameters with event information.
5161         Signal TD_CREATE event if wanted.
5162         (__pthread_manager): Adjust pthread_handle_create call.
5163         (pthread_start_thread_event): New function.  Block until manager is
5164         finished and then call pthread_start_thread.
5165         (pthread_exited): Signal TD_REAP event if wanted.
5167 1999-10-26  Ulrich Drepper  <drepper@cygnus.com>
5169         * restart.h (suspend_with_cancellation): Rewrite as a macro.
5171         * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
5173 1999-10-25  Andreas Jaeger  <aj@suse.de>
5175         * internals.h: Remove K&R compatibility.
5176         * no-tsd.c: Likewise.
5177         * semaphore.h: Likewise.
5178         * signals.c: Likewise.
5179         * sysdeps/pthread/bits/libc-tsd.h: Likewise.
5180         * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
5181         * weaks.c: Likewise.
5183 1999-10-21  Xavier Leroy  <Xavier.Leroy@inria.fr>
5185         * pthread.c: For i386, wrap pthread_handle_sigrestart and
5186         pthread_handle_sigcancel with functions that restore %gs from the
5187         signal context.  For each signal handling function, two wrappers
5188         are required, one for a non-RT signal and one for a RT signal.
5189         * signal.c: For i386, add code to restore %gs from the signal
5190         context in pthread_sighandler and pthread_sighandler_rt.
5192 1999-10-17  Ulrich Drepper  <drepper@cygnus.com>
5194         * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
5196 1999-10-14  Ulrich Drepper  <drepper@cygnus.com>
5198         * pthread.c (__pthread_initial_thread): Pass argument to
5199         PTHREAD_START_ARGS_INITIALIZER.
5200         (__pthread_manager_thread): Likewise.
5202         * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
5203         initialize function.
5205         * manager.c (pthread_handle_create): Remove p_startfct initialization.
5207         * internals.h (_pthread_descr_struct): We don't need p_startfct field.
5209 1999-10-12  Ulrich Drepper  <drepper@cygnus.com>
5211         * internals.h: Correct return types for __libc_read and __libc_write.
5213 1999-10-09  Andreas Jaeger  <aj@suse.de>
5215         * internals.h: Add __new_sem_post to get prototype in
5216         manager.c; include semaphore.h for needed types.
5218 1999-10-08  Ulrich Drepper  <drepper@cygnus.com>
5220         * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
5221         directly instead of calling sem_post which should not be necessary
5222         but is faster and might help in some case to work around problems.
5223         Patch by khendricks@ivey.uwo.ca [libc/1382].
5225 1999-10-08  Andreas Schwab  <schwab@suse.de>
5227         * sysdeps/pthread/Subdirs: New file.
5228         * Implies: Removed.
5230 1999-10-07  Ulrich Drepper  <drepper@cygnus.com>
5232         * Implies: New file.
5233         * internals.h (struct _pthread_descr_struct): Add p_startfct.
5234         * manager.c (pthread_handle_create): Initialize p_startfct.
5235         * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
5237 1999-09-25  Ulrich Drepper  <drepper@cygnus.com>
5239         * manager.c (__linuxthreads_pthread_threads_max): New variable.
5240         * specific.c (__linuxthreads_pthread_keys_max): New variable.
5241         (__linuxthreads_pthread_key_2ndlevel_size): New variable.
5243         * condvar.c (pthread_cond_timedwait_relative): Never return with
5244         EINTR.  Patch by Andreas Schwab.
5246 1999-09-19  Ulrich Drepper  <drepper@cygnus.com>
5248         * signals.c (sigaction): Correct last patch.  Don't select
5249         pthread_sighandler_rt based on the signal number but instead of
5250         the SA_SIGINFO flag.
5252 1999-09-23  Ulrich Drepper  <drepper@cygnus.com>
5254         * specific.c: Move definitions of struct pthread_key_struct and
5255         destr_function to ...
5256         * internals.h: ...here.
5258 1999-09-18  Ulrich Drepper  <drepper@cygnus.com>
5260         * pthread.c (pthread_handle_sigrestart_rt): New function.  Use
5261         this instead of pthread_handle_sigrestart if the signal is an RT
5262         signal.
5264         * signals.c: Handle passing through of sighandler arguments also
5265         for real-time signals.
5267 1999-09-03  Andreas Schwab  <schwab@suse.de>
5269         * ptfork.c (__fork): Renamed from fork and use __libc_fork.  Add
5270         fork as weak alias.
5271         (__vfork): New function, alias vfork.
5272         * Versions: Export __fork, vfork, and __vfork in libpthread.
5274 1999-08-23  Andreas Schwab  <schwab@suse.de>
5276         * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
5277         call to signal handler.
5279 1999-08-20  Ulrich Drepper  <drepper@cygnus.com>
5281         * pthread.c (__pthread_reset_main_thread): Undo last change.
5282         (__pthread_kill_other_threads_np): Reset signal handlers for the
5283         signals we used in the thread implementation here.
5285 1999-08-19  Ulrich Drepper  <drepper@cygnus.com>
5287         * pthread.c (__pthread_reset_main_thread): Reset signal handlers
5288         for the signals we used in the thread implementation [PR libc/1234].
5290         * Versions: Export __pthread_kill_other_threads_np from libpthread
5291         for GLIBC_2.1.2.
5293         * signals.c: Pass sigcontext through wrapper to the user function.
5295 1999-08-01  Ulrich Drepper  <drepper@cygnus.com>
5297         * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
5298         __libc_internal_tsd_set.
5300 1999-07-29  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5302         * manager.c: Remove inclusion of <linux/tasks.h> since it's not
5303         needed anymore.
5305 1999-07-16  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5307         * internals.h: Align _pthread_descr_struct to 32 bytes.
5308         Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
5309         libc/1206.
5311 1999-07-09  Ulrich Drepper  <drepper@cygnus.com>
5313         * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
5314         swap function.
5316 1999-07-09  Cristian Gafton  <gafton@redhat.com>
5318         * Makefile (libpthread-routines): Add oldsemaphore routine.
5319         * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
5320         sem_trywait, and sem_wait to GLIBC_2.1.
5321         * oldsemaphore.c: New file.
5322         * semaphore.c: Add default_symbol_versions for the changed functions.
5323         (__new_sem_init): Rename from sem_init.
5324         (__new_sem_post): Rename from sem_post.
5325         (__new_sem_wait): Rename from sem_wait.
5326         (__new_sem_trywait): Rename from sem_trywait.
5327         (__new_sem_getvalue): Rename from sem_getvalue.
5328         (__new_sem_destroy): Rename from sem_destroy.
5330 1999-06-23  Robey Pointer  <robey@netscape.com>
5332         * internals.h: Added p_nextlock entry to separate queueing for a
5333         lock from queueing for a CV (sometimes a thread queues on a lock
5334         to serialize removing itself from a CV queue).
5335         * pthread.c: Added p_nextlock to initializers.
5336         * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
5338 1999-07-09  Ulrich Drepper  <drepper@cygnus.com>
5340         * manager.c (pthread_handle_create): Free mmap region after stack
5341         if clone failed.  Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
5343 1999-05-23  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5345         * man/pthread_cond_init.man: Correct example.
5346         Reported by Tomas Berndtsson <tomas@nocrew.org>.
5348         * linuxthreads.texi (Condition Variables): Likewise.
5350 1999-05-18  Jakub Jelinek  <jj@ultra.linux.cz>
5352         * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
5353         casx not cas, also successful casx returns the old value in rd
5354         and not the new value.
5356 1999-05-16  Xavier Leroy  <Xavier.Leroy@inria.fr>
5358         * manager.c: If pthread_create() is given a NULL attribute
5359         and the thread manager runs with a realtime policy, set the
5360         scheduling policy of the newly created thread back to SCHED_OTHER.
5361         * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
5362         initialize the schedpolicy field of new_thread->p_start_args
5363         to that of the calling thread.
5365 1999-04-29  Ulrich Drepper  <drepper@cygnus.com>
5367         * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
5368         instruction does not allow memory element to use offset.
5370 1999-04-28  Ulrich Drepper  <drepper@cygnus.com>
5372         * manager.c (pthread_allocate_stack): Optimize initialization of new
5373         thread descriptor.
5375         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
5376         Don't use initializer since it is all zeroes.
5377         (__libc_once_define): Likewise.
5379 1999-04-16  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5381         * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
5382         doesn't exist anymore.
5383         * sysdeps/i386/Implies: Likewise.
5384         * sysdeps/m68k/Implies: Likewise.
5385         * sysdeps/mips/Implies: Likewise.
5386         * sysdeps/powerpc/Implies: Likewise.
5387         * sysdeps/sparc/sparc32/Implies: Likewise.
5388         * sysdeps/sparc/sparc64/Implies: Likewise.
5390 1999-04-15  Ulrich Drepper  <drepper@cygnus.com>
5392         * sysdeps/alpha/bits/semaphore.h: Removed.
5393         * sysdeps/powerpc/bits/semaphore.h: Removed.
5394         * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
5395         * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
5396         * Makefile (headers): Remove bits/semaphore.h.
5398         * semaphore.h: Define _pthread_descr if necessary.
5399         Don't include limits.h.  Define SEM_VALUE_MAX directly.
5400         Define SEM_FAILED.
5401         (sem_t): Protect element names with leading __.
5402         Add declarations for sem_close, sem_open, and sem_unlink.
5403         * semaphore.c: Adjust all functions for new element names.
5404         Define sem_close, sem_open, and sem_unlink.
5405         * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
5406         GLIBC_2.1.1.
5407         * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
5408         necessary.
5410 1999-03-16  H.J. Lu  <hjl@gnu.org>
5412         * specific.c (pthread_key_delete): Check th->p_terminated to see
5413         if the thread is running.
5415         * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
5416         Added to GLIBC_2.0 for libc.so.
5418 1999-02-12  H.J. Lu  <hjl@gnu.org>
5420         * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
5421         __libc_allocate_rtsig): Added to GLIBC_2.1.
5423         * internals.h (DEFAULT_SIG_RESTART): Removed.
5424         (DEFAULT_SIG_CANCEL): Removed.
5426         * pthread.c (init_rtsigs, __libc_current_sigrtmin,
5427         __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
5428         (__pthread_sig_restart, __pthread_sig_cancel,
5429         __pthread_sig_debug): Initialized.
5430         (pthread_initialize): Call init_rtsigs () to initialize
5431         real-time signals.
5433 1999-02-03  H.J. Lu  <hjl@gnu.org>
5435         * manager.c (__pthread_manager): Do block __pthread_sig_debug.
5436         Don't restart the thread which sent REQ_DEBUG.
5437         (pthread_start_thread): Check if __pthread_sig_debug > 0
5438         before debugging.
5440         * pthread.c (__pthread_initialize_manager): Suspend ourself
5441         after sending __pthread_sig_debug to gdb instead of
5442         __pthread_sig_cancel.
5444 1999-01-24  H.J. Lu  <hjl@gnu.org>
5446         * manager.c (__pthread_manager): Delete __pthread_sig_debug
5447         from mask if __pthread_sig_debug > 0.
5448         (pthread_handle_create): Increment __pthread_handles_num.
5450         * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
5451         * pthread.c (__pthread_initialize_manager): Likewise.
5453         * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
5454         instead of __libc_allocate_rtsig (2).
5455         (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
5456         instead of __pthread_sig_cancel.
5457         (pthread_handle_sigdebug): Fix comments.
5459 1999-01-21  Ulrich Drepper  <drepper@cygnus.com>
5461         * manager.c (pthread_allocate_stack): Set
5462         __pthread_nonstandard_stacks if user-specified stack is used.
5464 1999-01-16  Ulrich Drepper  <drepper@cygnus.com>
5466         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
5467         _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
5469 1999-01-07  Xavier Leroy  <Xavier.Leroy@inria.fr>
5471         * pthread.c: Use a third signal __pthread_sig_debug distinct
5472         from __pthread_sig_cancel to notify gdb when a thread is
5473         created
5474         * manager.c: Likewise.
5475         * internals.h: Likewise.
5476         * signals.c: The implementation of sigwait(s) assumed that
5477         all signals in s have signal handlers already attached.
5478         This is not required by the standard, so make it work
5479         also if some of the signals have no handlers.
5481 1999-01-05  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
5483         * linuxthreads.texi: Remove pointers from first @node.  Move old
5484         @node spec inside comment.
5486 1998-12-31  Ulrich Drepper  <drepper@cygnus.com>
5488         * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
5489         _IO_lock_unlock.
5491 1998-12-29  Ulrich Drepper  <drepper@cygnus.com>
5493         * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
5494         lock.  Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
5496 1998-12-21  Ulrich Drepper  <drepper@cygnus.com>
5498         * manager.c: Threads now send __pthread_sig_cancel on termination.
5499         Change clone call and signal masks.
5500         * thread.c (pthread_handle_sigrestart): Remove special code for
5501         manager.
5502         (pthread_handle_sigcancel): In manager thread call
5503         __pthread_manager_sighandler.
5504         * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
5505         * sysdeps/i386/i686/pt-machine.h: Likewise.
5506         Patches by Xavier Leroy.
5508 1998-12-14  Ulrich Drepper  <drepper@cygnus.com>
5510         * spinlock.c (__pthread_unlock): Don't crash if called for an
5511         untaken mutex.  Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
5513         * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
5514         overall runtime.
5516 1998-12-13  Ulrich Drepper  <drepper@cygnus.com>
5518         * Examples/ex3.c: Wait until all threads are started before
5519         searching for the number to avoid race condition on very fast
5520         systems.
5522 1998-12-08  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5524         * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
5525         declaration since it's not needed.
5527         * sysdeps/pthread/pthread.h: Move internal functions to ...
5528         * internals.h: ...here.
5530 1998-12-02  H.J. Lu  <hjl@gnu.org>
5532         * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
5533         SIGRTMIN is defined.
5534         (__pthread_sig_cancel): Likewise.
5536 1998-12-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5538         * wrapsyscall.c: Include <sys/mman.h> for msync,
5539         <stdlib.h> for system and <termios.h> for tcdrain prototype.
5540         Correct msync declaration.
5542 1998-11-29  Roland McGrath  <roland@baalperazim.frob.com>
5544         * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
5545         __libc_tsd_set): New macros for new interface.
5546         * no-tsd.c: New file, provide uninitialized defns of
5547         __libc_internal_tsd_get and __libc_internal_tsd_set.
5548         * Makefile (routines): Add no-tsd.
5550 1998-10-12  Roland McGrath  <roland@baalperazim.frob.com>
5552         * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
5553         * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
5554         __libc_internal_tsd_set): Move decls to ...
5555         * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
5556         declarations.
5558         * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
5559         __libc_internal_tsd_set): Make these pointers to functions, not
5560         functions; remove #pragma weak decls for them.
5561         * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
5562         Define static functions and initialized pointers to them.
5564 1998-11-18  Ulrich Drepper  <drepper@cygnus.com>
5566         * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
5567         (CFLAGS-specific.c): Likewise.
5568         (CFLAGS-pthread.c): Likewise.
5569         (CFLAGS-ptfork.c): Likewise.
5570         (CFLAGS-cancel.c): Likewise.
5571         * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
5572         as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
5574         * mutex.c (pthread_mutex_init): Define as strong symbol.
5575         (pthread_mutex_destroy): Likewise.
5576         (pthread_mutex_trylock): Likewise.
5577         (pthread_mutex_lock): Likewise.
5578         (pthread_mutex_unlock): Likewise.
5579         (pthread_mutexattr_init): Likewise.
5580         (pthread_mutexattr_destroy): Likewise.
5581         (pthread_once): Likewise.
5582         * ptfork.c (pthread_atfork): Likewise.
5583         * specific.c (pthread_key_create): Likewise.
5584         (pthread_setspecific): Likewise.
5585         (pthread_getspecific): Likewise.
5587 1998-11-15  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
5589         * linuxthreads.texi: Fix punctuation after xref.
5591 1998-11-10  H.J. Lu  <hjl@gnu.org>
5593         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
5594         if it is defined in <linux/limits.h>.
5596 1998-10-29 14:28  Ulrich Drepper  <drepper@cygnus.com>
5598         * spinlock.h (__pthread_trylock): Define inline.
5599         (__pthread_lock): Add extra parameter to declaration.  Declare
5600         using internal_function.
5601         (__pthread_unlock): Declare using internal_function.
5602         * spinlock.c (__pthread_lock): Add new parameter.  Use it instead
5603         of local variable self.  Avoid recomputing self.  Define using
5604         internal_function.
5605         (__pthread_trylock): Remove.
5606         (__pthread_unlock): Define using internal_function.
5607         * cancel.c: Adjust for __pthread_lock interface change.  Use already
5608         computed self value is possible.
5609         * condvar.c: Likewise.
5610         * join.c: Likewise.
5611         * manager.c: Likewise.
5612         * mutex.c: Likewise.
5613         * pthread.c: Likewise.
5614         * rwlock.c: Likewise.
5615         * semaphore.c: Likewise.
5616         * signals.c: Likewise.
5618 1998-10-27 13:46  Ulrich Drepper  <drepper@cygnus.com>
5620         * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
5621         __ to field names of the struct.
5622         * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
5623         Likewise.
5624         (pthread_attr_t): Likewise.
5625         (pthread_cond_t): Likewise.
5626         (pthread_condattr_t): Likewise.
5627         (pthread_mutex_t): Likewise.
5628         (pthread_mutexattr_t): Likewise.
5629         (pthread_rwlock_t): Likewise.
5630         (pthread_rwlockattr_t): Likewise.
5631         * attr.c: Adjust for pthread.h and pthreadtypes.h change.
5632         * cancel.c: Likewise.
5633         * condvar.c: Likewise.
5634         * manager.c: Likewise.
5635         * mutex.c: Likewise.
5636         * pthread.c: Likewise.
5637         * ptlongjmp.c: Likewise.
5638         * rwlock.c: Likewise.
5639         * spinlock.c: Likewise.
5641 1998-10-09  Ulrich Drepper  <drepper@cygnus.com>
5643         * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
5644         also with PT_EI.
5646         * sysdeps/i386/i686/pt-machine.h: Remove unused inline
5647         definitions.
5649         * Makefile (libpthread-routines): Add pt-machine.
5650         * pt-machine.c: New file.
5651         * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
5652         yet defined.  Use PT_EI in extern inline definitions.
5653         * sysdeps/arm/pt-machine.h: Likewise.
5654         * sysdeps/i386/pt-machine.h: Likewise.
5655         * sysdeps/i386/i686/pt-machine.h: Likewise.
5656         * sysdeps/m68k/pt-machine.h: Likewise.
5657         * sysdeps/mips/pt-machine.h: Likewise.
5658         * sysdeps/powerpc/pt-machine.h: Likewise.
5659         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
5660         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
5662 1998-10-02  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5664         * semaphore.h: Include <sys/types.h> so that _pthread_descr
5665         is declared.
5667 1998-09-15  David S. Miller  <davem@pierdol.cobaltmicro.com>
5669         * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
5670         argument.
5671         * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
5673 1998-09-12 14:24 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
5675         * sysdeps/unix/sysv/linux/bits/sigthread.h: Add multiple inclusion
5676         guard.
5678 1998-09-02 11:08  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
5680         * signals.c (sigaction): Check that sig is less than NSIG to avoid
5681         array index overflow.
5683 1998-09-06 10:56  Ulrich Drepper  <drepper@cygnus.com>
5685         * sysdeps/pthread/semaphore.h: New file.
5687 1998-09-06 09:08  Ulrich Drepper  <drepper@cygnus.com>
5689         * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
5690         _LIBC_TSD_KEY_DL_ERROR.
5692 1998-08-31  Ulrich Drepper  <drepper@cygnus.com>
5694         * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
5695         * sysdeps/i386/pt-machine.h: Likewise.
5696         Suggested by Roland McGrath.
5698 1998-08-28 13:58  Ulrich Drepper  <drepper@cygnus.com>
5700         * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
5701         access thread data with non-constant offsets.
5702         * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
5703         necessary.
5705         * sysdeps/i386/useldt.h: Fix typo.  Add THREAD_GETMEM_NC and
5706         THREAD_SETMEM_NC definitions.
5708         * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
5709         THREAD_SETMEM_NC.
5710         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
5712 1998-08-26 15:46  Ulrich Drepper  <drepper@cygnus.com>
5714         * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
5715         not already defined.
5716         (struct _pthread_descr_struct): Add p_self and p_nr field.
5717         * manager.c (__pthread_handles): Define second element to point
5718         to manager thread.
5719         (__pthread_handles_num): Initialize to 2.
5720         (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
5721         (pthread_start_thread): Likewise.
5722         (pthread_handle_create): Start search for free slot at entry 2.
5723         Initialize new fields p_self and p_nr.
5724         Call __clone with CLONE_PTRACE if available.
5725         (pthread_free): Call FREE_THREAD_SELF if available.
5726         * pthread.c (__pthread_initial_thread): Initialize new fields.
5727         (__pthread_manager_thread): Likewise.
5728         (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
5730         * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
5731         elements of the thread descriptor.
5732         * condvar.c: Likewise.
5733         * errno.c: Likewise.
5734         * join.c: Likewise.
5735         * manager.c: Likewise.
5736         * pthread.c: Likewise.
5737         * ptlongjmp.c: Likewise.
5738         * semaphore.c: Likewise.
5739         * signals.c: Likewise.
5740         * specific.c: Likewise.
5741         * spinlock.c: Likewise.
5743         * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
5745         * sysdeps/i386/useldt.h: New file.
5746         * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
5748         * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
5749         THREAD_SETMEM using __thread_self.
5750         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
5752 1998-08-24  Geoff Keating  <geoffk@ozemail.com.au>
5754         * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
5755         turned out that we didn't need to queue after all.
5757 1998-08-22  Geoff Keating  <geoffk@ozemail.com.au>
5759         * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
5760         and wastes space; correct types.
5762 1998-08-08 11:18  H.J. Lu  <hjl@gnu.org>
5764         * signals.c (sigaction): Handle NULL argument.
5766 1998-08-04  Ulrich Drepper  <drepper@cygnus.com>
5768         * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
5769         of sigset_t.
5771 1998-08-02  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
5773         * Makefile (linuxthreads-version): Extract correct number from
5774         Banner.
5776 1998-07-29  Xavier Leroy  <Xavier.Leroy@inria.fr>
5778         * Banner: Bump version number to 0.8
5779         * FAQ.html: Many updates, in particular w.r.t. debugging.
5780         * manager.c: Support for non-default stacksize for
5781         LinuxThreads-allocated stacks;
5782         don't use guard pages for stacks with default size, rely on
5783         rlimit(RLIMIT_STACK) instead (it's cheaper).
5784         * attr.c: Likewise.
5785         * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
5786         everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
5787         * condvar.c: Likewise.
5788         * internals.h: Likewise.
5789         * restart.h: Likewise.
5790         * signals.c: Likewise.
5791         * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
5793 1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
5795         * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
5796         __pthread_mutexattr_[sg]ettype.  Add more weak aliases.
5797         * Versions: Put __pthread_mutexattr_settype under version
5798         GLIBC_2.0.  Don't export __pthread_mutexattr_setkind_np and
5799         __pthread_mutexattr_gettype.
5801 1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
5803         * sysdeps/pthread/bits/libc-lock.h: Make
5804         __pthread_mutexattr_settype weak.  Don't make
5805         __pthread_mutexattr_setkind_np weak.
5807 1998-07-16 10:52  Ulrich Drepper  <drepper@cygnus.com>
5809         * manager.c (pthread_handle_create): Check whether sched_setscheduler
5810         call can succeed here.
5812         * mutex.c: Define __pthread_mutexattr_settype and make
5813         __pthread_mutexattr_setkind_np an alias.
5814         Likewise for __pthread_mutexattr_gettype.
5816 1998-07-15 11:00 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
5818         * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
5819         is root.
5821 1998-07-14 19:38  Ulrich Drepper  <drepper@cygnus.com>
5823         * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
5825 1998-07-11  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5827         * Examples/ex6.c: Include <unistd.h> for usleep.
5829 1998-06-13 11:04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
5831         * Examples/ex4.c (main): Use exit, not pthread_exit.
5833 1998-07-09 13:39  Ulrich Drepper  <drepper@cygnus.com>
5835         * Versions: Add __pthread_mutexattr_gettype and
5836         __pthread_mutexattr_settype.
5837         * lockfile.c: Use __pthread_mutexattr_settype instead of
5838         __pthread_mutexattr_setkind_np.
5839         * mutex.c: Define __pthread_mutexattr_gettype and
5840         __pthread_mutexattr_settype.
5841         * weak.c: Likewise.
5842         * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
5843         __pthread_mutexattr_settype.
5844         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
5845         Use __pthread_mutexattr_settype.
5847 1998-07-08 22:26  Ulrich Drepper  <drepper@cygnus.com>
5849         * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
5850         * mutex.c: Define weak alias pthread_mutexattr_gettype and
5851         pthread_mutexattr_settype.
5852         * sysdeps/pthread/pthread.h: Declare these functions.
5853         Move pthread_sigmask and pthread_kill declaration in separate header.
5854         * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
5856 1998-07-07 15:20  Ulrich Drepper  <drepper@cygnus.com>
5858         * Makefile: Add rules to compile and run tests.
5859         * Examples/ex1.c: Little changes to fix warnings.
5860         * Examples/ex2.c: Likewise.
5861         * Examples/ex3.c: Likewise.
5862         * Examples/ex4.c: Likewise.
5863         * Examples/ex5.c: Likewise.
5864         * Examples/ex6.c: New file.
5866 1998-07-05 11:54  Ulrich Drepper  <drepper@cygnus.com>
5868         * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
5870 1998-07-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5872         * attr.c: Include <string.h>.
5874 1998-06-30 11:47  Ulrich Drepper  <drepper@cygnus.com>
5876         * attr.c: Include errno.h.  Use memcpy to copy sched_param.
5877         * internals.h: Include limits.h.
5878         * manager.c: Use memcpy to copy sched_param.
5879         * ptfork.c: Include errno.h.
5880         * pthread.c: Likewise.
5881         * semaphore.c: Likewise.
5882         * specific.c: Likewise.
5883         * spinlock.h: Likewise.
5884         * sysdeps/pthread/pthread.h: Include only allowed headers.  Move
5885         type definition to ...
5886         * sysdeps/pthread/bits/pthreadtypes.h: ...here.  New file.
5888 1998-06-29 12:34  Ulrich Drepper  <drepper@cygnus.com>
5890         * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
5892         * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
5893         as macros as demanded in POSIX.1, Annex C.
5895 1998-06-29 12:29  Ulrich Drepper  <drepper@cygnus.com>
5897         * internals.h (struct pthread_request): For free use pthread_t
5898         instead of pthread_descr.
5899         * join.c (pthread_join): Pass thread_id, not th to manager.
5900         (pthread_detach): Likewise.
5901         * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
5902         (pthread_exited): Remove detached queue code.
5903         (pthread_handle_free): Expect thread ID parameter and use it to
5904         validate the thread decsriptor.  Don't use detached queue.
5905         Patches by Xavier Leroy.
5907 1998-06-27  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
5909         * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
5910         _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
5911         __pthread_atfork, __pthread_key_create, __pthread_once.
5912         * internals.h: Doc fix.
5913         * pthread.c (__pthread_initialize): Define again.
5915 1998-06-26  Ulrich Drepper  <drepper@cygnus.com>
5917         * manager.c (pthread_exited): If thread is not detached put it on
5918         special list.
5919         (pthread_handle_free): If thread is not on list with living threads
5920         search on list with detached threads.
5922         * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
5923         for new definition of pthread_rwlock_t.
5925         * spinlock.c: Correct test whether to compile
5926         __pthread_compare_and_swap or not.
5928 1998-06-25 19:27  Ulrich Drepper  <drepper@cygnus.com>
5930         * attr.c: Finish user stack support.  Change locking code to be safe
5931         in situations with different priorities.
5932         * cancel.c: Likewise.
5933         * condvar.c: Likewise.
5934         * internals.h: Likewise.
5935         * join.c: Likewise.
5936         * manager.c: Likewise.
5937         * mutex.c: Likewise.
5938         * pthread.c: Likewise.
5939         * ptlongjmp.c: Likewise.
5940         * queue.h: Likewise.
5941         * rwlock.c: Likewise.
5942         * semaphore.c: Likewise.
5943         * semaphore.h: Likewise.
5944         * signals.c: Likewise.
5945         * spinlock.c: Likewise.
5946         * spinlock.h: Likewise.
5947         * sysdeps/pthread/pthread.h: Likewise.
5948         Patches by Xavier Leroy.
5950         * sysdeps/i386/i686/pt-machine.h: New file.
5952 1998-06-25  Ulrich Drepper  <drepper@cygnus.com>
5954         * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
5955         [sg]et_stackaddr prototypes always available.
5957         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5958         _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
5960 1998-06-24  Ulrich Drepper  <drepper@cygnus.com>
5962         * manager.c (pthread_free): Undo patch from 980430.
5963         Reported by David Wragg <dpw@doc.ic.ac.uk>.
5965 1998-06-09 15:07  Ulrich Drepper  <drepper@cygnus.com>
5967         * manager.c: Define __pthread_manager_adjust_prio and use it to
5968         increase priority when needed.
5969         * internals.h: Add prototype for __pthread_manager_adjust_prio.
5970         * mutex.c: Optimize mutexes to wake up only one thread.
5971         * pthread.c: Move PID of manager for global variable in structure
5972         element.
5973         Patches by Xavier Leroy.
5975 1998-06-07 13:47  Ulrich Drepper  <drepper@cygnus.com>
5977         * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
5979 1998-06-03  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5981         * attr.c: Correct typo.
5983 1998-05-01  Ulrich Drepper  <drepper@cygnus.com>
5985         * manager.c (pthread_free): Unmap guard before the stack.
5986         Patch by Matthias Urlichs.
5988 1998-04-30  Ulrich Drepper  <drepper@cygnus.com>
5990         * manager.c (pthread_free): Detect already free child.
5991         Patch by Xavier Leroy, reported by Matthias Urlichs.
5993 1998-04-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
5995         * Makefile (linuxthreads-version): Renamed back from
5996         libpthread-version.
5998 1998-04-21  Ulrich Drepper  <drepper@cygnus.com>
6000         * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
6001         __libc_longjmp.
6003 1998-04-20 14:55  Ulrich Drepper  <drepper@cygnus.com>
6005         * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
6006         * internals.h: Add definitions for new spinlock implementation.
6007         * ptlongjmp.c: New file.
6008         * spinlock.c: New file.
6009         * spinlock.h (acquire): Don't reschedule using __sched_yield, use
6010         new function __pthread_acquire to prevent deadlocks with thread
6011         with different priorities.
6012         Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
6014 1998-03-16  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6016         * manager.c (__pthread_manager): Reduce first argument to select
6017         to include just the needed file descriptor.
6019 1998-03-17 00:06  Ulrich Drepper  <drepper@cygnus.com>
6021         * manager.c: Fix last patch which caused core dumps.
6023         * pthread.c: Correctly handle missing SIGRTMIN.
6025 1998-03-15  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6027         * libpthread.map: Add __libc_internal_tsd_get and
6028         __libc_internal_tsd_set.  Add missing cancelable functions. Export
6029         libc internal versions of the cancelable functions.
6031 1998-03-13 16:51  Ulrich Drepper  <drepper@cygnus.com>
6033         * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
6035 1998-03-13 00:46  Ulrich Drepper  <drepper@cygnus.com>
6037         * attr.c: Implement pthread_attr_[gs]etguardsize,
6038         pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
6039         Change pthread_attr_init to have two interfaces.
6040         * internals.h (struct _pthread_descr_struct): Add new fields for
6041         above functions.
6042         * libpthread.map: Add names in GLIBC_2.1 section.
6043         * manager.c (pthread_handle_create): Implement guardsize and
6044         user stack.
6045         (pthread_free): Likewise.
6046         * pthread.c (pthread_create): Add new interface for changed
6047         pthread_attr_t.
6048         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
6049         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
6050         PTHREAD_STACK_MIN.
6052 1998-03-11 00:42  Wolfram Gloger  <wmglo@dent.med.uni-muenchen.de>
6054         * manager.c: Enable resetting of the thread scheduling policy
6055         to SCHED_OTHER when the parent thread has a different one.
6057 1998-02-01 13:51  Ulrich Drepper  <drepper@cygnus.com>
6059         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6060         _POSIX_ASYNCHRONOUS_IO.
6062         * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
6063         mutexes.
6064         * mutex.c: Implement new mutex types.
6066         * internals.h: Include <signal.h>.
6068         * libpthread.map: Add __erno_location and __h_errno_location.
6070         * errno.c: Return pointer to variable actually in use.  This might
6071         not be the one in the thread structure.
6072         * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
6073         and p_h_errnop.
6074         * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
6075         of manager thread structure.
6076         (pthread_handle_create): Set p_errnop and p_h_errnop members for new
6077         thread.
6078         * pthread.c: Adapt initializer for thread structures.
6079         (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
6080         (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
6081         current thread to global variables.
6083 1998-01-31 17:27  Ulrich Drepper  <drepper@cygnus.com>
6085         * rwlock.c: New file.
6086         * Makefile (libpthread-routines): Add rwlock.
6087         * sysdeps/pthread/pthread.h: Define data structures and declare
6088         functions.
6089         * libpthread.map: Add new functions.
6091 1997-12-18 13:50  Philip Blundell  <pb@nexus.co.uk>
6093         * sysdeps/arm/pt-machine.h: New file; add ARM support.
6094         * sysdeps/arm/Implies: likewise.
6095         * README: Document it.
6097 1997-12-13  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6099         * signals.c: Remove unneeded initializer for sigwaited, saving a
6100         warning.
6102 1997-04-11 01:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6104         * semaphore.c (sem_init): Set sem_spinlock only if available.
6106 1997-12-04 01:48  Ulrich Drepper  <drepper@cygnus.com>
6108         * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
6109         * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
6111         * Makefile: Update from LinuxThreads 0.7.
6112         * internals.h. Likewise.
6113         * manager.c: Likewise.
6114         * mutex.c: Likewise.
6115         * pthread.c: Likewise.
6116         * signals.c: Likewise.
6117         * specific.c: Likewise.
6118         * Examples/ex3.c: Likewise.
6120 1997-11-20 18:13  Ulrich Drepper  <drepper@cygnus.com>
6122         * pthread.c (__pthread_reset_main_thread): Close pipe only if still
6123         open.
6125 1997-10-29 05:38  Ulrich Drepper  <drepper@cygnus.com>
6127         * wrapsyscall.c: Add socket functions which are also cancelation
6128         points.
6130 1997-10-19 21:40  Wolfram Gloger  <wg@wolfram.dent.med.uni-muenchen.de>
6132         * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
6133         New functions for fast thread specific data within libc.
6135         * internals.h: Add new array p_libc_specific to struct
6136         _pthread_descr_struct.
6138         * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
6140 1997-10-13 05:39  Ulrich Drepper  <drepper@cygnus.com>
6142         * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
6143         Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
6145 1997-08-29 03:05  Ulrich Drepper  <drepper@cygnus.com>
6147         * internals.h (struct _pthread_descr_struct): Add definitions for
6148         two-level specific key handling.
6149         * manager.c (pthread_handle_create): Initialize specific memory array.
6150         * specific.c: Implement two-level key handling.
6151         * weaks.c: Don't provide dummy key handling.
6152         * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
6153         Add definition of __libc_key_t.
6154         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
6155         as 1024.
6156         Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
6157         PTHREAD_DESTRUCTOR_ITERATIONS.
6159         * manager.c (pthread_handle_create): Compare mmap result with
6160         MAP_FAILED.
6162         * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
6163         * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
6165 1997-08-22 19:04  Richard Henderson  <rth@cygnus.com>
6167         sysdeps/sparc -> sysdeps/sparc/sparc32
6168         sysdeps/sparc64 -> sysdeps/sparc/sparc64
6170         * internals.h: Change definition of THREAD_SELF to be an expression,
6171         not a statement that did a return.
6172         * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
6173         * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
6174         Follow Solaris and use a "system reserved" register (%g6) to hold
6175         the thread descriptor.
6176         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
6178 1997-08-03 00:09  Ulrich Drepper  <drepper@cygnus.com>
6180         * mutex.c: Correct pthread_once.  Patch by Xavier Leroy.
6181         * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
6182         * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
6184         * semaphore.c: Include spinlock.h only when needed.
6186         * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
6187         keys for entries not in use.
6189         * weaks.c: Implement key handling functions for real.
6191 1997-06-29  01:04  Richard Henderson  <richard@gnu.ai.mit.edu>
6193         Initial sparc64-linux support:
6194         * sysdeps/sparc64/Implies: New file.
6195         * sysdeps/sparc64/pt-machine.h: Likewise.
6197 1997-06-29 00:48  Ulrich Drepper  <drepper@cygnus.com>
6199         * semaphore.c: Include spinlock.h at correct place.
6200         Patch by HJ Lu.
6202 1997-06-13 10:06  Richard Henderson  <rth@tamu.edu>
6204         The Great Bit File Move:
6205         * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
6206         * sysdeps/powerpc/semaphorebits.h: Likewise.
6207         * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
6208         * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
6209         * sysdeps/pthread/libc-lock.h: -> bits/
6210         * sysdeps/pthread/stdio-lock.h: Likewise.
6211         * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
6212         * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
6213         * semaphore.h: Likewise.
6214         * sysdeps/pthread/pthread.h: Likewise.
6216         * lockfile.c: <foo.h> -> <bits/foo.h>.
6217         * semaphore.h: Likewise.
6219         * Makefile: (headers): foo.h -> bits/foo.h.
6220         * sysdeps/pthread/Makefile: Likewise.
6222 1997-04-11 01:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6224         * semaphore.c (sem_init): Set sem_spinlock only if available.
6226         * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
6227         asm constraints.
6229 1997-04-09 03:00  Ulrich Drepper  <drepper@cygnus.com>
6231         Update from LinuxThreads 0.6.
6233         * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
6234         and __sched_get_priority_min instead of names without `__'.
6236         * manager.c: Rewrite large parts to implement opaque pthread_t.
6238         * cancel.c: Adapt for opaque pthread_t type.
6239         * condvar.c: Likewise.
6240         * errno.c: Likewise.
6241         * join.c: Likewise.
6242         * mutex.c: Likewise.
6243         * pthread.c: Likewise.
6244         * signals.c: Likewise.
6245         * specific.c: Likewise.
6246         * restart.h: Likewise.
6247         * queue.h: Likewise.
6248         * Examples/ex3.c: Likewise.
6249         * Examples/ex4.c: Likewise.
6250         * sysdeps/pthread/pthread.h: Likewise.
6252         * pthread.c: Accumulate time for all threads in thread manager.
6254         * semaphore.c: Implement fallback implementation for architectures
6255         sometimes missing compare-exchange operations.
6257         * cancel.c (pthread_cancel): Validate handle argument.
6258         * join.c (pthread_join): Likewise.
6259         (pthread_detach): Likewise.
6260         * signals.c (pthread_kill): Likewise.
6262         * spinlock.h (acquire): Use __sched_yield not sched_yield.
6264         * queue.h (enqueue): Enqueue thread according to priority.
6266         * internals.c (struct pthread_start_args): New struct for passing
6267         args to cloning function.
6268         (struct _pthread): Rename to _pthread_descr_struct and adapt for
6269         opaque pthread_t.
6271         * Examples/Makefile (clean): Pass -f option to rm.
6273         * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
6274         and define TEST_FOR_COMPARE_AND_SWAP.
6275         * sysdeps/i386/i486/pt-machine.h: Removed.
6277         * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
6278         to 1024.
6280 1997-04-04 16:38  Ulrich Drepper  <drepper@cygnus.com>
6282         * restart.h (suspend): Clear p_signal before suspending.
6283         (suspend_with_cancellation): Likewise.
6284         Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
6286         * weaks.c: Make __pthread_key_create return 1.
6287         * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
6288         __libc_getspecific, __libc_setspecific, and __libc_key_t.
6289         * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
6290         using libio.
6292 1997-03-19 15:13  Miguel de Icaza  <miguel@nuclecu.unam.mx>
6294         * sysdeps/sparc/pt-machine (RELEASE): Fix.
6296 1997-03-01 07:55  Geoff Keating  <geoffk@ozemail.com.au>
6298         * sysdeps/powerpc/Implies: Added.
6299         * sysdeps/powerpc/pt-machine.h: Added.
6300         * sysdeps/powerpc/semaphorebits.h: Added.
6302 1997-01-22 01:22  Ulrich Drepper  <drepper@cygnus.com>
6304         * pthread.c (__pthread_initial_thread): Correct
6305         initializer.
6306         (__pthread_manager_thread): Likewise.
6307         Reported by Andreas Jaeger.
6309 1997-01-18 22:15  Richard Henderson  <rth@tamu.edu>
6311         Since sigset_t no longer fits in a register, we can't pass in the
6312         thread's initial mask so easily.  Take this opportunity to simplify
6313         the clone implementation by only accepting a single void* argument.
6315         * manager.c (__pthread_manager): Put thread vitals in the thread
6316         struct instead of as arguments through clone.
6317         (pthread_start_thread): Look for them there.
6318         * internals.h (struct _pthread): Add p_initial_fn,
6319         p_initial_fn_arg, p_initial_mask.  Fix __pthread_manager proto.
6320         * pthread.c (pthread_initialize_manager): Revise clone invocation.