Update.
[glibc.git] / linuxthreads / ChangeLog
blob3ac18f64a1722103cb313c09594f10a3178a8275
1 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
3         * Versions: Remove exports for pthread_set*id_np functions.
4         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
5         for now.
6         * Makefile: Don't build pthread_set*id code for now.
8 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
10         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
11         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
12         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
13         and pthread_setresuid_np.
14         * pthread_setgid_np.c: New file.
15         * pthread_setuid_np.c: New file.
16         * pthread_setegid_np.c: New file.
17         * pthread_seteuid_np.c: New file.
18         * pthread_setregid_np.c: New file.
19         * pthread_setreuid_np.c: New file.
20         * pthread_setresgid_np.c: New file.
21         * pthread_setresuid_np.c: New file.
22         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
23         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
24         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
25         and pthread_setresuid_np.
26         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
27         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
28         pthread_setregid, and pthread_setresgid.
30 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
32         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
33         for __USE_XOPEN2K.
34         * sysdeps/pthread/bits/pthreadtypes.h: Define rwlock types also
35         for __USE_XOPEN2K.  [BZ #320]
37 2004-09-04  Jakub Jelinek  <jakub@redhat.com>
39         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
41 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
43         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
44         the initialization function might throw.
46 2004-08-30  Roland McGrath  <roland@frob.com>
48         * Makefile (libpthread-abi-frozen): New variable.
50 2004-08-26  Roland McGrath  <roland@redhat.com>
52         * configure.in: New file.  If nptl add-on is also selected, barf if
53         explicit and elide ourselves if implicit.
54         * configure: Now generated.
56 2004-08-25  Richard Sandiford  <rsandifo@redhat.com>
58         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h (CENABLE, CDISABLE,
59         __local_multiple_threads): Fix definitions for IS_IN_librt.
60         * sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h: Likewise.
62 2004-08-22  Andreas Schwab  <schwab@suse.de>
64         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO) [IS_IN_librt]:
65         Save gp around CENABLE/CDISABLE calls.
67 2004-08-15  Roland McGrath  <roland@frob.com>
69         * pthread_atfork.c: Update copyright terms including special exception
70         for these trivial files, which are statically linked into executables
71         that use dynamic linking for the significant library code.
73 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
75         * libc-tsd.c: Move resolv.h include before the #if.
76         (__res_maybe_init): New function.  Add libc_hidden_def.
78 2004-08-02  Ulrich Drepper  <drepper@redhat.com>
80         * linuxthreads.texi (Cleanup Handlers): Fix typo.
81         Reported by Bjoern Engelmann <bjengelmann@gmx.de>.
83 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
85         [BZ #284]
86         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
87         instead of clockid_t.
89 2004-07-21  Roland McGrath  <roland@redhat.com>
91         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
93 2004-07-02  Roland McGrath  <roland@redhat.com>
95         * configure: Don't exit.
97 2004-07-20  Alexandre Oliva  <aoliva@redhat.com>
99         * sysdeps/mips/pt-machine.h: Use standard names for ABI macros,
100         include sgidefs.h.
101         * sysdeps/mips/atomicity.h: Likewise.
103 2004-07-19  Alexandre Oliva  <aoliva@redhat.com>
105         * sysdeps/unix/sysv/linux/mips/Makefile (CFLAGS-pt-initfini.s):
106         Remove redundant override that missed -g0.
108 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
110         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
111         (__local_multiple_threads): Define for librt.
112         (SINGLE_THREAD_P): Likewise.
114 2004-07-07  Jakub Jelinek  <jakub@redhat.com>
116         * sysdeps/pthread/getcpuclockid.c (pthread_getcpuclockid): Allow
117         using other thread's clock.
118         * ptclock_gettime.c (__pthread_clock_gettime): Likewise.
119         * ptclock_settime.c (__pthread_clock_settime): Likewise.
120         * internals.h (__pthread_clock_gettime, __pthread_clock_settime):
121         Remove prototypes.
122         Reported by Bernd Schmidt <bernds@redhat.com>.
123         * Makefile (librt-tests): Add tst-clock1.
124         * tst-clock1.c: New test.
126         * sysdeps/x86_64/Versions: New file.
127         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
128         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
130 2004-04-16  Andreas Schwab  <schwab@suse.de>
132         * sysdeps/ia64/tls.h (INIT_SYSINFO): Cast dl_sysinfo to void*.
134 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
136         * sysdeps/s390/pspinlock.c (__pthread_spin_lock,
137         __pthread_spin_trylock): Use constraint "m" instead of "0" for
138         futex.
139         * sysdeps/ia64/pt-machine.h (__compare_and_swap,
140         __compare_and_swap_with_release_semantic, testandset): Use
141         constraint "m" instead of "0" for futex.
143 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
145         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Fix
146         branch offset for a PLT entry.
147         (CDISABLE): Likewise.
149 2004-05-31  Andreas Jaeger  <aj@suse.de>
151         * sysdeps/unix/sysv/linux/mips/Makefile (CFLAGS-pt-initfini.s):
152         Set to -fno-unit-at-a-time.
153         Patch by Dan Kegel <dank@kegel.com>.
155 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
157         * tst-stack1.c: Don't include mcheck.h.
158         (do_test): Make sure user defined stacks aren't reused,
159         don't free them at the end.  [BZ #110]
161 2004-05-02  Jakub Jelinek  <jakub@redhat.com>
163         * manager.c: Include not-cancel.h.
164         (__pthread_manager): Use read_not_cancel instead of __libc_read.
165         (pthread_start_thread, __pthread_manager_sighandler): Use
166         write_not_cancel instead of __libc_write.
167         (pthread_reap_children): Use waitpid_not_cancel instead of
168         __libc_waitpid.
169         * pthread.c: Include not-cancel.h.
170         (__pthread_initialize_minimal, __pthread_create_2_1,
171         pthread_onexit_process, __pthread_message): Use
172         write_not_cancel instead of __libc_write.
173         (__pthread_initialize_manager): Likewise.  Use close_not_cancel
174         instead of __libc_close.
175         (__pthread_reset_main_thread): Use close_not_cancel instead of
176         __libc_close.
177         * join.c: Include not-cancel.h.
178         (__pthread_do_exit, pthread_join, pthread_detach): Use
179         write_not_cancel instead of __libc_write.
180         * semaphore.c: Include not-cancel.h.
181         (__new_sem_post): Use write_not_cancel instead of __libc_write.
182         * specific.c: Include not-cancel.h.
183         (pthread_key_delete): Use write_not_cancel instead of __libc_write.
185 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
187         * Versions (libc): Add __on_exit and __libc_sigaction.
189 2004-04-28  Jakub Jelinek  <jakub@redhat.com>
191         * semaphore.c (sem_timedwait): Return -1 and set errno instead of
192         returning error number [BZ #133].  Patch by <rmhaddad@yahoo.com>.
194 2004-04-22  SUGIOKA Toshinobu  <sugioka@itonet.co.jp>
196         * sysdeps/unix/sysv/linux/sh/vfork.S: Fix wrong function pointer
197         reference in PIC case.
199 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
201         * oldsemaphore.c (SEM_VALUE_MAX): Remove.
203 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
205         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Define
206         for librt.  Save the return value to a safe register.
207         (CDISABLE): Define for librt.  Set the function argument correctly.
209 2004-04-18  Jakub Jelinek  <jakub@redhat.com>
211         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
212         (PSEUDO_CANCEL): Define.
213         (PSEUDO): Use it.
214         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
215         CDISABLE): For librt, append @PLT.
217 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
219         * sysdeps/x86_64/tls.h [!__ASSEMBLER__]: Include tcb-offsets.h.
221         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
222         return it_value { 0, 0 }.
223         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
224         like SIGEV_SIGNAL.
225         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
226         assertion for SIGEV_NONE.
227         (thread_attr_compare): Compare all attributes, not just a partial
228         subset.
230         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
232 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
234         * semaphore.h (SEM_VALUE_MAX): Just use a plain number.
236 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
238         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix last patch.
240 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
242         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
244 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
246         * sysdeps/unix/sysv/linux/mq_notify.c: New file.
248         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE): Define
249         for librt.
250         (CDISABLE): Likewise.
252 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
254         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
255         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
256         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
257         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
258         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
259         Define.
260         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
261         (_POSIX_MESSAGE_PASSING): Define.
263 2004-04-10  Andreas Jaeger  <aj@suse.de>
265         * sysdeps/x86_64/pt-machine.h: Add used attribute to stack_pointer
266         to avoid warnings with GCC 3.5.
268 2004-04-09  Steven Munroe  <sjmunroe@us.ibm.com>
270         * sysdeps/powerpc/tls.h (TLS_INIT_TP): Eliminate lvalue cast from
271         __thread_self assignment.
272         (THREAD_DTV): Replace __thread_register with __thread_self.
273         (INIT_THREAD_SELF): Eliminate lvalue cast from __thread_self
274         assignment.
276 2004-04-08  Alexandre Oliva  <aoliva@redhat.com>
278         * signals.c (pthread_sigmask): Don't ever block or mask
279         __pthread_sig_debug.
281 2004-03-11  Steven Munroe  <sjmunroe@us.ibm.com>
283         * sysdeps/powerpc/tls.h: Remove __powerpc64__ conditional.
285 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
287         * sysdeps/ia64/pt-machine.h (BUSY_WAIT_NOP): Define.
288         * sysdeps/x86_64/pt-machine.h (BUSY_WAIT_NOP): Likewise.
290 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
292         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add HOST_NAME_MAX.
293         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
294         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
295         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
297 2004-03-08  Andreas Jaeger  <aj@suse.de>
299         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT_KERNEL_CHECK):
300         dl_osversion is readonly.
302 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
304         * sysdeps/i386/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
305         _rtlf_global_ro.
306         * sysdeps/ia64/tls.h (INIT_SYSINFO): Likewise.
308 2004-02-20  Steven Munroe  <sjmunroe@us.ibm.com>
310         * sysdeps/unix/sysv/linux/powerpc/ptlongjmp.c [SHARED]: Code only
311         valid for SHARED case.  Correct spelling of __vmx_longjmp.
313         * sysdeps/powerpc/pspinlock.c: Move from here.
314         * sysdeps/powerpc/powerpc32/pspinlock.c: To here.
315         * sysdeps/powerpc/powerpc64/pspinlock.c: New file.
316         * sysdeps/powerpc/powerpc64/pt-machine.h: Define __compare_and_swap32
317         and __compare_and_swap32_with_release_semantics.
319 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
321         * Makefile (generated): Remove tst-stack1.mtrace and tst-stack1-mem.
322         (tests): Remove $(objpfx)tst-stack1-mem.
323         (tst-stack1-ENV): Remove.
324         ($(objpfx)tst-stack1-mem): Remove.
326         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
327         (__syscall_error_handler2): Call CDISABLE.
328         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
329         (__syscall_error_handler2): Call CDISABLE.
331         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
333 2004-02-10  Steven Munroe  <sjmunroe@us.ibm.com>
335         * Makefile (libpthread-routines): Add ptcleanup.
336         * ptlongjmp.c: Removed.
337         * ptcleanup.c: Copied __pthread_cleanup_upto to here. New file.
338         * sysdeps/pthread/ptlongjmp.c: Copied longjmp to here. New file.
339         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
340         Version longjmp, siglongjmp for GLIBC_2.3.4.
341         * sysdeps/unix/sysv/linux/powerpc/ptlongjmp.c: New File.
343 2004-01-22  Andreas Jaeger  <aj@suse.de>
345         * spinlock.c (__pthread_lock): Fix contraint to avoid warning.
346         (__pthread_release): Likewise.
348 2004-01-16  Richard Henderson  <rth@redhat.com>
350         * attr.c: Include ldsodefs.h.
351         (pthread_getattr_np): Don't declare __libc_stack_end.
353 2004-01-09  Steven Munroe  <sjmunroe@us.ibm.com>
355         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
356         [!HAVE_TLS_SUPPORT]: Define SINGLE_THREAD_P using static
357         __lib*_multiple_threads.
358         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
359         [!HAVE_TLS_SUPPORT]: Likewise.
361 2004-01-13  Roland McGrath  <roland@redhat.com>
363         * sysdeps/powerpc/tcb-offsets.sym: Put -- separator line before any
364         conditionals.
366 2004-01-10  Andreas Jaeger  <aj@suse.de>
368         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Add cfi directives.
370 2004-01-01  Andreas Jaeger  <aj@suse.de>
372         * Makefile (generated): Add missing files.
374 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
376         * attr.c (pthread_getattr_np): Make sure stack info returned for
377         main thread does not overlap with any other VMA.
378         Patch by Jakub Jelinek.
380 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
382         * sysdeps/ia64/tls.h: Include dl-sysdep.h.
383         (INIT_SYSINFO): Define.
384         (TLS_INIT_TP): Use it.
386 2003-12-28  Carlos O'Donell  <carlos@baldric.uwo.ca>
388         * attr.c (pthread_getattr_np): Add _STACK_GROWS_UP case.
390 2003-12-26  Jakub Jelinek  <jakub@redhat.com>
392         * sysdeps/pthread/pthread.h (pthread_setcancelstate,
393         pthread_setcanceltype, pthread_cancel, pthread_testcancel): Remove
394         __THROW.
395         * semaphore.h (sem_wait, sem_timedwait): Likewise.
397 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
399         * manager.c (pthread_free): Call _dl_deallocate_tls even for
400         p_userstack threads.
401         * pthread.c (__pthread_initialize_manager): Call _dl_deallocate_tls
402         on error.
403         (pthread_onexit_process): Update comment.
404         * Makefile (tests): Add tst-stack1.  Depend on $(objpfx)tst-stack1-mem.
405         (generated): Add tst-stack1.mtrace and tst-stack1-mem.
406         (tst-stack1-ENV): Set.
407         ($(objpfx)tst-stack1-mem): New.
408         * tst-stack1.c: New test.
410 2003-12-16  Steven Munroe  <sjmunroe@us.ibm.com>
412         * sysdeps/powerpc/tcb-offsets.sym [!__powerpc64__]: Remove
413         conditional so MULTIPLE_THREADS_OFFSET is generated for both.
414         * sysdeps/powerpc/tls.h [!__powerpc64__]: Remove conditional
415         so TLS_MULTIPLE_THREADS_IN_TCB is generated for both.
416         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h:
417         Include tls.h.
419 2003-12-04  Steven Munroe  <sjmunroe@us.ibm.com>
421         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
422         (SINGLE_THREAD_P): Test using thread local p_multiple_threads field.
424 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
426         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Update copyright
427         message.  Add include of <stddef.h>.
428         (INIT_NEW_WAY): New macro.
429         (INIT_OLD_WAY): Likewise.
430         (_init): Add unwind directives.  Invoke
431         __pthread_initialize_minimal() via INIT_NEW_WAY or INIT_OLD_WAY,
432         respectively.
433         (_init_EPILOG_BEGINS): Add unwind-directives.  Drop unused .regstk
434         directive.
435         (_fini): Add unwind directives.  Drop unnecessary .align 16
436         directive (bundles are always 16-byte aligned).
437         (_fini_EPILOG_BEGINS): Add unwind-directives.
439 2003-11-19  David Mosberger  <davidm@hpl.hp.com>
441         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
443 2003-12-10  Andreas Jaeger  <aj@suse.de>
444             Ruediger Oertel  <ro@suse.de>
446         * sysdeps/alpha/elf/pt-initfini.c (__asm__): Remove extra .prologue.
448 2003-11-30  Andreas Jaeger  <aj@suse.de>
450         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
451         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
452         Likewise.
454 2003-11-04  Jakub Jelinek  <jakub@redhat.com>
456         * signals.c (__pthread_sigaction): Set __sighandler[sig].old before
457         __libc_sigaction if it has been one of the special values before.
459 2003-10-06  Carlos O'Donell <carlos@baldric.uwo.ca>
461         * pthread.c (__pthread_self_stack): _STACK_GROWS_UP case added.
462         (__pthread_find_self): Likewise.
463         * manager.c (thread_segment): _STACK_GROWS_UP case added.
465 2003-10-10  Carlos O'Donell  <carlos@baldric.uwo.ca>
467         * linuxthreads/sysdeps/unix/sysv/linux/hppa/malloc-machine.h: New file.
469 2003-10-10  Carlos O'Donell  <carlos@baldric.uwo.ca>
471         * sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h: New file.
473 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
475         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
476         changes.
477         (SAVE_OLDTYPE_0): Fix a typo.
479 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
481         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
482         correct offset.
484 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
486         * Makefile (tests): Add tst-cancel8.
487         * tst-cancel8.c: New test.
489 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
491         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
492         restoring of the old cancellation type.
494 2003-09-10  Chris Demetriou  <cgd@broadcom.com>
496         * sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h: New file.
498 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
500         * sysdeps/pthread/malloc-machine.h [!__libc_maybe_call2] (mutex_init,
501         mutex_lock, mutex_trylock, mutex_unlock): Remove.
503 2003-09-27  Wolfram Gloger  <wg@malloc.de>
505         * sysdeps/pthread/malloc-machine.h: New file.
507 2003-09-18  H.J. Lu  <hongjiu.lu@intel.com>
509         * attr.c (__pthread_attr_init_2_1): Double __guardsize size
510         if NEED_SEPARATE_REGISTER_STACK is defined.
512 2003-09-22  Philip Blundell  <philb@gnu.org>
514         * forward.c: Add _pthread_cleanup_push, _pthread_cleanup_pop.
515         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
516         Likewise.
517         * pthread.c (__pthread_elements): Initialise these new elements.
518         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Use
519         __libc_maybe_call.
520         (__libc_cleanup_pop): Likewise.
522 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
524         * attr.c: Include stdlib.h.
526 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
528         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
530         * tst-attr1.c: New test.
531         * Makefile (tests): Add tst-attr1.
533 2003-09-17  Philip Blundell  <philb@gnu.org>
535         * sysdeps/unix/sysv/linux/arm/vfork.S: Branch to fork if
536         libpthread is loaded.  Elide backwards compatibility code when not
537         required.
539 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
541         * descr.h (manager_thread): Rename to...
542         (__pthread_manager_threadp): ... this.
543         * pthread.c (manager_thread): Define to __pthread_manager_threadp.
544         (__pthread_manager_threadp): New variable.
545         * internals.h (__manager_thread): Define to
546         __pthread_manager_threadp if USE_TLS.
548 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
550         * sysdeps/i386/Makefile (CFLAGS-cancel.c, CFLAGS-manager.c,
551         CFLAGS-pthread.c, CFLAGS-sighandler.c): Add
552         -mpreferred-stack-boundary=4.
554 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
556         * attr.c (pthread_getattr_np): Correctly fill in the stack-related
557         values for the initial thread.
559 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
561         * pthread.c (manager_thread): Remove static, add attribute_hidden.
562         (thread_self_stack): Rename to...
563         (__pthread_self_stack): ... this.  Remove static.
564         (pthread_handle_sigcancel): Use check_thread_self ().
565         (pthread_handle_sigrestart): Likewise.
566         * sighandler.c (__pthread_sighandler, __pthread_sighandler_rt):
567         Likewise.
568         * descr.h (manager_thread): Declare.
569         * internals.h (__pthread_self_stack): New prototype.
570         (__manager_thread): Define.
571         (check_thread_self): New function.
573 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
575         * Makefile (CFLAGS-mutex.c): Add $(uses-callbacks).
576         (CFLAGS-sighandler.c): Change $(exceptions) into $(uses-callbacks).
578 2003-09-12  Jakub Jelinek  <jakub@redhat.com>
580         * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: New.
581         (__SSIZE_T_TYPE): Define to __SWORD_TYPE for gcc 2.95.x and
582         __SLONGWORD_TYPE otherwise.
584 2003-09-11  Steven Munroe  <sjmunroe@us.ibm.com>
586         * sysdeps/powerpc/powerpc64/pt-machine.h [MEMORY_BARRIER]: Use lwsync.
587         [READ_MEMORY_BARRIER]: Define.
588         [WRITE_MEMORY_BARRIER]: Define.
590 2003-09-10  Jakub Jelinek  <jakub@redhat.com>
592         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Move
593         ptr___pthread_cond_timedwait to the end of the structure to avoid
594         breaking Wine unnecessarily.
596 2003-09-08  Jakub Jelinek  <jakub@redhat.com>
598         * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: Remove.
600 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
602         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
603         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
604         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
605         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
606         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
607         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
608         * attr.c (__old_pthread_attr_setstacksize,
609         __old_pthread_attr_setstack): New functions.
610         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
611         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
612         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
613         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
614         * tststack.c: Include limits.h and sys/param.h.
615         (main): Set size to MAX (70 * 1024, PTHREAD_STACK_MIN).
617         * barrier.c (__pthread_barrierattr_getpshared): Always
618         return PTHREAD_PROCESS_PRIVATE.
619         (pthread_barrierattr_setpshared): Return EINVAL if pshared
620         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
622 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
624         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
625         (DL_SYSINFO_IMPLEMENTATION): Add CFI and make sure the code ends
626         up in .text.
628         * barrier.c (pthread_barrierattr_setpshared): We don't handle
629         inter-process barriers.
631 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
633         * Makefile (tests): Add tst-tls1.
634         (module-names): Add tst-tls1mod{,a,b,c,d,e,f}.
635         ($(objpfx)tst-tls1mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
636         ($(objpfx)tst-tls1): New.
637         ($(objpfx)tst-tls2.out): Likewise.
638         (tests): Depend on $(objpfx)tst-tls2.out.
639         * tst-tls1.c: New test.
640         * tst-tls1.h: New.
641         * tst-tls1mod.c: New.
642         * tst-tls1moda.c: New.
643         * tst-tls1modb.c: New.
644         * tst-tls1modc.c: New.
645         * tst-tls1modd.c: New.
646         * tst-tls1mode.c: New.
647         * tst-tls1modf.c: New.
648         * tst-tls2.sh: New test.
650         * internals.h (__pthread_cond_timedwait): New prototype.
651         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
652         ptr___pthread_cond_timedwait.
653         * pthread.c (__pthread_functions): Initialize them.
654         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
655         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
656         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
657         pthread_cond_timedwait@@GLIBC_2.3.2.
659 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
661         * sysdeps/pthread/pthread.h: Don't mark pthread_exit,
662         pthread_join, pthread_cond_wait, and pthread_cond_timedwait with
663         __THROW to match NPTL.
665 2003-08-13  Ulrich Drepper  <drepper@redhat.com>
667         * sysdeps/pthread/Makefile [subdir=rt] (CPPFLAGS): Add
668         -DBROKEN_THREAD_SIGNALS.
670 2003-08-11  Steven Munroe  <sjmunroe@us.ibm.com>
672         * manager.c (pthread_start_thread) [!(USE_TLS && HAVE___THREAD)]:
673         Correct spelling of per thread resolver state.
675 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
677         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
678         (__rtld_lock_default_lock_recursive,
679         __rtld_lock_default_unlock_recursive): Define.
680         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
681         __rtld_lock_unlock_recursive): Define using
682         GL(_dl_rtld_*lock_recursive).
683         * pthread.c (pthread_initialize): Initialize _dl_rtld_lock_recursive
684         and _dl_rtld_unlock_recursive.  Lock GL(_dl_load_lock) the same
685         number of times as GL(_dl_load_lock) using non-mt implementation was
686         nested.
688 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
690         * sysdeps/pthread/bits/typesizes.h (__SSIZE_T_TYPE): Define.
691         * sysdeps/unix/sysv/linux/alpha/bits/typesizes.h (__SSIZE_T_TYPE):
692         Likewise.
693         * sysdeps/unix/sysv/linux/sparc/bits/typesizes.h (__SSIZE_T_TYPE):
694         Likewise.
695         * sysdeps/unix/sysv/linux/s390/bits/typesizes.h: New file.
697         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
698         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
699         PTHREAD_STACK_MIN in comments.
701         * sysdeps/alpha/pt-machine.h (PT_EI): Add
702         __attribute__((always_inline)).
703         * sysdeps/arm/pt-machine.h (PT_EI): Likewise.
704         * sysdeps/cris/pt-machine.h (PT_EI): Likewise.
705         * sysdeps/hppa/pt-machine.h (PT_EI): Likewise.
706         * sysdeps/i386/i686/pt-machine.h (PT_EI): Likewise.
707         * sysdeps/i386/pt-machine.h (PT_EI): Likewise.
708         * sysdeps/ia64/pt-machine.h (PT_EI): Likewise.
709         * sysdeps/m68k/pt-machine.h (PT_EI): Likewise.
710         * sysdeps/mips/pt-machine.h (PT_EI): Likewise.
711         * sysdeps/powerpc/powerpc32/pt-machine.h (PT_EI): Likewise.
712         * sysdeps/powerpc/powerpc64/pt-machine.h (PT_EI): Likewise.
713         * sysdeps/s390/s390-32/pt-machine.h (PT_EI): Likewise.
714         * sysdeps/s390/s390-64/pt-machine.h (PT_EI): Likewise.
715         * sysdeps/sh/pt-machine.h (PT_EI): Likewise.
716         * sysdeps/sparc/sparc32/pt-machine.h (PT_EI): Likewise.
717         * sysdeps/sparc/sparc64/pt-machine.h (PT_EI): Likewise.
718         * sysdeps/x86_64/pt-machine.h (PT_EI): Likewise.
719         * spinlock.h (__pthread_set_own_extricate_if): Likewise.
720         * sysdeps/ia64/tls.h (TLS_INIT_TP): Cast tcbp to __typeof
721         (__thread_self).
722         * Examples/ex13.c (main): Change res type to void * to avoid
723         warnings.
724         * tst-cancel.c (cleanup, inner, tf1, tf2, tf3): Comment out.
726 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
728         * pthread.c (init_one_static_tls, __pthread_init_static_tls): New
729         functions.
730         (pthread_initialize): Initialize GL(dl_init_static_tls).
732 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
734         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
735         before __timer_dealloc.
736         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
737         Don't call list_unlink.
739 2003-07-29  Roland McGrath  <roland@redhat.com>
741         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
743 2003-07-25  Roland McGrath  <roland@redhat.com>
745         * manager.c (pthread_start_thread): Fix typo in last change.
747 2003-07-14  Guido Guenther  <agx@sigxcpu.org>
749         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: Add IS_IN_librt,
750         use L() for local labels.
752 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
754         * descr.h (struct _pthread_descr_struct): Provide p_res member
755         even if USE_TLS && HAVE___THREAD.
756         * sysdeps/pthread/res-state.c (__res_state): Return __resp
757         if USE___THREAD.
758         * manager.c: Include resolv.h.
759         (pthread_start_thread): Initialize __resp.
760         * libc-tls-loc.c (__res_state): Return __resp.
761         * Makefile (tests): Add tst-_res1.
762         (modules-names, extra-objs, test-extras, test-modules): Add support
763         for test modules.
764         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
765         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
766         -lpthread.
767         * tst-_res1.c: New test.
768         * tst-_res1mod1.c: New test.
769         * tst-_res1mod2.c: New test.
771 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
773         * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_push and
774         __libc_cleanup_pop.
776         * tst-cancel-wrappers.sh: lseek and llseek are no cancellation points.
778 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
780         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Fix typo
781         in test for compilation in libc.
783 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
785         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
786         different symbol for the cancellation syscall wrapper and
787         non-cancellation syscall wrapper.
788         (PSEUDO_END): Define.
790 2003-07-05  Richard Henderson  <rth@redhat.com>
792         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
794 2003-06-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
796         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Support cancellation
797         in librt.
799 2003-06-21  Andreas Schwab  <schwab@suse.de>
801         * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Support cancellation
802         in librt.
804 2003-06-20  Richard Henderson  <rth@redhat.com>
806         * sysdeps/unix/sysv/linux/alpha/Makefile (libpthread-routines):
807         Remove ptw-osf_sigprocmask.
809 2003-06-18  Jakub Jelinek  <jakub@redhat.com>
811         * internals.h (__librt_multiple_threads, __librt_enable_asynccancel,
812         __librt_disable_asynccancel): Declare.
813         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET, LIBC_CANCEL_HANDLED): Define
814         for IS_IN_librt.
815         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Support cancellation
816         in librt.
817         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
818         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
819         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
820         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
821         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
822         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
823         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
824         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
825         * sysdeps/x86_64/tcb-offsets.sym: New file.
826         * sysdeps/x86_64/Makefile: New file.
827         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
828         * Versions (libc): Export __librt_enable_asynccancel,
829         __librt_disable_asynccancel and __librt_multiple_threads as
830         GLIBC_PRIVATE.
831         * libc-cancellation.c (__librt_multiple_threads,
832         __librt_enable_asynccancel, __librt_disable_asynccancel): New aliases.
834 2003-06-12  Steven Munroe  <sjmunroe@us.ibm.com>
836         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
837         (SINGLE_THREAD_P): Replace @ got notation with @toc.
839 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
841         * sysdeps/powerpc/pspinlock.c (__pthread_spin_init): Fix
842         initializer [PR libc/5052].
844 2003-06-09  Andreas Schwab  <schwab@suse.de>
846         * Makefile: Move inclusion of ../Rules down after extra-objs is
847         fully known.
849 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
851         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: New sequences for
852         5+ arg syscalls only needed for PIC.
853         Patch by Ralph Siemsen <ralphs@netwinder.org>.
855 2003-06-05  Richard Henderson  <rth@redhat.com>
857         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use
858         and require CFI assembler directives.
859         * sysdeps/unix/sysv/linux/alpha/vfork.S: Likewise.
861 2003-05-30  Andreas Jaeger  <aj@suse.de>
863         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h
864         (SAVESTK_0): Add CFI directives.
865         (SAVESTK_3): Likewise.
866         (SAVESTK_5): Likewise.
867         (RESTSTK_0): Likewise.
868         (RESTSTK_3): Likewise.
869         (RESTSTK_5): Likewise.
871 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
873         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Add \n to error
874         messages.
876 2003-05-04  Roland McGrath  <roland@redhat.com>
878         * Makefile ($(objpfx)../libc.so): New target.
880 2003-04-26  Ulrich Drepper  <drepper@redhat.com>
882         * pthread.c (__pthread_initialize_manager): Remove one last
883         p_multiple_threads call.
885 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
887         * pthread.c (__pthread_initialize_manager): Subtract
888         TLS_PRE_TCB_SIZE bytes from tcbp to get to descr.
889         * manager.c (pthread_handle_create): Subtract or add TLS_PRE_TCB_SIZE
890         instead of sizeof (pthread_descr).
891         (pthread_free): Add TLS_PRE_TCB_SIZE instead of sizeof (pthread_descr).
892         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define to 0.
893         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
894         pthread_descr.
895         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
896         to TLS_TCB_ALIGN.
897         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
898         tcbp.
899         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
900         unneccessarily.
901         (NO_TLS_OFFSET): Define.
903 2003-04-22  Roland McGrath  <roland@redhat.com>
905         * Makeconfig (shared-thread-library): Reverse link order to work
906         around linker bug.
908 2003-04-20  Ulrich Drepper  <drepper@redhat.com>
910         * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Make sure the
911         compiler knows we use the ldt_entry variable and that the syscall
912         modifies the memory.
914         * internals.h: Split pthread_functions definition into...
915         * sysdeps/pthread/pthread-functions.h: ...new file.
917         * sysdeps/i386/useldt.h: Include <sysdep.h>.
919 2003-04-13  Jakub Jelinek  <jakub@redhat.com>
921         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Rename macros to
922         match changes in NPTL sysdep-cancel.h.
924 2003-04-11  Roland McGrath  <roland@redhat.com>
926         * Makefile (multidir): Don't set the variable here with $(shell ...).
927         ($(objpfx)multidir.mk): New target, generated makefile; include that.
928         (generated): Append it.
930 2003-04-10  Jakub Jelinek  <jakub@redhat.com>
932         * Makefile (multidir, crti-objs, crtn-objs): New variables.
933         (generated-dirs): Add pathname component of multidir.
934         (omit-deps, extra-objs): Include $(multidir)/crt? as well.
935         ($(objpfx)libpthread.so): Depend on $(multidir)/crt?.o as well.
936         ($(objpfx)$(multidir), $(objpfx)$(multidir)/crti.o,
937         $(objpfx)$(multidir)/crtn.o): New.
938         * sysdeps/unix/sysv/linux/sparc/Makefile: Removed.
939         * sysdeps/unix/sysv/linux/x86_64/Makefile (LDFLAGS-pthread.so,
940         before-compile, generated): Don't generate and use specs.
941         ($(objpfx)specs): Remove.
943 2003-04-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
945         * sysdeps/s390/pspinlock.c (__pthread_spin_unlock): Fix asm contraints.
947 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
949         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h (PSEUDO): Add
950         missing ; after ENTRY use [PR libc/4997].
952 2003-04-03  Jakub Jelinek  <jakub@redhat.com>
954         * pthread.c (pthread_initialize): Unblock __pthread_sig_cancel
955         in case the parent blocked it.
957 2003-04-02  Jakub Jelinek  <jakub@redhat.com>
959         * Makefile (libpthread-routines): Add pthread_atfork.
960         (libpthread-static-only-routines): Add pthread_atfork.
962 2003-04-01  Jakub Jelinek  <jakub@redhat.com>
964         * pthread.c (__pthread_wait_for_restart_signal): Use
965         __pthread_sigsuspend instead of sigsuspend.
966         * internals.h (__pthread_sigsuspend): New prototype.
967         * Makefile (libpthread-routines): Add pt-sigsuspend.
968         (tests): Add tst-cancel7.
969         * sysdeps/unix/sysv/linux/pt-sigsuspend.c: New file.
970         * sysdeps/unix/sysv/linux/alpha/pt-sigsuspend.S: New file.
971         * sysdeps/unix/sysv/linux/ia64/pt-sigsuspend.c: New file.
972         * sysdeps/unix/sysv/linux/s390/s390-64/pt-sigsuspend.c: New file.
973         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-sigsuspend.c: New file.
974         * sysdeps/unix/sysv/linux/x86_64/pt-sigsuspend.c: New file.
975         * tst-cancel7.c: New test.
977 2003-03-31  Alexandre Oliva  <aoliva@redhat.com>
979         * alloca_cutoff.c: Include internals.h.
980         * sysdeps/pthread/errno-loc.c: Include linuxthreads/internals.h.
981         * sysdeps/pthread/herrno-loc.c: Likewise.
982         * sysdeps/pthread/res-state.c: Likewise.
984 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
986         * sysdeps/pthread/bits/typesizes.h: New file.
987         * sysdeps/unix/sysv/linux/alpha/bits/typesizes.h: New file.
988         * sysdeps/unix/sysv/linux/sparc/bits/typesizes.h: New file.
990 2003-03-24  Daniel Jacobowitz  <drow@mvista.com>
992         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
993         (DOARGS_5, DOARGS_6, DOARGS_7): Rewritten.
995 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
997         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
999 2003-03-21  Daniel Jacobowitz  <drow@mvista.com>
1001         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
1002         (SINGLE_THREAD_P_PIC): Use "reg" instead of "lr".
1004 2003-03-21  Jakub Jelinek  <jakub@redhat.com>
1006         * sysdeps/i386/tls.h [__ASSUME_SET_THREAD_AREA_SYSCALL]
1007         (TLS_SETUP_GS_SEGMENT): Fix a typo.
1009 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
1011         * sysdeps/pthread/Makefile: Fix cut&paste error.
1013 2003-03-18  Roland McGrath  <roland@redhat.com>
1015         * Versions (libpthread: GLIBC_2.2): Remove
1016         pthread_barrierattr_getpshared, never really existed.
1017         (libpthread: GLIBC_2.0): Move __pthread_initialize to ...
1018         (libpthread: GLIBC_PRIVATE): ... here.
1020 2003-03-14  Jakub Jelinek  <jakub@redhat.com>
1022         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
1023         * sysdeps/unix/sysv/linux/sparc/Makefile ($(objpfx)specs): Use full
1024         path for crt[in].o.
1026 2003-03-14  Alexandre Oliva  <aoliva@redhat.com>
1028         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't .set
1029         mips2 on new abi.
1030         * sysdeps/mips/pt-machine.h (__compare_and_swap): Likewise.
1031         Handle 64-bit longs on n64.
1033 2003-03-07  Jakub Jelinek  <jakub@redhat.com>
1035         * sysdeps/ia64/pspinlock.c (__pthread_spin_lock,
1036         __pthread_spin_trylock): Rewritten.
1038 2003-03-06  Ulrich Drepper  <drepper@redhat.com>
1040         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
1041         recent kernels.
1043 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
1045         * sysdeps/pthread/timer_create.c (timer_create): Return correct
1046         error for CPU clocks.
1048         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1049         _POSIX_MONOTONIC_CLOCK.
1050         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1052 2003-03-01  Roland McGrath  <roland@redhat.com>
1054         * sysdeps/powerpc/powerpc64/pt-machine.h
1055         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
1056         New macros.
1057         * sysdeps/powerpc/tls.h: Don't define those here.
1059         * sysdeps/powerpc/tls.h [! USE_TLS && !__powerpc64__]: Define
1060         tcbhead_t with multiple_threads member.
1061         [USE_TLS] (tcbhead_t): Define minimal one-word version.
1062         [USE_TLS && !__powerpc64__] (TLS_MULTIPLE_THREADS_IN_TCB): Define.
1063         * sysdeps/powerpc/tcb-offsets.sym [USE_TLS]: Use tls.h macros to
1064         derive thread register offset of p_multiple_threads member.
1066         * descr.h (struct _pthread_descr_struct) [!USE_TLS || !TLS_DTV_AT_TP]:
1067         Conditionalize p_header member on this.
1068         [TLS_MULTIPLE_THREADS_IN_TCB]: Add p_multiple_threads alternatively.
1069         * sysdeps/ia64/tls.h [USE_TLS] (TLS_MULTIPLE_THREADS_IN_TCB): Define.
1070         * sysdeps/sh/tls.h: Likewise.
1071         * sysdeps/ia64/tcb-offsets.sym [USE_TLS]: Use p_multiple_threads.
1072         * sysdeps/sh/tcb-offsets.sym: Likewise.
1073         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
1074         (SINGLE_THREAD_P): Likewise.
1075         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1076         (SINGLE_THREAD_P): Likewise.
1077         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1078         (SINGLE_THREAD_P): Likewise.
1079         * pthread.c (__pthread_initialize_manager): Likewise.
1080         * manager.c (pthread_handle_create): Likewise.
1082         * sysdeps/powerpc/tls.h [HAVE_TLS_SUPPORT]: Define USE_TLS and all
1083         related macros.
1085 2003-01-31  Steven Munroe  <sjmunroe@us.ibm.com>
1087         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S [SHARED]:
1088         Conditionalize .toc section magic on this.
1090 2003-02-21  Roland McGrath  <roland@redhat.com>
1092         * cancel.c (__pthread_perform_cleanup): Call __libc_thread_freeres
1093         instead of __rpc_thread_destroy.
1095 2003-02-21  Jakub Jelinek  <jakub@redhat.com>
1097         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Call
1098         __fork instead of branching to it if BROKEN_SPARC_WDISP22.
1099         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
1100         Fix typo.
1101         * sysdeps/unix/sysv/linux/sparc/Makefile (specs): Add ./ prefix
1102         to crti.o and crtn.o.
1103         * sysdeps/unix/sysv/linux/x86_64/Makefile (specs): Likewise.
1105 2003-02-21  Roland McGrath  <roland@redhat.com>
1107         * Makefile (install-lib-ldscripts): New variable.
1109 2003-02-20  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
1111         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: Avoid short
1112         interprocedure branches.
1114 2003-02-19  Ulrich Drepper  <drepper@redhat.com>
1116         * specific.c (pthread_key_delete_helper): Don't use GETMEM, we
1117         need the target thread's lock.
1119 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
1121         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
1122         and LOGIN_NAME_MAX.
1124 2003-02-17  Kevin B. Hendricks  <kevin.hendricks@sympatico.ca>
1125             Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
1127         * sysdeps/powerpc/Makefile: Handle tcb-offsets.sym.
1128         * sysdeps/powerpc/tcb-offsets.sym: New file.
1129         * sysdeps/powerpc/tls.h: New file.
1130         * sysdeps/powerpc/powerpc32/pt-machine.h (FLOATING_STACKS): Define.
1131         (ARCH_STACK_MAX_SIZE): Define.
1132         (THREAD_SELF): Define.
1133         (INIT_THREAD_SELF): Define.
1134         (THREAD_GETMEM): Define.
1135         (THREAD_GETMEM_NC): Define.
1136         (THREAD_SETMEM): Define.
1137         (THREAD_SETMEM_NC): Define.
1138         (__thread_self): Declare.
1139         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Adjust
1140         for thread register.
1142 2003-02-14  Steven Munroe  <sjmunroe@us.ibm.com>
1144         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
1145         Check pthread_create existance, not __pthread_fork.
1147 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
1149         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
1151 2003-02-10  Jakub Jelinek  <jakub@redhat.com>
1153         * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Check
1154         pthread_create existance, not __pthread_fork.
1155         * sysdeps/unix/sysv/linux/i386/vfork.S (__vfork): Likewise.
1156         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Likewise.
1157         * sysdeps/unix/sysv/linux/m68k/vfork.S (__vfork): Likewise.
1158         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
1159         Likewise.
1160         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
1161         * sysdeps/unix/sysv/linux/x86_64/vfork.S (__vfork): Likewise.
1162         * sysdeps/unix/sysv/linux/sh/vfork.S (__vfork): Likewise.
1163         Add .weak pthread_create.
1164         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Fix a typo.
1165         Check pthread_create existance, not __pthread_fork.
1166         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
1167         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Branch to
1168         __fork whenever libpthread.so is loaded.
1170 2003-02-09  Andreas Jaeger  <aj@suse.de>
1172         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h:
1173         Rework: %r9 is destroyed by functions so don't use it as
1174         temporary, align stack correctly, fix parameter for CDISABLE.
1176 2003-02-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1178         * sysdeps/sh/Makefile: New file.
1179         * sysdeps/sh/tcb-offsets.sym: Likewise.
1180         * sysdeps/sh/tls.h: Don't include sysdep.h. Move include
1181         of linuxthreads/descr.h after the definition of THREAD_SELF.
1182         (tcbhead_t): Use IA64 type tcbhead_t for TLS case.
1183         (TLS_TCB_SIZE): Set size of tcbhead_t.
1184         (TLS_PRE_TCB_SIZE): Define.
1185         (INSTALL_NEW_DTV): Set dtv of tcbhead_t structure instead of
1186         a member of thread structure.
1187         (THREAD_DTV): Likewise.
1188         (TLS_INIT_TP_EXPENSIVE): Remove.
1189         (TLS_INIT_TP): Set gbr register only.
1190         (THREAD_SELF): New.
1191         (INIT_THREAD_SELF): Likewise.
1192         (NONTLS_INIT_TP): New.
1193         * sysdeps/unix/sysv/linux/sh/pt-initfini.c (__fpscr_values):
1194         Remove.
1195         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Add
1196         SYSCALL_INST_PAD macro after DO_CALL.
1197         (SINGLE_THREAD_P): Fix non-PIC and TLS case so to read the
1198         correct variable.
1199         * sysdeps/unix/sysv/linux/sh/vfork.S (__vfork): Branch to __fork
1200         whenever libpthread.so is loaded.
1202 2003-02-08  Andreas Schwab  <schwab@suse.de>
1204         * sysdeps/unix/sysv/linux/m68k/vfork.S: Branch to __fork whenever
1205         libpthread.so is loaded.
1207 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
1209         * sysdeps/unix/sysv/linux/i386/vfork.S: Make sure
1210         __ASSUME_VFORK_SYSCALL is not defined if the kernel headers have
1211         no __NR_vfork definition.
1213 2003-02-07  Jakub Jelinek  <jakub@redhat.com>
1215         * tst-popen2.c: New test.
1216         * Makefile (tests): Add tst-popen2.
1217         * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Branch to __fork
1218         whenever libpthread.so is loaded.
1219         * sysdeps/unix/sysv/linux/i386/vfork.S (__vfork): Likewise.
1220         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Likewise.
1221         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
1222         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
1223         Likewise.
1224         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
1225         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
1226         * sysdeps/unix/sysv/linux/x86_64/vfork.S (__vfork): Likewise.
1228 2003-02-05  Ulrich Drepper  <drepper@redhat.com>
1230         * sysdeps/pthread/bits/libc-lock.h (__libc_once): Set control
1231         variable for non-libpthread case to the same value the
1232         pthread_once function would use.
1234 2003-02-03  Jakub Jelinek  <jakub@redhat.com>
1236         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): If
1237         BROKEN_SPARC_WDISP22, handle SHARED the same way as non-SHARED.
1239 2003-02-04  Andreas Jaeger  <aj@suse.de>
1241         * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Do not use
1242         multi-line strings.
1244 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
1246         * sysdeps/s390/tls.h (TLS_INIT_TP): Return NULL, not 0.
1248 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
1250         * sysdeps/alpha/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1251         THREAD_SETMEM, THREAD_SETMEM_NC): Avoid warnings about unused self
1252         variable.
1253         * sysdeps/ia64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1254         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1255         * sysdeps/s390/s390-32/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1256         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1257         * sysdeps/s390/s390-64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1258         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1259         * sysdeps/sh/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1260         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1261         * sysdeps/sparc/sparc32/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1262         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1263         * sysdeps/sparc/sparc64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1264         THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
1266 2003-01-27  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1268         * sysdeps/s390/s390-32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
1269         Define TLS versions.
1270         * sysdeps/s390/s390-64/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
1271         Likewise.
1272         * sysdeps/s390/tls.h [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE,
1273         TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE, TLS_TCB_ALIGN, TLS_TCB_AT_TP,
1274         INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_DTV):
1275         Define.
1276         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Use
1277         branch with 32 bit offset.
1278         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: Likewise.
1280 2003-01-24  Jakub Jelinek  <jakub@redhat.com>
1282         * sysdeps/sparc/sparc32/pt-machine.h (__thread_self): Change to %g7,
1283         as required by TLS ABI.
1284         * sysdeps/sparc/sparc64/pt-machine.h (__thread_self): Likewise.
1285         * sysdeps/sparc/tls.h [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE,
1286         TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE, TLS_TCB_ALIGN, TLS_TCB_AT_TP,
1287         INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_DTV):
1288         Define.
1289         [HAVE_TLS_SUPPORT]: Include descr.h and sysdep.h.
1290         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Use %g7
1291         instead of %g6 for thread pointer.
1292         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
1293         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1294         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
1296 2003-01-25  Guido Guenther  <agx@sigxcpu.org>
1298         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
1299         * sysdeps/unix/sysv/linux/mips/Makefile: New file.
1301 2003-01-20  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1303         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: Avoid non pc relative
1304         reference to __fork.
1306 2003-01-17  Richard Henderson  <rth@redhat.com>
1308         * sysdeps/alpha/tls.h (tcbhead_t): Clarify second member.
1309         (TLS_TCB_SIZE, TLS_TCB_ALIGN): Set for tcbhead_t.
1310         (TLS_PRE_TCB_SIZE): New.
1311         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Update for
1312         new ia64-style thread pointer layout.
1313         (THREAD_GETMEM, THREAD_GETMEM_NC): New.
1314         (THREAD_SETMEM, THREAD_SETMEM_NC): New.
1315         * sysdeps/unix/sysv/linux/alpha/vfork.S: Don't tail-call to __fork
1316         if !SHARED.
1318 2003-01-15  Jakub Jelinek  <jakub@redhat.com>
1320         * sysdeps/ia64/tls.h (tcbhead_t): Use the TLS ABI required layout
1321         if USE_TLS only.
1322         (NONTLS_INIT_TP): Revert last change.
1323         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define to
1324         offsetof (tcbhead_t, multiple_threads) if USE_TLS not defined.
1326 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
1328         * pthread.c (_pthread_initialize_minimal): Use
1329         GL(dl_tls_dtv_slotinfo_list) != NULL to check whether TLS has
1330         been already initialized.
1332 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
1334         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize head->sysinfo even
1335         if not SHARED.
1337 2003-01-15  Jakub Jelinek  <jakub@redhat.com>
1339         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init,
1340         __libc_lock_init_recursive): Initialize fields directly.
1342 2003-01-15  Jakub Jelinek  <jakub@redhat.com>
1344         * sysdeps/unix/sysv/linux/alpha/vfork.S (__vfork): Allow
1345         __fork to be far away from __vfork ifndef SHARED.
1346         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
1347         Likewise.
1348         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
1349         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
1350         Add a missing instruction.
1351         * sysdeps/unix/sysv/linux/arm/vfork.S (__vfork): Conditionally
1352         branch to __fork even if __NR_vfork is not defined.
1354 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
1356         * tst-cancel-wrappers.sh: Allow .__*_asynccancel functions names
1357         as well.
1359 2003-01-14  Steven Munroe  <sjmunroe@us.ibm.com>
1361         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
1363 2003-01-14  Jakub Jelinek  <jakub@redhat.com>
1365         * sysdeps/unix/sysv/linux/ia64/vfork.S (JUMPTARGET): Remove.
1367 2003-01-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1369         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Avoid
1370         unterminated string literals.
1371         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Likewise.
1373 2003-01-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1375         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
1376         (PSEUDO): Code reordering.  Move CENABLE and CDISABLE literals from
1377         PSEUDO_END to PSEUDO.
1378         (PSEUDO_END): Remove.
1379         (SINGLE_THREAD_P): Save an instruction.
1380         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add missing
1381         parameter to SINGLE_THREAD_P call.
1382         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
1383         Code reordering.
1385 2003-01-10  Andreas Schwab  <schwab@suse.de>
1387         * sysdeps/unix/sysv/linux/m68k/vfork.S: New file.
1389 2003-01-10  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1391         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Setup
1392         backchain in pseudo_cancel.  Minor code improvements.
1393         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
1394         Likewise.
1396 2003-01-10  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1398         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
1399         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
1401 2002-01-12  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
1403         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
1405 2002-01-09  Richard Henderson  <rth@redhat.com>
1407         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Assume only
1408         ret follows pseudo, and thus avoid branch-to-branch in cancel
1409         case.  Use SYSCALL_ERROR_LABEL.
1411 2003-01-11  Philip Blundell  <philb@gnu.org>
1413         * sysdeps/unix/sysv/linux/arm/vfork.S: New file.
1414         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h (PSEUDO_RET):
1415         Correctly unstack lr.
1416         (UNDOARGS_5): Fix ordering of pushes and pops.
1417         (SINGLE_THREAD_P_PIC): New.
1418         (SINGLE_THREAD_P_INT): New.
1419         (SINGLE_THREAD_P): Implement in terms of above.  Restore lr if it
1420         was stacked.
1421         (PSEUDO): Use SINGLE_THREAD_P_INT.
1423 2003-01-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1425         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
1427 2003-01-11  Jakub Jelinek  <jakub@redhat.com>
1429         * sysdeps/ia64/tls.h (tcbhead_t): Change into dtv_t *, void *.
1430         [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN,
1431         TLS_TCB_SIZE, TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, TLS_DTV_AT_TP,
1432         INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_SELF,
1433         INIT_THREAD_SELF): Define.
1434         [HAVE_TLS_SUPPORT]: Include descr.h.
1435         (NONTLS_INIT_TP): Point __thread_self at the end of dummy
1436         struct _pthread_descr_struct.
1437         * sysdeps/ia64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
1438         THREAD_SETMEM, THREAD_SETMEM_NC): Define using THREAD_SELF,
1439         not __thread_self.
1440         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Adjust
1441         computation.
1442         * pthread.c (__pthread_initialize_minimal): Use tcbp, not self
1443         for TCB pointer.
1444         (__pthread_initialize_manager): Rename tcb to mgr.
1445         Use tcbp for TCB pointer, if TLS_DTV_AT_TP set mgr to sizeof (struct
1446         _pthread_descr) below tcbp, otherwise to tcbp.
1447         * manager.c (pthread_handle_create): If TLS_DTV_AT_TP, set
1448         new_thread to be below _dl_allocate_tls ().  Adjust new_thread back
1449         before freeing.  Fix clone arguments if report_events and USE_TLS.
1450         (pthread_free): Adjust th back before freeing.
1452 2003-01-10  Steven Munroe  <sjmunroe@us.ibm.com>
1454         * sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile: Moved to ...
1455         * sysdeps/unix/sysv/linux/powerpc/Makefile: ...here.
1456         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New File.
1458 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
1460         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
1461         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
1462         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1463         [__ASSEMBLER__] (SINGLE_THREAD_P): Remove trailing ;;.
1464         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
1465         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
1466         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
1467         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
1468         * tst-popen.c: New test.
1469         * Makefile (tests): Add tst-popen.
1471 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
1473         * sysdeps/unix/sysv/linux/sigwait.c (do_sigwait): Add
1474         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
1476 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
1478         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use
1479         PSEUDO_PREPARE_ARGS.  Fix branch condition after SINGLE_THREAD_P.
1481 2003-01-06  Philip Blundell  <philb@gnu.org>
1483         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: New file.
1485 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
1487         * internals.h (LIBC_CANCEL_HANDLED): Define.
1488         * sysdeps/unix/sysv/linux/sigwait.c (LIBC_CANCEL_HANDLED): Add.
1489         * signals.c (LIBC_CANCEL_HANDLED): Add.
1490         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
1491         * tst-cancel-wrappers.sh: Remove all exceptions.
1493         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
1495 2003-01-05  Andreas Schwab  <schwab@suse.de>
1497         * sysdeps/m68k/Makefile: New file, use -fPIC for nonshared
1498         objects.
1500         * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h (SINGLE_THREAD_P):
1501         Fix for PIC.
1502         (CENABLE): Likewise.
1503         (CDISABLE): Likewise.
1505 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
1507         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
1508         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
1510         * Makefile (libc.so-no-z-defs): Define to yes.
1512 2003-01-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1514         * sysdeps/sh/tls.h: Include dl-sysdep.h and stdint.h.
1515         (tcbhead_t): Add multiple_threads member.
1516         (TLS_INIT_TP_EXPENSIVE): Define.
1517         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Don't use multi-line
1518         strings.  Remove unused code.
1519         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
1521 2003-01-04  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
1523         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
1524         * sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile: New file.
1526 2003-01-04  Jakub Jelinek  <jakub@redhat.com>
1528         * internals.h (LIBC_THREAD_GETMEM, LIBC_THREAD_SETMEM): Define
1529         even if NOT_IN_libc is defined.
1531 2003-01-05  Jakub Jelinek  <jakub@redhat.com>
1533         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
1534         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
1535         * sysdeps/s390/Makefile: New file.
1536         * sysdeps/s390/tcb-offsets.sym: New file.
1537         * sysdeps/s390/tls.h: New file.
1539 2003-01-03  Richard Henderson  <rth@redhat.com>
1541         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
1543 2003-01-03  Andreas Jaeger  <aj@suse.de>
1545         * sysdeps/pthread/bits/libc-tsd.h: Declare weak_extern functions.
1547 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
1549         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
1551 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
1553         * tst-cancel-wrappers.sh: Exclude sigwait.c as well, it does not have
1554         cancellation tests.
1556 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
1558         * internals.h (struct pthread_functions): Rename
1559         ptr_pthread_cond_* fields to ptr___pthread_cond_*.
1560         * pthread.c (pthread_functions): Adjust.
1561         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
1562         pthread_cond_*@GLIBC_2.0 compatibility symbols.
1563         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
1564         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
1565         and pthread_cond_wait.
1567         * sysdeps/pthread/bits/pthreadtypes.h (__pthread_cond_align_t): New
1568         type.
1569         (pthread_cond_t): Add __align member, shorten __padding.
1570         * sysdeps/pthread/pthread.h (PHTREAD_COND_INITIALIZER): Initialize
1571         __padding and __align too.
1573         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call2): Add
1574         __builtin_expect.
1575         * sysdeps/pthread/sigaction.c: New file.
1576         * sysdeps/unix/sysv/linux/raise.c: New file.
1577         * sysdeps/unix/sysv/linux/sigwait.c: New file.
1578         * sysdeps/unix/sysv/linux/fork.c (__pthread_fork): Protect
1579         weak_extern with #ifndef SHARED.
1580         * sysdeps/unix/sysv/linux/jmp-unwind.c (__pthread_cleanup_upto):
1581         Likewise.
1582         * signals.c (__sigaction): Renamed to...
1583         (__pthread_sigaction): ... this.
1584         (__sigaction): New strong alias, #ifdef SHARED only.
1585         (sigaction): Protect with #ifdef SHARED.
1586         (sigwait): Renamed to...
1587         (__pthread_sigwait): ... this.
1588         (sigwait): New strong alias, #ifdef SHARED only.
1589         (raise): Renamed to...
1590         (__pthread_raise): ... this.
1591         (raise): New strong alias, #ifdef SHARED only.
1592         * internals.h (__pthread_sigaction, __pthread_sigwait,
1593         __pthread_raise): New prototypes.
1594         (struct pthread_functions): Add ptr_pthread_sigaction,
1595         ptr_pthread_sigwait, ptr_pthread_raise.
1596         * pthread.c (pthread_functions): Renamed to...
1597         (__pthread_functions): ... this.  No longer static, no longer
1598         SHARED only.  Initialize ptr_pthread_sigaction, ptr_pthread_sigwait
1599         and ptr_pthread_raise.
1600         [SHARED] (ptr_pthread_functions): Change to &__pthread_functions.
1601         * libc-cancellation.c (__pthread_thread_self): Remove weak_extern.
1602         * ptfork.c (__fork, __vfork): Protect with #ifdef SHARED.
1603         * ptlongjmp.c (siglongjmp, longjmp): Protect with #ifdef SHARED.
1605         * Makefile (tests, tests-static): Add tst-cancel-static.
1606         * tst-cancel-static.c: New test.
1608 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
1610         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
1612 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
1614         * sysdeps/pthread/bits/pthreadtypes.h (pthread_cond_t): Add padding.
1615         * condvar.c: Add symbol versioning.  The compatibility versions
1616         are the same as the change in the interface does not effect this
1617         implementation.
1618         * Versions [libpthread]: Add definitions for new pthread_cond_*
1619         interfaces for version GLIBC_2.3.2.
1621 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
1623         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
1624         __register_atfork.
1625         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
1626         for __register_atfork.
1628 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
1630         * sysdeps/i386/i686/pt-machine.h: Use __ASSEMBLER__ instead of
1631         ASSEMBLER test macro.
1632         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Likewise.
1633         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1634         * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Likewise.
1635         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1636         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1637         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1639         * sysdeps/pthread/errno-loc.c (__errno_location): Add
1640         libc_hidden_def.
1641         * sysdeps/pthread/herrno-loc.c (__h_errno_location): Likewise.
1642         * sysdeps/pthread/res-state.c (__res_state): Likewise.
1643         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
1644         __libc_current_sigrtmax): Likewise.
1645         * Versions [libc] (GLIBC_PRIVATE): Remove __libc_internal_tsd_get,
1646         __libc_internal_tsd_set, __libc_internal_tsd_address,
1647         __libc_alloca_cutoff.
1648         [libpthread] (GLIBC_PRIVATE): Remove __libc_internal_tsd_get,
1649         __libc_internal_tsd_set, __libc_internal_tsd_address.
1651         * sysdeps/pthread/list.h: Remove assert.h include.
1652         * sysdeps/unix/sysv/linux/fork.c: Include <fork.h>, not "fork.h".
1654         * sysdeps/pthread/list.h: New file.
1655         * sysdeps/unix/sysv/linux/jmp-unwind.c: New file.
1656         * sysdeps/unix/sysv/linux/fork.c: New file.
1657         * sysdeps/unix/sysv/linux/fork.h: New file.
1658         * sysdeps/unix/sysv/linux/ia64/fork.h: New file.
1659         * sysdeps/unix/sysv/linux/sparc/fork.h: New file.
1660         * sysdeps/unix/sysv/linux/register-atfork.c: New file.
1661         * sysdeps/unix/sysv/linux/unregister-atfork.c: New file.
1662         * sysdeps/unix/sysv/linux/Makefile: New file.
1663         * sysdeps/unix/sysv/linux/Versions: New file.
1664         * ptlongjmp.c (pthread_cleanup_upto): Rename to...
1665         (__pthread_cleanup_upto): ...this. Add targetframe argument,
1666         use it instead of currentframe.  No longer static.
1667         (siglongjmp, longjmp): Remove pthread_cleanup_upto calls.
1668         * internals.h (__pthread_cleanup_upto, __pthread_fork): New prototypes.
1669         (struct pthread_functions): Add ptr_pthread_fork,
1670         ptr_pthread_cleanup_upto.
1671         * pthread.c (pthread_functions): Initialize ptr_pthread_fork and
1672         ptr_pthread_cleanup_upto.
1673         * ptfork.c: Include fork.h.
1674         (struct handler_list, struct handler_list_block): Remove.
1675         (pthread_atfork_lock, pthread_atfork_prepare, pthread_atfork_parent,
1676         pthread_atfork_child): Remove.
1677         (pthread_insert_list, __pthread_atfork, pthread_call_handlers): Remove.
1678         (__pthread_fork): New function.
1679         (__fork, __vfork): Call __libc_fork.
1680         * Makefile (libpthread-routines): Add old_pthread_atfork.
1681         (libpthread-nonshared): Add pthread_atfork.
1682         (others): Depend on $(objpfx)libpthread_nonshared.a.
1683         ($(objpfx)libpthread_nonshared.a): New rule.
1684         (install): Depend on $(inst_libdir)/libpthread.so.
1685         ($(inst_libdir)/libpthread.so, $(inst_libdir)/libpthread_nonshared.a):
1686         New rules.
1687         (tests): Depend on libpthread_nonshared.a too.
1688         * old_pthread_atfork.c: New file.
1689         * pthread_atfork.c: New file.
1690         * Makeconfig (shared-thread-library): Include libpthread_nonshared.a
1691         too.
1693 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
1695         * forward.c: Make all functions available by default again.  It
1696         caused too much trouble.
1697         * internals.h (struct pthread_functions): Rename ptr_pthread_exit
1698         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
1699         ptr___pthread_attr_init_2_*.
1700         * pthread.c (pthread_functions): Adjust.
1702 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
1704         * libc_pthread_init.c (__libc_pthread_init): Remove
1705         MULTIPLE_THREADS_OFFSET check.
1706         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
1707         (SYSINFO_OFFSET): Remove.
1708         * sysdeps/i386/Makefile [csu] (gen-as-const-headers): Add
1709         tcb-offsets.sym.
1710         * sysdeps/i386/tcb-offsets.sym: New file.
1711         * sysdeps/pthread/tcb-offsets.h: New file.
1712         * sysdeps/sparc/sparc32/tls.h: Removed.
1713         * sysdeps/sparc/sparc64/tls.h: Move...
1714         * sysdeps/sparc/tls.h: ...here.  Include tcb-offsets.h in assembler.
1715         * sysdeps/sparc/Makefile: New file.
1716         * sysdeps/sparc/tcb-offsets.sym: New file.
1717         * sysdeps/ia64/tls.h: Include tcb-offsets.h in assembler.
1718         * sysdeps/ia64/Makefile: New file.
1719         * sysdeps/ia64/tcb-offsets.sym: New file.
1720         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
1721         (MULTIPLE_THREADS_OFFSET): Remove.
1722         Replace defined MULTIPLE_THREADS_OFFSET
1723         with defined FLOATING_STACKS && USE___THREAD.
1724         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1725         (MULTIPLE_THREADS_OFFSET): Remove.
1726         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1727         (MULTIPLE_THREADS_OFFSET): Remove.
1728         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1729         (MULTIPLE_THREADS_OFFSET): Remove.
1730         * pthread.c (__pthread_initialize_manager): Remove
1731         MULTIPLE_THREADS_OFFSET cbeck.
1733         * tst-cancel-wrappers.sh: Add line continuations.
1735 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
1737         * sysdeps/pthread/bits/libc-tsd.h: Include linuxthreads/descr.h
1738         and bits/libc-lock.h.
1739         (__libc_internal_tsd_get, __libc_internal_tsd_set,
1740         __libc_internal_tsd_address): Remove.
1741         (__pthread_internal_tsd_address, __pthread_internal_tsd_get,
1742         __pthread_internal_tsd_set): New weak_externs.
1743         (__libc_tsd_address, __libc_tsd_get, __libc_tsd_set): Define
1744         using __libc_maybe_call2.
1745         (__libc_tsd_key_t): Move to ...
1746         * descr.h (__libc_tsd_key_t): ...here.
1747         Remove bits/libc-tsd.h include.
1748         * sysdeps/pthread/errno-loc.c: New file.
1749         * sysdeps/pthread/herrno-loc.c: New file.
1750         * sysdeps/pthread/res-state.c: New file.
1751         * libc-cancellation.c (THREAD_GETMEM, THREAD_SETMEM): Remove.
1752         (__libc_enable_asynccancel, __libc_disable_asynccancel): Use
1753         thread_self unconditionally.  Use LIBC_THREAD_[SG]ETMEM instead
1754         of THREAD_[SG]ETMEM.
1755         * specific.c (libc_internal_tsd_set): Renamed to...
1756         __pthread_internal_tsd_set.  Remove static.
1757         (libc_internal_tsd_get): Renamed to...
1758         __pthread_internal_tsd_get.  Remove static.
1759         (libc_internal_tsd_address): Renamed to...
1760         __pthread_internal_tsd_address.  Remove static.
1761         (__libc_internal_tsd_set, __libc_internal_tsd_get,
1762         __libc_internal_tsd_address, __libc_alloca_cutoff): Remove.
1763         * internals.h [!NOT_IN_libc] (LIBC_THREAD_GETMEM, LIBC_THREAD_SETMEM):
1764         Define.
1765         (__pthread_internal_tsd_set, __pthread_internal_tsd_get,
1766         __pthread_internal_tsd_address): New prototypes.
1767         (struct pthread_functions): Add
1768         ptr_pthread_internal_tsd_([sg]et|address) fields.
1769         [!NOT_IN_libc && !FLOATING_STACKS] (thread_self): Define.
1770         * pthread.c (pthread_functions) [!USE_TLS && !HAVE___THREAD]:
1771         Initialize ptr_pthread_internal_tsd_([sg]et|address) fields.
1772         * Versions (libpthread): Remove __libc_alloca_cutoff@GLIBC_PRIVATE.
1773         * alloca_cutoff.c: New file.
1774         * no-tsd.c: Removed.
1775         * Makefile (routines): Remove no-tsd.  Add alloca_cutoff.
1776         * pt-system.c (system): Remove cancellation handling.
1777         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
1778         cancellation routines.
1780         * sysdeps/i386/tls.h: Include dl-sysdep.h and stdint.h.
1781         (tcbhead_t): Add sysinfo field.
1782         (SYSINFO_OFFSET, INIT_SYSINFO): Define.
1783         (TLS_INIT_TP): Use INIT_SYSINFO.
1784         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
1785         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
1786         (MULTIPLE_THREADS_OFFSET): Adjust.
1787         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
1788         (MULTIPLE_THREADS_OFFSET): Likewise.
1789         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1790         (MULTIPLE_THREADS_OFFSET): Likewise.
1791         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1792         (MULTIPLE_THREADS_OFFSET): Likewise.
1793         * descr.h: Include stdint.h.
1794         (struct _pthread_descr_struct): Add p_header.data.sysinfo field.
1796 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
1798         * libc_pthread_init.c: Include stdlib.h.
1799         * sysdeps/i386/tls.h (tcbhead_t): Add multiple_threads member.
1800         (TLS_INIT_TP_EXPENSIVE): Define.
1801         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call,
1802         __libc_maybe_call2): In _LIBC check SHARED define.
1803         * sysdeps/ia64/tls.h: New file.
1804         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
1805         * sysdeps/unix/sysv/linux/ia64/Makefile: New file.
1806         * sysdeps/x86_64/tls.h (TLS_INIT_TP_EXPENSIVE): Define.
1807         * sysdeps/sparc/sparc32/tls.h: New file.
1808         * sysdeps/sparc/sparc64/tls.h: New file.
1809         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
1810         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
1811         * Makefile (tests): Add tst-cancel[1-6].
1812         (tests-reverse): Add tst-cancel5.
1813         Link libc.so before libpthread.so for tests-reverse.
1814         * tst-cancel1.c: New file.
1815         * tst-cancel2.c: New file.
1816         * tst-cancel3.c: New file.
1817         * tst-cancel4.c: New file.
1818         * tst-cancel5.c: New file.
1819         * tst-cancel6.c: New file.
1821 2002-12-27  Andreas Schwab  <schwab@suse.de>
1823         * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: New file.
1825 2002-12-22  Roland McGrath  <roland@redhat.com>
1827         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
1829 2002-12-21  Ulrich Drepper  <drepper@redhat.com>
1831         * pthread.c (init_rtsigs): Remove incomplete __builtin_expect.
1832         Reported by Art Hass <ahaas@airmail.net>.
1834 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
1836         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
1837         Use return 0 as 6th argument to FORWARD4.
1839 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
1841         * sysdeps/i386/useldt.h (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Only
1842         define if __ASSUME_LDT_WORKS > 0.
1843         * libc-cancellation.c (THREAD_GETMEM, THREAD_SETMEM): Redefine to
1844         struct member access if !FLOATING_STACKS.
1845         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
1847 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
1849         * internals.h (__pthread_thread_self): New prototype.
1850         (struct pthread_functions): Add ptr_pthread_thread_self field.
1851         * pthread.c (pthread_functions): Initialize ptr_pthread_thread_self.
1852         (__pthread_thread_self): New function.
1853         * libc-cancellation.c (__pthread_thread_self): Add weak_extern.
1854         (__libc_enable_asynccancel, __libc_disable_asynccancel): Don't
1855         use thread_self() directly if not FLOATING_STACKS.
1857 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
1859         * sysdeps/x86_64/pt-machine.h: Guard most of the header
1860         with #ifndef __ASSEMBLER__.
1861         * pthread.c (pthread_functions): Use SHLIB_COMPAT around
1862         pthread_attr_init_2_0 use.
1864 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
1866         * wrapsyscall.c: Removed.
1867         * weaks.c: Removed.
1868         * Makefile (distribute): Add tst-cancel-wrappers.sh.
1869         (routines): Remove weaks.  Add forward,
1870         libc_pthread_init, libc-cancellation.
1871         (shared-only-routines): Remove weaks.  Add forward.
1872         (libpthread-routines): Remove wrapsyscall.
1873         Add ptw-write, ptw-read, ptw-close, ptw-fcntl, ptw-accept,
1874         ptw-connect, ptw-recv, ptw-recvfrom, ptw-recvmsg, ptw-send,
1875         ptw-sendmsg, ptw-sendto, ptw-fsync, ptw-lseek, ptw-lseek64,
1876         ptw-llseek, ptw-msync, ptw-nanosleep, ptw-open, ptw-open64,
1877         ptw-pause, ptw-pread, ptw-pread64, ptw-pwrite, ptw-pwrite64,
1878         ptw-tcdrain, ptw-wait, ptw-waitpid, pt-system, pt-allocrtsig.
1879         (libpthread-shared-only-routines): Add pt-allocrtsig.
1880         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
1881         ($(objpfx)tst-cancel-wrappers.out): New rule.
1882         * sysdeps/pthread/bits/libc-lock.h: Include linuxthreads/internals.h
1883         if in libc.
1884         (__libc_maybe_call): In libpthread.* don't check for existance
1885         of the function.
1886         (__libc_maybe_call2): Define.
1887         (__libc_lock_init, __libc_lock_fini, __libc_lock_lock,
1888         __libc_lock_trylock, __libc_lock_unlock): Use it.
1889         * sysdeps/pthread/flockfile.c: New file.
1890         * sysdeps/pthread/ftrylockfile.c: New file.
1891         * sysdeps/pthread/funlockfile.c: New file.
1892         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
1893         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
1894         * sysdeps/unix/sysv/linux/allocrtsig.c: New file.
1895         * libc-cancellation.c: New file.
1896         * forward.c: New file.
1897         * libc_pthread_init.c: New file.
1898         * pt-system.c: New file.
1899         * pthread.c: Remove locale.h.
1900         (__pthread_manager_thread): Initialize multiple_threads.
1901         (__pthread_multiple_threads): Declare.
1902         (pthread_functions): New variable.
1903         (__pthread_initialize_minimal): Remove __uselocale call.
1904         Call __libc_pthread_init.
1905         (__pthread_initialize_manager): Initialize __pthread_multiple_threads,
1906         initial thread's multiple_threads and __libc_multiple_threads.
1907         Check MULTIPLE_THREADS_OFFSET value. Initialize manager thread's
1908         multiple_threads.
1909         (pthread_setschedparam, pthread_getschedparam): Rename to __
1910         prefixed variants.  Add strong_alias.
1911         (current_rtmin, current_rtmax, __libc_current_sigrtmin,
1912         __libc_current_sigrtmax, __libc_allocate_rtsig): Remove.
1913         (init_rtsigs): Use __libc_current_sigrtmin_private.
1914         (pthread_initialize): Only call init_rtsigs if
1915         !__ASSUME_REALTIME_SIGNALS.
1916         (__pthread_require_wrappers, __pthread_require_lockfile): Remove.
1917         * internals.h (__pthread_attr_destroy, __pthread_attr_setdetachstate,
1918         __pthread_attr_getdetachstate, __pthread_attr_setschedparam,
1919         __pthread_attr_getschedparam, __pthread_attr_setschedpolicy,
1920         __pthread_attr_getschedpolicy, __pthread_attr_setinheritsched,
1921         __pthread_attr_getinheritsched, __pthread_attr_setscope,
1922         __pthread_attr_getscope, __pthread_cond_init,
1923         __pthread_cond_destroy, __pthread_cond_wait,
1924         __pthread_cond_signal, __pthread_cond_broadcast,
1925         __pthread_condattr_init, __pthread_condattr_destroy,
1926         __pthread_equal, __pthread_getschedparam,
1927         __pthread_setschedparam, __pthread_setcancelstate,
1928         __pthread_setcanceltype, __pthread_enable_asynccancel,
1929         __libc_enable_asynccancel, __libc_pthread_init): New prototype.
1930         (__pthread_mutex_init, __pthread_mutex_destroy,
1931         __pthread_mutex_lock, __pthread_mutex_unlock,
1932         __pthread_mutex_trylock): Likewise.
1933         Add hidden_proto.
1934         (struct pthread_functions): New type.
1935         (__libc_pthread_functions): New variable.
1936         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define.
1937         * descr.h (struct _pthread_descr_struct): Add
1938         p_header.data.multiple_threads field.
1939         * manager.c (pthread_handle_create): Initialize multiple_threads.
1940         * cancel.c (__pthread_enable_asynccancel,
1941         __pthread_disable_asynccancel): New functions.
1942         (__pthread_provide_wrappers): Remove.
1943         (pthread_setcancelstate, pthread_setcanceltype): Rename to __
1944         prefixed variants.  Add strong_alias.
1945         * condvar.c (pthread_cond_init, pthread_cond_destroy,
1946         pthread_cond_wait, pthread_cond_signal, pthread_cond_broadcast,
1947         pthread_condattr_init, pthread_condattr_destroy): Likewise.
1948         * join.c (pthread_exit): Likewise.
1949         * attr.c (pthread_attr_destroy, pthread_attr_setdetachstate,
1950         pthread_attr_getdetachstate, pthread_attr_setschedparam,
1951         pthread_attr_getschedparam, pthread_attr_setschedpolicy,
1952         pthread_attr_getschedpolicy, pthread_attr_setinheritsched,
1953         pthread_attr_getinheritsched, pthread_attr_setscope,
1954         pthread_attr_getscope): Likewise.
1955         * mutex.c (__pthread_mutex_init, __pthread_mutex_destroy,
1956         __pthread_mutex_lock, __pthread_mutex_unlock,
1957         __pthread_mutex_trylock): Add hidden_def.
1958         * Versions (libc): Add __libc_pthread_init,
1959         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
1960         __libc_allocate_rtsig_private @@GLIBC_PRIVATE.
1961         * lockfile.c: Remove some USE_IN_LIBIO guards.
1962         (__pthread_provide_lockfile): Remove.
1963         * pt-allocrtsig.c: New file.
1964         * tst-cancel-wrappers.sh: New test.
1966 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
1968         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
1969         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
1970         * wrapsyscall.c: Remove creat, poll, pselect, readv, select,
1971         sigpause, sigsuspend, sigwaitinfo, waitid, and writev wrappers.
1973 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
1975         * wrapsyscall.c (CANCELABLE_SYSCALL): Don't define function as
1976         weak.  There is no reason for that.
1977         (CANCELABLE_SYSCALL_VA): Likewise.
1979 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
1981         * wrapsyscall.c: Add wrappers for creat, poll, pselect, readv, select,
1982         sigpause, __xpg_sigpause, sigsuspend, sigwaitinfo, waitid, and writev.
1983         * Versions: Export creat, poll, pselect, readv, select, sigpause,
1984         __xpg_sigpause, sigsuspend, sigwaitinfo, waitid, and writev from
1985         libpthread in version GLIBC_2.3.2.
1987 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
1989         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
1991 2002-12-05  Roland McGrath  <roland@redhat.com>
1993         * pthread.c (__pthread_initialize_minimal)
1994         [USE_TLS && SHARED && !USE___THREAD]: Initialize TLS and set up the
1995         TCB if the dynamic linker didn't do it at startup.
1997         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
1998         string.
1999         (TLS_DO_SET_THREAD_AREA, TLS_DO_MODIFY_LDT, TLS_SETUP_GS_SEGMENT):
2000         Submacros updated.
2001         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
2002         * sysdeps/alpha/tls.h (TLS_INIT_TP): Likewise (always zero).
2004 2002-12-03  Roland McGrath  <roland@redhat.com>
2006         * pthread.c (pthread_initialize) [SHARED]: Copy dl_error_tsd value
2007         from dynamic linker internal cell to new libc cell.
2009 2002-11-28  Roland McGrath  <roland@redhat.com>
2011         * tst-context.c: #define IS_IN_libpthread around #include <tls.h>
2012         before other headers, so FLOATING_STACKS is not defined wrongly.
2014         * sysdeps/i386/tls.h [!IS_IN_libpthread]: Enable TLS support
2015         even if [! FLOATING_STACKS].
2016         (TLS_DO_MODIFY_LDT_KERNEL_CHECK): New macro.
2017         If not under [__ASSUME_LDT_WORKS > 0], then do a runtime check of
2018         dl_osversion >= 2.3.99 and fatal if not.
2019         (TLS_DO_MODIFY_LDT): Use it.
2021 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
2023         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
2024         require it to 200112L.  Remove _POSIX_POLL and _POSIX_SELECT.
2025         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2027 2002-11-19  Ulrich Drepper  <drepper@redhat.com>
2029         * Versions (libc: GLIBC_2.0): Remove names of functions which are
2030         not defined in libc.
2031         * Makefile (shared-only-routines): Add weaks.
2032         * weaks.c: Remove functions which are not exported from libc.so.
2034 2002-11-14  Roland McGrath  <roland@redhat.com>
2036         * libc-tsd.c: New file.
2037         * Makefile (distribute): Add it.
2038         (libc-link.so): New variable.
2039         ($(objpfx)libpthread.so): Depend on that instead of libc.so file name.
2040         (libc-ok-for-link): New variable.
2041         [$(versioning) = yes]: Include $(common-objpfx)tls.make and define
2042         libc-ok-for-link to $(use-thread).
2043         [$(libc-ok-for-link) = no]
2044         (libc-link.so): Set to $(objpfx)libc.so, not $(common-objpfx)libc.so.
2045         ($(objpfx)libc_pic_lite.a,$(objpfx)libc_pic_lite.os, $(objpfx)libc.so):
2046         New targets.
2047         (generated): Append them.
2048         (extra-objs): Append libc-tsd.os.
2050         * libc-tls-loc.c: New file.
2051         * Makefile (libpthread-routines): Add it.
2053 2002-11-14  Andreas Schwab  <schwab@suse.de>
2055         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Fix unterminated
2056         string.
2058 2002-11-13  Roland McGrath  <roland@redhat.com>
2060         * Examples/ex6.c (main): Improve error reporting.
2062 2002-11-04  Ulrich Drepper  <drepper@redhat.com>
2064         * sysdeps/i386/Makefile: Compile pthread.c and sighandler.c with
2065         -fno-omit-frame-pointer.  Patch by Andreas Steinmetz <ast@domdv.de>.
2067         * sysdeps/i386/useldt.h [PIC] (USETLS_LOAD_EBX): Use correct input
2068         register number.
2069         (DO_SET_THREAD_AREA): Mark asm output specifiers correctly.
2071 2002-10-22  Jakub Jelinek  <jakub@redhat.com>
2073         * manager.c (pthread_start_thread): Call __uselocale even
2074         if [! SHARED].  Patch by Leon Kanter <leon@geon.donetsk.ua>.
2076 2002-10-17  Roland McGrath  <roland@redhat.com>
2078         * Makefile (unload): Don't link in libpthread.so.
2079         ($(objpfx)unload.out): Do depend on it.
2080         * unload.c (main): Improve error reporting.
2082 2002-10-09  Roland McGrath  <roland@redhat.com>
2084         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
2085         Under [__PIC__], call the function via the pointer fetched for
2086         comparison rather than a call by name that uses the PLT.
2087         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
2088         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
2089         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
2090         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
2091         (__libc_key_create, __libc_getspecific, __libc_setspecific)
2092         (__libc_atfork): Use it.
2094         * pthread.c [SHARED] (__libc_dl_error_tsd): New function.
2095         (pthread_initialize) [SHARED]: Set _dl_error_catch_tsd to that.
2096         * Versions (libc: GLIBC_PRIVATE): Add __libc_dl_error_tsd.
2097         (ld: GLIBC_PRIVATE): Set removed.
2099 2002-10-11  Ulrich Drepper  <drepper@redhat.com>
2101         * sysdeps/unix/sysv/linux/execve.c: New file.
2103 2002-10-09  Jakub Jelinek  <jakub@redhat.com>
2105         * no-tsd.c: Include stdlib.h.
2107 2002-10-07  Jakub Jelinek  <jakub@redhat.com>
2109         * sysdeps/unix/sysv/linux/allocalim.h: New file.
2110         * descr.h (struct _pthread_descr_struct): Add p_alloca_cutoff
2111         field.
2112         * manager.c (__pthread_allocate_stack): Add out_stacksize argument.
2113         Pass stack size to caller.
2114         (pthread_handle_create): Set p_alloca_cutoff.
2115         * pthread.c (__pthread_initial_thread): Use C99 designated
2116         initializers.  Set p_alloca_cutoff.
2117         (__pthread_manager_thread): Likewise.
2118         (__pthread_initialize_minimal) [USE_TLS]: Set p_alloca_cutoff
2119         for initial thread.
2120         (__pthread_init_max_stacksize): Possibly decrease p_alloca_cutoff
2121         for initial thread.
2122         (__pthread_initialize_manager) [USE_TLS]: Set p_alloca_cutoff
2123         for manager thread.
2124         * specific.c (__libc_alloca_cutoff): New function.
2125         * no-tsd.c (__libc_alloca_cutoff): New function.
2126         * Versions: Export __libc_alloca_cutoff@@GLIBC_PRIVATE from libc
2127         and libpthread.
2129 2002-10-02  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2131         * sysdeps/sh/pt-machine.h: Make C code ifndef'ed with __ASSEMBLER__.
2132         * sysdeps/sh/tls.h: Likewise.
2133         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
2135 2002-09-29  Jakub Jelinek  <jakub@redhat.com>
2137         * sysdeps/pthread/tst-timer.c (main): Clear
2138         SIGEV2.sigev_notify_attributes.
2140 2002-09-29  Ulrich Drepper  <drepper@redhat.com>
2142         * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Don't use
2143         INLINE_SYSCALL for set_thread_area syscall.
2145 2002-09-28  Roland McGrath  <roland@redhat.com>
2147         * pthread.c (__pthread_reset_main_thread) [FLOATING_STACKS]:
2148         Don't call setrlimit, since we did no prior bogon we need to undo.
2150 2002-09-27  Roland McGrath  <roland@redhat.com>
2152         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Don't include <pt-machine.h>.
2154 2002-09-24  Roland McGrath  <roland@redhat.com>
2156         * sysdeps/x86_64/tls.h: New file.
2158 2002-09-23  Roland McGrath  <roland@redhat.com>
2160         * Examples/ex13.c (dump_mut): int -> size_t for counter.
2162 2002-09-18  Bruno Haible  <bruno@clisp.org>
2164         * Examples/ex10.c (thread): Fail if pthread_mutex_timedlock() returns
2165         an unexpected error code.
2167         * internals.h (__pthread_message): Add const to first parameter type.
2168         * pthread.c (__pthread_message): Likewise.
2170         * sysdeps/unix/sysv/linux/configure: Moved to ../sysdeps/pthread.
2172 2002-09-17  Roland McGrath  <roland@redhat.com>
2174         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT, TLS_DO_SET_THREAD_AREA):
2175         Set the descriptor limit to the full 4GB, so %gs:OFFSET works for any
2176         offset (positive or negative) relative to the thread struct.
2177         * sysdeps/i386/useldt.h (DO_MODIFY_LDT, DO_SET_THREAD_AREA): Likewise.
2179 2002-09-12  Jakub Jelinek  <jakub@redhat.com>
2181         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Move...
2182         * sysdeps/unix/sysv/linux/sparc/Makefile: ...here.
2183         Replace /usr/lib/crt[in].o with crt[in].o too.
2185 2002-09-11  Steven Munroe  <sjmunroe@us.ibm.com>
2187         * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
2189 2002-09-04  Bruno Haible  <bruno@clisp.org>
2191         * pthread.c: Include <sys/time.h>.
2192         (is_smp_system): Move to sysdeps/unix/sysv/linux/smp.h.
2193         * sysdeps/unix/sysv/linux/smp.h: New file, extracted from pthread.c.
2194         * Makefile (distribute): Add smp.h to the list.
2196 2002-09-04  Bruno Haible  <bruno@clisp.org>
2198         * sysdeps/alpha/pt-machine.h: Choose different include file location
2199         on non-Linux platforms.
2201         * wrapsyscall.c (PROMOTE_INTEGRAL_TYPE): New macro.
2202         (open, open64): Change va_arg argument type to the integral type to
2203         which mode_t promotes.
2205         * sysdeps/pthread/tst-timer.c (main): Don't assume anything about
2206         the structure of 'struct sigevent'.
2208         * errno.c (__errno_location, __h_errno_location, __res_state):
2209         Use prototype function definitions.
2211 2002-07-29  Steven Munroe  <sjmunroe@us.ibm.com>
2213         * shlib-versions: Set libpthread version to 2.3 for powerpc64.
2214         * sysdeps/powerpc/pt-machine.h: moved to...
2215         * sysdeps/powerpc/powerpc32/pt-machine.h: ...here
2216         * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
2218 2002-09-02  Roland McGrath  <roland@redhat.com>
2220         * sysdeps/powerpc/Makefile (CFLAGS-pt-initfini.s): New variable.
2222 2002-09-01  Roland McGrath  <roland@redhat.com>
2224         * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t): Add new keys
2225         CTYPE_B, CTYPE_TOLOWER, CTYPE_TOUPPER.
2227         * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_address): New macro.
2228         (__libc_internal_tsd_address): Declare it.
2229         * Versions (libc, ld, libpthread: GLIBC_PRIVATE): Add
2230         __libc_internal_tsd_address.
2231         * specific.c (libc_internal_tsd_address): New function.
2232         (__libc_internal_tsd_address): New variable.
2233         * no-tsd.c (__libc_internal_tsd_address): New variable.
2235 2002-08-31  Ulrich Drepper  <drepper@redhat.com>
2237         * Makefile: Don't use rule for crt%.o, spell it out as rules for
2238         crti.o and crtn.o.
2240 2002-08-30  Roland McGrath  <roland@redhat.com>
2242         * Makefile (extra-objs, omit-deps): Add crtn.
2243         ($(objpfx)libpthread.so): Depend on $(objpfx)crtn.o.
2244         ($(objpfx)libpthread.so: +postinit): Append $(objpfx)crtn.o.
2245         ($(objpfx)crtn.S): New target.
2246         ($(objpfx)crt%.o): Pattern rule replaces crti.o target.
2247         (generated): Add crtn.S.
2249         * sysdeps/unix/sysv/linux/x86_64/Makefile ($(objpfx)specs): Massage
2250         crtn.o pathname too.
2252 2002-08-30  Jakub Jelinek  <jakub@redhat.com>
2254         * pthread.c (__pthread_initialize_minimal): Call __uselocale even
2255         if [! SHARED].
2257 2002-08-30  Roland McGrath  <roland@redhat.com>
2259         * tst-static-locale.c: New file.
2260         * Makefile (tests, tests-static): Add it.
2262 2002-04-24  Steven Munroe  <sjmunroe@us.ibm.com>
2264         * spinlock.c (__pthread_lock): Fix spurious wakeup
2265         handling.  Don't clear lowest bit of list pointer as sign the thread
2266         is still on the wait list.  Don't restart after spurious wakeup
2267         with spinning to get the lock.
2268         (__pthread_unlock): Take set lowest bit into account when handling
2269         pointer to list elements.
2270         Patch by Steve Munroe <sjmunroe@us.ibm.com>.
2272 2002-08-28  Roland McGrath  <roland@redhat.com>
2274         * sysdeps/pthread/timer_routines.c (thread_func): Fix type in cast.
2276 2002-08-28  Jakub Jelinek  <jakub@redhat.com>
2278         * sysdeps/unix/sysv/linux/hppa/aio_cancel.c: New file.
2279         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
2280         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
2282 2002-08-28  Ulrich Drepper  <drepper@redhat.com>
2284         * sysdeps/pthread/timer_routines.c (thread_func): Change return
2285         type to void and add casts in use to avoid warnings with all gcc
2286         versions.
2288 2002-08-08  Jakub Jelinek  <jakub@redhat.com>
2290         * sysdeps/unix/sysv/linux/bits/local_lim.h (PTHREAD_THREADS_MAX):
2291         Bump to 16384.
2292         * manager.c (__pthread_handles): Remove.
2293         * pthandles.c: New file.
2294         * pthread.c (__pthread_initialize_minimal): Initialize
2295         __pthread_handles[0] and __pthread_handles[1].
2296         * Makefile (libpthread-routines): Add pthandles (must be last).
2298 2002-08-26  Brian Youmans  <3diff@gnu.org>
2300         * Examples/ex10.c: Corrected version number in Lesser GPL copying
2301         permission notice from 2 to 2.1.
2302         * Examples/ex11.c: Likewise.
2303         * Examples/ex13.c: Likewise.
2304         * Examples/ex8.c: Likewise.
2305         * Examples/ex9.c: Likewise.
2306         * barrier.c: Likewise.
2307         * events.c: Likewise.
2308         * lockfile.c: Likewise.
2309         * no-tsd.c: Likewise.
2310         * pt-machine.c: Likewise.
2311         * ptclock_gettime.c: Likewise.
2312         * ptclock_settime.c: Likewise.
2313         * rwlock.c: Likewise.
2314         * sysdeps/alpha/pspinlock.c: Likewise.
2315         * sysdeps/alpha/pt-machine.h: Likewise.
2316         * sysdeps/arm/pspinlock.c: Likewise.
2317         * sysdeps/arm/pt-machine.h: Likewise.
2318         * sysdeps/cris/pspinlock.c: Likewise.
2319         * sysdeps/cris/pt-machine.h: Likewise.
2320         * sysdeps/hppa/pspinlock.c: Likewise.
2321         * sysdeps/hppa/pt-machine.h: Likewise.
2322         * sysdeps/i386/i686/pt-machine.h: Likewise.
2323         * sysdeps/i386/pspinlock.c: Likewise.
2324         * sysdeps/i386/pt-machine.h: Likewise.
2325         * sysdeps/i386/useldt.h: Likewise.
2326         * sysdeps/ia64/pspinlock.c: Likewise.
2327         * sysdeps/ia64/pt-machine.h: Likewise.
2328         * sysdeps/m68k/pspinlock.c: Likewise.
2329         * sysdeps/m68k/pt-machine.h: Likewise.
2330         * sysdeps/mips/pspinlock.c: Likewise.
2331         * sysdeps/mips/pt-machine.h: Likewise.
2332         * sysdeps/powerpc/pspinlock.c: Likewise.
2333         * sysdeps/powerpc/pt-machine.h: Likewise.
2334         * sysdeps/pthread/bits/initspin.h: Likewise.
2335         * sysdeps/pthread/bits/libc-lock.h: Likewise.
2336         * sysdeps/pthread/bits/libc-tsd.h: Likewise.
2337         * sysdeps/pthread/getcpuclockid.c: Likewise.
2338         * sysdeps/pthread/posix-timer.h: Likewise.
2339         * sysdeps/pthread/timer_create.c: Likewise.
2340         * sysdeps/pthread/timer_delete.c: Likewise.
2341         * sysdeps/pthread/timer_getoverr.c: Likewise.
2342         * sysdeps/pthread/timer_gettime.c: Likewise.
2343         * sysdeps/pthread/timer_routines.c: Likewise.
2344         * sysdeps/pthread/timer_settime.c: Likewise.
2345         * sysdeps/pthread/tst-timer.c: Likewise.
2346         * sysdeps/s390/pspinlock.c: Likewise.
2347         * sysdeps/s390/s390-32/pt-machine.h: Likewise.
2348         * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2349         * sysdeps/sh/pspinlock.c: Likewise.
2350         * sysdeps/sh/pt-machine.h: Likewise.
2351         * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
2352         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2353         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
2354         * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
2355         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2356         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
2357         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
2358         * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
2359         * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
2360         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2361         * tststack.c: Likewise.
2362         * unload.c: Likewise.
2363         * weaks.c: Likewise.
2364         * wrapsyscall.c: Likewise.
2366         * sysdeps/pthread/pt-initfini.c: Changed copying
2367         permission notice to Lesser GPL from Library GPL, including the
2368         references in the special exception.
2369         * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Likewise.
2370         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Likewise.
2371         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c:
2372         Likewise.
2373         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c:
2374         Likewise.
2375         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Likewise.
2377 2002-08-26  Ulrich Drepper  <drepper@redhat.com>
2379         * Examples/ex10.c (thread): tv_nsec == 1000000000 is already
2380         overflow [PR libc/4244].
2382 2002-08-25  Ulrich Drepper  <drepper@redhat.com>
2384         * sysdeps/pthread/timer_routines.c (thread_func): Make the
2385         compiler happy by adding a return statement which will never be
2386         reached.
2388         * tst-context.c (main): Cast to long before casting to pointer.
2390         * Examples/ex17.c (main): Use correct format string.
2392         * Examples/ex9.c (thread): Remove incorrect return statement.
2394 2002-08-23  Ulrich Drepper  <drepper@redhat.com>
2396         * pthread.c (__linuxthreads_version): New global constant.
2398 2002-08-23  Andreas Jaeger  <aj@suse.de>
2400         * sysdeps/x86_64/pt-machine.h: Use %fs instead of %gs
2401         as thread specific register.
2402         (testandset): Fix inline asm.
2403         (THREAD_GETMEM): Fix inline asm.
2405 2002-08-22  Roland McGrath  <roland@redhat.com>
2407         * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Remove [HAVE_TLS_SUPPORT]
2408         conditional.
2409         (INIT_THREAD_SELF): Pass second arg to DO_SET_THREAD_AREA.
2410         (DO_SET_THREAD_AREA): Take second arg, pass to DO_SET_THREAD_AREA_REUSE
2411         macro.  That chooses whether to reuse %gs value or let kernel set it.
2412         [USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, always 1.
2413         [!USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, true if arg is
2414         not constant 0.
2416 2002-08-21  Ulrich Drepper  <drepper@redhat.com>
2418         * sysdeps/i386/tls.h (TLS_SETUP_GS_SEGMENT): Add new parameter
2419         also to the third definition of this macro.
2421 2002-06-17  Andreas Jaeger  <aj@suse.de>
2423         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
2424         Set it.
2426 2002-08-20  Ulrich Drepper  <drepper@redhat.com>
2428         * sysdeps/i386/useldt.h: Go back to using 16-bit instructions when
2429         loading/reading segment registers.  Some old hardware doesn't
2430         handle the 32-bit instructions as expected.
2431         * sysdeps/i386/tls.h: Likewise.
2433         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Second parameter is
2434         renamed to secondcall and use is negated.
2435         (TLS_SETUP_GS_SEGMENT): Likewise.
2436         (TLS_INIT_TP): Likewise.
2437         * sysdeps/sh/tls.h (TLS_INIT_TP): Second parameter is renamed to
2438         secondcall.
2440         * sysdeps/i386/tls.h: Use 32-bit operations when handling segment
2441         registers.  No need to mask upper 16 bits in this case.
2442         * sysdeps/i386/useldt.h: Likewise.
2443         (DO_SET_THREAD_AREA): We have to load %gs again even if the value
2444         is the same since the GDT content changed.
2446         * sysdeps/i386/tls.h (TLS_INIT_TP): Add new parameter and pass it on
2447         to TLS_SETUP_GS_SEGMENT.
2448         (TLS_SETUP_GS_SEGMENT): Add new parameter and pass it on to
2449         TLS_DO_SET_THREAD_AREA.
2450         (TLS_DO_SET_THREAD_AREA): If new parameter is zero determine
2451         entry number from %gs value.
2452         * sysdeps/sh/tls.h (TLS_INIT_TP): Add new parameter and simply
2453         ignore it.
2455         * manager.c (pthread_handle_create): Pass NULL to _dl_allocate_tls.
2456         Pass true to _dl_deallocate_tls.
2457         (pthread_free): Likewise.
2458         * pthread.c (__pthread_initialize_manager): Likewise.
2460 2002-08-19  Ulrich Drepper  <drepper@redhat.com>
2462         * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Use correct shift when
2463         computing index from %gs value.
2465 2002-08-16  Roland McGrath  <roland@redhat.com>
2467         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Calculate segment
2468         register value from entry number properly.
2470         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Rewrite asm to use %ebx
2471         optimally conditional on [__PIC__].
2472         (TLS_DO_SET_THREAD_AREA): New macro, implement inline syscall
2473         without touching errno, and use latest modify_ldt-like interface.
2474         (TLS_SETUP_GS_SEGMENT): Use that instead of INLINE_SYSCALL.
2475         * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Set %gs in this macro.
2476         (DO_SET_THREAD_AREA): New macro, uses current syscall interface with
2477         existing %gs value as the segment to set.
2478         (INIT_THREAD_SELF): Rewritten using those.  Use set_thread_area only
2479         under [HAVE_TLS_SUPPORT] so we can rely on the initialization done
2480         by the first thread's early TLS setup.
2482 2002-08-15  Roland McGrath  <roland@redhat.com>
2484         * sysdeps/i386/tls.h (TLS_INIT_TP): Use statement expression and
2485         return a value as callers now expect.
2487 2002-08-11  Roland McGrath  <roland@redhat.com>
2489         * pthread.c (__pthread_initialize_manager): Initialize
2490         p_header.data.tcb field of manager thread's descriptor.
2491         (__pthread_initialize_minimal): Don't initialize p_header.data.self
2492         field, already done by TLS_INIT_TP.
2494         * manager.c (pthread_handle_create): Move p_header field initializers
2495         together.
2497 2002-08-08  Ulrich Drepper  <drepper@redhat.com>
2499         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Removed.
2501 2002-08-07  Ulrich Drepper  <drepper@redhat.com>
2503         * pthread.c (__linuxthreads_initial_report_events): New variable.
2504         (__pthread_initialize_manager): Use it to initialize p_report_events
2505         of initial thread.
2506         [TLS]: Store pointer to descriptor of manager in __pthread_handles.
2508 2002-08-07  Roland McGrath  <roland@redhat.com>
2510         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Add an extra argument with
2511         an "m" constraint to the asm so the compiler knows LDT_ENTRY was used.
2513 2002-08-02  Roland McGrath  <roland@redhat.com>
2515         * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t):
2516         Add _LIBC_TSD_KEY_LOCALE.
2517         * manager.c (pthread_start_thread) [!(USE_TLS && HAVE___THREAD)]:
2518         Call __uselocale to initialize our per-thread locale pointer to
2519         the global one.
2520         * pthread.c (__pthread_initialize_minimal): Likewise.
2522         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Add missing \s.
2524 2002-08-02  Ulrich Drepper  <drepper@redhat.com>
2526         * pthread.c: Declare _errno, _h_errno, and _res unless we use TLS
2527         internally.
2529         * cancel.c (__pthread_perform_cleanup) [USE_TLS && HAVE___THREAD]:
2530         Don't use p_libc_specific element in thread descriptor.
2532 2002-07-30  Roland McGrath  <roland@redhat.com>
2534         * sysdeps/pthread/bits/libc-tsd.h: Include <tls.h>.
2535         [USE_TLS && HAVE___THREAD]: Just include the sysdeps/generic file,
2536         which does the right thing when __thread support is available.
2537         * descr.h (struct _pthread_descr_struct) [USE_TLS && HAVE___THREAD]:
2538         Omit `p_libc_specific', `p_errnop', `p_errno', `p_h_errnop',
2539         `p_h_errno', `p_resp', and `p_res' members.
2540         * pthread.c (__pthread_initialize_minimal) [USE_TLS && HAVE___THREAD]:
2541         Don't initialize `p_errnop' and `p_h_errnop' members.
2542         (__pthread_reset_main_thread): Likewise.
2543         (__pthread_initialize_manager): Likewise.
2544         * manager.c (__pthread_manager, pthread_handle_create): Likewise.
2545         * pthread.c (pthread_initialize) [USE_TLS && HAVE___THREAD]:
2546         Don't initialize `p_resp' member.
2547         (__pthread_reset_main_thread): Likewise.
2548         * manager.c (pthread_handle_create): Likewise.
2549         * specific.c (libc_internal_tsd_set, libc_internal_tsd_get):
2550         Conditionalize these on [!(USE_TLS && HAVE___THREAD)].
2551         * no-tsd.c: Conditionalize contents on [!(USE_TLS && HAVE___THREAD)].
2552         * errno.c [USE_TLS && HAVE___THREAD]
2553         (__h_errno_location, __res_state): Don't define these at all.
2555         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens around arguments!
2556         (INSTALL_NEW_DTV, GET_DTV): Likewise.
2557         * sysdeps/sh/tls.h (INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV): Likewise.
2559         * weaks.c: Don't include <errno.h> here.
2561 2002-08-01  Roland McGrath  <roland@redhat.com>
2563         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): New macro, broken out of
2564         TLS_INIT_TP.
2565         (TLS_DO_SET_THREAD_AREA): New macro, uses thread_set_area syscall.
2566         (TLS_SETUP_GS_SEGMENT): New macro, try one or the other or both.
2567         (TLS_INIT_TP): Use that.
2569 2002-08-02  Jakub Jelinek  <jakub@redhat.com>
2571         * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Move from INIT_THREAD_SELF.
2572         (INIT_THREAD_SELF): Use sys_thread_area syscall instead if available.
2573         (FREE_THREAD): Avoid modify_ldt if using GDT.
2574         * sysdeps/i386/pspinlock.c (__have_no_set_thread_area): New variable.
2576 2002-07-25  Jakub Jelinek  <jakub@redhat.com>
2578         * sysdeps/i386/tls.h: Use __ASSEMBLER__ test macro not ASSEMBLER.
2579         * sysdeps/i386/pt-machine.h: Likewise.
2580         * sysdeps/i386/useldt.h: Likewise.
2582 2002-07-22  Ulrich Drepper  <drepper@redhat.com>
2584         * pthread.c (__pthread_initialize_minimal): If !SHARED and TLS
2585         call __libc_setup_tls first.
2586         * Makefile: Actually create tst-signal.out file when running the test.
2587         (tests): Add tststatic.
2588         * Examples/tststatic.c: New file.
2590 2002-07-19  Ulrich Drepper  <drepper@redhat.com>
2592         * errno.c (__errno_location): Don't define unless !USE_TLS
2593         || !HAVE___THREAD.
2594         * sysdeps/i386/pt-machine.c: Protect C code with #ifndef ASSEMBLER.
2595         * sysdeps/i386/tls.h: Likewise.
2596         * sysdeps/i386/useldt.h: Likewise.
2597         * sysdeps/i386/i686/pt-machine.h: Likewise.
2599 2002-07-02  H.J. Lu  <hjl@gnu.org>
2601         * sysdeps/mips/pspinlock.c: Don't include <sgidefs.h>.  Always
2602         use ll/sc.
2603         * sysdeps/mips/pt-machine.h: Likewise.
2605 2002-07-14  Ulrich Drepper  <drepper@redhat.com>
2607         * manager.c (pthread_handle_create): Initialize self-reference in
2608         descriptor.
2610 2002-07-01  Jakub Jelinek  <jakub@redhat.com>
2612         * Examples/ex9.c (main): Remove unused th variable.
2614 2002-07-10  Ulrich Drepper  <drepper@redhat.com>
2616         * wrapsyscall.c: Add __nanosleep alias.
2617         * Versions (GLIBC_2.2.6): Add __nanosleep.
2618         * bug-sleep.c: New file.
2619         * Makefile (tests): Add bug-sleep.
2621 2002-06-19  Steven Munroe  <sjmunroe@vnet.ibm.com>
2623         * Examples/ex9.c (main):  Use list of children and join them.
2624         (thread): Do not call exit.
2626 2002-06-20  Ulrich Drepper  <drepper@redhat.com>
2628         * spinlock.c (wait_node_alloc): We cannot use compare-and-exchange.
2629         Unconditionally use the code using spinlock.  Use __pthread_release
2630         to free a spinlock.
2631         (wait_node_free): Likewise.
2632         (__pthread_acquire, __pthread_release): Unconditionally define.
2634 2002-06-07  Jakub Jelinek  <jakub@redhat.com>
2636         * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Fix typo.
2638 2002-05-24  Ulrich Drepper  <drepper@redhat.com>
2640         * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Use __sync_synchronize.
2642 2002-05-21  Ulrich Drepper  <drepper@redhat.com>
2644         * sysdeps/pthread/pthread.h (pthread_create): Rename first
2645         parameter.
2646         (pthread_cancel): Likewise.
2647         * internals.h (__pthread_create_2_1): Likewise.
2648         * sysdeps/unix/sysv/linux/bits/sigthread.h (pthread_kill): Likewise.
2650 2002-05-20  Ulrich Drepper  <drepper@redhat.com>
2652         * sysdeps/alpha/pt-machine.c (THREAD_SELF): Remove clobber.
2653         Patch by Glen Nakamura <gen@flex.com>.
2655 2002-05-03  Ulrich Drepper  <drepper@redhat.com>
2657         * signals.c: Move sighandler functions to...
2658         * sighandler.c: ...here.  New file.
2659         * signals.c: Move signal handler related type definitions to...
2660         * internals.h: ...here.  Add prototypes for signal handlers.
2661         * Makefile (libpthread-routines): Add sighandler.
2662         (CFLAGS-sighandler.c): Add $(exceptions).
2664 2002-04-30  Jakub Jelinek  <jakub@redhat.com>
2666         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
2668 2002-04-08  Ulrich Drepper  <drepper@redhat.com>
2670         * sysdeps/pthread/timer_getoverr.c: Return real overrun.
2671         * sysdeps/pthread/posix-timer.h (struct timer_node): Add overrun_count.
2672         * sysdeps/pthread/timer_routines.c (thread_func): Schedule next timeout
2673         based on previous one and not on current time.  Count overruns.
2674         Patch by Eric F. Sorton <eric@cctcorp.com>.
2676         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add DELAYTIMER_MAX.
2678 2002-04-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
2680         * sysdeps/sh/pt-machine.h: Define _PT_MACHINE_H
2681         if it isn't defined yet.
2682         (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Defined.
2683         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
2684         Likewise.
2685         * sysdeps/sh/tls.h: New file.
2687 2002-04-08  Jakub Jelinek  <jakub@redhat.com>
2689         * manager.c (__pthread_manager_event): Use self instead of arg
2690         for INIT_THREAD_SELF.
2691         * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Use sizeof (struct
2692         _pthread_descr_struct) instead of sizeof (*descr).
2694 2002-04-05  Ulrich Drepper  <drepper@redhat.com>
2696         * sysdeps/ia64/pt-machine.h: Protect against multiple inclusion.
2697         * sysdeps/alpha/pt-machine.h: Likewise.
2698         * sysdeps/arm/pt-machine.h: Likewise.
2699         * sysdeps/cris/pt-machine.h: Likewise.
2700         * sysdeps/hppa/pt-machine.h: Likewise.
2701         * sysdeps/m68k/pt-machine.h: Likewise.
2702         * sysdeps/mips/pt-machine.h: Likewise.
2703         * sysdeps/powerpc/pt-machine.h: Likewise.
2704         * sysdeps/s390/s390-32/pt-machine.h: Likewise.
2705         * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2706         * sysdeps/sh/pt-machine.h: Likewise.
2707         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2708         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2709         * sysdeps/x86_64/pt-machine.h: Likewise.
2711 2002-04-05  Jakub Jelinek  <jakub@redhat.com>
2713         * man/pthread_mutexattr_init.man (pthread_mutexattr_settype): Document
2714         instead of pthread_mutexattr_setkind_np.
2715         (pthread_mutexattr_gettype): Similarly.
2716         * man/pthread_mutexattr_setkind_np.man: New.
2717         * man/Makefile (SOURCES): Add pthread_mutexattr_setkind_np.man.
2719 2002-04-02  Ulrich Drepper  <drepper@redhat.com>
2721         * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Define.
2723 2002-03-22  Jakub Jelinek  <jakub@redhat.com>
2725         * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Remove.
2727 2002-03-22  Ulrich Drepper  <drepper@redhat.com>
2729         * internals.h (MEMORY_BARRIER): Define as asm with memory as clobber.
2731 2002-03-17  Andreas Jaeger  <aj@suse.de>
2733         * sysdeps/i386/pt-machine.h: Add testandset and __compare_and_swap
2734         prototpyes.
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/i386/i686/pt-machine.h: Likewise.
2740         * sysdeps/ia64/pt-machine.h: Likewise.
2741         * sysdeps/m68k/pt-machine.h: Likewise.
2742         * sysdeps/mips/pt-machine.h: Likewise.
2743         * sysdeps/powerpc/pt-machine.h: Likewise.
2744         * sysdeps/s390/s390-32/pt-machine.h: Likewise.
2745         * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2746         * sysdeps/sh/pt-machine.h: Likewise.
2747         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
2748         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
2749         * sysdeps/x86_64/pt-machine.h: Likewise.
2751         * internals.h: Move testandset and __compare_and_swap prototypes
2752         to pt-machine.h.
2754 2002-03-03  Andreas Jaeger  <aj@suse.de>
2756         * errno.c: Include resolv.h to avoid warning.
2758 2002-02-27  Ulrich Drepper  <drepper@redhat.com>
2760         * pthread.c [USE_TLS] (thread_self_stack): Correct check for upper
2761         stack limit.
2763 2002-02-23  Ulrich Drepper  <drepper@redhat.com>
2765         * attr.c (pthread_getattr_np): Don't take thread descriptor size
2766         into account if USE_TLS.
2767         * manager.c (pthread_handle_create): Free TLS data structures if call
2768         failed.  Pass correct stack to clone if USE_TLS.
2769         * sysdeps/i386/pt-machine.h: Handle multiple inclusion.
2770         * sysdeps/i386/i686/pt-machine.h: Likewise.
2771         * sysdeps/i386/tls.h: Unconditionally include <pt-machine.h>.
2773         * descr.h (struct _pthread_descr_struct): Update p_header for TLS.
2774         Add p_stackaddr element #if USE_TLS.
2775         * internals.c: Include <tls.h>.
2776         * manager.c: Integrate creating and handling of thread descriptor
2777         for TLS.
2778         * pthread.c: Likewise.
2779         * sysdeps/i386/tls.h (tcbhead_t): Add self pointer.
2780         Include <linuxthreads/descr.h> only if TLS is really used.
2781         (GET_DTV): New macro.
2782         (TLS_INIT_TP): Initialize self pointer.
2784 2002-02-17  Andreas Schwab  <schwab@suse.de>
2786         * signals.c (sigwait): Check for old sighandler being SIG_ERR,
2787         not NULL.
2789 2002-02-12  Ulrich Drepper  <drepper@redhat.com>
2791         * sysdeps/i386/tls.c (INSTALL_NEW_DTV): Define.
2792         (INSTALL_DTV): Adjust for being passed pointer to element with length.
2794 2002-02-08  Ulrich Drepper  <drepper@redhat.com>
2796         * sysdeps/i386/tls.h (TLS_INIT_TP): Also initialize %gs.
2798 2002-02-08  Richard Henderson  <rth@redhat.com>
2800         * sysdeps/alpha/elf/pt-initfini.c: Use \n\ for multiline string.
2802 2002-02-08  Ulrich Drepper  <drepper@redhat.com>
2804         * sysdeps/i386/tls.h: TLS cannot be supported with FLOATING_STACKS
2805         after all.
2807 2002-02-07  H.J. Lu  <hjl@gnu.org>
2809         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Silence the
2810         gcc warning.
2811         (__pthread_spin_lock): Remove ".set noreorder".
2812         * sysdeps/mips/pt-machine.h (__compare_and_swap): Liekwise.
2814 2002-02-05  H.J. Lu  <hjl@gnu.org>
2816         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Not use
2817         branch likely.
2818         * sysdeps/mips/pt-machine.h (testandset): Likewise.
2819         (__compare_and_swap): Likewise.
2821 2002-02-07  Ulrich Drepper  <drepper@redhat.com>
2823         * internals.h: Move declarations/definitions of
2824         __pthread_initial_thread_bos, __pthread_initial_thread,
2825         __pthread_manager_thread_bos, __pthread_manager_thread_tos,
2826         __pthread_manager_thread, __pthread_nonstandard_stacks, STACK_SIZE,
2827         CURRENT_STACK_FRAME, __pthread_find_self, and thread_self...
2828         * descr.h: ...here.
2829         * sysdeps/i386/tls.h: Add TLS definitions also for !FLOATING_STACKS.
2830         Define THREAD_GETMEM accordingly.
2832 2002-02-06  Ulrich Drepper  <drepper@redhat.com>
2834         * sysdeps/i386/tls.h: Include <stddef.h> for size_t.
2836         * sysdeps/i386/tls.h: Define THREAD_DTV.
2838 2002-02-04  Ulrich Drepper  <drepper@redhat.com>
2840         * internals.h: Move thread descriptor definition...
2841         * descr.h.: ...here.  New file.
2842         * sysdeps/i386/tls.h: New file.
2844 2002-02-01  H.J. Lu  <hjl@gnu.org>
2846         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Use a
2847         different register in the delayed slot.  Use branch likely.
2849         * sysdeps/mips/pt-machine.h (testandset): Call _test_and_set.
2850         (__compare_and_swap): Return 0 only when failed to compare. Use
2851         branch likely.
2853 2002-02-01  Jakub Jelinek  <jakub@redhat.com>
2855         * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set,
2856         __pthread_kill_other_threads_np): Move to GLIBC_PRIVATE.
2857         * sysdeps/i386/i586/Versions: Move all symbols to GLIBC_PRIVATE.
2858         * sysdeps/i386/i686/Versions: Move all symbols to GLIBC_PRIVATE.
2859         * sysdeps/sparc/sparc32/sparcv9/Versions: New file.
2860         * sysdeps/sparc/sparc64/Versions: New file.
2861         * sysdeps/ia64/Versions: Move all symbols to GLIBC_PRIVATE.
2863 2002-01-31  Ulrich Drepper  <drepper@redhat.com>
2865         * pthread.c: _dl_cpuclock_offset is not any longer a global variable
2866         in SHARED code, use GL(dl_cpuclock_offset).
2868 2002-01-28  Andreas Jaeger  <aj@suse.de>
2870         * sysdeps/mips/pspinlock.c (__pthread_spin_init): Clear *LOCK to
2871         0. Patch by Machida Hiroyuki <machida@sm.sony.co.jp>.
2873 2002-01-16  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2875         * sysdeps/s390/s390-32/pt-machine.h (MEMORY_BARRIER): Define.
2876         (CURRENT_STACK_FRAME): Remove duplicate definition.
2877         * sysdeps/s390/s390-64/pt-machine.h: Likewise.
2879 2002-01-14  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2881         * Makefile (CFLAGS-tst-cancel.c): Add -fno-inline-functions to prevent
2882         automatic inline.
2884 2002-01-12  Andreas Schwab  <schwab@suse.de>
2886         * Makefile (test-srcs): Add tst-signal.
2887         (tests): Run tst-signal.
2888         (distribute): Add tst-signal.sh.
2889         * tst-signal.c, tst-signal.sh: New files.
2891 2002-01-14  Andreas Jaeger  <aj@suse.de>
2893         * sysdeps/x86_64/pt-machine.h (INIT_THREAD_SELF): Avoid warning.
2895 2002-01-11  Andreas Schwab  <schwab@suse.de>
2897         * signals.c (sighandler): Initialize all elements to SIG_ERR.
2898         (__sigaction): Don't use value from sighandler if it is SIG_ERR.
2900 2002-01-06  Richard Henderson  <rth@redhat.com>
2902         * sysdeps/alpha/elf/pt-initfini.c: New file.
2904 2001-12-29  Andreas Jaeger  <aj@suse.de>
2906         * Examples/ex9.c: Add noreturn attribute for thread.
2907         * Examples/ex10.c: Likewise.
2908         * Examples/ex13.c (thread_start): Likewise.
2909         * Examples/ex15.c (worker): Likewise.
2911         * Examples/ex18.c: Include unistd.h for prototype of sleep.
2913 2001-12-14  Ulrich Drepper  <drepper@redhat.com>
2915         * man/pthread_atfork.man: Adjust description of mutex handling
2916         after fork for current implementation.
2917         * linuxthreads.texi: Likewise [PR libc/2519].
2919 2001-12-13  Andreas Schwab  <schwab@suse.de>
2921         * specific.c (pthread_key_delete): Don't contact the thread
2922         manager if no threads have been created yet.
2924 2001-12-12  NIIBE Yutaka  <gniibe@m17n.org>
2926         * sysdeps/sh/pt-machine.h (INIT_THREAD_SELF): Added __volatile__
2927         qualifier to be safe.
2929 2001-11-30  Andreas Schwab  <schwab@suse.de>
2931         * pthread.c (pthread_handle_sigcancel) [THREAD_SELF]: Double check
2932         that self is the manager thread, and initialize the thread
2933         register if not.
2934         (thread_self_stack) [THREAD_SELF]: New function to find self via
2935         stack pointer.
2936         * manager.c (pthread_handle_create): Don't block cancel signal any
2937         more.
2939 2001-11-29  Andreas Jaeger  <aj@suse.de>
2941         * sysdeps/x86_64/pt-machine.h: Use %gs as thread specific register.
2942         (THREAD_SELF): New.
2943         (INIT_THREAD_SELF): New.
2944         (THREAD_GETMEM): New.
2945         (THREAD_GETMEM_NC):
2946         (THREAD_SETMEM): New.
2947         (THREAD_SETMEM_NC): New.
2948         (FLOATING_STACKS): Define.
2949         (ARCH_STACK_MAX_SIZE): Define.
2951 2001-11-28  Kaz Kylheku  <kaz@ashi.footprints.net>
2953         Bugfix to pthread_key_delete. It was iterating over the thread
2954         manager's linked list of threads, behind the thread manager's
2955         back causing a race. The fix is to have the manager iterate over
2956         the threads instead, using a new request type for doing so.
2957         * internals.h (struct pthread_request): New manager request type
2958         REQ_FOR_EACH_THREAD.
2959         * manager.c (pthread_for_each_thread): New function.
2960         (__pthread_manager): Handle new REQ_FOR_EACH_THREAD request.
2961         * specific.c (struct pthread_key_delete_helper_args): New type.
2962         (pthread_key_delete_helper): New static function.
2963         (pthread_key_delete): Use the new thread manager
2964         REQ_FOR_EACH_THREAD function to iterate over the threads and set
2965         the delete key slot to a null value in each thread.
2966         * Examples/ex18.c: New test.
2967         * Makefile (tests): Add ex18.
2969 2001-11-22  Wolfram Gloger  <wg@malloc.de>
2971         * pthread.c (pthread_onexit_process): Don't call free
2972         after threads have been asynchronously terminated.
2974         * manager.c (pthread_handle_exit): Surround cancellation
2975         of threads with __flockfilelist()/__funlockfilelist().
2977 2001-11-26  Andreas Schwab  <schwab@suse.de>
2979         * manager.c (pthread_handle_create): Start the child thread with
2980         the cancel signal blocked, so that it does not handle it before
2981         the thread register is set up.  Save errno from failed clone call.
2983 2001-11-15  Ulrich Drepper  <drepper@redhat.com>
2985         * sysdeps/i386/i686/Implies: Removed.
2986         * sysdeps/i386/i686/Versions: New file.
2988 2001-10-31  Andreas Jaeger  <aj@suse.de>
2990         * sysdeps/x86_64/Makefile: Remove, we do not need it anymore.
2992 2001-10-05  Kevin Buettner  <kevinb@cygnus.com>
2994         * pthread.c (__linuxthread_pthread_sizeof_descr): Change name
2995         to __linuxthreads_pthread_sizeof_descr to match name used by
2996         symbol_list_arr[LINUXTHREADS_PTHREAD_SIZEOF_DESCR] in
2997         linuxthreads_db/td_symbol_list.c.
2999 2001-09-22  Andreas Jaeger  <aj@suse.de>
3001         * linuxthreads/tst-context.c: Avoid compile warning.
3003 2001-09-20  Andreas Jaeger  <aj@suse.de>
3005         * shlib-versions: Add x86-64.
3007 2001-09-19  Andreas Jaeger  <aj@suse.de>
3009         * sysdeps/x86_64/Makefile: New file.
3010         * sysdeps/x86_64/pspinlock.c: New file.
3011         * sysdeps/x86_64/pt-machine.h: New file.
3013 2001-09-12  Jakub Jelinek  <jakub@redhat.com>
3015         * sysdeps/pthread/timer_delete.c (timer_delete): Thread may be NULL
3016         for SIGEV_NONE.
3017         * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
3019 2001-09-11  Ulrich Drepper  <drepper@redhat.com>
3020             Wolfram Gloger <wg@malloc.de>
3022         * join.c: Protect all communications from and to manager with
3023         TEMP_FAILURE_RETRY.
3024         * manager.c: Likewise.
3025         * pthread.c: Likewise.
3026         * smeaphore.c: Likewise.
3028 2001-08-29  Ulrich Drepper  <drepper@redhat.com>
3030         * spinlock.c (__pthread_lock): Top max_count value with
3031         MAX_ADAPTIVE_SPIN_COUNT.
3032         * internals.h (MAX_ADAPTIVE_SPIN_COUNT): Define if not already done.
3034         * sysdeps/i386/i686/pt-machine.h (BUSY_WAIT_NOP): New macro to
3035         help P4.
3037 2001-08-27  Jakub Jelinek  <jakub@redhat.com>
3039         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_t): Only define to
3040         non-opaque type if __USE_UNIX98.
3042 2001-08-26  Jakub Jelinek  <jakub@redhat.com>
3044         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_t): Define
3045         non-opaque lock types also if _IO_MTSAFE_IO is defined.
3047 2001-08-23  Roland McGrath  <roland@frob.com>
3049         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start): Take
3050         new first argument, skip the cleanup handler if it's zero.
3051         (_LIBC_LOCK_RECURSIVE_INITIALIZER): New macro.
3052         (__libc_lock_define_initialized_recursive): Use it.
3053         * sysdeps/pthread/bits/stdio-lock.h: File removed.
3054         The sysdeps/generic file from the main tree now suffices.
3056 2001-08-22  Roland McGrath  <roland@frob.com>
3058         * sysdeps/pthread/bits/stdio-lock.h: Include <bits/libc-lock.h>
3059         instead of <pthread.h>.
3060         (_IO_lock_t): Define this typedef using __libc_lock_define_recursive.
3061         (_IO_lock_initializer): Add braces.
3062         (_IO_lock_lock): Use __libc_lock_lock_recursive.
3063         (_IO_lock_unlock): Use __libc_lock_unlock_recursive.
3065         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_recursive_t): New type.
3066         (__libc_lock_define_initialized_recursive): Use it.
3067         (__libc_lock_init_recursive): Likewise.
3068         (__libc_lock_fini_recursive): Likewise.
3069         (__libc_lock_lock_recursive): Likewise.
3070         (__libc_lock_trylock_recursive): Likewise.
3071         (__libc_lock_unlock_recursive): Likewise.
3072         (__libc_lock_define_recursive): New macro.
3074 2001-08-14  Jakub Jelinek  <jakub@redhat.com>
3076         * lockfile.c (__pthread_provide_lockfile): New variable.
3077         * pthread.c (__pthread_require_lockfile): New variable.
3078         * cancel.c (__pthread_require_lockfile): New variable.
3080 2001-07-31  Ulrich Drepper  <drepper@redhat.com>
3082         * tst-context.c (threadfct): Initialize context before calling
3083         makecontext.
3085         * Examples/ex17.c: Make sure test thread is around long enough.
3087 2001-07-26  kaz Kojima  <kkojima@rr.iij4u.or.jp>
3089         * sysdeps/sh/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF): Defined.
3091 2001-07-24  Ulrich Drepper  <drepper@redhat.com>
3093         * tst-context.c (main): Print explanation before bailing out
3094         because context handling is not supported.
3096 2001-07-23  Ulrich Drepper  <drepper@redhat.com>
3098         * Makefile (tests): Add tst-context.
3099         * tst-context.c: New file.
3101         * sysdeps/pthread/bits/stdio-lock.h: Define
3102         _IO_cleanup_region_start_noarg.
3104 2001-07-23  Jakub Jelinek  <jakub@redhat.com>
3106         * sysdeps/alpha/pt-machine.h (FLOATING_STACKS): Define.
3107         (ARCH_STACK_MAX_SIZE): Define.
3108         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
3109         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3111 2001-07-19  Jakub Jelinek  <jakub@redhat.com>
3113         * sysdeps/i386/useldt.h: Fix typo in ARCH_STACK_MAX_SIZE comment.
3115         * sysdeps/ia64/pt-machine.h (FLOATING_STACKS): Define.
3116         (ARCH_STACK_MAX_SIZE): Define.
3117         * manager.c (pthread_allocate_stack): Handle FLOATING_STACKS with
3118         NEED_SEPARATE_REGISTER_STACK.
3120 2001-07-16  Andreas Schwab  <schwab@suse.de>
3122         * Makefile (before-compile): Don't add $(objpfx)crti.o.
3123         (omit-deps): Add crti.
3124         ($(objpfx)libpthread.so): Depend on $(objpfx)crti.o, but make sure
3125         it is filtered out of the link command.
3127 2001-07-16  Ulrich Drepper  <drepper@redhat.com>
3129         * pthread.c (pthread_initialize): For FLOATING_STACKS don't bother
3130         to find the right value for __pthread_initial_thread_bos, it's not
3131         used.  If not FLOATING_STACKS first run
3132         __pthread_init_max_stacksize.
3134 2001-06-16  H.J. Lu  <hjl@gnu.org>
3136         * internals.h: Include <stackinfo.h>.
3138         * attr.c: Don't include <stackinfo.h> here.
3139         * cancel.c: Likewise.
3140         * manager.c: Likewise.
3141         * pthread.c: Likewise.
3142         * ptlongjmp.c: Likewise.
3144 2001-03-23  Matthew Wilcox  <willy@ldl.fc.hp.com>
3146         * attr.c: Make _STACK_GROWS_UP work.
3147         * internals.h: Likewise.
3148         * manager.c: Likewise.
3149         * pthread.c: Likewise.
3151 2001-06-15  H.J. Lu  <hjl@gnu.org>
3153         * pthread.c (__pthread_reset_main_thread): Fix a typo.
3155 2001-02-02  John S. Marvin  <jsm@udlkern.fc.hp.com>
3157         * semaphore.h: Use struct _pthread_fastlock as an element of
3158         sem_t instead of an identical struct.
3159         * rwlock.c: Remove casts.
3160         * semaphore.c: Likewise.
3162 2001-04-30  Alan Modra  <amodra@one.net.au>
3164         * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: New.
3166 2001-05-25  Bruce Mitchener  <bruce@cubik.org>
3168         * linuxthreads.texi: Spelling corrections.
3170 2001-05-25  Ulrich Drepper  <drepper@redhat.com>
3172         * oldsemaphore.c (__old_sem_wait): Clear p_nextwaiting before
3173         returning successfully.
3174         Patch by Gene Cooperman <gene@ccs.neu.edu>.
3176 2001-05-24  Ulrich Drepper  <drepper@redhat.com>
3178         * spinlock.c (__pthread_lock) [HAS_COMPARE_AND_SWAP]: Before doing any
3179         serious work try once whether the lock is uncontested.
3180         Remove duplicate reading of __status before loop.
3181         Change suggested by Hans Boehm <hans_boehm@hp.com>.
3183         * spinlock.h (__pthread_trylock): Remove need for oldstatus variable.
3184         (__pthread_alt_trylock): Likewise.
3186 2001-05-01  Kaz Kylheku  <kaz@ashi.footprints.net>
3188         Memory barrier overhaul following line by line inspection.
3189         * mutex.c (pthread_once): Missing memory barriers added.
3190         * pthread.c (__pthread_wait_for_restart_signal,
3191         __pthread_timedsuspend_new, __pthread_restart_new): Added
3192         memory barriers ``just in case'' and for documentary value.
3193         * spinlock.c (__pthread_release): New inline function for releasing
3194         spinlock, to complement __pthread_acquire.  Includes memory
3195         barrier prior to assignment to spinlock, and __asm __volatile
3196         dance to prevent reordering or optimization of the spinlock access.
3197         * spinlock.c (__pthread_unlock, __pthread_alt_lock,
3198         __pthread_alt_timedlock, __pthread_alt_unlock,
3199         __pthread_compare_and_swap): Updated to use new __pthread_release
3200         instead of updating spinlock directly.
3201         * spinlock.c (__pthread_lock, __pthread_unlock, wait_node_alloc,
3202         wait_node_free, wait_node_dequeue, __pthread_alt_lock,
3203         __pthread_alt_timedlock, __pthread_alt_unlock, __pthread_acquire):
3204         Memory barrier overhaul.  Lots of missing memory barriers added,
3205         a couple needless ones removed.
3206         * spinlock.c (__pthread_compare_and_swap): testandset optimization
3207         removed, just calls __pthread_acquire, which has the new read
3208         barrier in it before its testandset.
3210 2001-05-20  Roland McGrath  <roland@frob.com>
3212         * Makeconfig: New file, variables used to be in main libc Makeconfig.
3214 2001-05-09  Geoff Keating  <geoffk@redhat.com>
3216         * sysdeps/powerpc/pt-machine.h
3217         (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): Define.
3218         (__compare_and_swap): Remove memory barriers.
3219         (__compare_and_swap_with_release_semantics): New function.
3221 2001-04-24  Andreas Jaeger  <aj@suse.de>
3223         * wrapsyscall.c: send* and recv* return ssize_t.
3225         * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Unlock the
3226         mutex instead of double locking it.
3227         Reported by Pierre Artaud <partaud@sodatec.com>.
3229 2001-04-23  Ulrich Drepper  <drepper@redhat.com>
3231         * sysdeps/pthread/getcpuclockid.c: Make function generic, test
3232         using #ifdef whether the clock is available.
3233         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: Removed.
3235         * sysdeps/ia64/Versions: New file.
3237         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init): We don't
3238         have to call __gmon_start__ in the libpthread DSO.
3239         * sysdeps/pthread/pt-initfini.c (_init): Likewise.
3241         * Makefile (libpthread-routines): Add ptclock_gettime and
3242         ptclock_settime.
3243         * internals.h: Don't use cpuclock-init.h definitions, use
3244         hp-timing.h definitions.
3245         * pthread.c: Likewise.
3246         * manager.c: Likewise.
3247         * ptclock_gettime.c: New file.
3248         * ptclock_settime.c: New file.
3249         * internals.h: Fix parameter type for __pthread_clock_gettime and
3250         __pthread_clock_settime.
3252         * sysdeps/i386/i586/ptclock_gettime.c: Removed.
3253         * sysdeps/i386/i586/ptclock_settime.c: Removed.
3254         * sysdeps/i386/i586/Makefile: Removed.
3256 2001-04-22  Ulrich Drepper  <drepper@redhat.com>
3258         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_ASYNCH_IO.
3259         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3261 2001-04-21  Andreas Jaeger  <aj@suse.de>
3263         * sysdeps/pthread/timer_routines.c (thread_func): Add noreturn
3264         attribute, remove statements that will never be executed.
3265         (thread_func): Remove mutex_unlock call since it's never executed.
3266         (thread_func): Fix comment as suggested by Jakub Jelinek.
3268         * manager.c (__pthread_manager): Add noreturn
3269         attribute.
3270         (pthread_start_thread): Likewise, remove return statement.
3271         (pthread_start_thread_event): Likewise.
3272         Add noreturn attribute for pthread_handle_exit.
3273         * weaks.c: Add noreturn attribute for pthread_exit.
3275         * internals.h: Add __pthread_clock_gettime and
3276         __pthread_clock_settime prototypes.
3278 2001-04-21  Ulrich Drepper  <drepper@redhat.com>
3280         * internals.h: Include <cpuclock-init.h>.
3281         (struct _pthread_descr_struct): Add p_cpuclock_offset field if
3282         CPUCLOCK_VARDEF is defined.
3283         * pthread.c (__pthread_initialize_minimal): Initialize
3284         p_cpuclock_offset field for main thread if CPUCLOCK_INIT is defined.
3285         * manager.c (pthread_start_thread): Set p_cpuclock_offset field
3286         for new thread to current CPU clock value.
3288         * sysdeps/i386/useldt.h: Extend all the macros to handle 8-byte values.
3290         * sysdeps/i386/i586/Makefile: New file.
3291         * sysdeps/i386/i586/Versions: New file.
3292         * sysdeps/i386/i586/ptclock_gettime.c: New file.
3293         * sysdeps/i386/i586/ptclock_settime.c: New file.
3294         * sysdeps/i386/i686/Implies: New file.
3296 2001-04-18  Jakub Jelinek  <jakub@redhat.com>
3298         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Put specs into
3299         $generated, not $postclean-generated.
3301 2001-04-18  Andreas Jaeger  <aj@suse.de>
3303         * Makefile (otherlibs): Added.
3305 2001-04-18  Jakub Jelinek  <jakub@redhat.com>
3307         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
3309 2001-04-16  Ulrich Drepper  <drepper@redhat.com>
3311         * signals.c (sigwait): NSIG is no signal number.  Block all
3312         signals while in signal handler for signals in SET.
3313         Patch by Manfred Spraul <manfred@colorfullife.com>.
3315 2001-04-12  Ulrich Drepper  <drepper@redhat.com>
3317         * tst-cancel.c: Disable most tests.  Add new test where all
3318         cleanup handlers must run.
3319         * Makefile (tests): Add tst-cancel again.
3321         * cancel.c (__pthread_perform_cleanup): Correct condition for
3322         leaving cleanup loop early.
3324         * sysdeps/i386/Makefile: Make sure gcc uses a frame pointer for
3325         all the files which use CURRENT_STACK_FRAME.
3326         * sysdeps/i386/pt-machine.h (CURRENT_STACK_FRAME): Define using
3327         __builtin_frame_address.
3328         * sysdeps/i386/i686/pt-machine.h: Likewise.
3330 2001-04-11  Ulrich Drepper  <drepper@redhat.com>
3332         * Makefile (tests): Comment out tst-cancel for now.
3334         * tst-cancel.c (main): Cleanup 4 is supposed to run.  Create
3335         temporary file in object directory.
3336         * Makefile: Don't allow inlining when compiling tst-cancel.c.
3337         Pass $(objpfx) to tst-cancel.
3339 2001-04-11  David S. Miller  <davem@redhat.com>
3341         * sysdeps/sparc/sparc32/pt-machine.h (stack_pointer): Advance
3342         up closer to user local variables so that new cleanup heuristics work.
3343         * sysdeps/sparc/sparc64/pt-machine.h (stack_pointer): Likewise.
3345 2001-04-11  Ulrich Drepper  <drepper@redhat.com>
3347         * cancel.c (_pthread_cleanup_push): Catch invalid __prev buffer
3348         and remove it.
3349         (_pthread_cleanup_push_defer): Likewise.
3351         * tst-cancel.c (main): Fix loop printing cleanup output.
3353 2001-04-10  kaz Kojima  <kkojima@rr.iij4u.or.jp>
3355         * sysdeps/sh/pspinlock.c (__pthread_spin_lock): Fix a reverse
3356         test.
3357         (__pthread_spin_trylock): Likewise.
3358         * sysdeps/sh/pt-machine.h (testandset): Likewise.
3360 2001-04-10  Ulrich Drepper  <drepper@redhat.com>
3362         * join.c (pthread_exit): Move code to new function __pthread_do_exit
3363         which takes an extra parameter with the current frame pointer.
3364         Call new function with CURRENT_STACK_FRAME.
3365         (__pthread_do_exit): New function.  Call __pthread_perform_cleanup
3366         with the new parameter.
3367         (pthread_join): Call __pthread_do_exit instead of pthread_exit.
3368         * cancel.c (__pthread_perform_cleanup): Takes extra parameter.  Use
3369         this parameter as the initial value the cleanup handler records are
3370         compared against.  No active cleanup handler record must have an
3371         address lower than the previous one and the initial record must be
3372         above (below on PA) the frame address passed in.
3373         (pthread_setcancelstate): Call __pthread_do_exit instead of
3374         pthread_exit.
3375         (pthread_setcanceltype): Likewise.
3376         (pthread_testcancel): Likewise.
3377         (_pthread_cleanup_pop_restore): Likewise.
3378         * condvar.c (pthread_cond_wait): Likewise.
3379         (pthread_cond_timedwait_relative): Likewise.
3380         * manager.c (pthread_start_thread): Likewise.
3381         * oldsemaphore.c (__old_sem_wait): Likewise.
3382         * pthread.c (pthread_handle_sigcancel): Likewise.
3383         * semaphore.c (__new_sem_wait): Likewise.
3384         (sem_timedwait): Likewise.
3385         * ptlongjmp.c (pthread_cleanup_upto): Also use current stack frame
3386         to limit the cleanup handlers which get run.
3387         * internals.h: Add prototype for __pthread_do_exit.  Adjust prototype
3388         for __pthread_perform_cleanup.
3390         * Makefile (tests): Add tst-cancel.
3391         * tst-cancel.c: New file.
3393 2001-04-08  Hans-Peter Nilsson  <hp@axis.com>
3395         * sysdeps/cris/pt-machine.h: New file.
3396         * sysdeps/cris/pspinlock.c: New file.
3398 2001-04-09  Hans-Peter Nilsson  <hp@axis.com>
3400         * shlib-versions: Add case for Linux on CRIS.
3402 2001-03-26  Ulrich Drepper  <drepper@redhat.com>
3404         * attr.c (pthread_getattr_np): Correct computation of stack size
3405         for machiens with register stack.
3407         * Examples/ex17.c (main): Correct detection of failed mmap call.
3409 2001-03-21  Jakub Jelinek  <jakub@redhat.com>
3411         * pthread.c (__pthread_initialize_manager): Fix a typo.
3413 2001-03-21  Jakub Jelinek  <jakub@redhat.com>
3415         * attr.c (__pthread_attr_setstack): Fix alignment check.
3416         (pthread_getattr_np): __stackaddr is top of stack, not bottom.
3417         * Makefile (tests): Add ex17 test.
3418         * Examples/ex17.c: New test.
3420 2001-03-20  Ulrich Drepper  <drepper@redhat.com>
3422         * Makefile: Define -D_RPC_THREAD_SAFE_ for cancel.c.
3423         * cancel.c (__pthread_perform_cleanup): Call __rpc_thread_destroy.
3424         * sysdeps/pthread/bits/libc-tsd.h: Define _LIBC_TSD_KEY_VARS.
3426 2001-03-18  Ulrich Drepper  <drepper@redhat.com>
3428         * Makefile: When generating DSO link with libc_nonshared.a.
3430 2001-02-26  Jakub Jelinek  <jakub@redhat.com>
3432         * signals.c (pthread_sighandler): Use CALL_SIGHANDLER.
3434 2001-02-23  Jakub Jelinek  <jakub@redhat.com>
3436         * internals.h (__pthread_init_max_stacksize): New prototype.
3437         * attr.c (__pthread_attr_setstacksize): Call
3438         __pthread_init_max_stacksize if not yet initialized.
3439         * pthread.c (__pthread_init_max_stacksize): New function.
3440         (__pthread_initialize_manager): Call it.
3441         Patch by <dtc@cmucl.cons.org>.
3443 2001-03-16  Ulrich Drepper  <drepper@redhat.com>
3445         * attr.c (pthread_getattr_np): Fix __stacksize computation for IA-64.
3447 2001-03-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3449         * shlib-versions: Add rule for Linux on 64 bit S/390.
3450         * sysdeps/s390/s390-64/pt-machine.h: New file.
3451         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
3453 2001-03-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3455         * sysdeps/s390/pt-machine.h: Move to...
3456         * sysdeps/s390/s390-32/pt-machine.h: ...here.
3457         Add defines for FLOATING_STACK and ARCH_STACK_MAX_SIZE.
3459 2001-03-15  Ulrich Drepper  <drepper@redhat.com>
3461         * Versions [libpthread] (GLIBC_2.2.3): Add pthread_getattr_np.
3462         * attr.c: Implement pthread_getattr_np.
3463         * sysdeps/pthread/pthread.h: Add prototype for pthread_getattr_np.
3464         * internals.h (struct _pthread_descr_struct): Add p_inheritsched.
3465         * manager.c (pthread_handle_create): Initialize p_inheritsched.
3467 2001-03-09  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3469         * sysdeps/unix/sysv/linux/s390/pt-initfini.c: Use 0x07 padding for
3470         code alignment.
3472 2001-02-20  Hans Boehm  <hans_boehm@hp.com>
3474         * manager.c (manager_mask): Removed static vesion.  Now always local
3475         to __pthread_manager().
3476         (manager_mask_all): Removed completely.
3477         (__pthread_manager): Remove manager_mask_all initialization.
3478         (pthread_handle_create): Remove code to set and reset signal mask
3479         around __clone2() calls.
3481 2001-02-17  Jakub Jelinek  <jakub@redhat.com>
3483         * spinlock.c (__pthread_lock): Force lock->__status to be read from
3484         memory on every spin.
3486 2001-02-10  Andreas Jaeger  <aj@suse.de>
3488         * Makefile (extra-objs): New.
3490 2001-02-09  Jakub Jelinek  <jakub@redhat.com>
3492         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add
3493         __pthread_initialize_minimal prototype.
3495 2001-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
3497         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
3499 2001-02-06  Martin Schwidefsky  <schwidefsky@de.ibm.com>
3501         * sysdeps/unix/sysv/linux/s390/pt-initfini.c: New file.
3503 2001-02-06  Ulrich Drepper  <drepper@redhat.com>
3505         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the
3506         broken code.  Patch by Jes Sorensen.
3508 2001-02-06  Andreas Jaeger  <aj@suse.de>
3510         * sysdeps/pthread/pthread.h: Move __pthread_initialize from here
3511         to...
3512         * internals.h: ...here.
3514 2001-02-05  Jes Sorensen  <jes@linuxcare.com>
3516         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
3518 2001-02-02  Ulrich Drepper  <drepper@redhat.com>
3520         * Versions: Remove __pthread_initialize_minimal.
3522 2001-02-01  Ulrich Drepper  <drepper@redhat.com>
3524         * Makefile: Add rules to build crti.o and make it being used in
3525         building libpthread.so.
3526         * sysdeps/i386/Makefile: New file.
3527         * sysdeps/pthread/pt-initfini.c: New file.
3529         * pthread.c: Cleanups.
3531 2001-01-28  Andreas Jaeger  <aj@suse.de>
3533         * oldsemaphore.c (__old_sem_init): Adjust for last change.
3534         * sysdeps/pthread/bits/libc-lock.h: Likewise.
3535         * spinlock.c: Likewise.
3537 2001-01-28  Ulrich Drepper  <drepper@redhat.com>
3539         * sysdeps/pthread/bits/initspin.h: Make all names namespace clean.
3540         * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
3541         * manager.c: Adjust for namespace cleanup in bits/initspin.h.
3542         * pthread.c: Likewise.
3543         * spinlock.h: Likewise.
3544         * sysdeps/pthread/pthread.h: Likewise.
3546 2001-01-26  Ulrich Drepper  <drepper@redhat.com>
3548         * sysdeps/pthread/bits/pthreadtypes.h: Define pthread_attr_t also
3549         as struct __pthread_attr_s.
3551         * semaphore.h (sem_t): Cleanup namespace, rename status and
3552         spinlock elements.
3554 2001-01-13  Jakub Jelinek  <jakub@redhat.com>
3556         * pthread.c (pthread_onexit_process): Clear
3557         __pthread_manager_thread_bos after freeing it.
3558         * Makefile (tests): Add ex16.
3559         * Examples/ex16.c: New file.
3561 2001-01-11  Jakub Jelinek  <jakub@redhat.com>
3563         * Makefile (CFLAGS-pthread.c): Pass -DHAVE_Z_NODELETE if ld supports
3564         -z nodelete.
3565         * pthread.c (pthread_exit_process): Rename to...
3566         (pthread_onexit_process): ...this.
3567         (pthread_atexit_process, pthread_atexit_retcode): New.
3568         (pthread_initialize): Call __cxa_atexit instead of __cxa_on_exit
3569         and only if HAVE_Z_NODELETE is not defined.
3570         (__pthread_initialize_manager): Register pthread_atexit_retcode
3571         with __cxa_atexit.
3573 2001-01-11  Ulrich Drepper  <drepper@redhat.com>
3575         * pthread.c (pthread_initialize): Use __cxs_on_exit not __cxa_atexit.
3577 2001-01-11  Jakub Jelinek  <jakub@redhat.com>
3579         * Makefile (tests): Add ex15.
3580         * Examples/ex15.c: New test.
3582 2001-01-08  Ulrich Drepper  <drepper@redhat.com>
3584         * pthread.c (pthread_exit_process): Free memory allocated for
3585         manager stack.
3587 2000-12-31  Ulrich Drepper  <drepper@redhat.com>
3589         * manager.c (pthread_alloca_stack): Remove MAP_FIXED from mmap calls.
3590         (pthread_free): Always unmap the stack.  It's safe now that we don't
3591         use MAP_FIXED to allocate stacks.
3593 2000-12-31  Ulrich Drepper  <drepper@redhat.com>
3595         * sysdeps/powerpc/pspinlock.c: Don't include pt-machine.h here.
3597         * manager.c (pthread_allocate_stack): Prepare for removal of MAP_FIXED.
3599 2000-11-15  Wolfram Gloger  <wg@malloc.de>
3601         * manager.c (pthread_free): [!FLOATING_STACKS]: Only remap the
3602         stack to PROT_NONE, don't unmap it, avoiding collisions with malloc.
3604 2000-12-27  Andreas Jaeger  <aj@suse.de>
3606         * Examples/ex13.c: Make local functions static.
3607         * ecmutex.c: Likewise.
3608         * joinrace.c: Likewise.
3609         * Examples/ex14.c: Likewise.
3611         * Examples/ex2.c: Make local functions static; reformat.
3612         * Examples/ex1.c: Likewise.
3613         * Examples/ex4.c: Likewise.
3614         * Examples/ex5.c: Likewise.
3615         * Examples/ex7.c: Likewise.
3617         * oldsemaphore.c: Add prototypes to shut up GCC.
3618         * pt-machine.c: Likewise.
3620         * weaks.c: Add prototype for pthread_exit.
3622         * internals.h: Add some prototypes, format prototypes and add
3623         missing externs.
3624         Move __libc_waitpid prototype to include/sys/wait.h.
3626         * rwlock.c: Include <bits/libc-lock.h> for prototypes.
3627         * mutex.c: Likewise.
3628         * specific.c: Likewise.
3629         * ptfork.c: Likewise.
3631         * lockfile.c: Include internals.h to get prototypes.
3632         * events.c: Likewise.
3633         * sysdeps/alpha/pspinlock.c: Likewise.
3634         * sysdeps/arm/pspinlock.c: Likewise.
3635         * sysdeps/hppa/pspinlock.c: Likewise.
3636         * sysdeps/i386/pspinlock.c: Likewise.
3637         * sysdeps/ia64/pspinlock.c: Likewise.
3638         * sysdeps/m68k/pspinlock.c: Likewise.
3639         * sysdeps/mips/pspinlock.c: Likewise.
3640         * sysdeps/powerpc/pspinlock.c: Likewise.
3641         * sysdeps/s390/pspinlock.c: Likewise.
3642         * sysdeps/sh/pspinlock.c: Likewise.
3643         * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
3644         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
3645         * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
3647 2000-12-27  Ulrich Drepper  <drepper@redhat.com>
3649         * attr.c (__pthread_attr_setstack): Fix setting of __stackaddr element.
3650         (__pthread_attr_getstack): Return correct address.
3651         Add warnings for using pthread_attr_getstackaddr and
3652         pthread_attr_setstackaddr.
3654 2000-12-26  Ulrich Drepper  <drepper@redhat.com>
3656         * Examples/ex6.c (test_thread): Make static.
3657         * Examples/ex12.c (test_thread): Make static and add noreturn
3658         attribute.
3660 2000-12-18  Jes Sorensen  <jes@linuxcare.com>
3662         * linuxthreads/sysdeps/ia64/pt-machine.h: __compare_and_swap
3663         and compare_and_swap_with_release_semantics returns int not long.
3665 2000-12-17  Andreas Jaeger  <aj@suse.de>
3667         * sysdeps/s390/pt-machine.h (testandset): Use long int as return
3668         value.
3669         * sysdeps/arm/pt-machine.h (testandset): Likewise.
3670         * sysdeps/hppa/pt-machine.h (testandset): Likewise.
3671         * sysdeps/m68k/pt-machine.h (testandset): Likewise.
3672         * sysdeps/sh/pt-machine.h (testandset): Likewise.
3673         * sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise.
3674         * sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise.
3676 2000-12-17  Ulrich Drepper  <drepper@redhat.com>
3678         * sysdeps/i386/pt-machine.h (testandset): Adjust for prototype change.
3679         * sysdeps/i386/i686/pt-machine.h (testandset): Likewise.
3681 2000-12-17  Andreas Jaeger  <aj@suse.de>
3683         * internals.h: Add prototypes for testandset and
3684         __compare_and_swap to shut up gcc warnings.
3686 2000-12-06  Wolfram Gloger  <wg@malloc.de>
3688         * join.c (pthread_detach): Allow case where the thread has already
3689         terminated.
3691 2000-12-05  Andreas Jaeger  <aj@suse.de>
3693         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't set mips2.
3694         * sysdeps/mips/pt-machine.h (testandset): Likewise.
3695         (__compare_and_swap): Likewise.
3696         Patches by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
3698 2000-11-20  Jakub Jelinek  <jakub@redhat.com>
3700         * Examples/ex3.c (main): Cast int to long before casting to void *.
3701         (search): Cast void * to long, not int.
3702         * Examples/ex8.c (main, thread): Similarly.
3703         * Examples/ex11.c (main): Similarly.
3704         * Examples/ex14.c (worker, do_test): Similarly.
3705         * ecmutex.c (worker, do_test): Similarly.
3706         (nlocks): Cast to int.
3708 2000-11-08  Bruce Mitchener  <bruce@cubik.org>
3710         * linuxthreads.texi:  Add documentation for pthreads attributes
3711         guardsize, stackaddr, stacksize, and stack.  Fix typo in previous
3712         patch.  Document pthread_[sg]etconcurrency().  Mark
3713         pthread_mutexattr_[sg]ettype() as POSIX rather than GNU.
3715 2000-11-07  Ulrich Drepper  <drepper@redhat.com>
3717         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
3718         Don't define it.
3719         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3720         Reported by Christopher Yeoh <cyeoh@linuxcare.com.au>.
3722 2000-11-06  Ulrich Drepper  <drepper@redhat.com>
3724         * cancel.c (pthread_cancel): Always set p_canceled, even if we are
3725         not doing it right now.
3726         Reported by Kaz Kylheku <kaz@ashi.footprints.net>.
3728 2000-10-30  Ulrich Drepper  <drepper@redhat.com>
3730         * Examples/ex4.c (main): Don't use exit() to avoid warning with
3731         broken compilers.
3733 2000-10-29  Ulrich Drepper  <drepper@redhat.com>
3735         * attr.c (__pthread_attr_setguardsize): Don't round guardsize
3736         here.  Reported by Bruce Mitchener <bruce@cubik.org>.
3738         * linuxthreads.texi: Changes terminology to 'type' from 'kind' when
3739         discussing mutexes. (As per the Unix98 name for the API.)
3740         Changes documentation for pthread_mutexattr_setkind_np() and
3741         pthread_mutexattr_getkind_np() over to the Unix98 APIs for the
3742         same: pthread_mutexattr_settype() and pthread_mutexattr_gettype().
3743         Changes references to PTHREAD_MUTEXATTR_FAST_NP to
3744         PTHREAD_MUTEXATTR_ADAPTIVE_NP.
3745         Begins to introduce discussion of the ``timed'' mutex type.  This
3746         discussion is currently incomplete.
3747         Patch by Bruce Mitchener <bruce@cubik.org>.
3749 2000-10-26  Kazumoto Kojima  <kkojima@rr.iij4u.or.jp>
3750             Yutaka Niibe  <gniibe@chroot.org>
3752         * sysdeps/sh/pt-machine.h (testandset): Since the operand of TAS.B
3753         has restrictions, use register.
3755 2000-10-23  Andreas Schwab  <schwab@suse.de>
3757         * Examples/ex14.c (TIMEOUT): Override default timeout.
3759 2000-10-16  Ulrich Drepper  <drepper@redhat.com>
3761         * specific.c: Protect tsd array modification in thread data
3762         structures by getting the thread lock in pthread_key_delete and
3763         __pthread_destroy_specifics.
3764         Patch by Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>.
3766 2000-10-12  Alan Modra <alan@linuxcare.com.au>
3768         * sysdeps/pthread/bits/initspin.h: New file.
3769         * spinlock.h: Move LOCK_INITIALIZER definition to <bits/initspin.h>.
3770         (__pthread_init_lock): Initialize lock with LT_SPINLOCK_INIT.
3771         (__pthread_alt_init_lock): Likewise.
3772         (__pthread_alt_trylock): Release lock with LT_SPINLOCK_INIT.
3774 2000-10-12  David Huggins-Daines  <dhd@linuxcare.com>
3776         * oldsemaphore.c (__old_sem_init): Release lock with
3777         LT_SPINLOCK_INIT, not zero.
3778         * spinlock.c (__pthread_unlock): Likewise.
3779         (__pthread_alt_lock): Likewise.
3780         (__pthread_alt_timedlock): Likewise.
3781         (__pthread_alt_unlock): Likewise.
3782         * sysdeps/pthread/bits/libc-lock.h: Initialize locks with
3783         LT_SPINLOCK_INIT if it is non-zero.  Likewise for init-once flags.
3784         * sysdeps/pthread/pthread.h: Include bits/initspin.h.  Use
3785         LT_SPINLOCK_INIT do initialize spinlocks not 0.
3787 2000-10-12  David Huggins-Daines <dhd@linuxcare.com>
3789         * shlib-versions: Add version definitions for hppa-linux.
3791 2000-10-12  Alan Modra <alan@linuxcare.com.au>
3793         * sysdeps/hppa/pspinlock.c: New file.
3794         * sysdeps/hppa/pt-machine.h: New file.
3795         * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: New file.
3797 2000-10-05  Jakub Jelinek  <jakub@redhat.com>
3799         * mutex.c (__pthread_mutex_destroy): Correct test of
3800         busy mutex for mutexes using alternate fastlocks.
3801         Patch by dtc@cmucl.cons.org.
3803 2000-09-28  Martin Schwidefsksy    <schwidefsky@de.ibm.com>
3805         * sysdeps/s390/pt-machine.h: Make %a0 the thread register.
3807 2000-09-28  Ulrich Drepper  <drepper@redhat.com>
3809         * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP
3810         test for owner first.
3811         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
3813         * cancel.c (pthread_cancel): Don't do anything if cancelation is
3814         disabled.
3816 2000-09-26  Ulrich Drepper  <drepper@redhat.com>
3818         * spinlock.h (__pthread_set_own_extricate_if): Optimize a bit.
3819         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
3821         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
3822         _POSIX_MONOTONIC_CLOCK.
3824         * spinlock.h (__pthread_set_own_extricate_if): Add back locking
3825         and explain why.
3827 2000-09-20  Andreas Jaeger  <aj@suse.de>
3829         * pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
3830         "testrtsig.h" conditional.
3832 2000-09-11  Ulrich Drepper  <drepper@redhat.com>
3834         * sysdeps/pthread/pthread.h: Declare pthread_attr_getstack and
3835         pthread_attr_setstack.
3836         * Versions [libpthread] (GLIBC_2.2): Export pthread_attr_getstack and
3837         pthread_attr_setstack.
3838         * attr.c (pthread_attr_getstack, pthread_attr_setstack): New functions.
3840 2000-09-05  Ulrich Drepper  <drepper@redhat.com>
3842         * Examples/ex14.c: New file.
3843         * Makefile (tests): Add ex14.
3845         * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
3846         mutex.  Patch by dtc@cmucl.cons.org.
3848         * ecmutex.c: New file.
3849         * Makefile (tests): Add ecmutex.
3851 2000-09-04  H.J. Lu  <hjl@gnu.org>
3853         * attr.c (__pthread_attr_setguardsize): Use page_roundup
3854         instead of roundup to round up to the page size.
3856 2000-09-03  Mark Kettenis  <kettenis@gnu.org>
3858         * manager.c (pthread_exited): Correctly report event as TD_REAP
3859         instead of TD_DEATH.  Fix comments.
3861 2000-09-03  Ulrich Drepper  <drepper@redhat.com>
3863         * spinlock.h (testandset): Add cast to avoid warning.
3864         Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
3866 2000-09-02  Andreas Jaeger  <aj@suse.de>
3868         * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
3869         prototype.
3871 2000-09-01  Ulrich Drepper  <drepper@redhat.com>
3873         * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
3874         Fix typo in last patch (_mode -> _flags).
3876         * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
3877         Provide definition which respects _IO_USER_LOCK flag.
3879 2000-08-30  Ulrich Drepper  <drepper@redhat.com>
3881         * manager.c (pthread_allocate_stack): Clear descriptor only if not
3882         mmaped.
3884 2000-08-25  Ulrich Drepper  <drepper@redhat.com>
3886         * Makefile: Add rules to build and run unload.
3887         * unload.c: New file.
3889         * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
3891         * sysdeps/pthread/pthread.h
3892         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
3893         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
3895 2000-08-24  Andreas Jaeger  <aj@suse.de>
3897         * Examples/ex13.c: Include <string.h> for strerror prototype and
3898         <stdlib.h> for abort prototype.
3899         (pthr_cond_signal_mutex): Rewrite to silence GCC.
3900         (thread_start): Remove unused variable err.
3901         (main): Silence GCC warnings.
3903 2000-08-22  Andreas Jaeger  <aj@suse.de>
3905         * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
3907         * Makefile (tests): Add ex13.
3909 2000-08-20  Ulrich Drepper  <drepper@redhat.com>
3911         * semaphore.h: Add restrict where required by AGd4.
3912         * sysdeps/pthread/pthread.h: Likewise.
3913         * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
3915 2000-08-15  Ulrich Drepper  <drepper@redhat.com>
3917         * Makefile (tests): Add ex12.  Add rule to build it.
3918         * Examples/ex12.c: New file.
3920 2000-08-13  Ulrich Drepper  <drepper@redhat.com>
3922         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
3923         even though the implementation is not quite complete (but it reports
3924         it).  Define _POSIX_MESSAGE_PASSING to -1.
3925         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3927 2000-08-12  Andreas Jaeger  <aj@suse.de>
3929         * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
3930         assembler.
3931         (__compare_and_swap): Likewise.
3932         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
3934 2000-08-10  Ulrich Drepper  <drepper@redhat.com>
3936         * pthread.c (__pthread_initial_thread): Initialize p_errnop and
3937         p_h_errnop correctly and not to NULL.
3939 2000-08-05  Ulrich Drepper  <drepper@redhat.com>
3941         * Banner: Bump version number to 0.9.
3943 2000-08-04  Ulrich Drepper  <drepper@redhat.com>
3945         * Makefile (tests): Add tststack.  Add rule to build the program.
3946         * tststack.c: New file.
3948         * internals.h: Declare __pthread_max_stacksize.
3949         * pthread.c (__pthread_max_stacksize): New variable.
3950         (__pthread_initialize_manager): Determine __pthread_initialize_manager
3951         value.
3952         * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
3953         (pthread_allocate_stack): Allow kernel to choose stack address if
3954         FLOATING_STACKS.  This also handles variable-sized stacks.
3955         Always allocate stack and guardpage together.  Use mprotect to
3956         change guardpage access.
3957         * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
3958         ARCH_STACK_MAX_SIZE.
3960         * attr.c (__pthread_attr_setstacksize): Also test value against
3961         upper limit.
3963         * manager.c (__pthread_nonstandard_stacks): Define only if
3964         THREAD_SELF is not defined.
3965         (pthread_allocate_stack): Always initialize gardaddr to a correct
3966         value.
3967         (pthread_handle_create): Unmap thread with one call.
3968         (pthread_free): Remove test for initial thread before removing stack.
3969         Unmap stack with one call.
3971         * pthread.c (__pthread_initial_thread): Initialize p_userstack to
3972         1 to avoid removing the stack.
3974 2000-07-27  Jes Sorensen  <jes@linuxcare.com>
3976         * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
3977         load of spin lock to prime the cache before the atomic compare and
3978         exchange operation (cmpxchg4). This avoids the spinning on the
3979         cmpxchg4 instruction and reduces movement of the cache line back
3980         and forth between the processors (explanation by Asis K. Mallick
3981         from Intel). This basically makes the implementation operate the
3982         same as the Linux kernel implementation.
3984         * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
3985         * sysdeps/ia64/pspinlock.c: New file.
3987 2000-08-03  Ulrich Drepper  <drepper@redhat.com>
3989         * pthread.c: Move definition of __pthread_set_own_extricate_if...
3990         * spinlock.h: ...here.  Remove locking.
3991         * internals.h: Remove __pthread_set_own_extricate_if prototype.
3993         * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
3994         (rwlock_rd_extricate_func): Don't determine self, let
3995         __pthread_lock do it.
3996         (rwlock_wr_extricate_func): Likewise.
3997         (rwlock_have_already): Optimize *pself handling a bit.
3999         * mutex.c: Use __builtin_expect.
4000         * pthread.c: Likewise.
4002 2000-08-02  Andreas Jaeger  <aj@suse.de>
4004         * sysdeps/s390/pspinlock.c: New file.
4005         * sysdeps/s390/pt-machine.h: New file.
4006         Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
4008 2000-07-12  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
4010         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
4011         R3K.
4012         * sysdeps/mips/pt-machine.h (testandset): Likewise.
4014 2000-07-26  Andreas Jaeger  <aj@suse.de>
4016         * pthread.c: Initialize p_sem_avail.
4018 2000-07-25  Ulrich Drepper  <drepper@redhat.com>
4020         * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
4021         * semaphore.c: Handle spurious wakeups.
4023         * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
4024         for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
4026         * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
4027         (__pthread_wait_for_restart): Likewise.
4029         * condvar.c (pthread_cond_wait): Also check whether thread is
4030         cancelable before aborting loop.
4031         (pthread_cond_timedwait): Likewise.
4033         * signals.c (pthread_sighandler): Remove special code to restrore
4034         %gs on x86.
4035         (pthread_sighandler_t): Likewise.
4037 2000-07-25  Mark Kettenis  <kettenis@gnu.org>
4039         * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
4040         * pthread.c: Include <resolv.h>.
4041         (_res): Undefine.  Add extern declaration.
4043 2000-07-24  Ulrich Drepper  <drepper@redhat.com>
4045         * pthread.c (__pthread_initial_thread): Update initializer.
4046         (__pthread_manager_thread): Likewise.
4047         (pthread_initialize): Move setrlimit call to...
4048         (__pthread_initialize_manager): ...here.
4049         (__pthread_reset_main_thread): Reset also soft limit on stack size.
4051         * condvar.c: Handle spurious wakeups.  [PR libc/1749].
4052         * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
4054 2000-07-21  Ulrich Drepper  <drepper@redhat.com>
4056         * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
4057         __compare_and_swap to define testandset.
4058         * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
4059         Define IMPLEMENT_TAS_WITH_CAS.
4061 2000-07-20  Ulrich Drepper  <drepper@redhat.com>
4063         * Makefile: Pass -z nodelete to linker for libpthread.so
4064         generation if it understand this option.
4066 2000-07-18  Mark Kettenis  <kettenis@gnu.org>
4068         * manager.c (pthread_handle_create): Remove initialization of
4069         new_thread->p_res._sock.
4071 2000-07-19  Kaz Kylheku  <kaz@ashi.footprints.net>
4073         Bugfixes to the variant of the code for machines with no compare
4074         and swap.
4076         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
4077         node was not being properly enqueued, due to failing to update
4078         the lock->__status field.
4080         * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
4081         being set inappropriately, causing the suspend function to be called
4082         with a null self pointer and crash.
4084 2000-07-18  Ulrich Drepper  <drepper@redhat.com>
4086         * spinlock.h (__pthread_alt_trylock): Fix code used if no
4087         compare&swap is available.
4089         * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
4090         compare_and_swap.
4092         * pthread.c (pthread_initialize): Don't use sysconf to determine
4093         whether the machine has more than one processor.
4095         * spinlock.c (__pthread_alt_timedlock): Add back one of the
4096         removed thread_self calls.
4098 2000-07-18  Kaz Kylheku  <kaz@ashi.footprints.net>
4100         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
4101         __compare_and_swap to compare_and_swap in code which assumes
4102         compare swap is available.
4104 2000-07-18  Kaz Kylheku  <kaz@ashi.footprints.net>
4106         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
4107         bug whereby thr field of waitnode structure would not be correctly
4108         set unless a null self pointer is passed to the functions.
4109         Eliminated redundant calls to thread_self().
4111 2000-07-18  Jakub Jelinek  <jakub@redhat.com>
4113         * pthread.c (__pthread_initialize_manager): Lock
4114         __pthread_manager_thread.p_lock before calling clone.
4116 2000-05-05  H.J. Lu  <hjl@gnu.org>
4118         * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
4119         have acquire semantics.
4120         (__compare_and_swap_with_release_semantics): New inline
4121         function.
4122         (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
4124 2000-01-28  Hans Boehm  <hboehm@exch.hpl.hp.com>
4126         * manager.c: Fix the problem with signals at startup.
4127         Change the way that thread stacks are allocated on IA64.
4128         Clean up some of the guard page allocation stuff.
4130 1999-12-19  H.J. Lu  <hjl@gnu.org>
4132         * internals.h (page_roundup): New.
4133         * attr.c (__pthread_attr_setguardsize); Use page_roundup
4134         instead of roundup.
4135         * manager.c (pthread_allocate_stack): Make sure guardaddr is
4136         page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
4137         is define.
4139 1999-12-17  Hans Boehm  <hboehm@exch.hpl.hp.com>
4141         * manager.c (pthread_allocate_stack): Unmap the stack top
4142         if failed to map the stack bottom.
4143         Fix the guard page.
4144         (pthread_free): Fix the guard page.
4146         * pthread.c (pthread_initialize): Set rlimit correctly for
4147         NEED_SEPARATE_REGISTER_STACK.
4149 1999-12-16  H.J. Lu  <hjl@gnu.org>
4151         * pthread.c (__pthread_initialize_manager): Pass
4152         __pthread_manager_thread_bos instead of
4153         __pthread_manager_thread_tos to __clone2.
4155 1999-12-16  H.J. Lu  <hjl@gnu.org>
4157         * manager.c (pthread_allocate_stack): Correct the calculation
4158         of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
4159         stack bottom.
4161 1999-12-13  H.J. Lu  <hjl@gnu.org>
4163         * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
4164         bit after setting ar.ccv.
4166 1999-12-12  H.J. Lu  <hjl@gnu.org>
4168         * manager.c (pthread_allocate_stack): Make the starting
4169         address of the stack bottom page aligned. FIXME: it may
4170         need changes in other places.
4171         (pthread_handle_create): Likewise.
4173 1999-12-11  Hans Boehm  <hboehm@exch.hpl.hp.com>
4175         * manager.c (pthread_allocate_stack): Handle
4176         NEED_SEPARATE_REGISTER_STACK.
4177         (pthread_handle_create): Likewise.
4178         * pthread.c (__pthread_initialize_manager): Likewise.
4180         * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
4182 1999-12-02  H.J. Lu  <hjl@gnu.org>
4184         * sysdeps/ia64/pt-machine.h: New.
4186 2000-07-13  Ulrich Drepper  <drepper@redhat.com>
4188         * wrapsyscall.c: Mark non-__ protected names as weak.
4189         PR libc/1466.
4191 2000-07-12  Bruno Haible  <haible@clisp.cons.org>
4193         * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
4195 2000-07-12  Ulrich Drepper  <drepper@redhat.com>
4197         * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
4198         Add tests also to new alternative spinlock implementation.
4199         * spinlock.h: Likewise.
4200         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4202 2000-07-06  Ulrich Drepper  <drepper@redhat.com>
4204         * Version: Export __sigaction.
4205         * signals.c: Define __sigaction alias.  Use __libc_sigaction instead
4206         of __sigaction.
4207         * pthread.c: Use __libc_sigaction instead of __sigaction.
4209         * condvar.c: Implement pthread_condattr_getpshared and
4210         pthread_condattr_setpshared.
4211         * mutex.c: Implement pthread_mutexattr_getpshared and
4212          pthread_mutexattr_setpshared.
4213         * Versions: Export new functions.
4214         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
4216         * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
4217         (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
4218         is not selected.
4220 2000-07-04  Greg McGary  <greg@mcgary.org>
4222         * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
4223         pragmas.  Include bp-sym.h only if _LIBC.
4225 2000-07-04  Ulrich Drepper  <drepper@redhat.com>
4227         * spinlock.c (__pthread_unlock): Properly place write barrier.
4228         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4230 2000-07-03  Ulrich Drepper  <drepper@redhat.com>
4232         * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
4233         faster on SMP systems.  No more emulation of compare&swap for adaptive
4234         spinlocks.
4235         * spinlock.h: Likewise.
4236         * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
4237         Replace fast with adaptive mutex.
4238         * mutex.c: Rewrite for replacement of fast by adaptive mutex.
4239         * condvar.c: Likewise.
4240         * pthread.c: Define and initialize __pthread_smp_kernel variable.
4241         * internals.h: Declare __pthread_smp_kernel.
4242         * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
4243         _pthread_fastlock structure.
4244         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4246         * pthread.c: Remove initialization to zero from global variables.
4248 2000-06-29  Jakub Jelinek  <jakub@redhat.com>
4250         * shlib-versions: Make sparc64 GLIBC_2.2+ only.
4252 2000-06-28  Greg McGary  <greg@mcgary.org>
4254         * weaks.c: Wrap BP_SYM () around weak extern declarations of
4255         pthread functions that have pointers in their return+arg signatures.
4257 2000-06-27  Greg McGary  <greg@mcgary.org>
4259         * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
4260         extern declarations of pthread functions that have pointers in
4261         their return+arg signatures.
4263 2000-06-26  Ulrich Drepper  <drepper@redhat.com>
4265         * Makefile (tests): Add ex11.  Add rules to build it.
4266         * Examples/ex11.c: New file.
4267         * rwlock.c: Fix complete braindamaged previous try to implement
4268         timedout functions.
4270         * spinlock.c: Pretty print.
4272 2000-06-25  Ulrich Drepper  <drepper@redhat.com>
4274         * Makefile (tests): Add ex10.  Add rules to build it.
4275         * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
4276         pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
4277         * condvar.c (pthread_cond_wait): Allow mutex of kind
4278         PTHREAD_MUTEX_TIMED_NP.
4279         (pthread_cond_timedwait_relative): Likewise.
4280         * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
4281         (__pthread_mutex_trylock): Use __pthread_alt_trylock for
4282         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
4283         (__pthread_mutex_lock): Use __pthread_alt_lock for
4284         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
4285         (__pthread_mutex_timedlock): New function.
4286         (__pthread_mutex_unlock): Use __pthread_alt_unlock for
4287         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
4288         (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
4289         (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
4290         * spinlock.c: Implement alternate fastlocks.
4291         * spinlock.h: Add prototypes.
4292         * Examples/ex10.c: New file.
4293         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
4294         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4296         * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
4297         (__pthread_rwlock_timedrdlock): New function.
4298         (__pthread_rwlock_timedwrlock): New function.
4299         Use laternate fastlock function everywhere.
4301 2000-06-21  Andreas Jaeger  <aj@suse.de>
4303         * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
4304         prototype.
4306         * join.c: Include <stdlib.h> for exit prototype.
4308 2000-06-20  Ulrich Drepper  <drepper@redhat.com>
4310         * sysdeps/i386/useldt.h: Include <stdlib.h>.
4312         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
4313         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4315         * Makefile (libpthread-routines): Add barrier.
4316         (tests): Add ex9.  Add rule to build ex9.
4317         * Versions: Export barrier functions.
4318         * barrier.c: New file.
4319         * Examples/ex9.c: New file.
4320         * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
4321         * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
4322         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4324 2000-06-19  H.J. Lu  <hjl@gnu.org>
4326         * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
4327         HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
4328         (compare_and_swap_with_release_semantics): New. Default to
4329         compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
4330         is not defined.
4332         * spinlock.c (__pthread_unlock): Call
4333         compare_and_swap_with_release_semantics () instead of
4334         compare_and_swap ().
4336 2000-06-19  Ulrich Drepper  <drepper@redhat.com>
4338         * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
4339         to errno directly.
4340         * sysdeps/pthread/timer_delete.c: Likewise.
4341         * sysdeps/pthread/timer_getoverr.c: Likewise.
4342         * sysdeps/pthread/timer_gettime.c: Likewise.
4343         * sysdeps/pthread/timer_settime.c: Likewise.
4345 2000-06-13  Kaz Kylheku  <kaz@ashi.footprints.net>
4347         Timer nodes are now reference counted, and can be marked
4348         as deleted. This allows for the safe release of the global mutex
4349         in the middle without losing the timer being operated on.
4351         * sysdeps/pthread/posix-timer.h (struct timer_node):  The inuse
4352         member is now an enum with three values, so that an intermediate
4353         state can be represented (deleted but not free for reuse yet).
4354         New refcount member added.
4355         * sysdeps/pthread/timer_routines.c: Likewise.
4357         * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
4358         timer_valid): New inline functions added.
4360         * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
4361         restructured, recursive deadlock bug fixed.
4363         * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
4364         timer_addref to ensure that timer won't be deleted while mutex is not
4365         held. Also uses timer_invalid to perform validation of timer handle.
4366         * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
4367         * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
4369 2000-06-14  Ulrich Drepper  <drepper@redhat.com>
4371         * shlib-versions: Add entry for SH.
4372         Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
4374 2000-06-13  Kaz Kylheku  <kaz@ashi.footprints.net>
4376         A few optimizations.  Got rid of unnecessary wakeups of timer threads,
4377         tightened up some critical regions and micro-optimized some list
4378         manipulation code.
4380         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
4381         Returns int value now to indicate whether timer was queued at head.
4382         * sysdeps/pthread/posix-timer.h: Likewise.
4383         * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
4384         new return value from __timer_thread_queue_timer to avoid waking
4385         up timer thread unnecessarily.
4387         * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
4388         inuse flag, because this requires mutex to be held.  Callers updated
4389         to do the check when they have the mutex.
4390         * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
4392         * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
4393         regions: avoids making system calls while holding timer mutex, and
4394         a few computations were moved outside of the mutex as well.
4395         * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
4397         * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
4398         to list_unlink_ip, meaning idempotent.  Pointer manipulation
4399         changed to get better better code out of gcc.
4400         * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
4401         version of list_unlink added here.
4402         * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
4403         function in all places: idempotent one for timers, non-idempotent
4404         one for thread nodes.
4405         * sysdeps/pthread/timer_settime: Likewise.
4406         * sysdeps/pthread/timer_routines.c: Likewise.
4408 2000-06-13  Ulrich Drepper  <drepper@redhat.com>
4410         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
4411         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4413         * sysdeps/pthread/Makefile: Remove tests definition.
4415 2000-06-12  Kazumoto Kojima  <kkojima@rr.iij4u.or.jp>
4416             Yutaka Niibe  <gniibe@chroot.org>
4418         * sysdeps/sh/pspinlock.c: New file.
4419         * sysdeps/sh/pt-machine.h: New file.
4421 2000-06-12  Ulrich Drepper  <drepper@redhat.com>
4423         * Makefile (tests): Add joinrace.
4425         * Examples/ex6.c: Test return value of pthread_join.
4427 2000-06-11  Geoff Keating  <geoffk@cygnus.com>
4429         * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
4430         (__pthread_spin_trylock): Implement.
4431         (__pthread_spin_unlock): Implement.
4432         (__pthread_spin_init): Implement.
4433         (__pthread_spin_destroy): Implement.
4435 2000-06-10  Ulrich Drepper  <drepper@redhat.com>
4437         * sysdeps/pthread/timer_routines.c (list_append): Little fix to
4438         really append the entry.
4440 2000-06-10  Andreas Jaeger  <aj@suse.de>
4442         * lockfile.c (__fresetlockfiles): Remove unused variable fp.
4444 2000-06-10  Kaz Kylheku  <kaz@ashi.footprints.net>
4446         * sysdeps/pthread/timer_create.c: Thread matching now done on
4447         clock type as well as thread attributes.
4448         There are individual global signal-delivering threads for
4449         different clock types.
4450         * sysdeps/pthread/posix-timer.h: Likewise.
4451         * sysdeps/pthread/timer_routines.c: Likewise.
4453         * sysdeps/pthread/timer_routines.c: Thread allocation and
4454         deallocation function now remembers to put thread on active
4455         list and remove from active list.
4456         Thus now the feature of binding multiple timers
4457         to a single thread actually works.
4459 2000-06-10  Ulrich Drepper  <drepper@redhat.com>
4461         * pthread.c (__pthread_create_2_1): Optimize a bit.
4463         * internals.h (invalid_handle): Also test for p_terminated != 0.
4464         (nonexisting_handle): New function.  Same as old invalid_handle.
4465         * join.c (pthread_join): Use nonexisting_handle instead of
4466         invalid_handle to test for acceptable thread handle.
4467         * manager.c (pthread_handle_free): Likewise.
4468         * joinrace.c: New file.
4469         Reported by Permaine Cheung <pcheung@cygnus.com>.
4471 2000-06-08  Ulrich Drepper  <drepper@redhat.com>
4473         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
4474         Correct handling of matching variable.
4476         * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
4477         avoid warnings.
4479         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
4480         Be prepared for empty timer list.
4482         * sysdeps/pthread/timer_create.c (timer_create): Correct names of
4483         CPUTIME clock ID.  Add support for thread clocks.
4485         * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
4486         subtraction were switched.
4488         * sysdeps/pthread/timer_routines.c (init_module): Use
4489         THREAD_MAXNODES threads.
4491         * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
4492         * sysdeps/pthread/timer_create.c: Fill in creator_pid.
4493         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
4494         with sigqueueinfo is this system call is available.
4496         * sysdeps/pthread/timer_create.c (timer_create): Allow
4497         CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
4499         * sysdeps/pthread/Makefile: New file.  Add rules to build timer
4500         functionality.
4501         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
4503 2000-06-04  Kaz Kylheku  <kaz@ashi.footprints.net>
4505         * sysdeps/pthread/posix-timer.h: New file.
4506         * sysdeps/pthread/timer_create.c: New file.
4507         * sysdeps/pthread/timer_delete.c: New file.
4508         * sysdeps/pthread/timer_getoverr.c: New file.
4509         * sysdeps/pthread/timer_gettime.c: New file.
4510         * sysdeps/pthread/timer_routines.c: New file.
4511         * sysdeps/pthread/timer_settime.c: New file.
4512         * sysdeps/pthread/tst-timer.c: New file.
4514 2000-06-08  Ulrich Drepper  <drepper@redhat.com>
4516         * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
4517         LINK_MAX definitions if necessary.
4519 2000-06-04  Kaz Kylheku  <kaz@ashi.footprints.net>
4521         Added missing fork time handling of global libio lock.
4523         * lockfile.c (__fresetlockfiles): Now also resets the list lock,
4524         not just the individual stream locks. Rewritten to use new
4525         iterator interface provided by libio rather than accessing
4526         global variable.
4528         * lockfile.c (__flockfilelist, _funlockfilelist): New functions
4529         which lock and unlock the stream list using the new interface
4530         provied by libio.
4531         * internals.h: Likewise.
4533         * ptfork.c (__fork): Now calls __flockfilelist before fork,
4534         and __funlockfilelist in the parent after the fork.
4535         Child still calls __fresetlockfiles as before.
4537         * linuxthreads.texi: Now explains what happens to streams at
4538         fork time. Also whole new section on forking and thread added.
4539         Definition of pthread_atfork moved out of Miscellaneous Functions
4540         to this new section.
4542 2000-06-04  Jakub Jelinek  <jakub@redhat.com>
4544         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
4545         Add missing register.
4546         * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
4548 2000-06-02  Jakub Jelinek  <jakub@redhat.com>
4550         * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
4551         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
4552         * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
4554 2000-05-31  Andreas Jaeger  <aj@suse.de>
4556         * sysdeps/mips/pspinlock.c: Implement spinlocks.
4558 2000-05-28  Ulrich Drepper  <drepper@redhat.com>
4560         * spinlock.c (__pthread_lock): Remove ASSERT.
4562         * Makefile (tests): Add ex8.
4563         * Examples/ex8.c: New file.
4565 2000-05-12  Kaz Kylheku  <kaz@ashi.footprints.net>
4567         Bugfix: The pthread_atfork mechanism now takes care of its
4568         own internal mutex at fork time.
4570         * ptfork.c (__fork): Revised so that the mutex is held across
4571         the fork operation and while the handlers are called, and so that
4572         the child resets the mutex.
4574         * linuxthreads.texi: Updated pthread_atfork documentation to make
4575         it clear that fork and pthread_atfork can't be reentered from
4576         atfork handlers, that pthread_atfork and fork are mutually atomic,
4577         and that the handlers are inherited by the child process.
4579 2000-05-24  Ulrich Drepper  <drepper@redhat.com>
4581         * Makefile (libpthread-routines): Add pspinlock.
4582         * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
4583         Use struct _pthread_fastlock instead of pthread_spinlock_t.
4584         * condvar.c: Likewise.
4585         * internals.h: Likewise.
4586         * join.c: Likewise.
4587         * manager.c: Likewise.
4588         * mutex.c: Likewise.
4589         * pthread.c: Likewise.
4590         * rwlock.c: Likewise.
4591         * semaphore.c: Likewise.
4592         * signals.c: Likewise.
4593         * spinlock.h: Likewise.
4594         * spinlock.c: Likewise.  Remove pthread_spin_lock functions.
4595         * sysdeps/alpha/pspinlock.c: New file.
4596         * sysdeps/arm/pspinlock.c: New file.
4597         * sysdeps/i386/pspinlock.c: New file.
4598         * sysdeps/m68k/pspinlock.c: New file.
4599         * sysdeps/mips/pspinlock.c: New file.
4600         * sysdeps/powerpc/pspinlock.c: New file.
4601         * sysdeps/sparc/sparc32/pspinlock.c: New file.
4602         * sysdeps/sparc/sparc64/pspinlock.c: New file.
4603         * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
4604         back to _pthread_fastlock.  Define new pthread_spinlock_t.
4606 2000-05-24  Andreas Jaeger  <aj@suse.de>
4608         * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
4610 2000-05-21  Jakub Jelinek  <jakub@redhat.com>
4612         * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
4614 2000-05-13  Jakub Jelinek  <jakub@redhat.com>
4616         * internals.h (__RES_PTHREAD_INTERNAL): Define.
4618 2000-05-06  Kaz Kylheku  <kaz@ashi.footprints.net>
4620         * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
4621         object state is represented with additional bits which distinguish
4622         whether that state was set up in the current process, or
4623         in an ancestor process. If that state was set in an ancestor,
4624         it means that a fork happened while thread was executing the init
4625         function. In that case, the state is reset to NEVER.
4626         * mutex.c (__pthread_once_fork_prepare): New function.
4627         (__pthread_once_fork_child): Likewise
4628         (__pthread_once_fork_parent): Likewise
4629         (__pthread_reset_pthread_once): Removed.
4630         * ptfork.c (__fork): Call new handlers in mutex.c.
4631         * internals.h: Declarations of new mutex.c functions added.
4632         Declaration of removed function deleted.
4633         * linuxthreads.texi: Updated documentation about pthread_once
4634         to clarify what happens under cancellation and forking.
4636 2000-05-06  Kaz Kylheku  <kaz@ashi.footprints.net>
4638         * internals.h: New thread manager request type, REQ_KICK.
4639         * join.c (pthread_exit): main thread now calls exit() instead
4640         of _exit() in order to proper process cleanup.
4641         * manager.c (__pthread_manager): Do not terminate manager
4642         after unblocking main thread; wait for main thread's
4643         REQ_PROCESS_EXIT request instead.
4644         Also, added REQ_KICK case to handle new request; this just does
4645         nothing.
4646         * manager.c (pthread_exited): Do not terminate manager after
4647         unblocking main thread.
4648         * manager.c (__pthread_manager_sighandler): If the main thread
4649         is waiting for all other threads to die, send a REQ_KICK into
4650         the thread manager request pipe to get it to clean out the threads
4651         and unblock the main thread as soon as possible. This fixes
4652         the 2000 millisecond hang on shutdown bug.
4653         * Examples/ex7.c: New file, tests shutdown behavior when all threads
4654         including the main one call pthread_exit(), or implicitly do so.
4655         * Makefile (tests): Add ex7.
4657 2000-05-05  Andreas Jaeger  <aj@suse.de>
4659         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
4660         (pthread_getcpuclockid): Correct test for ourselves.
4662 2000-05-05  Ulrich Drepper  <drepper@redhat.com>
4664         * internals.h (struct _pthread_descr_struct): Reorganization.
4665         Allocate room for 16 pointers at head of the structure for future
4666         thread-local data handling.  Move p_self member in this area.
4667         * manager.c (pthread_handle_create): Adjust use of p_self.
4668         * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
4669         * pthread.c (__pthread_initial_thread): Adjust initialization.
4670         (__pthread_manager_thread): Likewise.
4672 2000-04-29  Bruno Haible  <haible@clisp.cons.org>
4674         * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
4675         for eventmask larger than 1 word.
4677 2000-04-27  Ulrich Drepper  <drepper@redhat.com>
4679         * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
4680         * pthread.c (__pthread_initialize_minimal): New function.  Perform
4681         minimal initialization.
4682         (pthread_initialize): Remove this code here.
4683         * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again.  We
4684         are working around the problem in glibc.
4686 2000-04-25  Ulrich Drepper  <drepper@redhat.com>
4688         * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
4689         now.  First gcc must be fixed (more concrete: libgcc).
4691 2000-04-24  Ulrich Drepper  <drepper@redhat.com>
4693         * pthread.c: Remove special treatement for interrupt handlers on x86.
4694         * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
4695         * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
4696         necessary.
4697         * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
4699 2000-04-24  Mark Kettenis  <kettenis@gnu.org>
4701         * join.c (pthread_exit): Set p_terminated after reporting the
4702         termination event instead of before.
4704 2000-04-20  Jakub Jelinek  <jakub@redhat.com>
4706         * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
4707         if __USE_UNIX98.
4709 2000-04-18  Andreas Jaeger  <aj@suse.de>
4711         * Versions: Use ld instead of ld.so.
4713 2000-04-18  Jakub Jelinek  <jakub@redhat.com>
4715         * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
4716         Remove the typedef keyword.
4718 2000-04-18  Jakub Jelinek  <jakub@redhat.com>
4720         * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
4721         not stbar.
4722         (READ_MEMORY_BARRIER): Define.
4723         * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
4724         MEMORY_BARRIER.
4725         * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
4726         headers.
4728 2000-04-17  Ulrich Drepper  <drepper@redhat.com>
4730         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
4731         (pthread_getcpuclockid): Don't compare thread_id with thread_self,
4732         use thread_handle().
4734 2000-04-16  Ulrich Drepper  <drepper@redhat.com>
4736         * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
4737         if fast mutex is used.  Don't initialize `already_canceled' twice.
4738         Correctly test for return value of timedsuspend.
4740         * pthread.c: Correct long-time braino.  We never set SA_SIGINFO and
4741         therefore don't need the _rt versions of the signal handlers.
4743 2000-04-15  Ulrich Drepper  <drepper@redhat.com>
4745         * pthread.c (pthread_yield): New function.
4746         * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
4747         * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
4748         * internals.h: Declare __pthread_yield.
4750         * pthread.c (pthread_initialize): Avoid a bit more code if
4751         realtime signals are known to exist.
4753         * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
4754         to dynamically detect RT signals and avoid generating compatibility
4755         functions with old kernel.
4756         * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
4757         __pthread_restart_new directly.
4758         (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
4759         __pthread_wait_for_restart_signal directly.
4760         (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
4761         __pthread_timedsuspend_new directly.
4763 2000-04-15  Ulrich Drepper  <drepper@redhat.com>
4765         * condvar.c: Remove all the special code to handle cond_timedwait.
4766         Use timedsuspend instead.
4767         * internals.h: Declare __pthread_timedsuspend_old,
4768         __pthread_timedsuspend_new, and __pthread_timedsuspend.
4769         Remove declaration of __pthread_init_condvar.
4770         * pthread.c: Define __pthread_timedsuspend variable.
4771         (__pthread_timedsuspend_old): New function.  Timed suspension
4772         implementation for old Linux kernels.
4773         (__pthread_timedsuspend_new): New function.  Timed suspension
4774         implementation for new Linux kernels.
4775         * restart.h (timedsuspend): New function.  Call appropriate
4776         suspension function through __pthread_timedsuspend.
4777         * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
4778         the code.
4779         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4781         * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
4782         undefined.
4783         * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
4784         where possible.
4785         * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
4786         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
4788         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
4789         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4791 2000-04-14  Andreas Jaeger  <aj@suse.de>
4793         * weaks.c: Fix typo.
4795         * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
4796         2.2 for linuxthreads.
4798 2000-04-13  Ulrich Drepper  <drepper@redhat.com>
4800         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
4801         (pthread_getcpuclockid): Fix typo.
4803 2000-04-12  Ulrich Drepper  <drepper@redhat.com>
4805         * Makefile (libpthread-routines): Add getcpuclockid.
4806         * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
4807         * sysdeps/pthread/getcpuclockid.c: New file.
4808         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
4809         * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
4811         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):
4812         Defined.
4813         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4815         * sysdeps/pthread/pthread.h: Add prototypes for pthread_spin_init,
4816         pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
4817         and pthread_spin_unlock.
4818         * sysdeps/pthread/bits/pthreadtypes.h: Change struct _pthread_fastlock
4819         into pthread_spinlock_t.  Change all uses.
4820         * spinlock.c: Implement pthread_spin_lock.
4821         Rename __pthread_unlock to __pthread_spin_unlock and define weak
4822         alias for real name.
4823         Define pthread_spin_trylock, pthread_spin_init, and
4824         pthread_spin_destroy.
4825         Change all uses of _pthread_fastlock to pthread_spinlock_t.
4826         * spinlock.h: Rename __pthread_unlock to __pthread_spin_unlock.
4827         Change all uses of _pthread_fastlock to pthread_spinlock_t.
4828         * Versions [libpthread] (GLIBC_2.2): Add pthread_spin_init,
4829         pthread_spin_destroy, pthread_spin_lock, pthread_spin_trylock,
4830         and pthread_spin_unlock.
4831         * cancel.c: Use __pthread_spin_unlock instead of __pthread_unlock.
4832         Change all uses of _pthread_fastlock to pthread_spinlock_t.
4833         * condvar.c: Likewise.
4834         * internals.h: Likewise.
4835         * join.c: Likewise.
4836         * manager.c: Likewise.
4837         * mutex.c: Likewise.
4838         * pthread.c: Likewise.
4839         * rwlock.c: Likewise.
4840         * semaphore.c: Likewise.
4841         * signals.c: Likewise.
4843         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add various new POSIX
4844         macros.
4845         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
4847 2000-04-11  Ulrich Drepper  <drepper@redhat.com>
4849         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add
4850         _POSIX_SHARED_MEMORY_OBJECTS.
4852 2000-04-11  Andreas Jaeger  <aj@suse.de>
4854         * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Define.
4855         (__compare_and_swap): Mark as modifying memory.
4857 2000-04-11  Geoff Keating  <geoffk@cygnus.com>
4859         * sysdeps/powerpc/pt-machine.h (MEMORY_BARRIER): Don't be
4860         __volatile__.
4861         (__compare_and_swap): Replace other 'sync' with MEMORY_BARRIER.
4862         Don't have the 'asm' __volatile__.
4864 2000-04-11  Ulrich Drepper  <drepper@redhat.com>
4866         * internals.h: Define MEMORY_BARRIER as empty if not defined already.
4867         * spinlock.c (__pthread_lock): Add memory barriers.
4868         (__pthread_unlock): Likewise.
4869         * sysdeps/alpha/pt-machine.h (MEMORY_BARRIER): Define using mb
4870         instruction.
4871         (RELEASE): Not needed anymore.
4872         (__compare_and_swap): Mark asm as modifying memory.
4873         * sysdeps/powerpc/pt-machine.h (sync): Remove.  Replace with definition
4874         of MEMORY_BARRIER.
4875         (__compare_and_swap): Use MEMORY_BARRIER instead of sync.
4876         * sysdeps/sparc/sparc32/pt-machine.h (RELEASE): Not needed anymore.
4877         (MEMORY_BARRIER): Define using stbar.
4878         * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Define using
4879         stbar.
4880         (__compare_and_swap): Use MEMORY_BARRIER to ensure ordering.
4881         Patch by Xavier Leroy <Xavier.Leroy@inria.fr> based on comments by
4882         Mike Burrows <m3b@pa.dec.com>.
4884 2000-04-09  Ulrich Drepper  <drepper@redhat.com>
4886         * signals.c (sigaction): Fix return value for the case SIG is one
4887         of the signals the implementation uses.
4888         Patch by Xavier.Leroy@inria.fr.
4890 2000-04-01  Andreas Jaeger  <aj@suse.de>
4892         * attr.c: Use shlib-compat macros.
4893         * oldsemaphore.c: Likewise.
4894         * pthread.c: Likewise.
4895         * weaks.c: Likewise.
4897 2000-03-26  Ulrich Drepper  <drepper@redhat.com>
4899         * semaphore.c (sem_timedwait): New function.
4900         Patch by Carl Mailloux <carlm@oricom.ca>.
4901         * semaphore.h: Declare sem_timedwait.
4902         * Versions [libpthread] (GLIBC_2.2): Add sem_timedwait.
4904 2000-03-26  Roland McGrath  <roland@baalperazim.frob.com>
4906         * sysdeps/pthread/Makefile: File removed.
4908 2000-03-23  Ulrich Drepper  <drepper@redhat.com>
4910         * mutex.c (__pthread_reset_pthread_once): Reset once_masterlock.
4911         * internals.h (__pthread_reset_pthread_once): Add prototype.
4912         * ptfork.c (__fork): Call __pthread_reset_pthread_once.
4914         * manager.c (pthread_handle_create): Store ID of new thread before
4915         clone call.
4917 2000-03-21  Ulrich Drepper  <drepper@redhat.com>
4919         * attr.c: Use new macros from shlib-compat.h to define versions.
4920         * oldsemaphore.c: Likewise.
4921         * semaphore.c: Likewise.
4922         * weaks.c: Likewise.
4924         * pthread.c: Update for new SHLIB_COMPAT definition.
4926         * manager.c (__pthread_manager): Unmask debug signal.
4928         * pthread.c (pthread_initialize): Test for address of __dso_handle
4929         being NULL, not value.  Use __on_exit, not on_exit.
4930         Patch by Andreas Jaeger <aj@suse.de>.
4932         * pthread.c: Use new macros from shlib-compat.h to define versions.
4934 2000-03-19  Ulrich Drepper  <drepper@redhat.com>
4936         * pthread.c (pthread_initialize): Instead of on_exit use
4937         __cxa_atexit if __dso_label is available to allow unloading the
4938         libpthread shared library.
4940 2000-03-16  Ulrich Drepper  <drepper@redhat.com>
4942         * condvar.c: Make tests for ownership of mutex less strict.
4944 2000-03-14  Ulrich Drepper  <drepper@redhat.com>
4946         * condvar.c (pthread_cond_wait): Check whether mutex is owned by
4947         current thread and return error if not.
4948         (pthread_cond_timedwait_relative_old): Likewise.
4949         (pthread_cond_timedwait_relative_new): Likewise.
4951         * mutex.c (__pthread_once): Handle cancelled init function correctly.
4952         (pthread_once_cancelhandler): New function.
4953         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4955 2000-03-14  Andreas Jaeger  <aj@suse.de>
4957         * pthread.c (pthread_handle_sigcancel_rt): GS has been renamed to
4958         REG_GS.
4959         (pthread_handle_sigrestart_rt): Likewise.
4960         * signals.c (pthread_sighandler_rt): Likewise.
4962 2000-03-02  Andreas Jaeger  <aj@suse.de>
4964         * sysdeps/pthread/bits/libc-lock.h: Fix typo.
4965         Reported by Sean Chen <sean.chen@turbolinux.com>.
4967 2000-02-28  Andreas Jaeger  <aj@suse.de>
4969         * rwlock.c: Fix typo.
4971 2000-02-27  Ulrich Drepper  <drepper@redhat.com>
4973         * rwlock.c: Define __* variants of the functions and make old names
4974         aliases.
4975         * Versions [GLIBC_2.2]: Export the __pthread_rwlock_* functions.
4976         * sysdeps/pthread/bits/libc-lock.h: Define __libc_rwlock_* macros.
4978 2000-02-25  Andreas Jaeger  <aj@suse.de>
4980         * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
4981         pwrite64, lseek64, open64, and __open64 with version 2.2.
4983 2000-02-22  Ulrich Drepper  <drepper@redhat.com>
4985         * semaphore.h (SEM_FAILED): Use 0 not NULL.
4987 2000-02-14  Ulrich Drepper  <drepper@redhat.com>
4989         * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
4990         nanosleep does not work either.  Get absolute time inside the
4991         loop.
4992         (pthread_cond_timedwait_relative_new): Likewise.
4993         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
4995 2000-02-13  Andreas Jaeger  <aj@suse.de>
4997         * condvar.c (pthread_cond_timedwait_relative_new): Fix last patch.
4998         (pthread_cond_timedwait_relative_old): Likewise.
5000 2000-02-13  Ulrich Drepper  <drepper@redhat.com>
5002         * condvar.c (pthread_cond_timedwait_relative_old): Undo last patch
5003         but keep the code around.  A bug in the kernel prevent us from
5004         using the code.
5005         (pthread_cond_timedwait_relative_new): Likewise.
5006         (PR libc/1597 and libc/1598).
5008 2000-02-01  Kaz Kylheku  <kaz@ashi.footprints.net>
5010         * condvar.c (pthread_cond_timedwait_relative_old): Do tight
5011         loop around nanosleep calls instead of around most of the function
5012         (pthread_cond_timedwait_relative_new): Likewise.
5013         body.  Got rid of backwards goto and one local.
5015 2000-01-31  Ulrich Drepper  <drepper@redhat.com>
5017         * condvar.c (pthread_cond_timedwait_relative_old): Recompute time
5018         before every nanosleep call to account for time spent in the rest
5019         of the function.
5020         (pthread_cond_timedwait_relative_new): Likewise.
5021         Patch by khendricks@ivey.uwo.ca (PR libc/1564).
5023 2000-01-29  Ulrich Drepper  <drepper@redhat.com>
5025         * condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
5026         from nanosleep call so that in case we restart we only wait for the
5027         remaining time.
5028         (pthread_cond_timedwait_relative_new): Likewise.
5029         Patch by khendricks@ivey.uwo.ca (PR libc/1561).
5031 2000-01-18  Ulrich Drepper  <drepper@cygnus.com>
5033         * manager.c (pthread_allocate_stack): Compute guard page address
5034         correctly.  Patch by HJ Lu.
5036         * sysdeps/pthread/pthread.h: Define
5037         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP.
5039 2000-01-16  Ulrich Drepper  <drepper@cygnus.com>
5041         * rwlock.c (pthread_rwlock_unlock): Correct one more problem with
5042         preference handling.
5043         (pthread_rwlockattr_setkind_np): Allow
5044         PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP.
5045         Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
5047 2000-01-12  Ulrich Drepper  <drepper@cygnus.com>
5049         * internals.h (pthread_readlock_info): New structure.
5050         (_pthread_descr_struct): Add p_readlock_list, p_readlock_free, and
5051         p_untracked_readlock_count.
5052         * pthread.c (__pthread_initial_thread, pthread_manager_thread):
5053         Add initializers for new fields.
5054         * manager.c (pthread_free): Free read/write lock lists.
5055         * queue.h (queue_is_empty): New function.
5056         * rwlock.c: Implement requirements about when readers should get
5057         locks assigned.
5058         * sysdeps/pthread/pthread.h
5059         (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP): New definition.
5060         * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_rwlock_t):
5061         Define this name as well.
5062         Patches by Kaz Kylheku <kaz@ashi.footprints.net>.
5064 2000-01-05  Ulrich Drepper  <drepper@cygnus.com>
5066         * pthread.c (__pthread_initial_thread, pthread_manager_thread):
5067         Adjust initializers for struct _pthread_descr_struct change.
5068         * internals.h (struct _pthread_descr_struct): Move new elements to
5069         the end.
5071 2000-01-03  Kaz Kylheku  <kaz@ashi.footprints.net>
5073         Redesigned how cancellation unblocks a thread from internal
5074         cancellation points (sem_wait, pthread_join,
5075         pthread_cond_{wait,timedwait}).
5076         Cancellation won't eat a signal in any of these functions
5077         (*required* by POSIX and Single Unix Spec!).
5078         * condvar.c: Spontaneous wakeup on pthread_cond_timedwait won't eat a
5079         simultaneous condition variable signal (not required by POSIX
5080         or Single Unix Spec, but nice).
5081         * spinlock.c: __pthread_lock queues back any received restarts
5082         that don't belong to it instead of assuming ownership of lock
5083         upon any restart; fastlock can no longer be acquired by two threads
5084         simultaneously.
5085         * restart.h: Restarts queue even on kernels that don't have
5086         queued real time signals (2.0, early 2.1), thanks to atomic counter,
5087         avoiding a rare race condition in pthread_cond_timedwait.
5089 1999-12-31  Andreas Jaeger  <aj@suse.de>
5091         * internals.h: Remove duplicate prototype declarations.
5093         * weaks.c: Remove __THROW from prototypes since the file is not
5094         compiled by a C++ compiler.
5095         * internals.h: Likewise.
5097 1999-12-30  Andreas Jaeger  <aj@suse.de>
5099         * sysdeps/pthread/pthread.h: Move internal functions to...
5100         * sysdeps/pthread/bits/libc-lock.h: ...here.
5102 1999-12-29  Andreas Jaeger  <aj@suse.de>
5104         * sysdeps/pthread/pthread.h: Fix typos, reformat comments.
5106 1999-12-28  Ulrich Drepper  <drepper@cygnus.com>
5108         * sysdeps/alpha/pt-machine.h: Move stack_pointer definition to the
5109         beginning.
5111         * manager.c (__pthread_start): Add one more cast to prevent
5112         warning on 64bit machines.
5114 1999-12-21  Ulrich Drepper  <drepper@cygnus.com>
5116         * manager.c (pthread_handle_create): Set p_pid of new thread
5117         before calling the callback function to report a new thread.
5119 1999-12-20  Andreas Jaeger  <aj@suse.de>
5121         * pthread.c (pthread_initialize): Move getrlimit call after
5122         setting of errno.
5124 1999-12-18  Ulrich Drepper  <drepper@cygnus.com>
5126         * Versions: Export pread, __pread64, pread64, pwrite, __pwrite64,
5127         pwrite64, lseek64, open64, and __open64.
5128         * wrapsyscall.c: Define pread, __pread64, pread64, pwrite, __pwrite64,
5129         pwrite64, lseek64, open64, and __open64.
5131         * manager.c (pthread_allocate_stack): Correct computation of
5132         new_thread_bottom.  Correct handling of stack size and when the
5133         rlimit method to guard for stack growth is used.
5134         * pthread.c (pthread_initialize): Stack limit must be STACK_SIZE
5135         minus one pagesize (not two).
5137 1999-12-03  Andreas Jaeger  <aj@suse.de>
5139         * Versions: Add __res_state with version GLIBC_2.2.
5141         * errno.c (__res_state): New function to return thread specific
5142         resolver state.
5144         * pthread.c (pthread_initialize): Initialize p_resp.
5145         (__pthread_reset_main_thread): Also set p_resp.
5147         * manager.c (pthread_handle_create): Initialize p_resp.
5149         * internals.h: Add thread specific resolver state.
5150         Based on patches by Adam D. Bradley <artdodge@cs.bu.edu>.
5152 1999-12-01  Ulrich Drepper  <drepper@cygnus.com>
5154         * sysdeps/i386/pt-machine.h: Move stack_pointer definition to the
5155         beginning.
5156         * sysdeps/i386/i686/pt-machine.h: Likewise.
5157         Patches by Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>.
5159 1999-11-23  Ulrich Drepper  <drepper@cygnus.com>
5161         * manager.c (pthread_start_thread_event): Initialize p_pid already
5162         here.
5164 1999-11-22  Ulrich Drepper  <drepper@cygnus.com>
5166         * internals.h: Add prototype for __pthread_manager_event.
5167         * manager.c (__pthread_manager_event): New function.
5168         (pthread_start_thread_event): Correct computation of self.
5169         Use INIT_THREAD_SELF.
5170         * pthread.c (__pthread_manager_thread): Initialize p_lock.
5171         (__pthread_initialize_manager): Respect event flags also for creation
5172         of the manager thread.
5174 1999-11-08  Ulrich Drepper  <drepper@cygnus.com>
5176         * pthread.c (__pthread_initialize_manager): Initialize
5177         __pthread_manager_thread.p_tid.
5179 1999-11-02  Ulrich Drepper  <drepper@cygnus.com>
5181         * internals.h: Declare __pthread_last_event.
5182         * manager.c: Define __pthread_last_event.
5183         (pthread_handle_create): Set __pthread_last_event.
5184         (pthread_exited): Likewise.
5185         * join.c (pthread_exit): Likewise.
5187         * Makefile (libpthread-routines): Add events.
5188         * events.c: New file.
5189         * internals.h: Protect against multiple inclusion.
5190         Include thread_dbP.h header.
5191         (struct _pthread_descr_struct): Add new fields p_report_events and
5192         p_eventbuf.
5193         Declare event reporting functions.
5194         * join.c (pthread_exit): Signal event if this is wanted.
5195         * manager.c (__pthread_threads_events): New variable.
5196         (pthread_handle_create): Take new parameters with event information.
5197         Signal TD_CREATE event if wanted.
5198         (__pthread_manager): Adjust pthread_handle_create call.
5199         (pthread_start_thread_event): New function.  Block until manager is
5200         finished and then call pthread_start_thread.
5201         (pthread_exited): Signal TD_REAP event if wanted.
5203 1999-10-26  Ulrich Drepper  <drepper@cygnus.com>
5205         * restart.h (suspend_with_cancellation): Rewrite as a macro.
5207         * condvar.c (pthread_cond_timedwait_relative): Don't mark as inline.
5209 1999-10-25  Andreas Jaeger  <aj@suse.de>
5211         * internals.h: Remove K&R compatibility.
5212         * no-tsd.c: Likewise.
5213         * semaphore.h: Likewise.
5214         * signals.c: Likewise.
5215         * sysdeps/pthread/bits/libc-tsd.h: Likewise.
5216         * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
5217         * weaks.c: Likewise.
5219 1999-10-21  Xavier Leroy  <Xavier.Leroy@inria.fr>
5221         * pthread.c: For i386, wrap pthread_handle_sigrestart and
5222         pthread_handle_sigcancel with functions that restore %gs from the
5223         signal context.  For each signal handling function, two wrappers
5224         are required, one for a non-RT signal and one for a RT signal.
5225         * signal.c: For i386, add code to restore %gs from the signal
5226         context in pthread_sighandler and pthread_sighandler_rt.
5228 1999-10-17  Ulrich Drepper  <drepper@cygnus.com>
5230         * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add cast.
5232 1999-10-14  Ulrich Drepper  <drepper@cygnus.com>
5234         * pthread.c (__pthread_initial_thread): Pass argument to
5235         PTHREAD_START_ARGS_INITIALIZER.
5236         (__pthread_manager_thread): Likewise.
5238         * internals.h (PTHREAD_START_ARGS_INITIALIZER): Add parameter to
5239         initialize function.
5241         * manager.c (pthread_handle_create): Remove p_startfct initialization.
5243         * internals.h (_pthread_descr_struct): We don't need p_startfct field.
5245 1999-10-12  Ulrich Drepper  <drepper@cygnus.com>
5247         * internals.h: Correct return types for __libc_read and __libc_write.
5249 1999-10-09  Andreas Jaeger  <aj@suse.de>
5251         * internals.h: Add __new_sem_post to get prototype in
5252         manager.c; include semaphore.h for needed types.
5254 1999-10-08  Ulrich Drepper  <drepper@cygnus.com>
5256         * manager.c (__pthread_manager) [REQ_POST]: Use __new_sem_post
5257         directly instead of calling sem_post which should not be necessary
5258         but is faster and might help in some case to work around problems.
5259         Patch by khendricks@ivey.uwo.ca [libc/1382].
5261 1999-10-08  Andreas Schwab  <schwab@suse.de>
5263         * sysdeps/pthread/Subdirs: New file.
5264         * Implies: Removed.
5266 1999-10-07  Ulrich Drepper  <drepper@cygnus.com>
5268         * Implies: New file.
5269         * internals.h (struct _pthread_descr_struct): Add p_startfct.
5270         * manager.c (pthread_handle_create): Initialize p_startfct.
5271         * pthread.c: Define __linuxthread_pthread_sizeof_descr variable.
5273 1999-09-25  Ulrich Drepper  <drepper@cygnus.com>
5275         * manager.c (__linuxthreads_pthread_threads_max): New variable.
5276         * specific.c (__linuxthreads_pthread_keys_max): New variable.
5277         (__linuxthreads_pthread_key_2ndlevel_size): New variable.
5279         * condvar.c (pthread_cond_timedwait_relative): Never return with
5280         EINTR.  Patch by Andreas Schwab.
5282 1999-09-19  Ulrich Drepper  <drepper@cygnus.com>
5284         * signals.c (sigaction): Correct last patch.  Don't select
5285         pthread_sighandler_rt based on the signal number but instead of
5286         the SA_SIGINFO flag.
5288 1999-09-23  Ulrich Drepper  <drepper@cygnus.com>
5290         * specific.c: Move definitions of struct pthread_key_struct and
5291         destr_function to ...
5292         * internals.h: ...here.
5294 1999-09-18  Ulrich Drepper  <drepper@cygnus.com>
5296         * pthread.c (pthread_handle_sigrestart_rt): New function.  Use
5297         this instead of pthread_handle_sigrestart if the signal is an RT
5298         signal.
5300         * signals.c: Handle passing through of sighandler arguments also
5301         for real-time signals.
5303 1999-09-03  Andreas Schwab  <schwab@suse.de>
5305         * ptfork.c (__fork): Renamed from fork and use __libc_fork.  Add
5306         fork as weak alias.
5307         (__vfork): New function, alias vfork.
5308         * Versions: Export __fork, vfork, and __vfork in libpthread.
5310 1999-08-23  Andreas Schwab  <schwab@suse.de>
5312         * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to
5313         call to signal handler.
5315 1999-08-20  Ulrich Drepper  <drepper@cygnus.com>
5317         * pthread.c (__pthread_reset_main_thread): Undo last change.
5318         (__pthread_kill_other_threads_np): Reset signal handlers for the
5319         signals we used in the thread implementation here.
5321 1999-08-19  Ulrich Drepper  <drepper@cygnus.com>
5323         * pthread.c (__pthread_reset_main_thread): Reset signal handlers
5324         for the signals we used in the thread implementation [PR libc/1234].
5326         * Versions: Export __pthread_kill_other_threads_np from libpthread
5327         for GLIBC_2.1.2.
5329         * signals.c: Pass sigcontext through wrapper to the user function.
5331 1999-08-01  Ulrich Drepper  <drepper@cygnus.com>
5333         * Versions [ld.so] (GLIBC_2.0): Export __libc_internal_tsd_get and
5334         __libc_internal_tsd_set.
5336 1999-07-29  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5338         * manager.c: Remove inclusion of <linux/tasks.h> since it's not
5339         needed anymore.
5341 1999-07-16  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5343         * internals.h: Align _pthread_descr_struct to 32 bytes.
5344         Reported by Tim Hockin <thockin@cobaltnet.com>, close PR
5345         libc/1206.
5347 1999-07-09  Ulrich Drepper  <drepper@cygnus.com>
5349         * oldsemaphore.c (sem_compare_and_swap): Fix use of compare and
5350         swap function.
5352 1999-07-09  Cristian Gafton  <gafton@redhat.com>
5354         * Makefile (libpthread-routines): Add oldsemaphore routine.
5355         * Versions: Add sem_destroy, sem_getvalue, sem_init, sem_post,
5356         sem_trywait, and sem_wait to GLIBC_2.1.
5357         * oldsemaphore.c: New file.
5358         * semaphore.c: Add default_symbol_versions for the changed functions.
5359         (__new_sem_init): Rename from sem_init.
5360         (__new_sem_post): Rename from sem_post.
5361         (__new_sem_wait): Rename from sem_wait.
5362         (__new_sem_trywait): Rename from sem_trywait.
5363         (__new_sem_getvalue): Rename from sem_getvalue.
5364         (__new_sem_destroy): Rename from sem_destroy.
5366 1999-06-23  Robey Pointer  <robey@netscape.com>
5368         * internals.h: Added p_nextlock entry to separate queueing for a
5369         lock from queueing for a CV (sometimes a thread queues on a lock
5370         to serialize removing itself from a CV queue).
5371         * pthread.c: Added p_nextlock to initializers.
5372         * spinlock.c: Changed to use p_nextlock instead of p_nextwaiting.
5374 1999-07-09  Ulrich Drepper  <drepper@cygnus.com>
5376         * manager.c (pthread_handle_create): Free mmap region after stack
5377         if clone failed.  Patch by Kaz Kylheku <kaz@ashi.FootPrints.net>.
5379 1999-05-23  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5381         * man/pthread_cond_init.man: Correct example.
5382         Reported by Tomas Berndtsson <tomas@nocrew.org>.
5384         * linuxthreads.texi (Condition Variables): Likewise.
5386 1999-05-18  Jakub Jelinek  <jj@ultra.linux.cz>
5388         * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): Use
5389         casx not cas, also successful casx returns the old value in rd
5390         and not the new value.
5392 1999-05-16  Xavier Leroy  <Xavier.Leroy@inria.fr>
5394         * manager.c: If pthread_create() is given a NULL attribute
5395         and the thread manager runs with a realtime policy, set the
5396         scheduling policy of the newly created thread back to SCHED_OTHER.
5397         * manager.c: If the PTHREAD_INHERIT_SCHED attribute is given,
5398         initialize the schedpolicy field of new_thread->p_start_args
5399         to that of the calling thread.
5401 1999-04-29  Ulrich Drepper  <drepper@cygnus.com>
5403         * sysdeps/sparc/sparc64/pt-machine.h (__compare_and_swap): cas
5404         instruction does not allow memory element to use offset.
5406 1999-04-28  Ulrich Drepper  <drepper@cygnus.com>
5408         * manager.c (pthread_allocate_stack): Optimize initialization of new
5409         thread descriptor.
5411         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_define_initialized):
5412         Don't use initializer since it is all zeroes.
5413         (__libc_once_define): Likewise.
5415 1999-04-16  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5417         * sysdeps/arm/Implies: Removed since cmpxchg/no-cmpxchg
5418         doesn't exist anymore.
5419         * sysdeps/i386/Implies: Likewise.
5420         * sysdeps/m68k/Implies: Likewise.
5421         * sysdeps/mips/Implies: Likewise.
5422         * sysdeps/powerpc/Implies: Likewise.
5423         * sysdeps/sparc/sparc32/Implies: Likewise.
5424         * sysdeps/sparc/sparc64/Implies: Likewise.
5426 1999-04-15  Ulrich Drepper  <drepper@cygnus.com>
5428         * sysdeps/alpha/bits/semaphore.h: Removed.
5429         * sysdeps/powerpc/bits/semaphore.h: Removed.
5430         * sysdeps/pthread/cmpxchg/bits/semaphore.h: Removed.
5431         * sysdeps/pthread/no-cmpxchg/bits/semaphore.h: Removed.
5432         * Makefile (headers): Remove bits/semaphore.h.
5434         * semaphore.h: Define _pthread_descr if necessary.
5435         Don't include limits.h.  Define SEM_VALUE_MAX directly.
5436         Define SEM_FAILED.
5437         (sem_t): Protect element names with leading __.
5438         Add declarations for sem_close, sem_open, and sem_unlink.
5439         * semaphore.c: Adjust all functions for new element names.
5440         Define sem_close, sem_open, and sem_unlink.
5441         * Versions (libthread): Add sem_close, sem_open, and sem_unlink for
5442         GLIBC_2.1.1.
5443         * sysdeps/pthread/bits/pthreadtypes.h: Define _pthread_descr only if
5444         necessary.
5446 1999-03-16  H.J. Lu  <hjl@gnu.org>
5448         * specific.c (pthread_key_delete): Check th->p_terminated to see
5449         if the thread is running.
5451         * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set):
5452         Added to GLIBC_2.0 for libc.so.
5454 1999-02-12  H.J. Lu  <hjl@gnu.org>
5456         * Versions (__libc_current_sigrtmin, __libc_current_sigrtmax,
5457         __libc_allocate_rtsig): Added to GLIBC_2.1.
5459         * internals.h (DEFAULT_SIG_RESTART): Removed.
5460         (DEFAULT_SIG_CANCEL): Removed.
5462         * pthread.c (init_rtsigs, __libc_current_sigrtmin,
5463         __libc_current_sigrtmax, __libc_allocate_rtsig): New functions.
5464         (__pthread_sig_restart, __pthread_sig_cancel,
5465         __pthread_sig_debug): Initialized.
5466         (pthread_initialize): Call init_rtsigs () to initialize
5467         real-time signals.
5469 1999-02-03  H.J. Lu  <hjl@gnu.org>
5471         * manager.c (__pthread_manager): Do block __pthread_sig_debug.
5472         Don't restart the thread which sent REQ_DEBUG.
5473         (pthread_start_thread): Check if __pthread_sig_debug > 0
5474         before debugging.
5476         * pthread.c (__pthread_initialize_manager): Suspend ourself
5477         after sending __pthread_sig_debug to gdb instead of
5478         __pthread_sig_cancel.
5480 1999-01-24  H.J. Lu  <hjl@gnu.org>
5482         * manager.c (__pthread_manager): Delete __pthread_sig_debug
5483         from mask if __pthread_sig_debug > 0.
5484         (pthread_handle_create): Increment __pthread_handles_num.
5486         * manager.c (pthread_handle_create): Don't pass CLONE_PTRACE to clone.
5487         * pthread.c (__pthread_initialize_manager): Likewise.
5489         * pthread.c (pthread_initialize): Use __libc_allocate_rtsig (1)
5490         instead of __libc_allocate_rtsig (2).
5491         (__pthread_initialize_manager): Send __pthread_sig_debug to gdb
5492         instead of __pthread_sig_cancel.
5493         (pthread_handle_sigdebug): Fix comments.
5495 1999-01-21  Ulrich Drepper  <drepper@cygnus.com>
5497         * manager.c (pthread_allocate_stack): Set
5498         __pthread_nonstandard_stacks if user-specified stack is used.
5500 1999-01-16  Ulrich Drepper  <drepper@cygnus.com>
5502         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _LFS_ASYNCHRONOUS_IO,
5503         _LFS_LARGEFILE, _LFS64_LARGEFILE, and _LFS64_STDIO from Unix98.
5505 1999-01-07  Xavier Leroy  <Xavier.Leroy@inria.fr>
5507         * pthread.c: Use a third signal __pthread_sig_debug distinct
5508         from __pthread_sig_cancel to notify gdb when a thread is
5509         created
5510         * manager.c: Likewise.
5511         * internals.h: Likewise.
5512         * signals.c: The implementation of sigwait(s) assumed that
5513         all signals in s have signal handlers already attached.
5514         This is not required by the standard, so make it work
5515         also if some of the signals have no handlers.
5517 1999-01-05  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
5519         * linuxthreads.texi: Remove pointers from first @node.  Move old
5520         @node spec inside comment.
5522 1998-12-31  Ulrich Drepper  <drepper@cygnus.com>
5524         * sysdeps/pthread/bits/stdio-lock.h: Define _IO_lock_lock and
5525         _IO_lock_unlock.
5527 1998-12-29  Ulrich Drepper  <drepper@cygnus.com>
5529         * semaphore.c (sem_trywait): Don't forget to unlock the semaphore
5530         lock.  Patch by Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>.
5532 1998-12-21  Ulrich Drepper  <drepper@cygnus.com>
5534         * manager.c: Threads now send __pthread_sig_cancel on termination.
5535         Change clone call and signal masks.
5536         * thread.c (pthread_handle_sigrestart): Remove special code for
5537         manager.
5538         (pthread_handle_sigcancel): In manager thread call
5539         __pthread_manager_sighandler.
5540         * sysdeps/i386/pt-machine.h (__compare_and_swap): Add memory clobber.
5541         * sysdeps/i386/i686/pt-machine.h: Likewise.
5542         Patches by Xavier Leroy.
5544 1998-12-14  Ulrich Drepper  <drepper@cygnus.com>
5546         * spinlock.c (__pthread_unlock): Don't crash if called for an
5547         untaken mutex.  Reported by Ruslan V. Brushkoff <rus@Snif.Te.Net.UA>.
5549         * Examples/ex6.c: Unbuffer stdout and reduce sleep time to reduce
5550         overall runtime.
5552 1998-12-13  Ulrich Drepper  <drepper@cygnus.com>
5554         * Examples/ex3.c: Wait until all threads are started before
5555         searching for the number to avoid race condition on very fast
5556         systems.
5558 1998-12-08  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5560         * sysdeps/pthread/pthread.h: Remove __pthread_setcanceltype
5561         declaration since it's not needed.
5563         * sysdeps/pthread/pthread.h: Move internal functions to ...
5564         * internals.h: ...here.
5566 1998-12-02  H.J. Lu  <hjl@gnu.org>
5568         * pthread.c (__pthread_sig_restart): Initiliaze to 0 if
5569         SIGRTMIN is defined.
5570         (__pthread_sig_cancel): Likewise.
5572 1998-12-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5574         * wrapsyscall.c: Include <sys/mman.h> for msync,
5575         <stdlib.h> for system and <termios.h> for tcdrain prototype.
5576         Correct msync declaration.
5578 1998-11-29  Roland McGrath  <roland@baalperazim.frob.com>
5580         * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_define, __libc_tsd_get,
5581         __libc_tsd_set): New macros for new interface.
5582         * no-tsd.c: New file, provide uninitialized defns of
5583         __libc_internal_tsd_get and __libc_internal_tsd_set.
5584         * Makefile (routines): Add no-tsd.
5586 1998-10-12  Roland McGrath  <roland@baalperazim.frob.com>
5588         * internals.h: Include <bits/libc-tsd.h>, not <bits/libc-lock.h>.
5589         * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
5590         __libc_internal_tsd_set): Move decls to ...
5591         * sysdeps/pthread/bits/libc-tsd.h: New file for __libc_internal_tsd_*
5592         declarations.
5594         * sysdeps/pthread/bits/libc-lock.h (__libc_internal_tsd_get,
5595         __libc_internal_tsd_set): Make these pointers to functions, not
5596         functions; remove #pragma weak decls for them.
5597         * specific.c (__libc_internal_tsd_get, __libc_internal_tsd_set):
5598         Define static functions and initialized pointers to them.
5600 1998-11-18  Ulrich Drepper  <drepper@cygnus.com>
5602         * Makefile (CFLAGS-mutex.c): Define as -D__NO_WEAK_PTHREAD_ALIASES.
5603         (CFLAGS-specific.c): Likewise.
5604         (CFLAGS-pthread.c): Likewise.
5605         (CFLAGS-ptfork.c): Likewise.
5606         (CFLAGS-cancel.c): Likewise.
5607         * sysdeps/pthread/bits/libc-lock.h: Don't mark __pthread_* functions
5608         as weak references if __NO_WEAK_PTHREAD_ALIASES is defined.
5610         * mutex.c (pthread_mutex_init): Define as strong symbol.
5611         (pthread_mutex_destroy): Likewise.
5612         (pthread_mutex_trylock): Likewise.
5613         (pthread_mutex_lock): Likewise.
5614         (pthread_mutex_unlock): Likewise.
5615         (pthread_mutexattr_init): Likewise.
5616         (pthread_mutexattr_destroy): Likewise.
5617         (pthread_once): Likewise.
5618         * ptfork.c (pthread_atfork): Likewise.
5619         * specific.c (pthread_key_create): Likewise.
5620         (pthread_setspecific): Likewise.
5621         (pthread_getspecific): Likewise.
5623 1998-11-15  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
5625         * linuxthreads.texi: Fix punctuation after xref.
5627 1998-11-10  H.J. Lu  <hjl@gnu.org>
5629         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine NR_OPEN
5630         if it is defined in <linux/limits.h>.
5632 1998-10-29 14:28  Ulrich Drepper  <drepper@cygnus.com>
5634         * spinlock.h (__pthread_trylock): Define inline.
5635         (__pthread_lock): Add extra parameter to declaration.  Declare
5636         using internal_function.
5637         (__pthread_unlock): Declare using internal_function.
5638         * spinlock.c (__pthread_lock): Add new parameter.  Use it instead
5639         of local variable self.  Avoid recomputing self.  Define using
5640         internal_function.
5641         (__pthread_trylock): Remove.
5642         (__pthread_unlock): Define using internal_function.
5643         * cancel.c: Adjust for __pthread_lock interface change.  Use already
5644         computed self value is possible.
5645         * condvar.c: Likewise.
5646         * join.c: Likewise.
5647         * manager.c: Likewise.
5648         * mutex.c: Likewise.
5649         * pthread.c: Likewise.
5650         * rwlock.c: Likewise.
5651         * semaphore.c: Likewise.
5652         * signals.c: Likewise.
5654 1998-10-27 13:46  Ulrich Drepper  <drepper@cygnus.com>
5656         * sysdeps/pthread/pthread.h (struct _pthread_cleanup_buffer): Prepend
5657         __ to field names of the struct.
5658         * sysdeps/pthread/bits/pthreadtypes.h (struct _pthread_fastlock):
5659         Likewise.
5660         (pthread_attr_t): Likewise.
5661         (pthread_cond_t): Likewise.
5662         (pthread_condattr_t): Likewise.
5663         (pthread_mutex_t): Likewise.
5664         (pthread_mutexattr_t): Likewise.
5665         (pthread_rwlock_t): Likewise.
5666         (pthread_rwlockattr_t): Likewise.
5667         * attr.c: Adjust for pthread.h and pthreadtypes.h change.
5668         * cancel.c: Likewise.
5669         * condvar.c: Likewise.
5670         * manager.c: Likewise.
5671         * mutex.c: Likewise.
5672         * pthread.c: Likewise.
5673         * ptlongjmp.c: Likewise.
5674         * rwlock.c: Likewise.
5675         * spinlock.c: Likewise.
5677 1998-10-09  Ulrich Drepper  <drepper@cygnus.com>
5679         * sysdeps/i386/pt-machine.h (get_eflags, set_eflags): Mark these
5680         also with PT_EI.
5682         * sysdeps/i386/i686/pt-machine.h: Remove unused inline
5683         definitions.
5685         * Makefile (libpthread-routines): Add pt-machine.
5686         * pt-machine.c: New file.
5687         * sysdeps/alpha/pt-machine.h: Define PT_EI as extern inline is not
5688         yet defined.  Use PT_EI in extern inline definitions.
5689         * sysdeps/arm/pt-machine.h: Likewise.
5690         * sysdeps/i386/pt-machine.h: Likewise.
5691         * sysdeps/i386/i686/pt-machine.h: Likewise.
5692         * sysdeps/m68k/pt-machine.h: Likewise.
5693         * sysdeps/mips/pt-machine.h: Likewise.
5694         * sysdeps/powerpc/pt-machine.h: Likewise.
5695         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
5696         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
5698 1998-10-02  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5700         * semaphore.h: Include <sys/types.h> so that _pthread_descr
5701         is declared.
5703 1998-09-15  David S. Miller  <davem@pierdol.cobaltmicro.com>
5705         * sysdeps/sparc/sparc32/pt-machine.h (INIT_THREAD_SELF): Add nr
5706         argument.
5707         * sysdeps/sparc/sparc64/pt-machine.h (INIT_THREAD_SELF): Likewise.
5709 1998-09-12 14:24 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
5711         * sysdeps/unix/sysv/linux/bits/sigthread.h: Add multiple inclusion
5712         guard.
5714 1998-09-02 11:08  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
5716         * signals.c (sigaction): Check that sig is less than NSIG to avoid
5717         array index overflow.
5719 1998-09-06 10:56  Ulrich Drepper  <drepper@cygnus.com>
5721         * sysdeps/pthread/semaphore.h: New file.
5723 1998-09-06 09:08  Ulrich Drepper  <drepper@cygnus.com>
5725         * sysdeps/pthread/bits/libc-lock.h (enum __libc_tsd_key_t): Add
5726         _LIBC_TSD_KEY_DL_ERROR.
5728 1998-08-31  Ulrich Drepper  <drepper@cygnus.com>
5730         * sysdeps/i386/i686/pt-machine.h (testandset): Add memory clobber.
5731         * sysdeps/i386/pt-machine.h: Likewise.
5732         Suggested by Roland McGrath.
5734 1998-08-28 13:58  Ulrich Drepper  <drepper@cygnus.com>
5736         * internals.h: Also define THREAD_GETMEM_NC and THREAD_SETMEM_NC to
5737         access thread data with non-constant offsets.
5738         * specific.c: Use THREAD_GETMEM_NC and THREAD_SETMEM_NC where
5739         necessary.
5741         * sysdeps/i386/useldt.h: Fix typo.  Add THREAD_GETMEM_NC and
5742         THREAD_SETMEM_NC definitions.
5744         * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM_NC and
5745         THREAD_SETMEM_NC.
5746         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
5748 1998-08-26 15:46  Ulrich Drepper  <drepper@cygnus.com>
5750         * internals.h: Define THREAD_GETMEM and THREAD_SETMEM to default if
5751         not already defined.
5752         (struct _pthread_descr_struct): Add p_self and p_nr field.
5753         * manager.c (__pthread_handles): Define second element to point
5754         to manager thread.
5755         (__pthread_handles_num): Initialize to 2.
5756         (__pthread_manager): Use INIT_THREAD_SELF with two arguments.
5757         (pthread_start_thread): Likewise.
5758         (pthread_handle_create): Start search for free slot at entry 2.
5759         Initialize new fields p_self and p_nr.
5760         Call __clone with CLONE_PTRACE if available.
5761         (pthread_free): Call FREE_THREAD_SELF if available.
5762         * pthread.c (__pthread_initial_thread): Initialize new fields.
5763         (__pthread_manager_thread): Likewise.
5764         (__pthread_initialize_manager): Call __clone with CLONE_PTRACE.
5766         * cancel.c: Use THREAD_GETMEM and THREAD_SETMEM to access the
5767         elements of the thread descriptor.
5768         * condvar.c: Likewise.
5769         * errno.c: Likewise.
5770         * join.c: Likewise.
5771         * manager.c: Likewise.
5772         * pthread.c: Likewise.
5773         * ptlongjmp.c: Likewise.
5774         * semaphore.c: Likewise.
5775         * signals.c: Likewise.
5776         * specific.c: Likewise.
5777         * spinlock.c: Likewise.
5779         * sysdeps/alpha/pt-machine.h (INIT_THREAD_SELF): Add extra parameter.
5781         * sysdeps/i386/useldt.h: New file.
5782         * sysdeps/i386/i686/pt-machine.h: Show how to use this file.
5784         * sysdeps/sparc/sparc32/pt-machine.h: Define THREAD_GETMEM and
5785         THREAD_SETMEM using __thread_self.
5786         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
5788 1998-08-24  Geoff Keating  <geoffk@ozemail.com.au>
5790         * spinlock.c (__pthread_lock): Reset p_nextwaiting to NULL if it
5791         turned out that we didn't need to queue after all.
5793 1998-08-22  Geoff Keating  <geoffk@ozemail.com.au>
5795         * sysdeps/powerpc/pt-machine.h: Remove testandset, it's not used
5796         and wastes space; correct types.
5798 1998-08-08 11:18  H.J. Lu  <hjl@gnu.org>
5800         * signals.c (sigaction): Handle NULL argument.
5802 1998-08-04  Ulrich Drepper  <drepper@cygnus.com>
5804         * sysdeps/unix/sysv/linux/bits/sigthread.h: Use __sigset_t instead
5805         of sigset_t.
5807 1998-08-02  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
5809         * Makefile (linuxthreads-version): Extract correct number from
5810         Banner.
5812 1998-07-29  Xavier Leroy  <Xavier.Leroy@inria.fr>
5814         * Banner: Bump version number to 0.8
5815         * FAQ.html: Many updates, in particular w.r.t. debugging.
5816         * manager.c: Support for non-default stacksize for
5817         LinuxThreads-allocated stacks;
5818         don't use guard pages for stacks with default size, rely on
5819         rlimit(RLIMIT_STACK) instead (it's cheaper).
5820         * attr.c: Likewise.
5821         * cancel.c: Use __pthread_sig_cancel and __pthread_sig_restart
5822         everywhere instead of PTHREAD_SIG_CANCEL and PTHREAD_SIG_RESTART.
5823         * condvar.c: Likewise.
5824         * internals.h: Likewise.
5825         * restart.h: Likewise.
5826         * signals.c: Likewise.
5827         * pthread.c: Likewise; set rlimit(RLIMIT_STACK) as we need it.
5829 1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
5831         * weaks.c: Define pthread_mutexattr_[sg]ettype instead of
5832         __pthread_mutexattr_[sg]ettype.  Add more weak aliases.
5833         * Versions: Put __pthread_mutexattr_settype under version
5834         GLIBC_2.0.  Don't export __pthread_mutexattr_setkind_np and
5835         __pthread_mutexattr_gettype.
5837 1998-07-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
5839         * sysdeps/pthread/bits/libc-lock.h: Make
5840         __pthread_mutexattr_settype weak.  Don't make
5841         __pthread_mutexattr_setkind_np weak.
5843 1998-07-16 10:52  Ulrich Drepper  <drepper@cygnus.com>
5845         * manager.c (pthread_handle_create): Check whether sched_setscheduler
5846         call can succeed here.
5848         * mutex.c: Define __pthread_mutexattr_settype and make
5849         __pthread_mutexattr_setkind_np an alias.
5850         Likewise for __pthread_mutexattr_gettype.
5852 1998-07-15 11:00 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
5854         * attr.c (pthread_attr_setschedpolicy): Don't check whether caller
5855         is root.
5857 1998-07-14 19:38  Ulrich Drepper  <drepper@cygnus.com>
5859         * sysdeps/pthread/bits/libc-lock.h: Define __libc_cleanup_end.
5861 1998-07-11  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5863         * Examples/ex6.c: Include <unistd.h> for usleep.
5865 1998-06-13 11:04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
5867         * Examples/ex4.c (main): Use exit, not pthread_exit.
5869 1998-07-09 13:39  Ulrich Drepper  <drepper@cygnus.com>
5871         * Versions: Add __pthread_mutexattr_gettype and
5872         __pthread_mutexattr_settype.
5873         * lockfile.c: Use __pthread_mutexattr_settype instead of
5874         __pthread_mutexattr_setkind_np.
5875         * mutex.c: Define __pthread_mutexattr_gettype and
5876         __pthread_mutexattr_settype.
5877         * weak.c: Likewise.
5878         * sysdeps/pthread/pthread.h: Declare __pthread_mutexattr_gettype and
5879         __pthread_mutexattr_settype.
5880         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_init_recursive):
5881         Use __pthread_mutexattr_settype.
5883 1998-07-08 22:26  Ulrich Drepper  <drepper@cygnus.com>
5885         * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.
5886         * mutex.c: Define weak alias pthread_mutexattr_gettype and
5887         pthread_mutexattr_settype.
5888         * sysdeps/pthread/pthread.h: Declare these functions.
5889         Move pthread_sigmask and pthread_kill declaration in separate header.
5890         * sysdeps/unix/sysv/linux/bits/sigthread.h: New file.
5892 1998-07-07 15:20  Ulrich Drepper  <drepper@cygnus.com>
5894         * Makefile: Add rules to compile and run tests.
5895         * Examples/ex1.c: Little changes to fix warnings.
5896         * Examples/ex2.c: Likewise.
5897         * Examples/ex3.c: Likewise.
5898         * Examples/ex4.c: Likewise.
5899         * Examples/ex5.c: Likewise.
5900         * Examples/ex6.c: New file.
5902 1998-07-05 11:54  Ulrich Drepper  <drepper@cygnus.com>
5904         * Versions: Add pthread_attr_init to GLIBC_2.1 version in libc.
5906 1998-07-01  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
5908         * attr.c: Include <string.h>.
5910 1998-06-30 11:47  Ulrich Drepper  <drepper@cygnus.com>
5912         * attr.c: Include errno.h.  Use memcpy to copy sched_param.
5913         * internals.h: Include limits.h.
5914         * manager.c: Use memcpy to copy sched_param.
5915         * ptfork.c: Include errno.h.
5916         * pthread.c: Likewise.
5917         * semaphore.c: Likewise.
5918         * specific.c: Likewise.
5919         * spinlock.h: Likewise.
5920         * sysdeps/pthread/pthread.h: Include only allowed headers.  Move
5921         type definition to ...
5922         * sysdeps/pthread/bits/pthreadtypes.h: ...here.  New file.
5924 1998-06-29 12:34  Ulrich Drepper  <drepper@cygnus.com>
5926         * sysdeps/pthread/pthread.h: Use __PMT not __P for function pointers.
5928         * sysdeps/pthread/pthread.h: Define various PTHREAD_* symbols also
5929         as macros as demanded in POSIX.1, Annex C.
5931 1998-06-29 12:29  Ulrich Drepper  <drepper@cygnus.com>
5933         * internals.h (struct pthread_request): For free use pthread_t
5934         instead of pthread_descr.
5935         * join.c (pthread_join): Pass thread_id, not th to manager.
5936         (pthread_detach): Likewise.
5937         * manager.c (__pthread_manager): Except thread ID in FREE_REQ case.
5938         (pthread_exited): Remove detached queue code.
5939         (pthread_handle_free): Expect thread ID parameter and use it to
5940         validate the thread decsriptor.  Don't use detached queue.
5941         Patches by Xavier Leroy.
5943 1998-06-27  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
5945         * libpthread.map: Export accept, longjmp, sigaction, siglongjmp,
5946         _IO_flockfile, _IO_ftrylockfile, _IO_funlockfile,
5947         __pthread_atfork, __pthread_key_create, __pthread_once.
5948         * internals.h: Doc fix.
5949         * pthread.c (__pthread_initialize): Define again.
5951 1998-06-26  Ulrich Drepper  <drepper@cygnus.com>
5953         * manager.c (pthread_exited): If thread is not detached put it on
5954         special list.
5955         (pthread_handle_free): If thread is not on list with living threads
5956         search on list with detached threads.
5958         * sysdeps/pthread/pthread.h (PTHREAD_RWLOCK_INITIALIZER): Correct
5959         for new definition of pthread_rwlock_t.
5961         * spinlock.c: Correct test whether to compile
5962         __pthread_compare_and_swap or not.
5964 1998-06-25 19:27  Ulrich Drepper  <drepper@cygnus.com>
5966         * attr.c: Finish user stack support.  Change locking code to be safe
5967         in situations with different priorities.
5968         * cancel.c: Likewise.
5969         * condvar.c: Likewise.
5970         * internals.h: Likewise.
5971         * join.c: Likewise.
5972         * manager.c: Likewise.
5973         * mutex.c: Likewise.
5974         * pthread.c: Likewise.
5975         * ptlongjmp.c: Likewise.
5976         * queue.h: Likewise.
5977         * rwlock.c: Likewise.
5978         * semaphore.c: Likewise.
5979         * semaphore.h: Likewise.
5980         * signals.c: Likewise.
5981         * spinlock.c: Likewise.
5982         * spinlock.h: Likewise.
5983         * sysdeps/pthread/pthread.h: Likewise.
5984         Patches by Xavier Leroy.
5986         * sysdeps/i386/i686/pt-machine.h: New file.
5988 1998-06-25  Ulrich Drepper  <drepper@cygnus.com>
5990         * sysdeps/pthread/pthread.h: Make [sg]et_stacksize and
5991         [sg]et_stackaddr prototypes always available.
5993         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5994         _POSIX_THREAD_ATTR_STACKSIZE and _POSIX_THREAD_ATTR_STACKADDR.
5996 1998-06-24  Ulrich Drepper  <drepper@cygnus.com>
5998         * manager.c (pthread_free): Undo patch from 980430.
5999         Reported by David Wragg <dpw@doc.ic.ac.uk>.
6001 1998-06-09 15:07  Ulrich Drepper  <drepper@cygnus.com>
6003         * manager.c: Define __pthread_manager_adjust_prio and use it to
6004         increase priority when needed.
6005         * internals.h: Add prototype for __pthread_manager_adjust_prio.
6006         * mutex.c: Optimize mutexes to wake up only one thread.
6007         * pthread.c: Move PID of manager for global variable in structure
6008         element.
6009         Patches by Xavier Leroy.
6011 1998-06-07 13:47  Ulrich Drepper  <drepper@cygnus.com>
6013         * sysdeps/pthread/bits/libc-lock.h: Optimize cleanup handlers a bit.
6015 1998-06-03  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
6017         * attr.c: Correct typo.
6019 1998-05-01  Ulrich Drepper  <drepper@cygnus.com>
6021         * manager.c (pthread_free): Unmap guard before the stack.
6022         Patch by Matthias Urlichs.
6024 1998-04-30  Ulrich Drepper  <drepper@cygnus.com>
6026         * manager.c (pthread_free): Detect already free child.
6027         Patch by Xavier Leroy, reported by Matthias Urlichs.
6029 1998-04-23  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6031         * Makefile (linuxthreads-version): Renamed back from
6032         libpthread-version.
6034 1998-04-21  Ulrich Drepper  <drepper@cygnus.com>
6036         * ptlongjmp.c: Add prototypes for __libc_siglongjmp and
6037         __libc_longjmp.
6039 1998-04-20 14:55  Ulrich Drepper  <drepper@cygnus.com>
6041         * Makefile (libpthread-routines): Add ptlongjmp and spinlock.
6042         * internals.h: Add definitions for new spinlock implementation.
6043         * ptlongjmp.c: New file.
6044         * spinlock.c: New file.
6045         * spinlock.h (acquire): Don't reschedule using __sched_yield, use
6046         new function __pthread_acquire to prevent deadlocks with thread
6047         with different priorities.
6048         Patches by Xavier Leroy <Xavier.Leroy@inria.fr>.
6050 1998-03-16  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6052         * manager.c (__pthread_manager): Reduce first argument to select
6053         to include just the needed file descriptor.
6055 1998-03-17 00:06  Ulrich Drepper  <drepper@cygnus.com>
6057         * manager.c: Fix last patch which caused core dumps.
6059         * pthread.c: Correctly handle missing SIGRTMIN.
6061 1998-03-15  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6063         * libpthread.map: Add __libc_internal_tsd_get and
6064         __libc_internal_tsd_set.  Add missing cancelable functions. Export
6065         libc internal versions of the cancelable functions.
6067 1998-03-13 16:51  Ulrich Drepper  <drepper@cygnus.com>
6069         * weaks.c: Define pthread_attr_init as GLIBC_2.0 and GLIBC_2.1.
6071 1998-03-13 00:46  Ulrich Drepper  <drepper@cygnus.com>
6073         * attr.c: Implement pthread_attr_[gs]etguardsize,
6074         pthread_attr_[gs]setstackaddr, pthread_attr_[gs]etstacksize.
6075         Change pthread_attr_init to have two interfaces.
6076         * internals.h (struct _pthread_descr_struct): Add new fields for
6077         above functions.
6078         * libpthread.map: Add names in GLIBC_2.1 section.
6079         * manager.c (pthread_handle_create): Implement guardsize and
6080         user stack.
6081         (pthread_free): Likewise.
6082         * pthread.c (pthread_create): Add new interface for changed
6083         pthread_attr_t.
6084         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
6085         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add definition of
6086         PTHREAD_STACK_MIN.
6088 1998-03-11 00:42  Wolfram Gloger  <wmglo@dent.med.uni-muenchen.de>
6090         * manager.c: Enable resetting of the thread scheduling policy
6091         to SCHED_OTHER when the parent thread has a different one.
6093 1998-02-01 13:51  Ulrich Drepper  <drepper@cygnus.com>
6095         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6096         _POSIX_ASYNCHRONOUS_IO.
6098         * sysdeps/pthread/pthread.h: Define bits for Unix98 variants of
6099         mutexes.
6100         * mutex.c: Implement new mutex types.
6102         * internals.h: Include <signal.h>.
6104         * libpthread.map: Add __erno_location and __h_errno_location.
6106         * errno.c: Return pointer to variable actually in use.  This might
6107         not be the one in the thread structure.
6108         * internals.h (struct _pthread_descr_struct): Add new fields p_errnop
6109         and p_h_errnop.
6110         * manager.c (__pthread_manager): Set p_errnop and p_h_errnop member
6111         of manager thread structure.
6112         (pthread_handle_create): Set p_errnop and p_h_errnop members for new
6113         thread.
6114         * pthread.c: Adapt initializer for thread structures.
6115         (__pthread_initial_thread): Set p_errnop and p_h_errnop member.
6116         (__pthread_reset_main_thread): Reset p_errnop and p_h_errnop of
6117         current thread to global variables.
6119 1998-01-31 17:27  Ulrich Drepper  <drepper@cygnus.com>
6121         * rwlock.c: New file.
6122         * Makefile (libpthread-routines): Add rwlock.
6123         * sysdeps/pthread/pthread.h: Define data structures and declare
6124         functions.
6125         * libpthread.map: Add new functions.
6127 1997-12-18 13:50  Philip Blundell  <pb@nexus.co.uk>
6129         * sysdeps/arm/pt-machine.h: New file; add ARM support.
6130         * sysdeps/arm/Implies: likewise.
6131         * README: Document it.
6133 1997-12-13  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6135         * signals.c: Remove unneeded initializer for sigwaited, saving a
6136         warning.
6138 1997-04-11 01:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6140         * semaphore.c (sem_init): Set sem_spinlock only if available.
6142 1997-12-04 01:48  Ulrich Drepper  <drepper@cygnus.com>
6144         * mutex.c: Implement PTHREAD_MUTEX_CHECKERROR.
6145         * sysdeps/pthread/pthread.h: Define PTHREAD_MUTEX_CHECKERROR.
6147         * Makefile: Update from LinuxThreads 0.7.
6148         * internals.h. Likewise.
6149         * manager.c: Likewise.
6150         * mutex.c: Likewise.
6151         * pthread.c: Likewise.
6152         * signals.c: Likewise.
6153         * specific.c: Likewise.
6154         * Examples/ex3.c: Likewise.
6156 1997-11-20 18:13  Ulrich Drepper  <drepper@cygnus.com>
6158         * pthread.c (__pthread_reset_main_thread): Close pipe only if still
6159         open.
6161 1997-10-29 05:38  Ulrich Drepper  <drepper@cygnus.com>
6163         * wrapsyscall.c: Add socket functions which are also cancelation
6164         points.
6166 1997-10-19 21:40  Wolfram Gloger  <wg@wolfram.dent.med.uni-muenchen.de>
6168         * specific.c (__libc_internal_tsd_set, __libc_internal_tsd_get):
6169         New functions for fast thread specific data within libc.
6171         * internals.h: Add new array p_libc_specific to struct
6172         _pthread_descr_struct.
6174         * sysdeps/pthread/bits/libc-lock.h: Declare new functions.
6176 1997-10-13 05:39  Ulrich Drepper  <drepper@cygnus.com>
6178         * semaphore.h: Add __BEGIN_DECLS/__END_DECLS.
6179         Reported by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
6181 1997-08-29 03:05  Ulrich Drepper  <drepper@cygnus.com>
6183         * internals.h (struct _pthread_descr_struct): Add definitions for
6184         two-level specific key handling.
6185         * manager.c (pthread_handle_create): Initialize specific memory array.
6186         * specific.c: Implement two-level key handling.
6187         * weaks.c: Don't provide dummy key handling.
6188         * sysdeps/pthread/bits/libc-lock.h: Typedef __libc_lock_t (no #define).
6189         Add definition of __libc_key_t.
6190         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define PTHREAD_KEYS_MAX
6191         as 1024.
6192         Add definition of _POSIX_THREAD_DESTRUCTOR_ITERATIONS and
6193         PTHREAD_DESTRUCTOR_ITERATIONS.
6195         * manager.c (pthread_handle_create): Compare mmap result with
6196         MAP_FAILED.
6198         * ptfork.c: Rename to __pthread_atfork and make old name a weak alias.
6199         * sysdeps/pthread/bits/pthread.h: Add prototype for __pthread_atfork.
6201 1997-08-22 19:04  Richard Henderson  <rth@cygnus.com>
6203         sysdeps/sparc -> sysdeps/sparc/sparc32
6204         sysdeps/sparc64 -> sysdeps/sparc/sparc64
6206         * internals.h: Change definition of THREAD_SELF to be an expression,
6207         not a statement that did a return.
6208         * sysdeps/alpha/pt-machine.h (THREAD_SELF): Update accordingly.
6209         * sysdeps/sparc/sparc32/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF):
6210         Follow Solaris and use a "system reserved" register (%g6) to hold
6211         the thread descriptor.
6212         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
6214 1997-08-03 00:09  Ulrich Drepper  <drepper@cygnus.com>
6216         * mutex.c: Correct pthread_once.  Patch by Xavier Leroy.
6217         * sysdeps/pthread/pthread.h: Add prototype for __pthread_once.
6218         * sysdeps/pthread/bits/pthread.h: Add macros for __libc_once.
6220         * semaphore.c: Include spinlock.h only when needed.
6222         * specific.c (__pthread_setsepcific, __pthread_getspecific): Reject
6223         keys for entries not in use.
6225         * weaks.c: Implement key handling functions for real.
6227 1997-06-29  01:04  Richard Henderson  <richard@gnu.ai.mit.edu>
6229         Initial sparc64-linux support:
6230         * sysdeps/sparc64/Implies: New file.
6231         * sysdeps/sparc64/pt-machine.h: Likewise.
6233 1997-06-29 00:48  Ulrich Drepper  <drepper@cygnus.com>
6235         * semaphore.c: Include spinlock.h at correct place.
6236         Patch by HJ Lu.
6238 1997-06-13 10:06  Richard Henderson  <rth@tamu.edu>
6240         The Great Bit File Move:
6241         * sysdeps/alpha/semaphorebits.h: -> .../bits/semaphore.h.
6242         * sysdeps/powerpc/semaphorebits.h: Likewise.
6243         * sysdeps/pthread/cmpxchg/semaphorebits.h: Likewise.
6244         * sysdeps/pthread/no-cmpxchg/semaphorebits.h: Likewise.
6245         * sysdeps/pthread/libc-lock.h: -> bits/
6246         * sysdeps/pthread/stdio-lock.h: Likewise.
6247         * sysdeps/unix/sysv/linux/local_lim.h: Likewise.
6248         * sysdeps/unix/sysv/linux/posix_opt.h: Likewise.
6249         * semaphore.h: Likewise.
6250         * sysdeps/pthread/pthread.h: Likewise.
6252         * lockfile.c: <foo.h> -> <bits/foo.h>.
6253         * semaphore.h: Likewise.
6255         * Makefile: (headers): foo.h -> bits/foo.h.
6256         * sysdeps/pthread/Makefile: Likewise.
6258 1997-04-11 01:18  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6260         * semaphore.c (sem_init): Set sem_spinlock only if available.
6262         * sysdeps/m68k/pt-machine.h (testandset, __compare_and_swap): Fix
6263         asm constraints.
6265 1997-04-09 03:00  Ulrich Drepper  <drepper@cygnus.com>
6267         Update from LinuxThreads 0.6.
6269         * attr.c (pthread_attr_getdetachstate): Use __sched_get_priority_max
6270         and __sched_get_priority_min instead of names without `__'.
6272         * manager.c: Rewrite large parts to implement opaque pthread_t.
6274         * cancel.c: Adapt for opaque pthread_t type.
6275         * condvar.c: Likewise.
6276         * errno.c: Likewise.
6277         * join.c: Likewise.
6278         * mutex.c: Likewise.
6279         * pthread.c: Likewise.
6280         * signals.c: Likewise.
6281         * specific.c: Likewise.
6282         * restart.h: Likewise.
6283         * queue.h: Likewise.
6284         * Examples/ex3.c: Likewise.
6285         * Examples/ex4.c: Likewise.
6286         * sysdeps/pthread/pthread.h: Likewise.
6288         * pthread.c: Accumulate time for all threads in thread manager.
6290         * semaphore.c: Implement fallback implementation for architectures
6291         sometimes missing compare-exchange operations.
6293         * cancel.c (pthread_cancel): Validate handle argument.
6294         * join.c (pthread_join): Likewise.
6295         (pthread_detach): Likewise.
6296         * signals.c (pthread_kill): Likewise.
6298         * spinlock.h (acquire): Use __sched_yield not sched_yield.
6300         * queue.h (enqueue): Enqueue thread according to priority.
6302         * internals.c (struct pthread_start_args): New struct for passing
6303         args to cloning function.
6304         (struct _pthread): Rename to _pthread_descr_struct and adapt for
6305         opaque pthread_t.
6307         * Examples/Makefile (clean): Pass -f option to rm.
6309         * sysdeps/i386/pt-machine.h: Add check for compare-exchange instruction
6310         and define TEST_FOR_COMPARE_AND_SWAP.
6311         * sysdeps/i386/i486/pt-machine.h: Removed.
6313         * sysdeps/unix/sysv/linux/local_lim.h (PTHREAD_THREADS_MAX): Increase
6314         to 1024.
6316 1997-04-04 16:38  Ulrich Drepper  <drepper@cygnus.com>
6318         * restart.h (suspend): Clear p_signal before suspending.
6319         (suspend_with_cancellation): Likewise.
6320         Patch by Xavier Leroy <Xavier.Leroy@inria.fr>.
6322         * weaks.c: Make __pthread_key_create return 1.
6323         * sysdeps/pthread/libc-lock.h: Define __libc_key_create,
6324         __libc_getspecific, __libc_setspecific, and __libc_key_t.
6325         * sysdeps/pthread/stdio-lock.h: Don't care for implementation not
6326         using libio.
6328 1997-03-19 15:13  Miguel de Icaza  <miguel@nuclecu.unam.mx>
6330         * sysdeps/sparc/pt-machine (RELEASE): Fix.
6332 1997-03-01 07:55  Geoff Keating  <geoffk@ozemail.com.au>
6334         * sysdeps/powerpc/Implies: Added.
6335         * sysdeps/powerpc/pt-machine.h: Added.
6336         * sysdeps/powerpc/semaphorebits.h: Added.
6338 1997-01-22 01:22  Ulrich Drepper  <drepper@cygnus.com>
6340         * pthread.c (__pthread_initial_thread): Correct
6341         initializer.
6342         (__pthread_manager_thread): Likewise.
6343         Reported by Andreas Jaeger.
6345 1997-01-18 22:15  Richard Henderson  <rth@tamu.edu>
6347         Since sigset_t no longer fits in a register, we can't pass in the
6348         thread's initial mask so easily.  Take this opportunity to simplify
6349         the clone implementation by only accepting a single void* argument.
6351         * manager.c (__pthread_manager): Put thread vitals in the thread
6352         struct instead of as arguments through clone.
6353         (pthread_start_thread): Look for them there.
6354         * internals.h (struct _pthread): Add p_initial_fn,
6355         p_initial_fn_arg, p_initial_mask.  Fix __pthread_manager proto.
6356         * pthread.c (pthread_initialize_manager): Revise clone invocation.