Update.
[glibc.git] / linuxthreads / ChangeLog
blob56b412b5c6775e4a6743674f22c95cb49ef98f30
1 2004-10-05  Dwayne Grant McConnell  <dgm69@us.ibm.com>
3         * pthread.c: Mask restart signal during cancel signal handler.
5 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
7         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
8         _POSIX_THREAD_CPUTIME): Define to 0.
10 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
12         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Set _POSIX_CPUTIME
13         and _POSIX_THREAD_CPUTIME to zero.
14         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
16         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
17         _POSIX_THREAD_PROCESS_SHARED and _POSIX_CLOCK_SELECTION as -1.
18         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
19         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
20         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
22 2004-09-25  Roland McGrath  <roland@redhat.com>
24         [BZ #406]
25         * sysdeps/i386/i686/pt-machine.h: Don't #include "../useldt.h" if
26         [_TLS_H], since sysdeps/i386/tls.h includes it after including us.
28 2004-09-24  Roland McGrath  <roland@redhat.com>
30         [BZ #406]
31         * sysdeps/i386/tls.h: Move #include "useldt.h" outside
32         of [__ASSUME_LDT_WORKS > 0] test.
33         Reported by Carlos Velasco <carlos.velasco@newipnet.com>.
35 2004-09-21  Roland McGrath  <roland@redhat.com>
37         * Versions: Add comment about linuxthreads' frozen ABI.
39 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
41         * Versions: Remove exports for pthread_set*id_np functions.
42         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
43         for now.
44         * Makefile: Don't build pthread_set*id code for now.
46 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
48         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
49         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
50         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
51         and pthread_setresuid_np.
52         * pthread_setgid_np.c: New file.
53         * pthread_setuid_np.c: New file.
54         * pthread_setegid_np.c: New file.
55         * pthread_seteuid_np.c: New file.
56         * pthread_setregid_np.c: New file.
57         * pthread_setreuid_np.c: New file.
58         * pthread_setresgid_np.c: New file.
59         * pthread_setresuid_np.c: New file.
60         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
61         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
62         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
63         and pthread_setresuid_np.
64         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
65         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
66         pthread_setregid, and pthread_setresgid.
68 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
70         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
71         for __USE_XOPEN2K.
72         * sysdeps/pthread/bits/pthreadtypes.h: Define rwlock types also
73         for __USE_XOPEN2K.  [BZ #320]
75 2004-09-04  Jakub Jelinek  <jakub@redhat.com>
77         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
79 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
81         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
82         the initialization function might throw.
84 2004-08-30  Roland McGrath  <roland@frob.com>
86         * Makefile (libpthread-abi-frozen): New variable.
88 2004-08-26  Roland McGrath  <roland@redhat.com>
90         * configure.in: New file.  If nptl add-on is also selected, barf if
91         explicit and elide ourselves if implicit.
92         * configure: Now generated.
94 2004-08-25  Richard Sandiford  <rsandifo@redhat.com>
96         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h (CENABLE, CDISABLE,
97         __local_multiple_threads): Fix definitions for IS_IN_librt.
98         * sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h: Likewise.
100 2004-08-22  Andreas Schwab  <schwab@suse.de>
102         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO) [IS_IN_librt]:
103         Save gp around CENABLE/CDISABLE calls.
105 2004-08-15  Roland McGrath  <roland@frob.com>
107         * pthread_atfork.c: Update copyright terms including special exception
108         for these trivial files, which are statically linked into executables
109         that use dynamic linking for the significant library code.
111 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
113         * libc-tsd.c: Move resolv.h include before the #if.
114         (__res_maybe_init): New function.  Add libc_hidden_def.
116 2004-08-02  Ulrich Drepper  <drepper@redhat.com>
118         * linuxthreads.texi (Cleanup Handlers): Fix typo.
119         Reported by Bjoern Engelmann <bjengelmann@gmx.de>.
121 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
123         [BZ #284]
124         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
125         instead of clockid_t.
127 2004-07-21  Roland McGrath  <roland@redhat.com>
129         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
131 2004-07-02  Roland McGrath  <roland@redhat.com>
133         * configure: Don't exit.
135 2004-07-20  Alexandre Oliva  <aoliva@redhat.com>
137         * sysdeps/mips/pt-machine.h: Use standard names for ABI macros,
138         include sgidefs.h.
139         * sysdeps/mips/atomicity.h: Likewise.
141 2004-07-19  Alexandre Oliva  <aoliva@redhat.com>
143         * sysdeps/unix/sysv/linux/mips/Makefile (CFLAGS-pt-initfini.s):
144         Remove redundant override that missed -g0.
146 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
148         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
149         (__local_multiple_threads): Define for librt.
150         (SINGLE_THREAD_P): Likewise.
152 2004-07-07  Jakub Jelinek  <jakub@redhat.com>
154         * sysdeps/pthread/getcpuclockid.c (pthread_getcpuclockid): Allow
155         using other thread's clock.
156         * ptclock_gettime.c (__pthread_clock_gettime): Likewise.
157         * ptclock_settime.c (__pthread_clock_settime): Likewise.
158         * internals.h (__pthread_clock_gettime, __pthread_clock_settime):
159         Remove prototypes.
160         Reported by Bernd Schmidt <bernds@redhat.com>.
161         * Makefile (librt-tests): Add tst-clock1.
162         * tst-clock1.c: New test.
164         * sysdeps/x86_64/Versions: New file.
165         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
166         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
168 2004-04-16  Andreas Schwab  <schwab@suse.de>
170         * sysdeps/ia64/tls.h (INIT_SYSINFO): Cast dl_sysinfo to void*.
172 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
174         * sysdeps/s390/pspinlock.c (__pthread_spin_lock,
175         __pthread_spin_trylock): Use constraint "m" instead of "0" for
176         futex.
177         * sysdeps/ia64/pt-machine.h (__compare_and_swap,
178         __compare_and_swap_with_release_semantic, testandset): Use
179         constraint "m" instead of "0" for futex.
181 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
183         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Fix
184         branch offset for a PLT entry.
185         (CDISABLE): Likewise.
187 2004-05-31  Andreas Jaeger  <aj@suse.de>
189         * sysdeps/unix/sysv/linux/mips/Makefile (CFLAGS-pt-initfini.s):
190         Set to -fno-unit-at-a-time.
191         Patch by Dan Kegel <dank@kegel.com>.
193 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
195         * tst-stack1.c: Don't include mcheck.h.
196         (do_test): Make sure user defined stacks aren't reused,
197         don't free them at the end.  [BZ #110]
199 2004-05-02  Jakub Jelinek  <jakub@redhat.com>
201         * manager.c: Include not-cancel.h.
202         (__pthread_manager): Use read_not_cancel instead of __libc_read.
203         (pthread_start_thread, __pthread_manager_sighandler): Use
204         write_not_cancel instead of __libc_write.
205         (pthread_reap_children): Use waitpid_not_cancel instead of
206         __libc_waitpid.
207         * pthread.c: Include not-cancel.h.
208         (__pthread_initialize_minimal, __pthread_create_2_1,
209         pthread_onexit_process, __pthread_message): Use
210         write_not_cancel instead of __libc_write.
211         (__pthread_initialize_manager): Likewise.  Use close_not_cancel
212         instead of __libc_close.
213         (__pthread_reset_main_thread): Use close_not_cancel instead of
214         __libc_close.
215         * join.c: Include not-cancel.h.
216         (__pthread_do_exit, pthread_join, pthread_detach): Use
217         write_not_cancel instead of __libc_write.
218         * semaphore.c: Include not-cancel.h.
219         (__new_sem_post): Use write_not_cancel instead of __libc_write.
220         * specific.c: Include not-cancel.h.
221         (pthread_key_delete): Use write_not_cancel instead of __libc_write.
223 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
225         * Versions (libc): Add __on_exit and __libc_sigaction.
227 2004-04-28  Jakub Jelinek  <jakub@redhat.com>
229         * semaphore.c (sem_timedwait): Return -1 and set errno instead of
230         returning error number [BZ #133].  Patch by <rmhaddad@yahoo.com>.
232 2004-04-22  SUGIOKA Toshinobu  <sugioka@itonet.co.jp>
234         * sysdeps/unix/sysv/linux/sh/vfork.S: Fix wrong function pointer
235         reference in PIC case.
237 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
239         * oldsemaphore.c (SEM_VALUE_MAX): Remove.
241 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
243         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Define
244         for librt.  Save the return value to a safe register.
245         (CDISABLE): Define for librt.  Set the function argument correctly.
247 2004-04-18  Jakub Jelinek  <jakub@redhat.com>
249         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
250         (PSEUDO_CANCEL): Define.
251         (PSEUDO): Use it.
252         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
253         CDISABLE): For librt, append @PLT.
255 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
257         * sysdeps/x86_64/tls.h [!__ASSEMBLER__]: Include tcb-offsets.h.
259         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
260         return it_value { 0, 0 }.
261         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
262         like SIGEV_SIGNAL.
263         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
264         assertion for SIGEV_NONE.
265         (thread_attr_compare): Compare all attributes, not just a partial
266         subset.
268         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
270 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
272         * semaphore.h (SEM_VALUE_MAX): Just use a plain number.
274 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
276         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix last patch.
278 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
280         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
282 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
284         * sysdeps/unix/sysv/linux/mq_notify.c: New file.
286         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE): Define
287         for librt.
288         (CDISABLE): Likewise.
290 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
292         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
293         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
294         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
295         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
296         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
297         Define.
298         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
299         (_POSIX_MESSAGE_PASSING): Define.
301 2004-04-10  Andreas Jaeger  <aj@suse.de>
303         * sysdeps/x86_64/pt-machine.h: Add used attribute to stack_pointer
304         to avoid warnings with GCC 3.5.
306 2004-04-09  Steven Munroe  <sjmunroe@us.ibm.com>
308         * sysdeps/powerpc/tls.h (TLS_INIT_TP): Eliminate lvalue cast from
309         __thread_self assignment.
310         (THREAD_DTV): Replace __thread_register with __thread_self.
311         (INIT_THREAD_SELF): Eliminate lvalue cast from __thread_self
312         assignment.
314 2004-04-08  Alexandre Oliva  <aoliva@redhat.com>
316         * signals.c (pthread_sigmask): Don't ever block or mask
317         __pthread_sig_debug.
319 2004-03-11  Steven Munroe  <sjmunroe@us.ibm.com>
321         * sysdeps/powerpc/tls.h: Remove __powerpc64__ conditional.
323 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
325         * sysdeps/ia64/pt-machine.h (BUSY_WAIT_NOP): Define.
326         * sysdeps/x86_64/pt-machine.h (BUSY_WAIT_NOP): Likewise.
328 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
330         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add HOST_NAME_MAX.
331         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
332         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
333         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
335 2004-03-08  Andreas Jaeger  <aj@suse.de>
337         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT_KERNEL_CHECK):
338         dl_osversion is readonly.
340 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
342         * sysdeps/i386/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
343         _rtlf_global_ro.
344         * sysdeps/ia64/tls.h (INIT_SYSINFO): Likewise.
346 2004-02-20  Steven Munroe  <sjmunroe@us.ibm.com>
348         * sysdeps/unix/sysv/linux/powerpc/ptlongjmp.c [SHARED]: Code only
349         valid for SHARED case.  Correct spelling of __vmx_longjmp.
351         * sysdeps/powerpc/pspinlock.c: Move from here.
352         * sysdeps/powerpc/powerpc32/pspinlock.c: To here.
353         * sysdeps/powerpc/powerpc64/pspinlock.c: New file.
354         * sysdeps/powerpc/powerpc64/pt-machine.h: Define __compare_and_swap32
355         and __compare_and_swap32_with_release_semantics.
357 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
359         * Makefile (generated): Remove tst-stack1.mtrace and tst-stack1-mem.
360         (tests): Remove $(objpfx)tst-stack1-mem.
361         (tst-stack1-ENV): Remove.
362         ($(objpfx)tst-stack1-mem): Remove.
364         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
365         (__syscall_error_handler2): Call CDISABLE.
366         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
367         (__syscall_error_handler2): Call CDISABLE.
369         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
371 2004-02-10  Steven Munroe  <sjmunroe@us.ibm.com>
373         * Makefile (libpthread-routines): Add ptcleanup.
374         * ptlongjmp.c: Removed.
375         * ptcleanup.c: Copied __pthread_cleanup_upto to here. New file.
376         * sysdeps/pthread/ptlongjmp.c: Copied longjmp to here. New file.
377         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
378         Version longjmp, siglongjmp for GLIBC_2.3.4.
379         * sysdeps/unix/sysv/linux/powerpc/ptlongjmp.c: New File.
381 2004-01-22  Andreas Jaeger  <aj@suse.de>
383         * spinlock.c (__pthread_lock): Fix contraint to avoid warning.
384         (__pthread_release): Likewise.
386 2004-01-16  Richard Henderson  <rth@redhat.com>
388         * attr.c: Include ldsodefs.h.
389         (pthread_getattr_np): Don't declare __libc_stack_end.
391 2004-01-09  Steven Munroe  <sjmunroe@us.ibm.com>
393         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
394         [!HAVE_TLS_SUPPORT]: Define SINGLE_THREAD_P using static
395         __lib*_multiple_threads.
396         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
397         [!HAVE_TLS_SUPPORT]: Likewise.
399 2004-01-13  Roland McGrath  <roland@redhat.com>
401         * sysdeps/powerpc/tcb-offsets.sym: Put -- separator line before any
402         conditionals.
404 2004-01-10  Andreas Jaeger  <aj@suse.de>
406         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Add cfi directives.
408 2004-01-01  Andreas Jaeger  <aj@suse.de>
410         * Makefile (generated): Add missing files.
412 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
414         * attr.c (pthread_getattr_np): Make sure stack info returned for
415         main thread does not overlap with any other VMA.
416         Patch by Jakub Jelinek.
418 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
420         * sysdeps/ia64/tls.h: Include dl-sysdep.h.
421         (INIT_SYSINFO): Define.
422         (TLS_INIT_TP): Use it.
424 2003-12-28  Carlos O'Donell  <carlos@baldric.uwo.ca>
426         * attr.c (pthread_getattr_np): Add _STACK_GROWS_UP case.
428 2003-12-26  Jakub Jelinek  <jakub@redhat.com>
430         * sysdeps/pthread/pthread.h (pthread_setcancelstate,
431         pthread_setcanceltype, pthread_cancel, pthread_testcancel): Remove
432         __THROW.
433         * semaphore.h (sem_wait, sem_timedwait): Likewise.
435 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
437         * manager.c (pthread_free): Call _dl_deallocate_tls even for
438         p_userstack threads.
439         * pthread.c (__pthread_initialize_manager): Call _dl_deallocate_tls
440         on error.
441         (pthread_onexit_process): Update comment.
442         * Makefile (tests): Add tst-stack1.  Depend on $(objpfx)tst-stack1-mem.
443         (generated): Add tst-stack1.mtrace and tst-stack1-mem.
444         (tst-stack1-ENV): Set.
445         ($(objpfx)tst-stack1-mem): New.
446         * tst-stack1.c: New test.
448 2003-12-16  Steven Munroe  <sjmunroe@us.ibm.com>
450         * sysdeps/powerpc/tcb-offsets.sym [!__powerpc64__]: Remove
451         conditional so MULTIPLE_THREADS_OFFSET is generated for both.
452         * sysdeps/powerpc/tls.h [!__powerpc64__]: Remove conditional
453         so TLS_MULTIPLE_THREADS_IN_TCB is generated for both.
454         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h:
455         Include tls.h.
457 2003-12-04  Steven Munroe  <sjmunroe@us.ibm.com>
459         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
460         (SINGLE_THREAD_P): Test using thread local p_multiple_threads field.
462 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
464         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Update copyright
465         message.  Add include of <stddef.h>.
466         (INIT_NEW_WAY): New macro.
467         (INIT_OLD_WAY): Likewise.
468         (_init): Add unwind directives.  Invoke
469         __pthread_initialize_minimal() via INIT_NEW_WAY or INIT_OLD_WAY,
470         respectively.
471         (_init_EPILOG_BEGINS): Add unwind-directives.  Drop unused .regstk
472         directive.
473         (_fini): Add unwind directives.  Drop unnecessary .align 16
474         directive (bundles are always 16-byte aligned).
475         (_fini_EPILOG_BEGINS): Add unwind-directives.
477 2003-11-19  David Mosberger  <davidm@hpl.hp.com>
479         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
481 2003-12-10  Andreas Jaeger  <aj@suse.de>
482             Ruediger Oertel  <ro@suse.de>
484         * sysdeps/alpha/elf/pt-initfini.c (__asm__): Remove extra .prologue.
486 2003-11-30  Andreas Jaeger  <aj@suse.de>
488         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
489         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
490         Likewise.
492 2003-11-04  Jakub Jelinek  <jakub@redhat.com>
494         * signals.c (__pthread_sigaction): Set __sighandler[sig].old before
495         __libc_sigaction if it has been one of the special values before.
497 2003-10-06  Carlos O'Donell <carlos@baldric.uwo.ca>
499         * pthread.c (__pthread_self_stack): _STACK_GROWS_UP case added.
500         (__pthread_find_self): Likewise.
501         * manager.c (thread_segment): _STACK_GROWS_UP case added.
503 2003-10-10  Carlos O'Donell  <carlos@baldric.uwo.ca>
505         * linuxthreads/sysdeps/unix/sysv/linux/hppa/malloc-machine.h: New file.
507 2003-10-10  Carlos O'Donell  <carlos@baldric.uwo.ca>
509         * sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h: New file.
511 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
513         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
514         changes.
515         (SAVE_OLDTYPE_0): Fix a typo.
517 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
519         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
520         correct offset.
522 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
524         * Makefile (tests): Add tst-cancel8.
525         * tst-cancel8.c: New test.
527 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
529         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
530         restoring of the old cancellation type.
532 2003-09-10  Chris Demetriou  <cgd@broadcom.com>
534         * sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h: New file.
536 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
538         * sysdeps/pthread/malloc-machine.h [!__libc_maybe_call2] (mutex_init,
539         mutex_lock, mutex_trylock, mutex_unlock): Remove.
541 2003-09-27  Wolfram Gloger  <wg@malloc.de>
543         * sysdeps/pthread/malloc-machine.h: New file.
545 2003-09-18  H.J. Lu  <hongjiu.lu@intel.com>
547         * attr.c (__pthread_attr_init_2_1): Double __guardsize size
548         if NEED_SEPARATE_REGISTER_STACK is defined.
550 2003-09-22  Philip Blundell  <philb@gnu.org>
552         * forward.c: Add _pthread_cleanup_push, _pthread_cleanup_pop.
553         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
554         Likewise.
555         * pthread.c (__pthread_elements): Initialise these new elements.
556         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Use
557         __libc_maybe_call.
558         (__libc_cleanup_pop): Likewise.
560 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
562         * attr.c: Include stdlib.h.
564 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
566         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
568         * tst-attr1.c: New test.
569         * Makefile (tests): Add tst-attr1.
571 2003-09-17  Philip Blundell  <philb@gnu.org>
573         * sysdeps/unix/sysv/linux/arm/vfork.S: Branch to fork if
574         libpthread is loaded.  Elide backwards compatibility code when not
575         required.
577 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
579         * descr.h (manager_thread): Rename to...
580         (__pthread_manager_threadp): ... this.
581         * pthread.c (manager_thread): Define to __pthread_manager_threadp.
582         (__pthread_manager_threadp): New variable.
583         * internals.h (__manager_thread): Define to
584         __pthread_manager_threadp if USE_TLS.
586 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
588         * sysdeps/i386/Makefile (CFLAGS-cancel.c, CFLAGS-manager.c,
589         CFLAGS-pthread.c, CFLAGS-sighandler.c): Add
590         -mpreferred-stack-boundary=4.
592 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
594         * attr.c (pthread_getattr_np): Correctly fill in the stack-related
595         values for the initial thread.
597 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
599         * pthread.c (manager_thread): Remove static, add attribute_hidden.
600         (thread_self_stack): Rename to...
601         (__pthread_self_stack): ... this.  Remove static.
602         (pthread_handle_sigcancel): Use check_thread_self ().
603         (pthread_handle_sigrestart): Likewise.
604         * sighandler.c (__pthread_sighandler, __pthread_sighandler_rt):
605         Likewise.
606         * descr.h (manager_thread): Declare.
607         * internals.h (__pthread_self_stack): New prototype.
608         (__manager_thread): Define.
609         (check_thread_self): New function.
611 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
613         * Makefile (CFLAGS-mutex.c): Add $(uses-callbacks).
614         (CFLAGS-sighandler.c): Change $(exceptions) into $(uses-callbacks).
616 2003-09-12  Jakub Jelinek  <jakub@redhat.com>
618         * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: New.
619         (__SSIZE_T_TYPE): Define to __SWORD_TYPE for gcc 2.95.x and
620         __SLONGWORD_TYPE otherwise.
622 2003-09-11  Steven Munroe  <sjmunroe@us.ibm.com>
624         * sysdeps/powerpc/powerpc64/pt-machine.h [MEMORY_BARRIER]: Use lwsync.
625         [READ_MEMORY_BARRIER]: Define.
626         [WRITE_MEMORY_BARRIER]: Define.
628 2003-09-10  Jakub Jelinek  <jakub@redhat.com>
630         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Move
631         ptr___pthread_cond_timedwait to the end of the structure to avoid
632         breaking Wine unnecessarily.
634 2003-09-08  Jakub Jelinek  <jakub@redhat.com>
636         * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: Remove.
638 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
640         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
641         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
642         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
643         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
644         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
645         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
646         * attr.c (__old_pthread_attr_setstacksize,
647         __old_pthread_attr_setstack): New functions.
648         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
649         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
650         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
651         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
652         * tststack.c: Include limits.h and sys/param.h.
653         (main): Set size to MAX (70 * 1024, PTHREAD_STACK_MIN).
655         * barrier.c (__pthread_barrierattr_getpshared): Always
656         return PTHREAD_PROCESS_PRIVATE.
657         (pthread_barrierattr_setpshared): Return EINVAL if pshared
658         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
660 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
662         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
663         (DL_SYSINFO_IMPLEMENTATION): Add CFI and make sure the code ends
664         up in .text.
666         * barrier.c (pthread_barrierattr_setpshared): We don't handle
667         inter-process barriers.
669 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
671         * Makefile (tests): Add tst-tls1.
672         (module-names): Add tst-tls1mod{,a,b,c,d,e,f}.
673         ($(objpfx)tst-tls1mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
674         ($(objpfx)tst-tls1): New.
675         ($(objpfx)tst-tls2.out): Likewise.
676         (tests): Depend on $(objpfx)tst-tls2.out.
677         * tst-tls1.c: New test.
678         * tst-tls1.h: New.
679         * tst-tls1mod.c: New.
680         * tst-tls1moda.c: New.
681         * tst-tls1modb.c: New.
682         * tst-tls1modc.c: New.
683         * tst-tls1modd.c: New.
684         * tst-tls1mode.c: New.
685         * tst-tls1modf.c: New.
686         * tst-tls2.sh: New test.
688         * internals.h (__pthread_cond_timedwait): New prototype.
689         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
690         ptr___pthread_cond_timedwait.
691         * pthread.c (__pthread_functions): Initialize them.
692         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
693         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
694         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
695         pthread_cond_timedwait@@GLIBC_2.3.2.
697 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
699         * sysdeps/pthread/pthread.h: Don't mark pthread_exit,
700         pthread_join, pthread_cond_wait, and pthread_cond_timedwait with
701         __THROW to match NPTL.
703 2003-08-13  Ulrich Drepper  <drepper@redhat.com>
705         * sysdeps/pthread/Makefile [subdir=rt] (CPPFLAGS): Add
706         -DBROKEN_THREAD_SIGNALS.
708 2003-08-11  Steven Munroe  <sjmunroe@us.ibm.com>
710         * manager.c (pthread_start_thread) [!(USE_TLS && HAVE___THREAD)]:
711         Correct spelling of per thread resolver state.
713 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
715         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
716         (__rtld_lock_default_lock_recursive,
717         __rtld_lock_default_unlock_recursive): Define.
718         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
719         __rtld_lock_unlock_recursive): Define using
720         GL(_dl_rtld_*lock_recursive).
721         * pthread.c (pthread_initialize): Initialize _dl_rtld_lock_recursive
722         and _dl_rtld_unlock_recursive.  Lock GL(_dl_load_lock) the same
723         number of times as GL(_dl_load_lock) using non-mt implementation was
724         nested.
726 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
728         * sysdeps/pthread/bits/typesizes.h (__SSIZE_T_TYPE): Define.
729         * sysdeps/unix/sysv/linux/alpha/bits/typesizes.h (__SSIZE_T_TYPE):
730         Likewise.
731         * sysdeps/unix/sysv/linux/sparc/bits/typesizes.h (__SSIZE_T_TYPE):
732         Likewise.
733         * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: New file.
735         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
736         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
737         PTHREAD_STACK_MIN in comments.
739         * sysdeps/alpha/pt-machine.h (PT_EI): Add
740         __attribute__((always_inline)).
741         * sysdeps/arm/pt-machine.h (PT_EI): Likewise.
742         * sysdeps/cris/pt-machine.h (PT_EI): Likewise.
743         * sysdeps/hppa/pt-machine.h (PT_EI): Likewise.
744         * sysdeps/i386/i686/pt-machine.h (PT_EI): Likewise.
745         * sysdeps/i386/pt-machine.h (PT_EI): Likewise.
746         * sysdeps/ia64/pt-machine.h (PT_EI): Likewise.
747         * sysdeps/m68k/pt-machine.h (PT_EI): Likewise.
748         * sysdeps/mips/pt-machine.h (PT_EI): Likewise.
749         * sysdeps/powerpc/powerpc32/pt-machine.h (PT_EI): Likewise.
750         * sysdeps/powerpc/powerpc64/pt-machine.h (PT_EI): Likewise.
751         * sysdeps/s390/s390-32/pt-machine.h (PT_EI): Likewise.
752         * sysdeps/s390/s390-64/pt-machine.h (PT_EI): Likewise.
753         * sysdeps/sh/pt-machine.h (PT_EI): Likewise.
754         * sysdeps/sparc/sparc32/pt-machine.h (PT_EI): Likewise.
755         * sysdeps/sparc/sparc64/pt-machine.h (PT_EI): Likewise.
756         * sysdeps/x86_64/pt-machine.h (PT_EI): Likewise.
757         * spinlock.h (__pthread_set_own_extricate_if): Likewise.
758         * sysdeps/ia64/tls.h (TLS_INIT_TP): Cast tcbp to __typeof
759         (__thread_self).
760         * Examples/ex13.c (main): Change res type to void * to avoid
761         warnings.
762         * tst-cancel.c (cleanup, inner, tf1, tf2, tf3): Comment out.
764 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
766         * pthread.c (init_one_static_tls, __pthread_init_static_tls): New
767         functions.
768         (pthread_initialize): Initialize GL(dl_init_static_tls).
770 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
772         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
773         before __timer_dealloc.
774         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
775         Don't call list_unlink.
777 2003-07-29  Roland McGrath  <roland@redhat.com>
779         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
781 2003-07-25  Roland McGrath  <roland@redhat.com>
783         * manager.c (pthread_start_thread): Fix typo in last change.
785 2003-07-14  Guido Guenther  <agx@sigxcpu.org>
787         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: Add IS_IN_librt,
788         use L() for local labels.
790 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
792         * descr.h (struct _pthread_descr_struct): Provide p_res member
793         even if USE_TLS && HAVE___THREAD.
794         * sysdeps/pthread/res-state.c (__res_state): Return __resp
795         if USE___THREAD.
796         * manager.c: Include resolv.h.
797         (pthread_start_thread): Initialize __resp.
798         * libc-tls-loc.c (__res_state): Return __resp.
799         * Makefile (tests): Add tst-_res1.
800         (modules-names, extra-objs, test-extras, test-modules): Add support
801         for test modules.
802         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
803         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
804         -lpthread.
805         * tst-_res1.c: New test.
806         * tst-_res1mod1.c: New test.
807         * tst-_res1mod2.c: New test.
809 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
811         * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_push and
812         __libc_cleanup_pop.
814         * tst-cancel-wrappers.sh: lseek and llseek are no cancellation points.
816 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
818         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Fix typo
819         in test for compilation in libc.
821 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
823         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
824         different symbol for the cancellation syscall wrapper and
825         non-cancellation syscall wrapper.
826         (PSEUDO_END): Define.
828 2003-07-05  Richard Henderson  <rth@redhat.com>
830         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
832 2003-06-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
834         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Support cancellation
835         in librt.
837 2003-06-21  Andreas Schwab  <schwab@suse.de>
839         * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Support cancellation
840         in librt.
842 2003-06-20  Richard Henderson  <rth@redhat.com>
844         * sysdeps/unix/sysv/linux/alpha/Makefile (libpthread-routines):
845         Remove ptw-osf_sigprocmask.
847 2003-06-18  Jakub Jelinek  <jakub@redhat.com>
849         * internals.h (__librt_multiple_threads, __librt_enable_asynccancel,
850         __librt_disable_asynccancel): Declare.
851         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET, LIBC_CANCEL_HANDLED): Define
852         for IS_IN_librt.
853         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Support cancellation
854         in librt.
855         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
856         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
857         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
858         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
859         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
860         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
861         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
862         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
863         * sysdeps/x86_64/tcb-offsets.sym: New file.
864         * sysdeps/x86_64/Makefile: New file.
865         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
866         * Versions (libc): Export __librt_enable_asynccancel,
867         __librt_disable_asynccancel and __librt_multiple_threads as
868         GLIBC_PRIVATE.
869         * libc-cancellation.c (__librt_multiple_threads,
870         __librt_enable_asynccancel, __librt_disable_asynccancel): New aliases.
872 2003-06-12  Steven Munroe  <sjmunroe@us.ibm.com>
874         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
875         (SINGLE_THREAD_P): Replace @ got notation with @toc.
877 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
879         * sysdeps/powerpc/pspinlock.c (__pthread_spin_init): Fix
880         initializer [PR libc/5052].
882 2003-06-09  Andreas Schwab  <schwab@suse.de>
884         * Makefile: Move inclusion of ../Rules down after extra-objs is
885         fully known.
887 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
889         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: New sequences for
890         5+ arg syscalls only needed for PIC.
891         Patch by Ralph Siemsen <ralphs@netwinder.org>.
893 2003-06-05  Richard Henderson  <rth@redhat.com>
895         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use
896         and require CFI assembler directives.
897         * sysdeps/unix/sysv/linux/alpha/vfork.S: Likewise.
899 2003-05-30  Andreas Jaeger  <aj@suse.de>
901         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h
902         (SAVESTK_0): Add CFI directives.
903         (SAVESTK_3): Likewise.
904         (SAVESTK_5): Likewise.
905         (RESTSTK_0): Likewise.
906         (RESTSTK_3): Likewise.
907         (RESTSTK_5): Likewise.
909 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
911         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Add \n to error
912         messages.
914 2003-05-04  Roland McGrath  <roland@redhat.com>
916         * Makefile ($(objpfx)../libc.so): New target.
918 2003-04-26  Ulrich Drepper  <drepper@redhat.com>
920         * pthread.c (__pthread_initialize_manager): Remove one last
921         p_multiple_threads call.
923 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
925         * pthread.c (__pthread_initialize_manager): Subtract
926         TLS_PRE_TCB_SIZE bytes from tcbp to get to descr.
927         * manager.c (pthread_handle_create): Subtract or add TLS_PRE_TCB_SIZE
928         instead of sizeof (pthread_descr).
929         (pthread_free): Add TLS_PRE_TCB_SIZE instead of sizeof (pthread_descr).
930         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define to 0.
931         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
932         pthread_descr.
933         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
934         to TLS_TCB_ALIGN.
935         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
936         tcbp.
937         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
938         unneccessarily.
939         (NO_TLS_OFFSET): Define.
941 2003-04-22  Roland McGrath  <roland@redhat.com>
943         * Makeconfig (shared-thread-library): Reverse link order to work
944         around linker bug.
946 2003-04-20  Ulrich Drepper  <drepper@redhat.com>
948         * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Make sure the
949         compiler knows we use the ldt_entry variable and that the syscall
950         modifies the memory.
952         * internals.h: Split pthread_functions definition into...
953         * sysdeps/pthread/pthread-functions.h: ...new file.
955         * sysdeps/i386/useldt.h: Include <sysdep.h>.
957 2003-04-13  Jakub Jelinek  <jakub@redhat.com>
959         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Rename macros to
960         match changes in NPTL sysdep-cancel.h.
962 2003-04-11  Roland McGrath  <roland@redhat.com>
964         * Makefile (multidir): Don't set the variable here with $(shell ...).
965         ($(objpfx)multidir.mk): New target, generated makefile; include that.
966         (generated): Append it.
968 2003-04-10  Jakub Jelinek  <jakub@redhat.com>
970         * Makefile (multidir, crti-objs, crtn-objs): New variables.
971         (generated-dirs): Add pathname component of multidir.
972         (omit-deps, extra-objs): Include $(multidir)/crt? as well.
973         ($(objpfx)libpthread.so): Depend on $(multidir)/crt?.o as well.
974         ($(objpfx)$(multidir), $(objpfx)$(multidir)/crti.o,
975         $(objpfx)$(multidir)/crtn.o): New.
976         * sysdeps/unix/sysv/linux/sparc/Makefile: Removed.
977         * sysdeps/unix/sysv/linux/x86_64/Makefile (LDFLAGS-pthread.so,
978         before-compile, generated): Don't generate and use specs.
979         ($(objpfx)specs): Remove.
981 2003-04-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
983         * sysdeps/s390/pspinlock.c (__pthread_spin_unlock): Fix asm contraints.
985 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
987         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h (PSEUDO): Add
988         missing ; after ENTRY use [PR libc/4997].
990 2003-04-03  Jakub Jelinek  <jakub@redhat.com>
992         * pthread.c (pthread_initialize): Unblock __pthread_sig_cancel
993         in case the parent blocked it.
995 2003-04-02  Jakub Jelinek  <jakub@redhat.com>
997         * Makefile (libpthread-routines): Add pthread_atfork.
998         (libpthread-static-only-routines): Add pthread_atfork.
1000 2003-04-01  Jakub Jelinek  <jakub@redhat.com>
1002         * pthread.c (__pthread_wait_for_restart_signal): Use
1003         __pthread_sigsuspend instead of sigsuspend.
1004         * internals.h (__pthread_sigsuspend): New prototype.
1005         * Makefile (libpthread-routines): Add pt-sigsuspend.
1006         (tests): Add tst-cancel7.
1007         * sysdeps/unix/sysv/linux/pt-sigsuspend.c: New file.
1008         * sysdeps/unix/sysv/linux/alpha/pt-sigsuspend.S: New file.
1009         * sysdeps/unix/sysv/linux/ia64/pt-sigsuspend.c: New file.
1010         * sysdeps/unix/sysv/linux/s390/s390-64/pt-sigsuspend.c: New file.
1011         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-sigsuspend.c: New file.
1012         * sysdeps/unix/sysv/linux/x86_64/pt-sigsuspend.c: New file.
1013         * tst-cancel7.c: New test.
1015 2003-03-31  Alexandre Oliva  <aoliva@redhat.com>
1017         * alloca_cutoff.c: Include internals.h.
1018         * sysdeps/pthread/errno-loc.c: Include linuxthreads/internals.h.
1019         * sysdeps/pthread/herrno-loc.c: Likewise.
1020         * sysdeps/pthread/res-state.c: Likewise.
1022 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
1024         * sysdeps/pthread/bits/typesizes.h: New file.
1025         * sysdeps/unix/sysv/linux/alpha/bits/typesizes.h: New file.
1026         * sysdeps/unix/sysv/linux/sparc/bits/typesizes.h: New file.
1028 2003-03-24  Daniel Jacobowitz  <drow@mvista.com>
1030         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
1031         (DOARGS_5, DOARGS_6, DOARGS_7): Rewritten.
1033 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
1035         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
1037 2003-03-21  Daniel Jacobowitz  <drow@mvista.com>
1039         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
1040         (SINGLE_THREAD_P_PIC): Use "reg" instead of "lr".
1042 2003-03-21  Jakub Jelinek  <jakub@redhat.com>
1044         * sysdeps/i386/tls.h [__ASSUME_SET_THREAD_AREA_SYSCALL]
1045         (TLS_SETUP_GS_SEGMENT): Fix a typo.
1047 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
1049         * sysdeps/pthread/Makefile: Fix cut&paste error.
1051 2003-03-18  Roland McGrath  <roland@redhat.com>
1053         * Versions (libpthread: GLIBC_2.2): Remove
1054         pthread_barrierattr_getpshared, never really existed.
1055         (libpthread: GLIBC_2.0): Move __pthread_initialize to ...
1056         (libpthread: GLIBC_PRIVATE): ... here.
1058 2003-03-14  Jakub Jelinek  <jakub@redhat.com>
1060         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
1061         * sysdeps/unix/sysv/linux/sparc/Makefile ($(objpfx)specs): Use full
1062         path for crt[in].o.
1064 2003-03-14  Alexandre Oliva  <aoliva@redhat.com>
1066         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't .set
1067         mips2 on new abi.
1068         * sysdeps/mips/pt-machine.h (__compare_and_swap): Likewise.
1069         Handle 64-bit longs on n64.
1071 2003-03-07  Jakub Jelinek  <jakub@redhat.com>
1073         * sysdeps/ia64/pspinlock.c (__pthread_spin_lock,
1074         __pthread_spin_trylock): Rewritten.
1076 2003-03-06  Ulrich Drepper  <drepper@redhat.com>
1078         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
1079         recent kernels.
1081 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
1083         * sysdeps/pthread/timer_create.c (timer_create): Return correct
1084         error for CPU clocks.
1086         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1087         _POSIX_MONOTONIC_CLOCK.
1088         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1090 2003-03-01  Roland McGrath  <roland@redhat.com>
1092         * sysdeps/powerpc/powerpc64/pt-machine.h
1093         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
1094         New macros.
1095         * sysdeps/powerpc/tls.h: Don't define those here.
1097         * sysdeps/powerpc/tls.h [! USE_TLS && !__powerpc64__]: Define
1098         tcbhead_t with multiple_threads member.
1099         [USE_TLS] (tcbhead_t): Define minimal one-word version.
1100         [USE_TLS && !__powerpc64__] (TLS_MULTIPLE_THREADS_IN_TCB): Define.
1101         * sysdeps/powerpc/tcb-offsets.sym [USE_TLS]: Use tls.h macros to
1102         derive thread register offset of p_multiple_threads member.
1104         * descr.h (struct _pthread_descr_struct) [!USE_TLS || !TLS_DTV_AT_TP]:
1105         Conditionalize p_header member on this.
1106         [TLS_MULTIPLE_THREADS_IN_TCB]: Add p_multiple_threads alternatively.
1107         * sysdeps/ia64/tls.h [USE_TLS] (TLS_MULTIPLE_THREADS_IN_TCB): Define.
1108         * sysdeps/sh/tls.h: Likewise.
1109         * sysdeps/ia64/tcb-offsets.sym [USE_TLS]: Use p_multiple_threads.
1110         * sysdeps/sh/tcb-offsets.sym: Likewise.
1111         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
1112         (SINGLE_THREAD_P): Likewise.
1113         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1114         (SINGLE_THREAD_P): Likewise.
1115         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1116         (SINGLE_THREAD_P): Likewise.
1117         * pthread.c (__pthread_initialize_manager): Likewise.
1118         * manager.c (pthread_handle_create): Likewise.
1120         * sysdeps/powerpc/tls.h [HAVE_TLS_SUPPORT]: Define USE_TLS and all
1121         related macros.
1123 2003-01-31  Steven Munroe  <sjmunroe@us.ibm.com>
1125         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S [SHARED]:
1126         Conditionalize .toc section magic on this.
1128 2003-02-21  Roland McGrath  <roland@redhat.com>
1130         * cancel.c (__pthread_perform_cleanup): Call __libc_thread_freeres
1131         instead of __rpc_thread_destroy.
1133 2003-02-21  Jakub Jelinek  <jakub@redhat.com>
1135         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Call
1136         __fork instead of branching to it if BROKEN_SPARC_WDISP22.
1137         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
1138         Fix typo.
1139         * sysdeps/unix/sysv/linux/sparc/Makefile (specs): Add ./ prefix
1140         to crti.o and crtn.o.
1141         * sysdeps/unix/sysv/linux/x86_64/Makefile (specs): Likewise.
1143 2003-02-21  Roland McGrath  <roland@redhat.com>
1145         * Makefile (install-lib-ldscripts): New variable.
1147 2003-02-20  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
1149         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: Avoid short
1150         interprocedure branches.
1152 2003-02-19  Ulrich Drepper  <drepper@redhat.com>
1154         * specific.c (pthread_key_delete_helper): Don't use GETMEM, we
1155         need the target thread's lock.
1157 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
1159         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
1160         and LOGIN_NAME_MAX.
1162 2003-02-17  Kevin B. Hendricks  <kevin.hendricks@sympatico.ca>
1163             Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
1165         * sysdeps/powerpc/Makefile: Handle tcb-offsets.sym.
1166         * sysdeps/powerpc/tcb-offsets.sym: New file.
1167         * sysdeps/powerpc/tls.h: New file.
1168         * sysdeps/powerpc/powerpc32/pt-machine.h (FLOATING_STACKS): Define.
1169         (ARCH_STACK_MAX_SIZE): Define.
1170         (THREAD_SELF): Define.
1171         (INIT_THREAD_SELF): Define.
1172         (THREAD_GETMEM): Define.
1173         (THREAD_GETMEM_NC): Define.
1174         (THREAD_SETMEM): Define.
1175         (THREAD_SETMEM_NC): Define.
1176         (__thread_self): Declare.
1177         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Adjust
1178         for thread register.
1180 2003-02-14  Steven Munroe  <sjmunroe@us.ibm.com>
1182         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
1183         Check pthread_create existance, not __pthread_fork.
1185 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
1187         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
1189 2003-02-10  Jakub Jelinek  <jakub@redhat.com>
1191         * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Check
1192         pthread_create existance, not __pthread_fork.
1193         * sysdeps/unix/sysv/linux/i386/vfork.S (__vfork): Likewise.
1194         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Likewise.
1195         * sysdeps/unix/sysv/linux/m68k/vfork.S (__vfork): Likewise.
1196         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
1197         Likewise.
1198         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
1199         * sysdeps/unix/sysv/linux/x86_64/vfork.S (__vfork): Likewise.
1200         * sysdeps/unix/sysv/linux/sh/vfork.S (__vfork): Likewise.
1201         Add .weak pthread_create.
1202         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Fix a typo.
1203         Check pthread_create existance, not __pthread_fork.
1204         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
1205         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Branch to
1206         __fork whenever libpthread.so is loaded.
1208 2003-02-09  Andreas Jaeger  <aj@suse.de>
1210         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h:
1211         Rework: %r9 is destroyed by functions so don't use it as
1212         temporary, align stack correctly, fix parameter for CDISABLE.
1214 2003-02-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1216         * sysdeps/sh/Makefile: New file.
1217         * sysdeps/sh/tcb-offsets.sym: Likewise.
1218         * sysdeps/sh/tls.h: Don't include sysdep.h. Move include
1219         of linuxthreads/descr.h after the definition of THREAD_SELF.
1220         (tcbhead_t): Use IA64 type tcbhead_t for TLS case.
1221         (TLS_TCB_SIZE): Set size of tcbhead_t.
1222         (TLS_PRE_TCB_SIZE): Define.
1223         (INSTALL_NEW_DTV): Set dtv of tcbhead_t structure instead of
1224         a member of thread structure.
1225         (THREAD_DTV): Likewise.
1226         (TLS_INIT_TP_EXPENSIVE): Remove.
1227         (TLS_INIT_TP): Set gbr register only.
1228         (THREAD_SELF): New.
1229         (INIT_THREAD_SELF): Likewise.
1230         (NONTLS_INIT_TP): New.
1231         * sysdeps/unix/sysv/linux/sh/pt-initfini.c (__fpscr_values):
1232         Remove.
1233         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Add
1234         SYSCALL_INST_PAD macro after DO_CALL.
1235         (SINGLE_THREAD_P): Fix non-PIC and TLS case so to read the
1236         correct variable.
1237         * sysdeps/unix/sysv/linux/sh/vfork.S (__vfork): Branch to __fork
1238         whenever libpthread.so is loaded.
1240 2003-02-08  Andreas Schwab  <schwab@suse.de>
1242         * sysdeps/unix/sysv/linux/m68k/vfork.S: Branch to __fork whenever
1243         libpthread.so is loaded.
1245 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
1247         * sysdeps/unix/sysv/linux/i386/vfork.S: Make sure
1248         __ASSUME_VFORK_SYSCALL is not defined if the kernel headers have
1249         no __NR_vfork definition.
1251 2003-02-07  Jakub Jelinek  <jakub@redhat.com>
1253         * tst-popen2.c: New test.
1254         * Makefile (tests): Add tst-popen2.
1255         * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Branch to __fork
1256         whenever libpthread.so is loaded.
1257         * sysdeps/unix/sysv/linux/i386/vfork.S (__vfork): Likewise.
1258         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Likewise.
1259         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
1260         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
1261         Likewise.
1262         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
1263         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
1264         * sysdeps/unix/sysv/linux/x86_64/vfork.S (__vfork): Likewise.
1266 2003-02-05  Ulrich Drepper  <drepper@redhat.com>
1268         * sysdeps/pthread/bits/libc-lock.h (__libc_once): Set control
1269         variable for non-libpthread case to the same value the
1270         pthread_once function would use.
1272 2003-02-03  Jakub Jelinek  <jakub@redhat.com>
1274         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): If
1275         BROKEN_SPARC_WDISP22, handle SHARED the same way as non-SHARED.
1277 2003-02-04  Andreas Jaeger  <aj@suse.de>
1279         * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Do not use
1280         multi-line strings.
1282 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
1284         * sysdeps/s390/tls.h (TLS_INIT_TP): Return NULL, not 0.
1286 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
1288         * sysdeps/alpha/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1289         THREAD_SETMEM, THREAD_SETMEM_NC): Avoid warnings about unused self
1290         variable.
1291         * sysdeps/ia64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1292         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1293         * sysdeps/s390/s390-32/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1294         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1295         * sysdeps/s390/s390-64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1296         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1297         * sysdeps/sh/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1298         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1299         * sysdeps/sparc/sparc32/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1300         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1301         * sysdeps/sparc/sparc64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1302         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1304 2003-01-27  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1306         * sysdeps/s390/s390-32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
1307         Define TLS versions.
1308         * sysdeps/s390/s390-64/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
1309         Likewise.
1310         * sysdeps/s390/tls.h [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE,
1311         TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE, TLS_TCB_ALIGN, TLS_TCB_AT_TP,
1312         INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_DTV):
1313         Define.
1314         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Use
1315         branch with 32 bit offset.
1316         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: Likewise.
1318 2003-01-24  Jakub Jelinek  <jakub@redhat.com>
1320         * sysdeps/sparc/sparc32/pt-machine.h (__thread_self): Change to %g7,
1321         as required by TLS ABI.
1322         * sysdeps/sparc/sparc64/pt-machine.h (__thread_self): Likewise.
1323         * sysdeps/sparc/tls.h [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE,
1324         TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE, TLS_TCB_ALIGN, TLS_TCB_AT_TP,
1325         INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_DTV):
1326         Define.
1327         [HAVE_TLS_SUPPORT]: Include descr.h and sysdep.h.
1328         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Use %g7
1329         instead of %g6 for thread pointer.
1330         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
1331         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1332         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
1334 2003-01-25  Guido Guenther  <agx@sigxcpu.org>
1336         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
1337         * sysdeps/unix/sysv/linux/mips/Makefile: New file.
1339 2003-01-20  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1341         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: Avoid non pc relative
1342         reference to __fork.
1344 2003-01-17  Richard Henderson  <rth@redhat.com>
1346         * sysdeps/alpha/tls.h (tcbhead_t): Clarify second member.
1347         (TLS_TCB_SIZE, TLS_TCB_ALIGN): Set for tcbhead_t.
1348         (TLS_PRE_TCB_SIZE): New.
1349         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Update for
1350         new ia64-style thread pointer layout.
1351         (THREAD_GETMEM, THREAD_GETMEM_NC): New.
1352         (THREAD_SETMEM, THREAD_SETMEM_NC): New.
1353         * sysdeps/unix/sysv/linux/alpha/vfork.S: Don't tail-call to __fork
1354         if !SHARED.
1356 2003-01-15  Jakub Jelinek  <jakub@redhat.com>
1358         * sysdeps/ia64/tls.h (tcbhead_t): Use the TLS ABI required layout
1359         if USE_TLS only.
1360         (NONTLS_INIT_TP): Revert last change.
1361         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define to
1362         offsetof (tcbhead_t, multiple_threads) if USE_TLS not defined.
1364 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
1366         * pthread.c (_pthread_initialize_minimal): Use
1367         GL(dl_tls_dtv_slotinfo_list) != NULL to check whether TLS has
1368         been already initialized.
1370 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
1372         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize head->sysinfo even
1373         if not SHARED.
1375 2003-01-15  Jakub Jelinek  <jakub@redhat.com>
1377         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init,
1378         __libc_lock_init_recursive): Initialize fields directly.
1380 2003-01-15  Jakub Jelinek  <jakub@redhat.com>
1382         * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Allow
1383         __fork to be far away from __vfork ifndef SHARED.
1384         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
1385         Likewise.
1386         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
1387         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
1388         Add a missing instruction.
1389         * sysdeps/unix/sysv/linux/arm/vfork.S (__vfork): Conditionally
1390         branch to __fork even if __NR_vfork is not defined.
1392 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
1394         * tst-cancel-wrappers.sh: Allow .__*_asynccancel functions names
1395         as well.
1397 2003-01-14  Steven Munroe  <sjmunroe@us.ibm.com>
1399         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
1401 2003-01-14  Jakub Jelinek  <jakub@redhat.com>
1403         * sysdeps/unix/sysv/linux/ia64/vfork.S (JUMPTARGET): Remove.
1405 2003-01-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1407         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Avoid
1408         unterminated string literals.
1409         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Likewise.
1411 2003-01-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1413         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
1414         (PSEUDO): Code reordering.  Move CENABLE and CDISABLE literals from
1415         PSEUDO_END to PSEUDO.
1416         (PSEUDO_END): Remove.
1417         (SINGLE_THREAD_P): Save an instruction.
1418         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add missing
1419         parameter to SINGLE_THREAD_P call.
1420         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
1421         Code reordering.
1423 2003-01-10  Andreas Schwab  <schwab@suse.de>
1425         * sysdeps/unix/sysv/linux/m68k/vfork.S: New file.
1427 2003-01-10  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1429         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Setup
1430         backchain in pseudo_cancel.  Minor code improvements.
1431         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
1432         Likewise.
1434 2003-01-10  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1436         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
1437         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
1439 2002-01-12  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
1441         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
1443 2002-01-09  Richard Henderson  <rth@redhat.com>
1445         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Assume only
1446         ret follows pseudo, and thus avoid branch-to-branch in cancel
1447         case.  Use SYSCALL_ERROR_LABEL.
1449 2003-01-11  Philip Blundell  <philb@gnu.org>
1451         * sysdeps/unix/sysv/linux/arm/vfork.S: New file.
1452         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h (PSEUDO_RET):
1453         Correctly unstack lr.
1454         (UNDOARGS_5): Fix ordering of pushes and pops.
1455         (SINGLE_THREAD_P_PIC): New.
1456         (SINGLE_THREAD_P_INT): New.
1457         (SINGLE_THREAD_P): Implement in terms of above.  Restore lr if it
1458         was stacked.
1459         (PSEUDO): Use SINGLE_THREAD_P_INT.
1461 2003-01-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1463         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
1465 2003-01-11  Jakub Jelinek  <jakub@redhat.com>
1467         * sysdeps/ia64/tls.h (tcbhead_t): Change into dtv_t *, void *.
1468         [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN,
1469         TLS_TCB_SIZE, TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, TLS_DTV_AT_TP,
1470         INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_SELF,
1471         INIT_THREAD_SELF): Define.
1472         [HAVE_TLS_SUPPORT]: Include descr.h.
1473         (NONTLS_INIT_TP): Point __thread_self at the end of dummy
1474         struct _pthread_descr_struct.
1475         * sysdeps/ia64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1476         THREAD_SETMEM, THREAD_SETMEM_NC): Define using THREAD_SELF,
1477         not __thread_self.
1478         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Adjust
1479         computation.
1480         * pthread.c (__pthread_initialize_minimal): Use tcbp, not self
1481         for TCB pointer.
1482         (__pthread_initialize_manager): Rename tcb to mgr.
1483         Use tcbp for TCB pointer, if TLS_DTV_AT_TP set mgr to sizeof (struct
1484         _pthread_descr) below tcbp, otherwise to tcbp.
1485         * manager.c (pthread_handle_create): If TLS_DTV_AT_TP, set
1486         new_thread to be below _dl_allocate_tls ().  Adjust new_thread back
1487         before freeing.  Fix clone arguments if report_events and USE_TLS.
1488         (pthread_free): Adjust th back before freeing.
1490 2003-01-10  Steven Munroe  <sjmunroe@us.ibm.com>
1492         * sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile: Moved to ...
1493         * sysdeps/unix/sysv/linux/powerpc/Makefile: ...here.
1494         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New File.
1496 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
1498         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
1499         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
1500         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1501         [__ASSEMBLER__] (SINGLE_THREAD_P): Remove trailing ;;.
1502         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
1503         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
1504         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
1505         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
1506         * tst-popen.c: New test.
1507         * Makefile (tests): Add tst-popen.
1509 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
1511         * sysdeps/unix/sysv/linux/sigwait.c (do_sigwait): Add
1512         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
1514 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
1516         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use
1517         PSEUDO_PREPARE_ARGS.  Fix branch condition after SINGLE_THREAD_P.
1519 2003-01-06  Philip Blundell  <philb@gnu.org>
1521         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: New file.
1523 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
1525         * internals.h (LIBC_CANCEL_HANDLED): Define.
1526         * sysdeps/unix/sysv/linux/sigwait.c (LIBC_CANCEL_HANDLED): Add.
1527         * signals.c (LIBC_CANCEL_HANDLED): Add.
1528         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
1529         * tst-cancel-wrappers.sh: Remove all exceptions.
1531         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
1533 2003-01-05  Andreas Schwab  <schwab@suse.de>
1535         * sysdeps/m68k/Makefile: New file, use -fPIC for nonshared
1536         objects.
1538         * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h (SINGLE_THREAD_P):
1539         Fix for PIC.
1540         (CENABLE): Likewise.
1541         (CDISABLE): Likewise.
1543 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
1545         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
1546         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
1548         * Makefile (libc.so-no-z-defs): Define to yes.
1550 2003-01-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1552         * sysdeps/sh/tls.h: Include dl-sysdep.h and stdint.h.
1553         (tcbhead_t): Add multiple_threads member.
1554         (TLS_INIT_TP_EXPENSIVE): Define.
1555         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Don't use multi-line
1556         strings.  Remove unused code.
1557         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
1559 2003-01-04  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
1561         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
1562         * sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile: New file.
1564 2003-01-04  Jakub Jelinek  <jakub@redhat.com>
1566         * internals.h (LIBC_THREAD_GETMEM, LIBC_THREAD_SETMEM): Define
1567         even if NOT_IN_libc is defined.
1569 2003-01-05  Jakub Jelinek  <jakub@redhat.com>
1571         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
1572         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
1573         * sysdeps/s390/Makefile: New file.
1574         * sysdeps/s390/tcb-offsets.sym: New file.
1575         * sysdeps/s390/tls.h: New file.
1577 2003-01-03  Richard Henderson  <rth@redhat.com>
1579         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
1581 2003-01-03  Andreas Jaeger  <aj@suse.de>
1583         * sysdeps/pthread/bits/libc-tsd.h: Declare weak_extern functions.
1585 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
1587         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
1589 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
1591         * tst-cancel-wrappers.sh: Exclude sigwait.c as well, it does not have
1592         cancellation tests.
1594 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
1596         * internals.h (struct pthread_functions): Rename
1597         ptr_pthread_cond_* fields to ptr___pthread_cond_*.
1598         * pthread.c (pthread_functions): Adjust.
1599         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
1600         pthread_cond_*@GLIBC_2.0 compatibility symbols.
1601         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
1602         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
1603         and pthread_cond_wait.
1605         * sysdeps/pthread/bits/pthreadtypes.h (__pthread_cond_align_t): New
1606         type.
1607         (pthread_cond_t): Add __align member, shorten __padding.
1608         * sysdeps/pthread/pthread.h (PHTREAD_COND_INITIALIZER): Initialize
1609         __padding and __align too.
1611         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call2): Add
1612         __builtin_expect.
1613         * sysdeps/pthread/sigaction.c: New file.
1614         * sysdeps/unix/sysv/linux/raise.c: New file.
1615         * sysdeps/unix/sysv/linux/sigwait.c: New file.
1616         * sysdeps/unix/sysv/linux/fork.c (__pthread_fork): Protect
1617         weak_extern with #ifndef SHARED.
1618         * sysdeps/unix/sysv/linux/jmp-unwind.c (__pthread_cleanup_upto):
1619         Likewise.
1620         * signals.c (__sigaction): Renamed to...
1621         (__pthread_sigaction): ... this.
1622         (__sigaction): New strong alias, #ifdef SHARED only.
1623         (sigaction): Protect with #ifdef SHARED.
1624         (sigwait): Renamed to...
1625         (__pthread_sigwait): ... this.
1626         (sigwait): New strong alias, #ifdef SHARED only.
1627         (raise): Renamed to...
1628         (__pthread_raise): ... this.
1629         (raise): New strong alias, #ifdef SHARED only.
1630         * internals.h (__pthread_sigaction, __pthread_sigwait,
1631         __pthread_raise): New prototypes.
1632         (struct pthread_functions): Add ptr_pthread_sigaction,
1633         ptr_pthread_sigwait, ptr_pthread_raise.
1634         * pthread.c (pthread_functions): Renamed to...
1635         (__pthread_functions): ... this.  No longer static, no longer
1636         SHARED only.  Initialize ptr_pthread_sigaction, ptr_pthread_sigwait
1637         and ptr_pthread_raise.
1638         [SHARED] (ptr_pthread_functions): Change to &__pthread_functions.
1639         * libc-cancellation.c (__pthread_thread_self): Remove weak_extern.
1640         * ptfork.c (__fork, __vfork): Protect with #ifdef SHARED.
1641         * ptlongjmp.c (siglongjmp, longjmp): Protect with #ifdef SHARED.
1643         * Makefile (tests, tests-static): Add tst-cancel-static.
1644         * tst-cancel-static.c: New test.
1646 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
1648         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
1650 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
1652         * sysdeps/pthread/bits/pthreadtypes.h (pthread_cond_t): Add padding.
1653         * condvar.c: Add symbol versioning.  The compatibility versions
1654         are the same as the change in the interface does not effect this
1655         implementation.
1656         * Versions [libpthread]: Add definitions for new pthread_cond_*
1657         interfaces for version GLIBC_2.3.2.
1659 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
1661         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
1662         __register_atfork.
1663         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
1664         for __register_atfork.
1666 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
1668         * sysdeps/i386/i686/pt-machine.h: Use __ASSEMBLER__ instead of
1669         ASSEMBLER test macro.
1670         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Likewise.
1671         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1672         * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Likewise.
1673         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1674         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1675         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1677         * sysdeps/pthread/errno-loc.c (__errno_location): Add
1678         libc_hidden_def.
1679         * sysdeps/pthread/herrno-loc.c (__h_errno_location): Likewise.
1680         * sysdeps/pthread/res-state.c (__res_state): Likewise.
1681         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
1682         __libc_current_sigrtmax): Likewise.
1683         * Versions [libc] (GLIBC_PRIVATE): Remove __libc_internal_tsd_get,
1684         __libc_internal_tsd_set, __libc_internal_tsd_address,
1685         __libc_alloca_cutoff.
1686         [libpthread] (GLIBC_PRIVATE): Remove __libc_internal_tsd_get,
1687         __libc_internal_tsd_set, __libc_internal_tsd_address.
1689         * sysdeps/pthread/list.h: Remove assert.h include.
1690         * sysdeps/unix/sysv/linux/fork.c: Include <fork.h>, not "fork.h".
1692         * sysdeps/pthread/list.h: New file.
1693         * sysdeps/unix/sysv/linux/jmp-unwind.c: New file.
1694         * sysdeps/unix/sysv/linux/fork.c: New file.
1695         * sysdeps/unix/sysv/linux/fork.h: New file.
1696         * sysdeps/unix/sysv/linux/ia64/fork.h: New file.
1697         * sysdeps/unix/sysv/linux/sparc/fork.h: New file.
1698         * sysdeps/unix/sysv/linux/register-atfork.c: New file.
1699         * sysdeps/unix/sysv/linux/unregister-atfork.c: New file.
1700         * sysdeps/unix/sysv/linux/Makefile: New file.
1701         * sysdeps/unix/sysv/linux/Versions: New file.
1702         * ptlongjmp.c (pthread_cleanup_upto): Rename to...
1703         (__pthread_cleanup_upto): ...this. Add targetframe argument,
1704         use it instead of currentframe.  No longer static.
1705         (siglongjmp, longjmp): Remove pthread_cleanup_upto calls.
1706         * internals.h (__pthread_cleanup_upto, __pthread_fork): New prototypes.
1707         (struct pthread_functions): Add ptr_pthread_fork,
1708         ptr_pthread_cleanup_upto.
1709         * pthread.c (pthread_functions): Initialize ptr_pthread_fork and
1710         ptr_pthread_cleanup_upto.
1711         * ptfork.c: Include fork.h.
1712         (struct handler_list, struct handler_list_block): Remove.
1713         (pthread_atfork_lock, pthread_atfork_prepare, pthread_atfork_parent,
1714         pthread_atfork_child): Remove.
1715         (pthread_insert_list, __pthread_atfork, pthread_call_handlers): Remove.
1716         (__pthread_fork): New function.
1717         (__fork, __vfork): Call __libc_fork.
1718         * Makefile (libpthread-routines): Add old_pthread_atfork.
1719         (libpthread-nonshared): Add pthread_atfork.
1720         (others): Depend on $(objpfx)libpthread_nonshared.a.
1721         ($(objpfx)libpthread_nonshared.a): New rule.
1722         (install): Depend on $(inst_libdir)/libpthread.so.
1723         ($(inst_libdir)/libpthread.so, $(inst_libdir)/libpthread_nonshared.a):
1724         New rules.
1725         (tests): Depend on libpthread_nonshared.a too.
1726         * old_pthread_atfork.c: New file.
1727         * pthread_atfork.c: New file.
1728         * Makeconfig (shared-thread-library): Include libpthread_nonshared.a
1729         too.
1731 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
1733         * forward.c: Make all functions available by default again.  It
1734         caused too much trouble.
1735         * internals.h (struct pthread_functions): Rename ptr_pthread_exit
1736         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
1737         ptr___pthread_attr_init_2_*.
1738         * pthread.c (pthread_functions): Adjust.
1740 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
1742         * libc_pthread_init.c (__libc_pthread_init): Remove
1743         MULTIPLE_THREADS_OFFSET check.
1744         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
1745         (SYSINFO_OFFSET): Remove.
1746         * sysdeps/i386/Makefile [csu] (gen-as-const-headers): Add
1747         tcb-offsets.sym.
1748         * sysdeps/i386/tcb-offsets.sym: New file.
1749         * sysdeps/pthread/tcb-offsets.h: New file.
1750         * sysdeps/sparc/sparc32/tls.h: Removed.
1751         * sysdeps/sparc/sparc64/tls.h: Move...
1752         * sysdeps/sparc/tls.h: ...here.  Include tcb-offsets.h in assembler.
1753         * sysdeps/sparc/Makefile: New file.
1754         * sysdeps/sparc/tcb-offsets.sym: New file.
1755         * sysdeps/ia64/tls.h: Include tcb-offsets.h in assembler.
1756         * sysdeps/ia64/Makefile: New file.
1757         * sysdeps/ia64/tcb-offsets.sym: New file.
1758         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
1759         (MULTIPLE_THREADS_OFFSET): Remove.
1760         Replace defined MULTIPLE_THREADS_OFFSET
1761         with defined FLOATING_STACKS && USE___THREAD.
1762         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1763         (MULTIPLE_THREADS_OFFSET): Remove.
1764         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1765         (MULTIPLE_THREADS_OFFSET): Remove.
1766         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1767         (MULTIPLE_THREADS_OFFSET): Remove.
1768         * pthread.c (__pthread_initialize_manager): Remove
1769         MULTIPLE_THREADS_OFFSET cbeck.
1771         * tst-cancel-wrappers.sh: Add line continuations.
1773 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
1775         * sysdeps/pthread/bits/libc-tsd.h: Include linuxthreads/descr.h
1776         and bits/libc-lock.h.
1777         (__libc_internal_tsd_get, __libc_internal_tsd_set,
1778         __libc_internal_tsd_address): Remove.
1779         (__pthread_internal_tsd_address, __pthread_internal_tsd_get,
1780         __pthread_internal_tsd_set): New weak_externs.
1781         (__libc_tsd_address, __libc_tsd_get, __libc_tsd_set): Define
1782         using __libc_maybe_call2.
1783         (__libc_tsd_key_t): Move to ...
1784         * descr.h (__libc_tsd_key_t): ...here.
1785         Remove bits/libc-tsd.h include.
1786         * sysdeps/pthread/errno-loc.c: New file.
1787         * sysdeps/pthread/herrno-loc.c: New file.
1788         * sysdeps/pthread/res-state.c: New file.
1789         * libc-cancellation.c (THREAD_GETMEM, THREAD_SETMEM): Remove.
1790         (__libc_enable_asynccancel, __libc_disable_asynccancel): Use
1791         thread_self unconditionally.  Use LIBC_THREAD_[SG]ETMEM instead
1792         of THREAD_[SG]ETMEM.
1793         * specific.c (libc_internal_tsd_set): Renamed to...
1794         __pthread_internal_tsd_set.  Remove static.
1795         (libc_internal_tsd_get): Renamed to...
1796         __pthread_internal_tsd_get.  Remove static.
1797         (libc_internal_tsd_address): Renamed to...
1798         __pthread_internal_tsd_address.  Remove static.
1799         (__libc_internal_tsd_set, __libc_internal_tsd_get,
1800         __libc_internal_tsd_address, __libc_alloca_cutoff): Remove.
1801         * internals.h [!NOT_IN_libc] (LIBC_THREAD_GETMEM, LIBC_THREAD_SETMEM):
1802         Define.
1803         (__pthread_internal_tsd_set, __pthread_internal_tsd_get,
1804         __pthread_internal_tsd_address): New prototypes.
1805         (struct pthread_functions): Add
1806         ptr_pthread_internal_tsd_([sg]et|address) fields.
1807         [!NOT_IN_libc && !FLOATING_STACKS] (thread_self): Define.
1808         * pthread.c (pthread_functions) [!USE_TLS && !HAVE___THREAD]:
1809         Initialize ptr_pthread_internal_tsd_([sg]et|address) fields.
1810         * Versions (libpthread): Remove __libc_alloca_cutoff@GLIBC_PRIVATE.
1811         * alloca_cutoff.c: New file.
1812         * no-tsd.c: Removed.
1813         * Makefile (routines): Remove no-tsd.  Add alloca_cutoff.
1814         * pt-system.c (system): Remove cancellation handling.
1815         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
1816         cancellation routines.
1818         * sysdeps/i386/tls.h: Include dl-sysdep.h and stdint.h.
1819         (tcbhead_t): Add sysinfo field.
1820         (SYSINFO_OFFSET, INIT_SYSINFO): Define.
1821         (TLS_INIT_TP): Use INIT_SYSINFO.
1822         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
1823         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
1824         (MULTIPLE_THREADS_OFFSET): Adjust.
1825         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1826         (MULTIPLE_THREADS_OFFSET): Likewise.
1827         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1828         (MULTIPLE_THREADS_OFFSET): Likewise.
1829         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1830         (MULTIPLE_THREADS_OFFSET): Likewise.
1831         * descr.h: Include stdint.h.
1832         (struct _pthread_descr_struct): Add p_header.data.sysinfo field.
1834 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
1836         * libc_pthread_init.c: Include stdlib.h.
1837         * sysdeps/i386/tls.h (tcbhead_t): Add multiple_threads member.
1838         (TLS_INIT_TP_EXPENSIVE): Define.
1839         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call,
1840         __libc_maybe_call2): In _LIBC check SHARED define.
1841         * sysdeps/ia64/tls.h: New file.
1842         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
1843         * sysdeps/unix/sysv/linux/ia64/Makefile: New file.
1844         * sysdeps/x86_64/tls.h (TLS_INIT_TP_EXPENSIVE): Define.
1845         * sysdeps/sparc/sparc32/tls.h: New file.
1846         * sysdeps/sparc/sparc64/tls.h: New file.
1847         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
1848         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
1849         * Makefile (tests): Add tst-cancel[1-6].
1850         (tests-reverse): Add tst-cancel5.
1851         Link libc.so before libpthread.so for tests-reverse.
1852         * tst-cancel1.c: New file.
1853         * tst-cancel2.c: New file.
1854         * tst-cancel3.c: New file.
1855         * tst-cancel4.c: New file.
1856         * tst-cancel5.c: New file.
1857         * tst-cancel6.c: New file.
1859 2002-12-27  Andreas Schwab  <schwab@suse.de>
1861         * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: New file.
1863 2002-12-22  Roland McGrath  <roland@redhat.com>
1865         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
1867 2002-12-21  Ulrich Drepper  <drepper@redhat.com>
1869         * pthread.c (init_rtsigs): Remove incomplete __builtin_expect.
1870         Reported by Art Hass <ahaas@airmail.net>.
1872 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
1874         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
1875         Use return 0 as 6th argument to FORWARD4.
1877 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
1879         * sysdeps/i386/useldt.h (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Only
1880         define if __ASSUME_LDT_WORKS > 0.
1881         * libc-cancellation.c (THREAD_GETMEM, THREAD_SETMEM): Redefine to
1882         struct member access if !FLOATING_STACKS.
1883         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
1885 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
1887         * internals.h (__pthread_thread_self): New prototype.
1888         (struct pthread_functions): Add ptr_pthread_thread_self field.
1889         * pthread.c (pthread_functions): Initialize ptr_pthread_thread_self.
1890         (__pthread_thread_self): New function.
1891         * libc-cancellation.c (__pthread_thread_self): Add weak_extern.
1892         (__libc_enable_asynccancel, __libc_disable_asynccancel): Don't
1893         use thread_self() directly if not FLOATING_STACKS.
1895 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
1897         * sysdeps/x86_64/pt-machine.h: Guard most of the header
1898         with #ifndef __ASSEMBLER__.
1899         * pthread.c (pthread_functions): Use SHLIB_COMPAT around
1900         pthread_attr_init_2_0 use.
1902 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
1904         * wrapsyscall.c: Removed.
1905         * weaks.c: Removed.
1906         * Makefile (distribute): Add tst-cancel-wrappers.sh.
1907         (routines): Remove weaks.  Add forward,
1908         libc_pthread_init, libc-cancellation.
1909         (shared-only-routines): Remove weaks.  Add forward.
1910         (libpthread-routines): Remove wrapsyscall.
1911         Add ptw-write, ptw-read, ptw-close, ptw-fcntl, ptw-accept,
1912         ptw-connect, ptw-recv, ptw-recvfrom, ptw-recvmsg, ptw-send,
1913         ptw-sendmsg, ptw-sendto, ptw-fsync, ptw-lseek, ptw-lseek64,
1914         ptw-llseek, ptw-msync, ptw-nanosleep, ptw-open, ptw-open64,
1915         ptw-pause, ptw-pread, ptw-pread64, ptw-pwrite, ptw-pwrite64,
1916         ptw-tcdrain, ptw-wait, ptw-waitpid, pt-system, pt-allocrtsig.
1917         (libpthread-shared-only-routines): Add pt-allocrtsig.
1918         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
1919         ($(objpfx)tst-cancel-wrappers.out): New rule.
1920         * sysdeps/pthread/bits/libc-lock.h: Include linuxthreads/internals.h
1921         if in libc.
1922         (__libc_maybe_call): In libpthread.* don't check for existance
1923         of the function.
1924         (__libc_maybe_call2): Define.
1925         (__libc_lock_init, __libc_lock_fini, __libc_lock_lock,
1926         __libc_lock_trylock, __libc_lock_unlock): Use it.
1927         * sysdeps/pthread/flockfile.c: New file.
1928         * sysdeps/pthread/ftrylockfile.c: New file.
1929         * sysdeps/pthread/funlockfile.c: New file.
1930         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
1931         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
1932         * sysdeps/unix/sysv/linux/allocrtsig.c: New file.
1933         * libc-cancellation.c: New file.
1934         * forward.c: New file.
1935         * libc_pthread_init.c: New file.
1936         * pt-system.c: New file.
1937         * pthread.c: Remove locale.h.
1938         (__pthread_manager_thread): Initialize multiple_threads.
1939         (__pthread_multiple_threads): Declare.
1940         (pthread_functions): New variable.
1941         (__pthread_initialize_minimal): Remove __uselocale call.
1942         Call __libc_pthread_init.
1943         (__pthread_initialize_manager): Initialize __pthread_multiple_threads,
1944         initial thread's multiple_threads and __libc_multiple_threads.
1945         Check MULTIPLE_THREADS_OFFSET value. Initialize manager thread's
1946         multiple_threads.
1947         (pthread_setschedparam, pthread_getschedparam): Rename to __
1948         prefixed variants.  Add strong_alias.
1949         (current_rtmin, current_rtmax, __libc_current_sigrtmin,
1950         __libc_current_sigrtmax, __libc_allocate_rtsig): Remove.
1951         (init_rtsigs): Use __libc_current_sigrtmin_private.
1952         (pthread_initialize): Only call init_rtsigs if
1953         !__ASSUME_REALTIME_SIGNALS.
1954         (__pthread_require_wrappers, __pthread_require_lockfile): Remove.
1955         * internals.h (__pthread_attr_destroy, __pthread_attr_setdetachstate,
1956         __pthread_attr_getdetachstate, __pthread_attr_setschedparam,
1957         __pthread_attr_getschedparam, __pthread_attr_setschedpolicy,
1958         __pthread_attr_getschedpolicy, __pthread_attr_setinheritsched,
1959         __pthread_attr_getinheritsched, __pthread_attr_setscope,
1960         __pthread_attr_getscope, __pthread_cond_init,
1961         __pthread_cond_destroy, __pthread_cond_wait,
1962         __pthread_cond_signal, __pthread_cond_broadcast,
1963         __pthread_condattr_init, __pthread_condattr_destroy,
1964         __pthread_equal, __pthread_getschedparam,
1965         __pthread_setschedparam, __pthread_setcancelstate,
1966         __pthread_setcanceltype, __pthread_enable_asynccancel,
1967         __libc_enable_asynccancel, __libc_pthread_init): New prototype.
1968         (__pthread_mutex_init, __pthread_mutex_destroy,
1969         __pthread_mutex_lock, __pthread_mutex_unlock,
1970         __pthread_mutex_trylock): Likewise.
1971         Add hidden_proto.
1972         (struct pthread_functions): New type.
1973         (__libc_pthread_functions): New variable.
1974         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define.
1975         * descr.h (struct _pthread_descr_struct): Add
1976         p_header.data.multiple_threads field.
1977         * manager.c (pthread_handle_create): Initialize multiple_threads.
1978         * cancel.c (__pthread_enable_asynccancel,
1979         __pthread_disable_asynccancel): New functions.
1980         (__pthread_provide_wrappers): Remove.
1981         (pthread_setcancelstate, pthread_setcanceltype): Rename to __
1982         prefixed variants.  Add strong_alias.
1983         * condvar.c (pthread_cond_init, pthread_cond_destroy,
1984         pthread_cond_wait, pthread_cond_signal, pthread_cond_broadcast,
1985         pthread_condattr_init, pthread_condattr_destroy): Likewise.
1986         * join.c (pthread_exit): Likewise.
1987         * attr.c (pthread_attr_destroy, pthread_attr_setdetachstate,
1988         pthread_attr_getdetachstate, pthread_attr_setschedparam,
1989         pthread_attr_getschedparam, pthread_attr_setschedpolicy,
1990         pthread_attr_getschedpolicy, pthread_attr_setinheritsched,
1991         pthread_attr_getinheritsched, pthread_attr_setscope,
1992         pthread_attr_getscope): Likewise.
1993         * mutex.c (__pthread_mutex_init, __pthread_mutex_destroy,
1994         __pthread_mutex_lock, __pthread_mutex_unlock,
1995         __pthread_mutex_trylock): Add hidden_def.
1996         * Versions (libc): Add __libc_pthread_init,
1997         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
1998         __libc_allocate_rtsig_private @@GLIBC_PRIVATE.
1999         * lockfile.c: Remove some USE_IN_LIBIO guards.
2000         (__pthread_provide_lockfile): Remove.
2001         * pt-allocrtsig.c: New file.
2002         * tst-cancel-wrappers.sh: New test.
2004 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
2006         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
2007         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
2008         * wrapsyscall.c: Remove creat, poll, pselect, readv, select,
2009         sigpause, sigsuspend, sigwaitinfo, waitid, and writev wrappers.
2011 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
2013         * wrapsyscall.c (CANCELABLE_SYSCALL): Don't define function as
2014         weak.  There is no reason for that.
2015         (CANCELABLE_SYSCALL_VA): Likewise.
2017 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
2019         * wrapsyscall.c: Add wrappers for creat, poll, pselect, readv, select,
2020         sigpause, __xpg_sigpause, sigsuspend, sigwaitinfo, waitid, and writev.
2021         * Versions: Export creat, poll, pselect, readv, select, sigpause,
2022         __xpg_sigpause, sigsuspend, sigwaitinfo, waitid, and writev from
2023         libpthread in version GLIBC_2.3.2.
2025 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
2027         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
2029 2002-12-05  Roland McGrath  <roland@redhat.com>
2031         * pthread.c (__pthread_initialize_minimal)
2032         [USE_TLS && SHARED && !USE___THREAD]: Initialize TLS and set up the
2033         TCB if the dynamic linker didn't do it at startup.
2035         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
2036         string.
2037         (TLS_DO_SET_THREAD_AREA, TLS_DO_MODIFY_LDT, TLS_SETUP_GS_SEGMENT):
2038         Submacros updated.
2039         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
2040         * sysdeps/alpha/tls.h (TLS_INIT_TP): Likewise (always zero).
2042 2002-12-03  Roland McGrath  <roland@redhat.com>
2044         * pthread.c (pthread_initialize) [SHARED]: Copy dl_error_tsd value
2045         from dynamic linker internal cell to new libc cell.
2047 2002-11-28  Roland McGrath  <roland@redhat.com>
2049         * tst-context.c: #define IS_IN_libpthread around #include <tls.h>
2050         before other headers, so FLOATING_STACKS is not defined wrongly.
2052         * sysdeps/i386/tls.h [!IS_IN_libpthread]: Enable TLS support
2053         even if [! FLOATING_STACKS].
2054         (TLS_DO_MODIFY_LDT_KERNEL_CHECK): New macro.
2055         If not under [__ASSUME_LDT_WORKS > 0], then do a runtime check of
2056         dl_osversion >= 2.3.99 and fatal if not.
2057         (TLS_DO_MODIFY_LDT): Use it.
2059 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
2061         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
2062         require it to 200112L.  Remove _POSIX_POLL and _POSIX_SELECT.
2063         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2065 2002-11-19  Ulrich Drepper  <drepper@redhat.com>
2067         * Versions (libc: GLIBC_2.0): Remove names of functions which are
2068         not defined in libc.
2069         * Makefile (shared-only-routines): Add weaks.
2070         * weaks.c: Remove functions which are not exported from libc.so.
2072 2002-11-14  Roland McGrath  <roland@redhat.com>
2074         * libc-tsd.c: New file.
2075         * Makefile (distribute): Add it.
2076         (libc-link.so): New variable.
2077         ($(objpfx)libpthread.so): Depend on that instead of libc.so file name.
2078         (libc-ok-for-link): New variable.
2079         [$(versioning) = yes]: Include $(common-objpfx)tls.make and define
2080         libc-ok-for-link to $(use-thread).
2081         [$(libc-ok-for-link) = no]
2082         (libc-link.so): Set to $(objpfx)libc.so, not $(common-objpfx)libc.so.
2083         ($(objpfx)libc_pic_lite.a,$(objpfx)libc_pic_lite.os, $(objpfx)libc.so):
2084         New targets.
2085         (generated): Append them.
2086         (extra-objs): Append libc-tsd.os.
2088         * libc-tls-loc.c: New file.
2089         * Makefile (libpthread-routines): Add it.
2091 2002-11-14  Andreas Schwab  <schwab@suse.de>
2093         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Fix unterminated
2094         string.
2096 2002-11-13  Roland McGrath  <roland@redhat.com>
2098         * Examples/ex6.c (main): Improve error reporting.
2100 2002-11-04  Ulrich Drepper  <drepper@redhat.com>
2102         * sysdeps/i386/Makefile: Compile pthread.c and sighandler.c with
2103         -fno-omit-frame-pointer.  Patch by Andreas Steinmetz <ast@domdv.de>.
2105         * sysdeps/i386/useldt.h [PIC] (USETLS_LOAD_EBX): Use correct input
2106         register number.
2107         (DO_SET_THREAD_AREA): Mark asm output specifiers correctly.
2109 2002-10-22  Jakub Jelinek  <jakub@redhat.com>
2111         * manager.c (pthread_start_thread): Call __uselocale even
2112         if [! SHARED].  Patch by Leon Kanter <leon@geon.donetsk.ua>.
2114 2002-10-17  Roland McGrath  <roland@redhat.com>
2116         * Makefile (unload): Don't link in libpthread.so.
2117         ($(objpfx)unload.out): Do depend on it.
2118         * unload.c (main): Improve error reporting.
2120 2002-10-09  Roland McGrath  <roland@redhat.com>
2122         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
2123         Under [__PIC__], call the function via the pointer fetched for
2124         comparison rather than a call by name that uses the PLT.
2125         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
2126         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
2127         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
2128         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
2129         (__libc_key_create, __libc_getspecific, __libc_setspecific)
2130         (__libc_atfork): Use it.
2132         * pthread.c [SHARED] (__libc_dl_error_tsd): New function.
2133         (pthread_initialize) [SHARED]: Set _dl_error_catch_tsd to that.
2134         * Versions (libc: GLIBC_PRIVATE): Add __libc_dl_error_tsd.
2135         (ld: GLIBC_PRIVATE): Set removed.
2137 2002-10-11  Ulrich Drepper  <drepper@redhat.com>
2139         * sysdeps/unix/sysv/linux/execve.c: New file.
2141 2002-10-09  Jakub Jelinek  <jakub@redhat.com>
2143         * no-tsd.c: Include stdlib.h.
2145 2002-10-07  Jakub Jelinek  <jakub@redhat.com>
2147         * sysdeps/unix/sysv/linux/allocalim.h: New file.
2148         * descr.h (struct _pthread_descr_struct): Add p_alloca_cutoff
2149         field.
2150         * manager.c (__pthread_allocate_stack): Add out_stacksize argument.
2151         Pass stack size to caller.
2152         (pthread_handle_create): Set p_alloca_cutoff.
2153         * pthread.c (__pthread_initial_thread): Use C99 designated
2154         initializers.  Set p_alloca_cutoff.
2155         (__pthread_manager_thread): Likewise.
2156         (__pthread_initialize_minimal) [USE_TLS]: Set p_alloca_cutoff
2157         for initial thread.
2158         (__pthread_init_max_stacksize): Possibly decrease p_alloca_cutoff
2159         for initial thread.
2160         (__pthread_initialize_manager) [USE_TLS]: Set p_alloca_cutoff
2161         for manager thread.
2162         * specific.c (__libc_alloca_cutoff): New function.
2163         * no-tsd.c (__libc_alloca_cutoff): New function.
2164         * Versions: Export __libc_alloca_cutoff@@GLIBC_PRIVATE from libc
2165         and libpthread.
2167 2002-10-02  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2169         * sysdeps/sh/pt-machine.h: Make C code ifndef'ed with __ASSEMBLER__.
2170         * sysdeps/sh/tls.h: Likewise.
2171         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
2173 2002-09-29  Jakub Jelinek  <jakub@redhat.com>
2175         * sysdeps/pthread/tst-timer.c (main): Clear
2176         SIGEV2.sigev_notify_attributes.
2178 2002-09-29  Ulrich Drepper  <drepper@redhat.com>
2180         * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Don't use
2181         INLINE_SYSCALL for set_thread_area syscall.
2183 2002-09-28  Roland McGrath  <roland@redhat.com>
2185         * pthread.c (__pthread_reset_main_thread) [FLOATING_STACKS]:
2186         Don't call setrlimit, since we did no prior bogon we need to undo.
2188 2002-09-27  Roland McGrath  <roland@redhat.com>
2190         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Don't include <pt-machine.h>.
2192 2002-09-24  Roland McGrath  <roland@redhat.com>
2194         * sysdeps/x86_64/tls.h: New file.
2196 2002-09-23  Roland McGrath  <roland@redhat.com>
2198         * Examples/ex13.c (dump_mut): int -> size_t for counter.
2200 2002-09-18  Bruno Haible  <bruno@clisp.org>
2202         * Examples/ex10.c (thread): Fail if pthread_mutex_timedlock() returns
2203         an unexpected error code.
2205         * internals.h (__pthread_message): Add const to first parameter type.
2206         * pthread.c (__pthread_message): Likewise.
2208         * sysdeps/unix/sysv/linux/configure: Moved to ../sysdeps/pthread.
2210 2002-09-17  Roland McGrath  <roland@redhat.com>
2212         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT, TLS_DO_SET_THREAD_AREA):
2213         Set the descriptor limit to the full 4GB, so %gs:OFFSET works for any
2214         offset (positive or negative) relative to the thread struct.
2215         * sysdeps/i386/useldt.h (DO_MODIFY_LDT, DO_SET_THREAD_AREA): Likewise.
2217 2002-09-12  Jakub Jelinek  <jakub@redhat.com>
2219         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Move...
2220         * sysdeps/unix/sysv/linux/sparc/Makefile: ...here.
2221         Replace /usr/lib/crt[in].o with crt[in].o too.
2223 2002-09-11  Steven Munroe  <sjmunroe@us.ibm.com>
2225         * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
2227 2002-09-04  Bruno Haible  <bruno@clisp.org>
2229         * pthread.c: Include <sys/time.h>.
2230         (is_smp_system): Move to sysdeps/unix/sysv/linux/smp.h.
2231         * sysdeps/unix/sysv/linux/smp.h: New file, extracted from pthread.c.
2232         * Makefile (distribute): Add smp.h to the list.
2234 2002-09-04  Bruno Haible  <bruno@clisp.org>
2236         * sysdeps/alpha/pt-machine.h: Choose different include file location
2237         on non-Linux platforms.
2239         * wrapsyscall.c (PROMOTE_INTEGRAL_TYPE): New macro.
2240         (open, open64): Change va_arg argument type to the integral type to
2241         which mode_t promotes.
2243         * sysdeps/pthread/tst-timer.c (main): Don't assume anything about
2244         the structure of 'struct sigevent'.
2246         * errno.c (__errno_location, __h_errno_location, __res_state):
2247         Use prototype function definitions.
2249 2002-07-29  Steven Munroe  <sjmunroe@us.ibm.com>
2251         * shlib-versions: Set libpthread version to 2.3 for powerpc64.
2252         * sysdeps/powerpc/pt-machine.h: moved to...
2253         * sysdeps/powerpc/powerpc32/pt-machine.h: ...here
2254         * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
2256 2002-09-02  Roland McGrath  <roland@redhat.com>
2258         * sysdeps/powerpc/Makefile (CFLAGS-pt-initfini.s): New variable.
2260 2002-09-01  Roland McGrath  <roland@redhat.com>
2262         * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t): Add new keys
2263         CTYPE_B, CTYPE_TOLOWER, CTYPE_TOUPPER.
2265         * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_address): New macro.
2266         (__libc_internal_tsd_address): Declare it.
2267         * Versions (libc, ld, libpthread: GLIBC_PRIVATE): Add
2268         __libc_internal_tsd_address.
2269         * specific.c (libc_internal_tsd_address): New function.
2270         (__libc_internal_tsd_address): New variable.
2271         * no-tsd.c (__libc_internal_tsd_address): New variable.
2273 2002-08-31  Ulrich Drepper  <drepper@redhat.com>
2275         * Makefile: Don't use rule for crt%.o, spell it out as rules for
2276         crti.o and crtn.o.
2278 2002-08-30  Roland McGrath  <roland@redhat.com>
2280         * Makefile (extra-objs, omit-deps): Add crtn.
2281         ($(objpfx)libpthread.so): Depend on $(objpfx)crtn.o.
2282         ($(objpfx)libpthread.so: +postinit): Append $(objpfx)crtn.o.
2283         ($(objpfx)crtn.S): New target.
2284         ($(objpfx)crt%.o): Pattern rule replaces crti.o target.
2285         (generated): Add crtn.S.
2287         * sysdeps/unix/sysv/linux/x86_64/Makefile ($(objpfx)specs): Massage
2288         crtn.o pathname too.
2290 2002-08-30  Jakub Jelinek  <jakub@redhat.com>
2292         * pthread.c (__pthread_initialize_minimal): Call __uselocale even
2293         if [! SHARED].
2295 2002-08-30  Roland McGrath  <roland@redhat.com>
2297         * tst-static-locale.c: New file.
2298         * Makefile (tests, tests-static): Add it.
2300 2002-04-24  Steven Munroe  <sjmunroe@us.ibm.com>
2302         * spinlock.c (__pthread_lock): Fix spurious wakeup
2303         handling.  Don't clear lowest bit of list pointer as sign the thread
2304         is still on the wait list.  Don't restart after spurious wakeup
2305         with spinning to get the lock.
2306         (__pthread_unlock): Take set lowest bit into account when handling
2307         pointer to list elements.
2308         Patch by Steve Munroe <sjmunroe@us.ibm.com>.
2310 2002-08-28  Roland McGrath  <roland@redhat.com>
2312         * sysdeps/pthread/timer_routines.c (thread_func): Fix type in cast.
2314 2002-08-28  Jakub Jelinek  <jakub@redhat.com>
2316         * sysdeps/unix/sysv/linux/hppa/aio_cancel.c: New file.
2317         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
2318         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
2320 2002-08-28  Ulrich Drepper  <drepper@redhat.com>
2322         * sysdeps/pthread/timer_routines.c (thread_func): Change return
2323         type to void and add casts in use to avoid warnings with all gcc
2324         versions.
2326 2002-08-08  Jakub Jelinek  <jakub@redhat.com>
2328         * sysdeps/unix/sysv/linux/bits/local_lim.h (PTHREAD_THREADS_MAX):
2329         Bump to 16384.
2330         * manager.c (__pthread_handles): Remove.
2331         * pthandles.c: New file.
2332         * pthread.c (__pthread_initialize_minimal): Initialize
2333         __pthread_handles[0] and __pthread_handles[1].
2334         * Makefile (libpthread-routines): Add pthandles (must be last).
2336 2002-08-26  Brian Youmans  <3diff@gnu.org>
2338         * Examples/ex10.c: Corrected version number in Lesser GPL copying
2339         permission notice from 2 to 2.1.
2340         * Examples/ex11.c: Likewise.
2341         * Examples/ex13.c: Likewise.
2342         * Examples/ex8.c: Likewise.
2343         * Examples/ex9.c: Likewise.
2344         * barrier.c: Likewise.
2345         * events.c: Likewise.
2346         * lockfile.c: Likewise.
2347         * no-tsd.c: Likewise.
2348         * pt-machine.c: Likewise.
2349         * ptclock_gettime.c: Likewise.
2350         * ptclock_settime.c: Likewise.
2351         * rwlock.c: Likewise.
2352         * sysdeps/alpha/pspinlock.c: Likewise.
2353         * sysdeps/alpha/pt-machine.h: Likewise.
2354         * sysdeps/arm/pspinlock.c: Likewise.
2355         * sysdeps/arm/pt-machine.h: Likewise.
2356         * sysdeps/cris/pspinlock.c: Likewise.
2357         * sysdeps/cris/pt-machine.h: Likewise.
2358         * sysdeps/hppa/pspinlock.c: Likewise.
2359         * sysdeps/hppa/pt-machine.h: Likewise.
2360         * sysdeps/i386/i686/pt-machine.h: Likewise.
2361         * sysdeps/i386/pspinlock.c: Likewise.
2362         * sysdeps/i386/pt-machine.h: Likewise.
2363         * sysdeps/i386/useldt.h: Likewise.
2364         * sysdeps/ia64/pspinlock.c: Likewise.
2365         * sysdeps/ia64/pt-machine.h: Likewise.
2366         * sysdeps/m68k/pspinlock.c: Likewise.
2367         * sysdeps/m68k/pt-machine.h: Likewise.
2368         * sysdeps/mips/pspinlock.c: Likewise.
2369         * sysdeps/mips/pt-machine.h: Likewise.
2370         * sysdeps/powerpc/pspinlock.c: Likewise.
2371         * sysdeps/powerpc/pt-machine.h: Likewise.
2372         * sysdeps/pthread/bits/initspin.h: Likewise.
2373         * sysdeps/pthread/bits/libc-lock.h: Likewise.
2374         * sysdeps/pthread/bits/libc-tsd.h: Likewise.
2375         * sysdeps/pthread/getcpuclockid.c: Likewise.
2376         * sysdeps/pthread/posix-timer.h: Likewise.
2377         * sysdeps/pthread/timer_create.c: Likewise.
2378         * sysdeps/pthread/timer_delete.c: Likewise.
2379         * sysdeps/pthread/timer_getoverr.c: Likewise.
2380         * sysdeps/pthread/timer_gettime.c: Likewise.
2381         * sysdeps/pthread/timer_routines.c: Likewise.
2382         * sysdeps/pthread/timer_settime.c: Likewise.
2383         * sysdeps/pthread/tst-timer.c: Likewise.
2384         * sysdeps/s390/pspinlock.c: Likewise.
2385         * sysdeps/s390/s390-32/pt-machine.h: Likewise.
2386         * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2387         * sysdeps/sh/pspinlock.c: Likewise.
2388         * sysdeps/sh/pt-machine.h: Likewise.
2389         * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
2390         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2391         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
2392         * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
2393         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2394         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
2395         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
2396         * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
2397         * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
2398         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2399         * tststack.c: Likewise.
2400         * unload.c: Likewise.
2401         * weaks.c: Likewise.
2402         * wrapsyscall.c: Likewise.
2404         * sysdeps/pthread/pt-initfini.c: Changed copying
2405         permission notice to Lesser GPL from Library GPL, including the
2406         references in the special exception.
2407         * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Likewise.
2408         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Likewise.
2409         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c:
2410         Likewise.
2411         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c:
2412         Likewise.
2413         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Likewise.
2415 2002-08-26  Ulrich Drepper  <drepper@redhat.com>
2417         * Examples/ex10.c (thread): tv_nsec == 1000000000 is already
2418         overflow [PR libc/4244].
2420 2002-08-25  Ulrich Drepper  <drepper@redhat.com>
2422         * sysdeps/pthread/timer_routines.c (thread_func): Make the
2423         compiler happy by adding a return statement which will never be
2424         reached.
2426         * tst-context.c (main): Cast to long before casting to pointer.
2428         * Examples/ex17.c (main): Use correct format string.
2430         * Examples/ex9.c (thread): Remove incorrect return statement.
2432 2002-08-23  Ulrich Drepper  <drepper@redhat.com>
2434         * pthread.c (__linuxthreads_version): New global constant.
2436 2002-08-23  Andreas Jaeger  <aj@suse.de>
2438         * sysdeps/x86_64/pt-machine.h: Use %fs instead of %gs
2439         as thread specific register.
2440         (testandset): Fix inline asm.
2441         (THREAD_GETMEM): Fix inline asm.
2443 2002-08-22  Roland McGrath  <roland@redhat.com>
2445         * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Remove [HAVE_TLS_SUPPORT]
2446         conditional.
2447         (INIT_THREAD_SELF): Pass second arg to DO_SET_THREAD_AREA.
2448         (DO_SET_THREAD_AREA): Take second arg, pass to DO_SET_THREAD_AREA_REUSE
2449         macro.  That chooses whether to reuse %gs value or let kernel set it.
2450         [USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, always 1.
2451         [!USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, true if arg is
2452         not constant 0.
2454 2002-08-21  Ulrich Drepper  <drepper@redhat.com>
2456         * sysdeps/i386/tls.h (TLS_SETUP_GS_SEGMENT): Add new parameter
2457         also to the third definition of this macro.
2459 2002-06-17  Andreas Jaeger  <aj@suse.de>
2461         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
2462         Set it.
2464 2002-08-20  Ulrich Drepper  <drepper@redhat.com>
2466         * sysdeps/i386/useldt.h: Go back to using 16-bit instructions when
2467         loading/reading segment registers.  Some old hardware doesn't
2468         handle the 32-bit instructions as expected.
2469         * sysdeps/i386/tls.h: Likewise.
2471         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Second parameter is
2472         renamed to secondcall and use is negated.
2473         (TLS_SETUP_GS_SEGMENT): Likewise.
2474         (TLS_INIT_TP): Likewise.
2475         * sysdeps/sh/tls.h (TLS_INIT_TP): Second parameter is renamed to
2476         secondcall.
2478         * sysdeps/i386/tls.h: Use 32-bit operations when handling segment
2479         registers.  No need to mask upper 16 bits in this case.
2480         * sysdeps/i386/useldt.h: Likewise.
2481         (DO_SET_THREAD_AREA): We have to load %gs again even if the value
2482         is the same since the GDT content changed.
2484         * sysdeps/i386/tls.h (TLS_INIT_TP): Add new parameter and pass it on
2485         to TLS_SETUP_GS_SEGMENT.
2486         (TLS_SETUP_GS_SEGMENT): Add new parameter and pass it on to
2487         TLS_DO_SET_THREAD_AREA.
2488         (TLS_DO_SET_THREAD_AREA): If new parameter is zero determine
2489         entry number from %gs value.
2490         * sysdeps/sh/tls.h (TLS_INIT_TP): Add new parameter and simply
2491         ignore it.
2493         * manager.c (pthread_handle_create): Pass NULL to _dl_allocate_tls.
2494         Pass true to _dl_deallocate_tls.
2495         (pthread_free): Likewise.
2496         * pthread.c (__pthread_initialize_manager): Likewise.
2498 2002-08-19  Ulrich Drepper  <drepper@redhat.com>
2500         * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Use correct shift when
2501         computing index from %gs value.
2503 2002-08-16  Roland McGrath  <roland@redhat.com>
2505         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Calculate segment
2506         register value from entry number properly.
2508         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Rewrite asm to use %ebx
2509         optimally conditional on [__PIC__].
2510         (TLS_DO_SET_THREAD_AREA): New macro, implement inline syscall
2511         without touching errno, and use latest modify_ldt-like interface.
2512         (TLS_SETUP_GS_SEGMENT): Use that instead of INLINE_SYSCALL.
2513         * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Set %gs in this macro.
2514         (DO_SET_THREAD_AREA): New macro, uses current syscall interface with
2515         existing %gs value as the segment to set.
2516         (INIT_THREAD_SELF): Rewritten using those.  Use set_thread_area only
2517         under [HAVE_TLS_SUPPORT] so we can rely on the initialization done
2518         by the first thread's early TLS setup.
2520 2002-08-15  Roland McGrath  <roland@redhat.com>
2522         * sysdeps/i386/tls.h (TLS_INIT_TP): Use statement expression and
2523         return a value as callers now expect.
2525 2002-08-11  Roland McGrath  <roland@redhat.com>
2527         * pthread.c (__pthread_initialize_manager): Initialize
2528         p_header.data.tcb field of manager thread's descriptor.
2529         (__pthread_initialize_minimal): Don't initialize p_header.data.self
2530         field, already done by TLS_INIT_TP.
2532         * manager.c (pthread_handle_create): Move p_header field initializers
2533         together.
2535 2002-08-08  Ulrich Drepper  <drepper@redhat.com>
2537         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Removed.
2539 2002-08-07  Ulrich Drepper  <drepper@redhat.com>
2541         * pthread.c (__linuxthreads_initial_report_events): New variable.
2542         (__pthread_initialize_manager): Use it to initialize p_report_events
2543         of initial thread.
2544         [TLS]: Store pointer to descriptor of manager in __pthread_handles.
2546 2002-08-07  Roland McGrath  <roland@redhat.com>
2548         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Add an extra argument with
2549         an "m" constraint to the asm so the compiler knows LDT_ENTRY was used.
2551 2002-08-02  Roland McGrath  <roland@redhat.com>
2553         * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t):
2554         Add _LIBC_TSD_KEY_LOCALE.
2555         * manager.c (pthread_start_thread) [!(USE_TLS && HAVE___THREAD)]:
2556         Call __uselocale to initialize our per-thread locale pointer to
2557         the global one.
2558         * pthread.c (__pthread_initialize_minimal): Likewise.
2560         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Add missing \s.
2562 2002-08-02  Ulrich Drepper  <drepper@redhat.com>
2564         * pthread.c: Declare _errno, _h_errno, and _res unless we use TLS
2565         internally.
2567         * cancel.c (__pthread_perform_cleanup) [USE_TLS && HAVE___THREAD]:
2568         Don't use p_libc_specific element in thread descriptor.
2570 2002-07-30  Roland McGrath  <roland@redhat.com>
2572         * sysdeps/pthread/bits/libc-tsd.h: Include <tls.h>.
2573         [USE_TLS && HAVE___THREAD]: Just include the sysdeps/generic file,
2574         which does the right thing when __thread support is available.
2575         * descr.h (struct _pthread_descr_struct) [USE_TLS && HAVE___THREAD]:
2576         Omit `p_libc_specific', `p_errnop', `p_errno', `p_h_errnop',
2577         `p_h_errno', `p_resp', and `p_res' members.
2578         * pthread.c (__pthread_initialize_minimal) [USE_TLS && HAVE___THREAD]:
2579         Don't initialize `p_errnop' and `p_h_errnop' members.
2580         (__pthread_reset_main_thread): Likewise.
2581         (__pthread_initialize_manager): Likewise.
2582         * manager.c (__pthread_manager, pthread_handle_create): Likewise.
2583         * pthread.c (pthread_initialize) [USE_TLS && HAVE___THREAD]:
2584         Don't initialize `p_resp' member.
2585         (__pthread_reset_main_thread): Likewise.
2586         * manager.c (pthread_handle_create): Likewise.
2587         * specific.c (libc_internal_tsd_set, libc_internal_tsd_get):
2588         Conditionalize these on [!(USE_TLS && HAVE___THREAD)].
2589         * no-tsd.c: Conditionalize contents on [!(USE_TLS && HAVE___THREAD)].
2590         * errno.c [USE_TLS && HAVE___THREAD]
2591         (__h_errno_location, __res_state): Don't define these at all.
2593         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens around arguments!
2594         (INSTALL_NEW_DTV, GET_DTV): Likewise.
2595         * sysdeps/sh/tls.h (INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV): Likewise.
2597         * weaks.c: Don't include <errno.h> here.
2599 2002-08-01  Roland McGrath  <roland@redhat.com>
2601         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): New macro, broken out of
2602         TLS_INIT_TP.
2603         (TLS_DO_SET_THREAD_AREA): New macro, uses thread_set_area syscall.
2604         (TLS_SETUP_GS_SEGMENT): New macro, try one or the other or both.
2605         (TLS_INIT_TP): Use that.
2607 2002-08-02  Jakub Jelinek  <jakub@redhat.com>
2609         * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Move from INIT_THREAD_SELF.
2610         (INIT_THREAD_SELF): Use sys_thread_area syscall instead if available.
2611         (FREE_THREAD): Avoid modify_ldt if using GDT.
2612         * sysdeps/i386/pspinlock.c (__have_no_set_thread_area): New variable.
2614 2002-07-25  Jakub Jelinek  <jakub@redhat.com>
2616         * sysdeps/i386/tls.h: Use __ASSEMBLER__ test macro not ASSEMBLER.
2617         * sysdeps/i386/pt-machine.h: Likewise.
2618         * sysdeps/i386/useldt.h: Likewise.
2620 2002-07-22  Ulrich Drepper  <drepper@redhat.com>
2622         * pthread.c (__pthread_initialize_minimal): If !SHARED and TLS
2623         call __libc_setup_tls first.
2624         * Makefile: Actually create tst-signal.out file when running the test.
2625         (tests): Add tststatic.
2626         * Examples/tststatic.c: New file.
2628 2002-07-19  Ulrich Drepper  <drepper@redhat.com>
2630         * errno.c (__errno_location): Don't define unless !USE_TLS
2631         || !HAVE___THREAD.
2632         * sysdeps/i386/pt-machine.c: Protect C code with #ifndef ASSEMBLER.
2633         * sysdeps/i386/tls.h: Likewise.
2634         * sysdeps/i386/useldt.h: Likewise.
2635         * sysdeps/i386/i686/pt-machine.h: Likewise.
2637 2002-07-02  H.J. Lu  <hjl@gnu.org>
2639         * sysdeps/mips/pspinlock.c: Don't include <sgidefs.h>.  Always
2640         use ll/sc.
2641         * sysdeps/mips/pt-machine.h: Likewise.
2643 2002-07-14  Ulrich Drepper  <drepper@redhat.com>
2645         * manager.c (pthread_handle_create): Initialize self-reference in
2646         descriptor.
2648 2002-07-01  Jakub Jelinek  <jakub@redhat.com>
2650         * Examples/ex9.c (main): Remove unused th variable.
2652 2002-07-10  Ulrich Drepper  <drepper@redhat.com>
2654         * wrapsyscall.c: Add __nanosleep alias.
2655         * Versions (GLIBC_2.2.6): Add __nanosleep.
2656         * bug-sleep.c: New file.
2657         * Makefile (tests): Add bug-sleep.
2659 2002-06-19  Steven Munroe  <sjmunroe@vnet.ibm.com>
2661         * Examples/ex9.c (main):  Use list of children and join them.
2662         (thread): Do not call exit.
2664 2002-06-20  Ulrich Drepper  <drepper@redhat.com>
2666         * spinlock.c (wait_node_alloc): We cannot use compare-and-exchange.
2667         Unconditionally use the code using spinlock.  Use __pthread_release
2668         to free a spinlock.
2669         (wait_node_free): Likewise.
2670         (__pthread_acquire, __pthread_release): Unconditionally define.
2672 2002-06-07  Jakub Jelinek  <jakub@redhat.com>
2674         * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Fix typo.
2676 2002-05-24  Ulrich Drepper  <drepper@redhat.com>
2678         * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Use __sync_synchronize.
2680 2002-05-21  Ulrich Drepper  <drepper@redhat.com>
2682         * sysdeps/pthread/pthread.h (pthread_create): Rename first
2683         parameter.
2684         (pthread_cancel): Likewise.
2685         * internals.h (__pthread_create_2_1): Likewise.
2686         * sysdeps/unix/sysv/linux/bits/sigthread.h (pthread_kill): Likewise.
2688 2002-05-20  Ulrich Drepper  <drepper@redhat.com>
2690         * sysdeps/alpha/pt-machine.c (THREAD_SELF): Remove clobber.
2691         Patch by Glen Nakamura <gen@flex.com>.
2693 2002-05-03  Ulrich Drepper  <drepper@redhat.com>
2695         * signals.c: Move sighandler functions to...
2696         * sighandler.c: ...here.  New file.
2697         * signals.c: Move signal handler related type definitions to...
2698         * internals.h: ...here.  Add prototypes for signal handlers.
2699         * Makefile (libpthread-routines): Add sighandler.
2700         (CFLAGS-sighandler.c): Add $(exceptions).
2702 2002-04-30  Jakub Jelinek  <jakub@redhat.com>
2704         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
2706 2002-04-08  Ulrich Drepper  <drepper@redhat.com>
2708         * sysdeps/pthread/timer_getoverr.c: Return real overrun.
2709         * sysdeps/pthread/posix-timer.h (struct timer_node): Add overrun_count.
2710         * sysdeps/pthread/timer_routines.c (thread_func): Schedule next timeout
2711         based on previous one and not on current time.  Count overruns.
2712         Patch by Eric F. Sorton <eric@cctcorp.com>.
2714         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add DELAYTIMER_MAX.
2716 2002-04-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
2718         * sysdeps/sh/pt-machine.h: Define _PT_MACHINE_H
2719         if it isn't defined yet.
2720         (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Defined.
2721         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
2722         Likewise.
2723         * sysdeps/sh/tls.h: New file.
2725 2002-04-08  Jakub Jelinek  <jakub@redhat.com>
2727         * manager.c (__pthread_manager_event): Use self instead of arg
2728         for INIT_THREAD_SELF.
2729         * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Use sizeof (struct
2730         _pthread_descr_struct) instead of sizeof (*descr).
2732 2002-04-05  Ulrich Drepper  <drepper@redhat.com>
2734         * sysdeps/ia64/pt-machine.h: Protect against multiple inclusion.
2735         * sysdeps/alpha/pt-machine.h: Likewise.
2736         * sysdeps/arm/pt-machine.h: Likewise.
2737         * sysdeps/cris/pt-machine.h: Likewise.
2738         * sysdeps/hppa/pt-machine.h: Likewise.
2739         * sysdeps/m68k/pt-machine.h: Likewise.
2740         * sysdeps/mips/pt-machine.h: Likewise.
2741         * sysdeps/powerpc/pt-machine.h: Likewise.
2742         * sysdeps/s390/s390-32/pt-machine.h: Likewise.
2743         * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2744         * sysdeps/sh/pt-machine.h: Likewise.
2745         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2746         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2747         * sysdeps/x86_64/pt-machine.h: Likewise.
2749 2002-04-05  Jakub Jelinek  <jakub@redhat.com>
2751         * man/pthread_mutexattr_init.man (pthread_mutexattr_settype): Document
2752         instead of pthread_mutexattr_setkind_np.
2753         (pthread_mutexattr_gettype): Similarly.
2754         * man/pthread_mutexattr_setkind_np.man: New.
2755         * man/Makefile (SOURCES): Add pthread_mutexattr_setkind_np.man.
2757 2002-04-02  Ulrich Drepper  <drepper@redhat.com>
2759         * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Define.
2761 2002-03-22  Jakub Jelinek  <jakub@redhat.com>
2763         * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Remove.
2765 2002-03-22  Ulrich Drepper  <drepper@redhat.com>
2767         * internals.h (MEMORY_BARRIER): Define as asm with memory as clobber.
2769 2002-03-17  Andreas Jaeger  <aj@suse.de>
2771         * sysdeps/i386/pt-machine.h: Add testandset and __compare_and_swap
2772         prototpyes.
2773         * sysdeps/alpha/pt-machine.h: Likewise.
2774         * sysdeps/arm/pt-machine.h: Likewise.
2775         * sysdeps/cris/pt-machine.h: Likewise.
2776         * sysdeps/hppa/pt-machine.h: Likewise.
2777         * sysdeps/i386/i686/pt-machine.h: Likewise.
2778         * sysdeps/ia64/pt-machine.h: Likewise.
2779         * sysdeps/m68k/pt-machine.h: Likewise.
2780         * sysdeps/mips/pt-machine.h: Likewise.
2781         * sysdeps/powerpc/pt-machine.h: Likewise.
2782         * sysdeps/s390/s390-32/pt-machine.h: Likewise.
2783         * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2784         * sysdeps/sh/pt-machine.h: Likewise.
2785         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2786         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2787         * sysdeps/x86_64/pt-machine.h: Likewise.
2789         * internals.h: Move testandset and __compare_and_swap prototypes
2790         to pt-machine.h.
2792 2002-03-03  Andreas Jaeger  <aj@suse.de>
2794         * errno.c: Include resolv.h to avoid warning.
2796 2002-02-27  Ulrich Drepper  <drepper@redhat.com>
2798         * pthread.c [USE_TLS] (thread_self_stack): Correct check for upper
2799         stack limit.
2801 2002-02-23  Ulrich Drepper  <drepper@redhat.com>
2803         * attr.c (pthread_getattr_np): Don't take thread descriptor size
2804         into account if USE_TLS.
2805         * manager.c (pthread_handle_create): Free TLS data structures if call
2806         failed.  Pass correct stack to clone if USE_TLS.
2807         * sysdeps/i386/pt-machine.h: Handle multiple inclusion.
2808         * sysdeps/i386/i686/pt-machine.h: Likewise.
2809         * sysdeps/i386/tls.h: Unconditionally include <pt-machine.h>.
2811         * descr.h (struct _pthread_descr_struct): Update p_header for TLS.
2812         Add p_stackaddr element #if USE_TLS.
2813         * internals.c: Include <tls.h>.
2814         * manager.c: Integrate creating and handling of thread descriptor
2815         for TLS.
2816         * pthread.c: Likewise.
2817         * sysdeps/i386/tls.h (tcbhead_t): Add self pointer.
2818         Include <linuxthreads/descr.h> only if TLS is really used.
2819         (GET_DTV): New macro.
2820         (TLS_INIT_TP): Initialize self pointer.
2822 2002-02-17  Andreas Schwab  <schwab@suse.de>
2824         * signals.c (sigwait): Check for old sighandler being SIG_ERR,
2825         not NULL.
2827 2002-02-12  Ulrich Drepper  <drepper@redhat.com>
2829         * sysdeps/i386/tls.c (INSTALL_NEW_DTV): Define.
2830         (INSTALL_DTV): Adjust for being passed pointer to element with length.
2832 2002-02-08  Ulrich Drepper  <drepper@redhat.com>
2834         * sysdeps/i386/tls.h (TLS_INIT_TP): Also initialize %gs.
2836 2002-02-08  Richard Henderson  <rth@redhat.com>
2838         * sysdeps/alpha/elf/pt-initfini.c: Use \n\ for multiline string.
2840 2002-02-08  Ulrich Drepper  <drepper@redhat.com>
2842         * sysdeps/i386/tls.h: TLS cannot be supported with FLOATING_STACKS
2843         after all.
2845 2002-02-07  H.J. Lu  <hjl@gnu.org>
2847         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Silence the
2848         gcc warning.
2849         (__pthread_spin_lock): Remove ".set noreorder".
2850         * sysdeps/mips/pt-machine.h (__compare_and_swap): Liekwise.
2852 2002-02-05  H.J. Lu  <hjl@gnu.org>
2854         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Not use
2855         branch likely.
2856         * sysdeps/mips/pt-machine.h (testandset): Likewise.
2857         (__compare_and_swap): Likewise.
2859 2002-02-07  Ulrich Drepper  <drepper@redhat.com>
2861         * internals.h: Move declarations/definitions of
2862         __pthread_initial_thread_bos, __pthread_initial_thread,
2863         __pthread_manager_thread_bos, __pthread_manager_thread_tos,
2864         __pthread_manager_thread, __pthread_nonstandard_stacks, STACK_SIZE,
2865         CURRENT_STACK_FRAME, __pthread_find_self, and thread_self...
2866         * descr.h: ...here.
2867         * sysdeps/i386/tls.h: Add TLS definitions also for !FLOATING_STACKS.
2868         Define THREAD_GETMEM accordingly.
2870 2002-02-06  Ulrich Drepper  <drepper@redhat.com>
2872         * sysdeps/i386/tls.h: Include <stddef.h> for size_t.
2874         * sysdeps/i386/tls.h: Define THREAD_DTV.
2876 2002-02-04  Ulrich Drepper  <drepper@redhat.com>
2878         * internals.h: Move thread descriptor definition...
2879         * descr.h.: ...here.  New file.
2880         * sysdeps/i386/tls.h: New file.
2882 2002-02-01  H.J. Lu  <hjl@gnu.org>
2884         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Use a
2885         different register in the delayed slot.  Use branch likely.
2887         * sysdeps/mips/pt-machine.h (testandset): Call _test_and_set.
2888         (__compare_and_swap): Return 0 only when failed to compare. Use
2889         branch likely.
2891 2002-02-01  Jakub Jelinek  <jakub@redhat.com>
2893         * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set,
2894         __pthread_kill_other_threads_np): Move to GLIBC_PRIVATE.
2895         * sysdeps/i386/i586/Versions: Move all symbols to GLIBC_PRIVATE.
2896         * sysdeps/i386/i686/Versions: Move all symbols to GLIBC_PRIVATE.
2897         * sysdeps/sparc/sparc32/sparcv9/Versions: New file.
2898         * sysdeps/sparc/sparc64/Versions: New file.
2899         * sysdeps/ia64/Versions: Move all symbols to GLIBC_PRIVATE.
2901 2002-01-31  Ulrich Drepper  <drepper@redhat.com>
2903         * pthread.c: _dl_cpuclock_offset is not any longer a global variable
2904         in SHARED code, use GL(dl_cpuclock_offset).
2906 2002-01-28  Andreas Jaeger  <aj@suse.de>
2908         * sysdeps/mips/pspinlock.c (__pthread_spin_init): Clear *LOCK to
2909         0. Patch by Machida Hiroyuki <machida@sm.sony.co.jp>.
2911 2002-01-16  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2913         * sysdeps/s390/s390-32/pt-machine.h (MEMORY_BARRIER): Define.
2914         (CURRENT_STACK_FRAME): Remove duplicate definition.
2915         * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2917 2002-01-14  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2919         * Makefile (CFLAGS-tst-cancel.c): Add -fno-inline-functions to prevent
2920         automatic inline.
2922 2002-01-12  Andreas Schwab  <schwab@suse.de>
2924         * Makefile (test-srcs): Add tst-signal.
2925         (tests): Run tst-signal.
2926         (distribute): Add tst-signal.sh.
2927         * tst-signal.c, tst-signal.sh: New files.
2929 2002-01-14  Andreas Jaeger  <aj@suse.de>
2931         * sysdeps/x86_64/pt-machine.h (INIT_THREAD_SELF): Avoid warning.
2933 2002-01-11  Andreas Schwab  <schwab@suse.de>
2935         * signals.c (sighandler): Initialize all elements to SIG_ERR.
2936         (__sigaction): Don't use value from sighandler if it is SIG_ERR.
2938 2002-01-06  Richard Henderson  <rth@redhat.com>
2940         * sysdeps/alpha/elf/pt-initfini.c: New file.
2942 2001-12-29  Andreas Jaeger  <aj@suse.de>
2944         * Examples/ex9.c: Add noreturn attribute for thread.
2945         * Examples/ex10.c: Likewise.
2946         * Examples/ex13.c (thread_start): Likewise.
2947         * Examples/ex15.c (worker): Likewise.
2949         * Examples/ex18.c: Include unistd.h for prototype of sleep.
2951 2001-12-14  Ulrich Drepper  <drepper@redhat.com>
2953         * man/pthread_atfork.man: Adjust description of mutex handling
2954         after fork for current implementation.
2955         * linuxthreads.texi: Likewise [PR libc/2519].
2957 2001-12-13  Andreas Schwab  <schwab@suse.de>
2959         * specific.c (pthread_key_delete): Don't contact the thread
2960         manager if no threads have been created yet.
2962 2001-12-12  NIIBE Yutaka  <gniibe@m17n.org>
2964         * sysdeps/sh/pt-machine.h (INIT_THREAD_SELF): Added __volatile__
2965         qualifier to be safe.
2967 2001-11-30  Andreas Schwab  <schwab@suse.de>
2969         * pthread.c (pthread_handle_sigcancel) [THREAD_SELF]: Double check
2970         that self is the manager thread, and initialize the thread
2971         register if not.
2972         (thread_self_stack) [THREAD_SELF]: New function to find self via
2973         stack pointer.
2974         * manager.c (pthread_handle_create): Don't block cancel signal any
2975         more.
2977 2001-11-29  Andreas Jaeger  <aj@suse.de>
2979         * sysdeps/x86_64/pt-machine.h: Use %gs as thread specific register.
2980         (THREAD_SELF): New.
2981         (INIT_THREAD_SELF): New.
2982         (THREAD_GETMEM): New.
2983         (THREAD_GETMEM_NC):
2984         (THREAD_SETMEM): New.
2985         (THREAD_SETMEM_NC): New.
2986         (FLOATING_STACKS): Define.
2987         (ARCH_STACK_MAX_SIZE): Define.
2989 2001-11-28  Kaz Kylheku  <kaz@ashi.footprints.net>
2991         Bugfix to pthread_key_delete. It was iterating over the thread
2992         manager's linked list of threads, behind the thread manager's
2993         back causing a race. The fix is to have the manager iterate over
2994         the threads instead, using a new request type for doing so.
2995         * internals.h (struct pthread_request): New manager request type
2996         REQ_FOR_EACH_THREAD.
2997         * manager.c (pthread_for_each_thread): New function.
2998         (__pthread_manager): Handle new REQ_FOR_EACH_THREAD request.
2999         * specific.c (struct pthread_key_delete_helper_args): New type.
3000         (pthread_key_delete_helper): New static function.
3001         (pthread_key_delete): Use the new thread manager
3002         REQ_FOR_EACH_THREAD function to iterate over the threads and set
3003         the delete key slot to a null value in each thread.
3004         * Examples/ex18.c: New test.
3005         * Makefile (tests): Add ex18.
3007 2001-11-22  Wolfram Gloger  <wg@malloc.de>
3009         * pthread.c (pthread_onexit_process): Don't call free
3010         after threads have been asynchronously terminated.
3012         * manager.c (pthread_handle_exit): Surround cancellation
3013         of threads with __flockfilelist()/__funlockfilelist().
3015 2001-11-26  Andreas Schwab  <schwab@suse.de>
3017         * manager.c (pthread_handle_create): Start the child thread with
3018         the cancel signal blocked, so that it does not handle it before
3019         the thread register is set up.  Save errno from failed clone call.
3021 2001-11-15  Ulrich Drepper  <drepper@redhat.com>
3023         * sysdeps/i386/i686/Implies: Removed.
3024         * sysdeps/i386/i686/Versions: New file.
3026 2001-10-31  Andreas Jaeger  <aj@suse.de>
3028         * sysdeps/x86_64/Makefile: Remove, we do not need it anymore.
3030 2001-10-05  Kevin Buettner  <kevinb@cygnus.com>
3032         * pthread.c (__linuxthread_pthread_sizeof_descr): Change name
3033         to __linuxthreads_pthread_sizeof_descr to match name used by
3034         symbol_list_arr[LINUXTHREADS_PTHREAD_SIZEOF_DESCR] in
3035         linuxthreads_db/td_symbol_list.c.
3037 2001-09-22  Andreas Jaeger  <aj@suse.de>
3039         * linuxthreads/tst-context.c: Avoid compile warning.
3041 2001-09-20  Andreas Jaeger  <aj@suse.de>
3043         * shlib-versions: Add x86-64.
3045 2001-09-19  Andreas Jaeger  <aj@suse.de>
3047         * sysdeps/x86_64/Makefile: New file.
3048         * sysdeps/x86_64/pspinlock.c: New file.
3049         * sysdeps/x86_64/pt-machine.h: New file.
3051 2001-09-12  Jakub Jelinek  <jakub@redhat.com>
3053         * sysdeps/pthread/timer_delete.c (timer_delete): Thread may be NULL
3054         for SIGEV_NONE.
3055         * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
3057 2001-09-11  Ulrich Drepper  <drepper@redhat.com>
3058             Wolfram Gloger <wg@malloc.de>
3060         * join.c: Protect all communications from and to manager with
3061         TEMP_FAILURE_RETRY.
3062         * manager.c: Likewise.
3063         * pthread.c: Likewise.
3064         * smeaphore.c: Likewise.
3066 2001-08-29  Ulrich Drepper  <drepper@redhat.com>
3068         * spinlock.c (__pthread_lock): Top max_count value with
3069         MAX_ADAPTIVE_SPIN_COUNT.
3070         * internals.h (MAX_ADAPTIVE_SPIN_COUNT): Define if not already done.
3072         * sysdeps/i386/i686/pt-machine.h (BUSY_WAIT_NOP): New macro to
3073         help P4.
3075 2001-08-27  Jakub Jelinek  <jakub@redhat.com>
3077         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_t): Only define to
3078         non-opaque type if __USE_UNIX98.
3080 2001-08-26  Jakub Jelinek  <jakub@redhat.com>
3082         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_t): Define
3083         non-opaque lock types also if _IO_MTSAFE_IO is defined.
3085 2001-08-23  Roland McGrath  <roland@frob.com>
3087         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start): Take
3088         new first argument, skip the cleanup handler if it's zero.
3089         (_LIBC_LOCK_RECURSIVE_INITIALIZER): New macro.
3090         (__libc_lock_define_initialized_recursive): Use it.
3091         * sysdeps/pthread/bits/stdio-lock.h: File removed.
3092         The sysdeps/generic file from the main tree now suffices.
3094 2001-08-22  Roland McGrath  <roland@frob.com>
3096         * sysdeps/pthread/bits/stdio-lock.h: Include <bits/libc-lock.h>
3097         instead of <pthread.h>.
3098         (_IO_lock_t): Define this typedef using __libc_lock_define_recursive.
3099         (_IO_lock_initializer): Add braces.
3100         (_IO_lock_lock): Use __libc_lock_lock_recursive.
3101         (_IO_lock_unlock): Use __libc_lock_unlock_recursive.
3103         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_recursive_t): New type.
3104         (__libc_lock_define_initialized_recursive): Use it.
3105         (__libc_lock_init_recursive): Likewise.
3106         (__libc_lock_fini_recursive): Likewise.
3107         (__libc_lock_lock_recursive): Likewise.
3108         (__libc_lock_trylock_recursive): Likewise.
3109         (__libc_lock_unlock_recursive): Likewise.
3110         (__libc_lock_define_recursive): New macro.
3112 2001-08-14  Jakub Jelinek  <jakub@redhat.com>
3114         * lockfile.c (__pthread_provide_lockfile): New variable.
3115         * pthread.c (__pthread_require_lockfile): New variable.
3116         * cancel.c (__pthread_require_lockfile): New variable.
3118 2001-07-31  Ulrich Drepper  <drepper@redhat.com>
3120         * tst-context.c (threadfct): Initialize context before calling
3121         makecontext.
3123         * Examples/ex17.c: Make sure test thread is around long enough.
3125 2001-07-26  kaz Kojima  <kkojima@rr.iij4u.or.jp>
3127         * sysdeps/sh/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF): Defined.
3129 2001-07-24  Ulrich Drepper  <drepper@redhat.com>
3131         * tst-context.c (main): Print explanation before bailing out
3132         because context handling is not supported.
3134 2001-07-23  Ulrich Drepper  <drepper@redhat.com>
3136         * Makefile (tests): Add tst-context.
3137         * tst-context.c: New file.
3139         * sysdeps/pthread/bits/stdio-lock.h: Define
3140         _IO_cleanup_region_start_noarg.
3142 2001-07-23  Jakub Jelinek  <jakub@redhat.com>
3144         * sysdeps/alpha/pt-machine.h (FLOATING_STACKS): Define.
3145         (ARCH_STACK_MAX_SIZE): Define.
3146         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
3147         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3149 2001-07-19  Jakub Jelinek  <jakub@redhat.com>
3151         * sysdeps/i386/useldt.h: Fix typo in ARCH_STACK_MAX_SIZE comment.
3153         * sysdeps/ia64/pt-machine.h (FLOATING_STACKS): Define.
3154         (ARCH_STACK_MAX_SIZE): Define.
3155         * manager.c (pthread_allocate_stack): Handle FLOATING_STACKS with
3156         NEED_SEPARATE_REGISTER_STACK.
3158 2001-07-16  Andreas Schwab  <schwab@suse.de>
3160         * Makefile (before-compile): Don't add $(objpfx)crti.o.
3161         (omit-deps): Add crti.
3162         ($(objpfx)libpthread.so): Depend on $(objpfx)crti.o, but make sure
3163         it is filtered out of the link command.
3165 2001-07-16  Ulrich Drepper  <drepper@redhat.com>
3167         * pthread.c (pthread_initialize): For FLOATING_STACKS don't bother
3168         to find the right value for __pthread_initial_thread_bos, it's not
3169         used.  If not FLOATING_STACKS first run
3170         __pthread_init_max_stacksize.
3172 2001-06-16  H.J. Lu  <hjl@gnu.org>
3174         * internals.h: Include <stackinfo.h>.
3176         * attr.c: Don't include <stackinfo.h> here.
3177         * cancel.c: Likewise.
3178         * manager.c: Likewise.
3179         * pthread.c: Likewise.
3180         * ptlongjmp.c: Likewise.
3182 2001-03-23  Matthew Wilcox  <willy@ldl.fc.hp.com>
3184         * attr.c: Make _STACK_GROWS_UP work.
3185         * internals.h: Likewise.
3186         * manager.c: Likewise.
3187         * pthread.c: Likewise.
3189 2001-06-15  H.J. Lu  <hjl@gnu.org>
3191         * pthread.c (__pthread_reset_main_thread): Fix a typo.
3193 2001-02-02  John S. Marvin  <jsm@udlkern.fc.hp.com>
3195         * semaphore.h: Use struct _pthread_fastlock as an element of
3196         sem_t instead of an identical struct.
3197         * rwlock.c: Remove casts.
3198         * semaphore.c: Likewise.
3200 2001-04-30  Alan Modra  <amodra@one.net.au>
3202         * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: New.
3204 2001-05-25  Bruce Mitchener  <bruce@cubik.org>
3206         * linuxthreads.texi: Spelling corrections.
3208 2001-05-25  Ulrich Drepper  <drepper@redhat.com>
3210         * oldsemaphore.c (__old_sem_wait): Clear p_nextwaiting before
3211         returning successfully.
3212         Patch by Gene Cooperman <gene@ccs.neu.edu>.
3214 2001-05-24  Ulrich Drepper  <drepper@redhat.com>
3216         * spinlock.c (__pthread_lock) [HAS_COMPARE_AND_SWAP]: Before doing any
3217         serious work try once whether the lock is uncontested.
3218         Remove duplicate reading of __status before loop.
3219         Change suggested by Hans Boehm <hans_boehm@hp.com>.
3221         * spinlock.h (__pthread_trylock): Remove need for oldstatus variable.
3222         (__pthread_alt_trylock): Likewise.
3224 2001-05-01  Kaz Kylheku  <kaz@ashi.footprints.net>
3226         Memory barrier overhaul following line by line inspection.
3227         * mutex.c (pthread_once): Missing memory barriers added.
3228         * pthread.c (__pthread_wait_for_restart_signal,
3229         __pthread_timedsuspend_new, __pthread_restart_new): Added
3230         memory barriers ``just in case'' and for documentary value.
3231         * spinlock.c (__pthread_release): New inline function for releasing
3232         spinlock, to complement __pthread_acquire.  Includes memory
3233         barrier prior to assignment to spinlock, and __asm __volatile
3234         dance to prevent reordering or optimization of the spinlock access.
3235         * spinlock.c (__pthread_unlock, __pthread_alt_lock,
3236         __pthread_alt_timedlock, __pthread_alt_unlock,
3237         __pthread_compare_and_swap): Updated to use new __pthread_release
3238         instead of updating spinlock directly.
3239         * spinlock.c (__pthread_lock, __pthread_unlock, wait_node_alloc,
3240         wait_node_free, wait_node_dequeue, __pthread_alt_lock,
3241         __pthread_alt_timedlock, __pthread_alt_unlock, __pthread_acquire):
3242         Memory barrier overhaul.  Lots of missing memory barriers added,
3243         a couple needless ones removed.
3244         * spinlock.c (__pthread_compare_and_swap): testandset optimization
3245         removed, just calls __pthread_acquire, which has the new read
3246         barrier in it before its testandset.
3248 2001-05-20  Roland McGrath  <roland@frob.com>
3250         * Makeconfig: New file, variables used to be in main libc Makeconfig.
3252 2001-05-09  Geoff Keating  <geoffk@redhat.com>
3254         * sysdeps/powerpc/pt-machine.h
3255         (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): Define.
3256         (__compare_and_swap): Remove memory barriers.
3257         (__compare_and_swap_with_release_semantics): New function.
3259 2001-04-24  Andreas Jaeger  <aj@suse.de>
3261         * wrapsyscall.c: send* and recv* return ssize_t.
3263         * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Unlock the
3264         mutex instead of double locking it.
3265         Reported by Pierre Artaud <partaud@sodatec.com>.
3267 2001-04-23  Ulrich Drepper  <drepper@redhat.com>
3269         * sysdeps/pthread/getcpuclockid.c: Make function generic, test
3270         using #ifdef whether the clock is available.
3271         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: Removed.
3273         * sysdeps/ia64/Versions: New file.
3275         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init): We don't
3276         have to call __gmon_start__ in the libpthread DSO.
3277         * sysdeps/pthread/pt-initfini.c (_init): Likewise.
3279         * Makefile (libpthread-routines): Add ptclock_gettime and
3280         ptclock_settime.
3281         * internals.h: Don't use cpuclock-init.h definitions, use
3282         hp-timing.h definitions.
3283         * pthread.c: Likewise.
3284         * manager.c: Likewise.
3285         * ptclock_gettime.c: New file.
3286         * ptclock_settime.c: New file.
3287         * internals.h: Fix parameter type for __pthread_clock_gettime and
3288         __pthread_clock_settime.
3290         * sysdeps/i386/i586/ptclock_gettime.c: Removed.
3291         * sysdeps/i386/i586/ptclock_settime.c: Removed.
3292         * sysdeps/i386/i586/Makefile: Removed.
3294 2001-04-22  Ulrich Drepper  <drepper@redhat.com>
3296         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_ASYNCH_IO.
3297         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3299 2001-04-21  Andreas Jaeger  <aj@suse.de>
3301         * sysdeps/pthread/timer_routines.c (thread_func): Add noreturn
3302         attribute, remove statements that will never be executed.
3303         (thread_func): Remove mutex_unlock call since it's never executed.
3304         (thread_func): Fix comment as suggested by Jakub Jelinek.
3306         * manager.c (__pthread_manager): Add noreturn
3307         attribute.
3308         (pthread_start_thread): Likewise, remove return statement.
3309         (pthread_start_thread_event): Likewise.
3310         Add noreturn attribute for pthread_handle_exit.
3311         * weaks.c: Add noreturn attribute for pthread_exit.
3313         * internals.h: Add __pthread_clock_gettime and
3314         __pthread_clock_settime prototypes.
3316 2001-04-21  Ulrich Drepper  <drepper@redhat.com>
3318         * internals.h: Include <cpuclock-init.h>.
3319         (struct _pthread_descr_struct): Add p_cpuclock_offset field if
3320         CPUCLOCK_VARDEF is defined.
3321         * pthread.c (__pthread_initialize_minimal): Initialize
3322         p_cpuclock_offset field for main thread if CPUCLOCK_INIT is defined.
3323         * manager.c (pthread_start_thread): Set p_cpuclock_offset field
3324         for new thread to current CPU clock value.
3326         * sysdeps/i386/useldt.h: Extend all the macros to handle 8-byte values.
3328         * sysdeps/i386/i586/Makefile: New file.
3329         * sysdeps/i386/i586/Versions: New file.
3330         * sysdeps/i386/i586/ptclock_gettime.c: New file.
3331         * sysdeps/i386/i586/ptclock_settime.c: New file.
3332         * sysdeps/i386/i686/Implies: New file.
3334 2001-04-18  Jakub Jelinek  <jakub@redhat.com>
3336         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Put specs into
3337         $generated, not $postclean-generated.
3339 2001-04-18  Andreas Jaeger  <aj@suse.de>
3341         * Makefile (otherlibs): Added.
3343 2001-04-18  Jakub Jelinek  <jakub@redhat.com>
3345         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
3347 2001-04-16  Ulrich Drepper  <drepper@redhat.com>
3349         * signals.c (sigwait): NSIG is no signal number.  Block all
3350         signals while in signal handler for signals in SET.
3351         Patch by Manfred Spraul <manfred@colorfullife.com>.
3353 2001-04-12  Ulrich Drepper  <drepper@redhat.com>
3355         * tst-cancel.c: Disable most tests.  Add new test where all
3356         cleanup handlers must run.
3357         * Makefile (tests): Add tst-cancel again.
3359         * cancel.c (__pthread_perform_cleanup): Correct condition for
3360         leaving cleanup loop early.
3362         * sysdeps/i386/Makefile: Make sure gcc uses a frame pointer for
3363         all the files which use CURRENT_STACK_FRAME.
3364         * sysdeps/i386/pt-machine.h (CURRENT_STACK_FRAME): Define using
3365         __builtin_frame_address.
3366         * sysdeps/i386/i686/pt-machine.h: Likewise.
3368 2001-04-11  Ulrich Drepper  <drepper@redhat.com>
3370         * Makefile (tests): Comment out tst-cancel for now.
3372         * tst-cancel.c (main): Cleanup 4 is supposed to run.  Create
3373         temporary file in object directory.
3374         * Makefile: Don't allow inlining when compiling tst-cancel.c.
3375         Pass $(objpfx) to tst-cancel.
3377 2001-04-11  David S. Miller  <davem@redhat.com>
3379         * sysdeps/sparc/sparc32/pt-machine.h (stack_pointer): Advance
3380         up closer to user local variables so that new cleanup heuristics work.
3381         * sysdeps/sparc/sparc64/pt-machine.h (stack_pointer): Likewise.
3383 2001-04-11  Ulrich Drepper  <drepper@redhat.com>
3385         * cancel.c (_pthread_cleanup_push): Catch invalid __prev buffer
3386         and remove it.
3387         (_pthread_cleanup_push_defer): Likewise.
3389         * tst-cancel.c (main): Fix loop printing cleanup output.
3391 2001-04-10  kaz Kojima  <kkojima@rr.iij4u.or.jp>
3393         * sysdeps/sh/pspinlock.c (__pthread_spin_lock): Fix a reverse
3394         test.
3395         (__pthread_spin_trylock): Likewise.
3396         * sysdeps/sh/pt-machine.h (testandset): Likewise.
3398 2001-04-10  Ulrich Drepper  <drepper@redhat.com>
3400         * join.c (pthread_exit): Move code to new function __pthread_do_exit
3401         which takes an extra parameter with the current frame pointer.
3402         Call new function with CURRENT_STACK_FRAME.
3403         (__pthread_do_exit): New function.  Call __pthread_perform_cleanup
3404         with the new parameter.
3405         (pthread_join): Call __pthread_do_exit instead of pthread_exit.
3406         * cancel.c (__pthread_perform_cleanup): Takes extra parameter.  Use
3407         this parameter as the initial value the cleanup handler records are
3408         compared against.  No active cleanup handler record must have an
3409         address lower than the previous one and the initial record must be
3410         above (below on PA) the frame address passed in.
3411         (pthread_setcancelstate): Call __pthread_do_exit instead of
3412         pthread_exit.
3413         (pthread_setcanceltype): Likewise.
3414         (pthread_testcancel): Likewise.
3415         (_pthread_cleanup_pop_restore): Likewise.
3416         * condvar.c (pthread_cond_wait): Likewise.
3417         (pthread_cond_timedwait_relative): Likewise.
3418         * manager.c (pthread_start_thread): Likewise.
3419         * oldsemaphore.c (__old_sem_wait): Likewise.
3420         * pthread.c (pthread_handle_sigcancel): Likewise.
3421         * semaphore.c (__new_sem_wait): Likewise.
3422         (sem_timedwait): Likewise.
3423         * ptlongjmp.c (pthread_cleanup_upto): Also use current stack frame
3424         to limit the cleanup handlers which get run.
3425         * internals.h: Add prototype for __pthread_do_exit.  Adjust prototype
3426         for __pthread_perform_cleanup.
3428         * Makefile (tests): Add tst-cancel.
3429         * tst-cancel.c: New file.
3431 2001-04-08  Hans-Peter Nilsson  <hp@axis.com>
3433         * sysdeps/cris/pt-machine.h: New file.
3434         * sysdeps/cris/pspinlock.c: New file.
3436 2001-04-09  Hans-Peter Nilsson  <hp@axis.com>
3438         * shlib-versions: Add case for Linux on CRIS.
3440 2001-03-26  Ulrich Drepper  <drepper@redhat.com>
3442         * attr.c (pthread_getattr_np): Correct computation of stack size
3443         for machiens with register stack.
3445         * Examples/ex17.c (main): Correct detection of failed mmap call.
3447 2001-03-21  Jakub Jelinek  <jakub@redhat.com>
3449         * pthread.c (__pthread_initialize_manager): Fix a typo.
3451 2001-03-21  Jakub Jelinek  <jakub@redhat.com>
3453         * attr.c (__pthread_attr_setstack): Fix alignment check.
3454         (pthread_getattr_np): __stackaddr is top of stack, not bottom.
3455         * Makefile (tests): Add ex17 test.
3456         * Examples/ex17.c: New test.
3458 2001-03-20  Ulrich Drepper  <drepper@redhat.com>
3460         * Makefile: Define -D_RPC_THREAD_SAFE_ for cancel.c.
3461         * cancel.c (__pthread_perform_cleanup): Call __rpc_thread_destroy.
3462         * sysdeps/pthread/bits/libc-tsd.h: Define _LIBC_TSD_KEY_VARS.
3464 2001-03-18  Ulrich Drepper  <drepper@redhat.com>
3466         * Makefile: When generating DSO link with libc_nonshared.a.
3468 2001-02-26  Jakub Jelinek  <jakub@redhat.com>
3470         * signals.c (pthread_sighandler): Use CALL_SIGHANDLER.
3472 2001-02-23  Jakub Jelinek  <jakub@redhat.com>
3474         * internals.h (__pthread_init_max_stacksize): New prototype.
3475         * attr.c (__pthread_attr_setstacksize): Call
3476         __pthread_init_max_stacksize if not yet initialized.
3477         * pthread.c (__pthread_init_max_stacksize): New function.
3478         (__pthread_initialize_manager): Call it.
3479         Patch by <dtc@cmucl.cons.org>.
3481 2001-03-16  Ulrich Drepper  <drepper@redhat.com>
3483         * attr.c (pthread_getattr_np): Fix __stacksize computation for IA-64.
3485 2001-03-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3487         * shlib-versions: Add rule for Linux on 64 bit S/390.
3488         * sysdeps/s390/s390-64/pt-machine.h: New file.
3489         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
3491 2001-03-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3493         * sysdeps/s390/pt-machine.h: Move to...
3494         * sysdeps/s390/s390-32/pt-machine.h: ...here.
3495         Add defines for FLOATING_STACK and ARCH_STACK_MAX_SIZE.
3497 2001-03-15  Ulrich Drepper  <drepper@redhat.com>
3499         * Versions [libpthread] (GLIBC_2.2.3): Add pthread_getattr_np.
3500         * attr.c: Implement pthread_getattr_np.
3501         * sysdeps/pthread/pthread.h: Add prototype for pthread_getattr_np.
3502         * internals.h (struct _pthread_descr_struct): Add p_inheritsched.
3503         * manager.c (pthread_handle_create): Initialize p_inheritsched.
3505 2001-03-09  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3507         * sysdeps/unix/sysv/linux/s390/pt-initfini.c: Use 0x07 padding for
3508         code alignment.
3510 2001-02-20  Hans Boehm  <hans_boehm@hp.com>
3512         * manager.c (manager_mask): Removed static vesion.  Now always local
3513         to __pthread_manager().
3514         (manager_mask_all): Removed completely.
3515         (__pthread_manager): Remove manager_mask_all initialization.
3516         (pthread_handle_create): Remove code to set and reset signal mask
3517         around __clone2() calls.
3519 2001-02-17  Jakub Jelinek  <jakub@redhat.com>
3521         * spinlock.c (__pthread_lock): Force lock->__status to be read from
3522         memory on every spin.
3524 2001-02-10  Andreas Jaeger  <aj@suse.de>
3526         * Makefile (extra-objs): New.
3528 2001-02-09  Jakub Jelinek  <jakub@redhat.com>
3530         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add
3531         __pthread_initialize_minimal prototype.
3533 2001-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
3535         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
3537 2001-02-06  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3539         * sysdeps/unix/sysv/linux/s390/pt-initfini.c: New file.
3541 2001-02-06  Ulrich Drepper  <drepper@redhat.com>
3543         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the
3544         broken code.  Patch by Jes Sorensen.
3546 2001-02-06  Andreas Jaeger  <aj@suse.de>
3548         * sysdeps/pthread/pthread.h: Move __pthread_initialize from here
3549         to...
3550         * internals.h: ...here.
3552 2001-02-05  Jes Sorensen  <jes@linuxcare.com>
3554         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
3556 2001-02-02  Ulrich Drepper  <drepper@redhat.com>
3558         * Versions: Remove __pthread_initialize_minimal.
3560 2001-02-01  Ulrich Drepper  <drepper@redhat.com>
3562         * Makefile: Add rules to build crti.o and make it being used in
3563         building libpthread.so.
3564         * sysdeps/i386/Makefile: New file.
3565         * sysdeps/pthread/pt-initfini.c: New file.
3567         * pthread.c: Cleanups.
3569 2001-01-28  Andreas Jaeger  <aj@suse.de>
3571         * oldsemaphore.c (__old_sem_init): Adjust for last change.
3572         * sysdeps/pthread/bits/libc-lock.h: Likewise.
3573         * spinlock.c: Likewise.
3575 2001-01-28  Ulrich Drepper  <drepper@redhat.com>
3577         * sysdeps/pthread/bits/initspin.h: Make all names namespace clean.
3578         * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
3579         * manager.c: Adjust for namespace cleanup in bits/initspin.h.
3580         * pthread.c: Likewise.
3581         * spinlock.h: Likewise.
3582         * sysdeps/pthread/pthread.h: Likewise.
3584 2001-01-26  Ulrich Drepper  <drepper@redhat.com>
3586         * sysdeps/pthread/bits/pthreadtypes.h: Define pthread_attr_t also
3587         as struct __pthread_attr_s.
3589         * semaphore.h (sem_t): Cleanup namespace, rename status and
3590         spinlock elements.
3592 2001-01-13  Jakub Jelinek  <jakub@redhat.com>
3594         * pthread.c (pthread_onexit_process): Clear
3595         __pthread_manager_thread_bos after freeing it.
3596         * Makefile (tests): Add ex16.
3597         * Examples/ex16.c: New file.
3599 2001-01-11  Jakub Jelinek  <jakub@redhat.com>
3601         * Makefile (CFLAGS-pthread.c): Pass -DHAVE_Z_NODELETE if ld supports
3602         -z nodelete.
3603         * pthread.c (pthread_exit_process): Rename to...
3604         (pthread_onexit_process): ...this.
3605         (pthread_atexit_process, pthread_atexit_retcode): New.
3606         (pthread_initialize): Call __cxa_atexit instead of __cxa_on_exit
3607         and only if HAVE_Z_NODELETE is not defined.
3608         (__pthread_initialize_manager): Register pthread_atexit_retcode
3609         with __cxa_atexit.
3611 2001-01-11  Ulrich Drepper  <drepper@redhat.com>
3613         * pthread.c (pthread_initialize): Use __cxs_on_exit not __cxa_atexit.
3615 2001-01-11  Jakub Jelinek  <jakub@redhat.com>
3617         * Makefile (tests): Add ex15.
3618         * Examples/ex15.c: New test.
3620 2001-01-08  Ulrich Drepper  <drepper@redhat.com>
3622         * pthread.c (pthread_exit_process): Free memory allocated for
3623         manager stack.
3625 2000-12-31  Ulrich Drepper  <drepper@redhat.com>
3627         * manager.c (pthread_alloca_stack): Remove MAP_FIXED from mmap calls.
3628         (pthread_free): Always unmap the stack.  It's safe now that we don't
3629         use MAP_FIXED to allocate stacks.
3631 2000-12-31  Ulrich Drepper  <drepper@redhat.com>
3633         * sysdeps/powerpc/pspinlock.c: Don't include pt-machine.h here.
3635         * manager.c (pthread_allocate_stack): Prepare for removal of MAP_FIXED.
3637 2000-11-15  Wolfram Gloger  <wg@malloc.de>
3639         * manager.c (pthread_free): [!FLOATING_STACKS]: Only remap the
3640         stack to PROT_NONE, don't unmap it, avoiding collisions with malloc.
3642 2000-12-27  Andreas Jaeger  <aj@suse.de>
3644         * Examples/ex13.c: Make local functions static.
3645         * ecmutex.c: Likewise.
3646         * joinrace.c: Likewise.
3647         * Examples/ex14.c: Likewise.
3649         * Examples/ex2.c: Make local functions static; reformat.
3650         * Examples/ex1.c: Likewise.
3651         * Examples/ex4.c: Likewise.
3652         * Examples/ex5.c: Likewise.
3653         * Examples/ex7.c: Likewise.
3655         * oldsemaphore.c: Add prototypes to shut up GCC.
3656         * pt-machine.c: Likewise.
3658         * weaks.c: Add prototype for pthread_exit.
3660         * internals.h: Add some prototypes, format prototypes and add
3661         missing externs.
3662         Move __libc_waitpid prototype to include/sys/wait.h.
3664         * rwlock.c: Include <bits/libc-lock.h> for prototypes.
3665         * mutex.c: Likewise.
3666         * specific.c: Likewise.
3667         * ptfork.c: Likewise.
3669         * lockfile.c: Include internals.h to get prototypes.
3670         * events.c: Likewise.
3671         * sysdeps/alpha/pspinlock.c: Likewise.
3672         * sysdeps/arm/pspinlock.c: Likewise.
3673         * sysdeps/hppa/pspinlock.c: Likewise.
3674         * sysdeps/i386/pspinlock.c: Likewise.
3675         * sysdeps/ia64/pspinlock.c: Likewise.
3676         * sysdeps/m68k/pspinlock.c: Likewise.
3677         * sysdeps/mips/pspinlock.c: Likewise.
3678         * sysdeps/powerpc/pspinlock.c: Likewise.
3679         * sysdeps/s390/pspinlock.c: Likewise.
3680         * sysdeps/sh/pspinlock.c: Likewise.
3681         * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
3682         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
3683         * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
3685 2000-12-27  Ulrich Drepper  <drepper@redhat.com>
3687         * attr.c (__pthread_attr_setstack): Fix setting of __stackaddr element.
3688         (__pthread_attr_getstack): Return correct address.
3689         Add warnings for using pthread_attr_getstackaddr and
3690         pthread_attr_setstackaddr.
3692 2000-12-26  Ulrich Drepper  <drepper@redhat.com>
3694         * Examples/ex6.c (test_thread): Make static.
3695         * Examples/ex12.c (test_thread): Make static and add noreturn
3696         attribute.
3698 2000-12-18  Jes Sorensen  <jes@linuxcare.com>
3700         * linuxthreads/sysdeps/ia64/pt-machine.h: __compare_and_swap
3701         and compare_and_swap_with_release_semantics returns int not long.
3703 2000-12-17  Andreas Jaeger  <aj@suse.de>
3705         * sysdeps/s390/pt-machine.h (testandset): Use long int as return
3706         value.
3707         * sysdeps/arm/pt-machine.h (testandset): Likewise.
3708         * sysdeps/hppa/pt-machine.h (testandset): Likewise.
3709         * sysdeps/m68k/pt-machine.h (testandset): Likewise.
3710         * sysdeps/sh/pt-machine.h (testandset): Likewise.
3711         * sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise.
3712         * sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise.
3714 2000-12-17  Ulrich Drepper  <drepper@redhat.com>
3716         * sysdeps/i386/pt-machine.h (testandset): Adjust for prototype change.
3717         * sysdeps/i386/i686/pt-machine.h (testandset): Likewise.
3719 2000-12-17  Andreas Jaeger  <aj@suse.de>
3721         * internals.h: Add prototypes for testandset and
3722         __compare_and_swap to shut up gcc warnings.
3724 2000-12-06  Wolfram Gloger  <wg@malloc.de>
3726         * join.c (pthread_detach): Allow case where the thread has already
3727         terminated.
3729 2000-12-05  Andreas Jaeger  <aj@suse.de>
3731         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't set mips2.
3732         * sysdeps/mips/pt-machine.h (testandset): Likewise.
3733         (__compare_and_swap): Likewise.
3734         Patches by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
3736 2000-11-20  Jakub Jelinek  <jakub@redhat.com>
3738         * Examples/ex3.c (main): Cast int to long before casting to void *.
3739         (search): Cast void * to long, not int.
3740         * Examples/ex8.c (main, thread): Similarly.
3741         * Examples/ex11.c (main): Similarly.
3742         * Examples/ex14.c (worker, do_test): Similarly.
3743         * ecmutex.c (worker, do_test): Similarly.
3744         (nlocks): Cast to int.
3746 2000-11-08  Bruce Mitchener  <bruce@cubik.org>
3748         * linuxthreads.texi:  Add documentation for pthreads attributes
3749         guardsize, stackaddr, stacksize, and stack.  Fix typo in previous
3750         patch.  Document pthread_[sg]etconcurrency().  Mark
3751         pthread_mutexattr_[sg]ettype() as POSIX rather than GNU.
3753 2000-11-07  Ulrich Drepper  <drepper@redhat.com>
3755         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
3756         Don't define it.
3757         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3758         Reported by Christopher Yeoh <cyeoh@linuxcare.com.au>.
3760 2000-11-06  Ulrich Drepper  <drepper@redhat.com>
3762         * cancel.c (pthread_cancel): Always set p_canceled, even if we are
3763         not doing it right now.
3764         Reported by Kaz Kylheku <kaz@ashi.footprints.net>.
3766 2000-10-30  Ulrich Drepper  <drepper@redhat.com>
3768         * Examples/ex4.c (main): Don't use exit() to avoid warning with
3769         broken compilers.
3771 2000-10-29  Ulrich Drepper  <drepper@redhat.com>
3773         * attr.c (__pthread_attr_setguardsize): Don't round guardsize
3774         here.  Reported by Bruce Mitchener <bruce@cubik.org>.
3776         * linuxthreads.texi: Changes terminology to 'type' from 'kind' when
3777         discussing mutexes. (As per the Unix98 name for the API.)
3778         Changes documentation for pthread_mutexattr_setkind_np() and
3779         pthread_mutexattr_getkind_np() over to the Unix98 APIs for the
3780         same: pthread_mutexattr_settype() and pthread_mutexattr_gettype().
3781         Changes references to PTHREAD_MUTEXATTR_FAST_NP to
3782         PTHREAD_MUTEXATTR_ADAPTIVE_NP.
3783         Begins to introduce discussion of the ``timed'' mutex type.  This
3784         discussion is currently incomplete.
3785         Patch by Bruce Mitchener <bruce@cubik.org>.
3787 2000-10-26  Kazumoto Kojima  <kkojima@rr.iij4u.or.jp>
3788             Yutaka Niibe  <gniibe@chroot.org>
3790         * sysdeps/sh/pt-machine.h (testandset): Since the operand of TAS.B
3791         has restrictions, use register.
3793 2000-10-23  Andreas Schwab  <schwab@suse.de>
3795         * Examples/ex14.c (TIMEOUT): Override default timeout.
3797 2000-10-16  Ulrich Drepper  <drepper@redhat.com>
3799         * specific.c: Protect tsd array modification in thread data
3800         structures by getting the thread lock in pthread_key_delete and
3801         __pthread_destroy_specifics.
3802         Patch by Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>.
3804 2000-10-12  Alan Modra <alan@linuxcare.com.au>
3806         * sysdeps/pthread/bits/initspin.h: New file.
3807         * spinlock.h: Move LOCK_INITIALIZER definition to <bits/initspin.h>.
3808         (__pthread_init_lock): Initialize lock with LT_SPINLOCK_INIT.
3809         (__pthread_alt_init_lock): Likewise.
3810         (__pthread_alt_trylock): Release lock with LT_SPINLOCK_INIT.
3812 2000-10-12  David Huggins-Daines  <dhd@linuxcare.com>
3814         * oldsemaphore.c (__old_sem_init): Release lock with
3815         LT_SPINLOCK_INIT, not zero.
3816         * spinlock.c (__pthread_unlock): Likewise.
3817         (__pthread_alt_lock): Likewise.
3818         (__pthread_alt_timedlock): Likewise.
3819         (__pthread_alt_unlock): Likewise.
3820         * sysdeps/pthread/bits/libc-lock.h: Initialize locks with
3821         LT_SPINLOCK_INIT if it is non-zero.  Likewise for init-once flags.
3822         * sysdeps/pthread/pthread.h: Include bits/initspin.h.  Use
3823         LT_SPINLOCK_INIT do initialize spinlocks not 0.
3825 2000-10-12  David Huggins-Daines <dhd@linuxcare.com>
3827         * shlib-versions: Add version definitions for hppa-linux.
3829 2000-10-12  Alan Modra <alan@linuxcare.com.au>
3831         * sysdeps/hppa/pspinlock.c: New file.
3832         * sysdeps/hppa/pt-machine.h: New file.
3833         * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: New file.
3835 2000-10-05  Jakub Jelinek  <jakub@redhat.com>
3837         * mutex.c (__pthread_mutex_destroy): Correct test of
3838         busy mutex for mutexes using alternate fastlocks.
3839         Patch by dtc@cmucl.cons.org.
3841 2000-09-28  Martin Schwidefsksy    <schwidefsky@de.ibm.com>
3843         * sysdeps/s390/pt-machine.h: Make %a0 the thread register.
3845 2000-09-28  Ulrich Drepper  <drepper@redhat.com>
3847         * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP
3848         test for owner first.
3849         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
3851         * cancel.c (pthread_cancel): Don't do anything if cancelation is
3852         disabled.
3854 2000-09-26  Ulrich Drepper  <drepper@redhat.com>
3856         * spinlock.h (__pthread_set_own_extricate_if): Optimize a bit.
3857         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
3859         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
3860         _POSIX_MONOTONIC_CLOCK.
3862         * spinlock.h (__pthread_set_own_extricate_if): Add back locking
3863         and explain why.
3865 2000-09-20  Andreas Jaeger  <aj@suse.de>
3867         * pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
3868         "testrtsig.h" conditional.
3870 2000-09-11  Ulrich Drepper  <drepper@redhat.com>
3872         * sysdeps/pthread/pthread.h: Declare pthread_attr_getstack and
3873         pthread_attr_setstack.
3874         * Versions [libpthread] (GLIBC_2.2): Export pthread_attr_getstack and
3875         pthread_attr_setstack.
3876         * attr.c (pthread_attr_getstack, pthread_attr_setstack): New functions.
3878 2000-09-05  Ulrich Drepper  <drepper@redhat.com>
3880         * Examples/ex14.c: New file.
3881         * Makefile (tests): Add ex14.
3883         * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
3884         mutex.  Patch by dtc@cmucl.cons.org.
3886         * ecmutex.c: New file.
3887         * Makefile (tests): Add ecmutex.
3889 2000-09-04  H.J. Lu  <hjl@gnu.org>
3891         * attr.c (__pthread_attr_setguardsize): Use page_roundup
3892         instead of roundup to round up to the page size.
3894 2000-09-03  Mark Kettenis  <kettenis@gnu.org>
3896         * manager.c (pthread_exited): Correctly report event as TD_REAP
3897         instead of TD_DEATH.  Fix comments.
3899 2000-09-03  Ulrich Drepper  <drepper@redhat.com>
3901         * spinlock.h (testandset): Add cast to avoid warning.
3902         Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
3904 2000-09-02  Andreas Jaeger  <aj@suse.de>
3906         * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
3907         prototype.
3909 2000-09-01  Ulrich Drepper  <drepper@redhat.com>
3911         * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
3912         Fix typo in last patch (_mode -> _flags).
3914         * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
3915         Provide definition which respects _IO_USER_LOCK flag.
3917 2000-08-30  Ulrich Drepper  <drepper@redhat.com>
3919         * manager.c (pthread_allocate_stack): Clear descriptor only if not
3920         mmaped.
3922 2000-08-25  Ulrich Drepper  <drepper@redhat.com>
3924         * Makefile: Add rules to build and run unload.
3925         * unload.c: New file.
3927         * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
3929         * sysdeps/pthread/pthread.h
3930         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
3931         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
3933 2000-08-24  Andreas Jaeger  <aj@suse.de>
3935         * Examples/ex13.c: Include <string.h> for strerror prototype and
3936         <stdlib.h> for abort prototype.
3937         (pthr_cond_signal_mutex): Rewrite to silence GCC.
3938         (thread_start): Remove unused variable err.
3939         (main): Silence GCC warnings.
3941 2000-08-22  Andreas Jaeger  <aj@suse.de>
3943         * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
3945         * Makefile (tests): Add ex13.
3947 2000-08-20  Ulrich Drepper  <drepper@redhat.com>
3949         * semaphore.h: Add restrict where required by AGd4.
3950         * sysdeps/pthread/pthread.h: Likewise.
3951         * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
3953 2000-08-15  Ulrich Drepper  <drepper@redhat.com>
3955         * Makefile (tests): Add ex12.  Add rule to build it.
3956         * Examples/ex12.c: New file.
3958 2000-08-13  Ulrich Drepper  <drepper@redhat.com>
3960         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
3961         even though the implementation is not quite complete (but it reports
3962         it).  Define _POSIX_MESSAGE_PASSING to -1.
3963         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3965 2000-08-12  Andreas Jaeger  <aj@suse.de>
3967         * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
3968         assembler.
3969         (__compare_and_swap): Likewise.
3970         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
3972 2000-08-10  Ulrich Drepper  <drepper@redhat.com>
3974         * pthread.c (__pthread_initial_thread): Initialize p_errnop and
3975         p_h_errnop correctly and not to NULL.
3977 2000-08-05  Ulrich Drepper  <drepper@redhat.com>
3979         * Banner: Bump version number to 0.9.
3981 2000-08-04  Ulrich Drepper  <drepper@redhat.com>
3983         * Makefile (tests): Add tststack.  Add rule to build the program.
3984         * tststack.c: New file.
3986         * internals.h: Declare __pthread_max_stacksize.
3987         * pthread.c (__pthread_max_stacksize): New variable.
3988         (__pthread_initialize_manager): Determine __pthread_initialize_manager
3989         value.
3990         * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
3991         (pthread_allocate_stack): Allow kernel to choose stack address if
3992         FLOATING_STACKS.  This also handles variable-sized stacks.
3993         Always allocate stack and guardpage together.  Use mprotect to
3994         change guardpage access.
3995         * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
3996         ARCH_STACK_MAX_SIZE.
3998         * attr.c (__pthread_attr_setstacksize): Also test value against
3999         upper limit.
4001         * manager.c (__pthread_nonstandard_stacks): Define only if
4002         THREAD_SELF is not defined.
4003         (pthread_allocate_stack): Always initialize gardaddr to a correct
4004         value.
4005         (pthread_handle_create): Unmap thread with one call.
4006         (pthread_free): Remove test for initial thread before removing stack.
4007         Unmap stack with one call.
4009         * pthread.c (__pthread_initial_thread): Initialize p_userstack to
4010         1 to avoid removing the stack.
4012 2000-07-27  Jes Sorensen  <jes@linuxcare.com>
4014         * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
4015         load of spin lock to prime the cache before the atomic compare and
4016         exchange operation (cmpxchg4). This avoids the spinning on the
4017         cmpxchg4 instruction and reduces movement of the cache line back
4018         and forth between the processors (explanation by Asis K. Mallick
4019         from Intel). This basically makes the implementation operate the
4020         same as the Linux kernel implementation.
4022         * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
4023         * sysdeps/ia64/pspinlock.c: New file.
4025 2000-08-03  Ulrich Drepper  <drepper@redhat.com>
4027         * pthread.c: Move definition of __pthread_set_own_extricate_if...
4028         * spinlock.h: ...here.  Remove locking.
4029         * internals.h: Remove __pthread_set_own_extricate_if prototype.
4031         * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
4032         (rwlock_rd_extricate_func): Don't determine self, let
4033         __pthread_lock do it.
4034         (rwlock_wr_extricate_func): Likewise.
4035         (rwlock_have_already): Optimize *pself handling a bit.
4037         * mutex.c: Use __builtin_expect.
4038         * pthread.c: Likewise.
4040 2000-08-02  Andreas Jaeger  <aj@suse.de>
4042         * sysdeps/s390/pspinlock.c: New file.
4043         * sysdeps/s390/pt-machine.h: New file.
4044         Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
4046 2000-07-12  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
4048         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
4049         R3K.
4050         * sysdeps/mips/pt-machine.h (testandset): Likewise.
4052 2000-07-26  Andreas Jaeger  <aj@suse.de>
4054         * pthread.c: Initialize p_sem_avail.
4056 2000-07-25  Ulrich Drepper  <drepper@redhat.com>
4058         * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
4059         * semaphore.c: Handle spurious wakeups.
4061         * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
4062         for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
4064         * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
4065         (__pthread_wait_for_restart): Likewise.
4067         * condvar.c (pthread_cond_wait): Also check whether thread is
4068         cancelable before aborting loop.
4069         (pthread_cond_timedwait): Likewise.
4071         * signals.c (pthread_sighandler): Remove special code to restrore
4072         %gs on x86.
4073         (pthread_sighandler_t): Likewise.
4075 2000-07-25  Mark Kettenis  <kettenis@gnu.org>
4077         * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
4078         * pthread.c: Include <resolv.h>.
4079         (_res): Undefine.  Add extern declaration.
4081 2000-07-24  Ulrich Drepper  <drepper@redhat.com>
4083         * pthread.c (__pthread_initial_thread): Update initializer.
4084         (__pthread_manager_thread): Likewise.
4085         (pthread_initialize): Move setrlimit call to...
4086         (__pthread_initialize_manager): ...here.
4087         (__pthread_reset_main_thread): Reset also soft limit on stack size.
4089         * condvar.c: Handle spurious wakeups.  [PR libc/1749].
4090         * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
4092 2000-07-21  Ulrich Drepper  <drepper@redhat.com>
4094         * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
4095         __compare_and_swap to define testandset.
4096         * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
4097         Define IMPLEMENT_TAS_WITH_CAS.
4099 2000-07-20  Ulrich Drepper  <drepper@redhat.com>
4101         * Makefile: Pass -z nodelete to linker for libpthread.so
4102         generation if it understand this option.
4104 2000-07-18  Mark Kettenis  <kettenis@gnu.org>
4106         * manager.c (pthread_handle_create): Remove initialization of
4107         new_thread->p_res._sock.
4109 2000-07-19  Kaz Kylheku  <kaz@ashi.footprints.net>
4111         Bugfixes to the variant of the code for machines with no compare
4112         and swap.
4114         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
4115         node was not being properly enqueued, due to failing to update
4116         the lock->__status field.
4118         * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
4119         being set inappropriately, causing the suspend function to be called
4120         with a null self pointer and crash.
4122 2000-07-18  Ulrich Drepper  <drepper@redhat.com>
4124         * spinlock.h (__pthread_alt_trylock): Fix code used if no
4125         compare&swap is available.
4127         * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
4128         compare_and_swap.
4130         * pthread.c (pthread_initialize): Don't use sysconf to determine
4131         whether the machine has more than one processor.
4133         * spinlock.c (__pthread_alt_timedlock): Add back one of the
4134         removed thread_self calls.
4136 2000-07-18  Kaz Kylheku  <kaz@ashi.footprints.net>
4138         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
4139         __compare_and_swap to compare_and_swap in code which assumes
4140         compare swap is available.
4142 2000-07-18  Kaz Kylheku  <kaz@ashi.footprints.net>
4144         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
4145         bug whereby thr field of waitnode structure would not be correctly
4146         set unless a null self pointer is passed to the functions.
4147         Eliminated redundant calls to thread_self().
4149 2000-07-18  Jakub Jelinek  <jakub@redhat.com>
4151         * pthread.c (__pthread_initialize_manager): Lock
4152         __pthread_manager_thread.p_lock before calling clone.
4154 2000-05-05  H.J. Lu  <hjl@gnu.org>
4156         * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
4157         have acquire semantics.
4158         (__compare_and_swap_with_release_semantics): New inline
4159         function.
4160         (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
4162 2000-01-28  Hans Boehm  <hboehm@exch.hpl.hp.com>
4164         * manager.c: Fix the problem with signals at startup.
4165         Change the way that thread stacks are allocated on IA64.
4166         Clean up some of the guard page allocation stuff.
4168 1999-12-19  H.J. Lu  <hjl@gnu.org>
4170         * internals.h (page_roundup): New.
4171         * attr.c (__pthread_attr_setguardsize); Use page_roundup
4172         instead of roundup.
4173         * manager.c (pthread_allocate_stack): Make sure guardaddr is
4174         page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
4175         is define.
4177 1999-12-17  Hans Boehm  <hboehm@exch.hpl.hp.com>
4179         * manager.c (pthread_allocate_stack): Unmap the stack top
4180         if failed to map the stack bottom.
4181         Fix the guard page.
4182         (pthread_free): Fix the guard page.
4184         * pthread.c (pthread_initialize): Set rlimit correctly for
4185         NEED_SEPARATE_REGISTER_STACK.
4187 1999-12-16  H.J. Lu  <hjl@gnu.org>
4189         * pthread.c (__pthread_initialize_manager): Pass
4190         __pthread_manager_thread_bos instead of
4191         __pthread_manager_thread_tos to __clone2.
4193 1999-12-16  H.J. Lu  <hjl@gnu.org>
4195         * manager.c (pthread_allocate_stack): Correct the calculation
4196         of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
4197         stack bottom.
4199 1999-12-13  H.J. Lu  <hjl@gnu.org>
4201         * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
4202         bit after setting ar.ccv.
4204 1999-12-12  H.J. Lu  <hjl@gnu.org>
4206         * manager.c (pthread_allocate_stack): Make the starting
4207         address of the stack bottom page aligned. FIXME: it may
4208         need changes in other places.
4209         (pthread_handle_create): Likewise.
4211 1999-12-11  Hans Boehm  <hboehm@exch.hpl.hp.com>
4213         * manager.c (pthread_allocate_stack): Handle
4214         NEED_SEPARATE_REGISTER_STACK.
4215         (pthread_handle_create): Likewise.
4216         * pthread.c (__pthread_initialize_manager): Likewise.
4218         * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
4220 1999-12-02  H.J. Lu  <hjl@gnu.org>
4222         * sysdeps/ia64/pt-machine.h: New.
4224 2000-07-13  Ulrich Drepper  <drepper@redhat.com>
4226         * wrapsyscall.c: Mark non-__ protected names as weak.
4227         PR libc/1466.
4229 2000-07-12  Bruno Haible  <haible@clisp.cons.org>
4231         * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
4233 2000-07-12  Ulrich Drepper  <drepper@redhat.com>
4235         * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
4236         Add tests also to new alternative spinlock implementation.
4237         * spinlock.h: Likewise.
4238         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4240 2000-07-06  Ulrich Drepper  <drepper@redhat.com>
4242         * Version: Export __sigaction.
4243         * signals.c: Define __sigaction alias.  Use __libc_sigaction instead
4244         of __sigaction.
4245         * pthread.c: Use __libc_sigaction instead of __sigaction.
4247         * condvar.c: Implement pthread_condattr_getpshared and
4248         pthread_condattr_setpshared.
4249         * mutex.c: Implement pthread_mutexattr_getpshared and
4250          pthread_mutexattr_setpshared.
4251         * Versions: Export new functions.
4252         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
4254         * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
4255         (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
4256         is not selected.
4258 2000-07-04  Greg McGary  <greg@mcgary.org>
4260         * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
4261         pragmas.  Include bp-sym.h only if _LIBC.
4263 2000-07-04  Ulrich Drepper  <drepper@redhat.com>
4265         * spinlock.c (__pthread_unlock): Properly place write barrier.
4266         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4268 2000-07-03  Ulrich Drepper  <drepper@redhat.com>
4270         * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
4271         faster on SMP systems.  No more emulation of compare&swap for adaptive
4272         spinlocks.
4273         * spinlock.h: Likewise.
4274         * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
4275         Replace fast with adaptive mutex.
4276         * mutex.c: Rewrite for replacement of fast by adaptive mutex.
4277         * condvar.c: Likewise.
4278         * pthread.c: Define and initialize __pthread_smp_kernel variable.
4279         * internals.h: Declare __pthread_smp_kernel.
4280         * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
4281         _pthread_fastlock structure.
4282         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4284         * pthread.c: Remove initialization to zero from global variables.
4286 2000-06-29  Jakub Jelinek  <jakub@redhat.com>
4288         * shlib-versions: Make sparc64 GLIBC_2.2+ only.
4290 2000-06-28  Greg McGary  <greg@mcgary.org>
4292         * weaks.c: Wrap BP_SYM () around weak extern declarations of
4293         pthread functions that have pointers in their return+arg signatures.
4295 2000-06-27  Greg McGary  <greg@mcgary.org>
4297         * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
4298         extern declarations of pthread functions that have pointers in
4299         their return+arg signatures.
4301 2000-06-26  Ulrich Drepper  <drepper@redhat.com>
4303         * Makefile (tests): Add ex11.  Add rules to build it.
4304         * Examples/ex11.c: New file.
4305         * rwlock.c: Fix complete braindamaged previous try to implement
4306         timedout functions.
4308         * spinlock.c: Pretty print.
4310 2000-06-25  Ulrich Drepper  <drepper@redhat.com>
4312         * Makefile (tests): Add ex10.  Add rules to build it.
4313         * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
4314         pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
4315         * condvar.c (pthread_cond_wait): Allow mutex of kind
4316         PTHREAD_MUTEX_TIMED_NP.
4317         (pthread_cond_timedwait_relative): Likewise.
4318         * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
4319         (__pthread_mutex_trylock): Use __pthread_alt_trylock for
4320         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
4321         (__pthread_mutex_lock): Use __pthread_alt_lock for
4322         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
4323         (__pthread_mutex_timedlock): New function.
4324         (__pthread_mutex_unlock): Use __pthread_alt_unlock for
4325         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
4326         (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
4327         (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
4328         * spinlock.c: Implement alternate fastlocks.
4329         * spinlock.h: Add prototypes.
4330         * Examples/ex10.c: New file.
4331         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
4332         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4334         * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
4335         (__pthread_rwlock_timedrdlock): New function.
4336         (__pthread_rwlock_timedwrlock): New function.
4337         Use laternate fastlock function everywhere.
4339 2000-06-21  Andreas Jaeger  <aj@suse.de>
4341         * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
4342         prototype.
4344         * join.c: Include <stdlib.h> for exit prototype.
4346 2000-06-20  Ulrich Drepper  <drepper@redhat.com>
4348         * sysdeps/i386/useldt.h: Include <stdlib.h>.
4350         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
4351         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4353         * Makefile (libpthread-routines): Add barrier.
4354         (tests): Add ex9.  Add rule to build ex9.
4355         * Versions: Export barrier functions.
4356         * barrier.c: New file.
4357         * Examples/ex9.c: New file.
4358         * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
4359         * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
4360         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4362 2000-06-19  H.J. Lu  <hjl@gnu.org>
4364         * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
4365         HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
4366         (compare_and_swap_with_release_semantics): New. Default to
4367         compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
4368         is not defined.
4370         * spinlock.c (__pthread_unlock): Call
4371         compare_and_swap_with_release_semantics () instead of
4372         compare_and_swap ().
4374 2000-06-19  Ulrich Drepper  <drepper@redhat.com>
4376         * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
4377         to errno directly.
4378         * sysdeps/pthread/timer_delete.c: Likewise.
4379         * sysdeps/pthread/timer_getoverr.c: Likewise.
4380         * sysdeps/pthread/timer_gettime.c: Likewise.
4381         * sysdeps/pthread/timer_settime.c: Likewise.
4383 2000-06-13  Kaz Kylheku  <kaz@ashi.footprints.net>
4385         Timer nodes are now reference counted, and can be marked
4386         as deleted. This allows for the safe release of the global mutex
4387         in the middle without losing the timer being operated on.
4389         * sysdeps/pthread/posix-timer.h (struct timer_node):  The inuse
4390         member is now an enum with three values, so that an intermediate
4391         state can be represented (deleted but not free for reuse yet).
4392         New refcount member added.
4393         * sysdeps/pthread/timer_routines.c: Likewise.
4395         * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
4396         timer_valid): New inline functions added.
4398         * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
4399         restructured, recursive deadlock bug fixed.
4401         * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
4402         timer_addref to ensure that timer won't be deleted while mutex is not
4403         held. Also uses timer_invalid to perform validation of timer handle.
4404         * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
4405         * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
4407 2000-06-14  Ulrich Drepper  <drepper@redhat.com>
4409         * shlib-versions: Add entry for SH.
4410         Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
4412 2000-06-13  Kaz Kylheku  <kaz@ashi.footprints.net>
4414         A few optimizations.  Got rid of unnecessary wakeups of timer threads,
4415         tightened up some critical regions and micro-optimized some list
4416         manipulation code.
4418         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
4419         Returns int value now to indicate whether timer was queued at head.
4420         * sysdeps/pthread/posix-timer.h: Likewise.
4421         * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
4422         new return value from __timer_thread_queue_timer to avoid waking
4423         up timer thread unnecessarily.
4425         * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
4426         inuse flag, because this requires mutex to be held.  Callers updated
4427         to do the check when they have the mutex.
4428         * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
4430         * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
4431         regions: avoids making system calls while holding timer mutex, and
4432         a few computations were moved outside of the mutex as well.
4433         * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
4435         * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
4436         to list_unlink_ip, meaning idempotent.  Pointer manipulation
4437         changed to get better better code out of gcc.
4438         * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
4439         version of list_unlink added here.
4440         * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
4441         function in all places: idempotent one for timers, non-idempotent
4442         one for thread nodes.
4443         * sysdeps/pthread/timer_settime: Likewise.
4444         * sysdeps/pthread/timer_routines.c: Likewise.
4446 2000-06-13  Ulrich Drepper  <drepper@redhat.com>
4448         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
4449         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4451         * sysdeps/pthread/Makefile: Remove tests definition.
4453 2000-06-12  Kazumoto Kojima  <kkojima@rr.iij4u.or.jp>
4454             Yutaka Niibe  <gniibe@chroot.org>
4456         * sysdeps/sh/pspinlock.c: New file.
4457         * sysdeps/sh/pt-machine.h: New file.
4459 2000-06-12  Ulrich Drepper  <drepper@redhat.com>
4461         * Makefile (tests): Add joinrace.
4463         * Examples/ex6.c: Test return value of pthread_join.
4465 2000-06-11  Geoff Keating  <geoffk@cygnus.com>
4467         * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
4468         (__pthread_spin_trylock): Implement.
4469         (__pthread_spin_unlock): Implement.
4470         (__pthread_spin_init): Implement.
4471         (__pthread_spin_destroy): Implement.
4473 2000-06-10  Ulrich Drepper  <drepper@redhat.com>
4475         * sysdeps/pthread/timer_routines.c (list_append): Little fix to
4476         really append the entry.
4478 2000-06-10  Andreas Jaeger  <aj@suse.de>
4480         * lockfile.c (__fresetlockfiles): Remove unused variable fp.
4482 2000-06-10  Kaz Kylheku  <kaz@ashi.footprints.net>
4484         * sysdeps/pthread/timer_create.c: Thread matching now done on
4485         clock type as well as thread attributes.
4486         There are individual global signal-delivering threads for
4487         different clock types.
4488         * sysdeps/pthread/posix-timer.h: Likewise.
4489         * sysdeps/pthread/timer_routines.c: Likewise.
4491         * sysdeps/pthread/timer_routines.c: Thread allocation and
4492         deallocation function now remembers to put thread on active
4493         list and remove from active list.
4494         Thus now the feature of binding multiple timers
4495         to a single thread actually works.
4497 2000-06-10  Ulrich Drepper  <drepper@redhat.com>
4499         * pthread.c (__pthread_create_2_1): Optimize a bit.
4501         * internals.h (invalid_handle): Also test for p_terminated != 0.
4502         (nonexisting_handle): New function.  Same as old invalid_handle.
4503         * join.c (pthread_join): Use nonexisting_handle instead of
4504         invalid_handle to test for acceptable thread handle.
4505         * manager.c (pthread_handle_free): Likewise.
4506         * joinrace.c: New file.
4507         Reported by Permaine Cheung <pcheung@cygnus.com>.
4509 2000-06-08  Ulrich Drepper  <drepper@redhat.com>
4511         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
4512         Correct handling of matching variable.
4514         * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
4515         avoid warnings.
4517         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
4518         Be prepared for empty timer list.
4520         * sysdeps/pthread/timer_create.c (timer_create): Correct names of
4521         CPUTIME clock ID.  Add support for thread clocks.
4523         * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
4524         subtraction were switched.
4526         * sysdeps/pthread/timer_routines.c (init_module): Use
4527         THREAD_MAXNODES threads.
4529         * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
4530         * sysdeps/pthread/timer_create.c: Fill in creator_pid.
4531         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
4532         with sigqueueinfo is this system call is available.
4534         * sysdeps/pthread/timer_create.c (timer_create): Allow
4535         CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
4537         * sysdeps/pthread/Makefile: New file.  Add rules to build timer
4538         functionality.
4539         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
4541 2000-06-04  Kaz Kylheku  <kaz@ashi.footprints.net>
4543         * sysdeps/pthread/posix-timer.h: New file.
4544         * sysdeps/pthread/timer_create.c: New file.
4545         * sysdeps/pthread/timer_delete.c: New file.
4546         * sysdeps/pthread/timer_getoverr.c: New file.
4547         * sysdeps/pthread/timer_gettime.c: New file.
4548         * sysdeps/pthread/timer_routines.c: New file.
4549         * sysdeps/pthread/timer_settime.c: New file.
4550         * sysdeps/pthread/tst-timer.c: New file.
4552 2000-06-08  Ulrich Drepper  <drepper@redhat.com>
4554         * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
4555         LINK_MAX definitions if necessary.
4557 2000-06-04  Kaz Kylheku  <kaz@ashi.footprints.net>
4559         Added missing fork time handling of global libio lock.
4561         * lockfile.c (__fresetlockfiles): Now also resets the list lock,
4562         not just the individual stream locks. Rewritten to use new
4563         iterator interface provided by libio rather than accessing
4564         global variable.
4566         * lockfile.c (__flockfilelist, _funlockfilelist): New functions
4567         which lock and unlock the stream list using the new interface
4568         provied by libio.
4569         * internals.h: Likewise.
4571         * ptfork.c (__fork): Now calls __flockfilelist before fork,
4572         and __funlockfilelist in the parent after the fork.
4573         Child still calls __fresetlockfiles as before.
4575         * linuxthreads.texi: Now explains what happens to streams at
4576         fork time. Also whole new section on forking and thread added.
4577         Definition of pthread_atfork moved out of Miscellaneous Functions
4578         to this new section.
4580 2000-06-04  Jakub Jelinek  <jakub@redhat.com>
4582         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
4583         Add missing register.
4584         * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
4586 2000-06-02  Jakub Jelinek  <jakub@redhat.com>
4588         * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
4589         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
4590         * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
4592 2000-05-31  Andreas Jaeger  <aj@suse.de>
4594         * sysdeps/mips/pspinlock.c: Implement spinlocks.
4596 2000-05-28  Ulrich Drepper  <drepper@redhat.com>
4598         * spinlock.c (__pthread_lock): Remove ASSERT.
4600         * Makefile (tests): Add ex8.
4601         * Examples/ex8.c: New file.
4603 2000-05-12  Kaz Kylheku  <kaz@ashi.footprints.net>
4605         Bugfix: The pthread_atfork mechanism now takes care of its
4606         own internal mutex at fork time.
4608         * ptfork.c (__fork): Revised so that the mutex is held across
4609         the fork operation and while the handlers are called, and so that
4610         the child resets the mutex.
4612         * linuxthreads.texi: Updated pthread_atfork documentation to make
4613         it clear that fork and pthread_atfork can't be reentered from
4614         atfork handlers, that pthread_atfork and fork are mutually atomic,
4615         and that the handlers are inherited by the child process.
4617 2000-05-24  Ulrich Drepper  <drepper@redhat.com>
4619         * Makefile (libpthread-routines): Add pspinlock.
4620         * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
4621         Use struct _pthread_fastlock instead of pthread_spinlock_t.
4622         * condvar.c: Likewise.
4623         * internals.h: Likewise.
4624         * join.c: Likewise.
4625         * manager.c: Likewise.
4626         * mutex.c: Likewise.
4627         * pthread.c: Likewise.
4628         * rwlock.c: Likewise.
4629         * semaphore.c: Likewise.
4630         * signals.c: Likewise.
4631         * spinlock.h: Likewise.
4632         * spinlock.c: Likewise.  Remove pthread_spin_lock functions.
4633         * sysdeps/alpha/pspinlock.c: New file.
4634         * sysdeps/arm/pspinlock.c: New file.
4635         * sysdeps/i386/pspinlock.c: New file.
4636         * sysdeps/m68k/pspinlock.c: New file.
4637         * sysdeps/mips/pspinlock.c: New file.
4638         * sysdeps/powerpc/pspinlock.c: New file.
4639         * sysdeps/sparc/sparc32/pspinlock.c: New file.
4640         * sysdeps/sparc/sparc64/pspinlock.c: New file.
4641         * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
4642         back to _pthread_fastlock.  Define new pthread_spinlock_t.
4644 2000-05-24  Andreas Jaeger  <aj@suse.de>
4646         * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
4648 2000-05-21  Jakub Jelinek  <jakub@redhat.com>
4650         * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
4652 2000-05-13  Jakub Jelinek  <jakub@redhat.com>
4654         * internals.h (__RES_PTHREAD_INTERNAL): Define.
4656 2000-05-06  Kaz Kylheku  <kaz@ashi.footprints.net>
4658         * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
4659         object state is represented with additional bits which distinguish
4660         whether that state was set up in the current process, or
4661         in an ancestor process. If that state was set in an ancestor,
4662         it means that a fork happened while thread was executing the init
4663         function. In that case, the state is reset to NEVER.
4664         * mutex.c (__pthread_once_fork_prepare): New function.
4665         (__pthread_once_fork_child): Likewise
4666         (__pthread_once_fork_parent): Likewise
4667         (__pthread_reset_pthread_once): Removed.
4668         * ptfork.c (__fork): Call new handlers in mutex.c.
4669         * internals.h: Declarations of new mutex.c functions added.
4670         Declaration of removed function deleted.
4671         * linuxthreads.texi: Updated documentation about pthread_once
4672         to clarify what happens under cancellation and forking.
4674 2000-05-06  Kaz Kylheku  <kaz@ashi.footprints.net>
4676         * internals.h: New thread manager request type, REQ_KICK.
4677         * join.c (pthread_exit): main thread now calls exit() instead
4678         of _exit() in order to proper process cleanup.
4679         * manager.c (__pthread_manager): Do not terminate manager
4680         after unblocking main thread; wait for main thread's
4681         REQ_PROCESS_EXIT request instead.
4682         Also, added REQ_KICK case to handle new request; this just does
4683         nothing.
4684         * manager.c (pthread_exited): Do not terminate manager after
4685         unblocking main thread.
4686         * manager.c (__pthread_manager_sighandler): If the main thread
4687         is waiting for all other threads to die, send a REQ_KICK into
4688         the thread manager request pipe to get it to clean out the threads
4689         and unblock the main thread as soon as possible. This fixes
4690         the 2000 millisecond hang on shutdown bug.
4691         * Examples/ex7.c: New file, tests shutdown behavior when all threads
4692         including the main one call pthread_exit(), or implicitly do so.
4693         * Makefile (tests): Add ex7.
4695 2000-05-05  Andreas Jaeger  <aj@suse.de>
4697         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
4698         (pthread_getcpuclockid): Correct test for ourselves.
4700 2000-05-05  Ulrich Drepper  <drepper@redhat.com>
4702         * internals.h (struct _pthread_descr_struct): Reorganization.
4703         Allocate room for 16 pointers at head of the structure for future
4704         thread-local data handling.  Move p_self member in this area.
4705         * manager.c (pthread_handle_create): Adjust use of p_self.
4706         * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
4707         * pthread.c (__pthread_initial_thread): Adjust initialization.
4708         (__pthread_manager_thread): Likewise.
4710 2000-04-29  Bruno Haible  <haible@clisp.cons.org>
4712         * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
4713         for eventmask larger than 1 word.
4715 2000-04-27  Ulrich Drepper  <drepper@redhat.com>
4717         * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
4718         * pthread.c (__pthread_initialize_minimal): New function.  Perform
4719         minimal initialization.
4720         (pthread_initialize): Remove this code here.
4721         * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again.  We
4722         are working around the problem in glibc.
4724 2000-04-25  Ulrich Drepper  <drepper@redhat.com>
4726         * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
4727         now.  First gcc must be fixed (more concrete: libgcc).
4729 2000-04-24  Ulrich Drepper  <drepper@redhat.com>
4731         * pthread.c: Remove special treatement for interrupt handlers on x86.
4732         * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
4733         * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
4734         necessary.
4735         * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
4737 2000-04-24  Mark Kettenis  <kettenis@gnu.org>
4739         * join.c (pthread_exit): Set p_terminated after reporting the
4740         termination event instead of before.
4742 2000-04-20  Jakub Jelinek  <jakub@redhat.com>
4744         * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
4745         if __USE_UNIX98.
4747 2000-04-18  Andreas Jaeger  <aj@suse.de>
4749         * Versions: Use ld instead of ld.so.
4751 2000-04-18  Jakub Jelinek  <jakub@redhat.com>
4753         * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
4754         Remove the typedef keyword.
4756 2000-04-18  Jakub Jelinek  <jakub@redhat.com>
4758         * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
4759         not stbar.
4760         (READ_MEMORY_BARRIER): Define.
4761         * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
4762         MEMORY_BARRIER.
4763         * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
4764         headers.
4766 2000-04-17  Ulrich Drepper  <drepper@redhat.com>
4768         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
4769         (pthread_getcpuclockid): Don't compare thread_id with thread_self,
4770         use thread_handle().
4772 2000-04-16  Ulrich Drepper  <drepper@redhat.com>
4774         * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
4775         if fast mutex is used.  Don't initialize `already_canceled' twice.
4776         Correctly test for return value of timedsuspend.
4778         * pthread.c: Correct long-time braino.  We never set SA_SIGINFO and
4779         therefore don't need the _rt versions of the signal handlers.
4781 2000-04-15  Ulrich Drepper  <drepper@redhat.com>
4783         * pthread.c (pthread_yield): New function.
4784         * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
4785         * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
4786         * internals.h: Declare __pthread_yield.
4788         * pthread.c (pthread_initialize): Avoid a bit more code if
4789         realtime signals are known to exist.
4791         * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
4792         to dynamically detect RT signals and avoid generating compatibility
4793         functions with old kernel.
4794         * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
4795         __pthread_restart_new directly.
4796         (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
4797         __pthread_wait_for_restart_signal directly.
4798         (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
4799         __pthread_timedsuspend_new directly.
4801 2000-04-15  Ulrich Drepper  <drepper@redhat.com>
4803         * condvar.c: Remove all the special code to handle cond_timedwait.
4804         Use timedsuspend instead.
4805         * internals.h: Declare __pthread_timedsuspend_old,
4806         __pthread_timedsuspend_new, and __pthread_timedsuspend.
4807         Remove declaration of __pthread_init_condvar.
4808         * pthread.c: Define __pthread_timedsuspend variable.
4809         (__pthread_timedsuspend_old): New function.  Timed suspension
4810         implementation for old Linux kernels.
4811         (__pthread_timedsuspend_new): New function.  Timed suspension
4812         implementation for new Linux kernels.
4813         * restart.h (timedsuspend): New function.  Call appropriate
4814         suspension function through __pthread_timedsuspend.
4815         * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
4816         the code.
4817         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4819         * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
4820         undefined.
4821         * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
4822         where possible.
4823         * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
4824         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
4826         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
4827         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4829 2000-04-14  Andreas Jaeger  <aj@suse.de>
4831         * weaks.c: Fix typo.
4833         * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
4834         2.2 for linuxthreads.
4836 2000-04-13  Ulrich Drepper  <drepper@redhat.com>
4838         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
4839         (pthread_getcpuclockid): Fix typo.
4841 2000-04-12  Ulrich Drepper  <drepper@redhat.com>
4843         * Makefile (libpthread-routines): Add getcpuclockid.
4844         * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
4845         * sysdeps/pthread/getcpuclockid.c: New file.
4846         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
4847         * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
4849         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
4850         Defined.
4851         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4853         * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
4854         pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
4855         and pthread_spin_unlock.
4856         * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
4857         into pthread_spinlock_t.  Change all uses.
4858         * spinlock.c: Implement pthread_spin_lock.
4859         Rename __pthread_unlock to __pthread_spin_unlock and define weak
4860         alias for real name.
4861         Define pthread_spin_trylock, pthread_spin_init, and
4862         pthread_spin_destroy.
4863         Change all uses of _pthread_fastlock to pthread_spinlock_t.
4864         * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
4865         Change all uses of _pthread_fastlock to pthread_spinlock_t.
4866         * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
4867         pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
4868         and pthread_spin_unlock.
4869         * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
4870         Change all uses of _pthread_fastlock to pthread_spinlock_t.
4871         * condvar.c: Likewise.
4872         * internals.h: Likewise.
4873         * join.c: Likewise.
4874         * manager.c: Likewise.
4875         * mutex.c: Likewise.
4876         * pthread.c: Likewise.
4877         * rwlock.c: Likewise.
4878         * semaphore.c: Likewise.
4879         * signals.c: Likewise.
4881         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
4882         macros.
4883         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
4885 2000-04-11  Ulrich Drepper  <drepper@redhat.com>
4887         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
4888         _POSIX_SHARED_MEMORY_OBJECTS.
4890 2000-04-11  Andreas Jaeger  <aj@suse.de>
4892         * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
4893         (__compare_and_swap): Mark as modifying memory.
4895 2000-04-11  Geoff Keating  <geoffk@cygnus.com>
4897         * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
4898         __volatile__.
4899         (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
4900         Don't have the 'asm' __volatile__.
4902 2000-04-11  Ulrich Drepper  <drepper@redhat.com>
4904         * internals.h: Define MEMORY_BARRIER as empty if not defined already.
4905         * spinlock.c (__pthread_lock): Add memory barriers.
4906         (__pthread_unlock): Likewise.
4907         * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
4908         instruction.
4909         (RELEASE): Not needed anymore.
4910         (__compare_and_swap): Mark asm as modifying memory.
4911         * sysdeps/powerpc/pt-machine.h (sync): Remove.  Replace with definition
4912         of MEMORY_BARRIER.
4913         (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
4914         * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
4915         (MEMORY_BARRIER): Define using stbar.
4916         * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
4917         stbar.
4918         (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
4919         Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
4920         Mike Burrows <m3b@pa.dec.com>.
4922 2000-04-09  Ulrich Drepper  <drepper@redhat.com>
4924         * signals.c (sigaction): Fix return value for the case SIG is one
4925         of the signals the implementation uses.
4926         Patch by Xavier.Leroy@inria.fr.
4928 2000-04-01  Andreas Jaeger  <aj@suse.de>
4930         * attr.c: Use shlib-compat macros.
4931         * oldsemaphore.c: Likewise.
4932         * pthread.c: Likewise.
4933         * weaks.c: Likewise.
4935 2000-03-26  Ulrich Drepper  <drepper@redhat.com>
4937         * semaphore.c (sem_timedwait): New function.
4938         Patch by Carl Mailloux <carlm@oricom.ca>.
4939         * semaphore.h: Declare sem_timedwait.
4940         * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
4942 2000-03-26  Roland McGrath  <roland@baalperazim.frob.com>
4944         * sysdeps/pthread/Makefile: File removed.
4946 2000-03-23  Ulrich Drepper  <drepper@redhat.com>
4948         * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
4949         * internals.h (__pthread_reset_pthread_once): Add prototype.
4950         * ptfork.c (__fork): Call __pthread_reset_pthread_once.
4952         * manager.c (pthread_handle_create): Store ID of new thread before
4953         clone call.
4955 2000-03-21  Ulrich Drepper  <drepper@redhat.com>
4957         * attr.c: Use new macros from shlib-compat.h to define versions.
4958         * oldsemaphore.c: Likewise.
4959         * semaphore.c: Likewise.
4960         * weaks.c: Likewise.
4962         * pthread.c: Update for new SHLIB_COMPAT definition.
4964         * manager.c (__pthread_manager): Unmask debug signal.
4966         * pthread.c (pthread_initialize): Test for address of __dso_handle
4967         being NULL, not value.  Use __on_exit, not on_exit.
4968         Patch by Andreas Jaeger <aj@suse.de>.
4970         * pthread.c: Use new macros from shlib-compat.h to define versions.
4972 2000-03-19  Ulrich Drepper  <drepper@redhat.com>
4974         * pthread.c (pthread_initialize): Instead of on_exit use
4975         __cxa_atexit if __dso_label is available to allow unloading the
4976         libpthread shared library.
4978 2000-03-16  Ulrich Drepper  <drepper@redhat.com>
4980         * condvar.c: Make tests for ownership of mutex less strict.
4982 2000-03-14  Ulrich Drepper  <drepper@redhat.com>
4984         * condvar.c (pthread_cond_wait): Check whether mutex is owned by
4985         current thread and return error if not.
4986         (pthread_cond_timedwait_relative_old): Likewise.
4987         (pthread_cond_timedwait_relative_new): Likewise.
4989         * mutex.c (__pthread_once): Handle cancelled init function correctly.
4990         (pthread_once_cancelhandler): New function.
4991         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4993 2000-03-14  Andreas Jaeger  <aj@suse.de>
4995         * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
4996         REG_GS.
4997         (pthread_handle_sigrestart_rt): Likewise.
4998         * signals.c (pthread_sighandler_rt): Likewise.
5000 2000-03-02  Andreas Jaeger  <aj@suse.de>
5002         * sysdeps/pthread/bits/libc-lock.h: Fix typo.
5003         Reported by Sean Chen <sean.chen@turbolinux.com>.
5005 2000-02-28  Andreas Jaeger  <aj@suse.de>
5007         * rwlock.c: Fix typo.
5009 2000-02-27  Ulrich Drepper  <drepper@redhat.com>
5011         * rwlock.c: Define __* variants of the functions and make old names
5012         aliases.
5013         * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
5014         * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
5016 2000-02-25  Andreas Jaeger  <aj@suse.de>
5018         * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
5019         pwrite64, lseek64, open64, and __open64 with version 2.2.
5021 2000-02-22  Ulrich Drepper  <drepper@redhat.com>
5023         * semaphore.h (SEM_FAILED): Use 0 not NULL.
5025 2000-02-14  Ulrich Drepper  <drepper@redhat.com>
5027         * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
5028         nanosleep does not work either.  Get absolute time inside the
5029         loop.
5030         (pthread_cond_timedwait_relative_new): Likewise.
5031         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
5033 2000-02-13  Andreas Jaeger  <aj@suse.de>
5035         * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
5036         (pthread_cond_timedwait_relative_old): Likewise.
5038 2000-02-13  Ulrich Drepper  <drepper@redhat.com>
5040         * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
5041         but keep the code around.  A bug in the kernel prevent us from
5042         using the code.
5043         (pthread_cond_timedwait_relative_new): Likewise.
5044         (PR libc/1597 and libc/1598).
5046 2000-02-01  Kaz Kylheku  <kaz@ashi.footprints.net>
5048         * condvar.c (pthread_cond_timedwait_relative_old): Do tight
5049         loop around nanosleep calls instead of around most of the function
5050         (pthread_cond_timedwait_relative_new): Likewise.
5051         body.  Got rid of backwards goto and one local.
5053 2000-01-31  Ulrich Drepper  <drepper@redhat.com>
5055         * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
5056         before every nanosleep call to account for time spent in the rest
5057         of the function.
5058         (pthread_cond_timedwait_relative_new): Likewise.
5059         Patch by khendricks@ivey.uwo.ca (PR libc/1564).
5061 2000-01-29  Ulrich Drepper  <drepper@redhat.com>
5063         * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
5064         from nanosleep call so that in case we restart we only wait for the
5065         remaining time.
5066         (pthread_cond_timedwait_relative_new): Likewise.
5067         Patch by khendricks@ivey.uwo.ca (PR libc/1561).
5069 2000-01-18  Ulrich Drepper  <drepper@cygnus.com>
5071         * manager.c (pthread_allocate_stack): Compute guard page address
5072         correctly.  Patch by HJ Lu.
5074         * sysdeps/pthread/pthread.h: Define
5075         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
5077 2000-01-16  Ulrich Drepper  <drepper@cygnus.com>
5079         * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
5080         preference handling.
5081         (pthread_rwlockattr_setkind_np): Allow
5082         PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
5083         Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
5085 2000-01-12  Ulrich Drepper  <drepper@cygnus.com>
5087         * internals.h (pthread_readlock_info): New structure.
5088         (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
5089         p_untracked_readlock_count.
5090         * pthread.c (__pthread_initial_thread, pthread_manager_thread):
5091         Add initializers for new fields.
5092         * manager.c (pthread_free): Free read/write lock lists.
5093         * queue.h (queue_is_empty): New function.
5094         * rwlock.c: Implement requirements about when readers should get
5095         locks assigned.
5096         * sysdeps/pthread/pthread.h
5097         (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
5098         * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
5099         Define this name as well.
5100         Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
5102 2000-01-05  Ulrich Drepper  <drepper@cygnus.com>
5104         * pthread.c (__pthread_initial_thread, pthread_manager_thread):
5105         Adjust initializers for struct _pthread_descr_struct change.
5106         * internals.h (struct _pthread_descr_struct): Move new elements to
5107         the end.
5109 2000-01-03  Kaz Kylheku  <kaz@ashi.footprints.net>
5111         Redesigned how cancellation unblocks a thread from internal
5112         cancellation points (sem_wait, pthread_join,
5113         pthread_cond_{wait,timedwait}).
5114         Cancellation won't eat a signal in any of these functions
5115         (*required* by POSIX and Single Unix Spec!).
5116         * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
5117         simultaneous condition variable signal (not required by POSIX
5118         or Single Unix Spec, but nice).
5119         * spinlock.c: __pthread_lock queues back any received restarts
5120         that don't belong to it instead of assuming ownership of lock
5121         upon any restart; fastlock can no longer be acquired by two threads
5122         simultaneously.
5123         * restart.h: Restarts queue even on kernels that don't have
5124         queued real time signals (2.0, early 2.1), thanks to atomic counter,
5125         avoiding a rare race condition in pthread_cond_timedwait.
5127 1999-12-31  Andreas Jaeger  <aj@suse.de>
5129         * internals.h: Remove duplicate prototype declarations.
5131         * weaks.c: Remove __THROW from prototypes since the file is not
5132         compiled by a C++ compiler.
5133         * internals.h: Likewise.
5135 1999-12-30  Andreas Jaeger  <aj@suse.de>
5137         * sysdeps/pthread/pthread.h: Move internal functions to...
5138         * sysdeps/pthread/bits/libc-lock.h: ...here.
5140 1999-12-29  Andreas Jaeger  <aj@suse.de>
5142         * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
5144 1999-12-28  Ulrich Drepper  <drepper@cygnus.com>
5146         * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
5147         beginning.
5149         * manager.c (__pthread_start): Add one more cast to prevent
5150         warning on 64bit machines.
5152 1999-12-21  Ulrich Drepper  <drepper@cygnus.com>
5154         * manager.c (pthread_handle_create): Set p_pid of new thread
5155         before calling the callback function to report a new thread.
5157 1999-12-20  Andreas Jaeger  <aj@suse.de>
5159         * pthread.c (pthread_initialize): Move getrlimit call after
5160         setting of errno.
5162 1999-12-18  Ulrich Drepper  <drepper@cygnus.com>
5164         * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
5165         pwrite64, lseek64, open64, and __open64.
5166         * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
5167         pwrite64, lseek64, open64, and __open64.
5169         * manager.c (pthread_allocate_stack): Correct computation of
5170         new_thread_bottom.  Correct handling of stack size and when the
5171         rlimit method to guard for stack growth is used.
5172         * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
5173         minus one pagesize (not two).
5175 1999-12-03  Andreas Jaeger  <aj@suse.de>
5177         * Versions: Add __res_state with version GLIBC_2.2.
5179         * errno.c (__res_state): New function to return thread specific
5180         resolver state.
5182         * pthread.c (pthread_initialize): Initialize p_resp.
5183         (__pthread_reset_main_thread): Also set p_resp.
5185         * manager.c (pthread_handle_create): Initialize p_resp.
5187         * internals.h: Add thread specific resolver state.
5188         Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
5190 1999-12-01  Ulrich Drepper  <drepper@cygnus.com>
5192         * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
5193         beginning.
5194         * sysdeps/i386/i686/pt-machine.h: Likewise.
5195         Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
5197 1999-11-23  Ulrich Drepper  <drepper@cygnus.com>
5199         * manager.c (pthread_start_thread_event): Initialize p_pid already
5200         here.
5202 1999-11-22  Ulrich Drepper  <drepper@cygnus.com>
5204         * internals.h: Add prototype for __pthread_manager_event.
5205         * manager.c (__pthread_manager_event): New function.
5206         (pthread_start_thread_event): Correct computation of self.
5207         Use INIT_THREAD_SELF.
5208         * pthread.c (__pthread_manager_thread): Initialize p_lock.
5209         (__pthread_initialize_manager): Respect event flags also for creation
5210         of the manager thread.
5212 1999-11-08  Ulrich Drepper  <drepper@cygnus.com>
5214         * pthread.c (__pthread_initialize_manager): Initialize
5215         __pthread_manager_thread.p_tid.
5217 1999-11-02  Ulrich Drepper  <drepper@cygnus.com>
5219         * internals.h: Declare __pthread_last_event.
5220         * manager.c: Define __pthread_last_event.
5221         (pthread_handle_create): Set __pthread_last_event.
5222         (pthread_exited): Likewise.
5223         * join.c (pthread_exit): Likewise.
5225         * Makefile (libpthread-routines): Add events.
5226         * events.c: New file.
5227         * internals.h: Protect against multiple inclusion.
5228         Include thread_dbP.h header.
5229         (struct _pthread_descr_struct): Add new fields p_report_events and
5230         p_eventbuf.
5231         Declare event reporting functions.
5232         * join.c (pthread_exit): Signal event if this is wanted.
5233         * manager.c (__pthread_threads_events): New variable.
5234         (pthread_handle_create): Take new parameters with event information.
5235         Signal TD_CREATE event if wanted.
5236         (__pthread_manager): Adjust pthread_handle_create call.
5237         (pthread_start_thread_event): New function.  Block until manager is
5238         finished and then call pthread_start_thread.
5239         (pthread_exited): Signal TD_REAP event if wanted.
5241 1999-10-26  Ulrich Drepper  <drepper@cygnus.com>
5243         * restart.h (suspend_with_cancellation): Rewrite as a macro.
5245         * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
5247 1999-10-25  Andreas Jaeger  <aj@suse.de>
5249         * internals.h: Remove K&R compatibility.
5250         * no-tsd.c: Likewise.
5251         * semaphore.h: Likewise.
5252         * signals.c: Likewise.
5253         * sysdeps/pthread/bits/libc-tsd.h: Likewise.
5254         * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
5255         * weaks.c: Likewise.
5257 1999-10-21  Xavier Leroy  <Xavier.Leroy@inria.fr>
5259         * pthread.c: For i386, wrap pthread_handle_sigrestart and
5260         pthread_handle_sigcancel with functions that restore %gs from the
5261         signal context.  For each signal handling function, two wrappers
5262         are required, one for a non-RT signal and one for a RT signal.
5263         * signal.c: For i386, add code to restore %gs from the signal
5264         context in pthread_sighandler and pthread_sighandler_rt.
5266 1999-10-17  Ulrich Drepper  <drepper@cygnus.com>
5268         * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
5270 1999-10-14  Ulrich Drepper  <drepper@cygnus.com>
5272         * pthread.c (__pthread_initial_thread): Pass argument to
5273         PTHREAD_START_ARGS_INITIALIZER.
5274         (__pthread_manager_thread): Likewise.
5276         * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
5277         initialize function.
5279         * manager.c (pthread_handle_create): Remove p_startfct initialization.
5281         * internals.h (_pthread_descr_struct): We don't need p_startfct field.
5283 1999-10-12  Ulrich Drepper  <drepper@cygnus.com>
5285         * internals.h: Correct return types for __libc_read and __libc_write.
5287 1999-10-09  Andreas Jaeger  <aj@suse.de>
5289         * internals.h: Add __new_sem_post to get prototype in
5290         manager.c; include semaphore.h for needed types.
5292 1999-10-08  Ulrich Drepper  <drepper@cygnus.com>
5294         * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
5295         directly instead of calling sem_post which should not be necessary
5296         but is faster and might help in some case to work around problems.
5297         Patch by khendricks@ivey.uwo.ca [libc/1382].
5299 1999-10-08  Andreas Schwab  <schwab@suse.de>
5301         * sysdeps/pthread/Subdirs: New file.
5302         * Implies: Removed.
5304 1999-10-07  Ulrich Drepper  <drepper@cygnus.com>
5306         * Implies: New file.
5307         * internals.h (struct _pthread_descr_struct): Add p_startfct.
5308         * manager.c (pthread_handle_create): Initialize p_startfct.
5309         * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
5311 1999-09-25  Ulrich Drepper  <drepper@cygnus.com>
5313         * manager.c (__linuxthreads_pthread_threads_max): New variable.
5314         * specific.c (__linuxthreads_pthread_keys_max): New variable.
5315         (__linuxthreads_pthread_key_2ndlevel_size): New variable.
5317         * condvar.c (pthread_cond_timedwait_relative): Never return with
5318         EINTR.  Patch by Andreas Schwab.
5320 1999-09-19  Ulrich Drepper  <drepper@cygnus.com>
5322         * signals.c (sigaction): Correct last patch.  Don't select
5323         pthread_sighandler_rt based on the signal number but instead of
5324         the SA_SIGINFO flag.
5326 1999-09-23  Ulrich Drepper  <drepper@cygnus.com>
5328         * specific.c: Move definitions of struct pthread_key_struct and
5329         destr_function to ...
5330         * internals.h: ...here.
5332 1999-09-18  Ulrich Drepper  <drepper@cygnus.com>
5334         * pthread.c (pthread_handle_sigrestart_rt): New function.  Use
5335         this instead of pthread_handle_sigrestart if the signal is an RT
5336         signal.
5338         * signals.c: Handle passing through of sighandler arguments also
5339         for real-time signals.
5341 1999-09-03  Andreas Schwab  <schwab@suse.de>
5343         * ptfork.c (__fork): Renamed from fork and use __libc_fork.  Add
5344         fork as weak alias.
5345         (__vfork): New function, alias vfork.
5346         * Versions: Export __fork, vfork, and __vfork in libpthread.
5348 1999-08-23  Andreas Schwab  <schwab@suse.de>
5350         * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
5351         call to signal handler.
5353 1999-08-20  Ulrich Drepper  <drepper@cygnus.com>
5355         * pthread.c (__pthread_reset_main_thread): Undo last change.
5356         (__pthread_kill_other_threads_np): Reset signal handlers for the
5357         signals we used in the thread implementation here.
5359 1999-08-19  Ulrich Drepper  <drepper@cygnus.com>
5361         * pthread.c (__pthread_reset_main_thread): Reset signal handlers
5362         for the signals we used in the thread implementation [PR libc/1234].
5364         * Versions: Export __pthread_kill_other_threads_np from libpthread
5365         for GLIBC_2.1.2.
5367         * signals.c: Pass sigcontext through wrapper to the user function.
5369 1999-08-01  Ulrich Drepper  <drepper@cygnus.com>
5371         * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
5372         __libc_internal_tsd_set.
5374 1999-07-29  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5376         * manager.c: Remove inclusion of <linux/tasks.h> since it's not
5377         needed anymore.
5379 1999-07-16  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5381         * internals.h: Align _pthread_descr_struct to 32 bytes.
5382         Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
5383         libc/1206.
5385 1999-07-09  Ulrich Drepper  <drepper@cygnus.com>
5387         * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
5388         swap function.
5390 1999-07-09  Cristian Gafton  <gafton@redhat.com>
5392         * Makefile (libpthread-routines): Add oldsemaphore routine.
5393         * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
5394         sem_trywait, and sem_wait to GLIBC_2.1.
5395         * oldsemaphore.c: New file.
5396         * semaphore.c: Add default_symbol_versions for the changed functions.
5397         (__new_sem_init): Rename from sem_init.
5398         (__new_sem_post): Rename from sem_post.
5399         (__new_sem_wait): Rename from sem_wait.
5400         (__new_sem_trywait): Rename from sem_trywait.
5401         (__new_sem_getvalue): Rename from sem_getvalue.
5402         (__new_sem_destroy): Rename from sem_destroy.
5404 1999-06-23  Robey Pointer  <robey@netscape.com>
5406         * internals.h: Added p_nextlock entry to separate queueing for a
5407         lock from queueing for a CV (sometimes a thread queues on a lock
5408         to serialize removing itself from a CV queue).
5409         * pthread.c: Added p_nextlock to initializers.
5410         * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
5412 1999-07-09  Ulrich Drepper  <drepper@cygnus.com>
5414         * manager.c (pthread_handle_create): Free mmap region after stack
5415         if clone failed.  Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
5417 1999-05-23  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5419         * man/pthread_cond_init.man: Correct example.
5420         Reported by Tomas Berndtsson <tomas@nocrew.org>.
5422         * linuxthreads.texi (Condition Variables): Likewise.
5424 1999-05-18  Jakub Jelinek  <jj@ultra.linux.cz>
5426         * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
5427         casx not cas, also successful casx returns the old value in rd
5428         and not the new value.
5430 1999-05-16  Xavier Leroy  <Xavier.Leroy@inria.fr>
5432         * manager.c: If pthread_create() is given a NULL attribute
5433         and the thread manager runs with a realtime policy, set the
5434         scheduling policy of the newly created thread back to SCHED_OTHER.
5435         * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
5436         initialize the schedpolicy field of new_thread->p_start_args
5437         to that of the calling thread.
5439 1999-04-29  Ulrich Drepper  <drepper@cygnus.com>
5441         * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
5442         instruction does not allow memory element to use offset.
5444 1999-04-28  Ulrich Drepper  <drepper@cygnus.com>
5446         * manager.c (pthread_allocate_stack): Optimize initialization of new
5447         thread descriptor.
5449         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
5450         Don't use initializer since it is all zeroes.
5451         (__libc_once_define): Likewise.
5453 1999-04-16  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5455         * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
5456         doesn't exist anymore.
5457         * sysdeps/i386/Implies: Likewise.
5458         * sysdeps/m68k/Implies: Likewise.
5459         * sysdeps/mips/Implies: Likewise.
5460         * sysdeps/powerpc/Implies: Likewise.
5461         * sysdeps/sparc/sparc32/Implies: Likewise.
5462         * sysdeps/sparc/sparc64/Implies: Likewise.
5464 1999-04-15  Ulrich Drepper  <drepper@cygnus.com>
5466         * sysdeps/alpha/bits/semaphore.h: Removed.
5467         * sysdeps/powerpc/bits/semaphore.h: Removed.
5468         * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
5469         * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
5470         * Makefile (headers): Remove bits/semaphore.h.
5472         * semaphore.h: Define _pthread_descr if necessary.
5473         Don't include limits.h.  Define SEM_VALUE_MAX directly.
5474         Define SEM_FAILED.
5475         (sem_t): Protect element names with leading __.
5476         Add declarations for sem_close, sem_open, and sem_unlink.
5477         * semaphore.c: Adjust all functions for new element names.
5478         Define sem_close, sem_open, and sem_unlink.
5479         * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
5480         GLIBC_2.1.1.
5481         * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
5482         necessary.
5484 1999-03-16  H.J. Lu  <hjl@gnu.org>
5486         * specific.c (pthread_key_delete): Check th->p_terminated to see
5487         if the thread is running.
5489         * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
5490         Added to GLIBC_2.0 for libc.so.
5492 1999-02-12  H.J. Lu  <hjl@gnu.org>
5494         * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
5495         __libc_allocate_rtsig): Added to GLIBC_2.1.
5497         * internals.h (DEFAULT_SIG_RESTART): Removed.
5498         (DEFAULT_SIG_CANCEL): Removed.
5500         * pthread.c (init_rtsigs, __libc_current_sigrtmin,
5501         __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
5502         (__pthread_sig_restart, __pthread_sig_cancel,
5503         __pthread_sig_debug): Initialized.
5504         (pthread_initialize): Call init_rtsigs () to initialize
5505         real-time signals.
5507 1999-02-03  H.J. Lu  <hjl@gnu.org>
5509         * manager.c (__pthread_manager): Do block __pthread_sig_debug.
5510         Don't restart the thread which sent REQ_DEBUG.
5511         (pthread_start_thread): Check if __pthread_sig_debug > 0
5512         before debugging.
5514         * pthread.c (__pthread_initialize_manager): Suspend ourself
5515         after sending __pthread_sig_debug to gdb instead of
5516         __pthread_sig_cancel.
5518 1999-01-24  H.J. Lu  <hjl@gnu.org>
5520         * manager.c (__pthread_manager): Delete __pthread_sig_debug
5521         from mask if __pthread_sig_debug > 0.
5522         (pthread_handle_create): Increment __pthread_handles_num.
5524         * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
5525         * pthread.c (__pthread_initialize_manager): Likewise.
5527         * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
5528         instead of __libc_allocate_rtsig (2).
5529         (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
5530         instead of __pthread_sig_cancel.
5531         (pthread_handle_sigdebug): Fix comments.
5533 1999-01-21  Ulrich Drepper  <drepper@cygnus.com>
5535         * manager.c (pthread_allocate_stack): Set
5536         __pthread_nonstandard_stacks if user-specified stack is used.
5538 1999-01-16  Ulrich Drepper  <drepper@cygnus.com>
5540         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
5541         _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
5543 1999-01-07  Xavier Leroy  <Xavier.Leroy@inria.fr>
5545         * pthread.c: Use a third signal __pthread_sig_debug distinct
5546         from __pthread_sig_cancel to notify gdb when a thread is
5547         created
5548         * manager.c: Likewise.
5549         * internals.h: Likewise.
5550         * signals.c: The implementation of sigwait(s) assumed that
5551         all signals in s have signal handlers already attached.
5552         This is not required by the standard, so make it work
5553         also if some of the signals have no handlers.
5555 1999-01-05  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
5557         * linuxthreads.texi: Remove pointers from first @node.  Move old
5558         @node spec inside comment.
5560 1998-12-31  Ulrich Drepper  <drepper@cygnus.com>
5562         * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
5563         _IO_lock_unlock.
5565 1998-12-29  Ulrich Drepper  <drepper@cygnus.com>
5567         * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
5568         lock.  Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
5570 1998-12-21  Ulrich Drepper  <drepper@cygnus.com>
5572         * manager.c: Threads now send __pthread_sig_cancel on termination.
5573         Change clone call and signal masks.
5574         * thread.c (pthread_handle_sigrestart): Remove special code for
5575         manager.
5576         (pthread_handle_sigcancel): In manager thread call
5577         __pthread_manager_sighandler.
5578         * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
5579         * sysdeps/i386/i686/pt-machine.h: Likewise.
5580         Patches by Xavier Leroy.
5582 1998-12-14  Ulrich Drepper  <drepper@cygnus.com>
5584         * spinlock.c (__pthread_unlock): Don't crash if called for an
5585         untaken mutex.  Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
5587         * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
5588         overall runtime.
5590 1998-12-13  Ulrich Drepper  <drepper@cygnus.com>
5592         * Examples/ex3.c: Wait until all threads are started before
5593         searching for the number to avoid race condition on very fast
5594         systems.
5596 1998-12-08  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5598         * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
5599         declaration since it's not needed.
5601         * sysdeps/pthread/pthread.h: Move internal functions to ...
5602         * internals.h: ...here.
5604 1998-12-02  H.J. Lu  <hjl@gnu.org>
5606         * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
5607         SIGRTMIN is defined.
5608         (__pthread_sig_cancel): Likewise.
5610 1998-12-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5612         * wrapsyscall.c: Include <sys/mman.h> for msync,
5613         <stdlib.h> for system and <termios.h> for tcdrain prototype.
5614         Correct msync declaration.
5616 1998-11-29  Roland McGrath  <roland@baalperazim.frob.com>
5618         * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
5619         __libc_tsd_set): New macros for new interface.
5620         * no-tsd.c: New file, provide uninitialized defns of
5621         __libc_internal_tsd_get and __libc_internal_tsd_set.
5622         * Makefile (routines): Add no-tsd.
5624 1998-10-12  Roland McGrath  <roland@baalperazim.frob.com>
5626         * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
5627         * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
5628         __libc_internal_tsd_set): Move decls to ...
5629         * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
5630         declarations.
5632         * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
5633         __libc_internal_tsd_set): Make these pointers to functions, not
5634         functions; remove #pragma weak decls for them.
5635         * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
5636         Define static functions and initialized pointers to them.
5638 1998-11-18  Ulrich Drepper  <drepper@cygnus.com>
5640         * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
5641         (CFLAGS-specific.c): Likewise.
5642         (CFLAGS-pthread.c): Likewise.
5643         (CFLAGS-ptfork.c): Likewise.
5644         (CFLAGS-cancel.c): Likewise.
5645         * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
5646         as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
5648         * mutex.c (pthread_mutex_init): Define as strong symbol.
5649         (pthread_mutex_destroy): Likewise.
5650         (pthread_mutex_trylock): Likewise.
5651         (pthread_mutex_lock): Likewise.
5652         (pthread_mutex_unlock): Likewise.
5653         (pthread_mutexattr_init): Likewise.
5654         (pthread_mutexattr_destroy): Likewise.
5655         (pthread_once): Likewise.
5656         * ptfork.c (pthread_atfork): Likewise.
5657         * specific.c (pthread_key_create): Likewise.
5658         (pthread_setspecific): Likewise.
5659         (pthread_getspecific): Likewise.
5661 1998-11-15  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
5663         * linuxthreads.texi: Fix punctuation after xref.
5665 1998-11-10  H.J. Lu  <hjl@gnu.org>
5667         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
5668         if it is defined in <linux/limits.h>.
5670 1998-10-29 14:28  Ulrich Drepper  <drepper@cygnus.com>
5672         * spinlock.h (__pthread_trylock): Define inline.
5673         (__pthread_lock): Add extra parameter to declaration.  Declare
5674         using internal_function.
5675         (__pthread_unlock): Declare using internal_function.
5676         * spinlock.c (__pthread_lock): Add new parameter.  Use it instead
5677         of local variable self.  Avoid recomputing self.  Define using
5678         internal_function.
5679         (__pthread_trylock): Remove.
5680         (__pthread_unlock): Define using internal_function.
5681         * cancel.c: Adjust for __pthread_lock interface change.  Use already
5682         computed self value is possible.
5683         * condvar.c: Likewise.
5684         * join.c: Likewise.
5685         * manager.c: Likewise.
5686         * mutex.c: Likewise.
5687         * pthread.c: Likewise.
5688         * rwlock.c: Likewise.
5689         * semaphore.c: Likewise.
5690         * signals.c: Likewise.
5692 1998-10-27 13:46  Ulrich Drepper  <drepper@cygnus.com>
5694         * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
5695         __ to field names of the struct.
5696         * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
5697         Likewise.
5698         (pthread_attr_t): Likewise.
5699         (pthread_cond_t): Likewise.
5700         (pthread_condattr_t): Likewise.
5701         (pthread_mutex_t): Likewise.
5702         (pthread_mutexattr_t): Likewise.
5703         (pthread_rwlock_t): Likewise.
5704         (pthread_rwlockattr_t): Likewise.
5705         * attr.c: Adjust for pthread.h and pthreadtypes.h change.
5706         * cancel.c: Likewise.
5707         * condvar.c: Likewise.
5708         * manager.c: Likewise.
5709         * mutex.c: Likewise.
5710         * pthread.c: Likewise.
5711         * ptlongjmp.c: Likewise.
5712         * rwlock.c: Likewise.
5713         * spinlock.c: Likewise.
5715 1998-10-09  Ulrich Drepper  <drepper@cygnus.com>
5717         * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
5718         also with PT_EI.
5720         * sysdeps/i386/i686/pt-machine.h: Remove unused inline
5721         definitions.
5723         * Makefile (libpthread-routines): Add pt-machine.
5724         * pt-machine.c: New file.
5725         * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
5726         yet defined.  Use PT_EI in extern inline definitions.
5727         * sysdeps/arm/pt-machine.h: Likewise.
5728         * sysdeps/i386/pt-machine.h: Likewise.
5729         * sysdeps/i386/i686/pt-machine.h: Likewise.
5730         * sysdeps/m68k/pt-machine.h: Likewise.
5731         * sysdeps/mips/pt-machine.h: Likewise.
5732         * sysdeps/powerpc/pt-machine.h: Likewise.
5733         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
5734         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
5736 1998-10-02  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5738         * semaphore.h: Include <sys/types.h> so that _pthread_descr
5739         is declared.
5741 1998-09-15  David S. Miller  <davem@pierdol.cobaltmicro.com>
5743         * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
5744         argument.
5745         * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
5747 1998-09-12 14:24 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
5749         * sysdeps/unix/sysv/linux/bits/sigthread.h: Add multiple inclusion
5750         guard.
5752 1998-09-02 11:08  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
5754         * signals.c (sigaction): Check that sig is less than NSIG to avoid
5755         array index overflow.
5757 1998-09-06 10:56  Ulrich Drepper  <drepper@cygnus.com>
5759         * sysdeps/pthread/semaphore.h: New file.
5761 1998-09-06 09:08  Ulrich Drepper  <drepper@cygnus.com>
5763         * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
5764         _LIBC_TSD_KEY_DL_ERROR.
5766 1998-08-31  Ulrich Drepper  <drepper@cygnus.com>
5768         * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
5769         * sysdeps/i386/pt-machine.h: Likewise.
5770         Suggested by Roland McGrath.
5772 1998-08-28 13:58  Ulrich Drepper  <drepper@cygnus.com>
5774         * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
5775         access thread data with non-constant offsets.
5776         * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
5777         necessary.
5779         * sysdeps/i386/useldt.h: Fix typo.  Add THREAD_GETMEM_NC and
5780         THREAD_SETMEM_NC definitions.
5782         * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
5783         THREAD_SETMEM_NC.
5784         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
5786 1998-08-26 15:46  Ulrich Drepper  <drepper@cygnus.com>
5788         * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
5789         not already defined.
5790         (struct _pthread_descr_struct): Add p_self and p_nr field.
5791         * manager.c (__pthread_handles): Define second element to point
5792         to manager thread.
5793         (__pthread_handles_num): Initialize to 2.
5794         (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
5795         (pthread_start_thread): Likewise.
5796         (pthread_handle_create): Start search for free slot at entry 2.
5797         Initialize new fields p_self and p_nr.
5798         Call __clone with CLONE_PTRACE if available.
5799         (pthread_free): Call FREE_THREAD_SELF if available.
5800         * pthread.c (__pthread_initial_thread): Initialize new fields.
5801         (__pthread_manager_thread): Likewise.
5802         (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
5804         * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
5805         elements of the thread descriptor.
5806         * condvar.c: Likewise.
5807         * errno.c: Likewise.
5808         * join.c: Likewise.
5809         * manager.c: Likewise.
5810         * pthread.c: Likewise.
5811         * ptlongjmp.c: Likewise.
5812         * semaphore.c: Likewise.
5813         * signals.c: Likewise.
5814         * specific.c: Likewise.
5815         * spinlock.c: Likewise.
5817         * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
5819         * sysdeps/i386/useldt.h: New file.
5820         * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
5822         * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
5823         THREAD_SETMEM using __thread_self.
5824         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
5826 1998-08-24  Geoff Keating  <geoffk@ozemail.com.au>
5828         * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
5829         turned out that we didn't need to queue after all.
5831 1998-08-22  Geoff Keating  <geoffk@ozemail.com.au>
5833         * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
5834         and wastes space; correct types.
5836 1998-08-08 11:18  H.J. Lu  <hjl@gnu.org>
5838         * signals.c (sigaction): Handle NULL argument.
5840 1998-08-04  Ulrich Drepper  <drepper@cygnus.com>
5842         * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
5843         of sigset_t.
5845 1998-08-02  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
5847         * Makefile (linuxthreads-version): Extract correct number from
5848         Banner.
5850 1998-07-29  Xavier Leroy  <Xavier.Leroy@inria.fr>
5852         * Banner: Bump version number to 0.8
5853         * FAQ.html: Many updates, in particular w.r.t. debugging.
5854         * manager.c: Support for non-default stacksize for
5855         LinuxThreads-allocated stacks;
5856         don't use guard pages for stacks with default size, rely on
5857         rlimit(RLIMIT_STACK) instead (it's cheaper).
5858         * attr.c: Likewise.
5859         * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
5860         everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
5861         * condvar.c: Likewise.
5862         * internals.h: Likewise.
5863         * restart.h: Likewise.
5864         * signals.c: Likewise.
5865         * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
5867 1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
5869         * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
5870         __pthread_mutexattr_[sg]ettype.  Add more weak aliases.
5871         * Versions: Put __pthread_mutexattr_settype under version
5872         GLIBC_2.0.  Don't export __pthread_mutexattr_setkind_np and
5873         __pthread_mutexattr_gettype.
5875 1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
5877         * sysdeps/pthread/bits/libc-lock.h: Make
5878         __pthread_mutexattr_settype weak.  Don't make
5879         __pthread_mutexattr_setkind_np weak.
5881 1998-07-16 10:52  Ulrich Drepper  <drepper@cygnus.com>
5883         * manager.c (pthread_handle_create): Check whether sched_setscheduler
5884         call can succeed here.
5886         * mutex.c: Define __pthread_mutexattr_settype and make
5887         __pthread_mutexattr_setkind_np an alias.
5888         Likewise for __pthread_mutexattr_gettype.
5890 1998-07-15 11:00 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
5892         * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
5893         is root.
5895 1998-07-14 19:38  Ulrich Drepper  <drepper@cygnus.com>
5897         * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
5899 1998-07-11  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5901         * Examples/ex6.c: Include <unistd.h> for usleep.
5903 1998-06-13 11:04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
5905         * Examples/ex4.c (main): Use exit, not pthread_exit.
5907 1998-07-09 13:39  Ulrich Drepper  <drepper@cygnus.com>
5909         * Versions: Add __pthread_mutexattr_gettype and
5910         __pthread_mutexattr_settype.
5911         * lockfile.c: Use __pthread_mutexattr_settype instead of
5912         __pthread_mutexattr_setkind_np.
5913         * mutex.c: Define __pthread_mutexattr_gettype and
5914         __pthread_mutexattr_settype.
5915         * weak.c: Likewise.
5916         * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
5917         __pthread_mutexattr_settype.
5918         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
5919         Use __pthread_mutexattr_settype.
5921 1998-07-08 22:26  Ulrich Drepper  <drepper@cygnus.com>
5923         * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
5924         * mutex.c: Define weak alias pthread_mutexattr_gettype and
5925         pthread_mutexattr_settype.
5926         * sysdeps/pthread/pthread.h: Declare these functions.
5927         Move pthread_sigmask and pthread_kill declaration in separate header.
5928         * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
5930 1998-07-07 15:20  Ulrich Drepper  <drepper@cygnus.com>
5932         * Makefile: Add rules to compile and run tests.
5933         * Examples/ex1.c: Little changes to fix warnings.
5934         * Examples/ex2.c: Likewise.
5935         * Examples/ex3.c: Likewise.
5936         * Examples/ex4.c: Likewise.
5937         * Examples/ex5.c: Likewise.
5938         * Examples/ex6.c: New file.
5940 1998-07-05 11:54  Ulrich Drepper  <drepper@cygnus.com>
5942         * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
5944 1998-07-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5946         * attr.c: Include <string.h>.
5948 1998-06-30 11:47  Ulrich Drepper  <drepper@cygnus.com>
5950         * attr.c: Include errno.h.  Use memcpy to copy sched_param.
5951         * internals.h: Include limits.h.
5952         * manager.c: Use memcpy to copy sched_param.
5953         * ptfork.c: Include errno.h.
5954         * pthread.c: Likewise.
5955         * semaphore.c: Likewise.
5956         * specific.c: Likewise.
5957         * spinlock.h: Likewise.
5958         * sysdeps/pthread/pthread.h: Include only allowed headers.  Move
5959         type definition to ...
5960         * sysdeps/pthread/bits/pthreadtypes.h: ...here.  New file.
5962 1998-06-29 12:34  Ulrich Drepper  <drepper@cygnus.com>
5964         * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
5966         * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
5967         as macros as demanded in POSIX.1, Annex C.
5969 1998-06-29 12:29  Ulrich Drepper  <drepper@cygnus.com>
5971         * internals.h (struct pthread_request): For free use pthread_t
5972         instead of pthread_descr.
5973         * join.c (pthread_join): Pass thread_id, not th to manager.
5974         (pthread_detach): Likewise.
5975         * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
5976         (pthread_exited): Remove detached queue code.
5977         (pthread_handle_free): Expect thread ID parameter and use it to
5978         validate the thread decsriptor.  Don't use detached queue.
5979         Patches by Xavier Leroy.
5981 1998-06-27  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
5983         * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
5984         _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
5985         __pthread_atfork, __pthread_key_create, __pthread_once.
5986         * internals.h: Doc fix.
5987         * pthread.c (__pthread_initialize): Define again.
5989 1998-06-26  Ulrich Drepper  <drepper@cygnus.com>
5991         * manager.c (pthread_exited): If thread is not detached put it on
5992         special list.
5993         (pthread_handle_free): If thread is not on list with living threads
5994         search on list with detached threads.
5996         * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
5997         for new definition of pthread_rwlock_t.
5999         * spinlock.c: Correct test whether to compile
6000         __pthread_compare_and_swap or not.
6002 1998-06-25 19:27  Ulrich Drepper  <drepper@cygnus.com>
6004         * attr.c: Finish user stack support.  Change locking code to be safe
6005         in situations with different priorities.
6006         * cancel.c: Likewise.
6007         * condvar.c: Likewise.
6008         * internals.h: Likewise.
6009         * join.c: Likewise.
6010         * manager.c: Likewise.
6011         * mutex.c: Likewise.
6012         * pthread.c: Likewise.
6013         * ptlongjmp.c: Likewise.
6014         * queue.h: Likewise.
6015         * rwlock.c: Likewise.
6016         * semaphore.c: Likewise.
6017         * semaphore.h: Likewise.
6018         * signals.c: Likewise.
6019         * spinlock.c: Likewise.
6020         * spinlock.h: Likewise.
6021         * sysdeps/pthread/pthread.h: Likewise.
6022         Patches by Xavier Leroy.
6024         * sysdeps/i386/i686/pt-machine.h: New file.
6026 1998-06-25  Ulrich Drepper  <drepper@cygnus.com>
6028         * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
6029         [sg]et_stackaddr prototypes always available.
6031         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6032         _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
6034 1998-06-24  Ulrich Drepper  <drepper@cygnus.com>
6036         * manager.c (pthread_free): Undo patch from 980430.
6037         Reported by David Wragg <dpw@doc.ic.ac.uk>.
6039 1998-06-09 15:07  Ulrich Drepper  <drepper@cygnus.com>
6041         * manager.c: Define __pthread_manager_adjust_prio and use it to
6042         increase priority when needed.
6043         * internals.h: Add prototype for __pthread_manager_adjust_prio.
6044         * mutex.c: Optimize mutexes to wake up only one thread.
6045         * pthread.c: Move PID of manager for global variable in structure
6046         element.
6047         Patches by Xavier Leroy.
6049 1998-06-07 13:47  Ulrich Drepper  <drepper@cygnus.com>
6051         * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
6053 1998-06-03  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
6055         * attr.c: Correct typo.
6057 1998-05-01  Ulrich Drepper  <drepper@cygnus.com>
6059         * manager.c (pthread_free): Unmap guard before the stack.
6060         Patch by Matthias Urlichs.
6062 1998-04-30  Ulrich Drepper  <drepper@cygnus.com>
6064         * manager.c (pthread_free): Detect already free child.
6065         Patch by Xavier Leroy, reported by Matthias Urlichs.
6067 1998-04-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6069         * Makefile (linuxthreads-version): Renamed back from
6070         libpthread-version.
6072 1998-04-21  Ulrich Drepper  <drepper@cygnus.com>
6074         * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
6075         __libc_longjmp.
6077 1998-04-20 14:55  Ulrich Drepper  <drepper@cygnus.com>
6079         * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
6080         * internals.h: Add definitions for new spinlock implementation.
6081         * ptlongjmp.c: New file.
6082         * spinlock.c: New file.
6083         * spinlock.h (acquire): Don't reschedule using __sched_yield, use
6084         new function __pthread_acquire to prevent deadlocks with thread
6085         with different priorities.
6086         Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
6088 1998-03-16  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6090         * manager.c (__pthread_manager): Reduce first argument to select
6091         to include just the needed file descriptor.
6093 1998-03-17 00:06  Ulrich Drepper  <drepper@cygnus.com>
6095         * manager.c: Fix last patch which caused core dumps.
6097         * pthread.c: Correctly handle missing SIGRTMIN.
6099 1998-03-15  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6101         * libpthread.map: Add __libc_internal_tsd_get and
6102         __libc_internal_tsd_set.  Add missing cancelable functions. Export
6103         libc internal versions of the cancelable functions.
6105 1998-03-13 16:51  Ulrich Drepper  <drepper@cygnus.com>
6107         * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
6109 1998-03-13 00:46  Ulrich Drepper  <drepper@cygnus.com>
6111         * attr.c: Implement pthread_attr_[gs]etguardsize,
6112         pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
6113         Change pthread_attr_init to have two interfaces.
6114         * internals.h (struct _pthread_descr_struct): Add new fields for
6115         above functions.
6116         * libpthread.map: Add names in GLIBC_2.1 section.
6117         * manager.c (pthread_handle_create): Implement guardsize and
6118         user stack.
6119         (pthread_free): Likewise.
6120         * pthread.c (pthread_create): Add new interface for changed
6121         pthread_attr_t.
6122         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
6123         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
6124         PTHREAD_STACK_MIN.
6126 1998-03-11 00:42  Wolfram Gloger  <wmglo@dent.med.uni-muenchen.de>
6128         * manager.c: Enable resetting of the thread scheduling policy
6129         to SCHED_OTHER when the parent thread has a different one.
6131 1998-02-01 13:51  Ulrich Drepper  <drepper@cygnus.com>
6133         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6134         _POSIX_ASYNCHRONOUS_IO.
6136         * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
6137         mutexes.
6138         * mutex.c: Implement new mutex types.
6140         * internals.h: Include <signal.h>.
6142         * libpthread.map: Add __erno_location and __h_errno_location.
6144         * errno.c: Return pointer to variable actually in use.  This might
6145         not be the one in the thread structure.
6146         * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
6147         and p_h_errnop.
6148         * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
6149         of manager thread structure.
6150         (pthread_handle_create): Set p_errnop and p_h_errnop members for new
6151         thread.
6152         * pthread.c: Adapt initializer for thread structures.
6153         (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
6154         (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
6155         current thread to global variables.
6157 1998-01-31 17:27  Ulrich Drepper  <drepper@cygnus.com>
6159         * rwlock.c: New file.
6160         * Makefile (libpthread-routines): Add rwlock.
6161         * sysdeps/pthread/pthread.h: Define data structures and declare
6162         functions.
6163         * libpthread.map: Add new functions.
6165 1997-12-18 13:50  Philip Blundell  <pb@nexus.co.uk>
6167         * sysdeps/arm/pt-machine.h: New file; add ARM support.
6168         * sysdeps/arm/Implies: likewise.
6169         * README: Document it.
6171 1997-12-13  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6173         * signals.c: Remove unneeded initializer for sigwaited, saving a
6174         warning.
6176 1997-04-11 01:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6178         * semaphore.c (sem_init): Set sem_spinlock only if available.
6180 1997-12-04 01:48  Ulrich Drepper  <drepper@cygnus.com>
6182         * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
6183         * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
6185         * Makefile: Update from LinuxThreads 0.7.
6186         * internals.h. Likewise.
6187         * manager.c: Likewise.
6188         * mutex.c: Likewise.
6189         * pthread.c: Likewise.
6190         * signals.c: Likewise.
6191         * specific.c: Likewise.
6192         * Examples/ex3.c: Likewise.
6194 1997-11-20 18:13  Ulrich Drepper  <drepper@cygnus.com>
6196         * pthread.c (__pthread_reset_main_thread): Close pipe only if still
6197         open.
6199 1997-10-29 05:38  Ulrich Drepper  <drepper@cygnus.com>
6201         * wrapsyscall.c: Add socket functions which are also cancelation
6202         points.
6204 1997-10-19 21:40  Wolfram Gloger  <wg@wolfram.dent.med.uni-muenchen.de>
6206         * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
6207         New functions for fast thread specific data within libc.
6209         * internals.h: Add new array p_libc_specific to struct
6210         _pthread_descr_struct.
6212         * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
6214 1997-10-13 05:39  Ulrich Drepper  <drepper@cygnus.com>
6216         * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
6217         Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
6219 1997-08-29 03:05  Ulrich Drepper  <drepper@cygnus.com>
6221         * internals.h (struct _pthread_descr_struct): Add definitions for
6222         two-level specific key handling.
6223         * manager.c (pthread_handle_create): Initialize specific memory array.
6224         * specific.c: Implement two-level key handling.
6225         * weaks.c: Don't provide dummy key handling.
6226         * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
6227         Add definition of __libc_key_t.
6228         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
6229         as 1024.
6230         Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
6231         PTHREAD_DESTRUCTOR_ITERATIONS.
6233         * manager.c (pthread_handle_create): Compare mmap result with
6234         MAP_FAILED.
6236         * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
6237         * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
6239 1997-08-22 19:04  Richard Henderson  <rth@cygnus.com>
6241         sysdeps/sparc -> sysdeps/sparc/sparc32
6242         sysdeps/sparc64 -> sysdeps/sparc/sparc64
6244         * internals.h: Change definition of THREAD_SELF to be an expression,
6245         not a statement that did a return.
6246         * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
6247         * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
6248         Follow Solaris and use a "system reserved" register (%g6) to hold
6249         the thread descriptor.
6250         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
6252 1997-08-03 00:09  Ulrich Drepper  <drepper@cygnus.com>
6254         * mutex.c: Correct pthread_once.  Patch by Xavier Leroy.
6255         * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
6256         * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
6258         * semaphore.c: Include spinlock.h only when needed.
6260         * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
6261         keys for entries not in use.
6263         * weaks.c: Implement key handling functions for real.
6265 1997-06-29  01:04  Richard Henderson  <richard@gnu.ai.mit.edu>
6267         Initial sparc64-linux support:
6268         * sysdeps/sparc64/Implies: New file.
6269         * sysdeps/sparc64/pt-machine.h: Likewise.
6271 1997-06-29 00:48  Ulrich Drepper  <drepper@cygnus.com>
6273         * semaphore.c: Include spinlock.h at correct place.
6274         Patch by HJ Lu.
6276 1997-06-13 10:06  Richard Henderson  <rth@tamu.edu>
6278         The Great Bit File Move:
6279         * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
6280         * sysdeps/powerpc/semaphorebits.h: Likewise.
6281         * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
6282         * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
6283         * sysdeps/pthread/libc-lock.h: -> bits/
6284         * sysdeps/pthread/stdio-lock.h: Likewise.
6285         * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
6286         * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
6287         * semaphore.h: Likewise.
6288         * sysdeps/pthread/pthread.h: Likewise.
6290         * lockfile.c: <foo.h> -> <bits/foo.h>.
6291         * semaphore.h: Likewise.
6293         * Makefile: (headers): foo.h -> bits/foo.h.
6294         * sysdeps/pthread/Makefile: Likewise.
6296 1997-04-11 01:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6298         * semaphore.c (sem_init): Set sem_spinlock only if available.
6300         * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
6301         asm constraints.
6303 1997-04-09 03:00  Ulrich Drepper  <drepper@cygnus.com>
6305         Update from LinuxThreads 0.6.
6307         * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
6308         and __sched_get_priority_min instead of names without `__'.
6310         * manager.c: Rewrite large parts to implement opaque pthread_t.
6312         * cancel.c: Adapt for opaque pthread_t type.
6313         * condvar.c: Likewise.
6314         * errno.c: Likewise.
6315         * join.c: Likewise.
6316         * mutex.c: Likewise.
6317         * pthread.c: Likewise.
6318         * signals.c: Likewise.
6319         * specific.c: Likewise.
6320         * restart.h: Likewise.
6321         * queue.h: Likewise.
6322         * Examples/ex3.c: Likewise.
6323         * Examples/ex4.c: Likewise.
6324         * sysdeps/pthread/pthread.h: Likewise.
6326         * pthread.c: Accumulate time for all threads in thread manager.
6328         * semaphore.c: Implement fallback implementation for architectures
6329         sometimes missing compare-exchange operations.
6331         * cancel.c (pthread_cancel): Validate handle argument.
6332         * join.c (pthread_join): Likewise.
6333         (pthread_detach): Likewise.
6334         * signals.c (pthread_kill): Likewise.
6336         * spinlock.h (acquire): Use __sched_yield not sched_yield.
6338         * queue.h (enqueue): Enqueue thread according to priority.
6340         * internals.c (struct pthread_start_args): New struct for passing
6341         args to cloning function.
6342         (struct _pthread): Rename to _pthread_descr_struct and adapt for
6343         opaque pthread_t.
6345         * Examples/Makefile (clean): Pass -f option to rm.
6347         * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
6348         and define TEST_FOR_COMPARE_AND_SWAP.
6349         * sysdeps/i386/i486/pt-machine.h: Removed.
6351         * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
6352         to 1024.
6354 1997-04-04 16:38  Ulrich Drepper  <drepper@cygnus.com>
6356         * restart.h (suspend): Clear p_signal before suspending.
6357         (suspend_with_cancellation): Likewise.
6358         Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
6360         * weaks.c: Make __pthread_key_create return 1.
6361         * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
6362         __libc_getspecific, __libc_setspecific, and __libc_key_t.
6363         * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
6364         using libio.
6366 1997-03-19 15:13  Miguel de Icaza  <miguel@nuclecu.unam.mx>
6368         * sysdeps/sparc/pt-machine (RELEASE): Fix.
6370 1997-03-01 07:55  Geoff Keating  <geoffk@ozemail.com.au>
6372         * sysdeps/powerpc/Implies: Added.
6373         * sysdeps/powerpc/pt-machine.h: Added.
6374         * sysdeps/powerpc/semaphorebits.h: Added.
6376 1997-01-22 01:22  Ulrich Drepper  <drepper@cygnus.com>
6378         * pthread.c (__pthread_initial_thread): Correct
6379         initializer.
6380         (__pthread_manager_thread): Likewise.
6381         Reported by Andreas Jaeger.
6383 1997-01-18 22:15  Richard Henderson  <rth@tamu.edu>
6385         Since sigset_t no longer fits in a register, we can't pass in the
6386         thread's initial mask so easily.  Take this opportunity to simplify
6387         the clone implementation by only accepting a single void* argument.
6389         * manager.c (__pthread_manager): Put thread vitals in the thread
6390         struct instead of as arguments through clone.
6391         (pthread_start_thread): Look for them there.
6392         * internals.h (struct _pthread): Add p_initial_fn,
6393         p_initial_fn_arg, p_initial_mask.  Fix __pthread_manager proto.
6394         * pthread.c (pthread_initialize_manager): Revise clone invocation.