9f57cc4de1b9b21386ef28030a1ab3a2f3dbb9e6
[kopensolaris-gnu/glibc.git] / nptl / ChangeLog
1 2007-05-27  Ulrich Drepper  <drepper@redhat.com>
2
3         * init.c: Make it compile with older kernel headers.
4
5         * tst-initializers1.c: Show through exit code which test failed.
6
7         * pthread_rwlock_init.c: Also initialize __shared field.
8         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
9         element in rwlock structure into four byte elements.  One of them is
10         the new __shared element.
11         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
12         Likewise.
13         [__WORDSIZE=64]: Renamed __pad1 element int rwlock structire to
14         __shared, adjust names of other padding elements.
15         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
16         * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
17         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
18         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
19         FUTEX_PRIVATE_FLAG.
20         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
21         futex to use private operations if possible.
22         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
23         Likewise.
24         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
25         Likewise.
26         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
27         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
28
29 2007-05-26  Ulrich Drepper  <drepper@redhat.com>
30
31         * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
32         * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
33         * pthread_rwlock_timedrdlock.c: Likewise.
34         * pthread_rwlock_tryrdlock.c: Likewise.
35
36         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
37         optimization.
38
39         * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
40         * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
41         duplication of __sem_wait_cleanup.
42
43         * allocatestack.c: Revert last change.
44         * init.c: Likewise.
45         * sysdeps/i386/tls.h: Likewise.
46         * sysdeps/x86_64/tls.h: Likewise.
47         * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
48         header structure.
49         * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
50
51         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
52         Add private field.
53         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
54         * pthread_barrier_init.c: Set private flag if pshared and private
55         futexes are supported.
56         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
57         private field in futex command setup.
58         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
59
60 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
61
62         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
63         support.
64         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
65         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
66         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
67         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
68         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
69
70         * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
71         * sem_init.c (__new_sem_init): Rewrite to initialize all three
72         fields in the structure.
73         (__old_sem_init): New function.
74         * sem_open.c: Initialize all fields of the structure.
75         * sem_getvalue.c: Adjust for renamed element.
76         * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
77         (gen-as-const-headers): Add structsem.sym.
78         * sysdeps/unix/sysv/linux/structsem.sym: New file.
79         * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
80         struct new_sem.  Add struct old_sem.
81         * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
82         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
83         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
84         * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
85         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
86         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
87         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
88         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
89         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
90         * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
91         * tst-sem10.c: New file.
92         * tst-sem11.c: New file.
93         * tst-sem12.c: New file.
94         * tst-typesizes.c: Test struct new_sem and struct old_sem instead
95         of struct sem.
96
97 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
98             Jakub Jelinek  <jakub@redhat.com>
99
100         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
101         Move __pthread_enable_asynccancel right before futex syscall.
102         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
103         Likewise.
104
105 2007-05-24  Jakub Jelinek  <jakub@redhat.com>
106
107         * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
108         THREAD_COPY_PRIVATE_FUTEX): Define.
109         * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
110         THREAD_COPY_PRIVATE_FUTEX): Define.
111         * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
112         * init.c (__pthread_initialize_minimal_internal): Use
113         THREAD_SET_PRIVATE_FUTEX.
114
115         * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
116         (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
117         THREAD_GSCOPE_FLAG_WAIT): Define.
118         (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
119         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
120         * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
121         PTR_DEMANGLE.
122         (THREAD_GSCOPE_GET_FLAG): Define.
123         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
124         * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
125         instead of ->header.gscope_flag directly.
126
127 2007-05-23  Ulrich Drepper  <drepper@redhat.com>
128
129         * init.c (__pthread_initialize_minimal_internal): Check whether
130         private futexes are available.
131         * allocatestack.c (allocate_stack): Copy private_futex field from
132         current thread into the new stack.
133         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
134         futexes if they are available.
135         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
136         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
137         in libc-lowlevellock.S allow using private futexes.
138         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
139         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
140         FUTEX_PRIVATE_FLAG.
141         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
142         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
143         if they are available.
144         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
145         * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
146         * sysdeps/i386/tcb-offsets.sym: Likewise.
147         * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
148         * sysdeps/i386/tls.h (tcbhead_t): Likewise.
149
150 2007-05-21  Ulrich Drepper  <drepper@redhat.com>
151
152         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
153         Remove ptr_wait_lookup_done again.
154         * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
155         (__pthread_initialize_minimal_internal): Initialize
156         _dl_wait_lookup_done pointer in _rtld_global directly.
157         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
158         Remove code to code _dl_wait_lookup_done.
159         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
160         encrypted for now.
161
162 2007-05-21  Jakub Jelinek  <jakub@redhat.com>
163
164         * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
165         pthread_mutex_init failed with ENOTSUP.
166
167 2007-05-19  Ulrich Drepper  <drepper@redhat.com>
168
169         * allocatestack.c (__wait_lookup_done): New function.
170         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
171         Add ptr_wait_lookup_done.
172         * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
173         * pthreadP.h: Declare __wait_lookup_done.
174         * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
175         Define macros to implement reference handling of global scope.
176         * sysdeps/x86_64/tls.h: Likewise.
177         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
178         Initialize GL(dl_wait_lookup_done).
179
180 2007-05-17  Ulrich Drepper  <drepper@redhat.com>
181
182         [BZ #4512]
183         * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
184         is detected.
185         * pthread_mutex_timedlock.c: Likewise.
186         * pthread_mutex_trylock.c: Likewise.
187         Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
188
189         * Makefile (tests): Add tst-robust9 and tst-robustpi9.
190         * tst-robust9.c: New file.
191         * tst-robustpi9.c: New file.
192
193         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
194         unnecessary extra cancellation test.
195
196 2007-05-14  Ulrich Drepper  <drepper@redhat.com>
197
198         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
199         extra cancellation test.
200         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
201
202 2007-05-10  Ulrich Drepper  <drepper@redhat.com>
203
204         * descr.h (struct pthread): Rearrange members to fill hole in
205         64-bit layout.
206
207         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
208         (__pthread_setaffinity_new): If syscall was successful and
209         RESET_VGETCPU_CACHE is defined, use it before returning.
210         * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
211
212 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
213
214         [BZ #4455]
215         * tst-align2.c: Include stackinfo.h.
216         * tst-getpid1.c: Likewise.
217
218 2007-05-02  Carlos O'Donell  <carlos@systemhalted.org>
219
220         [BZ #4455]
221         * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
222         * tst-getpid1.c (do_test): Likewise.
223
224         [BZ #4456]
225         * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
226         (allocate_stack): Likewise.
227
228 2007-05-07  Ulrich Drepper  <drepper@redhat.com>
229
230         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
231         (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
232         (__lll_robust_timedlock_wait): Likewise.
233         Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
234
235 2007-05-06  Mike Frysinger  <vapier@gentoo.org>
236
237         [BZ #4465]
238         * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
239         * tst-cancel4.c (tf_fdatasync): New test.
240
241 2007-04-27  Ulrich Drepper  <drepper@redhat.com>
242
243         [BZ #4392]
244         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
245         check mutexes like normal mutexes.
246
247         [BZ #4306]
248         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
249         Initialize the whole sigevent structure to appease valgrind.
250
251 2007-04-25  Ulrich Drepper  <drepper@redhat.com>
252
253         * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
254         * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
255
256 2007-04-06  Ulrich Drepper  <drepper@redhat.com>
257
258         * tst-locale1.c: Avoid warnings.
259         * tst-locale2.c: Likewise.
260
261 2007-03-19  Steven Munroe  <sjmunroe@us.ibm.com>
262
263         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
264         (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
265
266 2007-03-16  Jakub Jelinek  <jakub@redhat.com>
267
268         * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
269         __extern_always_inline where appropriate.
270         * sysdeps/pthread/pthread.h: Likewise.
271
272 2007-03-13  Richard Henderson  <rth@redhat.com>
273
274         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
275         separate cfi regions for the two subsections.
276
277 2007-02-25  Ulrich Drepper  <drepper@redhat.com>
278
279         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
280         new thread, don't just decrement it.
281         Patch by Suzuki K P <suzuki@in.ibm.com>.
282
283 2007-02-21  Ulrich Drepper  <drepper@redhat.com>
284
285         * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
286         PTHFCT_CALL definition.
287
288 2007-02-18  Ulrich Drepper  <drepper@redhat.com>
289
290         * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
291         available, don't use it.
292
293 2007-02-09  Jakub Jelinek  <jakub@redhat.com>
294
295         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
296         (__lll_mutex_timedlock_wait): Use correct pointer when we don't
297         call into the kernel to delay.
298
299 2007-01-18  Ulrich Drepper  <drepper@redhat.com>
300
301         * tst-initializers1.c: We want to test the initializers as seen
302         outside of libc, so undefined _LIBC.
303
304         * pthread_join.c (cleanup): Avoid warning.
305
306 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
307
308         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
309         (__lll_timedwait_tid): Add unwind info.
310
311         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
312         function table, mangle the pointers.
313         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
314         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
315         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
316         demangle pointers before use.
317         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
318         demangle pointer.
319         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
320         * sysdeps/pthread/setxid.h: Likewise.
321
322 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
323
324         * tst-rwlock7.c: Show some more information in case of correct
325         behavior.
326
327 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
328
329         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
330         (lll_futex_timed_wait): Undo part of last change, don't negate
331         return value.
332
333 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
334
335         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
336         FUTEX_CMP_REQUEUE and lll_futex_requeue.
337
338 2006-12-28  David S. Miller  <davem@davemloft.net>
339
340         * shlib-versions: Fix sparc64 linux target specification.
341
342 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
343
344         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
345         Adjust include path for pthread_barrier_wait.c move.
346
347 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
348
349         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
350         tid isn't reread from pd->tid in between ESRCH test and the syscall.
351
352 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
353
354         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
355         6 argument cancellable syscalls.
356         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
357         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
358         6 argument cancellable syscalls.
359         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
360
361 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
362
363         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
364         (__rtld_mrlock_initialize): Add missing closing parenthesis.
365
366 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
367
368         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
369         __sync_lock_release instead of __sync_lock_release_si.
370
371 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
372
373         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
374         Define.
375         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
376         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
377         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
378         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
379         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
380         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
381         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
382         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
383         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
384         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
385         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
386
387 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
388
389         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
390         * pthread_barrier_wait.c: ...here.
391         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
392         * pthread_cond_broadcast.c: ...here.
393         * sysdeps/pthread/pthread_cond_signal.c: Move to...
394         * pthread_cond_signal.c: ...here.
395         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
396         * pthread_cond_timedwait.c: ...here.
397         * sysdeps/pthread/pthread_cond_wait.c: Move to...
398         * pthread_cond_wait.c: ...here.
399         * sysdeps/pthread/pthread_once.c: Move to...
400         * pthread_once.c: ...here.
401         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
402         * pthread_rwlock_rdlock.c: ...here.
403         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
404         * pthread_rwlock_timedrdlock.c: ...here.
405         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
406         * pthread_rwlock_timedwrlock.c: ...here.
407         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
408         * pthread_rwlock_unlock.c: ...here.
409         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
410         * pthread_rwlock_wrlock.c: ...here.
411         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
412         * pthread_spin_destroy.c: ...here.
413         * sysdeps/pthread/pthread_spin_init.c: Move to...
414         * pthread_spin_init.c: ...here.
415         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
416         * pthread_spin_unlock.c: ...here.
417         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
418         * pthread_getcpuclockid.c: ...here.
419
420         * init.c: USE_TLS support is now always enabled.
421         * tst-tls5.h: Likewise.
422         * sysdeps/alpha/tls.h: Likewise.
423         * sysdeps/i386/tls.h: Likewise.
424         * sysdeps/ia64/tls.h: Likewise.
425         * sysdeps/powerpc/tls.h: Likewise.
426         * sysdeps/s390/tls.h: Likewise.
427         * sysdeps/sh/tls.h: Likewise.
428         * sysdeps/sparc/tls.h: Likewise.
429         * sysdeps/x86_64/tls.h: Likewise.
430
431 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
432
433         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
434         __rtld_mrlock_change): Update oldval if atomic compare and exchange
435         failed.
436
437         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
438         Define to THREAD_SELF->header.multiple_threads.
439         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
440         Likewise.
441         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
442         Likewise.
443         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
444         (SINGLE_THREAD_P): Likewise.
445         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
446         (SINGLE_THREAD_P): Likewise.
447         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
448         (SINGLE_THREAD_P): Likewise.
449         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
450         (SINGLE_THREAD_P): Likewise.
451         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
452         Likewise.
453         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
454         (SINGLE_THREAD_P): Likewise.
455         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
456         (SINGLE_THREAD_P): Likewise.
457         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
458         Likewise.
459
460 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
461
462         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
463         by default rather than 2_3_3.
464
465 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
466
467         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
468         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
469         atomic_* instead of catomic_* macros.
470
471 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
472
473         [BZ #3285]
474         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
475         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
476         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
477         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
478         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
479         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
480         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
481         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
482         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
483         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
484         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
485         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
486         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
487
488 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
489
490         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
491         cancelable syscalls with six parameters.
492
493         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
494         operations instead of atomic_*.
495
496 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
497
498         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
499
500 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
501
502         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
503         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
504         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
505         New file.
506         * pthread_attr_setstack.c: Allow overwriting the version number of the
507         new symbol.
508         * pthread_attr_setstacksize.c: Likewise.
509         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
510         it.
511         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
512         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
513
514 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
515
516         [BZ #3251]
517         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
518         Patch by Petr Baudis.
519
520 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
521
522         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
523
524         * tst-cancel2.c (tf): Loop as long as something was written.
525
526 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
527
528         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
529         mutexes wake all mutexes.
530         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
531         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
532         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
533
534 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
535
536         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
537         to guarantee the thread is always canceled.
538
539 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
540
541         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
542         Include stdlib.h.
543         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
544         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
545         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
546         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
547         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
548
549 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
550
551         [BZ #3123]
552         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
553         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
554         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
555         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
556         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
557         * Makefile (tests): Add tst-cond22.
558         * tst-cond22.c: New file.
559
560 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
561
562         [BZ #3124]
563         * descr.h (struct pthread): Add parent_cancelhandling.
564         * sysdeps/pthread/createthread.c (create_thread): Pass parent
565         cancelhandling value to child.
566         * pthread_create.c (start_thread): If parent thread was canceled
567         reset the SIGCANCEL mask.
568         * Makefile (tests): Add tst-cancel25.
569         * tst-cancel25.c: New file.
570
571 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
572             Ulrich Drepper  <drepper@redhat.com>
573
574         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
575         counterp if it is already zero.
576         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
577
578 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
579             Roland McGrath  <roland@redhat.com>
580
581         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
582         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
583         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
584         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
585         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
586         lll_robust_mutex_timedlock, lll_mutex_unlock,
587         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
588         Add _L_*_ symbols around the subsection.
589         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
590         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
591
592 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
593             Roland McGrath  <roland@redhat.com>
594
595         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
596         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
597         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
598         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
599         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
600         lll_robust_mutex_timedlock, lll_mutex_unlock,
601         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
602         Add _L_*_ symbols around the subsection.
603         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
604         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
605
606 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
607
608         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
609         change because it can disturb too much existing code.  If real hard
610         reader preference is needed we'll introduce another type.
611         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
612         (pthread_rwlock_timedwrlock): Likewise.
613         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
614         Likewise.
615
616 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
617
618         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
619         reader preference.
620         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
621         (pthread_rwlock_timedwrlock): Likewise.
622         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
623         Likewise.
624
625 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
626
627         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
628         Only define ifdef SHARED.
629
630 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
631
632         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
633         (free_stacks): ...here.
634         (__free_stack_cache): New function.
635         * pthreadP.h: Declare __free_stack_cache.
636         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
637         ptr_freeres.
638         * init.c (pthread_functions): Initialize ptr_freeres.
639         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
640         New freeres function.
641
642 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
643
644         [BZ #3018]
645         * Makefile (extra-objs): Add modules to extra-test-objs instead.
646
647 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
648
649         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
650         _XOPEN_REALTIME_THREADS.
651
652 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
653
654         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
655         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
656         HAVE_CLOCK_GETTIME_VSYSCALL.
657         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
658
659 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
660
661         * sysdeps/unix/sysv/linux/bits/posix_opt.h
662         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
663         * descr.h (struct priority_protection_data): New type.
664         (struct pthread): Add tpp field.
665         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
666         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
667         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
668         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
669         TPP mutexes.
670         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
671         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
672         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
673         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
674         * tpp.c: New file.
675         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
676         boosted by TPP.
677         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
678         * pthread_mutexattr_getprioceiling.c
679         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
680         in the SCHED_FIFO priority range.
681         * pthread_mutexattr_setprioceiling.c
682         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
683         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
684         if mutex is not TPP.  Ceiling is now in __data.__lock.
685         * pthread_mutex_setprioceiling.c: Include stdbool.h.
686         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
687         is now in __data.__lock.  Add locking.
688         * pthread_create.c (__free_tcb): Free pd->tpp structure.
689         * Makefile (libpthread-routines): Add tpp.
690         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
691         * tst-tpp.h: New file.
692         * tst-mutexpp1.c: New file.
693         * tst-mutexpp6.c: New file.
694         * tst-mutexpp10.c: New file.
695         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
696         * tst-mutex6.c (TEST_FUNCTION): Likewise.
697
698 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
699
700         [BZ #2843]
701         * pthread_join.c (pthread_join): Account for self being canceled
702         when checking for deadlocks.
703         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
704         (tf1): Don't print anything after pthread_join returns, this would be
705         another cancellation point.
706         (tf2): Likewise.
707         * tst-join6.c: New file.
708         * Makefile (tests): Add tst-join6.
709
710 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
711
712         [BZ #2892]
713         * pthread_setspecific.c (__pthread_setspecific): Check
714         out-of-range index before checking for unused key.
715
716         * sysdeps/pthread/gai_misc.h: New file.
717
718 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
719
720         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
721         file.  Don't use sysctl.
722         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
723         overwrite the file if this is likely not true.
724
725 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
726
727         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
728         * Makefile (tests): Add tst-getpid3.
729         * tst-getpid3.c: New file.
730
731 2006-07-30  Roland McGrath  <roland@redhat.com>
732
733         * Makefile (libpthread-routines): Add ptw-sigsuspend.
734
735         * sysdeps/unix/sysv/linux/i386/not-cancel.h
736         (pause_not_cancel): New macro.
737         (nanosleep_not_cancel): New macro.
738         (sigsuspend_not_cancel): New macro.
739         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
740         nanosleep_not_cancel macro from <not-cancel.h>.
741         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
742         macro from <not-cancel.h>.
743
744 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
745             Jakub Jelinek  <jakub@redhat.com>
746
747         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
748         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
749         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
750         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
751         * pthread_mutex_init.c: Add support for priority inheritance mutex.
752         * pthread_mutex_lock.c: Likewise.
753         * pthread_mutex_timedlock.c: Likewise.
754         * pthread_mutex_trylock.c: Likewise.
755         * pthread_mutex_unlock.c: Likewise.
756         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
757         all mutexes.
758         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
759         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
760         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
761         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
762         pthread-pi-defines.sym.
763         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
764         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
765         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
766         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
767         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
768         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
769         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
770         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
771         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
772         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
773         _POSIX_THREAD_PRIO_INHERIT to 200112L.
774         * tst-mutex1.c: Adjust to allow use in PI mutex test.
775         * tst-mutex2.c: Likewise.
776         * tst-mutex3.c: Likewise.
777         * tst-mutex4.c: Likewise.
778         * tst-mutex5.c: Likewise.
779         * tst-mutex6.c: Likewise.
780         * tst-mutex7.c: Likewise.
781         * tst-mutex7a.c: Likewise.
782         * tst-mutex8.c: Likewise.
783         * tst-mutex9.c: Likewise.
784         * tst-robust1.c: Likewise.
785         * tst-robust7.c: Likewise.
786         * tst-robust8.c: Likewise.
787         * tst-mutexpi1.c: New file.
788         * tst-mutexpi2.c: New file.
789         * tst-mutexpi3.c: New file.
790         * tst-mutexpi4.c: New file.
791         * tst-mutexpi5.c: New file.
792         * tst-mutexpi6.c: New file.
793         * tst-mutexpi7.c: New file.
794         * tst-mutexpi7a.c: New file.
795         * tst-mutexpi8.c: New file.
796         * tst-mutexpi9.c: New file.
797         * tst-robust1.c: New file.
798         * tst-robust2.c: New file.
799         * tst-robust3.c: New file.
800         * tst-robust4.c: New file.
801         * tst-robust5.c: New file.
802         * tst-robust6.c: New file.
803         * tst-robust7.c: New file.
804         * tst-robust8.c: New file.
805         * Makefile (tests): Add the new tests.
806
807         * pthread_create.c (start_thread): Add some casts to avoid warnings.
808         * pthread_mutex_destroy.c: Remove unneeded label.
809
810 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
811
812         * pthread_mutex_init.c (__pthread_mutex_init): Move some
813         computations to compile time.
814
815 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
816
817         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
818
819 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
820
821         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
822
823 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
824
825         * pthread_key_create.c (__pthread_key_create): Do away with
826         __pthread_keys_lock.
827
828         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
829         (__kernel_cpumask_size): Mark as hidden.
830         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
831
832         * sem_open.c (__sem_mappings_lock): Mark as hidden.
833         * semaphoreP.h (__sem_mappings_lock): Likewise.
834
835 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
836
837         * pthread_atfork.c: Mark __dso_handle as hidden.
838
839 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
840
841         [BZ #2644]
842         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
843         the reload problem.  Change the one path in pthread_cancel_init
844         which causes the problem.  Force gcc to reload.  Simplify callers.
845         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
846         (_Unwind_GetBSP): Undo last patch.
847
848 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
849
850         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
851         function pointer is reloaded after pthread_cancel_init calls.
852
853         [BZ #2644]
854         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
855         pointers are reloaded after pthread_cancel_init calls.
856
857 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
858
859         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
860         __always_inline.
861
862 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
863
864         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
865         Allocate new object which is passed to timer_sigev_thread so that
866         the timer can be deleted before the new thread is scheduled.
867
868 2006-04-26  Roland McGrath  <roland@redhat.com>
869
870         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
871
872 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
873
874         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
875         suffix for conditional jumps.
876         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
877         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
878         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
879         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
880         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
881         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
882
883         * init.c (sigcancel_handler): Compare with correct PID even if the
884         thread is in the middle of a fork call.
885         (sighandler_setxid): Likewise.
886         Reported by Suzuki K P <suzuki@in.ibm.com> .
887
888 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
889
890         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
891
892 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
893
894         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
895         fails [Coverity CID 105].
896
897 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
898
899         * sysdeps/pthread/pthread.h: Add nonnull attributes.
900
901 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
902
903         [BZ #2505]
904         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
905         Define __lll_rel_instr using lwsync.
906
907 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
908
909         * allocatestack.c (allocate_stack): Always initialize robust_head.
910         * descr.h: Define struct robust_list_head.
911         (struct pthread): Use robust_list_head in robust mutex list definition.
912         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
913         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
914         (__pthread_initialize_minimal_internal): Register robust_list with
915         the kernel.
916         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
917         Declare __set_robust_list_avail.
918         * pthread_create.c (start_thread): Register robust_list of new thread.
919         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
920         waiters.
921         * pthread_mutex_destroy.c: For robust mutexes don't look at the
922         number of users, it's unreliable.
923         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
924         set_robust_list syscall is available.
925         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
926         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
927         Set robust_head.list_op_pending before trying to lock a robust mutex.
928         * pthread_mutex_timedlock.c: Likewise.
929         * pthread_mutex_trylock.c: Likewise.
930         * pthread_mutex_unlock.c: Likewise for unlocking.
931         * Makefile (tests): Add tst-robust8.
932         * tst-robust8.c: New file.
933
934 2006-03-08  Andreas Schwab  <schwab@suse.de>
935
936         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
937         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
938
939 2006-03-05  Roland McGrath  <roland@redhat.com>
940
941         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
942         and $config_os doesn't match *linux*.
943
944 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
945
946         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
947         Use __syscall_error.
948         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
949         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
950         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
951         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
952         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
953         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
954
955 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
956
957         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
958
959 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
960
961         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
962         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
963         mutex.
964         (__lll_robust_timedlock_wait): Likewise.
965         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
966         (__lll_robust_lock_wait): Likewise.
967         (__lll_robust_timedlock_wait): Likewise.
968         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
969         (__lll_robust_lock_wait): Likewise.
970         (__lll_robust_timedlock_wait): Likewise.
971
972 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
973
974         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
975         lll_robust_mutex_trylock, lll_robust_mutex_lock,
976         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
977         lll_robust_mutex_unlock): Define.
978         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
979
980 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
981
982         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
983         instead of <clone.S>.
984
985 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
986
987         * Makefile (libpthread-routines): Add
988         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
989         and pthread_mutex_[sg]etprioceiling.
990         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
991         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
992         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
993         pthread_mutex_setprioceiling.
994         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
995         PTHREAD_PRIO_PROTECT): New enum values.
996         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
997         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
998         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
999         prototypes.
1000         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
1001         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
1002         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
1003         Define.
1004         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
1005         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
1006         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
1007         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
1008         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
1009         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
1010         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
1011         protocol mutexes.
1012         * pthread_mutex_getprioceiling.c: New file.
1013         * pthread_mutex_setprioceiling.c: New file.
1014         * pthread_mutexattr_getprioceiling.c: New file.
1015         * pthread_mutexattr_setprioceiling.c: New file.
1016         * pthread_mutexattr_getprotocol.c: New file.
1017         * pthread_mutexattr_setprotocol.c: New file.
1018
1019 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
1020
1021         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
1022
1023 2006-02-27  Roland McGrath  <roland@redhat.com>
1024
1025         * sysdeps/pthread/Subdirs: List nptl here too.
1026         * configure (libc_add_on_canonical): New variable.
1027
1028         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
1029
1030         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
1031         self to get main source tree's file.
1032         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
1033         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
1034         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
1035         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
1036         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
1037         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
1038         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
1039         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
1040         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
1041         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
1042         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
1043         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
1044         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
1045
1046         * Makefile: Use $(sysdirs) in vpath directive.
1047
1048         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
1049         (CPPFLAGS-timer_routines.c): Likewise.
1050
1051         * Makeconfig (includes): Variable removed.
1052
1053 2006-02-26  Roland McGrath  <roland@redhat.com>
1054
1055         * sysdeps/generic/pt-raise.c: Moved to ...
1056         * pt-raise.c: ... here.
1057         * sysdeps/generic/lowlevellock.h: Moved to ...
1058         * lowlevellock.h: ... here.
1059
1060 2006-02-23  Roland McGrath  <roland@redhat.com>
1061
1062         * descr.h (struct pthread): Add final member `end_padding'.
1063         (PTHREAD_STRUCT_END_PADDING): Use it.
1064
1065 2006-02-20  Roland McGrath  <roland@redhat.com>
1066
1067         * sysdeps/mips: Directory removed, saved in ports repository.
1068         * sysdeps/unix/sysv/linux/mips: Likewise.
1069
1070 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
1071
1072         * tst-robust1.c: Add second mutex to check that the mutex list is
1073         handled correctly.
1074
1075 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
1076
1077         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
1078         lll_robust_mutex_trylock, lll_robust_mutex_lock,
1079         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
1080         lll_robust_mutex_unlock): New macros.
1081         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
1082         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1083         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1084         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1085         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
1086
1087 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1088
1089         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
1090         definitions.
1091         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
1092
1093 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
1094
1095         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1096         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
1097         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
1098         (lll_robust_mutex_unlock): Likewise.
1099
1100 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
1101
1102         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
1103         Set robust_list.__next rather than robust_list.
1104         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
1105         (__pthread_list_t): New typedef.
1106         (pthread_mutex_t): Replace __next and __prev fields with __list.
1107         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
1108         (__pthread_list_t): New typedef.
1109         (pthread_mutex_t): Replace __next and __prev fields with __list.
1110         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
1111         (__pthread_list_t, __pthread_slist_t): New typedefs.
1112         (pthread_mutex_t): Replace __next and __prev fields with __list.
1113         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
1114         (__pthread_list_t, __pthread_slist_t): New typedefs.
1115         (pthread_mutex_t): Replace __next and __prev fields with __list.
1116         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
1117         (__pthread_list_t, __pthread_slist_t): New typedefs.
1118         (pthread_mutex_t): Replace __next and __prev fields with __list.
1119         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
1120         (__pthread_slist_t): New typedef.
1121         (pthread_mutex_t): Replace __next field with __list.
1122
1123 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
1124
1125         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
1126         PTHREAD_MUTEX_OWNERDEAD.
1127         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
1128         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
1129         * Makefile (libpthread-routines): Add lowlevelrobustlock.
1130         * pthread_create.c (start_thread): Very much simplify robust_list loop.
1131         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
1132         to PTHREAD_MUTEX_INCONSISTENT.
1133         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
1134         * pthread_mutex_lock.c: Reimplement robust mutex handling.
1135         * pthread_mutex_trylock.c: Likewise.
1136         * pthread_mutex_timedlock.c: Likewise.
1137         * pthread_mutex_unlock.c: Likewise.
1138         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
1139         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
1140         lowlevelrobustlock.sym.
1141         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
1142         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
1143         definitions.
1144         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1145         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
1146         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
1147         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
1148         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
1149
1150 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
1151
1152         * allocatestack.c (allocate_stack): Initialize robust_list.
1153         * init.c (__pthread_initialize_minimal_internal): Likewise.
1154         * descr.h (struct xid_command): Pretty printing.
1155         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
1156         robust_list.  Adjust macros.
1157         * pthread_create.c (start_thread): Adjust robust_list handling.
1158         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
1159         but the owner for all robust mutex types.
1160         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
1161         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
1162         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1163         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
1164
1165         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
1166         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
1167
1168 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
1169
1170         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
1171         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
1172
1173 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1174
1175         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
1176         Return status.
1177         (lll_futex_timed_wait): Define.
1178
1179 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
1180
1181         * tst-cancel4.c: Test ppoll.
1182
1183 2006-01-18  Andreas Jaeger  <aj@suse.de>
1184
1185         [BZ #2167]
1186         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
1187         (pthread_mutex_t): Follow changes for other archs.  Based on patch
1188         by Jim Gifford <patches@jg555.com>.
1189
1190 2006-01-13  Richard Henderson  <rth@redhat.com>
1191
1192         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
1193
1194 2006-01-10  Roland McGrath  <roland@redhat.com>
1195
1196         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
1197         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
1198         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
1199         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
1200         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
1201         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
1202         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
1203         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
1204         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
1205         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
1206
1207 2006-01-09  Roland McGrath  <roland@redhat.com>
1208
1209         * tst-initializers1-c89.c: New file.
1210         * tst-initializers1-c99.c: New file.
1211         * tst-initializers1-gnu89.c: New file.
1212         * tst-initializers1-gnu99.c: New file.
1213         * Makefile (tests): Add them.
1214         (CFLAGS-tst-initializers1-c89.c): New variable.
1215         (CFLAGS-tst-initializers1-c99.c): New variable.
1216         (CFLAGS-tst-initializers1-gnu89.c): New variable.
1217         (CFLAGS-tst-initializers1-gnu99.c): New variable.
1218
1219         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
1220         Use __extension__ on anonymous union definition.
1221         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1222         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1223         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1224         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1225         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1226
1227 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
1228
1229         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
1230         Don't give the union a name because it changes the mangled name.
1231         Instead name the struct for __data.
1232         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
1233         Likewise.
1234         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
1235         Likewise.
1236
1237 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
1238
1239         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
1240         stack bias to mc_ftp field.
1241
1242 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
1243
1244         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
1245         being too clever and reloading the futex value where it shouldn't.
1246
1247 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
1248
1249         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
1250         correct type.
1251
1252 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
1253
1254         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
1255         Add cfi directives.
1256
1257 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
1258
1259         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
1260         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
1261         rename in tcbhead_t.
1262
1263         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
1264         Don't give the union a name because it changes the mangled name.
1265         Instead name the struct for __data.
1266         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1267         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1268         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1269         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1270         * pthread_create.c (start_thread): Adjust robust mutex free loop.
1271         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
1272
1273 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
1274
1275         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
1276         Return status.
1277         (lll_futex_timed_wait): Define.
1278         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1279         * sysdeps/pthread/aio_misc.h: New file.
1280
1281 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
1282
1283         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
1284
1285 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
1286
1287         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1288         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
1289         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
1290
1291 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
1292
1293         * tst-cancel24.cc: Use C headers instead of C++ headers.
1294
1295 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
1296
1297         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
1298         sparc-linux configured glibc.
1299         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
1300         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
1301         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
1302         atomic_compare_and_exchange_val_24_acq instead of
1303         atomic_compare_and_exchange_val_acq.
1304         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
1305         instead of atomic_exchange_rel.
1306         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
1307         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
1308         file.
1309         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
1310         file.
1311         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
1312         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
1313         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
1314         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
1315         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
1316         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
1317         New file.
1318         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1319         New file.
1320         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
1321         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
1322         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
1323         file.
1324         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
1325         file.
1326         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
1327
1328 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
1329
1330         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
1331         mutex initializers.
1332
1333 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
1334
1335         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
1336         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
1337         THREAD_COPY_POINTER_GUARD): Define.
1338         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
1339         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
1340
1341 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
1342
1343         * version.c: Update copyright year.
1344
1345 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1346
1347         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
1348         .eh_frame section, use cfi_* directives.
1349         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
1350
1351 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
1352
1353         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
1354         now.
1355
1356 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
1357
1358         * sysdeps/pthread/sigaction.c: Removed.
1359         * sigaction.c: New file.
1360         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
1361
1362 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
1363
1364         * Makefile (tests): Add tst-signal7.
1365         * tst-signal7.c: New file.
1366
1367 2005-12-27  Roland McGrath  <roland@redhat.com>
1368
1369         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
1370         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
1371         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
1372         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
1373         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
1374         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
1375         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
1376         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
1377         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
1378         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
1379         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
1380
1381 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
1382
1383         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
1384         and __prev field to pthread_mutex_t.
1385         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
1386         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1387         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1388         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1389         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
1390         to pthread_mutex_t.
1391
1392 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
1393
1394         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
1395         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
1396         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
1397         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
1398         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
1399         and PTHREAD_MUTEXATTR_FLAG_BITS.
1400         * descr.h (struct pthread): Add robust_list field and define
1401         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
1402         * pthread_mutexattr_getrobust.c: New file.
1403         * pthread_mutexattr_setrobust.c: New file.
1404         * pthread_mutex_consistent.c: New file.
1405         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
1406         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
1407         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
1408         Adjust pthread_mutex_t initializers.
1409         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
1410         field to pthread_mutex_t.
1411         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
1412         and __prev field to pthread_mutex_t.
1413         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
1414         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
1415         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
1416         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
1417         * pthread_mutexattr_gettype.c: Likewise.
1418         * pthread_mutexattr_setpshared.c: Likewise.
1419         * pthread_mutexattr_settype.c: Likewise.
1420         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
1421         Initialize mutex kind according to robust flag.
1422         * pthread_mutex_lock.c: Implement local robust mutex.
1423         * pthread_mutex_timedlock.c: Likewise.
1424         * pthread_mutex_trylock.c: Likewise.
1425         * pthread_mutex_unlock.c: Likewise.
1426         * pthread_create.c (start_thread): Mark robust mutexes which remained
1427         locked as dead.
1428         * tst-robust1.c: New file.
1429         * tst-robust2.c: New file.
1430         * tst-robust3.c: New file.
1431         * tst-robust4.c: New file.
1432         * tst-robust5.c: New file.
1433         * tst-robust6.c: New file.
1434         * tst-robust7.c: New file.
1435         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
1436         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
1437         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
1438         tst-robust5, tst-robust6, and tst-robust7.
1439
1440         * tst-typesizes.c: New file.
1441         * Makefile (tests): Add tst-typesizes.
1442
1443         * tst-once3.c: More debug output.
1444
1445 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
1446
1447         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
1448         missing after last change.
1449
1450         * version.c: Update copyright year.
1451
1452 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
1453
1454         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
1455         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
1456         * pthread_mutex_trylock.c: Likewise.
1457         * pthread_mutex_timedlock.c: Likewise.
1458         * pthread_mutex_unlock.c: Likewise.
1459
1460 2005-12-22  Roland McGrath  <roland@redhat.com>
1461
1462         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
1463         so that #include_next's search location is not reset to the -I..
1464         directory where <nptl/...> can be found.
1465
1466 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
1467
1468         [BZ #1913]
1469         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
1470         Fix unwind info.  Remove useless branch prediction prefix.
1471         * tst-cancel24.cc: New file.
1472         * Makefile: Add rules to build and run tst-cancel24.
1473
1474 2005-12-21  Roland McGrath  <roland@redhat.com>
1475
1476         * libc-cancellation.c: Use <> rather than "" #includes.
1477         * pt-cleanup.c: Likewise.
1478         * pthread_create.c: Likewise.
1479         * pthread_join.c: Likewise.
1480         * pthread_timedjoin.c: Likewise.
1481         * pthread_tryjoin.c: Likewise.
1482         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
1483         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
1484         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
1485         * unwind.c: Likewise.
1486
1487 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1488
1489         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
1490         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
1491         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
1492         THREAD_COPY_POINTER_GUARD): Define.
1493
1494 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
1495
1496         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
1497         rather than one.
1498         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
1499         THREAD_COPY_POINTER_GUARD): Define.
1500         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
1501         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
1502         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
1503         THREAD_COPY_POINTER_GUARD): Define.
1504         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
1505         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
1506         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
1507         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
1508         Use PTR_DEMANGLE for B0 if defined.
1509
1510 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
1511
1512         * pthread_create.c (__pthread_create_2_1): Use
1513         THREAD_COPY_POINTER_GUARD if available.
1514         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
1515         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
1516         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
1517         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
1518         * sysdeps/x86_64/tls.h: Likewise.
1519
1520 2005-12-15  Roland McGrath  <roland@redhat.com>
1521
1522         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
1523
1524 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
1525
1526         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
1527         sysdeps/generic.
1528         * errno-loc.c: New file.
1529
1530 2005-12-12  Roland McGrath  <roland@redhat.com>
1531
1532         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
1533         adjustments before choosing stack size.  Update minimum stack size
1534         calculation to match allocate_stack change.
1535
1536 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
1537
1538         * allocatestack.c (allocate_stack): Don't demand that there is an
1539         additional full page available on the stack beside guard, TLS, the
1540         minimum stack.
1541
1542 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
1543
1544         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
1545         (__cleanup_fct_attribute): Use __regparm__ not regparm.
1546
1547         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
1548         compiling 32-bit code we must define __cleanup_fct_attribute.
1549
1550 005-11-24  Jakub Jelinek  <jakub@redhat.com>
1551
1552         [BZ #1920]
1553         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
1554         __attribute__ instead of __attribute.
1555         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
1556         (__cleanup_fct_attribute): Likewise.
1557
1558 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
1559
1560         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
1561         a write barrier before writing libgcc_s_getcfa.
1562
1563 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
1564
1565         * sysdeps/unix/sysv/linux/configure: Removed.
1566
1567 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
1568
1569         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
1570         optional init_array/fini_array support.
1571
1572 2005-10-24  Roland McGrath  <roland@redhat.com>
1573
1574         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
1575         versioned_symbol use.
1576
1577 2005-10-16  Roland McGrath  <roland@redhat.com>
1578
1579         * init.c (__pthread_initialize_minimal_internal): Even when using a
1580         compile-time default stack size, apply the minimum that allocate_stack
1581         will require, and round up to page size.
1582
1583 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
1584
1585         * Makefile ($(test-modules)): Remove static pattern rule.
1586
1587 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
1588             Ulrich Drepper  <drepper@redhat.com>
1589
1590         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
1591         alignment in callback function.
1592         * Makefile: Add rules to build and run tst-align3.
1593         * tst-align3.c: New file.
1594
1595 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
1596
1597         * allocatestack.c (setxid_signal_thread): Add
1598         INTERNAL_SYSCALL_DECL (err).
1599
1600 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
1601
1602         * allocatestack.c (setxid_signal_thread): Need to use
1603         atomic_compare_and_exchange_bool_acq.
1604
1605 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
1606             Jakub Jelinek  <jakub@redhat.com>
1607
1608         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
1609         CANCEL_RESTMASK.
1610         (struct pthread): Move specific_used field to avoid padding.
1611         Add setxid_futex field.
1612         * init.c (sighandler_setxid): Reset setxid flag and release the
1613         setxid futex.
1614         * allocatestack.c (setxid_signal_thread): New function.  Broken
1615         out of the bodies of the two loops in __nptl_setxid.  For undetached
1616         threads check whether they are exiting and if yes, don't send a signal.
1617         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
1618         * pthread_create.c (start_thread): For undetached threads, check
1619         whether setxid bit is set.  If yes, wait until signal has been
1620         processed.
1621
1622         * allocatestack.c (STACK_VARIABLES): Initialize them.
1623         * pthread_create.c (__pthread_create_2_1): Initialize pd.
1624
1625 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
1626
1627         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
1628         waiters, awake all waiters on the associated mutex.
1629
1630 2005-09-22  Roland McGrath  <roland@redhat.com>
1631
1632         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
1633         ../sysdeps/x86_64/hp-timing.h).
1634
1635 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
1636
1637         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
1638         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1639         (lll_futex_wake_unlock): Define.
1640         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
1641         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1642         (lll_futex_wake_unlock): Define.
1643         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
1644         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1645         (lll_futex_wake_unlock): Define.
1646         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
1647         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1648         (lll_futex_wake_unlock): Define.
1649         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
1650         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1651         (lll_futex_wake_unlock): Define.
1652         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
1653         lll_futex_wake_unlock.
1654         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
1655         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1656         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
1657         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1658         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1659         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
1660
1661 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1662
1663         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
1664         Fix typo in register name.
1665
1666 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
1667
1668         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
1669         Use __sigfillset.  Document that sigfillset does the right thing wrt
1670         to SIGSETXID.
1671
1672 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
1673
1674         [BZ #1102]
1675         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
1676         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
1677         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
1678         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
1679         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
1680         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
1681         in the structure.
1682         * Makefile (tests): Add tst-initializers1.
1683         (CFLAGS-tst-initializers1.c): Set.
1684         * tst-initializers1.c: New test.
1685
1686 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
1687
1688         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
1689         Make sure __flags are located at offset 48 from the start of the
1690         structure.
1691
1692 2005-07-02  Roland McGrath  <roland@redhat.com>
1693
1694         * Makeconfig: Comment fix.
1695
1696 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
1697
1698         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
1699         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
1700         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
1701         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
1702         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
1703         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1704         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
1705         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
1706         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
1707         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
1708
1709 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
1710
1711         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
1712         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1713         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
1714         fields.
1715         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1716         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
1717         field.  Put in sysinfo field unconditionally.
1718         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1719         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
1720         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1721         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
1722         fields.
1723         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
1724         * pthread_create.c (__pthread_create_2_1): Use
1725         THREAD_COPY_STACK_GUARD macro.
1726         * Makefile: Add rules to build and run tst-stackguard1{,-static}
1727         tests.
1728         * tst-stackguard1.c: New file.
1729         * tst-stackguard1-static.c: New file.
1730
1731 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
1732
1733         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
1734         Invoke CGOTSETUP and CGOTRESTORE.
1735         (CGOTSETUP, CGOTRESTORE): Define.
1736
1737 2005-05-29  Richard Henderson  <rth@redhat.com>
1738
1739         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
1740         (tf_write, tf_writev): Use it.
1741         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
1742         the system minimum.
1743
1744 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
1745
1746         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1747         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
1748         __librt_*_asynccancel@local.
1749
1750 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
1751
1752         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
1753         all occurrences of JUMPTARGET.  Instead append @local to labels.
1754
1755 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
1756
1757         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
1758         size/alignment of struct pthread rather than tcbhead_t.
1759         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
1760         Likewise.
1761         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
1762         Likewise.
1763         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
1764         Likewise.
1765
1766 2005-05-19  Richard Henderson  <rth@redhat.com>
1767
1768         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
1769         __sync_val_compare_and_swap, not explicit _si variant.
1770         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
1771
1772 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
1773
1774         [BZ #915]
1775         * sysdeps/pthread/pthread.h: Avoid empty initializers.
1776
1777 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
1778
1779         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
1780         .eh_frame section, use cfi_* directives.
1781
1782 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
1783
1784         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
1785         of "" includes.
1786
1787 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
1788
1789         [BZ #1075]
1790         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
1791         aio_write blocks.
1792
1793 2005-04-27  Roland McGrath  <roland@redhat.com>
1794
1795         * Makefile (tests): Remove tst-clock2.
1796
1797         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
1798         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
1799         translating to the kernel clockid_t for our own process/thread clock.
1800
1801         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
1802
1803 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
1804
1805         * old_pthread_cond_init.c: Include <errno.h>.
1806         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
1807         process shared or uses clock other than CLOCK_REALTIME.
1808         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
1809
1810 2005-04-13  David S. Miller  <davem@davemloft.net>
1811
1812         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
1813         * sysdeps/sparc/sparc64/clone.S: New file.
1814
1815 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
1816
1817         [BZ #1102]
1818         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
1819         __inline instead of inline.
1820         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
1821
1822 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
1823
1824         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
1825         functionally equivalent, but shorter instructions.
1826         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
1827         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1828         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1829         Likewise.
1830         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1831         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1832         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1833         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1834         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1835         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
1836         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1837         Likewise.
1838         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1839         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1840         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1841         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1842         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1843
1844 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
1845
1846         * sysdeps/mips/Makefile: New file.
1847         * sysdeps/mips/nptl-sysdep.S: New file.
1848         * sysdeps/mips/tcb-offsets.sym: New file.
1849         * sysdeps/mips/pthread_spin_lock.S: New file.
1850         * sysdeps/mips/pthread_spin_trylock.S: New file.
1851         * sysdeps/mips/pthreaddef.h: New file.
1852         * sysdeps/mips/tls.h: New file.
1853         * sysdeps/mips/jmpbuf-unwind.h: New file.
1854         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
1855         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
1856         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
1857         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
1858         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
1859         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
1860         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
1861         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
1862         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
1863         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
1864
1865 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
1866
1867         [BZ #1112]
1868         * pthread_create.c (__pthread_create_2_1): Rename syscall error
1869         variable to scerr.
1870
1871 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
1872
1873         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
1874
1875 2005-02-25  Roland McGrath  <roland@redhat.com>
1876
1877         * alloca_cutoff.c: Correct license text.
1878         * tst-unload.c: Likewise.
1879         * sysdeps/pthread/allocalim.h: Likewise.
1880         * sysdeps/pthread/pt-initfini.c: Likewise.
1881         * sysdeps/pthread/bits/libc-lock.h: Likewise.
1882         * sysdeps/pthread/bits/sigthread.h: Likewise.
1883         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
1884         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
1885
1886 2005-02-16  Roland McGrath  <roland@redhat.com>
1887
1888         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1889         Use unsigned int * for ptr_nthreads.
1890
1891 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
1892
1893         [BZ #721]
1894         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
1895         gcc4.
1896
1897 2005-02-07  Richard Henderson  <rth@redhat.com>
1898
1899         [BZ #787]
1900         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
1901         argument.
1902
1903 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
1904
1905         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
1906         order of arguments in invocation of atomic_add_zero.
1907
1908 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
1909
1910         [BZ #737]
1911         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
1912         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
1913         at least gotntpoff relocation and addition.
1914         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1915         Likewise.
1916         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
1917         Likewise.
1918         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
1919         Likewise.
1920
1921 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
1922
1923         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
1924         entry for static tls deallocation fix.
1925         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
1926         also contains information whether the memory pointed to is static
1927         TLS or not.
1928         * sysdeps/i386/tls.h: Likewise.
1929         * sysdeps/ia64/tls.h: Likewise.
1930         * sysdeps/powerpc/tls.h: Likewise.
1931         * sysdeps/s390/tls.h: Likewise.
1932         * sysdeps/sh/tls.h: Likewise.
1933         * sysdeps/sparc/tls.h: Likewise.
1934         * sysdeps/x86_64/tls.h: Likewise.
1935
1936 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
1937
1938         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
1939
1940 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
1941
1942         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
1943         %esp.
1944         * Makefile (tests): Add tst-align2.
1945         * tst-align2.c: New test.
1946         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
1947         -mpreferred-stack-boundary=4.
1948
1949 2004-12-18  Roland McGrath  <roland@redhat.com>
1950
1951         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
1952         New file removed withdrawn for the moment.
1953
1954 2004-12-17  Richard Henderson  <rth@redhat.com>
1955
1956         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
1957         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
1958
1959 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
1960
1961         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
1962         Increased PTHREAD_STACK_MIN.
1963
1964         * tst-context1.c (stacks): Use bigger stack size.
1965
1966 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
1967
1968         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
1969         * sysdeps/sparc/tcb-offsets.sym: Add TID.
1970
1971 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
1972
1973         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
1974         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
1975         * sysdeps/s390/tcb-offsets.sym (TID): Add.
1976
1977 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
1978
1979         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
1980
1981 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
1982
1983         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
1984         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
1985
1986         * tst-getpid1.c: If child crashes, report this first.  Print which
1987         signal.
1988
1989 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
1990
1991         * init.c (__pthread_initialize_minimal_internal): Also unblock
1992         SIGSETXID.
1993
1994 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
1995
1996         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
1997         _POSIX_THREAD_CPUTIME): Define to 0.
1998         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
1999         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
2000         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
2001         __timer_signal_thread_tclk): Remove.
2002         (init_module): Remove their initialization.
2003         (thread_cleanup): Remove their cleanup assertions.
2004         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
2005         __timer_signal_thread_tclk): Remove.
2006         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
2007         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
2008         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
2009
2010 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
2011
2012         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
2013         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
2014
2015         * Makefile (tests): Add tst-getpid2.
2016         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
2017         (do_test): Use it.  Use __clone2 instead of clone on ia64.
2018         * tst-getpid2.c: New test.
2019
2020 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2021
2022         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
2023
2024 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
2025
2026         * Makefile (tests): Add tst-getpid1.
2027         * tst-getpid1.c: New file.
2028         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
2029         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
2030
2031 2004-12-02  Roland McGrath  <roland@redhat.com>
2032
2033         * Makefile (libpthread-nonshared): Variable removed.
2034         ($(objpfx)libpthread_nonshared.a): Target removed.
2035         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
2036         These are now handled by generic magic from
2037         libpthread-static-only-routines being set.
2038
2039 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
2040
2041         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
2042         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
2043         _POSIX_THREAD_PRIO_PROTECT): Define.
2044         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2045         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
2046         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
2047
2048 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
2049
2050         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
2051         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
2052         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
2053         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
2054         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
2055         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
2056         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
2057
2058 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
2059
2060         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
2061
2062         * Makefile (libpthread-routines): Add pthread_setschedprio.
2063         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
2064         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
2065         * pthread_setschedprio.c: New file.
2066
2067 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
2068
2069         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
2070         * pthread_cancel.c (pthread_create): Likewise.
2071
2072         * Makefile (libpthread-routines): Add vars.
2073         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
2074         * init.c (__default_stacksize, __is_smp): Remove.
2075         * vars.c: New file.
2076         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
2077         and define a wrapper macro.
2078         (PTHREAD_STATIC_FN_REQUIRE): Define.
2079         * allocatestack.c (__find_thread_by_id): Undefine.
2080         * pthread_create (__pthread_keys): Remove.
2081         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
2082         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
2083         PTHREAD_STATIC_FN_REQUIRE.
2084
2085 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2086
2087         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
2088         parameter to REGISTER macro.
2089
2090 2004-11-17  Roland McGrath  <roland@redhat.com>
2091
2092         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
2093         Make sure SIGCANCEL is blocked as well.
2094
2095 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
2096
2097         * sysdeps/pthread/setxid.h: New file.
2098         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
2099         (struct xid_command): Add forward decl.
2100         (struct pthread_functions): Change return type of __nptl_setxid hook
2101         to int.
2102         * pthreadP.h (__nptl_setxid): Change return type to int.
2103         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
2104         calling thread, return its return value and set errno on failure.
2105         * descr.h (struct xid_command): Change id type to long array.
2106
2107         * Makefile: Add rules to build and test tst-setuid1 and
2108         tst-setuid1-static.
2109         * tst-setuid1.c: New test.
2110         * tst-setuid1-static.c: New test.
2111
2112 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
2113
2114         * Makefile (tests): Add tst-exit3.
2115         * tst-exit3.c: New test.
2116
2117 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
2118
2119         * Makefile (tests): Add tst-exit2.
2120         * tst-exit2.c: New file.
2121
2122 2004-11-09  Roland McGrath  <roland@redhat.com>
2123
2124         [BZ #530]
2125         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
2126         here, before calling clone.
2127         * pthread_create.c (start_thread): Don't do it here.
2128
2129 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
2130
2131         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
2132
2133 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
2134
2135         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
2136         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
2137         assembler warning.
2138
2139 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
2140
2141         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
2142         if sched_priority is not between minprio and maxprio.
2143
2144 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2145
2146         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
2147         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
2148
2149         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
2150         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
2151
2152 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
2153
2154         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
2155         not-cancelable I/O functions.
2156
2157 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2158
2159         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
2160         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
2161         make sure 2 is stored in the futex and we looked at the old value.
2162         Fix a few other problems to return the correct value.
2163
2164 2004-10-14  Richard Henderson  <rth@redhat.com>
2165
2166         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
2167         make gcc4 happy.
2168
2169 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
2170
2171         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
2172         of pthread-functions.h and pthreaddef.h.
2173         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
2174
2175         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
2176         Change __data.__nwaiters from int to unsigned int.
2177
2178         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
2179         sysconf (_SC_THREAD_CPUTIME) returns negative value.
2180
2181         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
2182         before return type.
2183
2184         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
2185         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
2186
2187 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
2188
2189         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
2190         test fails, remove message queue.
2191         (tf_msgsnd): Likewise.
2192
2193 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
2194
2195         * tst-clock1.c: Change #ifdef to #if defined.
2196         * tst-clock2.c: Likewise.
2197         * tst-cond11.c: Likewise.
2198
2199         * sysdeps/pthread/timer_create.c (timer_create): Use
2200         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
2201         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
2202         THREAD_CPUTIME.
2203
2204 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
2205
2206         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
2207         _POSIX_THREAD_CPUTIME): Define to 0.
2208
2209 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
2210
2211         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
2212         and _POSIX_THREAD_CPUTIME to zero.
2213         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
2214         * tst-barrier2.c: Fix testing for POSIX feature.
2215         * tst-clock1.c: Likewise.
2216         * tst-clock2.c: Likewise.
2217         * tst-cond11.c: Likewise.
2218         * tst-cond4.c: Likewise.
2219         * tst-cond6.c: Likewise.
2220         * tst-flock2.c: Likewise.
2221         * tst-mutex4.c: Likewise.
2222         * tst-mutex9.c: Likewise.
2223         * tst-rwlock12.c: Likewise.
2224         * tst-rwlock4.c: Likewise.
2225         * tst-signal1.c: Likewise.
2226         * tst-spin2.c: Likewise.
2227         * sysdeps/pthread/posix-timer.h: Likewise.
2228         * sysdeps/pthread/timer_create.c: Likewise.
2229         * sysdeps/pthread/timer_routines.c: Likewise.
2230
2231 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
2232
2233         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2234         (__lll_mutex_timedlock_wait): Address futex correctly.
2235
2236         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2237         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
2238         make sure 2 is stored in the futex and we looked at the old value.
2239         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2240         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
2241         which might very well made the code not working at all before.
2242         [BZ #417]
2243
2244 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
2245
2246         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
2247         allow SIGSETXID to be sent.
2248         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
2249         for SIGSETXID to be defined.
2250         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
2251         SIGSETXID cannot be blocked.
2252
2253         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
2254         Add __extension__ to long long types.
2255         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2256         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2257         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2258         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2259         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
2260         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
2261         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2262
2263 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
2264
2265         * descr.h (struct pthread): Add stopped_start field.
2266         * sysdeps/pthread/createthread.c (create_thread): Set
2267         start_stopped flag in descriptor for new thread appropriately.
2268         * pthread_create.c (start_thread): Only take lock to be stopped on
2269         startup if stopped_start flag says so.
2270
2271 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
2272
2273         * pthread_create.c (__pthread_create_2_1): Remember whether thread
2274         is created detached and if yes, do not try to free the stack in case
2275         the thread creation failed.
2276         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
2277         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
2278         case there has been no error.  [BZ #405]
2279
2280         * pthread_create.c (start_thread): Don't wait for scheduler data
2281         etc to be set at the beginning of the function.  The cancellation
2282         infrastructure must have been set up.  And enable async
2283         cancellation before potentially going to sleep.  [BZ #401]
2284
2285 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
2286
2287         * Versions: Remove exports for pthread_set*id_np functions.
2288         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
2289         for now.
2290         * Makefile: Don't build pthread_set*id code for now.
2291
2292 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
2293
2294         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
2295         internal use.
2296         * allocatestack.c (__nptl_setxid): New function.
2297         * descr.h (struct xid_command): Define type.
2298         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
2299         (sighandler_setxid): New function.
2300         (__pthread_initialize_minimal): Register sighandler_setxid for
2301         SIGCANCEL.
2302         * pt-allocrtsig.c: Update comment.
2303         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
2304         Declare __nptl_setxid.
2305         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
2306         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
2307         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
2308         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
2309         and pthread_setresuid_np.
2310         * pthread_setgid_np.c: New file.
2311         * pthread_setuid_np.c: New file.
2312         * pthread_setegid_np.c: New file.
2313         * pthread_seteuid_np.c: New file.
2314         * pthread_setregid_np.c: New file.
2315         * pthread_setreuid_np.c: New file.
2316         * pthread_setresgid_np.c: New file.
2317         * pthread_setresuid_np.c: New file.
2318         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
2319         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
2320         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
2321         and pthread_setresuid_np.
2322         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
2323         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
2324         pthread_setregid, and pthread_setresgid.
2325
2326 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
2327
2328         * allocatestack.c (allocate_stack): Return EAGAIN instead of
2329         ENOMEM when out of memory.
2330
2331 2004-09-10  Roland McGrath  <roland@redhat.com>
2332
2333         [BZ #379]
2334         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
2335         code, since we don't try to use the broken CLONE_STOPPED any more.
2336         * pthread_create.c (start_thread): Likewise.
2337
2338 2004-09-15  Richard Henderson  <rth@redhat.com>
2339
2340         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
2341
2342 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
2343
2344         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
2345         (__libc_unwind_longjmp): Delete macro and declare as function.
2346         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
2347         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
2348         nptl directory.
2349         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
2350         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
2351         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
2352
2353 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
2354
2355         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
2356         for __USE_XOPEN2K.
2357         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
2358         types also for __USE_XOPEN2K.
2359         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
2360         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2361         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2362         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2363         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2364         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2365         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2366         [BZ #320]
2367
2368 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
2369
2370         * sysdeps/pthread/pthread.h
2371         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
2372         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
2373         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
2374         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
2375         [BZ #375]
2376
2377 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
2378
2379         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
2380         PSEUDO to be used with . prefix.
2381
2382         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
2383         Use atomic_increment instead of atomic_exchange_and_add.
2384         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
2385         Likewise.
2386         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
2387         Likewise.
2388         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
2389         Likewise.
2390
2391         * allocatestack.c (allocate_stack): Use atomic_increment_val
2392         instead of atomic_exchange_and_add.
2393         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
2394         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
2395         Likewise.
2396         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
2397         Likewise.
2398
2399         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
2400         the initialization function might throw.
2401
2402 2005-09-05  Richard Henderson  <rth@redhat.com>
2403
2404         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
2405         Move definition inside libpthread, libc, librt check.  Provide
2406         definition for rtld.
2407
2408 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
2409
2410         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
2411         * sysdeps/i386/jmpbuf-unwind.h: Likewise
2412         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2413         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2414         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2415         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2416         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2417         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
2418         * unwind.c: Use it.
2419
2420         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
2421         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
2422         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
2423         Likewise.
2424         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
2425         Decrement __nwaiters.  If pthread_cond_destroy has been called and
2426         this is the last waiter, signal pthread_cond_destroy caller and
2427         avoid using the pthread_cond_t structure after unlock.
2428         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2429         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2430         Read clock type from the least significant bits of __nwaiters instead
2431         of __clock.
2432         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2433         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
2434
2435 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
2436
2437         [BZ #342]
2438         * Makefile (tests): Add tst-cond20 and tst-cond21.
2439         * tst-cond20.c: New test.
2440         * tst-cond21.c: New test.
2441         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2442         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
2443         it unsigned int.
2444         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
2445         Likewise.
2446         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2447         (pthread_cond_t): Likewise.
2448         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
2449         Likewise.
2450         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
2451         Likewise.
2452         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
2453         Likewise.
2454         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
2455         (cond_nwaiters): New.
2456         (clock_bits): New.
2457         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
2458         if there are waiters not signalled yet.
2459         Wait until all already signalled waiters wake up.
2460         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
2461         __nwaiters.  If pthread_cond_destroy has been called and this is the
2462         last waiter, signal pthread_cond_destroy caller and avoid using
2463         the pthread_cond_t structure after unlock.
2464         (__pthread_cond_wait): Increment __nwaiters in the beginning,
2465         decrement it when leaving.  If pthread_cond_destroy has been called
2466         and this is the last waiter, signal pthread_cond_destroy caller.
2467         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
2468         Likewise.  Read clock type from the least significant bits of
2469         __nwaiters instead of __clock.
2470         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
2471         whether clock ID can be encoded in COND_CLOCK_BITS bits.
2472         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
2473         clock type just from the last COND_CLOCK_BITS bits of value.
2474         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
2475         instead of __clock, just from second bit of condattr's value.
2476
2477 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
2478
2479         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
2480         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
2481         != 64.
2482         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
2483
2484 2004-08-15  Roland McGrath  <roland@frob.com>
2485
2486         * pthread_atfork.c: Update copyright terms including special exception
2487         for these trivial files, which are statically linked into executables
2488         that use dynamic linking for the significant library code.
2489
2490 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
2491
2492         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
2493         pthread_rwlock_rdlock.
2494         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
2495         Decrease __nr_readers_queued after reacquiring lock.
2496         * sysdeps/pthread/pthread_rwlock_timedrdlock
2497         (pthread_rwlock_timedrdlock): Likewise.
2498         Reported by Bob Cook <bobcook47@hotmail.com>.
2499
2500 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
2501
2502         * tst-rwlock14.c (tf): Read main thread handle from *ARG
2503         before pthread_barrier_wait.
2504
2505 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
2506
2507         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
2508         Remove unnecessary exception handling data.
2509
2510 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
2511
2512         [BZ #284]
2513         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
2514         instead of clockid_t.
2515
2516 2004-07-21  Roland McGrath  <roland@redhat.com>
2517
2518         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
2519
2520 2004-07-19  Roland McGrath  <roland@redhat.com>
2521
2522         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
2523
2524 2004-07-02  Roland McGrath  <roland@redhat.com>
2525
2526         * configure: Don't exit.
2527
2528 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2529
2530         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
2531         (__pthread_cond_timedwait): Check for invalid nanosecond in
2532         timeout value.
2533
2534 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
2535
2536         * Makefile: Add rules to build and run tst-fini1.
2537         * tst-fini1.c: New file.
2538         * tst-fini1mod.c: New file.
2539
2540 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
2541
2542         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
2543         if no cancellation support is needed.
2544         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
2545         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
2546         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
2547         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
2548         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2549         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
2550         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
2551         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2552         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2553
2554         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
2555         only if not already defined.
2556
2557 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
2558
2559         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
2560         constraint "m" instead of "0" for futex.
2561
2562         * shlib-versions: Add powerpc64-.*-linux.*.
2563
2564 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
2565
2566         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
2567         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
2568         for valid tv_nsec.
2569         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
2570         1 billion and 64-bit tv_nsec which is valid when truncated to 32
2571         bits.
2572
2573 2004-06-29  Roland McGrath  <roland@redhat.com>
2574
2575         * Banner: NPTL no longer has its own version number.
2576         * Makefile (nptl-version): Variable removed.
2577         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
2578         using $(version), the glibc version number.
2579
2580 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2581
2582         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
2583         Fix branch offset for a PLT entry.
2584         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
2585         Likewise.
2586         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
2587         Likewise.
2588         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
2589         Likewise.
2590         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
2591         Likewise.
2592
2593 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
2594
2595         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
2596         unconditionally.
2597
2598 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
2599
2600         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2601         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
2602         instead of tv_sec.
2603         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
2604         (pthread_rwlock_timedrdlock): Likewise.
2605
2606 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
2607
2608         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
2609         Set __r7 to val, not mutex.
2610
2611 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
2612
2613         * Makefile: Add rules to build tst-rwlock14.
2614         * tst-rwlock14.c: New file.
2615
2616 2004-06-24  Boris Hu  <boris.hu@intel.com>
2617
2618         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
2619         check.
2620         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
2621
2622 2004-06-19  Andreas Jaeger  <aj@suse.de>
2623
2624         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
2625         assembler in last patch.
2626
2627 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
2628
2629         * sysdeps/pthread/pthread_cond_timedwait.c
2630         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
2631         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2632         (__pthread_cond_timedwait): Check for invalid nanosecond in
2633         timeout value.
2634         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2635         * tst-cond19.c: New file.
2636         * Makefile: Add rules to build and run tst-cond19.
2637
2638 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
2639
2640         * tst-context1.c (GUARD_PATTERN): Defined.
2641         (tst_context_t): Define struct containing ucontext_t & guard words.
2642         (ctx): Declare as an array of tst_context_t.
2643         (fct): Verify uc_link & guard words are still valid.
2644         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
2645
2646 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2647
2648         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
2649         Add __data.__futex field, reshuffle __data.__clock.
2650         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
2651         (__pthread_cond_signal): Increment __futex at the same time as
2652         __wakeup_seq or __total_seq.  Pass address of __futex instead of
2653         address of low 32-bits of __wakeup_seq to futex syscall.
2654         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
2655         (__pthread_cond_wait): Likewise.  Pass __futex value from before
2656         releasing internal lock to FUTEX_WAIT.
2657         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
2658         (__pthread_cond_timedwait): Likewise.
2659         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2660         (FUTEX_CMP_REQUEUE): Define.
2661         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
2662         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
2663         Pass __futex value from before the unlock and __futex address instead
2664         of address of low 32-bits of __wakeup_seq to futex syscall.
2665         Fallback to FUTEX_WAKE all on any errors.
2666
2667 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
2668
2669         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
2670         comment typo.
2671         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
2672         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
2673         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
2674         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
2675         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
2676
2677 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2678
2679         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
2680         Add memory clobber to inline assembly.
2681         (__lll_mutex_trylock): Likewise.
2682         (__lll_mutex_cond_trylock): Likewise.
2683
2684 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2685
2686         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
2687         Pass val argument as 6th system call argument in %r7.
2688
2689 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
2690
2691         * Makefile (tests): Add tst-cond16.
2692         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
2693         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
2694         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
2695         Add __data.__futex field, reshuffle __data.__clock.
2696         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
2697         (__pthread_cond_signal): Increment __futex at the same time as
2698         __wakeup_seq or __total_seq.  Pass address of __futex instead of
2699         address of low 32-bits of __wakeup_seq to futex syscall.
2700         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
2701         (__pthread_cond_wait): Likewise.  Pass __futex value from before
2702         releasing internal lock to FUTEX_WAIT.
2703         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
2704         (__pthread_cond_timedwait): Likewise.
2705         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
2706         (FUTEX_CMP_REQUEUE): Define.
2707         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
2708         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
2709         Pass __futex value from before the unlock and __futex address instead
2710         of address of low 32-bits of __wakeup_seq to futex syscall.
2711         Fallback to FUTEX_WAKE all on any errors.
2712         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
2713         Define.
2714         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
2715         internally.  Return non-zero if error, zero if success.
2716         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
2717         Add __data.__futex field, reshuffle __data.__clock.
2718         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
2719         Define.
2720         (lll_futex_requeue): Add val argument, return 1 unconditionally
2721         for the time being.
2722         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
2723         Add __data.__futex field, reshuffle __data.__clock.
2724         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
2725         Define.
2726         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
2727         internally.  Return non-zero if error, zero if success.
2728         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2729         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
2730         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
2731         Define.
2732         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
2733         internally.  Return non-zero if error, zero if success.
2734         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
2735         Add __data.__futex field, reshuffle __data.__clock.
2736         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
2737         Define.
2738         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
2739         internally.  Return non-zero if error, zero if success.
2740         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
2741         Add __data.__futex field, reshuffle __data.__clock.
2742         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
2743         Add __data.__futex field, reshuffle __data.__clock.
2744         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
2745         Increment __futex at the same time as __wakeup_seq or __total_seq.
2746         Pass address of __futex instead of address of low 32-bits of
2747         __wakeup_seq to futex syscall.
2748         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
2749         Pass __futex value from before releasing internal lock
2750         to FUTEX_WAIT.
2751         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
2752         Likewise.  Avoid unnecessary shadowing of variables.
2753         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
2754         Set __futex to 2 * __total_seq.  Pass __futex value from before the
2755         unlock and __futex address instead of address of low 32-bits of
2756         __wakeup_seq to futex_requeue macro, adjust for new return value
2757         meaning.
2758         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2759         (__pthread_cond_signal): Increment __futex at the same time as
2760         __wakeup_seq or __total_seq.  Pass address of __futex instead of
2761         address of low 32-bits of __wakeup_seq to futex syscall.
2762         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2763         (__pthread_cond_wait): Likewise.  Pass __futex value from before
2764         releasing internal lock to FUTEX_WAIT.
2765         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2766         (__pthread_cond_timedwait): Likewise.
2767         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2768         (FUTEX_CMP_REQUEUE): Define.
2769         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
2770         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
2771         Pass __futex value from before the unlock and __futex address instead
2772         of address of low 32-bits of __wakeup_seq to futex syscall.
2773         Fallback to FUTEX_WAKE all on any errors.
2774
2775 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2776
2777         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
2778         Add nop to align the end of critical section.
2779         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
2780
2781 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2782
2783         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
2784         Add __broadcast_seq field.
2785         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
2786         all waiters as woken with woken_seq and bump broadcast counter.
2787         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
2788         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
2789         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2790         Comment typo fixes.  Avoid returning -ETIMEDOUT.
2791
2792 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
2793
2794         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2795         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
2796         Reported by Kaz Kojima.
2797
2798 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
2799
2800         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
2801
2802 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
2803
2804         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
2805         __broadcast_seq with bc_seq after acquiring internal lock instead of
2806         before it.
2807
2808 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
2809
2810         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
2811         compilation.
2812         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2813         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
2814         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
2815         (pthread_cond_t): Add __data.__broadcast_seq field.
2816         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2817         (FRAME_SIZE): Define.
2818         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
2819         Comment typo fixes.
2820         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
2821         Define.
2822         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
2823         typo fixes.
2824         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2825         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
2826         fixes.
2827
2828 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
2829
2830         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
2831         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
2832         Add __broadcast_seq field.
2833         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2834         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2835         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2836         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
2837         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2838         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
2839         all waiters as woken with woken_seq and bump broadcast counter.
2840         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
2841         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
2842         __broadcast_seq field.
2843         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2844         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
2845         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
2846         * pthread_cond_init.c: Initialize __broadcast_seq field.
2847         * Makefile (tests): Add tst-cond17 and tst-cond18.
2848         Add .NOTPARALLEL goal.
2849         * tst-cond16.c: New file.  From Jakub.
2850         * tst-cond17.c: New file.  From Jakub.
2851         * tst-cond18.c: New file.  From Jakub.
2852
2853 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
2854
2855         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
2856         unwind info.
2857
2858         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
2859         Parametrize frame size.  Correct some unwind info.
2860         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2861
2862 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
2863
2864         * tst-stack3.c: Note testing functionality beyond POSIX.
2865
2866 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
2867
2868         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
2869         Change conditional from ifdef to if.
2870
2871 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
2872
2873         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
2874         SYSDEP_CANCEL_ERROR): Define.
2875         (PSEUDO): Use it.
2876
2877 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
2878
2879         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
2880
2881 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
2882
2883         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
2884
2885 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2886
2887         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
2888         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
2889         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
2890         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
2891
2892 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
2893
2894         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
2895         thread has all signals blocked.
2896
2897 2004-04-18  Andreas Jaeger  <aj@suse.de>
2898
2899         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
2900         (SEM_VALUE_MAX): Add missing brace.
2901
2902 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
2903
2904         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
2905         in rt subdir.
2906         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
2907         * sysdeps/pthread/tst-mqueue8x.c: New test.
2908         * tst-cancel4.c: Update comment about message queues.
2909
2910         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
2911         return it_value { 0, 0 }.
2912         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
2913         like SIGEV_SIGNAL.
2914         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
2915         assertion for SIGEV_NONE.
2916         (thread_attr_compare): Compare all attributes, not just a partial
2917         subset.
2918
2919 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
2920
2921         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
2922
2923 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
2924
2925         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
2926         Just use a plain number.
2927         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
2928         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
2929         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
2930         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
2931         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
2932         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
2933         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
2934
2935 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2936
2937         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
2938         frame info.
2939         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2940
2941 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
2942
2943         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
2944         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
2945         of calling sigwaitinfo.
2946
2947 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
2948
2949         * allocatestack.c (allocate_stack): Set reported_guardsize
2950         unconditionally.
2951         * pthread_getattr_np.c (pthread_getattr_np): Use
2952         reported_guardsize instead of guardsize.
2953         * descr.h (struct pthread): Add reported_guardsize field.
2954
2955 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
2956
2957         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
2958
2959 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
2960
2961         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
2962
2963 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
2964
2965         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
2966         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
2967         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
2968         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
2969         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
2970         Define.
2971         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
2972         (_POSIX_MESSAGE_PASSING): Define.
2973         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
2974         (_POSIX_MESSAGE_PASSING): Define.
2975         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
2976         (_POSIX_MESSAGE_PASSING): Define.
2977
2978 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
2979
2980         * tst-context1.c (fct): Check whether correct stack is used.
2981
2982 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
2983
2984         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
2985         matching constraints for asm mem parameters.
2986
2987         * tst-clock2.c (tf): Don't define unless needed.
2988
2989 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
2990
2991         * Makefile (link-libc-static): Use $(static-gnulib) instead of
2992         $(gnulib).
2993
2994 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
2995
2996         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
2997         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
2998         * pthreadP.h: Declare __nptl_deallocate_tsd.
2999         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
3000         Adjust caller.
3001
3002         * Makefile (tests): Add tst-tsd5.
3003         * tst-tsd5.c: New file.
3004
3005 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
3006
3007         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
3008         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
3009         is SHLIB_COMPAT check.
3010         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
3011         (__pthread_attr_getaffinity_old): Likewise.
3012         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
3013         (__pthread_getaffinity_old): Likewise.
3014         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
3015         (__pthread_setaffinity_old): Likewise.
3016
3017 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
3018
3019         * allocatestack.c (_make_stacks_executable): Call
3020         _dl_make_stack_executable first.
3021
3022 2004-03-24  Roland McGrath  <roland@redhat.com>
3023
3024         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
3025         constraint instead of "0".
3026
3027 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
3028
3029         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3030         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
3031
3032         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
3033         code to avoid warning.
3034
3035 2004-03-24  Andreas Jaeger  <aj@suse.de>
3036
3037         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
3038         (__pthread_attr_setaffinity_old): Remove const.
3039
3040 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
3041
3042         * sysdeps/unix/sysv/linux/smp.h: New file.
3043         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
3044         * init.c: Define __is_smp.
3045         (__pthread_initialize_minimal_internal): Call is_smp_system to
3046         initialize __is_smp.
3047         * pthreadP.h: Declare __is_smp.
3048         Define MAX_ADAPTIVE_COUNT is necessary.
3049         * pthread_mutex_init.c: Add comment regarding __spins field.
3050         * pthread_mutex_lock.c: Implement adaptive mutex type.
3051         * pthread_mutex_timedlock.c: Likewise.
3052         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
3053         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
3054         Add __spins field.
3055         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3056         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3057         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3058         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3059         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3060         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3061         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3062         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
3063         lll_mutex_cond_trylock.
3064         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3065         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3066         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3067         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3068         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3069         Define BUSY_WAIT_NOP.
3070         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3071         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3072
3073         * tst-mutex5.c: Add support for testing adaptive mutexes.
3074         * tst-mutex7.c: Likewise.
3075         * tst-mutex5a.c: New file.
3076         * tst-mutex7a.c: New file.
3077         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
3078
3079         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3080         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
3081         vgettimeofday call might destroy the content.
3082
3083         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
3084         @pause in the loop.
3085
3086         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
3087         No need to restrict type of ret.  Make it int.  Add comment.
3088
3089         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
3090         Remove unnecessary setne instruction.
3091
3092 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
3093
3094         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
3095         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
3096         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
3097         If realloc fails, break out of the loop.
3098
3099 2004-03-20  Andreas Jaeger  <aj@suse.de>
3100
3101         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
3102         (__pthread_setaffinity_old): Fix interface.
3103         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
3104         (__pthread_getaffinity_old): Likewise.
3105
3106         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
3107         (__pthread_setaffinity_new): Remove duplicate declaration.
3108
3109 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3110
3111         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
3112         the return value to a safe register.
3113         (CDISABLE): Set the function argument correctly.
3114
3115 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3116
3117         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
3118         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
3119         Rewrite so that only one locked memory operation per round is needed.
3120         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
3121         (pthread_barrier_wait): After wakeup, release lock only when the
3122         last thread stopped using the barrier object.
3123         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
3124         (__pthread_cond_wait): Don't store mutex address if the current
3125         value is ~0l.  Add correct cleanup support and unwind info.
3126         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3127         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
3128         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
3129         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
3130         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
3131         Add correct cleanup support and unwind info.
3132         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
3133         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
3134         information for syscall wrappers.
3135
3136 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
3137
3138         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
3139         cpusetsize field, remove next.
3140         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
3141         parameter for size of the CPU set.
3142         (pthread_setaffinity_np): Likewise.
3143         (pthread_attr_getaffinity_np): Likewise.
3144         (pthread_attr_setaffinity_np): Likewise.
3145         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
3146         interface change, keep compatibility code.
3147         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
3148         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
3149         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
3150         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
3151         __pthread_getaffinity_np.
3152         * Versions: Add version for changed interfaces.
3153         * tst-attr3.c: Adjust test for interface change.
3154         * pthread_getattr_np.c: Query the kernel about the affinity mask with
3155         increasing buffer sizes.
3156         * pthread_attr_destroy.c: Remove unused list handling.
3157         * pthread_attr_init.c: Likewise.
3158
3159 2004-03-17  Roland McGrath  <roland@redhat.com>
3160
3161         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
3162         first argument to clock_getres so we ever enable kernel timers.
3163
3164 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
3165
3166         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
3167
3168 2004-03-12  Richard Henderson  <rth@redhat.com>
3169
3170         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
3171         oldvalue from CENABLE to CDISABLE.
3172
3173 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
3174
3175         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
3176         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
3177         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
3178         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
3179
3180 2004-03-11  Richard Henderson  <rth@redhat.com>
3181
3182         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
3183         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
3184         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
3185
3186 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
3187
3188         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
3189         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
3190         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
3191
3192 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
3193
3194         * forward.c (__pthread_cond_broadcast_2_0,
3195         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
3196         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
3197         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
3198
3199 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3200
3201         * sysdeps/sh/tcb-offsets.sym: Add PID.
3202         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
3203         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
3204
3205 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
3206
3207         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
3208         include <sysdep-cancel.h>, vfork is no cancellation point.
3209         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
3210         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
3211         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
3212
3213 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
3214
3215         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
3216         libc_hidden_def.
3217         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
3218         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
3219         Likewise.
3220         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
3221         Likewise.
3222         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
3223         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
3224         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
3225         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
3226         of DO_CALL_VIA_BREAK.  Work around a gas problem.
3227
3228         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
3229         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
3230         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
3231         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
3232         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
3233         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
3234
3235         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
3236         a local register for saving old PID.  Negate PID in parent upon exit.
3237
3238         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
3239         tcb-offsets.h.
3240         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
3241         before syscall, set to the old value in the parent afterwards.
3242         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
3243         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
3244         tcb-offsets.h.
3245         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
3246         before syscall, set to the old value in the parent afterwards.
3247         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
3248         * sysdeps/s390/tcb-offsets.sym: Add PID.
3249
3250         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
3251         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
3252         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
3253         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
3254         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
3255         * sysdeps/sparc/tcb-offsets.sym: Add PID.
3256
3257 2004-03-10  Andreas Schwab  <schwab@suse.de>
3258
3259         * sysdeps/ia64/tcb-offsets.sym: Add PID.
3260         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
3261         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
3262
3263 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
3264
3265         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
3266         * tst-cancel21.c (do_one_test): Likewise.
3267         Reported by Gordon Jin <gordon.jin@intel.com>.
3268
3269 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
3270
3271         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
3272         if non-zero and set to INT_MIN if zero.
3273         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
3274         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
3275         (SAVE_PID, RESTORE_PID): Define.
3276         (__vfork): Use it.
3277         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
3278         Use relative path to avoid including NPTL i386/vfork.S.
3279         (SAVE_PID, RESTORE_PID): Define.
3280         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
3281         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
3282         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
3283         tst-vfork2x.
3284         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
3285         * tst-vfork1.c: New test.
3286         * tst-vfork2.c: New test.
3287         * tst-vfork1x.c: New test.
3288         * tst-vfork2x.c: New test.
3289
3290 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
3291
3292         * sysdeps/i386/tcb-offsets.sym: Add PID.
3293         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
3294         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
3295         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
3296
3297 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
3298
3299         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
3300
3301 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
3302
3303         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
3304         _rtld_global_ro.
3305
3306 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
3307
3308         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
3309         _rtld_global_ro.
3310
3311         * tst-once4.c: Remove unnecessary macro definition.
3312
3313         * tst-mutex7.c (do_test): Limit thread stack size.
3314         * tst-once2.c (do_test): Likewise.
3315         * tst-tls3.c (do_test): Likewise.
3316         * tst-tls1.c (do_test): Likewise.
3317         * tst-signal3.c (do_test): Likewise.
3318         * tst-kill6.c (do_test): Likewise.
3319         * tst-key4.c (do_test): Likewise.
3320         * tst-join4.c (do_test): Likewise.
3321         * tst-fork1.c (do_test): Likewise.
3322         * tst-context1.c (do_test): Likewise.
3323         * tst-cond2.c (do_test): Likewise.
3324         * tst-cond10.c (do_test): Likewise.
3325         * tst-clock2.c (do_test): Likewise.
3326         * tst-cancel10.c (do_test): Likewise.
3327         * tst-basic2.c (do_test): Likewise.
3328         * tst-barrier4.c (do_test): Likewise.
3329
3330 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
3331
3332         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
3333
3334 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
3335
3336         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3337         (__pthread_cond_timedwait): Optimize wakeup test.
3338         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
3339         (__pthread_cond_wait): Likewise.
3340         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
3341         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3342         Likewise.
3343
3344 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
3345
3346         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3347         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
3348         the atomic instruction needed.
3349         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3350         (__lll_mutex_lock_wait): Likewise.
3351
3352 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
3353
3354         * Makefile (tests): Add tst-cond14 and tst-cond15.
3355         * tst-cond14.c: New file.
3356         * tst-cond15.c: New file.
3357
3358 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
3359
3360         * sysdeps/pthread/createthread.c (create_thread): Remove use of
3361         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
3362         needs to be implemented differently to be useful.
3363
3364 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
3365
3366         * pthread_attr_setschedparam.c: Don't test priority against limits
3367         here.  Set ATTR_FLAG_SCHED_SET flag.
3368         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
3369         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
3370         from parent thread to child.  If attribute is used and scheduling
3371         parameters are not inherited, copy parameters from attribute or
3372         compute them.  Check priority value.
3373         * pthread_getschedparam.c: If the parameters aren't known yet get
3374         them from the kernel.
3375         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
3376         ATTR_FLAG_POLICY_SET flag for thread.
3377         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
3378         and ATTR_FLAG_POLICY_SET.
3379
3380         * sysdeps/pthread/createthread.c: Use tgkill if possible.
3381
3382         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
3383         fail if stack address hasn't been set.  Just return 0.
3384
3385 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
3386
3387         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
3388         libpthread for the files in this list.
3389         (CFLAGS-tst-unload): Removed.
3390         * tst-unload.c (do_test): Don't use complete path for
3391         LIBPHREAD_SO.
3392
3393         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
3394         tst-_res1mod2.
3395
3396 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
3397
3398         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3399         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
3400         operation per round is needed.
3401         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3402         (__lll_mutex_lock_wait): Likewise.
3403
3404 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
3405
3406         * tst-cancel9.c (cleanup): Don't print to stderr.
3407
3408 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3409
3410         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
3411
3412 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
3413
3414         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
3415         (__syscall_error_handler2): Call CDISABLE.
3416         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
3417         (__syscall_error_handler2): Call CDISABLE.
3418
3419         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
3420         Release lock before the loop, don't reacquire it.
3421
3422         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
3423
3424 2004-02-19  Andreas Schwab  <schwab@suse.de>
3425
3426         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
3427         Fix last change.
3428
3429 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
3430
3431         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
3432         (pthread_barrier_wait): After wakeup, release lock only when the
3433         last thread stopped using the barrier object.
3434         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
3435         (pthread_barrier_wait): Likewise.
3436         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
3437         Likewise.
3438         * Makefile (tests): Add tst-barrier4.
3439         * tst-barrier4.c: New file.
3440
3441         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3442         (__pthread_cond_timedwait): Perform timeout test while holding
3443         internal lock to prevent wakeup race.
3444         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
3445         * sysdeps/pthread/pthread_cond_timedwait.c
3446         (__pthread_cond_timedwait): Likewise.
3447         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
3448         (__pthread_cond_timedwait): Likewise.
3449
3450 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
3451
3452         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
3453         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
3454         * Makefile (tests): Add tst-rwlock13.
3455         * tst-rwlock13.c: New test.
3456
3457 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
3458
3459         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3460         (__condvar_tw_cleanup): Little optimization.
3461         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
3462
3463 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
3464
3465         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
3466         libpthread as "lib" parameter to SHLIB_COMPAT.
3467         (__novmx_siglongjmp): Fix typo in function name.
3468         (__novmx_longjmp): Fix typo in function name.
3469
3470 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
3471
3472         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
3473         __builtin_expect.
3474
3475         * sysdeps/generic/pt-longjmp.c: Moved to...
3476         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
3477
3478 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
3479
3480         * Makefile (libpthread-routines): Add pt-cleanup.
3481         * pt-longjmp.c: Removed.
3482         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
3483         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
3484         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
3485         Version longjmp, siglongjmp for GLIBC_2.3.4.
3486         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
3487
3488 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
3489
3490         * sysdeps/pthread/pthread_cond_timedwait.c
3491         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
3492         Reuse code.  Add __builtin_expects.
3493
3494         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3495         (__pthread_cond_timedwait): Get internal lock in case timeout has
3496         passed before the futex syscall.
3497         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3498
3499 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
3500
3501         * allocatestack.c: Pretty printing.
3502
3503         * sysdeps/pthread/createthread.c (create_thread): Don't add
3504         CLONE_DETACHED bit if it is not necessary.
3505
3506 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
3507
3508         * pthread_getattr_np.c: Include ldsodefs.h.
3509
3510 2004-01-16  Richard Henderson  <rth@redhat.com>
3511
3512         * allocatestack.c: Don't declare __libc_stack_end.
3513         * init.c (__pthread_initialize_minimal_internal): Likewise.
3514         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
3515
3516 2004-01-15  Richard Henderson  <rth@redhat.com>
3517
3518         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
3519         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
3520         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
3521         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
3522         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
3523         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
3524         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
3525         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
3526
3527 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
3528
3529         * init.c (pthread_functions): Make array const.
3530
3531 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
3532
3533         * allocatestack.c (__make_stacks_executable): Change interface.
3534         Check parameters.  Pass parameter on to libc counterpart.
3535         * pthreadP.h: Change declaration.
3536
3537 2004-01-13  Richard Henderson  <rth@redhat.com>
3538
3539         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
3540         prototype form.
3541         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
3542         Likewise.
3543
3544         * sysdeps/alpha/Makefile: New file.
3545         * sysdeps/alpha/tcb-offsets.sym: New file.
3546         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
3547         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
3548
3549         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
3550         on powerpc version.
3551
3552 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
3553
3554         * Makefile (tests): Add tst-backtrace1.
3555         * tst-backtrace1.c: New test.
3556
3557 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
3558
3559         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
3560         register as second parameter to the REGISTER macro.
3561         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
3562         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
3563         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
3564         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
3565         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
3566         of thread register as second parameter to REGISTER macro in 64 case.
3567
3568 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
3569
3570         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
3571         (CFLAGS-getpid.o): Defined.
3572         (CFLAGS-getpid.os): Defined.
3573
3574 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
3575
3576         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
3577         returned for main thread does not overlap with any other VMA.
3578         Patch by Jakub Jelinek.
3579
3580 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
3581
3582         * tst-raise1.c: Include stdio.h.
3583
3584 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
3585
3586         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
3587         setting with __ASSUME_TGKILL || defined __NR_tgkill.
3588         If pid is 0, set it to selftid.
3589         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
3590         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
3591         != 0, return self->tid without doing a syscall.
3592         * descr.h (struct pthread): Move pid field after tid.
3593
3594         * Makefile (tests): Add tst-raise1.
3595         * tst-raise1.c: New file.
3596
3597 2003-12-23  Roland McGrath  <roland@redhat.com>
3598
3599         * tst-oddstacklimit.c: New file.
3600         * Makefile (tests): Add it.
3601         (tst-oddstacklimit-ENV): New variable.
3602
3603         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
3604         value up to page size for __default_stacksize.
3605
3606 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
3607
3608         * Makefile (tests): Add tst-eintr5.
3609         * tst-eintr5.c: New file.
3610
3611         * eintr.c (eintr_source): Prevent sending signal to self.
3612
3613         * tst-eintr2.c (tf1): Improve error message.
3614
3615 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
3616
3617         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
3618         * sysdeps/unix/sysv/linux/getpid.c: New file.
3619         * pthread_cancel.c: Add comment explaining use of PID field.
3620         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
3621         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
3622         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
3623         temporarily to signal the field must not be relied on and updated
3624         by getpid().
3625         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
3626         temporarily negative.
3627         * sysdeps/unix/sysv/linux/raise.c: Likewise.
3628
3629 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
3630
3631         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
3632         (eintr_source): If ARG != NULL, use pthread_kill.
3633         * tst-eintr1.c: Adjust for this change.
3634         * tst-eintr2.c: Likewise.
3635         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
3636         * tst-eintr3.c: New file.
3637         * tst-eintr4.c: New file.
3638
3639 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
3640
3641         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
3642         if CANCELSTATE_BITMASK is set.
3643         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
3644         Likewise.
3645
3646         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
3647         (tests-reverse): Add tst-cancel23.
3648         * tst-cancel22.c: New test.
3649         * tst-cancel23.c: New test.
3650
3651 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
3652
3653         * tst-eintr1.c: Better error messages.
3654
3655         * Makefile (tests): Add tst-eintr2.
3656         * tst-eintr2.c: New file.
3657
3658 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
3659
3660         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
3661         (CFLAGS-tst-cancelx21.c): Set.
3662         * tst-cancel21.c: New test.
3663         * tst-cancelx21.c: New test.
3664
3665         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
3666         comparison operand.
3667         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
3668         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
3669         * pt-longjmp.c: Include jmpbuf-unwind.h.
3670         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
3671         _JMPBUF_UNWINDS.  Adjust compared pointers.
3672         * init.c (__pthread_initialize_minimal_internal): Initialize
3673         pd->stackblock_size.
3674         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
3675         * sysdeps/alpha/jmpbuf-unwind.h: New file.
3676         * sysdeps/i386/jmpbuf-unwind.h: New file.
3677         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
3678         * sysdeps/s390/jmpbuf-unwind.h: New file.
3679         * sysdeps/sh/jmpbuf-unwind.h: New file.
3680         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
3681         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
3682         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
3683         (_JMPBUF_CFA_UNWINDS): Remove.
3684         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
3685
3686 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
3687
3688         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
3689         (CFLAGS-tst-cancelx20.c): Set.
3690         * tst-cancel20.c: New test.
3691         * tst-cancelx20.c: New test.
3692
3693 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
3694
3695         * init.c (__pthread_initialize_minimal_internal): Don't treat
3696         architectures with separate register stack special here when
3697         computing default stack size.
3698
3699 2003-12-17  Roland McGrath  <roland@redhat.com>
3700
3701         * Makefile (tst-cancelx7-ARGS): New variable.
3702         Reportd by Greg Schafer <gschafer@zip.com.au>.
3703
3704 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
3705
3706         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
3707         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
3708         (tst-stack3-ENV): Set.
3709         ($(objpfx)tst-stack3-mem): New.
3710         * tst-stack3.c: New test.
3711
3712 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
3713
3714         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
3715         Add unwind directives.  Drop unused .regstk directive.
3716         (_fini_EPILOG_BEGINS): Add unwind directives.
3717
3718 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
3719
3720         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
3721         Assume parameter is a pointer.
3722         (lll_futex_wake): Likewise.
3723         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
3724         Likewise.
3725         (lll_futex_wake): Likewise.
3726         Reported by Boris Hu.
3727         * sysdeps/unix/sysv/linux/unregister-atfork.c
3728         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
3729
3730         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
3731
3732 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
3733
3734         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
3735         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
3736         __rtld_lock_initialize for ld.so lock.
3737         Patch in part by Adam Li <adam.li@intel.com>.
3738
3739 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
3740
3741         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
3742         in $(gnulib).  Also, remove stale comment.
3743
3744 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
3745
3746         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
3747         advantage of new syscall stub and optimize accordingly.
3748
3749         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
3750         from SYS_futex, to match expectations of
3751         sysdep.h:DO_INLINE_SYSCALL.
3752         (lll_futex_clobbers): Remove.
3753         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
3754         (lll_futex_wake): Likewise.
3755         (lll_futex_requeue): Likewise.
3756         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
3757         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
3758         Jelinek).
3759         (__lll_mutex_lock): Likewise.
3760         (__lll_mutex_cond_lock): Likewise.
3761         (__lll_mutex_timed_lock): Likewise.
3762         (__lll_mutex_unlock): Likewise.
3763         (__lll_mutex_unlock_force): Likewise.
3764
3765         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
3766         comes before the include of <sysdep.h>.
3767         (THREAD_SELF_SYSINFO): New macro.
3768         (THREAD_SYSINFO): Likewise.
3769         (INIT_SYSINFO): New macro.
3770         (TLS_INIT_TP): Call INIT_SYSINFO.
3771
3772         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
3773
3774         * sysdeps/pthread/createthread.c (create_thread): Use
3775         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
3776         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
3777         THREAD_SELF_SYSINFO instead of open code.
3778         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
3779         (THREAD_SYSINFO): Likewise.
3780
3781         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
3782
3783         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
3784
3785 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
3786
3787         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
3788         instead of .init.  Patch by David Mosberger.
3789
3790 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
3791
3792         * sysdeps/pthread/configure.in: Remove broken declaration in C
3793         cleanup handling check.
3794
3795 2003-11-30  Andreas Jaeger  <aj@suse.de>
3796
3797         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
3798         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
3799         Likewise.
3800
3801 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
3802
3803         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
3804         * pthread_attr_destroy.c: Include shlib-compat.h.
3805         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
3806         is set in iattr->flags.
3807         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
3808
3809 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
3810
3811         * Makefile (distribute): Add tst-cleanup4aux.c.
3812
3813         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
3814         include.
3815
3816 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
3817
3818         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
3819         pthread_cond_signal.
3820
3821         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
3822         store mutex address if the current value is ~0l.
3823         * sysdeps/pthread/pthread_cond_timedwait.c
3824         (__pthread_cond_timedwait): Likewise.
3825         * sysdeps/pthread/pthread_cond_broadcast.c
3826         (__pthread_cond_broadcast): Don't use requeue for pshared
3827         condvars.
3828
3829         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
3830         (__pthread_cond_wait): Don't store mutex address if the current
3831         value is ~0l.
3832         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
3833         (__pthread_cond_timedwait): Likewise.
3834         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
3835         (__pthread_cond_broadcast): Don't use requeue for pshared
3836         condvars.
3837
3838         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
3839         element with ~0l for pshared condvars, with NULL otherwise.
3840
3841         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
3842         (__pthread_cond_wait): Don't store mutex address if the current
3843         value is ~0l.
3844         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3845         (__pthread_cond_timedwait): Likewise.
3846         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
3847         (__pthread_cond_broadcast): Don't use requeue for pshared
3848         condvars.
3849
3850         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
3851         * tst-cond12.c: New file.
3852         * tst-cond13.c: New file.
3853
3854 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
3855
3856         * sysdeps/pthread/configure.in: Make missing forced unwind support
3857         fatal.
3858
3859 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
3860
3861         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
3862
3863 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
3864
3865         * Makefile: Add magic to clean up correctly.
3866
3867 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
3868
3869         * unwind.c (FRAME_LEFT): Define.
3870         (unwind_stop): Handle old style cleanups here.
3871         (__pthread_unwind): Handle old style cleanups only if
3872         !HAVE_FORCED_UNWIND.
3873         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
3874         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
3875         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
3876         ($(objpfx)tst-cleanupx4): Likewise.
3877         * tst-cleanup4.c: New test.
3878         * tst-cleanup4aux.c: New.
3879         * tst-cleanupx4.c: New test.
3880
3881 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
3882
3883         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
3884         lll_mutex_*lock macros to skip atomic operations on some archs.
3885
3886 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
3887
3888         * sysdeps/pthread/tst-timer.c (main): Initialize
3889         sigev2.sigev_value as well.
3890
3891 2003-10-15  Roland McGrath  <roland@redhat.com>
3892
3893         * sysdeps/pthread/configure.in: Barf if visibility attribute support
3894         is missing.
3895         * sysdeps/pthread/configure: Regenerated.
3896
3897 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3898
3899         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
3900         locking macros.  No distinction between normal and mutex locking
3901         anymore.
3902         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
3903         Merge bits from lowlevelmutex.S we still need.
3904         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
3905         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
3906         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
3907         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
3908         new mutex implementation.
3909         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
3910         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
3911         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3912         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
3913         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
3914         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3915         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3916         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
3917         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3918         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
3919         symbol for entry point to avoid cancellation.
3920
3921 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
3922
3923         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
3924         changes.
3925         (SAVE_OLDTYPE_0): Fix a typo.
3926
3927 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
3928
3929         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
3930         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
3931
3932 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
3933
3934         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
3935         correct offset.
3936
3937 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
3938
3939         * Makefile (tests): Add tst-cancel19.
3940         * tst-cancel19.c: New test.
3941
3942 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
3943
3944         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
3945         restoring of the old cancellation type.
3946
3947 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
3948
3949         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
3950
3951 2003-09-27  Wolfram Gloger  <wg@malloc.de>
3952
3953         * sysdeps/pthread/malloc-machine.h: New file
3954
3955 2003-09-24  Roland McGrath  <roland@redhat.com>
3956
3957         * allocatestack.c (__make_stacks_executable): Don't ignore return
3958         value from _dl_make_stack_executable.
3959
3960 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
3961
3962         * allocatestack.c (__make_stacks_executable): Also change
3963         permission of the currently unused stacks.
3964
3965         * allocatestack.c (change_stack_perm): Split out from
3966         __make_stacks_executable.
3967         (allocate_stack): If the required permission changed between the time
3968         we started preparing the stack and queueing it, change the permission.
3969         (__make_stacks_executable): Call change_stack_perm.
3970
3971         * Makefile: Build tst-execstack-mod locally.
3972         * tst-execstack-mod.c: New file.
3973
3974 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
3975
3976         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
3977
3978 2003-09-23  Roland McGrath  <roland@redhat.com>
3979
3980         * tst-execstack.c: New file.
3981         * Makefile (tests): Add it.
3982         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
3983         (LDFLAGS-tst-execstack): New variable.
3984
3985         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
3986         whether to use PROT_EXEC for stack mmap.
3987         (__make_stacks_executable): New function.
3988         * pthreadP.h: Declare it.
3989         * init.c (__pthread_initialize_minimal_internal): Set
3990         GL(dl_make_stack_executable_hook) to that.
3991
3992 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
3993
3994         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
3995         recommendation from AMD re avoidance of lock prefix.
3996
3997 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
3998
3999         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
4000         lll_futex_timed_wait instead of lll_futex_wait.
4001         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
4002         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
4003         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
4004         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
4005         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
4006         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
4007         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
4008         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
4009         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
4010         Completely revamp the locking macros.  No distinction between
4011         normal and mutex locking anymore.
4012         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
4013         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
4014         __lll_lock_timedwait): Fix prototypes.
4015         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
4016         __lll_lock_timedwait): Likewise.
4017         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
4018         macros, add __builtin_expect.
4019         (lll_mutex_timedlock): Likewise.  Fix return value.
4020         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
4021         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
4022         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
4023         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
4024         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
4025         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
4026         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
4027         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
4028
4029 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
4030
4031         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4032         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
4033         operation if possible.
4034
4035         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
4036         like jumping over the lock prefix.
4037
4038 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
4039
4040         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
4041         locking macros.  No distinction between normal and mutex locking
4042         anymore.
4043         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4044         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4045         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4046         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
4047         locking.  Merge bits from lowlevelmutex.S we still need.
4048         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
4049         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
4050         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
4051         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
4052         * Makefile (routines): Remove libc-lowlevelmutex.
4053         (libpthread-rountines): Remove lowlevelmutex.
4054         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
4055         for new mutex implementation.
4056         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
4057         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4058         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4059         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
4060         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
4061         Likewise.
4062         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
4063         Likewise.
4064         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
4065         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
4066         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
4067         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
4068         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4069         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4070         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
4071         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
4072         Likewise.
4073         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
4074         Likewise.
4075         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
4076         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
4077         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
4078         Don't use requeue.
4079         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
4080         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
4081
4082 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
4083
4084         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory