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