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