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