09aca83aac03739cda4bf75d7c411fad208359ce
[kopensolaris-gnu/glibc.git] / linuxthreads / ChangeLog
1 2003-01-10  Andreas Schwab  <schwab@suse.de>
2
3         * sysdeps/unix/sysv/linux/m68k/vfork.S: New file.
4
5 2003-01-10  Martin Schwidefsky  <schwidefsky@de.ibm.com>
6
7         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Setup
8         backchain in pseudo_cancel.  Minor code improvements.
9         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
10         Likewise.
11
12 2003-01-10  Martin Schwidefsky  <schwidefsky@de.ibm.com>
13
14         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
15         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
16
17 2002-01-12  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
18
19         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
20
21 2002-01-09  Richard Henderson  <rth@redhat.com>
22
23         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Assume only
24         ret follows pseudo, and thus avoid branch-to-branch in cancel
25         case.  Use SYSCALL_ERROR_LABEL.
26
27 2003-01-11  Philip Blundell  <philb@gnu.org>
28
29         * sysdeps/unix/sysv/linux/arm/vfork.S: New file.
30         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h (PSEUDO_RET):
31         Correctly unstack lr.
32         (UNDOARGS_5): Fix ordering of pushes and pops.
33         (SINGLE_THREAD_P_PIC): New.
34         (SINGLE_THREAD_P_INT): New.
35         (SINGLE_THREAD_P): Implement in terms of above.  Restore lr if it
36         was stacked.
37         (PSEUDO): Use SINGLE_THREAD_P_INT.
38
39 2003-01-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
40
41         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
42
43 2003-01-11  Jakub Jelinek  <jakub@redhat.com>
44
45         * sysdeps/ia64/tls.h (tcbhead_t): Change into dtv_t *, void *.
46         [HAVE_TLS_SUPPORT] (USE_TLS, TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN,
47         TLS_TCB_SIZE, TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, TLS_DTV_AT_TP,
48         INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV, TLS_INIT_TP, THREAD_SELF,
49         INIT_THREAD_SELF): Define.
50         [HAVE_TLS_SUPPORT]: Include descr.h.
51         (NONTLS_INIT_TP): Point __thread_self at the end of dummy
52         struct _pthread_descr_struct.
53         * sysdeps/ia64/pt-machine.h (THREAD_GETMEM, THREAD_GETMEM_NC,
54         THREAD_SETMEM, THREAD_SETMEM_NC): Define using THREAD_SELF,
55         not __thread_self.
56         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Adjust
57         computation.
58         * pthread.c (__pthread_initialize_minimal): Use tcbp, not self
59         for TCB pointer.
60         (__pthread_initialize_manager): Rename tcb to mgr.
61         Use tcbp for TCB pointer, if TLS_DTV_AT_TP set mgr to sizeof (struct
62         _pthread_descr) below tcbp, otherwise to tcbp.
63         * manager.c (pthread_handle_create): If TLS_DTV_AT_TP, set
64         new_thread to be below _dl_allocate_tls ().  Adjust new_thread back
65         before freeing.  Fix clone arguments if report_events and USE_TLS.
66         (pthread_free): Adjust th back before freeing.
67
68 2003-01-10  Steven Munroe  <sjmunroe@us.ibm.com>
69
70         * sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile: Moved to ...
71         * sysdeps/unix/sysv/linux/powerpc/Makefile: ...here.
72         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New File.
73
74 2003-01-09  Jakub Jelinek  <jakub@redhat.com>
75
76         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
77         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
78         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
79         [__ASSEMBLER__] (SINGLE_THREAD_P): Remove trailing ;;.
80         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
81         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
82         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
83         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
84         * tst-popen.c: New test.
85         * Makefile (tests): Add tst-popen.
86
87 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
88
89         * sysdeps/unix/sysv/linux/sigwait.c (do_sigwait): Add
90         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
91
92 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
93
94         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use
95         PSEUDO_PREPARE_ARGS.  Fix branch condition after SINGLE_THREAD_P.
96
97 2003-01-06  Philip Blundell  <philb@gnu.org>
98
99         * sysdeps/unix/sysv/linux/arm/sysdep-cancel.h: New file.
100
101 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
102
103         * internals.h (LIBC_CANCEL_HANDLED): Define.
104         * sysdeps/unix/sysv/linux/sigwait.c (LIBC_CANCEL_HANDLED): Add.
105         * signals.c (LIBC_CANCEL_HANDLED): Add.
106         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
107         * tst-cancel-wrappers.sh: Remove all exceptions.
108
109         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
110
111 2003-01-05  Andreas Schwab  <schwab@suse.de>
112
113         * sysdeps/m68k/Makefile: New file, use -fPIC for nonshared
114         objects.
115
116         * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h (SINGLE_THREAD_P):
117         Fix for PIC.
118         (CENABLE): Likewise.
119         (CDISABLE): Likewise.
120
121 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
122
123         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
124         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
125
126         * Makefile (libc.so-no-z-defs): Define to yes.
127
128 2003-01-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
129
130         * sysdeps/sh/tls.h: Include dl-sysdep.h and stdint.h.
131         (tcbhead_t): Add multiple_threads member.
132         (TLS_INIT_TP_EXPENSIVE): Define.
133         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Don't use multi-line
134         strings.  Remove unused code.
135         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
136
137 2003-01-04  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
138
139         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
140         * sysdeps/unix/sysv/linux/powerpc/powerpc32/Makefile: New file.
141
142 2003-01-04  Jakub Jelinek  <jakub@redhat.com>
143
144         * internals.h (LIBC_THREAD_GETMEM, LIBC_THREAD_SETMEM): Define
145         even if NOT_IN_libc is defined.
146
147 2003-01-05  Jakub Jelinek  <jakub@redhat.com>
148
149         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
150         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
151         * sysdeps/s390/Makefile: New file.
152         * sysdeps/s390/tcb-offsets.sym: New file.
153         * sysdeps/s390/tls.h: New file.
154
155 2003-01-03  Richard Henderson  <rth@redhat.com>
156
157         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
158
159 2003-01-03  Andreas Jaeger  <aj@suse.de>
160
161         * sysdeps/pthread/bits/libc-tsd.h: Declare weak_extern functions.
162
163 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
164
165         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
166
167 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
168
169         * tst-cancel-wrappers.sh: Exclude sigwait.c as well, it does not have
170         cancellation tests.
171
172 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
173
174         * internals.h (struct pthread_functions): Rename
175         ptr_pthread_cond_* fields to ptr___pthread_cond_*.
176         * pthread.c (pthread_functions): Adjust.
177         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
178         pthread_cond_*@GLIBC_2.0 compatibility symbols.
179         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
180         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
181         and pthread_cond_wait.
182
183         * sysdeps/pthread/bits/pthreadtypes.h (__pthread_cond_align_t): New
184         type.
185         (pthread_cond_t): Add __align member, shorten __padding.
186         * sysdeps/pthread/pthread.h (PHTREAD_COND_INITIALIZER): Initialize
187         __padding and __align too.
188
189         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call2): Add
190         __builtin_expect.
191         * sysdeps/pthread/sigaction.c: New file.
192         * sysdeps/unix/sysv/linux/raise.c: New file.
193         * sysdeps/unix/sysv/linux/sigwait.c: New file.
194         * sysdeps/unix/sysv/linux/fork.c (__pthread_fork): Protect
195         weak_extern with #ifndef SHARED.
196         * sysdeps/unix/sysv/linux/jmp-unwind.c (__pthread_cleanup_upto):
197         Likewise.
198         * signals.c (__sigaction): Renamed to...
199         (__pthread_sigaction): ... this.
200         (__sigaction): New strong alias, #ifdef SHARED only.
201         (sigaction): Protect with #ifdef SHARED.
202         (sigwait): Renamed to...
203         (__pthread_sigwait): ... this.
204         (sigwait): New strong alias, #ifdef SHARED only.
205         (raise): Renamed to...
206         (__pthread_raise): ... this.
207         (raise): New strong alias, #ifdef SHARED only.
208         * internals.h (__pthread_sigaction, __pthread_sigwait,
209         __pthread_raise): New prototypes.
210         (struct pthread_functions): Add ptr_pthread_sigaction,
211         ptr_pthread_sigwait, ptr_pthread_raise.
212         * pthread.c (pthread_functions): Renamed to...
213         (__pthread_functions): ... this.  No longer static, no longer
214         SHARED only.  Initialize ptr_pthread_sigaction, ptr_pthread_sigwait
215         and ptr_pthread_raise.
216         [SHARED] (ptr_pthread_functions): Change to &__pthread_functions.
217         * libc-cancellation.c (__pthread_thread_self): Remove weak_extern.
218         * ptfork.c (__fork, __vfork): Protect with #ifdef SHARED.
219         * ptlongjmp.c (siglongjmp, longjmp): Protect with #ifdef SHARED.
220
221         * Makefile (tests, tests-static): Add tst-cancel-static.
222         * tst-cancel-static.c: New test.
223
224 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
225
226         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
227
228 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
229
230         * sysdeps/pthread/bits/pthreadtypes.h (pthread_cond_t): Add padding.
231         * condvar.c: Add symbol versioning.  The compatibility versions
232         are the same as the change in the interface does not effect this
233         implementation.
234         * Versions [libpthread]: Add definitions for new pthread_cond_*
235         interfaces for version GLIBC_2.3.2.
236
237 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
238
239         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
240         __register_atfork.
241         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
242         for __register_atfork.
243
244 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
245
246         * sysdeps/i386/i686/pt-machine.h: Use __ASSEMBLER__ instead of
247         ASSEMBLER test macro.
248         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Likewise.
249         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
250         * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: Likewise.
251         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
252         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
253         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
254
255         * sysdeps/pthread/errno-loc.c (__errno_location): Add
256         libc_hidden_def.
257         * sysdeps/pthread/herrno-loc.c (__h_errno_location): Likewise.
258         * sysdeps/pthread/res-state.c (__res_state): Likewise.
259         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
260         __libc_current_sigrtmax): Likewise.
261         * Versions [libc] (GLIBC_PRIVATE): Remove __libc_internal_tsd_get,
262         __libc_internal_tsd_set, __libc_internal_tsd_address,
263         __libc_alloca_cutoff.
264         [libpthread] (GLIBC_PRIVATE): Remove __libc_internal_tsd_get,
265         __libc_internal_tsd_set, __libc_internal_tsd_address.
266
267         * sysdeps/pthread/list.h: Remove assert.h include.
268         * sysdeps/unix/sysv/linux/fork.c: Include <fork.h>, not "fork.h".
269
270         * sysdeps/pthread/list.h: New file.
271         * sysdeps/unix/sysv/linux/jmp-unwind.c: New file.
272         * sysdeps/unix/sysv/linux/fork.c: New file.
273         * sysdeps/unix/sysv/linux/fork.h: New file.
274         * sysdeps/unix/sysv/linux/ia64/fork.h: New file.
275         * sysdeps/unix/sysv/linux/sparc/fork.h: New file.
276         * sysdeps/unix/sysv/linux/register-atfork.c: New file.
277         * sysdeps/unix/sysv/linux/unregister-atfork.c: New file.
278         * sysdeps/unix/sysv/linux/Makefile: New file.
279         * sysdeps/unix/sysv/linux/Versions: New file.
280         * ptlongjmp.c (pthread_cleanup_upto): Rename to...
281         (__pthread_cleanup_upto): ...this. Add targetframe argument,
282         use it instead of currentframe.  No longer static.
283         (siglongjmp, longjmp): Remove pthread_cleanup_upto calls.
284         * internals.h (__pthread_cleanup_upto, __pthread_fork): New prototypes.
285         (struct pthread_functions): Add ptr_pthread_fork,
286         ptr_pthread_cleanup_upto.
287         * pthread.c (pthread_functions): Initialize ptr_pthread_fork and
288         ptr_pthread_cleanup_upto.
289         * ptfork.c: Include fork.h.
290         (struct handler_list, struct handler_list_block): Remove.
291         (pthread_atfork_lock, pthread_atfork_prepare, pthread_atfork_parent,
292         pthread_atfork_child): Remove.
293         (pthread_insert_list, __pthread_atfork, pthread_call_handlers): Remove.
294         (__pthread_fork): New function.
295         (__fork, __vfork): Call __libc_fork.
296         * Makefile (libpthread-routines): Add old_pthread_atfork.
297         (libpthread-nonshared): Add pthread_atfork.
298         (others): Depend on $(objpfx)libpthread_nonshared.a.
299         ($(objpfx)libpthread_nonshared.a): New rule.
300         (install): Depend on $(inst_libdir)/libpthread.so.
301         ($(inst_libdir)/libpthread.so, $(inst_libdir)/libpthread_nonshared.a):
302         New rules.
303         (tests): Depend on libpthread_nonshared.a too.
304         * old_pthread_atfork.c: New file.
305         * pthread_atfork.c: New file.
306         * Makeconfig (shared-thread-library): Include libpthread_nonshared.a
307         too.
308
309 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
310
311         * forward.c: Make all functions available by default again.  It
312         caused too much trouble.
313         * internals.h (struct pthread_functions): Rename ptr_pthread_exit
314         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
315         ptr___pthread_attr_init_2_*.
316         * pthread.c (pthread_functions): Adjust.
317
318 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
319
320         * libc_pthread_init.c (__libc_pthread_init): Remove
321         MULTIPLE_THREADS_OFFSET check.
322         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
323         (SYSINFO_OFFSET): Remove.
324         * sysdeps/i386/Makefile [csu] (gen-as-const-headers): Add
325         tcb-offsets.sym.
326         * sysdeps/i386/tcb-offsets.sym: New file.
327         * sysdeps/pthread/tcb-offsets.h: New file.
328         * sysdeps/sparc/sparc32/tls.h: Removed.
329         * sysdeps/sparc/sparc64/tls.h: Move...
330         * sysdeps/sparc/tls.h: ...here.  Include tcb-offsets.h in assembler.
331         * sysdeps/sparc/Makefile: New file.
332         * sysdeps/sparc/tcb-offsets.sym: New file.
333         * sysdeps/ia64/tls.h: Include tcb-offsets.h in assembler.
334         * sysdeps/ia64/Makefile: New file.
335         * sysdeps/ia64/tcb-offsets.sym: New file.
336         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
337         (MULTIPLE_THREADS_OFFSET): Remove.
338         Replace defined MULTIPLE_THREADS_OFFSET
339         with defined FLOATING_STACKS && USE___THREAD.
340         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
341         (MULTIPLE_THREADS_OFFSET): Remove.
342         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
343         (MULTIPLE_THREADS_OFFSET): Remove.
344         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
345         (MULTIPLE_THREADS_OFFSET): Remove.
346         * pthread.c (__pthread_initialize_manager): Remove
347         MULTIPLE_THREADS_OFFSET cbeck.
348
349         * tst-cancel-wrappers.sh: Add line continuations.
350
351 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
352
353         * sysdeps/pthread/bits/libc-tsd.h: Include linuxthreads/descr.h
354         and bits/libc-lock.h.
355         (__libc_internal_tsd_get, __libc_internal_tsd_set,
356         __libc_internal_tsd_address): Remove.
357         (__pthread_internal_tsd_address, __pthread_internal_tsd_get,
358         __pthread_internal_tsd_set): New weak_externs.
359         (__libc_tsd_address, __libc_tsd_get, __libc_tsd_set): Define
360         using __libc_maybe_call2.
361         (__libc_tsd_key_t): Move to ...
362         * descr.h (__libc_tsd_key_t): ...here.
363         Remove bits/libc-tsd.h include.
364         * sysdeps/pthread/errno-loc.c: New file.
365         * sysdeps/pthread/herrno-loc.c: New file.
366         * sysdeps/pthread/res-state.c: New file.
367         * libc-cancellation.c (THREAD_GETMEM, THREAD_SETMEM): Remove.
368         (__libc_enable_asynccancel, __libc_disable_asynccancel): Use
369         thread_self unconditionally.  Use LIBC_THREAD_[SG]ETMEM instead
370         of THREAD_[SG]ETMEM.
371         * specific.c (libc_internal_tsd_set): Renamed to...
372         __pthread_internal_tsd_set.  Remove static.
373         (libc_internal_tsd_get): Renamed to...
374         __pthread_internal_tsd_get.  Remove static.
375         (libc_internal_tsd_address): Renamed to...
376         __pthread_internal_tsd_address.  Remove static.
377         (__libc_internal_tsd_set, __libc_internal_tsd_get,
378         __libc_internal_tsd_address, __libc_alloca_cutoff): Remove.
379         * internals.h [!NOT_IN_libc] (LIBC_THREAD_GETMEM, LIBC_THREAD_SETMEM):
380         Define.
381         (__pthread_internal_tsd_set, __pthread_internal_tsd_get,
382         __pthread_internal_tsd_address): New prototypes.
383         (struct pthread_functions): Add
384         ptr_pthread_internal_tsd_([sg]et|address) fields.
385         [!NOT_IN_libc && !FLOATING_STACKS] (thread_self): Define.
386         * pthread.c (pthread_functions) [!USE_TLS && !HAVE___THREAD]:
387         Initialize ptr_pthread_internal_tsd_([sg]et|address) fields.
388         * Versions (libpthread): Remove __libc_alloca_cutoff@GLIBC_PRIVATE.
389         * alloca_cutoff.c: New file.
390         * no-tsd.c: Removed.
391         * Makefile (routines): Remove no-tsd.  Add alloca_cutoff.
392         * pt-system.c (system): Remove cancellation handling.
393         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
394         cancellation routines.
395
396         * sysdeps/i386/tls.h: Include dl-sysdep.h and stdint.h.
397         (tcbhead_t): Add sysinfo field.
398         (SYSINFO_OFFSET, INIT_SYSINFO): Define.
399         (TLS_INIT_TP): Use INIT_SYSINFO.
400         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
401         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
402         (MULTIPLE_THREADS_OFFSET): Adjust.
403         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h
404         (MULTIPLE_THREADS_OFFSET): Likewise.
405         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
406         (MULTIPLE_THREADS_OFFSET): Likewise.
407         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
408         (MULTIPLE_THREADS_OFFSET): Likewise.
409         * descr.h: Include stdint.h.
410         (struct _pthread_descr_struct): Add p_header.data.sysinfo field.
411
412 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
413
414         * libc_pthread_init.c: Include stdlib.h.
415         * sysdeps/i386/tls.h (tcbhead_t): Add multiple_threads member.
416         (TLS_INIT_TP_EXPENSIVE): Define.
417         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call,
418         __libc_maybe_call2): In _LIBC check SHARED define.
419         * sysdeps/ia64/tls.h: New file.
420         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
421         * sysdeps/unix/sysv/linux/ia64/Makefile: New file.
422         * sysdeps/x86_64/tls.h (TLS_INIT_TP_EXPENSIVE): Define.
423         * sysdeps/sparc/sparc32/tls.h: New file.
424         * sysdeps/sparc/sparc64/tls.h: New file.
425         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
426         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
427         * Makefile (tests): Add tst-cancel[1-6].
428         (tests-reverse): Add tst-cancel5.
429         Link libc.so before libpthread.so for tests-reverse.
430         * tst-cancel1.c: New file.
431         * tst-cancel2.c: New file.
432         * tst-cancel3.c: New file.
433         * tst-cancel4.c: New file.
434         * tst-cancel5.c: New file.
435         * tst-cancel6.c: New file.
436
437 2002-12-27  Andreas Schwab  <schwab@suse.de>
438
439         * sysdeps/unix/sysv/linux/m68k/sysdep-cancel.h: New file.
440
441 2002-12-22  Roland McGrath  <roland@redhat.com>
442
443         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
444
445 2002-12-21  Ulrich Drepper  <drepper@redhat.com>
446
447         * pthread.c (init_rtsigs): Remove incomplete __builtin_expect.
448         Reported by Art Hass <ahaas@airmail.net>.
449
450 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
451
452         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
453         Use return 0 as 6th argument to FORWARD4.
454
455 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
456
457         * sysdeps/i386/useldt.h (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Only
458         define if __ASSUME_LDT_WORKS > 0.
459         * libc-cancellation.c (THREAD_GETMEM, THREAD_SETMEM): Redefine to
460         struct member access if !FLOATING_STACKS.
461         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
462
463 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
464
465         * internals.h (__pthread_thread_self): New prototype.
466         (struct pthread_functions): Add ptr_pthread_thread_self field.
467         * pthread.c (pthread_functions): Initialize ptr_pthread_thread_self.
468         (__pthread_thread_self): New function.
469         * libc-cancellation.c (__pthread_thread_self): Add weak_extern.
470         (__libc_enable_asynccancel, __libc_disable_asynccancel): Don't
471         use thread_self() directly if not FLOATING_STACKS.
472
473 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
474
475         * sysdeps/x86_64/pt-machine.h: Guard most of the header
476         with #ifndef __ASSEMBLER__.
477         * pthread.c (pthread_functions): Use SHLIB_COMPAT around
478         pthread_attr_init_2_0 use.
479
480 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
481
482         * wrapsyscall.c: Removed.
483         * weaks.c: Removed.
484         * Makefile (distribute): Add tst-cancel-wrappers.sh.
485         (routines): Remove weaks.  Add forward,
486         libc_pthread_init, libc-cancellation.
487         (shared-only-routines): Remove weaks.  Add forward.
488         (libpthread-routines): Remove wrapsyscall.
489         Add ptw-write, ptw-read, ptw-close, ptw-fcntl, ptw-accept,
490         ptw-connect, ptw-recv, ptw-recvfrom, ptw-recvmsg, ptw-send,
491         ptw-sendmsg, ptw-sendto, ptw-fsync, ptw-lseek, ptw-lseek64,
492         ptw-llseek, ptw-msync, ptw-nanosleep, ptw-open, ptw-open64,
493         ptw-pause, ptw-pread, ptw-pread64, ptw-pwrite, ptw-pwrite64,
494         ptw-tcdrain, ptw-wait, ptw-waitpid, pt-system, pt-allocrtsig.
495         (libpthread-shared-only-routines): Add pt-allocrtsig.
496         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
497         ($(objpfx)tst-cancel-wrappers.out): New rule.
498         * sysdeps/pthread/bits/libc-lock.h: Include linuxthreads/internals.h
499         if in libc.
500         (__libc_maybe_call): In libpthread.* don't check for existance
501         of the function.
502         (__libc_maybe_call2): Define.
503         (__libc_lock_init, __libc_lock_fini, __libc_lock_lock,
504         __libc_lock_trylock, __libc_lock_unlock): Use it.
505         * sysdeps/pthread/flockfile.c: New file.
506         * sysdeps/pthread/ftrylockfile.c: New file.
507         * sysdeps/pthread/funlockfile.c: New file.
508         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
509         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
510         * sysdeps/unix/sysv/linux/allocrtsig.c: New file.
511         * libc-cancellation.c: New file.
512         * forward.c: New file.
513         * libc_pthread_init.c: New file.
514         * pt-system.c: New file.
515         * pthread.c: Remove locale.h.
516         (__pthread_manager_thread): Initialize multiple_threads.
517         (__pthread_multiple_threads): Declare.
518         (pthread_functions): New variable.
519         (__pthread_initialize_minimal): Remove __uselocale call.
520         Call __libc_pthread_init.
521         (__pthread_initialize_manager): Initialize __pthread_multiple_threads,
522         initial thread's multiple_threads and __libc_multiple_threads.
523         Check MULTIPLE_THREADS_OFFSET value. Initialize manager thread's
524         multiple_threads.
525         (pthread_setschedparam, pthread_getschedparam): Rename to __
526         prefixed variants.  Add strong_alias.
527         (current_rtmin, current_rtmax, __libc_current_sigrtmin,
528         __libc_current_sigrtmax, __libc_allocate_rtsig): Remove.
529         (init_rtsigs): Use __libc_current_sigrtmin_private.
530         (pthread_initialize): Only call init_rtsigs if
531         !__ASSUME_REALTIME_SIGNALS.
532         (__pthread_require_wrappers, __pthread_require_lockfile): Remove.
533         * internals.h (__pthread_attr_destroy, __pthread_attr_setdetachstate,
534         __pthread_attr_getdetachstate, __pthread_attr_setschedparam,
535         __pthread_attr_getschedparam, __pthread_attr_setschedpolicy,
536         __pthread_attr_getschedpolicy, __pthread_attr_setinheritsched,
537         __pthread_attr_getinheritsched, __pthread_attr_setscope,
538         __pthread_attr_getscope, __pthread_cond_init,
539         __pthread_cond_destroy, __pthread_cond_wait,
540         __pthread_cond_signal, __pthread_cond_broadcast,
541         __pthread_condattr_init, __pthread_condattr_destroy,
542         __pthread_equal, __pthread_getschedparam,
543         __pthread_setschedparam, __pthread_setcancelstate,
544         __pthread_setcanceltype, __pthread_enable_asynccancel,
545         __libc_enable_asynccancel, __libc_pthread_init): New prototype.
546         (__pthread_mutex_init, __pthread_mutex_destroy,
547         __pthread_mutex_lock, __pthread_mutex_unlock,
548         __pthread_mutex_trylock): Likewise.
549         Add hidden_proto.
550         (struct pthread_functions): New type.
551         (__libc_pthread_functions): New variable.
552         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define.
553         * descr.h (struct _pthread_descr_struct): Add
554         p_header.data.multiple_threads field.
555         * manager.c (pthread_handle_create): Initialize multiple_threads.
556         * cancel.c (__pthread_enable_asynccancel,
557         __pthread_disable_asynccancel): New functions.
558         (__pthread_provide_wrappers): Remove.
559         (pthread_setcancelstate, pthread_setcanceltype): Rename to __
560         prefixed variants.  Add strong_alias.
561         * condvar.c (pthread_cond_init, pthread_cond_destroy,
562         pthread_cond_wait, pthread_cond_signal, pthread_cond_broadcast,
563         pthread_condattr_init, pthread_condattr_destroy): Likewise.
564         * join.c (pthread_exit): Likewise.
565         * attr.c (pthread_attr_destroy, pthread_attr_setdetachstate,
566         pthread_attr_getdetachstate, pthread_attr_setschedparam,
567         pthread_attr_getschedparam, pthread_attr_setschedpolicy,
568         pthread_attr_getschedpolicy, pthread_attr_setinheritsched,
569         pthread_attr_getinheritsched, pthread_attr_setscope,
570         pthread_attr_getscope): Likewise.
571         * mutex.c (__pthread_mutex_init, __pthread_mutex_destroy,
572         __pthread_mutex_lock, __pthread_mutex_unlock,
573         __pthread_mutex_trylock): Add hidden_def.
574         * Versions (libc): Add __libc_pthread_init,
575         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
576         __libc_allocate_rtsig_private @@GLIBC_PRIVATE.
577         * lockfile.c: Remove some USE_IN_LIBIO guards.
578         (__pthread_provide_lockfile): Remove.
579         * pt-allocrtsig.c: New file.
580         * tst-cancel-wrappers.sh: New test.
581
582 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
583
584         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
585         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
586         * wrapsyscall.c: Remove creat, poll, pselect, readv, select,
587         sigpause, sigsuspend, sigwaitinfo, waitid, and writev wrappers.
588
589 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
590
591         * wrapsyscall.c (CANCELABLE_SYSCALL): Don't define function as
592         weak.  There is no reason for that.
593         (CANCELABLE_SYSCALL_VA): Likewise.
594
595 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
596
597         * wrapsyscall.c: Add wrappers for creat, poll, pselect, readv, select,
598         sigpause, __xpg_sigpause, sigsuspend, sigwaitinfo, waitid, and writev.
599         * Versions: Export creat, poll, pselect, readv, select, sigpause,
600         __xpg_sigpause, sigsuspend, sigwaitinfo, waitid, and writev from
601         libpthread in version GLIBC_2.3.2.
602
603 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
604
605         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
606
607 2002-12-05  Roland McGrath  <roland@redhat.com>
608
609         * pthread.c (__pthread_initialize_minimal)
610         [USE_TLS && SHARED && !USE___THREAD]: Initialize TLS and set up the
611         TCB if the dynamic linker didn't do it at startup.
612
613         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
614         string.
615         (TLS_DO_SET_THREAD_AREA, TLS_DO_MODIFY_LDT, TLS_SETUP_GS_SEGMENT):
616         Submacros updated.
617         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
618         * sysdeps/alpha/tls.h (TLS_INIT_TP): Likewise (always zero).
619
620 2002-12-03  Roland McGrath  <roland@redhat.com>
621
622         * pthread.c (pthread_initialize) [SHARED]: Copy dl_error_tsd value
623         from dynamic linker internal cell to new libc cell.
624
625 2002-11-28  Roland McGrath  <roland@redhat.com>
626
627         * tst-context.c: #define IS_IN_libpthread around #include <tls.h>
628         before other headers, so FLOATING_STACKS is not defined wrongly.
629
630         * sysdeps/i386/tls.h [!IS_IN_libpthread]: Enable TLS support
631         even if [! FLOATING_STACKS].
632         (TLS_DO_MODIFY_LDT_KERNEL_CHECK): New macro.
633         If not under [__ASSUME_LDT_WORKS > 0], then do a runtime check of
634         dl_osversion >= 2.3.99 and fatal if not.
635         (TLS_DO_MODIFY_LDT): Use it.
636
637 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
638
639         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
640         require it to 200112L.  Remove _POSIX_POLL and _POSIX_SELECT.
641         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
642
643 2002-11-19  Ulrich Drepper  <drepper@redhat.com>
644
645         * Versions (libc: GLIBC_2.0): Remove names of functions which are
646         not defined in libc.
647         * Makefile (shared-only-routines): Add weaks.
648         * weaks.c: Remove functions which are not exported from libc.so.
649
650 2002-11-14  Roland McGrath  <roland@redhat.com>
651
652         * libc-tsd.c: New file.
653         * Makefile (distribute): Add it.
654         (libc-link.so): New variable.
655         ($(objpfx)libpthread.so): Depend on that instead of libc.so file name.
656         (libc-ok-for-link): New variable.
657         [$(versioning) = yes]: Include $(common-objpfx)tls.make and define
658         libc-ok-for-link to $(use-thread).
659         [$(libc-ok-for-link) = no]
660         (libc-link.so): Set to $(objpfx)libc.so, not $(common-objpfx)libc.so.
661         ($(objpfx)libc_pic_lite.a,$(objpfx)libc_pic_lite.os, $(objpfx)libc.so):
662         New targets.
663         (generated): Append them.
664         (extra-objs): Append libc-tsd.os.
665
666         * libc-tls-loc.c: New file.
667         * Makefile (libpthread-routines): Add it.
668
669 2002-11-14  Andreas Schwab  <schwab@suse.de>
670
671         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Fix unterminated
672         string.
673
674 2002-11-13  Roland McGrath  <roland@redhat.com>
675
676         * Examples/ex6.c (main): Improve error reporting.
677
678 2002-11-04  Ulrich Drepper  <drepper@redhat.com>
679
680         * sysdeps/i386/Makefile: Compile pthread.c and sighandler.c with
681         -fno-omit-frame-pointer.  Patch by Andreas Steinmetz <ast@domdv.de>.
682
683         * sysdeps/i386/useldt.h [PIC] (USETLS_LOAD_EBX): Use correct input
684         register number.
685         (DO_SET_THREAD_AREA): Mark asm output specifiers correctly.
686
687 2002-10-22  Jakub Jelinek  <jakub@redhat.com>
688
689         * manager.c (pthread_start_thread): Call __uselocale even
690         if [! SHARED].  Patch by Leon Kanter <leon@geon.donetsk.ua>.
691
692 2002-10-17  Roland McGrath  <roland@redhat.com>
693
694         * Makefile (unload): Don't link in libpthread.so.
695         ($(objpfx)unload.out): Do depend on it.
696         * unload.c (main): Improve error reporting.
697
698 2002-10-09  Roland McGrath  <roland@redhat.com>
699
700         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
701         Under [__PIC__], call the function via the pointer fetched for
702         comparison rather than a call by name that uses the PLT.
703         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
704         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
705         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
706         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
707         (__libc_key_create, __libc_getspecific, __libc_setspecific)
708         (__libc_atfork): Use it.
709
710         * pthread.c [SHARED] (__libc_dl_error_tsd): New function.
711         (pthread_initialize) [SHARED]: Set _dl_error_catch_tsd to that.
712         * Versions (libc: GLIBC_PRIVATE): Add __libc_dl_error_tsd.
713         (ld: GLIBC_PRIVATE): Set removed.
714
715 2002-10-11  Ulrich Drepper  <drepper@redhat.com>
716
717         * sysdeps/unix/sysv/linux/execve.c: New file.
718
719 2002-10-09  Jakub Jelinek  <jakub@redhat.com>
720
721         * no-tsd.c: Include stdlib.h.
722
723 2002-10-07  Jakub Jelinek  <jakub@redhat.com>
724
725         * sysdeps/unix/sysv/linux/allocalim.h: New file.
726         * descr.h (struct _pthread_descr_struct): Add p_alloca_cutoff
727         field.
728         * manager.c (__pthread_allocate_stack): Add out_stacksize argument.
729         Pass stack size to caller.
730         (pthread_handle_create): Set p_alloca_cutoff.
731         * pthread.c (__pthread_initial_thread): Use C99 designated
732         initializers.  Set p_alloca_cutoff.
733         (__pthread_manager_thread): Likewise.
734         (__pthread_initialize_minimal) [USE_TLS]: Set p_alloca_cutoff
735         for initial thread.
736         (__pthread_init_max_stacksize): Possibly decrease p_alloca_cutoff
737         for initial thread.
738         (__pthread_initialize_manager) [USE_TLS]: Set p_alloca_cutoff
739         for manager thread.
740         * specific.c (__libc_alloca_cutoff): New function.
741         * no-tsd.c (__libc_alloca_cutoff): New function.
742         * Versions: Export __libc_alloca_cutoff@@GLIBC_PRIVATE from libc
743         and libpthread.
744
745 2002-10-02  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
746
747         * sysdeps/sh/pt-machine.h: Make C code ifndef'ed with __ASSEMBLER__.
748         * sysdeps/sh/tls.h: Likewise.
749         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
750
751 2002-09-29  Jakub Jelinek  <jakub@redhat.com>
752
753         * sysdeps/pthread/tst-timer.c (main): Clear
754         SIGEV2.sigev_notify_attributes.
755
756 2002-09-29  Ulrich Drepper  <drepper@redhat.com>
757
758         * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Don't use
759         INLINE_SYSCALL for set_thread_area syscall.
760
761 2002-09-28  Roland McGrath  <roland@redhat.com>
762
763         * pthread.c (__pthread_reset_main_thread) [FLOATING_STACKS]:
764         Don't call setrlimit, since we did no prior bogon we need to undo.
765
766 2002-09-27  Roland McGrath  <roland@redhat.com>
767
768         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Don't include <pt-machine.h>.
769
770 2002-09-24  Roland McGrath  <roland@redhat.com>
771
772         * sysdeps/x86_64/tls.h: New file.
773
774 2002-09-23  Roland McGrath  <roland@redhat.com>
775
776         * Examples/ex13.c (dump_mut): int -> size_t for counter.
777
778 2002-09-18  Bruno Haible  <bruno@clisp.org>
779
780         * Examples/ex10.c (thread): Fail if pthread_mutex_timedlock() returns
781         an unexpected error code.
782
783         * internals.h (__pthread_message): Add const to first parameter type.
784         * pthread.c (__pthread_message): Likewise.
785
786         * sysdeps/unix/sysv/linux/configure: Moved to ../sysdeps/pthread.
787
788 2002-09-17  Roland McGrath  <roland@redhat.com>
789
790         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT, TLS_DO_SET_THREAD_AREA):
791         Set the descriptor limit to the full 4GB, so %gs:OFFSET works for any
792         offset (positive or negative) relative to the thread struct.
793         * sysdeps/i386/useldt.h (DO_MODIFY_LDT, DO_SET_THREAD_AREA): Likewise.
794
795 2002-09-12  Jakub Jelinek  <jakub@redhat.com>
796
797         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Move...
798         * sysdeps/unix/sysv/linux/sparc/Makefile: ...here.
799         Replace /usr/lib/crt[in].o with crt[in].o too.
800
801 2002-09-11  Steven Munroe  <sjmunroe@us.ibm.com>
802
803         * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
804
805 2002-09-04  Bruno Haible  <bruno@clisp.org>
806
807         * pthread.c: Include <sys/time.h>.
808         (is_smp_system): Move to sysdeps/unix/sysv/linux/smp.h.
809         * sysdeps/unix/sysv/linux/smp.h: New file, extracted from pthread.c.
810         * Makefile (distribute): Add smp.h to the list.
811
812 2002-09-04  Bruno Haible  <bruno@clisp.org>
813
814         * sysdeps/alpha/pt-machine.h: Choose different include file location
815         on non-Linux platforms.
816
817         * wrapsyscall.c (PROMOTE_INTEGRAL_TYPE): New macro.
818         (open, open64): Change va_arg argument type to the integral type to
819         which mode_t promotes.
820
821         * sysdeps/pthread/tst-timer.c (main): Don't assume anything about
822         the structure of 'struct sigevent'.
823
824         * errno.c (__errno_location, __h_errno_location, __res_state):
825         Use prototype function definitions.
826
827 2002-07-29  Steven Munroe  <sjmunroe@us.ibm.com>
828
829         * shlib-versions: Set libpthread version to 2.3 for powerpc64.
830         * sysdeps/powerpc/pt-machine.h: moved to...
831         * sysdeps/powerpc/powerpc32/pt-machine.h: ...here
832         * sysdeps/powerpc/powerpc64/pt-machine.h: New file.
833
834 2002-09-02  Roland McGrath  <roland@redhat.com>
835
836         * sysdeps/powerpc/Makefile (CFLAGS-pt-initfini.s): New variable.
837
838 2002-09-01  Roland McGrath  <roland@redhat.com>
839
840         * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t): Add new keys
841         CTYPE_B, CTYPE_TOLOWER, CTYPE_TOUPPER.
842
843         * sysdeps/pthread/bits/libc-tsd.h (__libc_tsd_address): New macro.
844         (__libc_internal_tsd_address): Declare it.
845         * Versions (libc, ld, libpthread: GLIBC_PRIVATE): Add
846         __libc_internal_tsd_address.
847         * specific.c (libc_internal_tsd_address): New function.
848         (__libc_internal_tsd_address): New variable.
849         * no-tsd.c (__libc_internal_tsd_address): New variable.
850
851 2002-08-31  Ulrich Drepper  <drepper@redhat.com>
852
853         * Makefile: Don't use rule for crt%.o, spell it out as rules for
854         crti.o and crtn.o.
855
856 2002-08-30  Roland McGrath  <roland@redhat.com>
857
858         * Makefile (extra-objs, omit-deps): Add crtn.
859         ($(objpfx)libpthread.so): Depend on $(objpfx)crtn.o.
860         ($(objpfx)libpthread.so: +postinit): Append $(objpfx)crtn.o.
861         ($(objpfx)crtn.S): New target.
862         ($(objpfx)crt%.o): Pattern rule replaces crti.o target.
863         (generated): Add crtn.S.
864
865         * sysdeps/unix/sysv/linux/x86_64/Makefile ($(objpfx)specs): Massage
866         crtn.o pathname too.
867
868 2002-08-30  Jakub Jelinek  <jakub@redhat.com>
869
870         * pthread.c (__pthread_initialize_minimal): Call __uselocale even
871         if [! SHARED].
872
873 2002-08-30  Roland McGrath  <roland@redhat.com>
874
875         * tst-static-locale.c: New file.
876         * Makefile (tests, tests-static): Add it.
877
878 2002-04-24  Steven Munroe  <sjmunroe@us.ibm.com>
879
880         * spinlock.c (__pthread_lock): Fix spurious wakeup
881         handling.  Don't clear lowest bit of list pointer as sign the thread
882         is still on the wait list.  Don't restart after spurious wakeup
883         with spinning to get the lock.
884         (__pthread_unlock): Take set lowest bit into account when handling
885         pointer to list elements.
886         Patch by Steve Munroe <sjmunroe@us.ibm.com>.
887
888 2002-08-28  Roland McGrath  <roland@redhat.com>
889
890         * sysdeps/pthread/timer_routines.c (thread_func): Fix type in cast.
891
892 2002-08-28  Jakub Jelinek  <jakub@redhat.com>
893
894         * sysdeps/unix/sysv/linux/hppa/aio_cancel.c: New file.
895         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
896         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
897
898 2002-08-28  Ulrich Drepper  <drepper@redhat.com>
899
900         * sysdeps/pthread/timer_routines.c (thread_func): Change return
901         type to void and add casts in use to avoid warnings with all gcc
902         versions.
903
904 2002-08-08  Jakub Jelinek  <jakub@redhat.com>
905
906         * sysdeps/unix/sysv/linux/bits/local_lim.h (PTHREAD_THREADS_MAX):
907         Bump to 16384.
908         * manager.c (__pthread_handles): Remove.
909         * pthandles.c: New file.
910         * pthread.c (__pthread_initialize_minimal): Initialize
911         __pthread_handles[0] and __pthread_handles[1].
912         * Makefile (libpthread-routines): Add pthandles (must be last).
913
914 2002-08-26  Brian Youmans  <3diff@gnu.org>
915
916         * Examples/ex10.c: Corrected version number in Lesser GPL copying
917         permission notice from 2 to 2.1.
918         * Examples/ex11.c: Likewise.
919         * Examples/ex13.c: Likewise.
920         * Examples/ex8.c: Likewise.
921         * Examples/ex9.c: Likewise.
922         * barrier.c: Likewise.
923         * events.c: Likewise.
924         * lockfile.c: Likewise.
925         * no-tsd.c: Likewise.
926         * pt-machine.c: Likewise.
927         * ptclock_gettime.c: Likewise.
928         * ptclock_settime.c: Likewise.
929         * rwlock.c: Likewise.
930         * sysdeps/alpha/pspinlock.c: Likewise.
931         * sysdeps/alpha/pt-machine.h: Likewise.
932         * sysdeps/arm/pspinlock.c: Likewise.
933         * sysdeps/arm/pt-machine.h: Likewise.
934         * sysdeps/cris/pspinlock.c: Likewise.
935         * sysdeps/cris/pt-machine.h: Likewise.
936         * sysdeps/hppa/pspinlock.c: Likewise.
937         * sysdeps/hppa/pt-machine.h: Likewise.
938         * sysdeps/i386/i686/pt-machine.h: Likewise.
939         * sysdeps/i386/pspinlock.c: Likewise.
940         * sysdeps/i386/pt-machine.h: Likewise.
941         * sysdeps/i386/useldt.h: Likewise.
942         * sysdeps/ia64/pspinlock.c: Likewise.
943         * sysdeps/ia64/pt-machine.h: Likewise.
944         * sysdeps/m68k/pspinlock.c: Likewise.
945         * sysdeps/m68k/pt-machine.h: Likewise.
946         * sysdeps/mips/pspinlock.c: Likewise.
947         * sysdeps/mips/pt-machine.h: Likewise.
948         * sysdeps/powerpc/pspinlock.c: Likewise.
949         * sysdeps/powerpc/pt-machine.h: Likewise.
950         * sysdeps/pthread/bits/initspin.h: Likewise.
951         * sysdeps/pthread/bits/libc-lock.h: Likewise.
952         * sysdeps/pthread/bits/libc-tsd.h: Likewise.
953         * sysdeps/pthread/getcpuclockid.c: Likewise.
954         * sysdeps/pthread/posix-timer.h: Likewise.
955         * sysdeps/pthread/timer_create.c: Likewise.
956         * sysdeps/pthread/timer_delete.c: Likewise.
957         * sysdeps/pthread/timer_getoverr.c: Likewise.
958         * sysdeps/pthread/timer_gettime.c: Likewise.
959         * sysdeps/pthread/timer_routines.c: Likewise.
960         * sysdeps/pthread/timer_settime.c: Likewise.
961         * sysdeps/pthread/tst-timer.c: Likewise.
962         * sysdeps/s390/pspinlock.c: Likewise.
963         * sysdeps/s390/s390-32/pt-machine.h: Likewise.
964         * sysdeps/s390/s390-64/pt-machine.h: Likewise.
965         * sysdeps/sh/pspinlock.c: Likewise.
966         * sysdeps/sh/pt-machine.h: Likewise.
967         * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
968         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
969         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
970         * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
971         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
972         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
973         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
974         * sysdeps/unix/sysv/linux/bits/sigthread.h: Likewise.
975         * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
976         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
977         * tststack.c: Likewise.
978         * unload.c: Likewise.
979         * weaks.c: Likewise.
980         * wrapsyscall.c: Likewise.
981
982         * sysdeps/pthread/pt-initfini.c: Changed copying
983         permission notice to Lesser GPL from Library GPL, including the
984         references in the special exception.
985         * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: Likewise.
986         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Likewise.
987         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c:
988         Likewise.
989         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c:
990         Likewise.
991         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Likewise.
992
993 2002-08-26  Ulrich Drepper  <drepper@redhat.com>
994
995         * Examples/ex10.c (thread): tv_nsec == 1000000000 is already
996         overflow [PR libc/4244].
997
998 2002-08-25  Ulrich Drepper  <drepper@redhat.com>
999
1000         * sysdeps/pthread/timer_routines.c (thread_func): Make the
1001         compiler happy by adding a return statement which will never be
1002         reached.
1003
1004         * tst-context.c (main): Cast to long before casting to pointer.
1005
1006         * Examples/ex17.c (main): Use correct format string.
1007
1008         * Examples/ex9.c (thread): Remove incorrect return statement.
1009
1010 2002-08-23  Ulrich Drepper  <drepper@redhat.com>
1011
1012         * pthread.c (__linuxthreads_version): New global constant.
1013
1014 2002-08-23  Andreas Jaeger  <aj@suse.de>
1015
1016         * sysdeps/x86_64/pt-machine.h: Use %fs instead of %gs
1017         as thread specific register.
1018         (testandset): Fix inline asm.
1019         (THREAD_GETMEM): Fix inline asm.
1020
1021 2002-08-22  Roland McGrath  <roland@redhat.com>
1022
1023         * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Remove [HAVE_TLS_SUPPORT]
1024         conditional.
1025         (INIT_THREAD_SELF): Pass second arg to DO_SET_THREAD_AREA.
1026         (DO_SET_THREAD_AREA): Take second arg, pass to DO_SET_THREAD_AREA_REUSE
1027         macro.  That chooses whether to reuse %gs value or let kernel set it.
1028         [USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, always 1.
1029         [!USE_TLS] (DO_SET_THREAD_AREA_REUSE): New macro, true if arg is
1030         not constant 0.
1031
1032 2002-08-21  Ulrich Drepper  <drepper@redhat.com>
1033
1034         * sysdeps/i386/tls.h (TLS_SETUP_GS_SEGMENT): Add new parameter
1035         also to the third definition of this macro.
1036
1037 2002-06-17  Andreas Jaeger  <aj@suse.de>
1038
1039         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
1040         Set it.
1041
1042 2002-08-20  Ulrich Drepper  <drepper@redhat.com>
1043
1044         * sysdeps/i386/useldt.h: Go back to using 16-bit instructions when
1045         loading/reading segment registers.  Some old hardware doesn't
1046         handle the 32-bit instructions as expected.
1047         * sysdeps/i386/tls.h: Likewise.
1048
1049         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Second parameter is
1050         renamed to secondcall and use is negated.
1051         (TLS_SETUP_GS_SEGMENT): Likewise.
1052         (TLS_INIT_TP): Likewise.
1053         * sysdeps/sh/tls.h (TLS_INIT_TP): Second parameter is renamed to
1054         secondcall.
1055
1056         * sysdeps/i386/tls.h: Use 32-bit operations when handling segment
1057         registers.  No need to mask upper 16 bits in this case.
1058         * sysdeps/i386/useldt.h: Likewise.
1059         (DO_SET_THREAD_AREA): We have to load %gs again even if the value
1060         is the same since the GDT content changed.
1061
1062         * sysdeps/i386/tls.h (TLS_INIT_TP): Add new parameter and pass it on
1063         to TLS_SETUP_GS_SEGMENT.
1064         (TLS_SETUP_GS_SEGMENT): Add new parameter and pass it on to
1065         TLS_DO_SET_THREAD_AREA.
1066         (TLS_DO_SET_THREAD_AREA): If new parameter is zero determine
1067         entry number from %gs value.
1068         * sysdeps/sh/tls.h (TLS_INIT_TP): Add new parameter and simply
1069         ignore it.
1070
1071         * manager.c (pthread_handle_create): Pass NULL to _dl_allocate_tls.
1072         Pass true to _dl_deallocate_tls.
1073         (pthread_free): Likewise.
1074         * pthread.c (__pthread_initialize_manager): Likewise.
1075
1076 2002-08-19  Ulrich Drepper  <drepper@redhat.com>
1077
1078         * sysdeps/i386/useldt.h (DO_SET_THREAD_AREA): Use correct shift when
1079         computing index from %gs value.
1080
1081 2002-08-16  Roland McGrath  <roland@redhat.com>
1082
1083         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Calculate segment
1084         register value from entry number properly.
1085
1086         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Rewrite asm to use %ebx
1087         optimally conditional on [__PIC__].
1088         (TLS_DO_SET_THREAD_AREA): New macro, implement inline syscall
1089         without touching errno, and use latest modify_ldt-like interface.
1090         (TLS_SETUP_GS_SEGMENT): Use that instead of INLINE_SYSCALL.
1091         * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Set %gs in this macro.
1092         (DO_SET_THREAD_AREA): New macro, uses current syscall interface with
1093         existing %gs value as the segment to set.
1094         (INIT_THREAD_SELF): Rewritten using those.  Use set_thread_area only
1095         under [HAVE_TLS_SUPPORT] so we can rely on the initialization done
1096         by the first thread's early TLS setup.
1097
1098 2002-08-15  Roland McGrath  <roland@redhat.com>
1099
1100         * sysdeps/i386/tls.h (TLS_INIT_TP): Use statement expression and
1101         return a value as callers now expect.
1102
1103 2002-08-11  Roland McGrath  <roland@redhat.com>
1104
1105         * pthread.c (__pthread_initialize_manager): Initialize
1106         p_header.data.tcb field of manager thread's descriptor.
1107         (__pthread_initialize_minimal): Don't initialize p_header.data.self
1108         field, already done by TLS_INIT_TP.
1109
1110         * manager.c (pthread_handle_create): Move p_header field initializers
1111         together.
1112
1113 2002-08-08  Ulrich Drepper  <drepper@redhat.com>
1114
1115         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Removed.
1116
1117 2002-08-07  Ulrich Drepper  <drepper@redhat.com>
1118
1119         * pthread.c (__linuxthreads_initial_report_events): New variable.
1120         (__pthread_initialize_manager): Use it to initialize p_report_events
1121         of initial thread.
1122         [TLS]: Store pointer to descriptor of manager in __pthread_handles.
1123
1124 2002-08-07  Roland McGrath  <roland@redhat.com>
1125
1126         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): Add an extra argument with
1127         an "m" constraint to the asm so the compiler knows LDT_ENTRY was used.
1128
1129 2002-08-02  Roland McGrath  <roland@redhat.com>
1130
1131         * sysdeps/pthread/bits/libc-tsd.h (enum __libc_tsd_key_t):
1132         Add _LIBC_TSD_KEY_LOCALE.
1133         * manager.c (pthread_start_thread) [!(USE_TLS && HAVE___THREAD)]:
1134         Call __uselocale to initialize our per-thread locale pointer to
1135         the global one.
1136         * pthread.c (__pthread_initialize_minimal): Likewise.
1137
1138         * sysdeps/i386/tls.h (TLS_DO_SET_THREAD_AREA): Add missing \s.
1139
1140 2002-08-02  Ulrich Drepper  <drepper@redhat.com>
1141
1142         * pthread.c: Declare _errno, _h_errno, and _res unless we use TLS
1143         internally.
1144
1145         * cancel.c (__pthread_perform_cleanup) [USE_TLS && HAVE___THREAD]:
1146         Don't use p_libc_specific element in thread descriptor.
1147
1148 2002-07-30  Roland McGrath  <roland@redhat.com>
1149
1150         * sysdeps/pthread/bits/libc-tsd.h: Include <tls.h>.
1151         [USE_TLS && HAVE___THREAD]: Just include the sysdeps/generic file,
1152         which does the right thing when __thread support is available.
1153         * descr.h (struct _pthread_descr_struct) [USE_TLS && HAVE___THREAD]:
1154         Omit `p_libc_specific', `p_errnop', `p_errno', `p_h_errnop',
1155         `p_h_errno', `p_resp', and `p_res' members.
1156         * pthread.c (__pthread_initialize_minimal) [USE_TLS && HAVE___THREAD]:
1157         Don't initialize `p_errnop' and `p_h_errnop' members.
1158         (__pthread_reset_main_thread): Likewise.
1159         (__pthread_initialize_manager): Likewise.
1160         * manager.c (__pthread_manager, pthread_handle_create): Likewise.
1161         * pthread.c (pthread_initialize) [USE_TLS && HAVE___THREAD]:
1162         Don't initialize `p_resp' member.
1163         (__pthread_reset_main_thread): Likewise.
1164         * manager.c (pthread_handle_create): Likewise.
1165         * specific.c (libc_internal_tsd_set, libc_internal_tsd_get):
1166         Conditionalize these on [!(USE_TLS && HAVE___THREAD)].
1167         * no-tsd.c: Conditionalize contents on [!(USE_TLS && HAVE___THREAD)].
1168         * errno.c [USE_TLS && HAVE___THREAD]
1169         (__h_errno_location, __res_state): Don't define these at all.
1170
1171         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens around arguments!
1172         (INSTALL_NEW_DTV, GET_DTV): Likewise.
1173         * sysdeps/sh/tls.h (INSTALL_DTV, INSTALL_NEW_DTV, GET_DTV): Likewise.
1174
1175         * weaks.c: Don't include <errno.h> here.
1176
1177 2002-08-01  Roland McGrath  <roland@redhat.com>
1178
1179         * sysdeps/i386/tls.h (TLS_DO_MODIFY_LDT): New macro, broken out of
1180         TLS_INIT_TP.
1181         (TLS_DO_SET_THREAD_AREA): New macro, uses thread_set_area syscall.
1182         (TLS_SETUP_GS_SEGMENT): New macro, try one or the other or both.
1183         (TLS_INIT_TP): Use that.
1184
1185 2002-08-02  Jakub Jelinek  <jakub@redhat.com>
1186
1187         * sysdeps/i386/useldt.h (DO_MODIFY_LDT): Move from INIT_THREAD_SELF.
1188         (INIT_THREAD_SELF): Use sys_thread_area syscall instead if available.
1189         (FREE_THREAD): Avoid modify_ldt if using GDT.
1190         * sysdeps/i386/pspinlock.c (__have_no_set_thread_area): New variable.
1191
1192 2002-07-25  Jakub Jelinek  <jakub@redhat.com>
1193
1194         * sysdeps/i386/tls.h: Use __ASSEMBLER__ test macro not ASSEMBLER.
1195         * sysdeps/i386/pt-machine.h: Likewise.
1196         * sysdeps/i386/useldt.h: Likewise.
1197
1198 2002-07-22  Ulrich Drepper  <drepper@redhat.com>
1199
1200         * pthread.c (__pthread_initialize_minimal): If !SHARED and TLS
1201         call __libc_setup_tls first.
1202         * Makefile: Actually create tst-signal.out file when running the test.
1203         (tests): Add tststatic.
1204         * Examples/tststatic.c: New file.
1205
1206 2002-07-19  Ulrich Drepper  <drepper@redhat.com>
1207
1208         * errno.c (__errno_location): Don't define unless !USE_TLS
1209         || !HAVE___THREAD.
1210         * sysdeps/i386/pt-machine.c: Protect C code with #ifndef ASSEMBLER.
1211         * sysdeps/i386/tls.h: Likewise.
1212         * sysdeps/i386/useldt.h: Likewise.
1213         * sysdeps/i386/i686/pt-machine.h: Likewise.
1214
1215 2002-07-02  H.J. Lu  <hjl@gnu.org>
1216
1217         * sysdeps/mips/pspinlock.c: Don't include <sgidefs.h>.  Always
1218         use ll/sc.
1219         * sysdeps/mips/pt-machine.h: Likewise.
1220
1221 2002-07-14  Ulrich Drepper  <drepper@redhat.com>
1222
1223         * manager.c (pthread_handle_create): Initialize self-reference in
1224         descriptor.
1225
1226 2002-07-01  Jakub Jelinek  <jakub@redhat.com>
1227
1228         * Examples/ex9.c (main): Remove unused th variable.
1229
1230 2002-07-10  Ulrich Drepper  <drepper@redhat.com>
1231
1232         * wrapsyscall.c: Add __nanosleep alias.
1233         * Versions (GLIBC_2.2.6): Add __nanosleep.
1234         * bug-sleep.c: New file.
1235         * Makefile (tests): Add bug-sleep.
1236
1237 2002-06-19  Steven Munroe  <sjmunroe@vnet.ibm.com>
1238
1239         * Examples/ex9.c (main):  Use list of children and join them.
1240         (thread): Do not call exit.
1241
1242 2002-06-20  Ulrich Drepper  <drepper@redhat.com>
1243
1244         * spinlock.c (wait_node_alloc): We cannot use compare-and-exchange.
1245         Unconditionally use the code using spinlock.  Use __pthread_release
1246         to free a spinlock.
1247         (wait_node_free): Likewise.
1248         (__pthread_acquire, __pthread_release): Unconditionally define.
1249
1250 2002-06-07  Jakub Jelinek  <jakub@redhat.com>
1251
1252         * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Fix typo.
1253
1254 2002-05-24  Ulrich Drepper  <drepper@redhat.com>
1255
1256         * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Use __sync_synchronize.
1257
1258 2002-05-21  Ulrich Drepper  <drepper@redhat.com>
1259
1260         * sysdeps/pthread/pthread.h (pthread_create): Rename first
1261         parameter.
1262         (pthread_cancel): Likewise.
1263         * internals.h (__pthread_create_2_1): Likewise.
1264         * sysdeps/unix/sysv/linux/bits/sigthread.h (pthread_kill): Likewise.
1265
1266 2002-05-20  Ulrich Drepper  <drepper@redhat.com>
1267
1268         * sysdeps/alpha/pt-machine.c (THREAD_SELF): Remove clobber.
1269         Patch by Glen Nakamura <gen@flex.com>.
1270
1271 2002-05-03  Ulrich Drepper  <drepper@redhat.com>
1272
1273         * signals.c: Move sighandler functions to...
1274         * sighandler.c: ...here.  New file.
1275         * signals.c: Move signal handler related type definitions to...
1276         * internals.h: ...here.  Add prototypes for signal handlers.
1277         * Makefile (libpthread-routines): Add sighandler.
1278         (CFLAGS-sighandler.c): Add $(exceptions).
1279
1280 2002-04-30  Jakub Jelinek  <jakub@redhat.com>
1281
1282         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
1283
1284 2002-04-08  Ulrich Drepper  <drepper@redhat.com>
1285
1286         * sysdeps/pthread/timer_getoverr.c: Return real overrun.
1287         * sysdeps/pthread/posix-timer.h (struct timer_node): Add overrun_count.
1288         * sysdeps/pthread/timer_routines.c (thread_func): Schedule next timeout
1289         based on previous one and not on current time.  Count overruns.
1290         Patch by Eric F. Sorton <eric@cctcorp.com>.
1291
1292         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add DELAYTIMER_MAX.
1293
1294 2002-04-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
1295
1296         * sysdeps/sh/pt-machine.h: Define _PT_MACHINE_H
1297         if it isn't defined yet.
1298         (FLOATING_STACKS, ARCH_STACK_MAX_SIZE): Defined.
1299         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
1300         Likewise.
1301         * sysdeps/sh/tls.h: New file.
1302
1303 2002-04-08  Jakub Jelinek  <jakub@redhat.com>
1304
1305         * manager.c (__pthread_manager_event): Use self instead of arg
1306         for INIT_THREAD_SELF.
1307         * sysdeps/i386/useldt.h (INIT_THREAD_SELF): Use sizeof (struct
1308         _pthread_descr_struct) instead of sizeof (*descr).
1309
1310 2002-04-05  Ulrich Drepper  <drepper@redhat.com>
1311
1312         * sysdeps/ia64/pt-machine.h: Protect against multiple inclusion.
1313         * sysdeps/alpha/pt-machine.h: Likewise.
1314         * sysdeps/arm/pt-machine.h: Likewise.
1315         * sysdeps/cris/pt-machine.h: Likewise.
1316         * sysdeps/hppa/pt-machine.h: Likewise.
1317         * sysdeps/m68k/pt-machine.h: Likewise.
1318         * sysdeps/mips/pt-machine.h: Likewise.
1319         * sysdeps/powerpc/pt-machine.h: Likewise.
1320         * sysdeps/s390/s390-32/pt-machine.h: Likewise.
1321         * sysdeps/s390/s390-64/pt-machine.h: Likewise.
1322         * sysdeps/sh/pt-machine.h: Likewise.
1323         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
1324         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1325         * sysdeps/x86_64/pt-machine.h: Likewise.
1326
1327 2002-04-05  Jakub Jelinek  <jakub@redhat.com>
1328
1329         * man/pthread_mutexattr_init.man (pthread_mutexattr_settype): Document
1330         instead of pthread_mutexattr_setkind_np.
1331         (pthread_mutexattr_gettype): Similarly.
1332         * man/pthread_mutexattr_setkind_np.man: New.
1333         * man/Makefile (SOURCES): Add pthread_mutexattr_setkind_np.man.
1334
1335 2002-04-02  Ulrich Drepper  <drepper@redhat.com>
1336
1337         * sysdeps/ia64/pt-machine.h (MEMORY_BARRIER): Define.
1338
1339 2002-03-22  Jakub Jelinek  <jakub@redhat.com>
1340
1341         * sysdeps/mips/pt-machine.h (MEMORY_BARRIER): Remove.
1342
1343 2002-03-22  Ulrich Drepper  <drepper@redhat.com>
1344
1345         * internals.h (MEMORY_BARRIER): Define as asm with memory as clobber.
1346
1347 2002-03-17  Andreas Jaeger  <aj@suse.de>
1348
1349         * sysdeps/i386/pt-machine.h: Add testandset and __compare_and_swap
1350         prototpyes.
1351         * sysdeps/alpha/pt-machine.h: Likewise.
1352         * sysdeps/arm/pt-machine.h: Likewise.
1353         * sysdeps/cris/pt-machine.h: Likewise.
1354         * sysdeps/hppa/pt-machine.h: Likewise.
1355         * sysdeps/i386/i686/pt-machine.h: Likewise.
1356         * sysdeps/ia64/pt-machine.h: Likewise.
1357         * sysdeps/m68k/pt-machine.h: Likewise.
1358         * sysdeps/mips/pt-machine.h: Likewise.
1359         * sysdeps/powerpc/pt-machine.h: Likewise.
1360         * sysdeps/s390/s390-32/pt-machine.h: Likewise.
1361         * sysdeps/s390/s390-64/pt-machine.h: Likewise.
1362         * sysdeps/sh/pt-machine.h: Likewise.
1363         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
1364         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1365         * sysdeps/x86_64/pt-machine.h: Likewise.
1366
1367         * internals.h: Move testandset and __compare_and_swap prototypes
1368         to pt-machine.h.
1369
1370 2002-03-03  Andreas Jaeger  <aj@suse.de>
1371
1372         * errno.c: Include resolv.h to avoid warning.
1373
1374 2002-02-27  Ulrich Drepper  <drepper@redhat.com>
1375
1376         * pthread.c [USE_TLS] (thread_self_stack): Correct check for upper
1377         stack limit.
1378
1379 2002-02-23  Ulrich Drepper  <drepper@redhat.com>
1380
1381         * attr.c (pthread_getattr_np): Don't take thread descriptor size
1382         into account if USE_TLS.
1383         * manager.c (pthread_handle_create): Free TLS data structures if call
1384         failed.  Pass correct stack to clone if USE_TLS.
1385         * sysdeps/i386/pt-machine.h: Handle multiple inclusion.
1386         * sysdeps/i386/i686/pt-machine.h: Likewise.
1387         * sysdeps/i386/tls.h: Unconditionally include <pt-machine.h>.
1388
1389         * descr.h (struct _pthread_descr_struct): Update p_header for TLS.
1390         Add p_stackaddr element #if USE_TLS.
1391         * internals.c: Include <tls.h>.
1392         * manager.c: Integrate creating and handling of thread descriptor
1393         for TLS.
1394         * pthread.c: Likewise.
1395         * sysdeps/i386/tls.h (tcbhead_t): Add self pointer.
1396         Include <linuxthreads/descr.h> only if TLS is really used.
1397         (GET_DTV): New macro.
1398         (TLS_INIT_TP): Initialize self pointer.
1399
1400 2002-02-17  Andreas Schwab  <schwab@suse.de>
1401
1402         * signals.c (sigwait): Check for old sighandler being SIG_ERR,
1403         not NULL.
1404
1405 2002-02-12  Ulrich Drepper  <drepper@redhat.com>
1406
1407         * sysdeps/i386/tls.c (INSTALL_NEW_DTV): Define.
1408         (INSTALL_DTV): Adjust for being passed pointer to element with length.
1409
1410 2002-02-08  Ulrich Drepper  <drepper@redhat.com>
1411
1412         * sysdeps/i386/tls.h (TLS_INIT_TP): Also initialize %gs.
1413
1414 2002-02-08  Richard Henderson  <rth@redhat.com>
1415
1416         * sysdeps/alpha/elf/pt-initfini.c: Use \n\ for multiline string.
1417
1418 2002-02-08  Ulrich Drepper  <drepper@redhat.com>
1419
1420         * sysdeps/i386/tls.h: TLS cannot be supported with FLOATING_STACKS
1421         after all.
1422
1423 2002-02-07  H.J. Lu  <hjl@gnu.org>
1424
1425         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Silence the
1426         gcc warning.
1427         (__pthread_spin_lock): Remove ".set noreorder".
1428         * sysdeps/mips/pt-machine.h (__compare_and_swap): Liekwise.
1429
1430 2002-02-05  H.J. Lu  <hjl@gnu.org>
1431
1432         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Not use
1433         branch likely.
1434         * sysdeps/mips/pt-machine.h (testandset): Likewise.
1435         (__compare_and_swap): Likewise.
1436
1437 2002-02-07  Ulrich Drepper  <drepper@redhat.com>
1438
1439         * internals.h: Move declarations/definitions of
1440         __pthread_initial_thread_bos, __pthread_initial_thread,
1441         __pthread_manager_thread_bos, __pthread_manager_thread_tos,
1442         __pthread_manager_thread, __pthread_nonstandard_stacks, STACK_SIZE,
1443         CURRENT_STACK_FRAME, __pthread_find_self, and thread_self...
1444         * descr.h: ...here.
1445         * sysdeps/i386/tls.h: Add TLS definitions also for !FLOATING_STACKS.
1446         Define THREAD_GETMEM accordingly.
1447
1448 2002-02-06  Ulrich Drepper  <drepper@redhat.com>
1449
1450         * sysdeps/i386/tls.h: Include <stddef.h> for size_t.
1451
1452         * sysdeps/i386/tls.h: Define THREAD_DTV.
1453
1454 2002-02-04  Ulrich Drepper  <drepper@redhat.com>
1455
1456         * internals.h: Move thread descriptor definition...
1457         * descr.h.: ...here.  New file.
1458         * sysdeps/i386/tls.h: New file.
1459
1460 2002-02-01  H.J. Lu  <hjl@gnu.org>
1461
1462         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Use a
1463         different register in the delayed slot.  Use branch likely.
1464
1465         * sysdeps/mips/pt-machine.h (testandset): Call _test_and_set.
1466         (__compare_and_swap): Return 0 only when failed to compare. Use
1467         branch likely.
1468
1469 2002-02-01  Jakub Jelinek  <jakub@redhat.com>
1470
1471         * Versions (__libc_internal_tsd_get, __libc_internal_tsd_set,
1472         __pthread_kill_other_threads_np): Move to GLIBC_PRIVATE.
1473         * sysdeps/i386/i586/Versions: Move all symbols to GLIBC_PRIVATE.
1474         * sysdeps/i386/i686/Versions: Move all symbols to GLIBC_PRIVATE.
1475         * sysdeps/sparc/sparc32/sparcv9/Versions: New file.
1476         * sysdeps/sparc/sparc64/Versions: New file.
1477         * sysdeps/ia64/Versions: Move all symbols to GLIBC_PRIVATE.
1478
1479 2002-01-31  Ulrich Drepper  <drepper@redhat.com>
1480
1481         * pthread.c: _dl_cpuclock_offset is not any longer a global variable
1482         in SHARED code, use GL(dl_cpuclock_offset).
1483
1484 2002-01-28  Andreas Jaeger  <aj@suse.de>
1485
1486         * sysdeps/mips/pspinlock.c (__pthread_spin_init): Clear *LOCK to
1487         0. Patch by Machida Hiroyuki <machida@sm.sony.co.jp>.
1488
1489 2002-01-16  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1490
1491         * sysdeps/s390/s390-32/pt-machine.h (MEMORY_BARRIER): Define.
1492         (CURRENT_STACK_FRAME): Remove duplicate definition.
1493         * sysdeps/s390/s390-64/pt-machine.h: Likewise.
1494
1495 2002-01-14  Martin Schwidefsky  <schwidefsky@de.ibm.com>
1496
1497         * Makefile (CFLAGS-tst-cancel.c): Add -fno-inline-functions to prevent
1498         automatic inline.
1499
1500 2002-01-12  Andreas Schwab  <schwab@suse.de>
1501
1502         * Makefile (test-srcs): Add tst-signal.
1503         (tests): Run tst-signal.
1504         (distribute): Add tst-signal.sh.
1505         * tst-signal.c, tst-signal.sh: New files.
1506
1507 2002-01-14  Andreas Jaeger  <aj@suse.de>
1508
1509         * sysdeps/x86_64/pt-machine.h (INIT_THREAD_SELF): Avoid warning.
1510
1511 2002-01-11  Andreas Schwab  <schwab@suse.de>
1512
1513         * signals.c (sighandler): Initialize all elements to SIG_ERR.
1514         (__sigaction): Don't use value from sighandler if it is SIG_ERR.
1515
1516 2002-01-06  Richard Henderson  <rth@redhat.com>
1517
1518         * sysdeps/alpha/elf/pt-initfini.c: New file.
1519
1520 2001-12-29  Andreas Jaeger  <aj@suse.de>
1521
1522         * Examples/ex9.c: Add noreturn attribute for thread.
1523         * Examples/ex10.c: Likewise.
1524         * Examples/ex13.c (thread_start): Likewise.
1525         * Examples/ex15.c (worker): Likewise.
1526
1527         * Examples/ex18.c: Include unistd.h for prototype of sleep.
1528
1529 2001-12-14  Ulrich Drepper  <drepper@redhat.com>
1530
1531         * man/pthread_atfork.man: Adjust description of mutex handling
1532         after fork for current implementation.
1533         * linuxthreads.texi: Likewise [PR libc/2519].
1534
1535 2001-12-13  Andreas Schwab  <schwab@suse.de>
1536
1537         * specific.c (pthread_key_delete): Don't contact the thread
1538         manager if no threads have been created yet.
1539
1540 2001-12-12  NIIBE Yutaka  <gniibe@m17n.org>
1541
1542         * sysdeps/sh/pt-machine.h (INIT_THREAD_SELF): Added __volatile__
1543         qualifier to be safe.
1544
1545 2001-11-30  Andreas Schwab  <schwab@suse.de>
1546
1547         * pthread.c (pthread_handle_sigcancel) [THREAD_SELF]: Double check
1548         that self is the manager thread, and initialize the thread
1549         register if not.
1550         (thread_self_stack) [THREAD_SELF]: New function to find self via
1551         stack pointer.
1552         * manager.c (pthread_handle_create): Don't block cancel signal any
1553         more.
1554
1555 2001-11-29  Andreas Jaeger  <aj@suse.de>
1556
1557         * sysdeps/x86_64/pt-machine.h: Use %gs as thread specific register.
1558         (THREAD_SELF): New.
1559         (INIT_THREAD_SELF): New.
1560         (THREAD_GETMEM): New.
1561         (THREAD_GETMEM_NC):
1562         (THREAD_SETMEM): New.
1563         (THREAD_SETMEM_NC): New.
1564         (FLOATING_STACKS): Define.
1565         (ARCH_STACK_MAX_SIZE): Define.
1566
1567 2001-11-28  Kaz Kylheku  <kaz@ashi.footprints.net>
1568
1569         Bugfix to pthread_key_delete. It was iterating over the thread
1570         manager's linked list of threads, behind the thread manager's
1571         back causing a race. The fix is to have the manager iterate over
1572         the threads instead, using a new request type for doing so.
1573         * internals.h (struct pthread_request): New manager request type
1574         REQ_FOR_EACH_THREAD.
1575         * manager.c (pthread_for_each_thread): New function.
1576         (__pthread_manager): Handle new REQ_FOR_EACH_THREAD request.
1577         * specific.c (struct pthread_key_delete_helper_args): New type.
1578         (pthread_key_delete_helper): New static function.
1579         (pthread_key_delete): Use the new thread manager
1580         REQ_FOR_EACH_THREAD function to iterate over the threads and set
1581         the delete key slot to a null value in each thread.
1582         * Examples/ex18.c: New test.
1583         * Makefile (tests): Add ex18.
1584
1585 2001-11-22  Wolfram Gloger  <wg@malloc.de>
1586
1587         * pthread.c (pthread_onexit_process): Don't call free
1588         after threads have been asynchronously terminated.
1589
1590         * manager.c (pthread_handle_exit): Surround cancellation
1591         of threads with __flockfilelist()/__funlockfilelist().
1592
1593 2001-11-26  Andreas Schwab  <schwab@suse.de>
1594
1595         * manager.c (pthread_handle_create): Start the child thread with
1596         the cancel signal blocked, so that it does not handle it before
1597         the thread register is set up.  Save errno from failed clone call.
1598
1599 2001-11-15  Ulrich Drepper  <drepper@redhat.com>
1600
1601         * sysdeps/i386/i686/Implies: Removed.
1602         * sysdeps/i386/i686/Versions: New file.
1603
1604 2001-10-31  Andreas Jaeger  <aj@suse.de>
1605
1606         * sysdeps/x86_64/Makefile: Remove, we do not need it anymore.
1607
1608 2001-10-05  Kevin Buettner  <kevinb@cygnus.com>
1609
1610         * pthread.c (__linuxthread_pthread_sizeof_descr): Change name
1611         to __linuxthreads_pthread_sizeof_descr to match name used by
1612         symbol_list_arr[LINUXTHREADS_PTHREAD_SIZEOF_DESCR] in
1613         linuxthreads_db/td_symbol_list.c.
1614
1615 2001-09-22  Andreas Jaeger  <aj@suse.de>
1616
1617         * linuxthreads/tst-context.c: Avoid compile warning.
1618
1619 2001-09-20  Andreas Jaeger  <aj@suse.de>
1620
1621         * shlib-versions: Add x86-64.
1622
1623 2001-09-19  Andreas Jaeger  <aj@suse.de>
1624
1625         * sysdeps/x86_64/Makefile: New file.
1626         * sysdeps/x86_64/pspinlock.c: New file.
1627         * sysdeps/x86_64/pt-machine.h: New file.
1628
1629 2001-09-12  Jakub Jelinek  <jakub@redhat.com>
1630
1631         * sysdeps/pthread/timer_delete.c (timer_delete): Thread may be NULL
1632         for SIGEV_NONE.
1633         * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
1634
1635 2001-09-11  Ulrich Drepper  <drepper@redhat.com>
1636             Wolfram Gloger <wg@malloc.de>
1637
1638         * join.c: Protect all communications from and to manager with
1639         TEMP_FAILURE_RETRY.
1640         * manager.c: Likewise.
1641         * pthread.c: Likewise.
1642         * smeaphore.c: Likewise.
1643
1644 2001-08-29  Ulrich Drepper  <drepper@redhat.com>
1645
1646         * spinlock.c (__pthread_lock): Top max_count value with
1647         MAX_ADAPTIVE_SPIN_COUNT.
1648         * internals.h (MAX_ADAPTIVE_SPIN_COUNT): Define if not already done.
1649
1650         * sysdeps/i386/i686/pt-machine.h (BUSY_WAIT_NOP): New macro to
1651         help P4.
1652
1653 2001-08-27  Jakub Jelinek  <jakub@redhat.com>
1654
1655         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_t): Only define to
1656         non-opaque type if __USE_UNIX98.
1657
1658 2001-08-26  Jakub Jelinek  <jakub@redhat.com>
1659
1660         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_t): Define
1661         non-opaque lock types also if _IO_MTSAFE_IO is defined.
1662
1663 2001-08-23  Roland McGrath  <roland@frob.com>
1664
1665         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start): Take
1666         new first argument, skip the cleanup handler if it's zero.
1667         (_LIBC_LOCK_RECURSIVE_INITIALIZER): New macro.
1668         (__libc_lock_define_initialized_recursive): Use it.
1669         * sysdeps/pthread/bits/stdio-lock.h: File removed.
1670         The sysdeps/generic file from the main tree now suffices.
1671
1672 2001-08-22  Roland McGrath  <roland@frob.com>
1673
1674         * sysdeps/pthread/bits/stdio-lock.h: Include <bits/libc-lock.h>
1675         instead of <pthread.h>.
1676         (_IO_lock_t): Define this typedef using __libc_lock_define_recursive.
1677         (_IO_lock_initializer): Add braces.
1678         (_IO_lock_lock): Use __libc_lock_lock_recursive.
1679         (_IO_lock_unlock): Use __libc_lock_unlock_recursive.
1680
1681         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_recursive_t): New type.
1682         (__libc_lock_define_initialized_recursive): Use it.
1683         (__libc_lock_init_recursive): Likewise.
1684         (__libc_lock_fini_recursive): Likewise.
1685         (__libc_lock_lock_recursive): Likewise.
1686         (__libc_lock_trylock_recursive): Likewise.
1687         (__libc_lock_unlock_recursive): Likewise.
1688         (__libc_lock_define_recursive): New macro.
1689
1690 2001-08-14  Jakub Jelinek  <jakub@redhat.com>
1691
1692         * lockfile.c (__pthread_provide_lockfile): New variable.
1693         * pthread.c (__pthread_require_lockfile): New variable.
1694         * cancel.c (__pthread_require_lockfile): New variable.
1695
1696 2001-07-31  Ulrich Drepper  <drepper@redhat.com>
1697
1698         * tst-context.c (threadfct): Initialize context before calling
1699         makecontext.
1700
1701         * Examples/ex17.c: Make sure test thread is around long enough.
1702
1703 2001-07-26  kaz Kojima  <kkojima@rr.iij4u.or.jp>
1704
1705         * sysdeps/sh/pt-machine.h (THREAD_SELF, INIT_THREAD_SELF): Defined.
1706
1707 2001-07-24  Ulrich Drepper  <drepper@redhat.com>
1708
1709         * tst-context.c (main): Print explanation before bailing out
1710         because context handling is not supported.
1711
1712 2001-07-23  Ulrich Drepper  <drepper@redhat.com>
1713
1714         * Makefile (tests): Add tst-context.
1715         * tst-context.c: New file.
1716
1717         * sysdeps/pthread/bits/stdio-lock.h: Define
1718         _IO_cleanup_region_start_noarg.
1719
1720 2001-07-23  Jakub Jelinek  <jakub@redhat.com>
1721
1722         * sysdeps/alpha/pt-machine.h (FLOATING_STACKS): Define.
1723         (ARCH_STACK_MAX_SIZE): Define.
1724         * sysdeps/sparc/sparc32/pt-machine.h: Likewise.
1725         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
1726
1727 2001-07-19  Jakub Jelinek  <jakub@redhat.com>
1728
1729         * sysdeps/i386/useldt.h: Fix typo in ARCH_STACK_MAX_SIZE comment.
1730
1731         * sysdeps/ia64/pt-machine.h (FLOATING_STACKS): Define.
1732         (ARCH_STACK_MAX_SIZE): Define.
1733         * manager.c (pthread_allocate_stack): Handle FLOATING_STACKS with
1734         NEED_SEPARATE_REGISTER_STACK.
1735
1736 2001-07-16  Andreas Schwab  <schwab@suse.de>
1737
1738         * Makefile (before-compile): Don't add $(objpfx)crti.o.
1739         (omit-deps): Add crti.
1740         ($(objpfx)libpthread.so): Depend on $(objpfx)crti.o, but make sure
1741         it is filtered out of the link command.
1742
1743 2001-07-16  Ulrich Drepper  <drepper@redhat.com>
1744
1745         * pthread.c (pthread_initialize): For FLOATING_STACKS don't bother
1746         to find the right value for __pthread_initial_thread_bos, it's not
1747         used.  If not FLOATING_STACKS first run
1748         __pthread_init_max_stacksize.
1749
1750 2001-06-16  H.J. Lu  <hjl@gnu.org>
1751
1752         * internals.h: Include <stackinfo.h>.
1753
1754         * attr.c: Don't include <stackinfo.h> here.
1755         * cancel.c: Likewise.
1756         * manager.c: Likewise.
1757         * pthread.c: Likewise.
1758         * ptlongjmp.c: Likewise.
1759
1760 2001-03-23  Matthew Wilcox  <willy@ldl.fc.hp.com>
1761
1762         * attr.c: Make _STACK_GROWS_UP work.
1763         * internals.h: Likewise.
1764         * manager.c: Likewise.
1765         * pthread.c: Likewise.
1766
1767 2001-06-15  H.J. Lu  <hjl@gnu.org>
1768
1769         * pthread.c (__pthread_reset_main_thread): Fix a typo.
1770
1771 2001-02-02  John S. Marvin  <jsm@udlkern.fc.hp.com>
1772
1773         * semaphore.h: Use struct _pthread_fastlock as an element of
1774         sem_t instead of an identical struct.
1775         * rwlock.c: Remove casts.
1776         * semaphore.c: Likewise.
1777
1778 2001-04-30  Alan Modra  <amodra@one.net.au>
1779
1780         * sysdeps/unix/sysv/linux/hppa/pt-initfini.c: New.
1781
1782 2001-05-25  Bruce Mitchener  <bruce@cubik.org>
1783
1784         * linuxthreads.texi: Spelling corrections.
1785
1786 2001-05-25  Ulrich Drepper  <drepper@redhat.com>
1787
1788         * oldsemaphore.c (__old_sem_wait): Clear p_nextwaiting before
1789         returning successfully.
1790         Patch by Gene Cooperman <gene@ccs.neu.edu>.
1791
1792 2001-05-24  Ulrich Drepper  <drepper@redhat.com>
1793
1794         * spinlock.c (__pthread_lock) [HAS_COMPARE_AND_SWAP]: Before doing any
1795         serious work try once whether the lock is uncontested.
1796         Remove duplicate reading of __status before loop.
1797         Change suggested by Hans Boehm <hans_boehm@hp.com>.
1798
1799         * spinlock.h (__pthread_trylock): Remove need for oldstatus variable.
1800         (__pthread_alt_trylock): Likewise.
1801
1802 2001-05-01  Kaz Kylheku  <kaz@ashi.footprints.net>
1803
1804         Memory barrier overhaul following line by line inspection.
1805         * mutex.c (pthread_once): Missing memory barriers added.
1806         * pthread.c (__pthread_wait_for_restart_signal,
1807         __pthread_timedsuspend_new, __pthread_restart_new): Added
1808         memory barriers ``just in case'' and for documentary value.
1809         * spinlock.c (__pthread_release): New inline function for releasing
1810         spinlock, to complement __pthread_acquire.  Includes memory
1811         barrier prior to assignment to spinlock, and __asm __volatile
1812         dance to prevent reordering or optimization of the spinlock access.
1813         * spinlock.c (__pthread_unlock, __pthread_alt_lock,
1814         __pthread_alt_timedlock, __pthread_alt_unlock,
1815         __pthread_compare_and_swap): Updated to use new __pthread_release
1816         instead of updating spinlock directly.
1817         * spinlock.c (__pthread_lock, __pthread_unlock, wait_node_alloc,
1818         wait_node_free, wait_node_dequeue, __pthread_alt_lock,
1819         __pthread_alt_timedlock, __pthread_alt_unlock, __pthread_acquire):
1820         Memory barrier overhaul.  Lots of missing memory barriers added,
1821         a couple needless ones removed.
1822         * spinlock.c (__pthread_compare_and_swap): testandset optimization
1823         removed, just calls __pthread_acquire, which has the new read
1824         barrier in it before its testandset.
1825
1826 2001-05-20  Roland McGrath  <roland@frob.com>
1827
1828         * Makeconfig: New file, variables used to be in main libc Makeconfig.
1829
1830 2001-05-09  Geoff Keating  <geoffk@redhat.com>
1831
1832         * sysdeps/powerpc/pt-machine.h
1833         (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): Define.
1834         (__compare_and_swap): Remove memory barriers.
1835         (__compare_and_swap_with_release_semantics): New function.
1836
1837 2001-04-24  Andreas Jaeger  <aj@suse.de>
1838
1839         * wrapsyscall.c: send* and recv* return ssize_t.
1840
1841         * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Unlock the
1842         mutex instead of double locking it.
1843         Reported by Pierre Artaud <partaud@sodatec.com>.
1844
1845 2001-04-23  Ulrich Drepper  <drepper@redhat.com>
1846
1847         * sysdeps/pthread/getcpuclockid.c: Make function generic, test
1848         using #ifdef whether the clock is available.
1849         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: Removed.
1850
1851         * sysdeps/ia64/Versions: New file.
1852
1853         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init): We don't
1854         have to call __gmon_start__ in the libpthread DSO.
1855         * sysdeps/pthread/pt-initfini.c (_init): Likewise.
1856
1857         * Makefile (libpthread-routines): Add ptclock_gettime and
1858         ptclock_settime.
1859         * internals.h: Don't use cpuclock-init.h definitions, use
1860         hp-timing.h definitions.
1861         * pthread.c: Likewise.
1862         * manager.c: Likewise.
1863         * ptclock_gettime.c: New file.
1864         * ptclock_settime.c: New file.
1865         * internals.h: Fix parameter type for __pthread_clock_gettime and
1866         __pthread_clock_settime.
1867
1868         * sysdeps/i386/i586/ptclock_gettime.c: Removed.
1869         * sysdeps/i386/i586/ptclock_settime.c: Removed.
1870         * sysdeps/i386/i586/Makefile: Removed.
1871
1872 2001-04-22  Ulrich Drepper  <drepper@redhat.com>
1873
1874         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_ASYNCH_IO.
1875         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
1876
1877 2001-04-21  Andreas Jaeger  <aj@suse.de>
1878
1879         * sysdeps/pthread/timer_routines.c (thread_func): Add noreturn
1880         attribute, remove statements that will never be executed.
1881         (thread_func): Remove mutex_unlock call since it's never executed.
1882         (thread_func): Fix comment as suggested by Jakub Jelinek.
1883
1884         * manager.c (__pthread_manager): Add noreturn
1885         attribute.
1886         (pthread_start_thread): Likewise, remove return statement.
1887         (pthread_start_thread_event): Likewise.
1888         Add noreturn attribute for pthread_handle_exit.
1889         * weaks.c: Add noreturn attribute for pthread_exit.
1890
1891         * internals.h: Add __pthread_clock_gettime and
1892         __pthread_clock_settime prototypes.
1893
1894 2001-04-21  Ulrich Drepper  <drepper@redhat.com>
1895
1896         * internals.h: Include <cpuclock-init.h>.
1897         (struct _pthread_descr_struct): Add p_cpuclock_offset field if
1898         CPUCLOCK_VARDEF is defined.
1899         * pthread.c (__pthread_initialize_minimal): Initialize
1900         p_cpuclock_offset field for main thread if CPUCLOCK_INIT is defined.
1901         * manager.c (pthread_start_thread): Set p_cpuclock_offset field
1902         for new thread to current CPU clock value.
1903
1904         * sysdeps/i386/useldt.h: Extend all the macros to handle 8-byte values.
1905
1906         * sysdeps/i386/i586/Makefile: New file.
1907         * sysdeps/i386/i586/Versions: New file.
1908         * sysdeps/i386/i586/ptclock_gettime.c: New file.
1909         * sysdeps/i386/i586/ptclock_settime.c: New file.
1910         * sysdeps/i386/i686/Implies: New file.
1911
1912 2001-04-18  Jakub Jelinek  <jakub@redhat.com>
1913
1914         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Put specs into
1915         $generated, not $postclean-generated.
1916
1917 2001-04-18  Andreas Jaeger  <aj@suse.de>
1918
1919         * Makefile (otherlibs): Added.
1920
1921 2001-04-18  Jakub Jelinek  <jakub@redhat.com>
1922
1923         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
1924
1925 2001-04-16  Ulrich Drepper  <drepper@redhat.com>
1926
1927         * signals.c (sigwait): NSIG is no signal number.  Block all
1928         signals while in signal handler for signals in SET.
1929         Patch by Manfred Spraul <manfred@colorfullife.com>.
1930
1931 2001-04-12  Ulrich Drepper  <drepper@redhat.com>
1932
1933         * tst-cancel.c: Disable most tests.  Add new test where all
1934         cleanup handlers must run.
1935         * Makefile (tests): Add tst-cancel again.
1936
1937         * cancel.c (__pthread_perform_cleanup): Correct condition for
1938         leaving cleanup loop early.
1939
1940         * sysdeps/i386/Makefile: Make sure gcc uses a frame pointer for
1941         all the files which use CURRENT_STACK_FRAME.
1942         * sysdeps/i386/pt-machine.h (CURRENT_STACK_FRAME): Define using
1943         __builtin_frame_address.
1944         * sysdeps/i386/i686/pt-machine.h: Likewise.
1945
1946 2001-04-11  Ulrich Drepper  <drepper@redhat.com>
1947
1948         * Makefile (tests): Comment out tst-cancel for now.
1949
1950         * tst-cancel.c (main): Cleanup 4 is supposed to run.  Create
1951         temporary file in object directory.
1952         * Makefile: Don't allow inlining when compiling tst-cancel.c.
1953         Pass $(objpfx) to tst-cancel.
1954
1955 2001-04-11  David S. Miller  <davem@redhat.com>
1956
1957         * sysdeps/sparc/sparc32/pt-machine.h (stack_pointer): Advance
1958         up closer to user local variables so that new cleanup heuristics work.
1959         * sysdeps/sparc/sparc64/pt-machine.h (stack_pointer): Likewise.
1960
1961 2001-04-11  Ulrich Drepper  <drepper@redhat.com>
1962
1963         * cancel.c (_pthread_cleanup_push): Catch invalid __prev buffer
1964         and remove it.
1965         (_pthread_cleanup_push_defer): Likewise.
1966
1967         * tst-cancel.c (main): Fix loop printing cleanup output.
1968
1969 2001-04-10  kaz Kojima  <kkojima@rr.iij4u.or.jp>
1970
1971         * sysdeps/sh/pspinlock.c (__pthread_spin_lock): Fix a reverse
1972         test.
1973         (__pthread_spin_trylock): Likewise.
1974         * sysdeps/sh/pt-machine.h (testandset): Likewise.
1975
1976 2001-04-10  Ulrich Drepper  <drepper@redhat.com>
1977
1978         * join.c (pthread_exit): Move code to new function __pthread_do_exit
1979         which takes an extra parameter with the current frame pointer.
1980         Call new function with CURRENT_STACK_FRAME.
1981         (__pthread_do_exit): New function.  Call __pthread_perform_cleanup
1982         with the new parameter.
1983         (pthread_join): Call __pthread_do_exit instead of pthread_exit.
1984         * cancel.c (__pthread_perform_cleanup): Takes extra parameter.  Use
1985         this parameter as the initial value the cleanup handler records are
1986         compared against.  No active cleanup handler record must have an
1987         address lower than the previous one and the initial record must be
1988         above (below on PA) the frame address passed in.
1989         (pthread_setcancelstate): Call __pthread_do_exit instead of
1990         pthread_exit.
1991         (pthread_setcanceltype): Likewise.
1992         (pthread_testcancel): Likewise.
1993         (_pthread_cleanup_pop_restore): Likewise.
1994         * condvar.c (pthread_cond_wait): Likewise.
1995         (pthread_cond_timedwait_relative): Likewise.
1996         * manager.c (pthread_start_thread): Likewise.
1997         * oldsemaphore.c (__old_sem_wait): Likewise.
1998         * pthread.c (pthread_handle_sigcancel): Likewise.
1999         * semaphore.c (__new_sem_wait): Likewise.
2000         (sem_timedwait): Likewise.
2001         * ptlongjmp.c (pthread_cleanup_upto): Also use current stack frame
2002         to limit the cleanup handlers which get run.
2003         * internals.h: Add prototype for __pthread_do_exit.  Adjust prototype
2004         for __pthread_perform_cleanup.
2005
2006         * Makefile (tests): Add tst-cancel.
2007         * tst-cancel.c: New file.
2008
2009 2001-04-08  Hans-Peter Nilsson  <hp@axis.com>
2010
2011         * sysdeps/cris/pt-machine.h: New file.
2012         * sysdeps/cris/pspinlock.c: New file.
2013
2014 2001-04-09  Hans-Peter Nilsson  <hp@axis.com>
2015
2016         * shlib-versions: Add case for Linux on CRIS.
2017
2018 2001-03-26  Ulrich Drepper  <drepper@redhat.com>
2019
2020         * attr.c (pthread_getattr_np): Correct computation of stack size
2021         for machiens with register stack.
2022
2023         * Examples/ex17.c (main): Correct detection of failed mmap call.
2024
2025 2001-03-21  Jakub Jelinek  <jakub@redhat.com>
2026
2027         * pthread.c (__pthread_initialize_manager): Fix a typo.
2028
2029 2001-03-21  Jakub Jelinek  <jakub@redhat.com>
2030
2031         * attr.c (__pthread_attr_setstack): Fix alignment check.
2032         (pthread_getattr_np): __stackaddr is top of stack, not bottom.
2033         * Makefile (tests): Add ex17 test.
2034         * Examples/ex17.c: New test.
2035
2036 2001-03-20  Ulrich Drepper  <drepper@redhat.com>
2037
2038         * Makefile: Define -D_RPC_THREAD_SAFE_ for cancel.c.
2039         * cancel.c (__pthread_perform_cleanup): Call __rpc_thread_destroy.
2040         * sysdeps/pthread/bits/libc-tsd.h: Define _LIBC_TSD_KEY_VARS.
2041
2042 2001-03-18  Ulrich Drepper  <drepper@redhat.com>
2043
2044         * Makefile: When generating DSO link with libc_nonshared.a.
2045
2046 2001-02-26  Jakub Jelinek  <jakub@redhat.com>
2047
2048         * signals.c (pthread_sighandler): Use CALL_SIGHANDLER.
2049
2050 2001-02-23  Jakub Jelinek  <jakub@redhat.com>
2051
2052         * internals.h (__pthread_init_max_stacksize): New prototype.
2053         * attr.c (__pthread_attr_setstacksize): Call
2054         __pthread_init_max_stacksize if not yet initialized.
2055         * pthread.c (__pthread_init_max_stacksize): New function.
2056         (__pthread_initialize_manager): Call it.
2057         Patch by <dtc@cmucl.cons.org>.
2058
2059 2001-03-16  Ulrich Drepper  <drepper@redhat.com>
2060
2061         * attr.c (pthread_getattr_np): Fix __stacksize computation for IA-64.
2062
2063 2001-03-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2064
2065         * shlib-versions: Add rule for Linux on 64 bit S/390.
2066         * sysdeps/s390/s390-64/pt-machine.h: New file.
2067         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
2068
2069 2001-03-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2070
2071         * sysdeps/s390/pt-machine.h: Move to...
2072         * sysdeps/s390/s390-32/pt-machine.h: ...here.
2073         Add defines for FLOATING_STACK and ARCH_STACK_MAX_SIZE.
2074
2075 2001-03-15  Ulrich Drepper  <drepper@redhat.com>
2076
2077         * Versions [libpthread] (GLIBC_2.2.3): Add pthread_getattr_np.
2078         * attr.c: Implement pthread_getattr_np.
2079         * sysdeps/pthread/pthread.h: Add prototype for pthread_getattr_np.
2080         * internals.h (struct _pthread_descr_struct): Add p_inheritsched.
2081         * manager.c (pthread_handle_create): Initialize p_inheritsched.
2082
2083 2001-03-09  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2084
2085         * sysdeps/unix/sysv/linux/s390/pt-initfini.c: Use 0x07 padding for
2086         code alignment.
2087
2088 2001-02-20  Hans Boehm  <hans_boehm@hp.com>
2089
2090         * manager.c (manager_mask): Removed static vesion.  Now always local
2091         to __pthread_manager().
2092         (manager_mask_all): Removed completely.
2093         (__pthread_manager): Remove manager_mask_all initialization.
2094         (pthread_handle_create): Remove code to set and reset signal mask
2095         around __clone2() calls.
2096
2097 2001-02-17  Jakub Jelinek  <jakub@redhat.com>
2098
2099         * spinlock.c (__pthread_lock): Force lock->__status to be read from
2100         memory on every spin.
2101
2102 2001-02-10  Andreas Jaeger  <aj@suse.de>
2103
2104         * Makefile (extra-objs): New.
2105
2106 2001-02-09  Jakub Jelinek  <jakub@redhat.com>
2107
2108         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Add
2109         __pthread_initialize_minimal prototype.
2110
2111 2001-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
2112
2113         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
2114
2115 2001-02-06  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2116
2117         * sysdeps/unix/sysv/linux/s390/pt-initfini.c: New file.
2118
2119 2001-02-06  Ulrich Drepper  <drepper@redhat.com>
2120
2121         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: First attempt to fix the
2122         broken code.  Patch by Jes Sorensen.
2123
2124 2001-02-06  Andreas Jaeger  <aj@suse.de>
2125
2126         * sysdeps/pthread/pthread.h: Move __pthread_initialize from here
2127         to...
2128         * internals.h: ...here.
2129
2130 2001-02-05  Jes Sorensen  <jes@linuxcare.com>
2131
2132         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
2133
2134 2001-02-02  Ulrich Drepper  <drepper@redhat.com>
2135
2136         * Versions: Remove __pthread_initialize_minimal.
2137
2138 2001-02-01  Ulrich Drepper  <drepper@redhat.com>
2139
2140         * Makefile: Add rules to build crti.o and make it being used in
2141         building libpthread.so.
2142         * sysdeps/i386/Makefile: New file.
2143         * sysdeps/pthread/pt-initfini.c: New file.
2144
2145         * pthread.c: Cleanups.
2146
2147 2001-01-28  Andreas Jaeger  <aj@suse.de>
2148
2149         * oldsemaphore.c (__old_sem_init): Adjust for last change.
2150         * sysdeps/pthread/bits/libc-lock.h: Likewise.
2151         * spinlock.c: Likewise.
2152
2153 2001-01-28  Ulrich Drepper  <drepper@redhat.com>
2154
2155         * sysdeps/pthread/bits/initspin.h: Make all names namespace clean.
2156         * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: Likewise.
2157         * manager.c: Adjust for namespace cleanup in bits/initspin.h.
2158         * pthread.c: Likewise.
2159         * spinlock.h: Likewise.
2160         * sysdeps/pthread/pthread.h: Likewise.
2161
2162 2001-01-26  Ulrich Drepper  <drepper@redhat.com>
2163
2164         * sysdeps/pthread/bits/pthreadtypes.h: Define pthread_attr_t also
2165         as struct __pthread_attr_s.
2166
2167         * semaphore.h (sem_t): Cleanup namespace, rename status and
2168         spinlock elements.
2169
2170 2001-01-13  Jakub Jelinek  <jakub@redhat.com>
2171
2172         * pthread.c (pthread_onexit_process): Clear
2173         __pthread_manager_thread_bos after freeing it.
2174         * Makefile (tests): Add ex16.
2175         * Examples/ex16.c: New file.
2176
2177 2001-01-11  Jakub Jelinek  <jakub@redhat.com>
2178
2179         * Makefile (CFLAGS-pthread.c): Pass -DHAVE_Z_NODELETE if ld supports
2180         -z nodelete.
2181         * pthread.c (pthread_exit_process): Rename to...
2182         (pthread_onexit_process): ...this.
2183         (pthread_atexit_process, pthread_atexit_retcode): New.
2184         (pthread_initialize): Call __cxa_atexit instead of __cxa_on_exit
2185         and only if HAVE_Z_NODELETE is not defined.
2186         (__pthread_initialize_manager): Register pthread_atexit_retcode
2187         with __cxa_atexit.
2188
2189 2001-01-11  Ulrich Drepper  <drepper@redhat.com>
2190
2191         * pthread.c (pthread_initialize): Use __cxs_on_exit not __cxa_atexit.
2192
2193 2001-01-11  Jakub Jelinek  <jakub@redhat.com>
2194
2195         * Makefile (tests): Add ex15.
2196         * Examples/ex15.c: New test.
2197
2198 2001-01-08  Ulrich Drepper  <drepper@redhat.com>
2199
2200         * pthread.c (pthread_exit_process): Free memory allocated for
2201         manager stack.
2202
2203 2000-12-31  Ulrich Drepper  <drepper@redhat.com>
2204
2205         * manager.c (pthread_alloca_stack): Remove MAP_FIXED from mmap calls.
2206         (pthread_free): Always unmap the stack.  It's safe now that we don't
2207         use MAP_FIXED to allocate stacks.
2208
2209 2000-12-31  Ulrich Drepper  <drepper@redhat.com>
2210
2211         * sysdeps/powerpc/pspinlock.c: Don't include pt-machine.h here.
2212
2213         * manager.c (pthread_allocate_stack): Prepare for removal of MAP_FIXED.
2214
2215 2000-11-15  Wolfram Gloger  <wg@malloc.de>
2216
2217         * manager.c (pthread_free): [!FLOATING_STACKS]: Only remap the
2218         stack to PROT_NONE, don't unmap it, avoiding collisions with malloc.
2219
2220 2000-12-27  Andreas Jaeger  <aj@suse.de>
2221
2222         * Examples/ex13.c: Make local functions static.
2223         * ecmutex.c: Likewise.
2224         * joinrace.c: Likewise.
2225         * Examples/ex14.c: Likewise.
2226
2227         * Examples/ex2.c: Make local functions static; reformat.
2228         * Examples/ex1.c: Likewise.
2229         * Examples/ex4.c: Likewise.
2230         * Examples/ex5.c: Likewise.
2231         * Examples/ex7.c: Likewise.
2232
2233         * oldsemaphore.c: Add prototypes to shut up GCC.
2234         * pt-machine.c: Likewise.
2235
2236         * weaks.c: Add prototype for pthread_exit.
2237
2238         * internals.h: Add some prototypes, format prototypes and add
2239         missing externs.
2240         Move __libc_waitpid prototype to include/sys/wait.h.
2241
2242         * rwlock.c: Include <bits/libc-lock.h> for prototypes.
2243         * mutex.c: Likewise.
2244         * specific.c: Likewise.
2245         * ptfork.c: Likewise.
2246
2247         * lockfile.c: Include internals.h to get prototypes.
2248         * events.c: Likewise.
2249         * sysdeps/alpha/pspinlock.c: Likewise.
2250         * sysdeps/arm/pspinlock.c: Likewise.
2251         * sysdeps/hppa/pspinlock.c: Likewise.
2252         * sysdeps/i386/pspinlock.c: Likewise.
2253         * sysdeps/ia64/pspinlock.c: Likewise.
2254         * sysdeps/m68k/pspinlock.c: Likewise.
2255         * sysdeps/mips/pspinlock.c: Likewise.
2256         * sysdeps/powerpc/pspinlock.c: Likewise.
2257         * sysdeps/s390/pspinlock.c: Likewise.
2258         * sysdeps/sh/pspinlock.c: Likewise.
2259         * sysdeps/sparc/sparc32/pspinlock.c: Likewise.
2260         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: Likewise.
2261         * sysdeps/sparc/sparc64/pspinlock.c: Likewise.
2262
2263 2000-12-27  Ulrich Drepper  <drepper@redhat.com>
2264
2265         * attr.c (__pthread_attr_setstack): Fix setting of __stackaddr element.
2266         (__pthread_attr_getstack): Return correct address.
2267         Add warnings for using pthread_attr_getstackaddr and
2268         pthread_attr_setstackaddr.
2269
2270 2000-12-26  Ulrich Drepper  <drepper@redhat.com>
2271
2272         * Examples/ex6.c (test_thread): Make static.
2273         * Examples/ex12.c (test_thread): Make static and add noreturn
2274         attribute.
2275
2276 2000-12-18  Jes Sorensen  <jes@linuxcare.com>
2277
2278         * linuxthreads/sysdeps/ia64/pt-machine.h: __compare_and_swap
2279         and compare_and_swap_with_release_semantics returns int not long.
2280
2281 2000-12-17  Andreas Jaeger  <aj@suse.de>
2282
2283         * sysdeps/s390/pt-machine.h (testandset): Use long int as return
2284         value.
2285         * sysdeps/arm/pt-machine.h (testandset): Likewise.
2286         * sysdeps/hppa/pt-machine.h (testandset): Likewise.
2287         * sysdeps/m68k/pt-machine.h (testandset): Likewise.
2288         * sysdeps/sh/pt-machine.h (testandset): Likewise.
2289         * sysdeps/sparc/sparc32/pt-machine.h (testandset): Likewise.
2290         * sysdeps/sparc/sparc64/pt-machine.h (testandset): Likewise.
2291
2292 2000-12-17  Ulrich Drepper  <drepper@redhat.com>
2293
2294         * sysdeps/i386/pt-machine.h (testandset): Adjust for prototype change.
2295         * sysdeps/i386/i686/pt-machine.h (testandset): Likewise.
2296
2297 2000-12-17  Andreas Jaeger  <aj@suse.de>
2298
2299         * internals.h: Add prototypes for testandset and
2300         __compare_and_swap to shut up gcc warnings.
2301
2302 2000-12-06  Wolfram Gloger  <wg@malloc.de>
2303
2304         * join.c (pthread_detach): Allow case where the thread has already
2305         terminated.
2306
2307 2000-12-05  Andreas Jaeger  <aj@suse.de>
2308
2309         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Don't set mips2.
2310         * sysdeps/mips/pt-machine.h (testandset): Likewise.
2311         (__compare_and_swap): Likewise.
2312         Patches by Maciej W. Rozycki <macro@ds2.pg.gda.pl>.
2313
2314 2000-11-20  Jakub Jelinek  <jakub@redhat.com>
2315
2316         * Examples/ex3.c (main): Cast int to long before casting to void *.
2317         (search): Cast void * to long, not int.
2318         * Examples/ex8.c (main, thread): Similarly.
2319         * Examples/ex11.c (main): Similarly.
2320         * Examples/ex14.c (worker, do_test): Similarly.
2321         * ecmutex.c (worker, do_test): Similarly.
2322         (nlocks): Cast to int.
2323
2324 2000-11-08  Bruce Mitchener  <bruce@cubik.org>
2325
2326         * linuxthreads.texi:  Add documentation for pthreads attributes
2327         guardsize, stackaddr, stacksize, and stack.  Fix typo in previous
2328         patch.  Document pthread_[sg]etconcurrency().  Mark
2329         pthread_mutexattr_[sg]ettype() as POSIX rather than GNU.
2330
2331 2000-11-07  Ulrich Drepper  <drepper@redhat.com>
2332
2333         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
2334         Don't define it.
2335         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2336         Reported by Christopher Yeoh <cyeoh@linuxcare.com.au>.
2337
2338 2000-11-06  Ulrich Drepper  <drepper@redhat.com>
2339
2340         * cancel.c (pthread_cancel): Always set p_canceled, even if we are
2341         not doing it right now.
2342         Reported by Kaz Kylheku <kaz@ashi.footprints.net>.
2343
2344 2000-10-30  Ulrich Drepper  <drepper@redhat.com>
2345
2346         * Examples/ex4.c (main): Don't use exit() to avoid warning with
2347         broken compilers.
2348
2349 2000-10-29  Ulrich Drepper  <drepper@redhat.com>
2350
2351         * attr.c (__pthread_attr_setguardsize): Don't round guardsize
2352         here.  Reported by Bruce Mitchener <bruce@cubik.org>.
2353
2354         * linuxthreads.texi: Changes terminology to 'type' from 'kind' when
2355         discussing mutexes. (As per the Unix98 name for the API.)
2356         Changes documentation for pthread_mutexattr_setkind_np() and
2357         pthread_mutexattr_getkind_np() over to the Unix98 APIs for the
2358         same: pthread_mutexattr_settype() and pthread_mutexattr_gettype().
2359         Changes references to PTHREAD_MUTEXATTR_FAST_NP to
2360         PTHREAD_MUTEXATTR_ADAPTIVE_NP.
2361         Begins to introduce discussion of the ``timed'' mutex type.  This
2362         discussion is currently incomplete.
2363         Patch by Bruce Mitchener <bruce@cubik.org>.
2364
2365 2000-10-26  Kazumoto Kojima  <kkojima@rr.iij4u.or.jp>
2366             Yutaka Niibe  <gniibe@chroot.org>
2367
2368         * sysdeps/sh/pt-machine.h (testandset): Since the operand of TAS.B
2369         has restrictions, use register.
2370
2371 2000-10-23  Andreas Schwab  <schwab@suse.de>
2372
2373         * Examples/ex14.c (TIMEOUT): Override default timeout.
2374
2375 2000-10-16  Ulrich Drepper  <drepper@redhat.com>
2376
2377         * specific.c: Protect tsd array modification in thread data
2378         structures by getting the thread lock in pthread_key_delete and
2379         __pthread_destroy_specifics.
2380         Patch by Wolfram Gloger <Wolfram.Gloger@dent.med.uni-muenchen.de>.
2381
2382 2000-10-12  Alan Modra <alan@linuxcare.com.au>
2383
2384         * sysdeps/pthread/bits/initspin.h: New file.
2385         * spinlock.h: Move LOCK_INITIALIZER definition to <bits/initspin.h>.
2386         (__pthread_init_lock): Initialize lock with LT_SPINLOCK_INIT.
2387         (__pthread_alt_init_lock): Likewise.
2388         (__pthread_alt_trylock): Release lock with LT_SPINLOCK_INIT.
2389
2390 2000-10-12  David Huggins-Daines  <dhd@linuxcare.com>
2391
2392         * oldsemaphore.c (__old_sem_init): Release lock with
2393         LT_SPINLOCK_INIT, not zero.
2394         * spinlock.c (__pthread_unlock): Likewise.
2395         (__pthread_alt_lock): Likewise.
2396         (__pthread_alt_timedlock): Likewise.
2397         (__pthread_alt_unlock): Likewise.
2398         * sysdeps/pthread/bits/libc-lock.h: Initialize locks with
2399         LT_SPINLOCK_INIT if it is non-zero.  Likewise for init-once flags.
2400         * sysdeps/pthread/pthread.h: Include bits/initspin.h.  Use
2401         LT_SPINLOCK_INIT do initialize spinlocks not 0.
2402
2403 2000-10-12  David Huggins-Daines <dhd@linuxcare.com>
2404
2405         * shlib-versions: Add version definitions for hppa-linux.
2406
2407 2000-10-12  Alan Modra <alan@linuxcare.com.au>
2408
2409         * sysdeps/hppa/pspinlock.c: New file.
2410         * sysdeps/hppa/pt-machine.h: New file.
2411         * sysdeps/unix/sysv/linux/hppa/bits/initspin.h: New file.
2412
2413 2000-10-05  Jakub Jelinek  <jakub@redhat.com>
2414
2415         * mutex.c (__pthread_mutex_destroy): Correct test of
2416         busy mutex for mutexes using alternate fastlocks.
2417         Patch by dtc@cmucl.cons.org.
2418
2419 2000-09-28  Martin Schwidefsksy    <schwidefsky@de.ibm.com>
2420
2421         * sysdeps/s390/pt-machine.h: Make %a0 the thread register.
2422
2423 2000-09-28  Ulrich Drepper  <drepper@redhat.com>
2424
2425         * mutex.c (__pthread_mutex_unlock): For PTHREAD_MUTEX_RECURSIVE_NP
2426         test for owner first.
2427         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2428
2429         * cancel.c (pthread_cancel): Don't do anything if cancelation is
2430         disabled.
2431
2432 2000-09-26  Ulrich Drepper  <drepper@redhat.com>
2433
2434         * spinlock.h (__pthread_set_own_extricate_if): Optimize a bit.
2435         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2436
2437         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
2438         _POSIX_MONOTONIC_CLOCK.
2439
2440         * spinlock.h (__pthread_set_own_extricate_if): Add back locking
2441         and explain why.
2442
2443 2000-09-20  Andreas Jaeger  <aj@suse.de>
2444
2445         * pthread.c [!__ASSUME_REALTIME_SIGNALS]: Make inclusion of
2446         "testrtsig.h" conditional.
2447
2448 2000-09-11  Ulrich Drepper  <drepper@redhat.com>
2449
2450         * sysdeps/pthread/pthread.h: Declare pthread_attr_getstack and
2451         pthread_attr_setstack.
2452         * Versions [libpthread] (GLIBC_2.2): Export pthread_attr_getstack and
2453         pthread_attr_setstack.
2454         * attr.c (pthread_attr_getstack, pthread_attr_setstack): New functions.
2455
2456 2000-09-05  Ulrich Drepper  <drepper@redhat.com>
2457
2458         * Examples/ex14.c: New file.
2459         * Makefile (tests): Add ex14.
2460
2461         * mutex.c (__pthread_mutex_unlock): Correct test for already unlocked
2462         mutex.  Patch by dtc@cmucl.cons.org.
2463
2464         * ecmutex.c: New file.
2465         * Makefile (tests): Add ecmutex.
2466
2467 2000-09-04  H.J. Lu  <hjl@gnu.org>
2468
2469         * attr.c (__pthread_attr_setguardsize): Use page_roundup
2470         instead of roundup to round up to the page size.
2471
2472 2000-09-03  Mark Kettenis  <kettenis@gnu.org>
2473
2474         * manager.c (pthread_exited): Correctly report event as TD_REAP
2475         instead of TD_DEATH.  Fix comments.
2476
2477 2000-09-03  Ulrich Drepper  <drepper@redhat.com>
2478
2479         * spinlock.h (testandset): Add cast to avoid warning.
2480         Patch by Franz Sirl <Franz.Sirl-kernel@lauterbach.com>.
2481
2482 2000-09-02  Andreas Jaeger  <aj@suse.de>
2483
2484         * sysdeps/pthread/timer_routines.c: Include stdlib.h for abort
2485         prototype.
2486
2487 2000-09-01  Ulrich Drepper  <drepper@redhat.com>
2488
2489         * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
2490         Fix typo in last patch (_mode -> _flags).
2491
2492         * sysdeps/pthread/bits/stdio-lock.h (_IO_cleanup_region_start):
2493         Provide definition which respects _IO_USER_LOCK flag.
2494
2495 2000-08-30  Ulrich Drepper  <drepper@redhat.com>
2496
2497         * manager.c (pthread_allocate_stack): Clear descriptor only if not
2498         mmaped.
2499
2500 2000-08-25  Ulrich Drepper  <drepper@redhat.com>
2501
2502         * Makefile: Add rules to build and run unload.
2503         * unload.c: New file.
2504
2505         * pthread.c (pthread_exit_process): Move thread_self use inside `if'.
2506
2507         * sysdeps/pthread/pthread.h
2508         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Defined.
2509         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: Defined.
2510
2511 2000-08-24  Andreas Jaeger  <aj@suse.de>
2512
2513         * Examples/ex13.c: Include <string.h> for strerror prototype and
2514         <stdlib.h> for abort prototype.
2515         (pthr_cond_signal_mutex): Rewrite to silence GCC.
2516         (thread_start): Remove unused variable err.
2517         (main): Silence GCC warnings.
2518
2519 2000-08-22  Andreas Jaeger  <aj@suse.de>
2520
2521         * Examples/ex13.c: New test by Kurt Garloff <garloff@suse.de>.
2522
2523         * Makefile (tests): Add ex13.
2524
2525 2000-08-20  Ulrich Drepper  <drepper@redhat.com>
2526
2527         * semaphore.h: Add restrict where required by AGd4.
2528         * sysdeps/pthread/pthread.h: Likewise.
2529         * sysdeps/pthread/unix/sysv/linux/bits/sigthread.h: Likewise.
2530
2531 2000-08-15  Ulrich Drepper  <drepper@redhat.com>
2532
2533         * Makefile (tests): Add ex12.  Add rule to build it.
2534         * Examples/ex12.c: New file.
2535
2536 2000-08-13  Ulrich Drepper  <drepper@redhat.com>
2537
2538         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_SEMAPHORES
2539         even though the implementation is not quite complete (but it reports
2540         it).  Define _POSIX_MESSAGE_PASSING to -1.
2541         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2542
2543 2000-08-12  Andreas Jaeger  <aj@suse.de>
2544
2545         * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for
2546         assembler.
2547         (__compare_and_swap): Likewise.
2548         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
2549
2550 2000-08-10  Ulrich Drepper  <drepper@redhat.com>
2551
2552         * pthread.c (__pthread_initial_thread): Initialize p_errnop and
2553         p_h_errnop correctly and not to NULL.
2554
2555 2000-08-05  Ulrich Drepper  <drepper@redhat.com>
2556
2557         * Banner: Bump version number to 0.9.
2558
2559 2000-08-04  Ulrich Drepper  <drepper@redhat.com>
2560
2561         * Makefile (tests): Add tststack.  Add rule to build the program.
2562         * tststack.c: New file.
2563
2564         * internals.h: Declare __pthread_max_stacksize.
2565         * pthread.c (__pthread_max_stacksize): New variable.
2566         (__pthread_initialize_manager): Determine __pthread_initialize_manager
2567         value.
2568         * manager.c (thread_segment): Return always NULL if FLOATING_STACKS.
2569         (pthread_allocate_stack): Allow kernel to choose stack address if
2570         FLOATING_STACKS.  This also handles variable-sized stacks.
2571         Always allocate stack and guardpage together.  Use mprotect to
2572         change guardpage access.
2573         * sysdeps/i386/useldt.h: Define FLOATING_STACKS and
2574         ARCH_STACK_MAX_SIZE.
2575
2576         * attr.c (__pthread_attr_setstacksize): Also test value against
2577         upper limit.
2578
2579         * manager.c (__pthread_nonstandard_stacks): Define only if
2580         THREAD_SELF is not defined.
2581         (pthread_allocate_stack): Always initialize gardaddr to a correct
2582         value.
2583         (pthread_handle_create): Unmap thread with one call.
2584         (pthread_free): Remove test for initial thread before removing stack.
2585         Unmap stack with one call.
2586
2587         * pthread.c (__pthread_initial_thread): Initialize p_userstack to
2588         1 to avoid removing the stack.
2589
2590 2000-07-27  Jes Sorensen  <jes@linuxcare.com>
2591
2592         * sysdeps/ia64/pspinlock.c (__pthread_spin_lock): Add
2593         load of spin lock to prime the cache before the atomic compare and
2594         exchange operation (cmpxchg4). This avoids the spinning on the
2595         cmpxchg4 instruction and reduces movement of the cache line back
2596         and forth between the processors (explanation by Asis K. Mallick
2597         from Intel). This basically makes the implementation operate the
2598         same as the Linux kernel implementation.
2599
2600         * shlib-versions: Use GLIBC_2_2 for Linux/ia64.
2601         * sysdeps/ia64/pspinlock.c: New file.
2602
2603 2000-08-03  Ulrich Drepper  <drepper@redhat.com>
2604
2605         * pthread.c: Move definition of __pthread_set_own_extricate_if...
2606         * spinlock.h: ...here.  Remove locking.
2607         * internals.h: Remove __pthread_set_own_extricate_if prototype.
2608
2609         * rwlock.c: Use THREAD_GETMEM And THREAD_SETMEM.
2610         (rwlock_rd_extricate_func): Don't determine self, let
2611         __pthread_lock do it.
2612         (rwlock_wr_extricate_func): Likewise.
2613         (rwlock_have_already): Optimize *pself handling a bit.
2614
2615         * mutex.c: Use __builtin_expect.
2616         * pthread.c: Likewise.
2617
2618 2000-08-02  Andreas Jaeger  <aj@suse.de>
2619
2620         * sysdeps/s390/pspinlock.c: New file.
2621         * sysdeps/s390/pt-machine.h: New file.
2622         Patches by Martin Schwidefsky <schwidefsky@de.ibm.com>.
2623
2624 2000-07-12  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
2625
2626         * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Implement for
2627         R3K.
2628         * sysdeps/mips/pt-machine.h (testandset): Likewise.
2629
2630 2000-07-26  Andreas Jaeger  <aj@suse.de>
2631
2632         * pthread.c: Initialize p_sem_avail.
2633
2634 2000-07-25  Ulrich Drepper  <drepper@redhat.com>
2635
2636         * internals.h (struct __pthread_descr_struct): Add p_sem_avail.
2637         * semaphore.c: Handle spurious wakeups.
2638
2639         * sysdeps/pthread/pthread.h: Add back PTHREAD_MUTX_FAST_NP as an alias
2640         for PTHREAD_MUTEX_ADAPTIVE_NP for source code compatibility.
2641
2642         * pthread.c (__pthread_set_own_extricate): Use THREAD_GETMEM.
2643         (__pthread_wait_for_restart): Likewise.
2644
2645         * condvar.c (pthread_cond_wait): Also check whether thread is
2646         cancelable before aborting loop.
2647         (pthread_cond_timedwait): Likewise.
2648
2649         * signals.c (pthread_sighandler): Remove special code to restrore
2650         %gs on x86.
2651         (pthread_sighandler_t): Likewise.
2652
2653 2000-07-25  Mark Kettenis  <kettenis@gnu.org>
2654
2655         * internals.h (__RES_PTHREAD_INTERNAL): Remove define.
2656         * pthread.c: Include <resolv.h>.
2657         (_res): Undefine.  Add extern declaration.
2658
2659 2000-07-24  Ulrich Drepper  <drepper@redhat.com>
2660
2661         * pthread.c (__pthread_initial_thread): Update initializer.
2662         (__pthread_manager_thread): Likewise.
2663         (pthread_initialize): Move setrlimit call to...
2664         (__pthread_initialize_manager): ...here.
2665         (__pthread_reset_main_thread): Reset also soft limit on stack size.
2666
2667         * condvar.c: Handle spurious wakeups.  [PR libc/1749].
2668         * internals.h (struct _pthread_descr_struct): Add p_condvar_avail.
2669
2670 2000-07-21  Ulrich Drepper  <drepper@redhat.com>
2671
2672         * spinlock.h: If IMPLEMENT_TAS_WITH_CAS is defined use
2673         __compare_and_swap to define testandset.
2674         * sysdeps/powerpc/pt-machine.h: Add volatile to asms.
2675         Define IMPLEMENT_TAS_WITH_CAS.
2676
2677 2000-07-20  Ulrich Drepper  <drepper@redhat.com>
2678
2679         * Makefile: Pass -z nodelete to linker for libpthread.so
2680         generation if it understand this option.
2681
2682 2000-07-18  Mark Kettenis  <kettenis@gnu.org>
2683
2684         * manager.c (pthread_handle_create): Remove initialization of
2685         new_thread->p_res._sock.
2686
2687 2000-07-19  Kaz Kylheku  <kaz@ashi.footprints.net>
2688
2689         Bugfixes to the variant of the code for machines with no compare
2690         and swap.
2691
2692         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Wait
2693         node was not being properly enqueued, due to failing to update
2694         the lock->__status field.
2695
2696         * spinlock.c (__pthread_alt_timedlock): The oldstatus variable was
2697         being set inappropriately, causing the suspend function to be called
2698         with a null self pointer and crash.
2699
2700 2000-07-18  Ulrich Drepper  <drepper@redhat.com>
2701
2702         * spinlock.h (__pthread_alt_trylock): Fix code used if no
2703         compare&swap is available.
2704
2705         * spinlock.h (__pthread_trylock): Use __compare_and_swap, not
2706         compare_and_swap.
2707
2708         * pthread.c (pthread_initialize): Don't use sysconf to determine
2709         whether the machine has more than one processor.
2710
2711         * spinlock.c (__pthread_alt_timedlock): Add back one of the
2712         removed thread_self calls.
2713
2714 2000-07-18  Kaz Kylheku  <kaz@ashi.footprints.net>
2715
2716         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Changed
2717         __compare_and_swap to compare_and_swap in code which assumes
2718         compare swap is available.
2719
2720 2000-07-18  Kaz Kylheku  <kaz@ashi.footprints.net>
2721
2722         * spinlock.c (__pthread_alt_lock, __pthread_alt_timedlock): Fixed
2723         bug whereby thr field of waitnode structure would not be correctly
2724         set unless a null self pointer is passed to the functions.
2725         Eliminated redundant calls to thread_self().
2726
2727 2000-07-18  Jakub Jelinek  <jakub@redhat.com>
2728
2729         * pthread.c (__pthread_initialize_manager): Lock
2730         __pthread_manager_thread.p_lock before calling clone.
2731
2732 2000-05-05  H.J. Lu  <hjl@gnu.org>
2733
2734         * sysdeps/ia64/pt-machine.h (__compare_and_swap): Change it to
2735         have acquire semantics.
2736         (__compare_and_swap_with_release_semantics): New inline
2737         function.
2738         (HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS): New macro.
2739
2740 2000-01-28  Hans Boehm  <hboehm@exch.hpl.hp.com>
2741
2742         * manager.c: Fix the problem with signals at startup.
2743         Change the way that thread stacks are allocated on IA64.
2744         Clean up some of the guard page allocation stuff.
2745
2746 1999-12-19  H.J. Lu  <hjl@gnu.org>
2747
2748         * internals.h (page_roundup): New.
2749         * attr.c (__pthread_attr_setguardsize); Use page_roundup
2750         instead of roundup.
2751         * manager.c (pthread_allocate_stack): Make sure guardaddr is
2752         page aligned with page_roundup if NEED_SEPARATE_REGISTER_STACK
2753         is define.
2754
2755 1999-12-17  Hans Boehm  <hboehm@exch.hpl.hp.com>
2756
2757         * manager.c (pthread_allocate_stack): Unmap the stack top
2758         if failed to map the stack bottom.
2759         Fix the guard page.
2760         (pthread_free): Fix the guard page.
2761
2762         * pthread.c (pthread_initialize): Set rlimit correctly for
2763         NEED_SEPARATE_REGISTER_STACK.
2764
2765 1999-12-16  H.J. Lu  <hjl@gnu.org>
2766
2767         * pthread.c (__pthread_initialize_manager): Pass
2768         __pthread_manager_thread_bos instead of
2769         __pthread_manager_thread_tos to __clone2.
2770
2771 1999-12-16  H.J. Lu  <hjl@gnu.org>
2772
2773         * manager.c (pthread_allocate_stack): Correct the calculation
2774         of "new_thread_bottom". Remove MAP_GROWSDOWN from mmap for
2775         stack bottom.
2776
2777 1999-12-13  H.J. Lu  <hjl@gnu.org>
2778
2779         * sysdeps/ia64/pt-machine.h (__compare_and_swap): Added a stop
2780         bit after setting ar.ccv.
2781
2782 1999-12-12  H.J. Lu  <hjl@gnu.org>
2783
2784         * manager.c (pthread_allocate_stack): Make the starting
2785         address of the stack bottom page aligned. FIXME: it may
2786         need changes in other places.
2787         (pthread_handle_create): Likewise.
2788
2789 1999-12-11  Hans Boehm  <hboehm@exch.hpl.hp.com>
2790
2791         * manager.c (pthread_allocate_stack): Handle
2792         NEED_SEPARATE_REGISTER_STACK.
2793         (pthread_handle_create): Likewise.
2794         * pthread.c (__pthread_initialize_manager): Likewise.
2795
2796         * sysdeps/ia64/pt-machine.h: Use r13 for thread pointer.
2797
2798 1999-12-02  H.J. Lu  <hjl@gnu.org>
2799
2800         * sysdeps/ia64/pt-machine.h: New.
2801
2802 2000-07-13  Ulrich Drepper  <drepper@redhat.com>
2803
2804         * wrapsyscall.c: Mark non-__ protected names as weak.
2805         PR libc/1466.
2806
2807 2000-07-12  Bruno Haible  <haible@clisp.cons.org>
2808
2809         * Examples/ex8.c: Include <sys/wait.h>, not <wait.h>.
2810
2811 2000-07-12  Ulrich Drepper  <drepper@redhat.com>
2812
2813         * spinlock.c: Fix code for TEST_FOR_COMPARE_AND_SWAP being defined.
2814         Add tests also to new alternative spinlock implementation.
2815         * spinlock.h: Likewise.
2816         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2817
2818 2000-07-06  Ulrich Drepper  <drepper@redhat.com>
2819
2820         * Version: Export __sigaction.
2821         * signals.c: Define __sigaction alias.  Use __libc_sigaction instead
2822         of __sigaction.
2823         * pthread.c: Use __libc_sigaction instead of __sigaction.
2824
2825         * condvar.c: Implement pthread_condattr_getpshared and
2826         pthread_condattr_setpshared.
2827         * mutex.c: Implement pthread_mutexattr_getpshared and
2828          pthread_mutexattr_setpshared.
2829         * Versions: Export new functions.
2830         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
2831
2832         * rwlock.c (pthread_rwlockattr_init): Use PTHREAD_PROCESS_PRIVATE.
2833         (pthread_rwlockattr_setpshared): Fail if PTHREAD_PROCESS_PRIVATE
2834         is not selected.
2835
2836 2000-07-04  Greg McGary  <greg@mcgary.org>
2837
2838         * sysdeps/pthread/bits/libc-lock.h: Remove BP_SYM from
2839         pragmas.  Include bp-sym.h only if _LIBC.
2840
2841 2000-07-04  Ulrich Drepper  <drepper@redhat.com>
2842
2843         * spinlock.c (__pthread_unlock): Properly place write barrier.
2844         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2845
2846 2000-07-03  Ulrich Drepper  <drepper@redhat.com>
2847
2848         * spinlock.c: Replace fast spinlocks by adaptive spinlocks which are
2849         faster on SMP systems.  No more emulation of compare&swap for adaptive
2850         spinlocks.
2851         * spinlock.h: Likewise.
2852         * sysdeps/pthread/pthread.h: Shuffle PTHREAD_MUTEX_* values around.
2853         Replace fast with adaptive mutex.
2854         * mutex.c: Rewrite for replacement of fast by adaptive mutex.
2855         * condvar.c: Likewise.
2856         * pthread.c: Define and initialize __pthread_smp_kernel variable.
2857         * internals.h: Declare __pthread_smp_kernel.
2858         * sysdeps/pthread/bits/pthreadtypes.h: Update comment of
2859         _pthread_fastlock structure.
2860         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2861
2862         * pthread.c: Remove initialization to zero from global variables.
2863
2864 2000-06-29  Jakub Jelinek  <jakub@redhat.com>
2865
2866         * shlib-versions: Make sparc64 GLIBC_2.2+ only.
2867
2868 2000-06-28  Greg McGary  <greg@mcgary.org>
2869
2870         * weaks.c: Wrap BP_SYM () around weak extern declarations of
2871         pthread functions that have pointers in their return+arg signatures.
2872
2873 2000-06-27  Greg McGary  <greg@mcgary.org>
2874
2875         * sysdeps/pthread/bits/libc-lock.h: Wrap BP_SYM () around weak
2876         extern declarations of pthread functions that have pointers in
2877         their return+arg signatures.
2878
2879 2000-06-26  Ulrich Drepper  <drepper@redhat.com>
2880
2881         * Makefile (tests): Add ex11.  Add rules to build it.
2882         * Examples/ex11.c: New file.
2883         * rwlock.c: Fix complete braindamaged previous try to implement
2884         timedout functions.
2885
2886         * spinlock.c: Pretty print.
2887
2888 2000-06-25  Ulrich Drepper  <drepper@redhat.com>
2889
2890         * Makefile (tests): Add ex10.  Add rules to build it.
2891         * Versions [GLIBC_2.2] (libpthread): Add pthread_mutex_timedlock,
2892         pthread_rwlock_timedrdlock, and pthread_rwlock_timedwrlock.
2893         * condvar.c (pthread_cond_wait): Allow mutex of kind
2894         PTHREAD_MUTEX_TIMED_NP.
2895         (pthread_cond_timedwait_relative): Likewise.
2896         * mutex.c (__pthread_mutex_init): Default is PTHREAD_MUTEX_TIMED_NP.
2897         (__pthread_mutex_trylock): Use __pthread_alt_trylock for
2898         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
2899         (__pthread_mutex_lock): Use __pthread_alt_lock for
2900         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
2901         (__pthread_mutex_timedlock): New function.
2902         (__pthread_mutex_unlock): Use __pthread_alt_unlock for
2903         PTHREAD_MUTEX_ERRORCHECK_NP.  Handle PTHREAD_MUTEX_TIMED_NP.
2904         (__pthread_mutexattr_init): Use PTHREAD_MUTEX_TIMED_NP.
2905         (__pthread_mutexattr_settype): Allow PTHREAD_MUTEX_TIMED_NP.
2906         * spinlock.c: Implement alternate fastlocks.
2907         * spinlock.h: Add prototypes.
2908         * Examples/ex10.c: New file.
2909         * sysdeps/pthread/pthread.h: Add prototypes for new functions.
2910         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2911
2912         * rwlock.c (__pthread_rwlock_rdlock): Optimize loop a bit.
2913         (__pthread_rwlock_timedrdlock): New function.
2914         (__pthread_rwlock_timedwrlock): New function.
2915         Use laternate fastlock function everywhere.
2916
2917 2000-06-21  Andreas Jaeger  <aj@suse.de>
2918
2919         * sysdeps/pthread/timer_routines.c: Include <string.h> for memset
2920         prototype.
2921
2922         * join.c: Include <stdlib.h> for exit prototype.
2923
2924 2000-06-20  Ulrich Drepper  <drepper@redhat.com>
2925
2926         * sysdeps/i386/useldt.h: Include <stdlib.h>.
2927
2928         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_BARRIERS.
2929         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2930
2931         * Makefile (libpthread-routines): Add barrier.
2932         (tests): Add ex9.  Add rule to build ex9.
2933         * Versions: Export barrier functions.
2934         * barrier.c: New file.
2935         * Examples/ex9.c: New file.
2936         * sysdeps/pthread/pthread.h: Add barrier data types and declarations.
2937         * sysdeps/pthread/bits/pthreadtypes.h: Likewise.
2938         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
2939
2940 2000-06-19  H.J. Lu  <hjl@gnu.org>
2941
2942         * spinlock.h (HAS_COMPARE_AND_SWAP): Defined if
2943         HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS is defined.
2944         (compare_and_swap_with_release_semantics): New. Default to
2945         compare_and_swap if HAS_COMPARE_AND_SWAP_WITH_RELEASE_SEMANTICS
2946         is not defined.
2947
2948         * spinlock.c (__pthread_unlock): Call
2949         compare_and_swap_with_release_semantics () instead of
2950         compare_and_swap ().
2951
2952 2000-06-19  Ulrich Drepper  <drepper@redhat.com>
2953
2954         * sysdeps/pthread/timer_create.c: Use _set_errno instead of assigning
2955         to errno directly.
2956         * sysdeps/pthread/timer_delete.c: Likewise.
2957         * sysdeps/pthread/timer_getoverr.c: Likewise.
2958         * sysdeps/pthread/timer_gettime.c: Likewise.
2959         * sysdeps/pthread/timer_settime.c: Likewise.
2960
2961 2000-06-13  Kaz Kylheku  <kaz@ashi.footprints.net>
2962
2963         Timer nodes are now reference counted, and can be marked
2964         as deleted. This allows for the safe release of the global mutex
2965         in the middle without losing the timer being operated on.
2966
2967         * sysdeps/pthread/posix-timer.h (struct timer_node):  The inuse
2968         member is now an enum with three values, so that an intermediate
2969         state can be represented (deleted but not free for reuse yet).
2970         New refcount member added.
2971         * sysdeps/pthread/timer_routines.c: Likewise.
2972
2973         * sysdeps/pthread/posix-timer.h (timer_addref, timer_delref,
2974         timer_valid): New inline functions added.
2975
2976         * sysdeps/pthread/timer_gettime.c (timer_gettime): Function
2977         restructured, recursive deadlock bug fixed.
2978
2979         * sysdeps/pthread/timer_gettime.c (timer_gettime): Uses new
2980         timer_addref to ensure that timer won't be deleted while mutex is not
2981         held. Also uses timer_invalid to perform validation of timer handle.
2982         * sysdeps/pthread/timer_settime.c (timer_settime): Likewise.
2983         * sysdeps/pthread/timer_getoverr.c (timer_getoverrun): Likewise.
2984
2985 2000-06-14  Ulrich Drepper  <drepper@redhat.com>
2986
2987         * shlib-versions: Add entry for SH.
2988         Patch by Kaz Kojima <kkojima@rr.iij4u.or.jp>.
2989
2990 2000-06-13  Kaz Kylheku  <kaz@ashi.footprints.net>
2991
2992         A few optimizations.  Got rid of unnecessary wakeups of timer threads,
2993         tightened up some critical regions and micro-optimized some list
2994         manipulation code.
2995
2996         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
2997         Returns int value now to indicate whether timer was queued at head.
2998         * sysdeps/pthread/posix-timer.h: Likewise.
2999         * sysdeps/pthread/timer_settime.c (timer_settime): Takes advantage of
3000         new return value from __timer_thread_queue_timer to avoid waking
3001         up timer thread unnecessarily.
3002
3003         * sysdeps/pthread/posix-timer.h (timer_id2ptr): No longer checks
3004         inuse flag, because this requires mutex to be held.  Callers updated
3005         to do the check when they have the mutex.
3006         * sysdeps/pthread/timer_getoverr.c: Add check for inuse here.
3007
3008         * sysdeps/pthread/timer_settime.c (timer_settime): Tighter critical
3009         regions: avoids making system calls while holding timer mutex, and
3010         a few computations were moved outside of the mutex as well.
3011         * sysdeps/pthread/timer_gettime.c (timer_gettime): Likewise.
3012
3013         * sysdeps/pthread/posix-timer.h (list_unlink_ip): Function name changed
3014         to list_unlink_ip, meaning idempotent.  Pointer manipulation
3015         changed to get better better code out of gcc.
3016         * sysdeps/pthread/timer_routines.c (list_unlink): Non-idempotent
3017         version of list_unlink added here.
3018         * sysdeps/pthread/timer_delete.c: Use appropriate list unlink
3019         function in all places: idempotent one for timers, non-idempotent
3020         one for thread nodes.
3021         * sysdeps/pthread/timer_settime: Likewise.
3022         * sysdeps/pthread/timer_routines.c: Likewise.
3023
3024 2000-06-13  Ulrich Drepper  <drepper@redhat.com>
3025
3026         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_TIMERS): Define.
3027         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3028
3029         * sysdeps/pthread/Makefile: Remove tests definition.
3030
3031 2000-06-12  Kazumoto Kojima  <kkojima@rr.iij4u.or.jp>
3032             Yutaka Niibe  <gniibe@chroot.org>
3033
3034         * sysdeps/sh/pspinlock.c: New file.
3035         * sysdeps/sh/pt-machine.h: New file.
3036
3037 2000-06-12  Ulrich Drepper  <drepper@redhat.com>
3038
3039         * Makefile (tests): Add joinrace.
3040
3041         * Examples/ex6.c: Test return value of pthread_join.
3042
3043 2000-06-11  Geoff Keating  <geoffk@cygnus.com>
3044
3045         * sysdeps/powerpc/pspinlock.c (__pthread_spin_lock): Implement.
3046         (__pthread_spin_trylock): Implement.
3047         (__pthread_spin_unlock): Implement.
3048         (__pthread_spin_init): Implement.
3049         (__pthread_spin_destroy): Implement.
3050
3051 2000-06-10  Ulrich Drepper  <drepper@redhat.com>
3052
3053         * sysdeps/pthread/timer_routines.c (list_append): Little fix to
3054         really append the entry.
3055
3056 2000-06-10  Andreas Jaeger  <aj@suse.de>
3057
3058         * lockfile.c (__fresetlockfiles): Remove unused variable fp.
3059
3060 2000-06-10  Kaz Kylheku  <kaz@ashi.footprints.net>
3061
3062         * sysdeps/pthread/timer_create.c: Thread matching now done on
3063         clock type as well as thread attributes.
3064         There are individual global signal-delivering threads for
3065         different clock types.
3066         * sysdeps/pthread/posix-timer.h: Likewise.
3067         * sysdeps/pthread/timer_routines.c: Likewise.
3068
3069         * sysdeps/pthread/timer_routines.c: Thread allocation and
3070         deallocation function now remembers to put thread on active
3071         list and remove from active list.
3072         Thus now the feature of binding multiple timers
3073         to a single thread actually works.
3074
3075 2000-06-10  Ulrich Drepper  <drepper@redhat.com>
3076
3077         * pthread.c (__pthread_create_2_1): Optimize a bit.
3078
3079         * internals.h (invalid_handle): Also test for p_terminated != 0.
3080         (nonexisting_handle): New function.  Same as old invalid_handle.
3081         * join.c (pthread_join): Use nonexisting_handle instead of
3082         invalid_handle to test for acceptable thread handle.
3083         * manager.c (pthread_handle_free): Likewise.
3084         * joinrace.c: New file.
3085         Reported by Permaine Cheung <pcheung@cygnus.com>.
3086
3087 2000-06-08  Ulrich Drepper  <drepper@redhat.com>
3088
3089         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
3090         Correct handling of matching variable.
3091
3092         * sysdeps/pthread/tst-timer.c (main): Rewrite initializers to
3093         avoid warnings.
3094
3095         * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
3096         Be prepared for empty timer list.
3097
3098         * sysdeps/pthread/timer_create.c (timer_create): Correct names of
3099         CPUTIME clock ID.  Add support for thread clocks.
3100
3101         * sysdeps/pthread/posix-timer.h (timer_ptr2id): Operands in
3102         subtraction were switched.
3103
3104         * sysdeps/pthread/timer_routines.c (init_module): Use
3105         THREAD_MAXNODES threads.
3106
3107         * sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
3108         * sysdeps/pthread/timer_create.c: Fill in creator_pid.
3109         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
3110         with sigqueueinfo is this system call is available.
3111
3112         * sysdeps/pthread/timer_create.c (timer_create): Allow
3113         CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
3114
3115         * sysdeps/pthread/Makefile: New file.  Add rules to build timer
3116         functionality.
3117         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add TIMER_MAX.
3118
3119 2000-06-04  Kaz Kylheku  <kaz@ashi.footprints.net>
3120
3121         * sysdeps/pthread/posix-timer.h: New file.
3122         * sysdeps/pthread/timer_create.c: New file.
3123         * sysdeps/pthread/timer_delete.c: New file.
3124         * sysdeps/pthread/timer_getoverr.c: New file.
3125         * sysdeps/pthread/timer_gettime.c: New file.
3126         * sysdeps/pthread/timer_routines.c: New file.
3127         * sysdeps/pthread/timer_settime.c: New file.
3128         * sysdeps/pthread/tst-timer.c: New file.
3129
3130 2000-06-08  Ulrich Drepper  <drepper@redhat.com>
3131
3132         * sysdeps/unix/sysv/linux/bits/local_lim.h: Remove OPEN_MAX and
3133         LINK_MAX definitions if necessary.
3134
3135 2000-06-04  Kaz Kylheku  <kaz@ashi.footprints.net>
3136
3137         Added missing fork time handling of global libio lock.
3138
3139         * lockfile.c (__fresetlockfiles): Now also resets the list lock,
3140         not just the individual stream locks. Rewritten to use new
3141         iterator interface provided by libio rather than accessing
3142         global variable.
3143
3144         * lockfile.c (__flockfilelist, _funlockfilelist): New functions
3145         which lock and unlock the stream list using the new interface
3146         provied by libio.
3147         * internals.h: Likewise.
3148
3149         * ptfork.c (__fork): Now calls __flockfilelist before fork,
3150         and __funlockfilelist in the parent after the fork.
3151         Child still calls __fresetlockfiles as before.
3152
3153         * linuxthreads.texi: Now explains what happens to streams at
3154         fork time. Also whole new section on forking and thread added.
3155         Definition of pthread_atfork moved out of Miscellaneous Functions
3156         to this new section.
3157
3158 2000-06-04  Jakub Jelinek  <jakub@redhat.com>
3159
3160         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c (__pthread_spin_lock):
3161         Add missing register.
3162         * sysdeps/sparc/sparc64/pspinlock.c (__pthread_spin_lock): Likewise.
3163
3164 2000-06-02  Jakub Jelinek  <jakub@redhat.com>
3165
3166         * sysdeps/sparc/sparc32/pspinlock.c: Implement spinlocks.
3167         * sysdeps/sparc/sparc32/sparcv9/pspinlock.c: New.
3168         * sysdeps/sparc/sparc64/pspinlock.c: Implement spinlocks.
3169
3170 2000-05-31  Andreas Jaeger  <aj@suse.de>
3171
3172         * sysdeps/mips/pspinlock.c: Implement spinlocks.
3173
3174 2000-05-28  Ulrich Drepper  <drepper@redhat.com>
3175
3176         * spinlock.c (__pthread_lock): Remove ASSERT.
3177
3178         * Makefile (tests): Add ex8.
3179         * Examples/ex8.c: New file.
3180
3181 2000-05-12  Kaz Kylheku  <kaz@ashi.footprints.net>
3182
3183         Bugfix: The pthread_atfork mechanism now takes care of its
3184         own internal mutex at fork time.
3185
3186         * ptfork.c (__fork): Revised so that the mutex is held across
3187         the fork operation and while the handlers are called, and so that
3188         the child resets the mutex.
3189
3190         * linuxthreads.texi: Updated pthread_atfork documentation to make
3191         it clear that fork and pthread_atfork can't be reentered from
3192         atfork handlers, that pthread_atfork and fork are mutually atomic,
3193         and that the handlers are inherited by the child process.
3194
3195 2000-05-24  Ulrich Drepper  <drepper@redhat.com>
3196
3197         * Makefile (libpthread-routines): Add pspinlock.
3198         * cancel.c: Rename __pthread_spin_unlock back to __pthread_unlock.
3199         Use struct _pthread_fastlock instead of pthread_spinlock_t.
3200         * condvar.c: Likewise.
3201         * internals.h: Likewise.
3202         * join.c: Likewise.
3203         * manager.c: Likewise.
3204         * mutex.c: Likewise.
3205         * pthread.c: Likewise.
3206         * rwlock.c: Likewise.
3207         * semaphore.c: Likewise.
3208         * signals.c: Likewise.
3209         * spinlock.h: Likewise.
3210         * spinlock.c: Likewise.  Remove pthread_spin_lock functions.
3211         * sysdeps/alpha/pspinlock.c: New file.
3212         * sysdeps/arm/pspinlock.c: New file.
3213         * sysdeps/i386/pspinlock.c: New file.
3214         * sysdeps/m68k/pspinlock.c: New file.
3215         * sysdeps/mips/pspinlock.c: New file.
3216         * sysdeps/powerpc/pspinlock.c: New file.
3217         * sysdeps/sparc/sparc32/pspinlock.c: New file.
3218         * sysdeps/sparc/sparc64/pspinlock.c: New file.
3219         * sysdeps/pthread/bits/pthreadtypes.h: Remove pthread_spinlock_t
3220         back to _pthread_fastlock.  Define new pthread_spinlock_t.
3221
3222 2000-05-24  Andreas Jaeger  <aj@suse.de>
3223
3224         * sysdeps/i386/i686/pt-machine.h: Only use LDT on newer kernels.
3225
3226 2000-05-21  Jakub Jelinek  <jakub@redhat.com>
3227
3228         * manager.c (pthread_handle_create): Initialize p_res._sock to -1.
3229
3230 2000-05-13  Jakub Jelinek  <jakub@redhat.com>
3231
3232         * internals.h (__RES_PTHREAD_INTERNAL): Define.
3233
3234 2000-05-06  Kaz Kylheku  <kaz@ashi.footprints.net>
3235
3236         * mutex.c (pthread_once): IN_PROGRESS state of pthread_once_t
3237         object state is represented with additional bits which distinguish
3238         whether that state was set up in the current process, or
3239         in an ancestor process. If that state was set in an ancestor,
3240         it means that a fork happened while thread was executing the init
3241         function. In that case, the state is reset to NEVER.
3242         * mutex.c (__pthread_once_fork_prepare): New function.
3243         (__pthread_once_fork_child): Likewise
3244         (__pthread_once_fork_parent): Likewise
3245         (__pthread_reset_pthread_once): Removed.
3246         * ptfork.c (__fork): Call new handlers in mutex.c.
3247         * internals.h: Declarations of new mutex.c functions added.
3248         Declaration of removed function deleted.
3249         * linuxthreads.texi: Updated documentation about pthread_once
3250         to clarify what happens under cancellation and forking.
3251
3252 2000-05-06  Kaz Kylheku  <kaz@ashi.footprints.net>
3253
3254         * internals.h: New thread manager request type, REQ_KICK.
3255         * join.c (pthread_exit): main thread now calls exit() instead
3256         of _exit() in order to proper process cleanup.
3257         * manager.c (__pthread_manager): Do not terminate manager
3258         after unblocking main thread; wait for main thread's
3259         REQ_PROCESS_EXIT request instead.
3260         Also, added REQ_KICK case to handle new request; this just does
3261         nothing.
3262         * manager.c (pthread_exited): Do not terminate manager after
3263         unblocking main thread.
3264         * manager.c (__pthread_manager_sighandler): If the main thread
3265         is waiting for all other threads to die, send a REQ_KICK into
3266         the thread manager request pipe to get it to clean out the threads
3267         and unblock the main thread as soon as possible. This fixes
3268         the 2000 millisecond hang on shutdown bug.
3269         * Examples/ex7.c: New file, tests shutdown behavior when all threads
3270         including the main one call pthread_exit(), or implicitly do so.
3271         * Makefile (tests): Add ex7.
3272
3273 2000-05-05  Andreas Jaeger  <aj@suse.de>
3274
3275         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
3276         (pthread_getcpuclockid): Correct test for ourselves.
3277
3278 2000-05-05  Ulrich Drepper  <drepper@redhat.com>
3279
3280         * internals.h (struct _pthread_descr_struct): Reorganization.
3281         Allocate room for 16 pointers at head of the structure for future
3282         thread-local data handling.  Move p_self member in this area.
3283         * manager.c (pthread_handle_create): Adjust use of p_self.
3284         * sysdeps/i386/useldt.h (THREAD_SELF): Likewise.
3285         * pthread.c (__pthread_initial_thread): Adjust initialization.
3286         (__pthread_manager_thread): Likewise.
3287
3288 2000-04-29  Bruno Haible  <haible@clisp.cons.org>
3289
3290         * join.c (pthread_exit): Use THREAD_GETMEM_NC instead of THREAD_GETMEM
3291         for eventmask larger than 1 word.
3292
3293 2000-04-27  Ulrich Drepper  <drepper@redhat.com>
3294
3295         * Versions [libpthread] (GLIBC_2.2): Add __pthread_initialize_minimal.
3296         * pthread.c (__pthread_initialize_minimal): New function.  Perform
3297         minimal initialization.
3298         (pthread_initialize): Remove this code here.
3299         * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h" again.  We
3300         are working around the problem in glibc.
3301
3302 2000-04-25  Ulrich Drepper  <drepper@redhat.com>
3303
3304         * sysdeps/i386/i686/pt-machine.h: Do not use "../useldt.h" for
3305         now.  First gcc must be fixed (more concrete: libgcc).
3306
3307 2000-04-24  Ulrich Drepper  <drepper@redhat.com>
3308
3309         * pthread.c: Remove special treatement for interrupt handlers on x86.
3310         * manager.c (pthread_free): Use FREE_THREAD not FREE_THREAD_SELF.
3311         * sysdeps/i386/useldt.h: Use "q" constraint instead of "r" where
3312         necessary.
3313         * sysdeps/i386/i686/pt-machine.h: Include "../useldt.h".
3314
3315 2000-04-24  Mark Kettenis  <kettenis@gnu.org>
3316
3317         * join.c (pthread_exit): Set p_terminated after reporting the
3318         termination event instead of before.
3319
3320 2000-04-20  Jakub Jelinek  <jakub@redhat.com>
3321
3322         * sysdeps/pthread/bits/libc-lock.h: Only declare __pthread_rwlock_*
3323         if __USE_UNIX98.
3324
3325 2000-04-18  Andreas Jaeger  <aj@suse.de>
3326
3327         * Versions: Use ld instead of ld.so.
3328
3329 2000-04-18  Jakub Jelinek  <jakub@redhat.com>
3330
3331         * sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h (struct sigcontext):
3332         Remove the typedef keyword.
3333
3334 2000-04-18  Jakub Jelinek  <jakub@redhat.com>
3335
3336         * sysdeps/sparc/sparc64/pt-machine.h (MEMORY_BARRIER): Use membar,
3337         not stbar.
3338         (READ_MEMORY_BARRIER): Define.
3339         * spinlock.c (__pthread_spin_unlock): Use READ_MEMORY_BARRIER, not
3340         MEMORY_BARRIER.
3341         * internals.h (READ_MEMORY_BARRIER): Define if not defined in sysdep
3342         headers.
3343
3344 2000-04-17  Ulrich Drepper  <drepper@redhat.com>
3345
3346         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
3347         (pthread_getcpuclockid): Don't compare thread_id with thread_self,
3348         use thread_handle().
3349
3350 2000-04-16  Ulrich Drepper  <drepper@redhat.com>
3351
3352         * condvar.c (pthread_cond_timedwait_relative): Don't test for owner
3353         if fast mutex is used.  Don't initialize `already_canceled' twice.
3354         Correctly test for return value of timedsuspend.
3355
3356         * pthread.c: Correct long-time braino.  We never set SA_SIGINFO and
3357         therefore don't need the _rt versions of the signal handlers.
3358
3359 2000-04-15  Ulrich Drepper  <drepper@redhat.com>
3360
3361         * pthread.c (pthread_yield): New function.
3362         * sysdeps/pthread/pthread.h (pthread_yield): Add prototype.
3363         * Versions [libpthread] (GLIBC_2.2): Add pthread_yield.
3364         * internals.h: Declare __pthread_yield.
3365
3366         * pthread.c (pthread_initialize): Avoid a bit more code if
3367         realtime signals are known to exist.
3368
3369         * pthread.c: Is __ASSUME_REALTIME_SIGNALS then avoid generating code
3370         to dynamically detect RT signals and avoid generating compatibility
3371         functions with old kernel.
3372         * restart.h (restart) [__ASSUME_REALTIME_SIGNALS]: Use
3373         __pthread_restart_new directly.
3374         (suspend) [__ASSUME_REALTIME_SIGNALS]: Use
3375         __pthread_wait_for_restart_signal directly.
3376         (timedsuspend) [__ASSUME_REALTIME_SIGNALS]: Use
3377         __pthread_timedsuspend_new directly.
3378
3379 2000-04-15  Ulrich Drepper  <drepper@redhat.com>
3380
3381         * condvar.c: Remove all the special code to handle cond_timedwait.
3382         Use timedsuspend instead.
3383         * internals.h: Declare __pthread_timedsuspend_old,
3384         __pthread_timedsuspend_new, and __pthread_timedsuspend.
3385         Remove declaration of __pthread_init_condvar.
3386         * pthread.c: Define __pthread_timedsuspend variable.
3387         (__pthread_timedsuspend_old): New function.  Timed suspension
3388         implementation for old Linux kernels.
3389         (__pthread_timedsuspend_new): New function.  Timed suspension
3390         implementation for new Linux kernels.
3391         * restart.h (timedsuspend): New function.  Call appropriate
3392         suspension function through __pthread_timedsuspend.
3393         * semaphore.c (sem_timedwait): Use timedsuspend, don't duplicate
3394         the code.
3395         Patch by Kaz Kylheku <kaz@ashi.footprints.net>.
3396
3397         * internals.h (WRITE_MEMORY_BARRIER): Define as MEMORY_BARRIER if
3398         undefined.
3399         * spinlock.c: Use WRITE_MEMORY_BARRIER instead of MEMORY_BARRIER
3400         where possible.
3401         * sysdeps/alpha/pt-machine.h: Define WRITE_MEMORY_BARRIER.
3402         * sysdeps/sparc/sparc64/pt-machine.h: Likewise.
3403
3404         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Add _POSIX_SPAWN.
3405         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3406
3407 2000-04-14  Andreas Jaeger  <aj@suse.de>
3408
3409         * weaks.c: Fix typo.
3410
3411         * shlib-versions (mips.*-.*-linux.*): Support only GLIBC 2.0 and
3412         2.2 for linuxthreads.
3413
3414 2000-04-13  Ulrich Drepper  <drepper@redhat.com>
3415
3416         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c
3417         (pthread_getcpuclockid): Fix typo.
3418
3419 2000-04-12  Ulrich Drepper  <drepper@redhat.com>
3420
3421         * Makefile (libpthread-routines): Add getcpuclockid.
3422         * Versions [libpthread] (GLIBC_2.2): Add pthread_getcpuclockid.
3423         * sysdeps/pthread/getcpuclockid.c: New file.
3424         * sysdeps/unix/sysv/linux/i386/getcpuclockid.c: New file.
3425         * sysdeps/pthread/pthread.h: Add prototype for pthread_getcpuclockid.
3426
3427         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_SPIN_LOCKS):