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