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