alpha: Include errno.h in sysdep.h
[glibc.git] / nptl / ChangeLog
blob765434cf2a853de02ca5b26aadd0c0341259ac67
1 2013-02-18  Siddhesh Poyarekar  <siddhesh@redhat.com>
3         * sysdeps/pthread/tst-timer.c: Include stdlib.h for declaration
4         of exit.
5         * tst-barrier4.c: Likewise.
6         * tst-robust7.c: Likewise.
8         [BZ #14920]
9         * pthreadP.h (USE_REQUEUE_PI): New macro to check if mutex is
10         PI-aware.
11         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Use
12         PI-aware futex operations if available and mutex is PI-aware.
13         * pthread_cond_signal.c (__pthread_cond_signal): Likewise.
14         * nptl/pthread_cond_timedwait.c (__pthread_cond_timedwait):
15         Likewise.
16         * pthread_cond_wait.c (__condvar_cleanup): Adjust lock if
17         cancellation occurred just after futex returned successfully
18         from a PI operation with the mutex held.
19         (__pthread_cond_wait): Use PI-aware futex operations if
20         available and mutex is PI-aware.
21         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
22         (FUTEX_WAIT_REQUEUE_PI): Define.
23         (FUTEX_CMP_REQUEUE_PI): Likewise.
24         (lll_futex_wait_requeue_pi): Likewise.
25         (lll_futex_timed_wait_requeue_pi): Likewise.
26         (lll_futex_cmp_requeue_pi): Likewise.
27         * nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h
28         (FUTEX_WAIT_REQUEUE_PI): Define.
29         (FUTEX_CMP_REQUEUE_PI): Likewise.
30         (lll_futex_wait_requeue_pi): Likewise.
31         (lll_futex_timed_wait_requeue_pi): Likewise.
32         (lll_futex_cmp_requeue_pi): Likewise.
33         * sysdeps/unix/sysv/linux/kernel-features.h: Define
34         __ASSUME_REQUEUE_PI for Linux version higher than 2.6.31.
36 2013-02-04  Andreas Schwab  <schwab@suse.de>
38         [BZ #14142]
39         * tst-cancel14.c: Include <sys/time.h>.
40         * tst-cancel15.c: Likewise.
41         * tst-mutex9.c: Include <stdint.h>, <stdlib.h> and <sys/time.h>.
42         * tst-stackguard1.c: Include <tls.h>
44 2013-01-16  Andreas Schwab  <schwab@suse.de>
46         [BZ #14327]
47         * sem_open.c (sem_open): Use __mktemp instead of mktemp.
49 2013-01-11  Carlos O'Donell  <codonell@redhat.com>
51         * allocatestack.c (allocate_stack): Add comment. Remove assert
52         on attr.
54 2013-01-11  H.J. Lu  <hongjiu.lu@intel.com>
56         * Makefile (tst-cancel7-ARGS: Replace $(host-built-program-cmd)
57         with $(host-test-program-cmd).
58         (tst-exec4-ARGS): Likewise.
59         (tst-stackguard1-ARGS): Likewise.
60         ($(objpfx)tst-tls6.out): Don't pass $(elf-objpfx) to tst-tls6.sh.
61         Replace $(rtld-installed-name) with $(test-via-rtld-prefix).
62         * tst-tls6.sh (elf_objpfx): Removed.
63         (rtld_installed_name): Renamed to ...
64         (test_via_rtld_prefix): This.
65         (tst_tls5): Prepend ${test_via_rtld_prefix}.
67 2013-01-02  Joseph Myers  <joseph@codesourcery.com>
69         * All files with FSF copyright notices: Update copyright dates
70         using scripts/update-copyrights.
72 2013-01-01  Joseph Myers  <joseph@codesourcery.com>
74         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Reformat
75         copyright notice.
77 2012-12-28  Andi Kleen  <ak@linux.intel.com>
79         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Convert
80         to prototype.
81         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock):
82         Likewise.
84 2012-12-27  David S. Miller  <davem@davemloft.net>
86         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
87         (lll_futex_timed_wait_bitset): New macro.
89 2012-12-27  Siddhesh Poyarekar  <siddhesh@redhat.com>
91         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (SYS_futex):
92         Remove definition.
93         (lll_futex_timed_wait): Replace assembly code with
94         INTERNAL_SYSCALL.
95         (lll_futex_timed_wait_bitset): Likewise.
96         (lll_futex_wake): Likewise.
97         (lll_futex_requeue): Likewise.
98         (lll_futex_wake_unlock): Likewise.
100 2012-12-08  Siddhesh Poyarekar  <siddhesh@redhat.com>
102         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind):
103         Declare LOCAL_VAR as char.
105 2012-12-04  Joseph Myers  <joseph@codesourcery.com>
107         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__old_sem_post):
108         Cast result of atomic_increment_val to (void) instead of storing
109         in otherwise-unused variable.
111 2012-12-03  Allan McRae  <allan@archlinux.org>
113         * Makefile (LDFLAGS-tst-cond24, LDFLAGS-tst-cond25): Remove.
115 2012-11-26  H.J. Lu  <hongjiu.lu@intel.com>
117         * unwind.c (__pthread_unwind): Pass address of unwind_cleanup
118         to THREAD_SETMEM.
119         * sysdeps/i386/tls.h: Include <libc-internal.h>.
120         (THREAD_SETMEM): Use cast_to_integer before casting to uint64_t.
121         (THREAD_SETMEM_NC): Likewise.
122         * sysdeps/x86_64/tls.h: Include <libc-internal.h>.
123         (THREAD_SETMEM): Use cast_to_integer before casting to uint64_t.
124         (THREAD_SETMEM_NC): Likewise.
126 2012-11-21  Joseph Myers  <joseph@codesourcery.com>
128         * sysdeps/unix/sysv/linux/sem_post.c (__old_sem_post): Cast result
129         of atomic_increment_val to (void) instead of storing in
130         otherwise-unused variable.
132         * pthread_cond_timedwait.c (__pthread_cond_timedwait)
133         [__NR_clock_gettime]: Cast result of INTERNAL_VSYSCALL to void
134         instead of storing in otherwise-unused variable.
136 2012-11-14  Marcus Shawcroft  <marcus.shawcroft@linaro.org>
138         * Makefile (CFLAGS-open.c, CFLAGS-open64.c, CFLAGS-pause.c)
139           (CFLAGS-recv.c, CFLAGS-send.c): Define.
141 2012-11-06  Chris Metcalf  <cmetcalf@tilera.com>
143         * tst-sem14.c (TIMEOUT): Set timeout to 10 seconds.
144         * tst-cond24.c (TIMEOUT): Increase from 10 to 20 seconds.
146 2012-11-05  Siddhesh Poyarekar  <siddhesh@redhat.com>
148         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Time out
149         if absolute timeout is negative.
150         [__ASSUME_FUTEX_CLOCK_REALTIME &&
151         lll_futex_timed_wait_bitset]: Use lll_futex_timed_wait_bitset.
152         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
153         Likewise.
154         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
155         Likewise.
156         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
157         (__lll_robust_timedlock_wait): Likewise.
158         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
159         (lll_futex_timed_wait_bitset): New macro.
160         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
161         (lll_futex_timed_wait_bitset): Likewise.
163 2012-11-03  David S. Miller  <davem@davemloft.net>
165         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (BUSY_WAIT_NOP):
166         Add missing spaces.
167         (__cpu_relax): Likewise.
169 2012-11-02  H.J. Lu  <hongjiu.lu@intel.com>
171         * sysdeps/x86_64/tls.h: Don't include <xmmintrin.h>.
172         (__128bits): New struct typedef.
173         (tcbhead_t): Replace __m128 with __128bits.
175 2012-10-30  Aurelien Jarno  <aurelien@aurel32.net>
176             Joseph Myers  <joseph@codesourcery.com>
178         * Makefile (tst-cancel7-ARGS): Use exec in --command argument.
180 2012-10-28  David S. Miller  <davem@davemloft.net>
182         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (BUSY_WAIT_NOP):
183         Define when we have v9 instructions available.
184         * sysdeps/unix/sysv/linux/sparc/sparc64/cpu_relax.S: New file.
185         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/cpu_relax.S: New
186         file.
187         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/Makefile: New
188         file.
189         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Add cpu_relax
190         to libpthread-routines.
192 2012-10-25  Roland McGrath  <roland@hack.frob.com>
194         * tst-cond-except.c (TEST_FUNCTION): New macro.
196 2012-10-25  Joseph Myers  <joseph@codesourcery.com>
198         * Makefile ($(objpfx)tst-tls6.out): Use $(BASH) not $(SHELL) to
199         run tst-tls6.sh.
200         * tst-tls6.sh: Use /bin/bash not /bin/sh.
202 2012-10-25  Roland McGrath  <roland@hack.frob.com>
204         * tst-basic2.c (do_test): Return RESULT, not always zero.
206         * tst-cond25.c: Include <stdint.h>
207         (waiter): Add casts to uintptr_t between casting integer<->pointer.
208         (timed_waiter): Likewise.
209         (do_test_wait): Likewise.
210         * tst-cond-except.c (thr): Likewise.
211         (do_test): Use prototype definition.
213 2012-10-24  Joseph Myers  <joseph@codesourcery.com>
214             Jim Blandy  <jimb@codesourcery.com>
216         * Makefile ($(objpfx)tst-tls6.out): Pass $(test-wrapper-env) to
217         tst-tls6.sh.
218         * tst-tls6.sh (test_wrapper_env): New variable.  Use it to run
219         programs with LD_PRELOAD set.
221 2012-10-24  Roland McGrath  <roland@hack.frob.com>
223         * Makefile ($(objpfx)tst-cond11, $(objpfx)tst-cond19): Targets removed.
224         ($(objpfx)tst-sem5, $(objpfx)tst-cancel18): Likewise.
225         ((objpfx)tst-cancelx18, $(objpfx)tst-clock2): Likewise.
226         ($(objpfx)tst-rwlock14): Likewise.
228 2012-10-24  Joseph Myers  <joseph@codesourcery.com>
230         * Makefile (tests): Remove tst-oddstacklimit.
231         (test-srcs): New variable.
232         (tst-oddstacklimit-ENV): Remove.
233         [$(run-built-tests) = yes] (tests): Depend on
234         $(objpfx)tst-oddstacklimit.out.
235         [$(run-built-tests) = yes] ($(objpfx)tst-oddstacklimit.out): New
236         target.
237         * tst-oddstacklimit.c: Do not include "tst-basic1.c".  Use
238         setrlimit before executing tst-basic1 test passed to --command.
240 2012-10-23  Joseph Myers  <joseph@codesourcery.com>
242         * Makefile [$(cross-compiling) = no]: Change condition to
243         [$(run-built-tests) = yes].
245 2012-10-23  Jim Blandy  <jimb@codesourcery.com>
246             Joseph Myers  <joseph@codesourcery.com>
248         * Makefile (tst-cancel7-ARGS): Use $(host-built-program-cmd).
249         (tst-exec4-ARGS): Likewise.
250         (tst-stackguard1-ARGS): Likewise.
252 2012-10-21  Jim Blandy  <jimb@codesourcery.com>
253             Joseph Myers  <joseph@codesourcery.com>
255         * Makefile ($(objpfx)tst-cancel-wrappers.out): Pass $(NM) to
256         tst-cancel-wrappers.sh.
257         * tst-cancel-wrappers.sh: Use nm program given as first argument,
258         not hardcoded "nm".
260 2012-10-17  Siddhesh Poyarekar  <siddhesh@redhat.com>
262         * tst-cond25.c (do_test_wait): Don't check for return value from
263         pthread_cancel.
265 2012-10-16  Siddhesh Poyarekar  <siddhesh@redhat.com>
267         [BZ #14652]
268         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
269         (__condvar_tw_cleanup):  Adjust the mutex data structure if it
270         was locked by FUTEX_WAIT_REQUEUE_PI.
271         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait
272         (__condvar_w_cleanup): Likewise.
273         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
274         (__condvar_cleanup2): Likewise.
275         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
276         (__condvar_cleanup1): Likewise.
278 2012-10-10  Carlos O'Donell  <carlos@systemhalted.org>
280         * sysdeps/pthread/pthread.h [!(defined __GNUC__ &&
281         defined __EXCEPTIONS) && defined __USE_GNU]
282         (pthread_cleanup_push_defer_np): Fix formatting.
284 2012-10-10  Siddhesh Poyarekar  <siddhesh@redhat.com>
286         [BZ #14652]
287         * Makefile (tests): New test case tst-cond25.
288         (LDFLAGS-tst-cond25): Link tst-cond25 against librt.
289         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
290         (__condvar_tw_cleanup): Lock mutex only if we don't already
291         own it.
292         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
293         (__condvar_w_cleanup): Likewise.
294         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add TID_MASK.
295         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
296         (__condvar_cleanup2): Lock mutex only if we don't already
297         own it.
298         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
299         (__condvar_cleanup1): Likewise.
300         * tst-cond25.c: New test case.
302 2012-10-09  Roland McGrath  <roland@hack.frob.com>
304         * sysdeps/pthread/configure: Regenerated.
305         * sysdeps/x86_64/configure: Regenerated.
307 2012-10-05  David S. Miller  <davem@davemloft.net>
309         [BZ #14568]
310         * sysdeps/sparc/tls.h (DB_THREAD_SELF_INCLUDE): Delete.
311         (DB_THREAD_SELF): Use constants for the register offsets.  Correct
312         the case of a 64-bit debugger with a 32-bit inferior.
314 2012-10-05  H.J. Lu  <hongjiu.lu@intel.com>
316         [BZ #14557]
317         * Makefile (tests-static): Add tst-cancel24-static,
318         tst-cond8-static tst-mutex8-static, tst-mutexpi8-static,
319         tst-sem11-static and tst-sem12-static.
320         (tests): Likewise.
321         (LDLIBS-tst-cancel24-static): New macro.
322         * tst-cancel24-static.cc: New file.
323         * tst-cond8-static.c: Likewise.
324         * tst-mutex8-static.c: Likewise.
325         * tst-mutexpi8-static.c: Likewise.
326         * tst-sem11-static.c: Likewise.
327         * tst-sem12-static.c: Likewise.
329 2012-10-05  Siddhesh Poyarekar  <siddhesh@redhat.com>
331         [BZ #14417]
332         * Makefile (tests): New test case tst-cond24.
333         (LDFLAGS-tst-cond24): Link tst-cond24 against librt.
334         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
335         (__pthread_cond_timedwait): Unlock mutex before going back to
336         wait in PI case.
337         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
338         (__pthread_cond_wait): Likewise.  Revert handling of EAGAIN
339         return from futex_wait.
340         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
341         (__pthread_cond_timedwait): Unlock mutex before going back to
342         wait in PI case.  Set requeue_pi flag only if wait returned 0.
343         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
344         (__pthread_cond_wait): Likewise.  Revert handling of EAGAIN
345         return from futex_wait.
346         * tst-cond24.c: New test case.
348 2012-10-04  Roland McGrath  <roland@hack.frob.com>
350         * pthread_create.c (start_thread): Use __madvise, not madvise.
352 2012-10-02  H.J. Lu  <hongjiu.lu@intel.com>
354         * sysdeps/i386/tls.h: Update copyright years.
356 2012-10-02  Siddhesh Poyarekar  <siddhesh@redhat.com>
358         * pthread_create.c (start_thread): Fix clone flag name in
359         comment to CLONE_CHILD_CLEARTID.
360         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
361         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
362         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
363         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
364         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
365         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
367 2012-10-01  Siddhesh Poyarekar  <siddhesh@redhat.com>
369         [BZ #14477]
370         * Makefile (tests): Add tst-cond-except.
371         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
372         (__pthread_cond_timedwait): Mark instructions where %ebx is
373         incremented in PI case.
374         (.gcc_except_table): Add entry to jump to __condvar_tw_cleanup2
375         for the marked PI case instructions.
376         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
377         (__pthread_cond_wait): Mark instructions where %ebx is
378         incremented in PI case.
379         (.gcc_except_table): Add entry to jump to __condvar_w_cleanup2
380         for the marked PI case instructions.
381         * tst-cond-except.c: New test case.
383 2012-09-24  Dmitry V. Levin  <ldv@altlinux.org>
385         * tst-tls6.sh: Add "set -e".
386         * Makefile: Do not specify -e option when running testsuite
387         shell scripts.
389         * tst-tls6.sh: Add copyright header.
391 2012-09-24  H.J. Lu  <hongjiu.lu@intel.com>
393         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Add "()" when casting
394         to uint64_t for 64-bit store.
395         (THREAD_SETMEM_NC): Likewise.
397 2012-09-19  H.J. Lu  <hongjiu.lu@intel.com>
399         * sysdeps/i386/tls.h (THREAD_SETMEM): Cast to uint64_t for
400         64-bit store.
401         (THREAD_SETMEM_NC): Likewise.
403 2012-09-14  Jeff Law  <law@redhat.com>
405         [BZ #14583]
406         * sysdeps/pthread/pthread.h: Fix prototype of __sigsetjmp.
408 2012-09-13  H.J. Lu  <hongjiu.lu@intel.com>
410         [BZ #14576]
411         * sysdeps/pthread/bits/libc-lockP.h (__rtld_lock_init_recursive):
412         Removed.
414 2012-09-07  H.J. Lu  <hongjiu.lu@intel.com>
416         * Makefile (LDFLAGS-tst-cancel24): Renamed to ...
417         (LDLIBS-tst-cancel24): This.
419 2012-09-06  H.J. Lu  <hongjiu.lu@intel.com>
421         [BZ #14545]
422         * Makefile (tests-static): Add tst-cancel21-static.
423         (tests): Likewise.
424         * tst-cancel21-static.c: New file.
426 2012-09-01  Joseph Myers  <joseph@codesourcery.com>
428         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
429         [!__ASSUME_POSIX_CPU_TIMERS]: Remove conditional code.
430         [__NR_clock_getres]: Make code unconditional.
431         (pthread_getcpuclockid): Remove code left unreachable by removal
432         of conditionals.
434 2012-08-31  Joseph Myers  <joseph@codesourcery.com>
436         [BZ #14532]
437         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Use
438         atomic_compare_and_exchange_bool_rel.
439         * tst-sem14.c: New file.
440         * Makefile (tests): Add tst-sem14.
442 2012-08-15  Roland McGrath  <roland@hack.frob.com>
444         * Makefile (CFLAGS-flockfile.c): Use $(libio-mtsafe) instead
445         of -D_IO_MTSAFE_IO.
446         (CFLAGS-ftrylockfile.c, CFLAGS-funlockfile.c): Likewise.
447         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-fork.c): Likewise.
449 2012-08-16  Joseph Myers  <joseph@codesourcery.com>
451         * pthread_cond_timedwait.c (__pthread_cond_timedwait)
452         [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
453         * pthread_condattr_setclock.c (pthread_condattr_setclock)
454         [!__ASSUME_POSIX_TIMERS]: Likewise.
455         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
456         (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
457         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
458         [!__ASSUME_POSIX_TIMERS]: Likewise.
459         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
460         (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
461         * sysdeps/unix/sysv/linux/timer_create.c [__NR_timer_create]: Make
462         code unconditional.
463         [!__NR-timer_create]: Remove conditional code.
464         (timer_create) [!__ASSUME_POSIX_TIMERS]: Likewise.
465         * sysdeps/unix/sysv/linux/timer_delete.c [__NR_timer_delete]: Make
466         code unconditional.
467         [!__NR_timer_delete]: Remove conditional code.
468         (timer_delete) [!__ASSUME_POSIX_TIMERS]: Likewise.
469         * sysdeps/unix/sysv/linux/timer_getoverr.c
470         [__NR_timer_getoverrun]: Make code unconditional.
471         [!__NR_timer_getoverrun]: Remove conditional code.
472         (timer_getoverrun) [!__ASSUME_POSIX_TIMERS]: Likewise.
473         * sysdeps/unix/sysv/linux/timer_gettime.c [__NR_timer_gettime]:
474         Make code unconditional.
475         [!__NR_timer_gettime]: Remove conditional code.
476         (timer_gettime) [!__ASSUME_POSIX_TIMERS]: Likewise.
477         * sysdeps/unix/sysv/linux/timer_routines.c [__NR_timer_create]:
478         Make code unconditional.
479         [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
480         * sysdeps/unix/sysv/linux/timer_settime.c [__NR_timer_settime]:
481         Make code unconditional.
482         [!__NR_timer_settime]: Remove conditional code.
483         (timer_settime) [!__ASSUME_POSIX_TIMERS]: Likewise.
484         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
485         (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Remove
486         conditional code.
488 2012-08-15  Tom de Vries  <vries@codesourcery.com>
489             Maxim Kuvyrkov  <maxim@codesourcery.com>
491         * sysdeps/pthread/bits/libc-lockP.h (__libc_lock_lock)
492         (__libc_lock_trylock): Allow pre-existing definitions.
494 2012-08-15  Maxim Kuvyrkov  <maxim@codesourcery.com>
496         * pthread_spin_lock.c: New file.
497         * pthread_spin_trylock.c: New file.
499 2012-08-08  Joseph Myers  <joseph@codesourcery.com>
501         * allocatestack.c (setxid_signal_thread) [__ASSUME_TGKILL]: Make
502         code unconditional.
503         (setxid_signal_thread) [!__ASSUME_TGKILL]: Remove conditional code.
504         * pthread_cancel.c (pthread_cancel) [__ASSUME_TGKILL]: Make code
505         unconditional.
506         (pthread_cancel) [!__ASSUME_TGKILL]: Remove conditional code.
507         * sysdeps/pthread/createthread.c (do_clone) [__ASSUME_TGKILL]:
508         Make code unconditional.
509         (do_clone) [!__ASSUME_TGKILL]: Remove conditional code.
510         * sysdeps/unix/sysv/linux/pt-raise.c (raise) [__ASSUME_TGKILL ||
511         __NR_tgkill]: Make code unconditional.
512         (raise) [__ASSUME_TGKILL]: Likewise.
513         (raise) [!__ASSUME_TGKILL]: Remove conditional code.
514         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill)
515         [__ASSUME_TGKILL]: Make code unconditional.
516         (__pthread_kill) [!__ASSUME_TGKILL]: Remove conditional code.
517         * sysdeps/unix/sysv/linux/raise.c (raise) [__ASSUME_TGKILL ||
518         __NR_tgkill]: Make code unconditional.
519         (raise) [__ASSUME_TGKILL]: Likewise.
520         (raise) [!__ASSUME_TGKILL]: Remove conditional code.
522 2012-08-07  Joseph Myers  <joseph@codesourcery.com>
524         * sysdeps/pthread/createthread.c (create_thread)
525         [!__ASSUME_NO_CLONE_DETACHED]: Remove conditional code.
527 2012-08-03  Joseph Myers  <joseph@codesourcery.com>
529         * nptl-init.c (sigcancel_handler) [__ASSUME_CORRECT_SI_PID]: Make
530         code unconditional.
531         (sighandler_setxid) [__ASSUME_CORRECT_SI_PID]: Likewise.
533 2012-07-28  Siddhesh Poyarekar  <siddhesh@redhat.com>
535         * tst-pthread-getattr.c (MAX_STACK_SIZE): New macro.
536         (pagesize): New static variable.
537         (allocate_and_test): Return MEM.  Rename parameter to TARGET.
538         (check_stack_top): New local variables MEM and PAGEMASK.  Cap
539         stack size to MAX_STACK_SIZE.  Call allocate_and_test for
540         halfway up the stack top page.  Verify that the top page was
541         written into.
542         (do_test): Get pagesize using sysconf.
544 2012-07-25  Andreas Schwab  <schwab@linux-m68k.org>
546         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Remove pseudo_end
547         label.
548         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Likewise.
549         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO):
550         Likewise.
552 2012-07-25  Siddhesh Poyarekar  <siddhesh@redhat.com>
554         * tst-pthread-getattr.c: Revert last change.
556 2012-07-20  Siddhesh Poyarekar  <siddhesh@redhat.com>
558         * tst-pthread-getattr.c (MAX_STACK_SIZE): New max cap for stack
559         size.
560         (_MIN): New macro.
561         (allocate_and_test): Return STACKADDR.  Access STACKADDR instead
562         of MEM to test.
563         (check_stack_top): Read valued written into STACKADDR in
564         allocate_and_test.  Cap stack size to MAX_STACK_SIZE.
566 2012-07-19  Siddhesh Poyarekar  <siddhesh@redhat.com>
568         * nptl-init.c (sighandler_setxid): Fix the comment that
569         describes it.
571 2012-06-23  Thomas Schwinge  <thomas@codesourcery.com>
573         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
574         (__lll_robust_timedlock_wait): Simplify CFI directives.
576 2012-06-20  Siddhesh Poyarekar  <siddhesh@redhat.com>
578         [BZ #12416]
579         * Makefile (tests): Add test case.
580         * pthread_getattr_np.c (pthread_getattr_np): Deduct pages below
581         the __libc_stack_end page from stacksize.  Truncate stacksize to
582         make it page aligned when it is computed from RLIMIT_STACK.
583         * tst-pthread-getattr.c: New test case. Verify that stackaddr is
584         accessible.
586 2012-06-07  Carlos Sánchez de La Lama  <csanchezdll@gmail.com>
588         [BZ #14205]
589         * sysdeps/sparc/sparc32/pthread_spin_lock.S: Do not use v9
590         branches.
592 2012-06-04  Siddhesh Poyarekar  <siddhesh@redhat.com>
593             Jakub Jelinek  <jakub@redhat.com>
595         [BZ #14188]
596         * sysdeps/pthread/pthread.h
597         [!(defined __GNUC__ && defined __EXCEPTIONS)]
598         (pthread_cleanup_push, pthread_cleanup_push_defer_np): Use
599         __libc_unlikely instead of __builtin_expect.
601 2012-05-30  H.J. Lu  <hongjiu.lu@intel.com>
603         [BZ #14117]
604         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Removed.
605         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
606         * sysdeps/unix/sysv/linux/i386/Implies: New file.
607         * sysdeps/unix/sysv/linux/x86_64/Implies: Likewise.
608         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Renamed
609         to ...
610         * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: This.
611         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Renamed
612         to ...
613         * sysdeps/unix/sysv/linux/x86/bits/semaphore.h: This.
615 2012-05-30  Andreas Schwab  <schwab@linux-m68k.org>
617         [BZ #14132]
618         * nptl-init.c (pthread_functions): Remove use of INTUSE and
619         _internal aliases.
620         (__pthread_initialize_minimal_internal): Likewise.
621         * sem_open.c: Likewise.
622         * sem_unlink.c: Likewise.
623         * pthreadP.h: Replace _internal aliases by hidden_proto
624         declarations.
625         * pthread_getspecific.c: Replace _internal alias by hidden_def.
626         * pthread_key_create.c: Likewise.
627         * pthread_mutex_destroy.c: Likewise.
628         * pthread_mutex_init.c: Likewise.
629         * pthread_mutex_lock.c: Likewise.
630         * pthread_mutex_unlock.c: Likewise.
631         * pthread_once.c: Likewise.
632         * pthread_rwlock_rdlock.c: Likewise.
633         * pthread_rwlock_unlock.c: Likewise.
634         * pthread_rwlock_wrlock.c: Likewise.
635         * pthread_setspecific.c: Likewise.
636         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
637         Likewise.
638         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
639         Likewise.
640         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
641         Likewise.
642         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
643         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
644         * sysdeps/unix/sysv/linux/s390/pthread_once.c: Likewise.
645         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
646         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
647         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
648         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
649         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
650         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
651         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
652         Likewise.
653         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
654         Likewise.
655         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
656         Likewise.
658 2012-05-27  Chung-Lin Tang  <cltang@codesourcery.com>
660         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO, LOAD_ARGS_1)
661         (LOAD_ARGS_2 ,LOAD_ARGS_3 ,LOAD_ARGS_4): Add CFI restores.
663         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_lock_wait_private)
664         (__lll_lock_wait, __lll_timedlock_wait, __lll_timedwait_tid): Add CFI
665         directives.
666         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
667         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Likewise.
668         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
669         (pthread_barrier_wait): Likewise.
670         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
671         (__pthread_cond_broadcast): Likewise.
672         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
673         (__pthread_cond_signal): Likewise.
674         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
675         (__pthread_cond_timedwait): Likewise.
676         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S (__pthread_cond_wait):
677         Likewise.
678         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S
679         (__pthread_rwlock_rdlock): Likewise.
680         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
681         (pthread_rwlock_timedrdlock): Likewise.
682         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
683         (pthread_rwlock_timedwrlock): Likewise.
684         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
685         (__pthread_rwlock_unlock): Likewise.
686         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S
687         (__pthread_rwlock_wrlock): Likewise.
688         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post): Likewise.
689         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
690         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
691         Likewise.
692         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
694 2012-05-26  Siddhesh Poyarekar  <siddhesh@redhat.com>
696         [BZ #12416]
697         * nptl/pthread_getattr_np.c (pthread_getattr_np): Use
698         __libc_stack_end rounded to the end of containing page as the
699         real stack end.
701 2012-05-25  Rayson Ho  <rho@redhat.com>
703         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Low-level SystemTap
704         probes for i386.
705         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
706         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
707         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
708         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
709         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
710         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
711         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
712         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
714 2012-05-25  Rayson Ho  <rho@redhat.com>
715             Roland McGrath  <roland@hack.frob.com>
717         * DESIGN-systemtap-probes.txt: New file.
718         * pthread_cond_broadcast.c: SystemTap probes.
719         * pthread_cond_init.c: Likewise.
720         * pthread_cond_signal.c: Likewise.
721         * pthread_cond_wait.c: Likewise.
722         * pthread_cond_destroy.c: Likewise.
723         * pthread_create.c: Likewise.
724         * pthread_join.c: Likewise.
725         * pthread_mutex_destroy.c: Likewise.
726         * pthread_mutex_init.c: Likewise.
727         * pthread_mutex_lock.c: Likewise.
728         * pthread_mutex_timedlock.c: Likewise.
729         * pthread_mutex_unlock.c: Likewise.
730         * pthread_rwlock_destroy.c: Likewise.
731         * pthread_rwlock_rdlock.c: Likewise.
732         * pthread_rwlock_unlock.c: Likewise.
733         * pthread_rwlock_wrlock.c: Likewise.
734         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
735         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
736         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
737         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
738         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
739         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
740         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
741         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
743 2012-05-24  Roland McGrath  <roland@hack.frob.com>
745         * pthread_create.c (start_thread): Define pthread_start LIBC_PROBE.
747 2012-05-17  Andreas Jaeger  <aj@suse.de>
749         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
750         (HAVE_DL_DISCOVER_OSVERSION): Don't declare _dl_discover_osversion
751         only for older kernels.
753 2012-05-15  Joseph Myers  <joseph@codesourcery.com>
755         * pthreadP.h [!__NR_set_robust_list] (__NR_set_robust_list): Do
756         not define.
758 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
760         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_lock): Load
761         futex pointer into RDI_LP.  Use RSP_LP to operate on stack.
762         (lll_robust_lock): Likewise.
763         (lll_cond_lock): Likewise.
764         (lll_robust_cond_lock): Likewise.
765         (lll_timedlock): Likewise.
766         (lll_robust_timedlock): Likewise.
767         (lll_unlock): Likewise.
768         (lll_robust_unlock): Likewise.
770 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
772         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use
773         LP_OP(cmp) and RCX_LP on dep_mutex pointer.
775 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
777         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Use LP_OP(op)
778         on NWAITERS.
779         (__gcc_personality_v0): Replace 8-byte data alignment with
780         LP_SIZE alignment and .quad with ASM_ADDR.
782 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
784         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Use LP_OP(op)
785         on NWAITERS.
786         (__gcc_personality_v0): Replace 8-byte data alignment with
787         LP_SIZE alignment and .quad with ASM_ADDR.
789 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
791         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Use LP_OP(cmp) on
792         NWAITERS, which is unsigned long int.
794 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
796         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
797         (__gcc_personality_v0): Replace 8-byte data alignment with
798         LP_SIZE alignment and .quad with ASM_ADDR.
800 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
802         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Use
803         LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer.  Load
804         __vdso_clock_gettime pointer into RAX_LP.
805         (__gcc_personality_v0): Replace 8-byte data alignment with
806         LP_SIZE alignment and .quad with ASM_ADDR.
808 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
810         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Use
811         LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer.  Load
812         __vdso_clock_gettime pointer into RAX_LP.
813         (__gcc_personality_v0): Replace 8-byte data alignment with
814         LP_SIZE alignment and .quad with ASM_ADDR.
816 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
818         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Use
819         LP_OP(cmp) and R8_LP on dep_mutex pointer.
821 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
823         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Use LP_OP(mov)
824         to update pointer in memory.  Load pointer into RDI_LP.
826 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
828         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
829         (LLL_STUB_UNWIND_INFO_START): Align label to LP_SIZE instead
830         of 8.
831         (LLL_STUB_UNWIND_INFO_END): Likewise.
832         (lll_timedlock): Load timeout pointer into RDX_LP.
833         (lll_robust_timedlock): Likewise.
835 2012-05-15  Siddhesh Poyarekar  <siddhesh@redhat.com>
836             Jakub Jelinek  <jakub@redhat.com>
838         [BZ #13613]
839         * Makefile (tests): Add test cases.
840         * descr.h (struct pthread): Add a comment describing multiple_threads.
841         * pthreadP.h (__pthread_multiple_threads): Expand comment to include
842         single-process case.
843         * pthread_cancel.c (pthread_cancel): Enable multiple_threads
844         before setting cancelstate of the thread.
845         * sysdeps/unix/sysv/linux/libc_multiple_threads.c
846         (__libc_multiple_threads): Add explanatory comment.
847         * tst-cancel-self-cancelstate.c: New test case.
848         * tst-cancel-self-canceltype.c: Likewise.
849         * tst-cancel-self-cleanup.c: Supporting file for test cases.
850         * tst-cancel-self-testcancel.c: New test case.
851         * tst-cancel-self.c: Likewise.
852         * vars.c: Expand comment to include single-process case.
854 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
856         * sysdeps/x86_64/tls.h: Don't include <bits/wordsize.h>.
857         (tcbhead_t): Remove __x86_64__ check.  Align rtld_savespace_sse
858         to 32 bytes.
860 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
862         * sysdeps/pthread/pthread.h (__PTHREAD_RWLOCK_INT_FLAGS_SHARED):
863         New.
864         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Check
865         __PTHREAD_RWLOCK_INT_FLAGS_SHARED instead of __WORDSIZE.
867 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
869         * shlib-versions: Move x86_64-.*-linux.* entry to ...
870         * sysdeps/x86_64/64/shlib-versions: Here.  New file.
871         * sysdeps/x86_64/x32/shlib-versions: New file.
873 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
875         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Define x32
876         __SIZEOF_PTHREAD_XXX_T.
877         (__pthread_internal_list): Check __x86_64__ instead of __WORDSIZE.
878         (pthread_mutex_t): Likewise.
879         (pthread_rwlock_t): Likewise.
880         (__PTHREAD_RWLOCK_INT_FLAGS_SHARED): New.  Defined if __x86_64__
881         is defined.
883 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
885         * sysdeps/x86_64/x32/tls.h: New file.
887 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
889         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Use uint64_t on 64-bit
890         integer.
891         (THREAD_SETMEM_NC): Likewise.
893 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
895         * sysdeps/x86_64/tls.h (THREAD_SELF): Replace movq/%q0 with
896         mov/%0.
898 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
900         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
901         (__cleanup_fct_attribute): Check __x86_64__ instead of
902         __WORDSIZE.
904 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
906         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER): Check
907         __PTHREAD_MUTEX_HAVE_PREV instead of __WORDSIZE.
908         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Likewise.
909         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
910         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
912 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
914         * pthread_create.c (start_thread): Check __PTHREAD_MUTEX_HAVE_PREV
915         instead of __WORDSIZE.
917 2012-05-10  Thomas Schwinge  <thomas@schwinge.name>
919         [BZ #3748]
920         * sysdeps/pthread/bits/libc-lockP.h (__libc_once_get): New macro.
922 2012-05-09  Chung-Lin Tang  <cltang@codesourcery.com>
924         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
925         (__pthread_cond_timedwait): Use CFI directives.
926         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
927         (__pthread_cond_wait): Likewise.
928         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
929         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
931 2012-05-03  David S. Miller  <davem@davemloft.net>
933         * sysdeps/sparc/sparc64/pthread_spin_unlock.S: Fix thinko, we
934         always have to return 0, especially for the pthread_spin_init
935         alias.
936         * sysdeps/sparc/sparc32/pthread_spin_lock.S: Add missing trailing
937         newline.
938         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: Likewise.
939         * sysdeps/sparc/sparc64/pthread_spin_lock.S: Likewise.
941 2012-05-02  David S. Miller  <davem@davemloft.net>
943         * sysdeps/sparc/sparc64/pthread_spin_lock.S: New.
944         * sysdeps/sparc/sparc64/pthread_spin_lock.c: Delete.
945         * sysdeps/sparc/sparc64/pthread_spin_unlock.S: New.
946         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: Delete.
947         * sysdeps/sparc/sparc64/pthread_spin_trylock.S: New.
948         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: Delete.
949         * sysdeps/sparc/sparc64/pthread_spin_init.c: New.
950         * sysdeps/sparc/sparc32/pthread_spin_lock.S: New.
951         * sysdeps/sparc/sparc32/pthread_spin_lock.c: Delete.
952         * sysdeps/sparc/sparc32/pthread_spin_trylock.S: New.
953         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: Delete.
954         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: New.
955         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: Delete.
956         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.S: New.
957         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: Delete.
958         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.S: New.
959         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: Delete.
960         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_init.c: New.
962 2012-05-02  Allan McRae  <allan@archlinux.org>
964         * Makefile: (LDFLAGS-tst-tls5): Use $(no-as-needed).
965         (LDFLAGS-tst-cancel24): Likewise.
967 2012-05-02  Paul Pluzhnikov  <ppluzhnikov@google.com>
969         * sysdeps/i386/pthread_spin_lock.S: New.
970         * sysdeps/i386/pthread_spin_lock.c: Delete.
971         * sysdeps/x86_64/pthread_spin_lock.S: New.
972         * sysdeps/x86_64/pthread_spin_lock.c: Delete.
974 2012-04-28  Andreas Schwab  <schwab@linux-m68k.org>
976         * Makefile ($(objpfx)tst-stack3-mem, $(objpfx)tst-tls6.out): Don't
977         run when cross-compiling.
979 2012-04-26  Siddhesh Poyarekar  <siddhesh@redhat.com>
981         * sysdeps/pthread/unwind-forcedunwind.c: Include gnu/lib-names.h
982         instead of libgcc_s.h.
984 2012-04-20  Paul Pluzhnikov  <ppluzhnikov@google.com>
986         * sysdeps/x86_64/tls.h (TLS_GET_FS, TLS_SET_FS): Delete.
988 2012-03-27  David S. Miller  <davem@davemloft.net>
990         * tst-cond16.c (do_test): Use a thread stack size which is either
991         PTHREAD_STACK_MIN or the page size, whichever is larger.
992         * tst-cond18.c (do_test): Likewise.
994 2012-03-19  H.J. Lu  <hongjiu.lu@intel.com>
996         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Use
997         register char * __asm__("rsp") to get stack frame.
999 2012-03-19  H.J. Lu  <hongjiu.lu@intel.com>
1001         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (SYS_futex): Use
1002         __NR_futex directly.
1004 2012-03-19  H.J. Lu  <hongjiu.lu@intel.com>
1006         * unwind.c (unwind_stop): Cast _Unwind_GetCFA return to
1007         _Unwind_Ptr first.
1009 2012-03-16  David S. Miller  <davem@davemloft.net>
1011         [BZ #13844]
1012         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: Include using <..>
1013         instead of "...".
1014         * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c:
1015         Delete, not needed.
1017 2012-03-15  David S. Miller  <davem@davemloft.net>
1019         [BZ #13844]
1020         * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c: New file.
1022 2012-03-09  Paul Eggert  <eggert@cs.ucla.edu>
1024         [BZ #13673]
1025         * pt-crti.S: Replace FSF snail mail address with URL.
1027 2012-03-09  Joseph Myers  <joseph@codesourcery.com>
1029         * sysdeps/pthread/pthread.h (__need_clockid_t, __need_timespec):
1030         Do not define before including <time.h>.
1032 2012-03-08  David S. Miller  <davem@davemloft.net>
1034         * sysdeps/unix/sysv/linux/sparc/sem_post.c: Update copyright year.
1036 2012-03-08  Thomas Schwinge  <thomas@codesourcery.com>
1038         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1039         Check for timestamp before the Epoch.
1041         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Fix
1042         updating nwaiters.
1044         * tst-sem13.c (do_test): Add another test case.
1045         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1046         Fix updating nwaiters.
1048 2012-03-07  Joseph Myers  <joseph@codesourcery.com>
1050         [BZ #10545]
1051         * sysdeps/pthread/configure.in (libc_cv_forced_unwind): Change
1052         link test to a compile test.
1053         (libc_cv_c_cleanup): Likewise.  Declare puts rather than including
1054         <stdio.h>.
1055         * sysdeps/pthread/configure: Regenerated.
1057 2012-03-07  Ulrich Drepper  <drepper@gmail.com>
1059         * Makefile (distribute): Remove variable.
1061 2012-01-23  Thomas Schwinge  <thomas@codesourcery.com>
1063         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Get rid of
1064         superfluous assignment.
1065         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c (sem_timedwait):
1066         Likewise.
1067         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
1068         (sem_timedwait): Likewise.
1070 2012-03-06  Ulrich Drepper  <drepper@gmail.com>
1072         * sysdeps/pthread/bits/libc-lock.h: Move information not needed in
1073         installed headers to...
1074         * sysdeps/pthread/bits/libc-lockP.h: ...here.  New file.
1076 2012-03-06  David S. Miller  <davem@davemloft.net>
1078         * sysdeps/unix/sysv/linux/sparc/sem_post.c (__new_sem_post): Use
1079         atomic_increment and remove unused local variable.
1080         (__old_sem_post): Likewise.
1082 2012-02-27  David S. Miller  <davem@davemloft.net>
1084         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Don't refer to
1085         non-existing __pthread_attr.
1086         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1087         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1088         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1089         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1090         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1092 2012-02-26  Ulrich Drepper  <drepper@gmail.com>
1094         * sysdeps/pthread/pthread.h: Define __need_clockid_t for __USE_XOPEN2K.
1096         * sysdeps/pthread/pthread.h: Define __need_timespec before including
1097         <time.h>.
1098         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Name pthread_attr_t
1099         union.
1100         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1101         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1102         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1103         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1104         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1106 2012-02-21  Joseph Myers  <joseph@codesourcery.com>
1108         [BZ #13695]
1109         * Makefile (generated): Remove crti.S, crtn.S, defs.h and
1110         pt-initfini.s.
1111         [crti.S not in sysdirs] (omit-deps): Do not append.
1112         [crti.S not in sysdirs] (CFLAGS-pt-initfini.s): Remove variable.
1113         [crti.S not in sysdirs] (pt-initfini.c): Remove vpath directive.
1114         [crti.S not in sysdirs] ($(objpfx)crti.S): Remove rule.
1115         [crti.S not in sysdirs] ($(objpfx)crtn.S): Likewise.
1116         [crti.S not in sysdirs] ($(objpfx)defs.h): Likewise.
1117         [crti.S not in sysdirs] ($(objpfx)crti.o): Likewise.
1118         [crti.S not in sysdirs] ($(objpfx)crtn.o): Likewise.
1119         [crti.S in sysdirs] (extra-objs): Append unconditionally.
1120         [crti.S in sysdirs] ($(objpfx)crti.o): Define rule
1121         unconditionally.
1122         * sysdeps/pthread/pt-initfini.c: Remove file.
1124 2012-02-16  Richard Henderson  <rth@twiddle.net>
1126         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Remove file.
1127         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Remove file.
1129 2012-02-15  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1131         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Remove file.
1133 2012-02-16  David S. Miller  <davem@davemloft.net>
1135         * sysdeps/sparc/Makefile: Add -fPIC when building pt-crti.S and crtn.S
1137 2012-02-15  Marek Polacek  <polacek@redhat.com>
1139         * sysdeps/unix/sysv/linux/x86_64/Makefile: Remove file.
1141 2012-02-09  Paul Eggert  <eggert@cs.ucla.edu>
1143         Replace FSF snail mail address with URLs, as per GNU coding standards.
1145 2012-02-08  Andreas Schwab  <schwab@linux-m68k.org>
1147         * Makefile (extra-objs) [crti.S in sysdirs]: Add pt-crti.o.
1149 2012-02-08  Joseph Myers  <joseph@codesourcery.com>
1151         Support crti.S and crtn.S provided directly by architectures.
1152         * Makefile [crti.S in sysdirs] (omit-deps): Do not append.
1153         [crti.S in sysdirs] (CFLAGS-pt-initfini.s): Do not define variable.
1154         [crti.S in sysdirs] ($(objpfx)pt-initfini.s): Disable rule.
1155         [crti.S in sysdirs] ($(objpfx)crti.S): Likewise.
1156         [crti.S in sysdirs] ($(objpfx)crtn.S): Likewise.
1157         [crti.S in sysdirs] ($(objpfx)defs.h): Likewise.
1158         [crti.S in sysdirs] ($(objpfx)crti.o): Likewise.
1159         [crti.S in sysdirs] ($(objpfx)crtn.o): Likewise.
1160         [crti.S in sysdirs] (pt-initfini.c): Remove vpath directive.
1161         [crti.S in sysdirs] ($(objpfx)crti.o): New rule.
1162         * pt-crti.S: New file.
1163         * sysdeps/unix/sysv/linux/i386/Makefile: Remove file.
1165 2012-02-03  Joseph Myers  <joseph@codesourcery.com>
1167         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
1168         macros for PIC register setup.
1169         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1170         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1171         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1172         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1173         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1175 2012-01-11  Marek Polacek  <polacek@redhat.com>
1177         * forward.c (FORWARD_NORETURN): Define macro.
1178         (__pthread_unwind): Use FORWARD_NORETURN macro to avoid warning.
1179         (__pthread_exit): Likewise.
1181 2012-01-10  Ulrich Drepper  <drepper@gmail.com>
1183         * sysdeps/pthread/pthread.h: Add const attribute to pthread_equal.
1185         * pthreadP.h: Add noreturn to __pthread_exit.
1186         * sysdeps/pthread/pthread-functions.h: Likewise for ptr___pthread_exit.
1188 2011-12-30  Adhemerval Zanella  <azanella@linux.vnet.ibm.com>
1190         * sysdeps/unix/sysv/linux/aio_misc.h (__aio_create_helper_thread):
1191         Call pthread_attr_setstacksize() with result of
1192         __pthread_get_minstack() to account for application TLS usage.
1194 2012-01-08  Marek Polacek  <polacek@redhat.com>
1196         * sysdeps/unix/sysv/linux/mq_notify.c: Include <nptl/pthreadP.h>.
1198 2012-01-07  Ulrich Drepper  <drepper@gmail.com>
1200         [BZ #13553]
1201         * pthreadP.h: Use const instead of __const.
1202         * semaphore.h: Likewise.
1203         * sysdeps/pthread/bits/libc-lock.h: Likewise.
1204         * sysdeps/pthread/bits/sigthread.h: Likewise.
1205         * sysdeps/pthread/pthread.h: Likewise.
1207         * Makefile: Remove elf=yes test, only ELF is supported.
1209         * shlib-versions: Remove entries for ports architectures.
1211         In case anyone cares, the IA-64 architecture could move to ports.
1212         * sysdeps/ia64/*: Removed.
1213         * sysdeps/unix/sysv/linux/ia64/*: Removed.
1215 2011-12-22  Ulrich Drepper  <drepper@gmail.com>
1217         * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread): Use
1218         __pthread_get_minstack.
1219         * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Likewise.
1221         [BZ #13088]
1222         * sysdeps/unix/sysv/linux/timer_routines.c: Get minimum stack size
1223         through __pthread_get_minstack.
1224         * nptl-init.c (__pthread_initialize_minimal_internal): Get page size
1225         directly from _rtld_global_ro.
1226         (__pthread_get_minstack): New function.
1227         * pthreadP.h: Declare __pthread_get_minstack.
1228         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_get_minstack.
1230 2011-12-21  Ulrich Drepper  <drepper@gmail.com>
1232         [BZ #13515]
1233         * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1234         Correct reading name from file.
1236 2011-12-14  Carlos O'Donell  <carlos@systemhalted.org>
1238         * allocatestack.c (allocate_stack): Return errno on failure.
1240 2011-12-14  Jeff Law  <law@redhat.com>
1242         [BZ #5245]
1243         * pthread_create.c (__pthread_create_2_1): Translate ENOMEM to EAGAIN.
1245 2011-11-28  Andreas Schwab  <schwab@redhat.com>
1247         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Handle
1248         EAGAIN from FUTEX_WAIT_REQUEUE_PI.
1249         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1251 2011-11-15  Ulrich Drepper  <drepper@gmail.com>
1253         * pthread_getattr_np.c (pthread_getattr_np): Set FD_CLOEXEC for
1254         /proc/self/maps.
1256 2011-10-29  Ulrich Drepper  <drepper@gmail.com>
1258         [BZ #13358]
1259         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1260         (__pthread_cond_timedwait): Initialize %r15 correctly also for code
1261         path for kernels with FUTEX_CLOCK_REALTIME.
1262         Debugged by H.J. Lu <hjl.tools@gmail.com>.
1264 2011-10-27  Andreas Schwab  <schwab@redhat.com>
1266         [BZ #13344]
1267         * sysdeps/pthread/pthread.h: Use __THREADNL instead of __THREAD
1268         for memory synchronization functions.
1269         * semaphore.h: Likewise.
1271 2011-10-24  Ulrich Drepper  <drepper@gmail.com>
1273         * tst-cancel7.c: Avoid warning.
1274         * tst-mutex6.c: Likewise.
1275         * tst-mutex9.c: Likewise.
1276         * tst-mutexpi6.c: Likewise.
1278 2011-10-23  Ulrich Drepper  <drepper@gmail.com>
1280         * sysdeps/i386/tls.h: Remove #include <list.h>.
1282 2011-10-15  Ulrich Drepper  <drepper@gmail.com>
1284         * pthread_create.c (start_thread): Call __ctype_init.
1286 2011-09-15  Andreas Schwab  <schwab@redhat.com>
1288         * sysdeps/pthread/list.h: Define only list_t if __need_list_t is
1289         defined.
1290         (list_add): Add atomic_write_barrier.
1291         * descr.h: Define __need_list_t before including <list.h>.
1292         * nptl-init.c: Include <list.h>
1293         * allocatestack.c: Likewise.
1295 2011-09-11  Ulrich Drepper  <drepper@gmail.com>
1297         * sysdeps/i386/tls.h: Remove HAVE_TLS_SUPPORT test.
1298         * sysdeps/ia64/tls.h: Likewise.
1299         * sysdeps/powerpc/tls.h: Likewise.
1300         * sysdeps/s390/tls.h: Likewise.
1301         * sysdeps/sh/tls.h: Likewise.
1302         * sysdeps/sparc/tls.h: Likewise.
1303         * sysdeps/x86_64/tls.h: Likewise.
1305 2011-09-10  Ulrich Drepper  <drepper@gmail.com>
1307         * sysdeps/pthread/malloc-machine.h: Define MUTEX_INITIALIZER.
1309         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Don't handle
1310         !USE___THREAD.
1311         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1312         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1313         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1314         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1315         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
1316         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
1317         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
1318         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
1319         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1320         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1321         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
1322         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1324         * tst-tls1.c: Support for __thread is now mandatory.
1325         * tst-tls2.c: Likewise.
1326         * tst-tls3.c: Likewise.
1327         * tst-tls3mod.c: Likewise.
1328         * tst-tls4.c: Likewise.
1329         * tst-tls4moda.c: Likewise.
1330         * tst-tls4modb.c: Likewise.
1331         * tst-tls5.h: Likewise.
1333 2011-09-08  Ulrich Drepper  <drepper@gmail.com>
1335         [BZ #12403]
1336         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1337         (pthread_rwlock_timedwrlock): Use correct macro in test.
1338         Patch by H.J. Lu <hongjiu.lu@intel.com>.
1340 2011-09-06  Ulrich Drepper  <drepper@gmail.com>
1342         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): Don't
1343         use gettimeofday vsyscall, just call gettimeofday.
1344         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1345         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
1346         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1347         Likewise.
1348         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1349         Likewise.
1350         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1351         Simplify __vdso_clock_gettime use.
1353 2011-09-05  David S. Miller  <davem@davemloft.net>
1355         * sysdeps/unix/sysv/linux/sem_timedwait.c (do_futex_timed_wait):
1356         New function.
1357         (sem_timedwait): Call it to force an exception region around
1358         the async cancel enable and the futex operation.
1359         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: Likewise.
1360         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: Likewise.
1361         * sysdeps/unix/sysv/linux/sem_wait.c (do_futex_wait): New function.
1362         (__new_sem_wait): Call it to force an exception region around
1363         the async cancel enable and the futex operation.
1364         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: Likewise.
1365         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: Likewise.
1367 2011-08-31  Andreas Schwab  <schwab@redhat.com>
1369         * allocatestack.c (setxid_mark_thread): Ensure that the exiting
1370         thread is woken up.
1372 2011-08-20  David S. Miller  <davem@davemloft.net>
1374         * Makefile (tst-cleanup0.out): Fix typo in output redirection.
1376 2011-08-14  Roland McGrath  <roland@hack.frob.com>
1378         * sysdeps/i386/pthreaddef.h (TCB_ALIGNMENT): Set to 64, optimal on Atom.
1379         * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Likewise.
1381 2011-08-08  Andreas Schwab  <schwab@redhat.com>
1383         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned
1384         stack.
1385         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1386         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1388 2011-07-22  Ulrich Drepper  <drepper@gmail.com>
1390         * sysdeps/pthread/unwind-forcedunwind.c (_Unwind_Resume): Add read
1391         barrier.
1392         (__gcc_personality_v0): Likewise.
1393         (_Unwind_ForcedUnwind): Likewise.
1394         (_Unwind_GetCFA): Likewise.
1396 2011-07-14  Roland McGrath  <roland@hack.frob.com>
1398         * allocatestack.c (__reclaim_stacks): Use uintptr_t cast rather than
1399         UINTMAX_C.
1401 2011-06-30  Ulrich Drepper  <drepper@gmail.com>
1403         * nptl-init.c (__nptl_set_robust): New function.
1404         (pthread_functions): Add reference.
1405         * npthreadP.h: Declare __nptl_set_robust.
1406         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
1407         ptr_set_robust member.
1408         * sysdeps/unix/sysv/linux/fork.c: Call set_robust_list syscall in
1409         child if threads are used.
1411 2011-06-14  Andreas Jaeger  <aj@suse.de>
1413         * pthread_rwlock_init.c: Include <string.h> for memset declaration.
1415 2011-05-11  Ulrich Drepper  <drepper@gmail.com>
1417         [BZ #386]
1418         * allocatestack.c (allocate_stack): Convert ENOMEM error to EAGAIN.
1420 2011-04-10  Ulrich Drepper  <drepper@gmail.com>
1422         [BZ #12650]
1423         * allocatestack.c (get_cached_stack): Deallocate DTV entries before
1424         clearing memory.
1425         Patch partly by Robert Rex <robert.rex@exasol.com>.
1427 2011-01-19  Roland McGrath  <roland@redhat.com>
1429         * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
1430         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1431         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
1432         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1433         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
1434         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
1436 2011-01-16  Andreas Schwab  <schwab@linux-m68k.org>
1438         * Makefile (test-extras): Add tst-cleanup4aux.
1440 2011-01-14  Ulrich Drepper  <drepper@gmail.com>
1442         [BZ #10563]
1443         * sysdeps/pthread/setxid.h (__SETXID_1): Add cast to assignment.
1444         (__SETXID_2): Likewise.
1445         (__SETXID_3): Likewise.
1447 2011-01-13  Ulrich Drepper  <drepper@gmail.com>
1449         [BZ #10484]
1450         * Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
1451         * alloca_cutoff.c: Add libc_hidden_def.
1453 2010-10-13  H.J. Lu  <hongjiu.lu@intel.com>
1455         [BZ #12113]
1456         * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
1457         * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
1458         of "struct pthread".
1460 2010-09-21  Andreas Schwab  <schwab@redhat.com>
1462         * sysdeps/pthread/pthread.h (pthread_cleanup_push)
1463         [!__EXCEPTIONS]: Mangle local variable not_first_call.
1464         (pthread_cleanup_push_defer_np): Likewise.
1466 2010-09-03  Ulrich Drepper  <drepper@redhat.com>
1468         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are
1469         small.
1471 2010-08-10  Dinakar Guniguntala  <dino@in.ibm.com>
1472             Stefan Hajnoczi  <stefanha@linux.vnet.ibm.com>
1474         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
1475         FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
1477 2010-08-12  H.J. Lu  <hongjiu.lu@intel.com>
1479         * sysdeps/unix/sysv/linux/i386/Makefile: New file.
1481 2010-05-01  Alan Modra  <amodra@gmail.com>
1483         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1484         (PSEUDO): Use correct cr save.  Don't use wrong parm save area
1485         to save temps.  Correct cfi for possible later frame manipulation.
1486         (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
1487         (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
1488         (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
1489         (DOCARGS_6, UNDOCARGS_6): Likewise.
1490         (CENABLE, CDISABLE): Add nops for non-shared calls.
1492 2010-07-06  Andreas Schwab  <schwab@redhat.com>
1494         * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1495         Fix type mismatch.
1497 2010-07-03  Ulrich Drepper  <drepper@redhat.com>
1499         * tst-abstime.c (do_test): Some more cleanups
1501 2010-07-02  Ulrich Drepper  <drepper@redhat.com>
1503         * tst-abstime.c: Correct testing and add test for sem_timedwait.
1505 2010-07-01  Andreas Schwab  <schwab@redhat.com>
1506             Ulrich Drepper  <drepper@redhat.com>
1508         * Makefile (tests): Add tst-abstime.
1509         * tst-abstime.c: New file.
1510         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1511         (__lll_timedlock_wait): Check for timestamp before the Epoch.
1512         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1513         (__lll_timedlock_wait): Likewise.
1514         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1515         (__lll_robust_timedlock_wait): Likewise.
1516         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1517         (__pthread_cond_timedwait): Likewise.
1518         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1519         (pthread_rwlock_timedrdlock): Likewise.
1520         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1521         (pthread_rwlock_timedwrlock): Likewise.
1522         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1523         Likewise.
1525 2010-07-01  Ulrich Drepper  <drepper@redhat.com>
1527         * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
1529 2010-06-01  Takashi Yoshii  <takashi.yoshii.zj@renesas.com>
1531         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
1532         location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
1534 2010-04-09  Ulrich Drepper  <drepper@redhat.com>
1536         [BZ #11390]
1537         * sysdeps/unix/sysv/linux/pthread_getname.c: New file.
1538         * sysdeps/unix/sysv/linux/pthread_setname.c: New file.
1539         * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and
1540         pthread_setname.
1541         * Makefile (libpthread-routines): Add pthread_getname and
1542         pthread_setname.
1543         * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12.
1545 2010-04-05  Thomas Schwinge  <thomas@schwinge.name>
1547         * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/.
1548         * sysdeps/pthread/rt-unwind-resume.c: Likewise.
1549         * sysdeps/pthread/Makefile: Remove csu section and rt section's
1550         unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead.
1552 2010-03-23  Luis Machado  <luisgpm@br.ibm.com>
1554         * pthread_cond_timedwait.c: Add check for
1555         HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
1556         (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
1557         INTERNAL_SYSCALL.
1559 2010-03-09  Ulrich Drepper  <drepper@redhat.com>
1561         * pthread_create.c (__pthread_create_2_1): If priorities are incorrect
1562         and the call fails wake eventually waiting setxid threads.  Don't free
1563         stack here if we try starting a thread.
1564         * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter
1565         if the clone call failed.
1567 2010-03-08  Andreas Schwab  <schwab@redhat.com>
1569         * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
1570         * allocatestack.c (get_cached_stack): Set setxid_futex.
1571         (allocate_stack): Likewise.
1573 2010-03-05  Andreas Schwab  <schwab@redhat.com>
1574             Ulrich Drepper  <drepper@redhat.com>
1576         * allocatestack.c (setxid_mark_thread): Delay handling of thread if
1577         it is creating a thread or it is just being created.
1578         * pthread_create.c (start_thread): Wake setxid thread if it is
1579         waiting.
1580         (__pthread_create_2_1): Initialize setxid_futex.
1581         * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it
1582         is waiting.
1584 2010-01-15  Ulrich Drepper  <drepper@redhat.com>
1586         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1587         Fix unwind info.
1588         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1590 2010-01-15  Michal Schmidt  <mschmidt@redhat.com>
1592         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1593         Fix pthread_cond_timedwait with requeue-PI.
1594         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1595         Fix pthread_cond_wait with requeue-PI.
1597 2010-01-14  Ulrich Drepper  <drepper@redhat.com>
1599         * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
1600         and pthread_mutexattr_setrobust for GLIBC_2.12.
1601         * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
1602         * pthread_mutexattr_getrobust.c: Define alias
1603         pthread_mutexattr_getrobust.
1604         * pthread_mutexattr_setrobust.c: Define alias
1605         pthread_mutexattr_setrobust.
1607 2010-01-12  Ulrich Drepper  <drepper@redhat.com>
1609         * sysdeps/pthread/pthread.h: Cleanup.  Fix up for XPG7.
1611 2010-01-08  Ulrich Drepper  <drepper@redhat.com>
1613         * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
1615 2009-12-18  Thomas Schwinge  <thomas@codesourcery.com>
1617         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
1618         call __gmon_start__.
1619         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
1621 2009-12-17  Ulrich Drepper  <drepper@redhat.com>
1623         * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
1624         using memset.
1626 2009-12-01  Dinakar Guniguntala  <dino@in.ibm.com>
1628         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
1629         FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1630         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
1631         is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1632         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1633         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
1634         is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1635         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1637 2009-12-12  Ulrich Drepper  <drepper@redhat.com>
1639         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1640         Don't update nwaiters after invalid timeout is recognized.
1642 2009-11-27  Thomas Schwinge  <thomas@codesourcery.com>
1644         * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
1645         __gmon_start__.
1647 2009-11-27  Andreas Schwab  <schwab@redhat.com>
1649         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
1650         THREAD_SELF->cancelhandling after returning from futex call.
1652 2009-11-24  Ulrich Drepper  <drepper@redhat.com>
1654         * tst-sem13.c: New file.
1655         * Makefile (tests): Add tst-sem13.
1657 2009-11-22  Roland McGrath  <roland@redhat.com>
1659         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
1660         instead of recapitulating its contents.
1662 2009-11-18  Ulrich Drepper  <drepper@redhat.com>
1664         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
1665         optimizations and cleanups.
1667 2009-11-18  Dinakar Guniguntala  <dino@in.ibm.com>
1669         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1670         Remove redundant code. Fix cfi offsets.
1671         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1672         Fix cfi offsets.
1674 2009-11-17  Ulrich Drepper  <drepper@redhat.com>
1676         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
1677         reduce size of unwind info.
1679         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
1680         cfi directives.
1681         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1682         Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
1684 2009-11-03  Andreas Schwab  <schwab@linux-m68k.org>
1686         [BZ #4457]
1687         * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
1688         LIBGCC_S_SO.
1689         * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
1691 2009-10-30  Ulrich Drepper  <drepper@redhat.com>
1693         * tst-sem11.c (main): Rewrite to avoid aliasing problems.
1695         [BZ #3270]
1696         * allocatestack.c (__nptl_setxid): Perform the operation in multiple
1697         steps to avoid races with creation and terminations.
1698         * nptl-init.c (sighandler_setxid): Adjust.
1699         Patch by Daniel Jacobowitz.
1701 2009-09-07  Andreas Schwab  <schwab@redhat.com>
1703         * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
1705 2009-09-02  Suzuki K P  <suzuki@in.ibm.com>
1706             Joseph Myers  <joseph@codesourcery.com>
1708         [BZ #7094]
1709         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1710         Initialize the sigev_notify field for newly created timer to make sure
1711         the timer gets deleted from the active timer's list upon timer_delete.
1713 2009-08-27  Andrew Stubbs  <ams@codesourcery.com>
1715         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1716         Correct a logic error.
1718 2009-08-25  Ulrich Drepper  <drepper@redhat.com>
1720         * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
1721         of the field in local variables.
1722         (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
1723         variable and don't unconditionally clear it.
1725 2009-08-24  Ulrich Drepper  <drepper@redhat.com>
1727         * pthread_create.c (start_thread): Hint to the kernel that memory for
1728         the stack can be reused.  We do not mark all the memory.  The part
1729         still in use and some reserve are kept.
1731 2009-08-23  Ulrich Drepper  <drepper@redhat.com>
1733         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
1735 2009-08-11  Ulrich Drepper  <drepper@redhat.com>
1737         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
1738         directives.
1740 2009-08-10  Ulrich Drepper  <drepper@redhat.com>
1742         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
1743         directives.
1744         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1746 2009-08-10  Andreas Schwab  <schwab@redhat.com>
1748         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1749         (__pthread_cond_signal): Don't clobber register used for syscall
1750         number.
1752 2009-08-08  Ulrich Drepper  <drepper@redhat.com>
1754         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1755         Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
1757         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1758         (__pthread_cond_wait): Optimize by avoiding use of callee-safe
1759         register.
1761 2009-08-07  Ulrich Drepper  <drepper@redhat.com>
1763         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
1764         enabled by the special *_asynccancel functions.
1765         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1766         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1768         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
1770 2009-08-04  Ulrich Drepper  <drepper@redhat.com>
1772         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
1773         * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
1774         * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
1775         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
1776         since we can assume the special __*_{en,dis}able_asynccancel
1777         functions.
1778         (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
1779         * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
1780         and PTHREAD_CANCELED.
1782 2009-07-31  Ulrich Drepper  <drepper@redhat.com>
1784         * descr.h: Better definition of *_BITMASK macros for cancellation.
1786 2009-07-29  Ulrich Drepper  <drepper@redhat.com>
1788         * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
1790         * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
1791         dynamic linker might have to save.
1792         Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
1793         RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL.  Pretty
1794         printing.
1796         * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
1798 2009-07-28  Ulrich Drepper  <drepper@redhat.com>
1800         * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
1801         New function.
1802         * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
1803         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
1804         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
1805         requeue_pi for robust mutexes.
1806         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1807         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1808         Don't only skip __pthread_mutex_cond_lock.  Call instead
1809         __pthread_mutex_cond_lock_adjust.
1810         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1812         * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
1813         optimization of PI mutex handling.
1815 2009-07-27  Ulrich Drepper  <drepper@redhat.com>
1817         [BZ #10418]
1818         * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
1819         instead of of _acq variants of cmpxchg.
1821 2009-07-23  Ulrich Drepper  <drepper@redhat.com>
1823         * sysdeps/x86_64/configure.in: New file.
1825         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
1826         path when not using absolute timeout futex.
1828 2009-07-20  Ulrich Drepper  <drepper@redhat.com>
1830         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
1831         optimizations of last changes.
1832         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1834 2009-07-19  Ulrich Drepper  <drepper@redhat.com>
1836         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1837         FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1838         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
1839         is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1840         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1841         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
1842         is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1843         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1845         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1846         (__pthread_cond_timedwait): Make more robust.
1848 2009-07-18  Ulrich Drepper  <drepper@redhat.com>
1850         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1851         (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
1852         directly use absolute timeout.
1854         * tst-sem5.c (do_test): Add test for premature timeout.
1855         * Makefile: Linu tst-sem5 with librt.
1857         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1858         (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
1859         directly use absolute timeout.
1860         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1861         (pthread_rwlock_timedrdlock): Likewise.
1863         * tst-cond11.c (run_test): Add test to check that the timeout is
1864         long enough.
1866         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1867         (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
1868         directly use absolute timeout.
1870         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1871         (__pthread_cond_wait): Convert to using exception handler instead of
1872         registered unwind buffer.
1873         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1874         (__pthread_cond_timedwait): Likewise.
1876 2009-07-17  Ulrich Drepper  <drepper@redhat.com>
1878         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1879         If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
1880         use absolute timeout.
1882         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
1883         handling of uncontested semaphore.
1885         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1886         (__condvar_cleanup): Rewrite to use cfi directives instead of
1887         hand-coded unwind tables.
1888         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
1889         Likewise.
1890         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
1891         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1892         Likewise.
1894 2009-06-12  Ulrich Drepper  <drepper@redhat.com>
1896         * Makefile (libpthread-routines): Add pthread_sigqueue.
1897         * Versions: Add pthread_sigqueue for GLIBC_2.11.
1898         * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
1899         * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
1901 2009-06-11  Ulrich Drepper  <drepper@redhat.com>
1903         [BZ #10262]
1904         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1905         (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
1906         cannot be assumed.
1907         Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
1909 2009-05-16  Ulrich Drepper  <drepper@redhat.com>
1911         * libc-cancellation.c: Move __libc_cleanup_routine to...
1912         * libc-cleanup.c: ...here.  New file.
1913         * Makefile (routines): Add libc-cleanup.
1915         * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
1916         test.
1917         * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
1918         * sysdeps/pthread/librt-cancellation.c: Likewise.
1920         [BZ #9924]
1921         * nptl-init.c: Renamed from init.c.
1922         * Makefile: Change all occurences of init.c to nptl-init.c.
1924 2009-05-15  Ulrich Drepper  <drepper@redhat.com>
1926         * cancellation.c (__pthread_disable_asynccancel): Correct the bits
1927         to test when deciding on the delay.
1928         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1929         * pthread_cancel.c: Close race between deciding on sending a signal
1930         and setting the CANCELING_BIT bit.
1932         * cancellation.c (__pthread_disable_asynccancel): Don't return if
1933         thread is canceled.
1934         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1936 2009-04-27  Ulrich Drepper  <drepper@redhat.com>
1938         * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
1939         is available.
1940         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1941         * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
1942         * sysdeps/i386/tls.h: Likewise.
1943         (tcbhead_t): Add __private_tm member.
1945 2009-04-26  Ulrich Drepper  <drepper@redhat.com>
1947         * sem_open.c (sem_open): Rewrite initialization of initsem to
1948         avoid warnings.
1950         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1951         Avoid warning by using may_alias attribute on ptrhack.
1953 2009-04-22  Ulrich Drepper  <drepper@redhat.com>
1955         [BZ #10090]
1956         * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
1957         Check policy and priority for validity.
1958         Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
1960 2009-03-15  Ulrich Drepper  <drepper@redhat.com>
1962         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1963         (__pthread_cond_timedwait): Change to use cfi directives instead of
1964         hand-coded unwind sections.
1966 2009-03-10  Ulrich Drepper  <drepper@redhat.com>
1968         * init.c (nptl_freeres): Compile only for SHARED.
1970 2009-03-09  Jakub Jelinek  <jakub@redhat.com>
1972         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
1973         FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
1974         FUTEX_BITSET_MATCH_ANY.
1976 2009-02-27  Roland McGrath  <roland@redhat.com>
1978         * init.c (__nptl_initial_report_events): Mark __attribute_used__.
1979         * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
1981 2009-02-26  Ulrich Drepper  <drepper@redhat.com>
1983         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1984         _POSIX_THREAD_ROBUST_PRIO_INHERIT and
1985         _POSIX_THREAD_ROBUST_PRIO_PROTECT.  Reset value of macros from
1986         200112L to 200809L.
1988 2009-02-25  Ulrich Drepper  <drepper@redhat.com>
1990         * sysdeps/pthread/pthread.h: The robust mutex functions are in
1991         POSIX 2008.
1993 2009-02-24  Ulrich Drepper  <drepper@redhat.com>
1995         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
1996         Unify name of include protector macro.
1998 2009-02-14  SUGIOKA Toshinobu  <sugioka@itonet.co.jp>
2000         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
2001         LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
2003 2009-01-29  Ulrich Drepper  <drepper@redhat.com>
2005         * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
2006         pointer variables.
2008         * allocatestack.c (__free_stacks): Renamed from free_stacks.
2009         (__free_stack_cache): Removed.  Change callers to call __free_stacks.
2010         * init.c (nptl_freeres): New function.
2011         (pthread_functions): Initialize ptr_freeres to nptl_freeres.
2012         * pthreadP.h: Don't declare __free_stack_cache.  Declare __free_stacks.
2013         * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
2014         variable.
2015         (pthread_cancel_init): Depend in libgcc_s_handle for decision to
2016         load DSO.  Assign last.
2017         (__unwind_freeres): New function.
2019         * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
2020         for better debugging.  No need to use stack_list_add here.
2022 2009-01-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2024         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
2025         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
2026         instead of computing relative timeout.
2027         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
2028         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
2030 2009-01-25  Ulrich Drepper  <drepper@redhat.com>
2032         * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
2034 2009-01-08  Ulrich Drepper  <drepper@redhat.com>
2036         * sysdeps/pthread/list.h (list_add): Initialize new element first.
2037         (list_add_tail): Removed.
2039 2009-01-07  Ulrich Drepper  <drepper@redhat.com>
2041         * (in_flight_stack): New variable.
2042         (stack_list_del): New function.  Use instead of list_del.
2043         (stack_list_add): New function.  Use instead of list_add when adding to
2044         stack_cache and stack_used lists.
2045         (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
2046         when the fork call interrupted another thread.
2048 2009-01-04  Ulrich Drepper  <drepper@redhat.com>
2050         * init.c (__pthread_initialize_minimal_internal): Optimize test
2051         FUTEX_CLOCK_REALTIME a bit.
2053 2009-01-03  Ulrich Drepper  <drepper@redhat.com>
2055         * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
2056         only passing five parameters to FUTEX_WAIT_BITSET call.
2058         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2059         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
2060         instead of computing relative timeout.
2062 2009-01-02  Ulrich Drepper  <drepper@redhat.com>
2064         * init.c (__pthread_initialize_minimal_internal): Check for
2065         FUTEX_CLOCK_REALTIME flag.
2066         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
2067         Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
2068         relative timeout.
2070         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
2071         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
2072         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2073         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2074         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2075         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2077 2008-12-09  Ulrich Drepper  <drepper@redhat.com>
2079         * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
2080         loop body instead of ; to avoid gcc warnings.
2081         (pthread_cleanup_pop_restore_np): Likewise.
2082         Patch by Caolán McNamara <caolanm@redhat.com>.
2084 2008-12-09  Jakub Jelinek  <jakub@redhat.com>
2086         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
2087         fast path here, for robust/PI/PP mutexes call
2088         __pthread_mutex_lock_full.  Don't use switch, instead use a series
2089         of ifs according to their probability.
2090         (__pthread_mutex_lock_full): New function.
2091         * pthread_mutex_unlock.c: Include assert.h.
2092         (__pthread_mutex_unlock_usercnt): Handle only the
2093         fast path here, for robust/PI/PP mutexes call
2094         __pthread_mutex_unlock_full.  Don't use switch, instead use a series
2095         of ifs according to their probability.
2096         (__pthread_mutex_unlock_full): New function.
2097         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
2098         (__pthread_mutex_lock_full): Define.
2100 2008-12-08  Ulrich Drepper  <drepper@redhat.com>
2102         * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
2103         implementation.  Add necessary padding and.
2104         * descr.h (struct pthread): Increase padding for tcbhead_t to 24
2105         words.
2107 2008-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2109         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
2110         and FUTEX_WAKE_BITSET.
2112 2008-12-02  Ulrich Drepper  <drepper@redhat.com>
2114         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
2115         and FUTEX_WAKE_BITSET.
2116         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2117         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2118         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2119         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2121 2008-11-25  Roland McGrath  <roland@redhat.com>
2123         * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
2124         Subdirectories moved to ports repository as
2125         sysdeps/.../nptl subdirectories.
2127 2008-11-12  Jakub Jelinek  <jakub@redhat.com>
2129         [BZ #7008]
2130         * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
2131         of old value.
2132         * pthread_cond_init.c (__pthread_cond_init): Fix
2133         cond->__data.__nwaiters initialization.
2134         * Makefile (tests): Add tst-cond23.
2135         * tst-cond23.c: New test.
2137 2008-11-07  Jakub Jelinek  <jakub@redhat.com>
2139         * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
2140         arguments.
2141         (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
2142         arguments.
2144 2008-11-01  Ulrich Drepper  <drepper@redhat.com>
2146         [BZ #6955]
2147         * pthread_mutex_lock.c: Add support for private PI mutexes.
2148         * pthread_mutex_timedlock.c: Likewise.
2149         * pthread_mutex_trylock.c: Likewise.
2150         * pthread_mutex_unlock.c: Likewise.
2151         Patch mostly by Ben Jackson <ben@ben.com>.
2153 2008-10-31  Ulrich Drepper  <drepper@redhat.com>
2155         [BZ #6843]
2156         * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
2157         Increase stack size for helper thread.
2159 2008-10-06  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2161         * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
2162         assembly with a clobber list for access registers a0 and a1.
2164 2008-09-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2166         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
2167         to force runp->refcntr to be read from memory.
2169 2008-09-08  Richard Guenther  <rguenther@suse.de>
2171         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
2172         lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2173         lll_timedlock, lll_robust_timedlock, lll_unlock,
2174         lll_robust_unlock): Promote private to int.
2176 2008-08-15  Ulrich Drepper  <drepper@redhat.com>
2178         * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
2179         ARCH_RETRY_MMAP definitions.
2180         * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
2181         Define MAP_STACK when not defined.
2182         (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS.  Remove
2183         handling of ARCH_RETRY_MMAP.
2185 2008-07-30  Ulrich Drepper  <drepper@redhat.com>
2187         * tst-align2.c (f): Print message that f is reached.
2189 2008-04-28  Hiroki Kaminaga  <kaminaga@sm.sony.co.jp>
2191         [BZ #6740]
2192         * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
2193         definition with #ifndef __ASSUME_PRIVATE_FUTEX.
2195 2008-07-25  Ulrich Drepper  <drepper@redhat.com>
2197         * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
2198         SOCK_CLOEXEC if possible.
2200 2008-05-29  Ulrich Drepper  <drepper@redhat.com>
2202         * Makefile (tests): Add tst-rwlock2a.
2203         * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
2204         * tst-rwlock2a.c: New file.
2206 2008-06-12  Ulrich Drepper  <drepper@redhat.com>
2208         * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
2210 2008-05-17  Samuel Thibault  <samuel.thibault@ens-lyon.org>
2212         * sysdeps/pthread/pthread.h: Fix typo in comment.
2214 2008-05-28  Ulrich Drepper  <drepper@redhat.com>
2216         * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
2217         of CPU set to the kernel.
2219 2008-05-23  Paul Pluzhnikov  <ppluzhnikov@google.com>
2221         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
2222         cfi directives.
2223         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
2224         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
2225         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2226         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2227         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2228         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2230 2008-05-22  Paul Pluzhnikov  <ppluzhnikov@google.com>
2232         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
2233         cfi directives.
2234         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2235         Likewise.
2236         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2237         Likewise.
2238         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2239         Likewise.
2241 2008-05-26  Ulrich Drepper  <drepper@redhat.com>
2243         * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
2245 2008-05-20  Jakub Jelinek  <jakub@redhat.com>
2247         David S. Miller  <davem@davemloft.net>
2249         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
2251 2008-05-10  Ulrich Drepper  <drepper@redhat.com>
2253         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
2254         __pshared correctly.
2255         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2256         Likewise.
2257         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2258         Likewise.
2259         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
2260         Likewise.
2261         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
2262         Likewise.
2263         Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
2265 2008-04-14  David S. Miller  <davem@davemloft.net>
2267         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2268         (__old_sem_wait): Fix argument to lll_futex_wait().
2270 2007-11-26  Daniel Jacobowitz  <dan@codesourcery.com>
2272         * pthread_create.c: Require pthread_mutex_trylock and
2273         pthread_key_delete for libgcc.
2275 2008-04-08  Jakub Jelinek  <jakub@redhat.com>
2277         [BZ #6020]
2278         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
2279         (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
2280         Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
2282 2008-03-27  Ulrich Drepper  <drepper@redhat.com>
2284         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
2285         <linux/limits.h> has defined it.
2286         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2287         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2288         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2289         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2291 2008-03-18  Jakub Jelinek  <jakub@redhat.com>
2293         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
2294         of ASSEMBLER.
2295         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2296         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
2298 2008-03-14  Ulrich Drepper  <drepper@redhat.com>
2300         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
2301         HAVE_DL_DISCOVER_OSVERSION.
2302         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2303         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
2305 2008-03-07  Ulrich Drepper  <drepper@redhat.com>
2307         [BZ #5778]
2308         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
2309         _POSIX_CHOWN_RESTRICTED value to zero.
2311 2008-01-31  Roland McGrath  <roland@redhat.com>
2313         * Makefile (omit-deps): Variable removed.
2315 2008-01-30  Ulrich Drepper  <drepper@redhat.com>
2317         * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
2318         unnecessary addr32 prefix.
2320 2008-01-29  Roland McGrath  <roland@redhat.com>
2322         * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
2324 2008-01-22  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2326         * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
2328 2008-01-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2330         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
2331         a scratch register.
2332         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
2333         (__lll_lock_wait_private): Fix typo.
2334         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
2335         (pthread_barrier_wait): Likewise.  Adjust XADD use.
2336         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
2337         Adjust XADD use.
2338         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
2339         (pthread_rwlock_timedrdlock): Return correct return value.
2340         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
2341         (pthread_rwlock_timedwrlock): Likewise.
2343 2008-01-15  Ulrich Drepper  <drepper@redhat.com>
2345         * tst-eintr2.c (do_test): make sure that if mutex_lock in main
2346         thread returns the program exits with an error code.
2348 2008-01-10  Ulrich Drepper  <drepper@redhat.com>
2350         * pthread-errnos.sym: Add EOVERFLOW.
2351         * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
2352         * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
2353         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2354         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2356 2007-12-14  Ulrich Drepper  <drepper@redhat.com>
2358         * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
2359         parameter.  Passed it as permission to mmap.
2360         * allocatestack.c (allocate_stack): Pass prot as second parameter
2361         to ARCH_RETRY_MMAP.
2363 2007-12-12  Ulrich Drepper  <drepper@redhat.com>
2365         * tst-basic7.c: Allocate memory for the stack.
2367         [BZ #5465]
2368         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
2369         (__pthread_cond_timedwait): Don't use VDSO.
2370         Patch by Michal Januszewski.
2372 2007-12-07  Ulrich Drepper  <drepper@redhat.com>
2374         [BZ #5455]
2375         * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
2376         Allow label before pthread_cleanup_pop.
2377         (pthread_cleanup_pop_restore_np): Likewise.
2379 2007-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2381         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
2382         Store 2 before returning ETIMEDOUT.
2384 2007-11-23  Ulrich Drepper  <drepper@redhat.com>
2386         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
2387         Store 2 before returning ETIMEDOUT.
2388         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
2389         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
2390         (__lll_lock_wait_private): Optimize.
2391         (__lll_lock_wait): Likewise.
2393 2007-11-20  Jakub Jelinek  <jakub@redhat.com>
2395         * sysdeps/pthread/pthread.h (pthread_cleanup_push,
2396         pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
2397         g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
2399 2007-11-08  Ulrich Drepper  <drepper@redhat.com>
2401         [BZ #5240]
2402         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
2403         If we time out, try one last time to lock the futex to avoid
2404         losing a wakeup signal.
2405         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2406         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2408         [BZ #5245]
2409         * sysdeps/pthread/createthread.c (do_clone): Translate clone error
2410         if necessary.
2412 2007-11-07  Ulrich Drepper  <drepper@redhat.com>
2414         [BZ #5245]
2415         * allocatestack.c (allocate_stack): Change ENOMEM error in case
2416         mmap failed to EAGAIN.
2417         * Makefile (tests): Add tst-basic7.
2418         * tst-basic7.c: New file.
2420 2007-11-05  Ulrich Drepper  <drepper@redhat.com>
2422         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
2423         Use __linkin_atfork.
2425 2007-11-03  Mike Frysinger  <vapier@gentoo.org>
2427         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
2428         missing line continuations.
2429         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
2430         LOAD_FUTEX_WAKE): Likewise.  Also add missing 3rd parameter.
2432 2007-10-28  Ulrich Drepper  <drepper@redhat.com>
2434         [BZ #5220]
2435         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
2436         __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
2437         (struct timer): Add next element.
2438         * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
2439         enqueue timer structure into __active_timer_sigev_thread list.
2440         * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
2441         remove timer struct from __active_timer_sigev_thread.
2442         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2443         Before using timer structure make sure it is still on the
2444         __active_timer_sigev_thread list.  Keep lock until done.
2445         Define __active_timer_sigev_thread and
2446         __active_timer_sigev_thread_lock.
2448 2007-10-27  Ulrich Drepper  <drepper@redhat.com>
2450         * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
2451         Redefine thread_atfork for use of ATFORK_MEM.
2452         * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
2453         * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
2454         function.
2455         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2456         Use atomic operation when removing first element of list.
2458 2007-10-17  Jakub Jelinek  <jakub@redhat.com>
2460         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
2461         routine instead of an alias to __new_sem_post.
2463 2007-10-15  Jakub Jelinek  <jakub@redhat.com>
2465         * init.c (__pthread_initialize_minimal): Initialize word to appease
2466         valgrind.
2468 2007-10-10  Jakub Jelinek  <jakub@redhat.com>
2470         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
2471         libc.so just clear NAME.
2472         (__libc_rwlock_fini): Nop inside of libc.so.
2473         * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
2474         all zeros.
2476 2007-09-02  Ulrich Drepper  <drepper@redhat.com>
2478         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2479         (__pthread_cond_wait): Fix unlocking of internal lock after mutex
2480         unlocking failed.
2481         Patch by Luca Barbieri <luca.barbieri@gmail.com>.
2483 2007-08-21  Ulrich Drepper  <drepper@redhat.com>
2485         [BZ #4938]
2486         * allocatestack.c (__reclaim_stacks): Clear the TSD in the
2487         reclaimed stack if necessary.
2488         * Makefile (tests): Add tst-tsd6.
2489         * tst-tsd6.c: New file.
2491 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
2493         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
2494         Add private argument.
2496 2007-08-20  Ulrich Drepper  <drepper@redhat.com>
2498         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2499         (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
2501 2007-08-16  Jakub Jelinek  <jakub@redhat.com>
2503         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
2504         (__lll_robust_timedlock): Pass private as last argument to
2505         __lll_robust_timedlock_wait.
2506         (__lll_unlock): Fix a pasto.
2508 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
2510         * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
2511         sparc_old_sem): New structs.
2512         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2513         (__sem_wait_cleanup): New function.
2514         (__new_sem_wait): Use sparc_new_sem structure.  Bump and afterwards
2515         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
2516         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2517         lll_futex_wait.
2518         (__old_sem_wait): New function.
2519         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
2520         nptl/sysdeps/unix/sysv/linux/sparc version.
2521         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
2522         Likewise.
2523         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
2524         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
2525         (__new_sem_trywait): Use sparc_old_sem structure.
2526         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
2527         (sem_timedwait): Use sparc_new_sem structure.  Bump and afterwards
2528         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
2529         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2530         lll_futex_timed_wait.
2531         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
2532         Use sparc_new_sem structure.  Only wake if nwaiters > 0.  Pass
2533         isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2534         lll_futex_wake.
2535         (__old_sem_post): New function.
2536         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
2537         * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
2538         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
2539         * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
2540         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
2541         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
2543 2007-08-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2545         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2546         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2547         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2548         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2549         * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
2550         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2551         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2552         Use FUTEX_WAKE_OP.
2553         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2554         kernel-features.h and tcb-offsets.h.
2555         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2556         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2557         process private.
2558         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2559         tcb-offsets.h.
2560         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
2561         to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2562         process private.
2563         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
2564         __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2565         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
2566         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2567         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2568         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2569         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2571 2007-08-14  Jakub Jelinek  <jakub@redhat.com>
2573         * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
2574         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
2575         (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
2576         lll_futex_timed_wait.
2578         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
2579         __lll_robust_unlock): Rewrite as macros instead of inline functions.
2580         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
2581         __lll_robust_unlock, __lll_wait_tid): Likewise.
2583 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
2585         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
2586         Fix a pasto.
2587         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
2588         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2589         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2590         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2591         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2592         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2593         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2594         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
2595         kernel-features.h.
2596         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2597         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2598         process private.  Switch DW_CFA_advance_loc1 and some
2599         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2600         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2601         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
2602         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2603         process private.  Switch DW_CFA_advance_loc{1,2} and some
2604         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2605         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
2606         #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2607         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2608         Likewise.
2609         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2610         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2611         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2612         Likewise.
2613         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2614         (__pthread_cond_broadcast): Compare %r8 instead of
2615         dep_mutex-cond_*(%rdi) with $-1.
2616         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2617         (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
2618         of oring.
2620 2007-08-13  Ulrich Drepper  <drepper@redhat.com>
2622         * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
2624 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
2626         * allocatestack.c: Include kernel-features.h.
2627         * pthread_create.c: Likewise.
2628         * pthread_mutex_init.c: Likewise.
2629         * init.c: Likewise.
2630         * pthread_cond_timedwait.c: Likewise.
2631         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2632         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2633         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2634         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2635         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2636         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2637         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2638         Likewise.
2639         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2640         Likewise.
2641         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2642         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2643         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2644         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2646 2007-08-12  Jakub Jelinek  <jakub@redhat.com>
2648         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2649         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2650         byte elements.  One of them is the new __shared element.
2651         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2652         adjust names of other padding elements.
2653         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2654         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2655         byte elements.  One of them is the new __shared element.
2656         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2657         adjust names of other padding elements.
2658         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
2659         Renamed __pad1 element to __shared, adjust names of other padding
2660         elements.
2661         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2662         (pthread_rwlock_t): Likewise.
2663         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
2664         typo.
2666 2007-08-09  Anton Blanchard  <anton@samba.org>
2668         * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
2670 2007-08-12  Ulrich Drepper  <drepper@redhat.com>
2672         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
2673         <kernel-features.h>.
2674         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2676 2007-08-11  Ulrich Drepper  <drepper@redhat.com>
2678         * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
2679         * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
2680         dealing with robust mutexes.
2681         * pthread_mutex_timedlock.c: Likewise.
2682         * pthread_mutex_trylock.c: Likewise.
2683         * pthread_mutex_unlock.c: Likewise.
2684         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2686 2007-08-06  Jakub Jelinek  <jakub@redhat.com>
2688         * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
2689         (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
2690         (PTHREAD_MUTEX_PSHARED): Define.
2691         * pthread_mutex_init.c (__pthread_mutex_init): Set
2692         PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
2693         mutexes.
2694         * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
2695         instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
2696         as second argument to lll_lock.
2697         (LLL_MUTEX_TRYLOCK): Take mutex as argument
2698         instead of its __data.__lock field.
2699         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
2700         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
2701         to lll_robust_lock.
2702         (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
2703         LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
2704         instead of mutex->__data.__kind directly, pass
2705         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
2706         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
2707         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
2708         directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
2709         (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
2710         to lll_timedlock, lll_robust_timedlock, lll_unlock and
2711         lll_futex_timed_wait.  Use PTHREAD_MUTEX_TYPE (mutex) instead
2712         of mutex->__data.__kind directly.
2713         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
2714         PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
2715         lll_robust_timedlock, lll_unlock and lll_futex_timed_wait.  Use
2716         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
2717         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
2718         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
2719         and lll_futex_wake.
2720         * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
2721         PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
2722         Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
2723         directly.
2724         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
2725         Take mutex as argument instead of its __data.__lock field, pass
2726         PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
2727         (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
2728         __data.__lock field.
2729         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
2730         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
2731         to lll_robust_cond_lock.
2732         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
2733         variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
2734         lll_futex_wake.  Don't use lll_futex_requeue if dependent mutex
2735         has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
2736         * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
2737         variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
2738         lll_futex_wait.
2739         * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
2740         variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
2741         lll_futex_wake.
2742         * pthread_cond_timedwait.c (__pthread_cond_wait): Add
2743         pshared variable, pass it to lll_lock, lll_unlock,
2744         lll_futex_timedwait and lll_futex_wake.
2745         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
2746         pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
2747         and lll_futex_wake.
2748         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
2749         lll_futex_wake_unlock): Add private argument, use __lll_private_flag
2750         macro.
2751         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
2752         lll_futex_wake_unlock): Likewise.
2753         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
2754         Likewise.
2755         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
2756         lll_futex_wake_unlock): Likewise.
2757         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
2758         Likewise.
2759         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
2760         lll_futex_wake_unlock): Likewise.
2761         (lll_futex_wake): Fix a typo.
2762         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
2763         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2764         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2765         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2766         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2767         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2768         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2769         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2770         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2771         (__pthread_cond_timedwait): Likewise.
2772         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
2773         (__condvar_cleanup, __pthread_cond_wait): Likewise.
2775 2007-08-05  Jakub Jelinek  <jakub@redhat.com>
2777         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
2778         Don't use CGOTSETUP and CGOTRESTORE macros.
2779         (CGOTSETUP, CGOTRESTORE): Remove.
2780         <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
2781         @local symbol.
2783 2007-08-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2785         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
2786         definitions for private futexes.
2787         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
2788         kernel-features.h and lowlevellock.h.  Use private futexes if
2789         they are available.
2790         (__lll_lock_wait_private, __lll_unlock_wake_private): New.
2791         (__lll_mutex_lock_wait): Rename to
2792         (__lll_lock_wait): ... this.  Don't compile in for libc.so.
2793         (__lll_mutex_timedlock_wait): Rename to ...
2794         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.
2795         Don't compile in for libc.so.
2796         (__lll_mutex_unlock_wake): Rename to ...
2797         (__lll_unlock_wake): ... this.  Don't compile in for libc.so.
2798         (__lll_timedwait_tid): Use __NR_gettimeofday.
2799         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
2800         the header from assembler.  Renamed all lll_mutex_* resp.
2801         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
2802         Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
2803         (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
2804         Define.
2805         (__lll_lock_wait_private): Add prototype.
2806         (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
2807         __lll_robust_timedlock_wait, __lll_unlock_wake_private,
2808         __lll_unlock_wake): Likewise.
2809         (lll_lock): Add private argument.  Call __lll_lock_wait_private
2810         if private is constant LLL_PRIVATE.
2811         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2812         lll_timedlock, lll_robust_timedlock): Add private argument.
2813         (lll_unlock): Add private argument.  Call __lll_unlock_wake_private
2814         if private is constant LLL_PRIVATE.
2815         (lll_robust_unlock, lll_robust_dead): Add private argument.
2816         (lll_lock_t): Remove.
2817         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2818         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2819         lll_cond_wake, lll_cond_broadcast): Remove.
2820         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
2821         kernel-features.h and lowlevellock.h.
2822         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2823         (LOAD_FUTEX_WAIT): Define.
2824         (__lll_robust_mutex_lock_wait): Rename to ...
2825         (__lll_robust_lock_wait): ... this.  Add private argument.
2826         Use LOAD_FUTEX_WAIT macro.
2827         (__lll_robust_mutex_timedlock_wait): Rename to ...
2828         (__lll_robust_timedlock_wait): ... this.    Add private argument.
2829         Use __NR_gettimeofday.  Use LOAD_FUTEX_WAIT macro.
2830         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
2831         lowlevellock.h.
2832         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2833         (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
2834         __lll_mutex_{lock,unlock}_*.
2835         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
2836         lowlevellock.h and pthread-errnos.h.
2837         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2838         FUTEX_CMP_REQUEUE, EINVAL): Remove.
2839         (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
2840         __lll_mutex_{lock,unlock}_*.
2841         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
2842         lowlevellock.h and pthread-errnos.h.
2843         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
2844         (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
2845         __lll_mutex_{lock,unlock}_*.
2846         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2847         lowlevellock.h.
2848         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
2849         (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
2850         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
2851         (__condvar_tw_cleanup): Likewise.
2852         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2853         lowlevellock.h.
2854         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2855         (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
2856         __lll_mutex_{lock,unlock}_*.
2857         ( __condvar_w_cleanup): Likewise.
2858         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
2859         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2860         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
2861         lowlevellock.h.
2862         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2863         (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
2864         __lll_mutex_{lock,unlock}_*.
2865         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
2866         lowlevellock.h.
2867         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2868         FUTEX_PRIVATE_FLAG): Remove.
2869         (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
2870         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
2871         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
2872         lowlevellock.h.
2873         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2874         FUTEX_PRIVATE_FLAG): Remove.
2875         (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
2876         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
2877         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
2878         lowlevellock.h.
2879         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2880         (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
2881         __lll_mutex_{lock,unlock}_*.
2882         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
2883         lowlevellock.h.
2884         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2885         (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
2886         __lll_mutex_{lock,unlock}_*.
2887         * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
2888         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2889         (__new_sem_post): Use standard initial exec code sequences.
2890         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
2891         lowlevellock.h.
2892         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2893         FUTEX_PRIVATE_FLAG): Remove.
2894         (sem_timedwait): Use __NR_gettimeofday.  Use standard initial
2895         exec code sequences.
2896         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
2897         (__new_sem_trywait): Use standard initial exec code sequences.
2898         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
2899         (__new_sem_wait): Use standard initial exec code sequences.
2901 2007-07-31  Anton Blanchard  <anton@samba.org>
2903         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
2904         Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
2905         atomic_full_barrier.
2907 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
2909         * allocatestack.c (stack_cache_lock): Change type to int.
2910         (get_cached_stack, allocate_stack, __deallocate_stack,
2911         __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
2912         __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
2913         as second argument to lll_lock and lll_unlock macros on
2914         stack_cache_lock.
2915         * pthread_create.c (__find_in_stack_list): Likewise.
2916         (start_thread): Similarly with pd->lock.  Use lll_robust_dead
2917         macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
2918         as second argument.
2919         * descr.h (struct pthread): Change lock and setxid_futex field
2920         type to int.
2921         * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
2922         LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
2923         * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
2924         * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
2925         Likewise.
2926         * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
2927         * pthread_cond_init.c (__pthread_cond_init): Likewise.
2928         * pthreadP.h (__attr_list_lock): Change type to int.
2929         * pthread_attr_init.c (__attr_list_lock): Likewise.
2930         * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
2931         ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
2932         lll_{,un}lock.
2933         * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
2934         also for lll_futex_{wake,wait}.
2935         * pthread_barrier_init.c (pthread_barrier_init): Make iattr
2936         a pointer to const.
2937         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
2938         LLL_SHARED as second argument to lll_{,un}lock.
2939         * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
2940         * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
2941         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
2942         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
2943         Likewise.
2944         * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
2945         as second argument to lll_{,un}lock macros on pd->lock.
2946         * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
2947         * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
2948         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2949         * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
2950         Likewise.
2951         * sysdeps/pthread/createthread.c (do_clone, create_thread):
2952         Likewise.
2953         * pthread_once.c (once_lock): Change type to int.
2954         (__pthread_once): Pass LLL_PRIVATE as second argument to
2955         lll_{,un}lock macros on once_lock.
2956         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
2957         lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
2958         rwlock->__data.__shared as second argument to them and similarly
2959         for lll_futex_w*.
2960         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
2961         Likewise.
2962         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
2963         Likewise.
2964         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
2965         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
2966         * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
2967         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
2968         * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
2969         to lll_{,un}lock macros on __sem_mappings_lock.
2970         * sem_open.c (check_add_mapping): Likewise.
2971         (__sem_mappings_lock): Change type to int.
2972         * semaphoreP.h (__sem_mappings_lock): Likewise.
2973         * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
2974         LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
2975         instead of lll_*mutex_*, pass LLL_SHARED as last
2976         argument.
2977         (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
2978         pass LLL_SHARED as last argument.
2979         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
2980         LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
2981         lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
2982         pass LLL_SHARED as last argument.
2983         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2984         lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
2985         LLL_SHARED as last argument.
2986         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
2987         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
2988         Similarly.
2989         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
2990         __libc_lock_lock_recursive, __libc_lock_unlock,
2991         __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
2992         argument to lll_{,un}lock.
2993         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
2994         _IO_lock_unlock): Likewise.
2995         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
2996         compound literal.
2997         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2998         Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
2999         __fork_lock.
3000         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
3001         free_mem): Likewise.
3002         (__fork_lock): Change type to int.
3003         * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
3004         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
3005         isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
3006         lll_futex_wake.
3007         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
3008         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
3009         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
3010         New function.
3011         (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
3012         pass it through to lll_futex_*wait, only compile in when
3013         IS_IN_libpthread.
3014         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3015         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
3016         argument and pass it through to lll_futex_*wait.
3017         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
3018         lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
3019         lll_robust_*.  Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
3020         inline functions to __lll_* resp. __lll_robust_*.
3021         (LLL_MUTEX_LOCK_INITIALIZER): Remove.
3022         (lll_mutex_dead): Add private argument.
3023         (__lll_lock_wait_private): New prototype.
3024         (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
3025         __lll_robust_lock_timedwait): Add private argument to prototypes.
3026         (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
3027         call __lll_lock_wait_private, otherwise pass private to
3028         __lll_lock_wait.
3029         (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
3030         __lll_robust_timedlock): Add private argument, pass it to
3031         __lll_*wait functions.
3032         (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
3033         call __lll_unlock_wake_private, otherwise pass private to
3034         __lll_unlock_wake.
3035         (__lll_robust_unlock): Add private argument, pass it to
3036         __lll_robust_unlock_wake.
3037         (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
3038         lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
3039         argument, pass it through to __lll_* inline function.
3040         (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
3041         (lll_lock_t): Remove.
3042         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
3043         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
3044         lll_cond_wake, lll_cond_broadcast): Remove.
3045         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3046         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3047         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3048         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3049         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
3050         the header from assembler.  Renamed all lll_mutex_* resp.
3051         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
3052         (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
3053         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3054         (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
3055         LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
3056         (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
3057         __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
3058         Remove prototype.
3059         (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
3060         (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
3061         rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
3062         (lll_trylock): Likewise, use __lll_trylock_asm, pass
3063         MULTIPLE_THREADS_OFFSET as another asm operand.
3064         (lll_lock): Add private argument, use __lll_lock_asm_start, pass
3065         MULTIPLE_THREADS_OFFSET as last asm operand, call
3066         __lll_lock_wait_private if private is constant LLL_PRIVATE,
3067         otherwise pass private as another argument to __lll_lock_wait.
3068         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
3069         lll_timedlock, lll_robust_timedlock): Add private argument, pass
3070         private as another argument to __lll_*lock_wait call.
3071         (lll_unlock): Add private argument, use __lll_unlock_asm, pass
3072         MULTIPLE_THREADS_OFFSET as another asm operand, call
3073         __lll_unlock_wake_private if private is constant LLL_PRIVATE,
3074         otherwise pass private as another argument to __lll_unlock_wake.
3075         (lll_robust_unlock): Add private argument, pass private as another
3076         argument to __lll_unlock_wake.
3077         (lll_robust_dead): Add private argument, use __lll_private_flag
3078         macro.
3079         (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
3080         LLL_MUTEX_LOCK_INITIALIZER.
3081         (lll_lock_t): Remove.
3082         (LLL_LOCK_INITIALIZER_WAITERS): Define.
3083         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
3084         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
3085         lll_cond_wake, lll_cond_broadcast): Remove.
3086         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3087         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
3088         2007-05-2{3,9} changes.
3089         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
3090         kernel-features.h and lowlevellock.h.
3091         (LOAD_PRIVATE_FUTEX_WAIT): Define.
3092         (LOAD_FUTEX_WAIT): Rewritten.
3093         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
3094         define.
3095         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
3096         (__lll_mutex_lock_wait): Rename to ...
3097         (__lll_lock_wait): ... this.  Take futex addr from %edx instead of
3098         %ecx, %ecx is now private argument.  Don't compile in for libc.so.
3099         (__lll_mutex_timedlock_wait): Rename to ...
3100         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.  %esi
3101         contains private argument.  Don't compile in for libc.so.
3102         (__lll_mutex_unlock_wake): Rename to ...
3103         (__lll_unlock_wake): ... this.  %ecx contains private argument.
3104         Don't compile in for libc.so.
3105         (__lll_timedwait_tid): Use __NR_gettimeofday.
3106         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
3107         kernel-features.h and lowlevellock.h.
3108         (LOAD_FUTEX_WAIT): Define.
3109         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
3110         define.
3111         (__lll_robust_mutex_lock_wait): Rename to ...
3112         (__lll_robust_lock_wait): ... this.  Futex addr is now in %edx
3113         argument, %ecx argument contains private.  Use LOAD_FUTEX_WAIT
3114         macro.
3115         (__lll_robust_mutex_timedlock_wait): Rename to ...
3116         (__lll_robust_timedlock_wait): ... this.  Use __NR_gettimeofday.
3117         %esi argument contains private, use LOAD_FUTEX_WAIT macro.
3118         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
3119         lowlevellock.h.
3120         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3121         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
3122         PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
3123         __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
3124         to __lll_lock_wait in %edx.
3125         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
3126         Include lowlevellock.h and pthread-errnos.h.
3127         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3128         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
3129         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
3130         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3131         pass LLL_SHARED in %ecx to both __lll_lock_wait and
3132         __lll_unlock_wake.
3133         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
3134         Include lowlevellock.h and pthread-errnos.h.
3135         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
3136         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
3137         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
3138         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3139         pass LLL_SHARED in %ecx to both __lll_lock_wait and
3140         __lll_unlock_wake.
3141         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
3142         Include lowlevellock.h.
3143         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3144         Don't define.
3145         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
3146         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3147         pass LLL_SHARED in %ecx to both __lll_lock_wait and
3148         __lll_unlock_wake.  Use __NR_gettimeofday.
3149         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
3150         Include lowlevellock.h.
3151         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3152         (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
3153         to __lll_*, pass cond_lock address in %edx rather than %ecx to
3154         __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
3155         and __lll_unlock_wake.
3156         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
3157         Include lowlevellock.h.
3158         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3159         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
3160         MUTEX(%ebx) address in %edx rather than %ecx to
3161         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
3162         and __lll_unlock_wake.  Move return value from %ecx to %edx
3163         register.
3164         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3165         Include lowlevellock.h.
3166         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3167         Don't define.
3168         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3169         MUTEX(%ebp) address in %edx rather than %ecx to
3170         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
3171         and __lll_unlock_wake.  Move return value from %ecx to %edx
3172         register.  Use __NR_gettimeofday.
3173         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3174         Include lowlevellock.h.
3175         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3176         Don't define.
3177         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3178         MUTEX(%ebp) address in %edx rather than %ecx to
3179         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
3180         and __lll_unlock_wake.  Move return value from %ecx to %edx
3181         register.  Use __NR_gettimeofday.
3182         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
3183         Include lowlevellock.h.
3184         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3185         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
3186         MUTEX(%edi) address in %edx rather than %ecx to
3187         __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
3188         and __lll_unlock_wake.
3189         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
3190         Include lowlevellock.h.
3191         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3192         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3193         MUTEX(%ebx) address in %edx rather than %ecx to
3194         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
3195         and __lll_unlock_wake.  Move return value from %ecx to %edx
3196         register.
3197         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
3198         lowlevellock.h.
3199         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
3200         define.
3201         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
3202         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
3203         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
3204         lowlevellock.h.
3205         (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
3206         (sem_timedwait): Use __NR_gettimeofday.
3207         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
3208         lowlevellock.h.
3209         (LOCK): Don't define.
3210         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
3211         lowlevellock.h.
3212         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3213         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
3214         are waiters.
3215         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
3216         2007-05-2{3,9} changes.
3217         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
3218         kernel-features.h and lowlevellock.h.
3219         (LOAD_PRIVATE_FUTEX_WAIT): Define.
3220         (LOAD_FUTEX_WAIT): Rewritten.
3221         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
3222         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
3223         (__lll_mutex_lock_wait): Rename to ...
3224         (__lll_lock_wait): ... this.  %esi is now private argument.
3225         Don't compile in for libc.so.
3226         (__lll_mutex_timedlock_wait): Rename to ...
3227         (__lll_timedlock_wait): ... this.  %esi contains private argument.
3228         Don't compile in for libc.so.
3229         (__lll_mutex_unlock_wake): Rename to ...
3230         (__lll_unlock_wake): ... this.  %esi contains private argument.
3231         Don't compile in for libc.so.
3232         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
3233         kernel-features.h and lowlevellock.h.
3234         (LOAD_FUTEX_WAIT): Define.
3235         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
3236         (__lll_robust_mutex_lock_wait): Rename to ...
3237         (__lll_robust_lock_wait): ... this.  %esi argument contains private.
3238         Use LOAD_FUTEX_WAIT macro.
3239         (__lll_robust_mutex_timedlock_wait): Rename to ...
3240         (__lll_robust_timedlock_wait): ... this. %esi argument contains
3241         private, use LOAD_FUTEX_WAIT macro.
3242         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
3243         lowlevellock.h.
3244         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3245         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
3246         PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
3247         __lll_lock_wait and __lll_unlock_wake.
3248         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
3249         Include lowlevellock.h and pthread-errnos.h.
3250         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3251         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
3252         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
3253         pass LLL_SHARED in %esi to both __lll_lock_wait and
3254         __lll_unlock_wake.
3255         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
3256         Include lowlevellock.h and pthread-errnos.h.
3257         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
3258         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
3259         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
3260         pass LLL_SHARED in %esi to both __lll_lock_wait and
3261         __lll_unlock_wake.
3262         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
3263         Include lowlevellock.h.
3264         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3265         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
3266         pass LLL_SHARED in %esi to both __lll_lock_wait and
3267         __lll_unlock_wake.
3268         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
3269         Include lowlevellock.h.
3270         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3271         (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
3272         to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
3273         and __lll_unlock_wake.
3274         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
3275         Include lowlevellock.h.
3276         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3277         Don't define.
3278         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
3279         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3280         and __lll_unlock_wake.
3281         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3282         Include lowlevellock.h.
3283         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3284         Don't define.
3285         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3286         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3287         and __lll_unlock_wake.
3288         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3289         Include lowlevellock.h.
3290         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3291         Don't define.
3292         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3293         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3294         and __lll_unlock_wake.
3295         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
3296         Include lowlevellock.h.
3297         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3298         Don't define.
3299         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
3300         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3301         and __lll_unlock_wake.
3302         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
3303         Include lowlevellock.h.
3304         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3305         Don't define.
3306         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3307         pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
3308         and __lll_unlock_wake.
3309         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
3310         lowlevellock.h.
3311         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
3312         define.
3313         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
3314         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
3315         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
3316         lowlevellock.h.
3317         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3318         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
3319         lowlevellock.h.
3320         (LOCK): Don't define.
3321         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
3322         lowlevellock.h.
3323         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3324         * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
3325         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
3326         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
3327         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
3328         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
3329         (__lll_lock_wait_private): New function.
3330         (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
3331         it to lll_futex_*wait.  Don't compile in for libc.so.
3332         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
3333         Remove.
3334         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
3335         (struct sparc_pthread_barrier): Remove.
3336         (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
3337         struct sparc_pthread_barrier.  Pass
3338         ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
3339         and lll_futex_wait macros.
3340         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3341         Remove.
3342         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3343         Include sparc pthread_barrier_wait.c instead of generic one.
3345 2007-07-30  Jakub Jelinek  <jakub@redhat.com>
3347         * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
3349         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
3350         (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
3351         %ecx.
3352         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
3353         (pthread_rwlock_timedwrlock): Likewise.
3354         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
3355         (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
3357 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
3359         * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
3361 2007-07-26  Jakub Jelinek  <jakub@redhat.com>
3363         * tst-locale2.c (useless): Add return statement.
3365 2007-07-24  Jakub Jelinek  <jakub@redhat.com>
3367         * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
3368         lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
3369         * pthread_create.c (start_thread): Likewise.
3370         * init.c (sighandler_setxid): Likewise.
3371         * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3372         * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3373         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3374         * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3375         * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3376         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3377         * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3378         * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3379         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
3380         Likewise.
3381         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
3382         Likewise.
3383         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
3384         Likewise.
3385         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
3386         __rtld_notify): Likewise.
3387         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
3388         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
3389         __pthread_once): Likewise.
3390         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
3391         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3392         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3393         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3394         (lll_futex_wait): Add private argument, define as wrapper around
3395         lll_futex_timed_wait.
3396         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3397         use __lll_private_flag macro.
3398         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3399         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3400         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
3401         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3402         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3403         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3404         (lll_futex_wait): Add private argument, define as wrapper around
3405         lll_futex_timed_wait.
3406         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3407         use __lll_private_flag macro.
3408         (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
3409         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3410         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
3411         Define.
3412         (lll_futex_timed_wait, lll_futex_wake): Use it.
3413         (lll_private_futex_wait, lll_private_futex_timed_wait,
3414         lll_private_futex_wake): Removed.
3415         * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
3416         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3417         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3418         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3419         (lll_futex_wait): Add private argument, define as wrapper around
3420         lll_futex_timed_wait.
3421         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3422         use __lll_private_flag macro.
3423         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3424         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3425         to lll_futex_*.
3426         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3427         (lll_private_futex_wait, lll_private_futex_timed_wait,
3428         lll_private_futex_wake): Removed.
3429         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
3430         Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
3431         (lll_private_futex_wait, lll_private_futex_timed_wait,
3432         lll_private_futex_wake): Removed.
3433         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
3434         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3435         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3436         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3437         (lll_futex_wait): Add private argument, define as wrapper around
3438         lll_futex_timed_wait.
3439         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3440         use __lll_private_flag macro.
3441         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3442         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3443         to lll_futex_*.
3444         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
3445         Define.
3446         (lll_futex_timed_wait, lll_futex_wake): Use it.
3447         (lll_private_futex_wait, lll_private_futex_timed_wait,
3448         lll_private_futex_wake): Removed.
3450 2007-07-27  Jakub Jelinek  <jakub@redhat.com>
3452         * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
3453         of the structure for sparc32.
3455 2007-07-26  Aurelien Jarno  <aurelien@aurel32.net>
3457         * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
3459 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
3461         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3462         code used when private futexes are assumed.
3463         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3464         Likewise.
3466 2007-07-23  Jakub Jelinek  <jakub@redhat.com>
3468         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3469         (__lll_private_flag): Define.
3470         (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
3471         (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
3472         __lll_private_flag.
3473         (lll_private_futex_wait, lll_private_futex_timedwait,
3474         lll_private_futex_wake): Define as wrapper around non-_private
3475         macros.
3476         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3477         (__lll_private_flag): Define.
3478         (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
3479         (lll_private_futex_wait, lll_private_futex_timedwait,
3480         lll_private_futex_wake): Define as wrapper around non-_private
3481         macros.
3483 2007-07-10  Steven Munroe  <sjmunroe@us.ibm.com>
3485         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
3486         parameter to lll_futex_wait call.
3487         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
3489         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3490         Replace lll_futex_wait with lll_private_futex_wait.
3491         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3492         Add LLL_SHARED parameter to lll_futex_wake().
3494         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
3495         LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
3496         lll_private_futex_wake.
3497         (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
3498         bit from private parm before syscall.
3499         (lll_futex_timed_wait): Likewise.
3500         (lll_futex_wake): Likewise.
3501         (lll_futex_wake_unlock): Likewise.
3502         (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
3503         (lll_robust_mutex_unlock): Likewise.
3504         (lll_mutex_unlock_force): Likewise.
3505         (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
3507 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
3509         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3510         compilation when unconditionally using private futexes.
3511         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3512         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3513         Likewise.
3514         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3515         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3517 2007-07-17  Jakub Jelinek  <jakub@redhat.com>
3519         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
3520         Define.
3522 2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3524         * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
3525         kernel-features.h.
3527 2007-05-16  Roland McGrath  <roland@redhat.com>
3529         * init.c (__nptl_initial_report_events): New variable.
3530         (__pthread_initialize_minimal_internal): Initialize pd->report_events
3531         to that.
3533 2007-06-22  Jakub Jelinek  <jakub@redhat.com>
3535         * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
3536         cpusetsize if pthread_getaffinity_np failed with ENOSYS.
3538 2007-06-19  Ulrich Drepper  <drepper@redhat.com>
3540         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
3541         implementation.
3543 2007-06-18  Ulrich Drepper  <drepper@redhat.com>
3545         * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
3546         * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
3547         * pthread_mutex_timedlock.c: Likewise.
3548         * pthread_mutex_trylock.c: Likewise.
3549         * pthread_mutex_unlock.c: Likewise.
3551 2007-06-17  Andreas Schwab  <schwab@suse.de>
3553         * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
3554         sections.
3556 2007-06-17  Ulrich Drepper  <drepper@redhat.com>
3558         * allocatestack.c (allocate_stack): Make code compile if
3559         __ASSUME_PRIVATE_FUTEX is set.
3561 2007-06-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3563         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
3564         (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
3565         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
3566         (__pthread_rwlock_wrlock): Likewise.
3567         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
3568         (pthread_rwlock_timedrdlock): Likewise.
3569         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
3570         (pthread_rwlock_timedwrlock): Likewise.
3571         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
3572         (__pthread_rwlock_unlock): Likewise.
3574 2007-06-10  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3576         * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
3577         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
3578         Split __flags into __flags, __shared, __pad1 and __pad2.
3579         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
3580         futexes if they are available.
3581         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
3582         in libc-lowlevellock.S allow using private futexes.
3583         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
3584         FUTEX_PRIVATE_FLAG.  Add additional parameter to lll_futex_wait,
3585         lll_futex_timed_wait and lll_futex_wake.  Change lll_futex_wait
3586         to call lll_futex_timed_wait.  Add lll_private_futex_wait,
3587         lll_private_futex_timed_wait and lll_private_futex_wake.
3588         (lll_robust_mutex_unlock): Fix typo.
3589         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
3590         field in futex command setup.
3591         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
3592         COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
3593         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
3594         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
3595         if they are available.  Remove clear_once_control.
3596         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
3597         futexes if they are available.
3598         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3599         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3600         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
3601         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3602         * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
3603         Wake only when there are waiters.
3604         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
3605         support.  Indicate that there are waiters.  Remove unnecessary
3606         extra cancellation test.
3607         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.  Removed
3608         left-over duplication of __sem_wait_cleanup.
3610 2007-06-07  Ulrich Drepper  <drepper@redhat.com>
3612         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
3613         parameter to lll_futex_wait, lll_futex_timed_wait, and
3614         lll_futex_wake.  Change lll_futex_wait to call lll_futex_timed_wait.
3615         Add lll_private_futex_wait, lll_private_futex_timed_wait, and
3616         lll_private_futex_wake.
3617         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3618         * allocatestack.c: Adjust use of lll_futex_* macros.
3619         * init.c: Likewise.
3620         * lowlevellock.h: Likewise.
3621         * pthread_barrier_wait.c: Likewise.
3622         * pthread_cond_broadcast.c: Likewise.
3623         * pthread_cond_destroy.c: Likewise.
3624         * pthread_cond_signal.c: Likewise.
3625         * pthread_cond_timedwait.c: Likewise.
3626         * pthread_cond_wait.c: Likewise.
3627         * pthread_create.c: Likewise.
3628         * pthread_mutex_lock.c: Likewise.
3629         * pthread_mutex_setprioceiling.c: Likewise.
3630         * pthread_mutex_timedlock.c: Likewise.
3631         * pthread_mutex_unlock.c: Likewise.
3632         * pthread_rwlock_timedrdlock.c: Likewise.
3633         * pthread_rwlock_timedwrlock.c: Likewise.
3634         * pthread_rwlock_unlock.c: Likewise.
3635         * sysdeps/alpha/tls.h: Likewise.
3636         * sysdeps/i386/tls.h: Likewise.
3637         * sysdeps/ia64/tls.h: Likewise.
3638         * sysdeps/powerpc/tls.h: Likewise.
3639         * sysdeps/pthread/aio_misc.h: Likewise.
3640         * sysdeps/pthread/gai_misc.h: Likewise.
3641         * sysdeps/s390/tls.h: Likewise.
3642         * sysdeps/sh/tls.h: Likewise.
3643         * sysdeps/sparc/tls.h: Likewise.
3644         * sysdeps/unix/sysv/linux/fork.c: Likewise.
3645         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
3646         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
3647         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
3648         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
3649         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3650         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
3651         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3652         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
3653         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
3654         Likewise.
3655         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
3656         * sysdeps/x86_64/tls.h: Likewise.
3658 2007-05-29  Ulrich Drepper  <drepper@redhat.com>
3660         * pthread_getattr_np.c: No need to install a cancellation handler,
3661         this is no cancellation point.
3662         * pthread_getschedparam.c: Likewise.
3663         * pthread_setschedparam.c: Likewise.
3664         * pthread_setschedprio.c: Likewise.
3665         * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
3666         lll_unlock_wake_cb.
3667         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3668         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3669         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3670         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3671         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3672         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3673         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
3674         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
3675         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3676         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
3677         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3678         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3680         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
3681         whether there are more than one thread makes no sense here since
3682         we only call the slow path if the locks are taken.
3683         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
3685         * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
3686         COND_NWAITERS_SHIFT.
3687         * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
3688         COND_CLOCK_BITS.
3689         * pthread_cond_init.c: Likewise.
3690         * pthread_cond_timedwait.c: Likewise.
3691         * pthread_cond_wait.c: Likewise.
3692         * pthread_condattr_getclock.c: Likewise.
3693         * pthread_condattr_setclock.c: Likewise.
3694         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
3695         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3696         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3697         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3698         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3700 2007-05-28  Jakub Jelinek  <jakub@redhat.com>
3702         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
3703         unistd.h.
3705         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
3706         insn suffix.
3707         (THREAD_GSCOPE_GET_FLAG): Remove.
3708         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
3709         * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
3710         changes.
3711         * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
3712         (THREAD_GSCOPE_GET_FLAG): Remove.
3713         (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
3714         instead of THREAD_GSCOPE_GET_FLAG.
3715         (THREAD_GSCOPE_SET_FLAG): Likewise.  Add atomic_write_barrier after
3716         it.
3717         * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3718         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3719         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3720         THREAD_GSCOPE_WAIT): Define.
3721         * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3722         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3723         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3724         THREAD_GSCOPE_WAIT): Define.
3725         * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3726         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3727         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3728         THREAD_GSCOPE_WAIT): Define.
3729         * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3730         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3731         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3732         THREAD_GSCOPE_WAIT): Define.
3734 2007-05-24  Richard Henderson  <rth@redhat.com>
3736         * descr.h (struct pthread): Add header.gscope_flag.
3737         * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3738         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3739         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3740         THREAD_GSCOPE_WAIT): Define.
3742 2007-05-27  Ulrich Drepper  <drepper@redhat.com>
3744         * init.c: Make it compile with older kernel headers.
3746         * tst-initializers1.c: Show through exit code which test failed.
3748         * pthread_rwlock_init.c: Also initialize __shared field.
3749         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
3750         element in rwlock structure into four byte elements.  One of them is
3751         the new __shared element.
3752         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
3753         Likewise.
3754         [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
3755         __shared, adjust names of other padding elements.
3756         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3757         * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
3758         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
3759         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
3760         FUTEX_PRIVATE_FLAG.
3761         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
3762         futex to use private operations if possible.
3763         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3764         Likewise.
3765         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3766         Likewise.
3767         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3768         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3769         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3770         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3771         Likewise.
3772         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3773         Likewise.
3774         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3775         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3777 2007-05-26  Ulrich Drepper  <drepper@redhat.com>
3779         * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
3780         * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
3781         * pthread_rwlock_timedrdlock.c: Likewise.
3782         * pthread_rwlock_tryrdlock.c: Likewise.
3784         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
3785         optimization.
3787         * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
3788         * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
3789         duplication of __sem_wait_cleanup.
3791         * allocatestack.c: Revert last change.
3792         * init.c: Likewise.
3793         * sysdeps/i386/tls.h: Likewise.
3794         * sysdeps/x86_64/tls.h: Likewise.
3795         * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
3796         header structure.
3797         * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
3799         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
3800         Add private field.
3801         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
3802         * pthread_barrier_init.c: Set private flag if pshared and private
3803         futexes are supported.
3804         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
3805         private field in futex command setup.
3806         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3808 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
3810         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
3811         support.
3812         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3813         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3814         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3815         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3816         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3818         * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
3819         * sem_init.c (__new_sem_init): Rewrite to initialize all three
3820         fields in the structure.
3821         (__old_sem_init): New function.
3822         * sem_open.c: Initialize all fields of the structure.
3823         * sem_getvalue.c: Adjust for renamed element.
3824         * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
3825         (gen-as-const-headers): Add structsem.sym.
3826         * sysdeps/unix/sysv/linux/structsem.sym: New file.
3827         * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
3828         struct new_sem.  Add struct old_sem.
3829         * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
3830         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
3831         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3832         * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
3833         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3834         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3835         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3836         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3837         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3838         * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
3839         * tst-sem10.c: New file.
3840         * tst-sem11.c: New file.
3841         * tst-sem12.c: New file.
3842         * tst-typesizes.c: Test struct new_sem and struct old_sem instead
3843         of struct sem.
3845 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
3846             Jakub Jelinek  <jakub@redhat.com>
3848         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3849         Move __pthread_enable_asynccancel right before futex syscall.
3850         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
3851         Likewise.
3853 2007-05-24  Jakub Jelinek  <jakub@redhat.com>
3855         * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
3856         THREAD_COPY_PRIVATE_FUTEX): Define.
3857         * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
3858         THREAD_COPY_PRIVATE_FUTEX): Define.
3859         * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
3860         * init.c (__pthread_initialize_minimal_internal): Use
3861         THREAD_SET_PRIVATE_FUTEX.
3863         * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
3864         (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
3865         THREAD_GSCOPE_FLAG_WAIT): Define.
3866         (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
3867         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
3868         * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
3869         PTR_DEMANGLE.
3870         (THREAD_GSCOPE_GET_FLAG): Define.
3871         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
3872         * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
3873         instead of ->header.gscope_flag directly.
3875 2007-05-23  Ulrich Drepper  <drepper@redhat.com>
3877         * init.c (__pthread_initialize_minimal_internal): Check whether
3878         private futexes are available.
3879         * allocatestack.c (allocate_stack): Copy private_futex field from
3880         current thread into the new stack.
3881         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
3882         futexes if they are available.
3883         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
3884         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
3885         in libc-lowlevellock.S allow using private futexes.
3886         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3887         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
3888         FUTEX_PRIVATE_FLAG.
3889         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3890         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
3891         if they are available.
3892         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
3893         * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
3894         * sysdeps/i386/tcb-offsets.sym: Likewise.
3895         * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
3896         * sysdeps/i386/tls.h (tcbhead_t): Likewise.
3898 2007-05-21  Ulrich Drepper  <drepper@redhat.com>
3900         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3901         Remove ptr_wait_lookup_done again.
3902         * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
3903         (__pthread_initialize_minimal_internal): Initialize
3904         _dl_wait_lookup_done pointer in _rtld_global directly.
3905         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3906         Remove code to code _dl_wait_lookup_done.
3907         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
3908         encrypted for now.
3910 2007-05-21  Jakub Jelinek  <jakub@redhat.com>
3912         * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
3913         pthread_mutex_init failed with ENOTSUP.
3915 2007-05-19  Ulrich Drepper  <drepper@redhat.com>
3917         * allocatestack.c (__wait_lookup_done): New function.
3918         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3919         Add ptr_wait_lookup_done.
3920         * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
3921         * pthreadP.h: Declare __wait_lookup_done.
3922         * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
3923         Define macros to implement reference handling of global scope.
3924         * sysdeps/x86_64/tls.h: Likewise.
3925         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3926         Initialize GL(dl_wait_lookup_done).
3928 2007-05-17  Ulrich Drepper  <drepper@redhat.com>
3930         [BZ #4512]
3931         * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
3932         is detected.
3933         * pthread_mutex_timedlock.c: Likewise.
3934         * pthread_mutex_trylock.c: Likewise.
3935         Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
3937         * Makefile (tests): Add tst-robust9 and tst-robustpi9.
3938         * tst-robust9.c: New file.
3939         * tst-robustpi9.c: New file.
3941         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
3942         unnecessary extra cancellation test.
3944 2007-05-14  Ulrich Drepper  <drepper@redhat.com>
3946         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
3947         extra cancellation test.
3948         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3950 2007-05-10  Ulrich Drepper  <drepper@redhat.com>
3952         * descr.h (struct pthread): Rearrange members to fill hole in
3953         64-bit layout.
3955         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
3956         (__pthread_setaffinity_new): If syscall was successful and
3957         RESET_VGETCPU_CACHE is defined, use it before returning.
3958         * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
3960 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
3962         [BZ #4455]
3963         * tst-align2.c: Include stackinfo.h.
3964         * tst-getpid1.c: Likewise.
3966 2007-05-02  Carlos O'Donell  <carlos@systemhalted.org>
3968         [BZ #4455]
3969         * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
3970         * tst-getpid1.c (do_test): Likewise.
3972         [BZ #4456]
3973         * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
3974         (allocate_stack): Likewise.
3976 2007-05-07  Ulrich Drepper  <drepper@redhat.com>
3978         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3979         (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
3980         (__lll_robust_timedlock_wait): Likewise.
3981         Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
3983 2007-05-06  Mike Frysinger  <vapier@gentoo.org>
3985         [BZ #4465]
3986         * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
3987         * tst-cancel4.c (tf_fdatasync): New test.
3989 2007-04-27  Ulrich Drepper  <drepper@redhat.com>
3991         [BZ #4392]
3992         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
3993         check mutexes like normal mutexes.
3995         [BZ #4306]
3996         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
3997         Initialize the whole sigevent structure to appease valgrind.
3999 2007-04-25  Ulrich Drepper  <drepper@redhat.com>
4001         * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
4002         * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
4004 2007-04-06  Ulrich Drepper  <drepper@redhat.com>
4006         * tst-locale1.c: Avoid warnings.
4007         * tst-locale2.c: Likewise.
4009 2007-03-19  Steven Munroe  <sjmunroe@us.ibm.com>
4011         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4012         (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
4014 2007-03-16  Jakub Jelinek  <jakub@redhat.com>
4016         * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
4017         __extern_always_inline where appropriate.
4018         * sysdeps/pthread/pthread.h: Likewise.
4020 2007-03-13  Richard Henderson  <rth@redhat.com>
4022         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
4023         separate cfi regions for the two subsections.
4025 2007-02-25  Ulrich Drepper  <drepper@redhat.com>
4027         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
4028         new thread, don't just decrement it.
4029         Patch by Suzuki K P <suzuki@in.ibm.com>.
4031 2007-02-21  Ulrich Drepper  <drepper@redhat.com>
4033         * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
4034         PTHFCT_CALL definition.
4036 2007-02-18  Ulrich Drepper  <drepper@redhat.com>
4038         * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
4039         available, don't use it.
4041 2007-02-09  Jakub Jelinek  <jakub@redhat.com>
4043         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4044         (__lll_mutex_timedlock_wait): Use correct pointer when we don't
4045         call into the kernel to delay.
4047 2007-01-18  Ulrich Drepper  <drepper@redhat.com>
4049         * tst-initializers1.c: We want to test the initializers as seen
4050         outside of libc, so undefined _LIBC.
4052         * pthread_join.c (cleanup): Avoid warning.
4054 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
4056         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4057         (__lll_timedwait_tid): Add unwind info.
4059         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
4060         function table, mangle the pointers.
4061         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
4062         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
4063         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
4064         demangle pointers before use.
4065         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
4066         demangle pointer.
4067         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
4068         * sysdeps/pthread/setxid.h: Likewise.
4070 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
4072         * tst-rwlock7.c: Show some more information in case of correct
4073         behavior.
4075 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
4077         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4078         (lll_futex_timed_wait): Undo part of last change, don't negate
4079         return value.
4081 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
4083         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
4084         FUTEX_CMP_REQUEUE and lll_futex_requeue.
4086 2006-12-28  David S. Miller  <davem@davemloft.net>
4088         * shlib-versions: Fix sparc64 linux target specification.
4090 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
4092         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
4093         Adjust include path for pthread_barrier_wait.c move.
4095 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
4097         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
4098         tid isn't reread from pd->tid in between ESRCH test and the syscall.
4100 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
4102         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
4103         6 argument cancellable syscalls.
4104         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
4105         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
4106         6 argument cancellable syscalls.
4107         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
4109 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
4111         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
4112         (__rtld_mrlock_initialize): Add missing closing parenthesis.
4114 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
4116         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
4117         __sync_lock_release instead of __sync_lock_release_si.
4119 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
4121         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
4122         Define.
4123         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
4124         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
4125         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4126         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4127         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4128         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4129         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4130         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4131         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4132         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4133         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4135 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
4137         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
4138         * pthread_barrier_wait.c: ...here.
4139         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
4140         * pthread_cond_broadcast.c: ...here.
4141         * sysdeps/pthread/pthread_cond_signal.c: Move to...
4142         * pthread_cond_signal.c: ...here.
4143         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
4144         * pthread_cond_timedwait.c: ...here.
4145         * sysdeps/pthread/pthread_cond_wait.c: Move to...
4146         * pthread_cond_wait.c: ...here.
4147         * sysdeps/pthread/pthread_once.c: Move to...
4148         * pthread_once.c: ...here.
4149         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
4150         * pthread_rwlock_rdlock.c: ...here.
4151         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
4152         * pthread_rwlock_timedrdlock.c: ...here.
4153         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
4154         * pthread_rwlock_timedwrlock.c: ...here.
4155         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
4156         * pthread_rwlock_unlock.c: ...here.
4157         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
4158         * pthread_rwlock_wrlock.c: ...here.
4159         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
4160         * pthread_spin_destroy.c: ...here.
4161         * sysdeps/pthread/pthread_spin_init.c: Move to...
4162         * pthread_spin_init.c: ...here.
4163         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
4164         * pthread_spin_unlock.c: ...here.
4165         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
4166         * pthread_getcpuclockid.c: ...here.
4168         * init.c: USE_TLS support is now always enabled.
4169         * tst-tls5.h: Likewise.
4170         * sysdeps/alpha/tls.h: Likewise.
4171         * sysdeps/i386/tls.h: Likewise.
4172         * sysdeps/ia64/tls.h: Likewise.
4173         * sysdeps/powerpc/tls.h: Likewise.
4174         * sysdeps/s390/tls.h: Likewise.
4175         * sysdeps/sh/tls.h: Likewise.
4176         * sysdeps/sparc/tls.h: Likewise.
4177         * sysdeps/x86_64/tls.h: Likewise.
4179 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
4181         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
4182         __rtld_mrlock_change): Update oldval if atomic compare and exchange
4183         failed.
4185         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4186         Define to THREAD_SELF->header.multiple_threads.
4187         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
4188         Likewise.
4189         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
4190         Likewise.
4191         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
4192         (SINGLE_THREAD_P): Likewise.
4193         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
4194         (SINGLE_THREAD_P): Likewise.
4195         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4196         (SINGLE_THREAD_P): Likewise.
4197         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
4198         (SINGLE_THREAD_P): Likewise.
4199         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
4200         Likewise.
4201         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
4202         (SINGLE_THREAD_P): Likewise.
4203         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
4204         (SINGLE_THREAD_P): Likewise.
4205         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
4206         Likewise.
4208 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
4210         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
4211         by default rather than 2_3_3.
4213 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
4215         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
4216         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
4217         atomic_* instead of catomic_* macros.
4219 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
4221         [BZ #3285]
4222         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
4223         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
4224         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4225         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4226         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4227         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
4228         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4229         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4230         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4231         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
4232         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4233         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4234         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4236 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
4238         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
4239         cancelable syscalls with six parameters.
4241         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
4242         operations instead of atomic_*.
4244 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
4246         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
4248 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
4250         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
4251         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
4252         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
4253         New file.
4254         * pthread_attr_setstack.c: Allow overwriting the version number of the
4255         new symbol.
4256         * pthread_attr_setstacksize.c: Likewise.
4257         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
4258         it.
4259         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
4260         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
4262 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
4264         [BZ #3251]
4265         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
4266         Patch by Petr Baudis.
4268 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
4270         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
4272         * tst-cancel2.c (tf): Loop as long as something was written.
4274 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4276         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
4277         mutexes wake all mutexes.
4278         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
4279         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
4280         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4282 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
4284         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
4285         to guarantee the thread is always canceled.
4287 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
4289         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
4290         Include stdlib.h.
4291         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
4292         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
4293         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4294         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4295         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4297 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
4299         [BZ #3123]
4300         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
4301         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
4302         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4303         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4304         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4305         * Makefile (tests): Add tst-cond22.
4306         * tst-cond22.c: New file.
4308 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
4310         [BZ #3124]
4311         * descr.h (struct pthread): Add parent_cancelhandling.
4312         * sysdeps/pthread/createthread.c (create_thread): Pass parent
4313         cancelhandling value to child.
4314         * pthread_create.c (start_thread): If parent thread was canceled
4315         reset the SIGCANCEL mask.
4316         * Makefile (tests): Add tst-cancel25.
4317         * tst-cancel25.c: New file.
4319 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
4320             Ulrich Drepper  <drepper@redhat.com>
4322         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
4323         counterp if it is already zero.
4324         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
4326 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
4327             Roland McGrath  <roland@redhat.com>
4329         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4330         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4331         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
4332         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4333         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4334         lll_robust_mutex_timedlock, lll_mutex_unlock,
4335         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4336         Add _L_*_ symbols around the subsection.
4337         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
4338         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
4340 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
4341             Roland McGrath  <roland@redhat.com>
4343         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4344         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4345         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
4346         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4347         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4348         lll_robust_mutex_timedlock, lll_mutex_unlock,
4349         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4350         Add _L_*_ symbols around the subsection.
4351         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
4352         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
4354 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
4356         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
4357         change because it can disturb too much existing code.  If real hard
4358         reader preference is needed we'll introduce another type.
4359         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4360         (pthread_rwlock_timedwrlock): Likewise.
4361         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4362         Likewise.
4364 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
4366         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
4367         reader preference.
4368         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4369         (pthread_rwlock_timedwrlock): Likewise.
4370         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4371         Likewise.
4373 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
4375         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
4376         Only define ifdef SHARED.
4378 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
4380         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
4381         (free_stacks): ...here.
4382         (__free_stack_cache): New function.
4383         * pthreadP.h: Declare __free_stack_cache.
4384         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
4385         ptr_freeres.
4386         * init.c (pthread_functions): Initialize ptr_freeres.
4387         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
4388         New freeres function.
4390 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
4392         [BZ #3018]
4393         * Makefile (extra-objs): Add modules to extra-test-objs instead.
4395 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
4397         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4398         _XOPEN_REALTIME_THREADS.
4400 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
4402         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
4403         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
4404         HAVE_CLOCK_GETTIME_VSYSCALL.
4405         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
4407 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
4409         * sysdeps/unix/sysv/linux/bits/posix_opt.h
4410         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
4411         * descr.h (struct priority_protection_data): New type.
4412         (struct pthread): Add tpp field.
4413         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
4414         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
4415         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
4416         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
4417         TPP mutexes.
4418         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
4419         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
4420         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
4421         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
4422         * tpp.c: New file.
4423         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
4424         boosted by TPP.
4425         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
4426         * pthread_mutexattr_getprioceiling.c
4427         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
4428         in the SCHED_FIFO priority range.
4429         * pthread_mutexattr_setprioceiling.c
4430         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
4431         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
4432         if mutex is not TPP.  Ceiling is now in __data.__lock.
4433         * pthread_mutex_setprioceiling.c: Include stdbool.h.
4434         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
4435         is now in __data.__lock.  Add locking.
4436         * pthread_create.c (__free_tcb): Free pd->tpp structure.
4437         * Makefile (libpthread-routines): Add tpp.
4438         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
4439         * tst-tpp.h: New file.
4440         * tst-mutexpp1.c: New file.
4441         * tst-mutexpp6.c: New file.
4442         * tst-mutexpp10.c: New file.
4443         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
4444         * tst-mutex6.c (TEST_FUNCTION): Likewise.
4446 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
4448         [BZ #2843]
4449         * pthread_join.c (pthread_join): Account for self being canceled
4450         when checking for deadlocks.
4451         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
4452         (tf1): Don't print anything after pthread_join returns, this would be
4453         another cancellation point.
4454         (tf2): Likewise.
4455         * tst-join6.c: New file.
4456         * Makefile (tests): Add tst-join6.
4458 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
4460         [BZ #2892]
4461         * pthread_setspecific.c (__pthread_setspecific): Check
4462         out-of-range index before checking for unused key.
4464         * sysdeps/pthread/gai_misc.h: New file.
4466 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
4468         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
4469         file.  Don't use sysctl.
4470         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
4471         overwrite the file if this is likely not true.
4473 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
4475         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
4476         * Makefile (tests): Add tst-getpid3.
4477         * tst-getpid3.c: New file.
4479 2006-07-30  Roland McGrath  <roland@redhat.com>
4481         * Makefile (libpthread-routines): Add ptw-sigsuspend.
4483         * sysdeps/unix/sysv/linux/i386/not-cancel.h
4484         (pause_not_cancel): New macro.
4485         (nanosleep_not_cancel): New macro.
4486         (sigsuspend_not_cancel): New macro.
4487         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
4488         nanosleep_not_cancel macro from <not-cancel.h>.
4489         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
4490         macro from <not-cancel.h>.
4492 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
4493             Jakub Jelinek  <jakub@redhat.com>
4495         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
4496         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
4497         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
4498         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
4499         * pthread_mutex_init.c: Add support for priority inheritance mutex.
4500         * pthread_mutex_lock.c: Likewise.
4501         * pthread_mutex_timedlock.c: Likewise.
4502         * pthread_mutex_trylock.c: Likewise.
4503         * pthread_mutex_unlock.c: Likewise.
4504         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
4505         all mutexes.
4506         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
4507         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
4508         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
4509         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
4510         pthread-pi-defines.sym.
4511         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
4512         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
4513         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4514         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
4515         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4516         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4517         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4518         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
4519         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
4520         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4521         _POSIX_THREAD_PRIO_INHERIT to 200112L.
4522         * tst-mutex1.c: Adjust to allow use in PI mutex test.
4523         * tst-mutex2.c: Likewise.
4524         * tst-mutex3.c: Likewise.
4525         * tst-mutex4.c: Likewise.
4526         * tst-mutex5.c: Likewise.
4527         * tst-mutex6.c: Likewise.
4528         * tst-mutex7.c: Likewise.
4529         * tst-mutex7a.c: Likewise.
4530         * tst-mutex8.c: Likewise.
4531         * tst-mutex9.c: Likewise.
4532         * tst-robust1.c: Likewise.
4533         * tst-robust7.c: Likewise.
4534         * tst-robust8.c: Likewise.
4535         * tst-mutexpi1.c: New file.
4536         * tst-mutexpi2.c: New file.
4537         * tst-mutexpi3.c: New file.
4538         * tst-mutexpi4.c: New file.
4539         * tst-mutexpi5.c: New file.
4540         * tst-mutexpi6.c: New file.
4541         * tst-mutexpi7.c: New file.
4542         * tst-mutexpi7a.c: New file.
4543         * tst-mutexpi8.c: New file.
4544         * tst-mutexpi9.c: New file.
4545         * tst-robust1.c: New file.
4546         * tst-robust2.c: New file.
4547         * tst-robust3.c: New file.
4548         * tst-robust4.c: New file.
4549         * tst-robust5.c: New file.
4550         * tst-robust6.c: New file.
4551         * tst-robust7.c: New file.
4552         * tst-robust8.c: New file.
4553         * Makefile (tests): Add the new tests.
4555         * pthread_create.c (start_thread): Add some casts to avoid warnings.
4556         * pthread_mutex_destroy.c: Remove unneeded label.
4558 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
4560         * pthread_mutex_init.c (__pthread_mutex_init): Move some
4561         computations to compile time.
4563 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
4565         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
4567 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
4569         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
4571 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
4573         * pthread_key_create.c (__pthread_key_create): Do away with
4574         __pthread_keys_lock.
4576         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4577         (__kernel_cpumask_size): Mark as hidden.
4578         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4580         * sem_open.c (__sem_mappings_lock): Mark as hidden.
4581         * semaphoreP.h (__sem_mappings_lock): Likewise.
4583 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
4585         * pthread_atfork.c: Mark __dso_handle as hidden.
4587 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
4589         [BZ #2644]
4590         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
4591         the reload problem.  Change the one path in pthread_cancel_init
4592         which causes the problem.  Force gcc to reload.  Simplify callers.
4593         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
4594         (_Unwind_GetBSP): Undo last patch.
4596 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
4598         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
4599         function pointer is reloaded after pthread_cancel_init calls.
4601         [BZ #2644]
4602         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
4603         pointers are reloaded after pthread_cancel_init calls.
4605 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
4607         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
4608         __always_inline.
4610 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
4612         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4613         Allocate new object which is passed to timer_sigev_thread so that
4614         the timer can be deleted before the new thread is scheduled.
4616 2006-04-26  Roland McGrath  <roland@redhat.com>
4618         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
4620 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
4622         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
4623         suffix for conditional jumps.
4624         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
4625         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4626         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
4627         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
4628         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4629         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4631         * init.c (sigcancel_handler): Compare with correct PID even if the
4632         thread is in the middle of a fork call.
4633         (sighandler_setxid): Likewise.
4634         Reported by Suzuki K P <suzuki@in.ibm.com> .
4636 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
4638         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
4640 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
4642         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
4643         fails [Coverity CID 105].
4645 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
4647         * sysdeps/pthread/pthread.h: Add nonnull attributes.
4649 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
4651         [BZ #2505]
4652         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
4653         Define __lll_rel_instr using lwsync.
4655 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
4657         * allocatestack.c (allocate_stack): Always initialize robust_head.
4658         * descr.h: Define struct robust_list_head.
4659         (struct pthread): Use robust_list_head in robust mutex list definition.
4660         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
4661         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
4662         (__pthread_initialize_minimal_internal): Register robust_list with
4663         the kernel.
4664         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
4665         Declare __set_robust_list_avail.
4666         * pthread_create.c (start_thread): Register robust_list of new thread.
4667         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
4668         waiters.
4669         * pthread_mutex_destroy.c: For robust mutexes don't look at the
4670         number of users, it's unreliable.
4671         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
4672         set_robust_list syscall is available.
4673         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
4674         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
4675         Set robust_head.list_op_pending before trying to lock a robust mutex.
4676         * pthread_mutex_timedlock.c: Likewise.
4677         * pthread_mutex_trylock.c: Likewise.
4678         * pthread_mutex_unlock.c: Likewise for unlocking.
4679         * Makefile (tests): Add tst-robust8.
4680         * tst-robust8.c: New file.
4682 2006-03-08  Andreas Schwab  <schwab@suse.de>
4684         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
4685         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
4687 2006-03-05  Roland McGrath  <roland@redhat.com>
4689         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
4690         and $config_os doesn't match *linux*.
4692 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
4694         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
4695         Use __syscall_error.
4696         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4697         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
4698         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
4699         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4700         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
4701         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
4703 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
4705         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
4707 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
4709         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
4710         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
4711         mutex.
4712         (__lll_robust_timedlock_wait): Likewise.
4713         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
4714         (__lll_robust_lock_wait): Likewise.
4715         (__lll_robust_timedlock_wait): Likewise.
4716         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
4717         (__lll_robust_lock_wait): Likewise.
4718         (__lll_robust_timedlock_wait): Likewise.
4720 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
4722         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
4723         lll_robust_mutex_trylock, lll_robust_mutex_lock,
4724         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
4725         lll_robust_mutex_unlock): Define.
4726         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
4728 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
4730         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
4731         instead of <clone.S>.
4733 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
4735         * Makefile (libpthread-routines): Add
4736         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
4737         and pthread_mutex_[sg]etprioceiling.
4738         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
4739         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
4740         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
4741         pthread_mutex_setprioceiling.
4742         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
4743         PTHREAD_PRIO_PROTECT): New enum values.
4744         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
4745         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
4746         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
4747         prototypes.
4748         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
4749         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
4750         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
4751         Define.
4752         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
4753         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
4754         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
4755         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
4756         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
4757         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
4758         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
4759         protocol mutexes.
4760         * pthread_mutex_getprioceiling.c: New file.
4761         * pthread_mutex_setprioceiling.c: New file.
4762         * pthread_mutexattr_getprioceiling.c: New file.
4763         * pthread_mutexattr_setprioceiling.c: New file.
4764         * pthread_mutexattr_getprotocol.c: New file.
4765         * pthread_mutexattr_setprotocol.c: New file.
4767 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
4769         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
4771 2006-02-27  Roland McGrath  <roland@redhat.com>
4773         * sysdeps/pthread/Subdirs: List nptl here too.
4774         * configure (libc_add_on_canonical): New variable.
4776         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
4778         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
4779         self to get main source tree's file.
4780         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
4781         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
4782         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
4783         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
4784         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
4785         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
4786         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
4787         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
4788         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
4789         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
4790         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
4791         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
4792         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
4794         * Makefile: Use $(sysdirs) in vpath directive.
4796         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
4797         (CPPFLAGS-timer_routines.c): Likewise.
4799         * Makeconfig (includes): Variable removed.
4801 2006-02-26  Roland McGrath  <roland@redhat.com>
4803         * sysdeps/generic/pt-raise.c: Moved to ...
4804         * pt-raise.c: ... here.
4805         * sysdeps/generic/lowlevellock.h: Moved to ...
4806         * lowlevellock.h: ... here.
4808 2006-02-23  Roland McGrath  <roland@redhat.com>
4810         * descr.h (struct pthread): Add final member `end_padding'.
4811         (PTHREAD_STRUCT_END_PADDING): Use it.
4813 2006-02-20  Roland McGrath  <roland@redhat.com>
4815         * sysdeps/mips: Directory removed, saved in ports repository.
4816         * sysdeps/unix/sysv/linux/mips: Likewise.
4818 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
4820         * tst-robust1.c: Add second mutex to check that the mutex list is
4821         handled correctly.
4823 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
4825         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
4826         lll_robust_mutex_trylock, lll_robust_mutex_lock,
4827         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
4828         lll_robust_mutex_unlock): New macros.
4829         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
4830         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4831         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4832         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4833         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
4835 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4837         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
4838         definitions.
4839         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
4841 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
4843         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4844         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
4845         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4846         (lll_robust_mutex_unlock): Likewise.
4848 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
4850         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
4851         Set robust_list.__next rather than robust_list.
4852         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4853         (__pthread_list_t): New typedef.
4854         (pthread_mutex_t): Replace __next and __prev fields with __list.
4855         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
4856         (__pthread_list_t): New typedef.
4857         (pthread_mutex_t): Replace __next and __prev fields with __list.
4858         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4859         (__pthread_list_t, __pthread_slist_t): New typedefs.
4860         (pthread_mutex_t): Replace __next and __prev fields with __list.
4861         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
4862         (__pthread_list_t, __pthread_slist_t): New typedefs.
4863         (pthread_mutex_t): Replace __next and __prev fields with __list.
4864         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
4865         (__pthread_list_t, __pthread_slist_t): New typedefs.
4866         (pthread_mutex_t): Replace __next and __prev fields with __list.
4867         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
4868         (__pthread_slist_t): New typedef.
4869         (pthread_mutex_t): Replace __next field with __list.
4871 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
4873         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
4874         PTHREAD_MUTEX_OWNERDEAD.
4875         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
4876         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
4877         * Makefile (libpthread-routines): Add lowlevelrobustlock.
4878         * pthread_create.c (start_thread): Very much simplify robust_list loop.
4879         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
4880         to PTHREAD_MUTEX_INCONSISTENT.
4881         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
4882         * pthread_mutex_lock.c: Reimplement robust mutex handling.
4883         * pthread_mutex_trylock.c: Likewise.
4884         * pthread_mutex_timedlock.c: Likewise.
4885         * pthread_mutex_unlock.c: Likewise.
4886         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4887         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
4888         lowlevelrobustlock.sym.
4889         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
4890         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
4891         definitions.
4892         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4893         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
4894         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
4895         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
4896         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
4898 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
4900         * allocatestack.c (allocate_stack): Initialize robust_list.
4901         * init.c (__pthread_initialize_minimal_internal): Likewise.
4902         * descr.h (struct xid_command): Pretty printing.
4903         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
4904         robust_list.  Adjust macros.
4905         * pthread_create.c (start_thread): Adjust robust_list handling.
4906         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
4907         but the owner for all robust mutex types.
4908         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
4909         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
4910         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4911         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
4913         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
4914         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
4916 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
4918         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
4919         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
4921 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4923         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
4924         Return status.
4925         (lll_futex_timed_wait): Define.
4927 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
4929         * tst-cancel4.c: Test ppoll.
4931 2006-01-18  Andreas Jaeger  <aj@suse.de>
4933         [BZ #2167]
4934         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
4935         (pthread_mutex_t): Follow changes for other archs.  Based on patch
4936         by Jim Gifford <patches@jg555.com>.
4938 2006-01-13  Richard Henderson  <rth@redhat.com>
4940         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
4942 2006-01-10  Roland McGrath  <roland@redhat.com>
4944         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
4945         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
4946         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
4947         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4948         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4949         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4950         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4951         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
4952         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4953         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4955 2006-01-09  Roland McGrath  <roland@redhat.com>
4957         * tst-initializers1-c89.c: New file.
4958         * tst-initializers1-c99.c: New file.
4959         * tst-initializers1-gnu89.c: New file.
4960         * tst-initializers1-gnu99.c: New file.
4961         * Makefile (tests): Add them.
4962         (CFLAGS-tst-initializers1-c89.c): New variable.
4963         (CFLAGS-tst-initializers1-c99.c): New variable.
4964         (CFLAGS-tst-initializers1-gnu89.c): New variable.
4965         (CFLAGS-tst-initializers1-gnu99.c): New variable.
4967         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4968         Use __extension__ on anonymous union definition.
4969         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4970         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4971         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4972         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4973         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4975 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
4977         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4978         Don't give the union a name because it changes the mangled name.
4979         Instead name the struct for __data.
4980         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
4981         Likewise.
4982         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
4983         Likewise.
4985 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
4987         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
4988         stack bias to mc_ftp field.
4990 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
4992         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
4993         being too clever and reloading the futex value where it shouldn't.
4995 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
4997         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
4998         correct type.
5000 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
5002         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
5003         Add cfi directives.
5005 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
5007         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
5008         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
5009         rename in tcbhead_t.
5011         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
5012         Don't give the union a name because it changes the mangled name.
5013         Instead name the struct for __data.
5014         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5015         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5016         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5017         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5018         * pthread_create.c (start_thread): Adjust robust mutex free loop.
5019         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
5021 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
5023         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5024         Return status.
5025         (lll_futex_timed_wait): Define.
5026         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5027         * sysdeps/pthread/aio_misc.h: New file.
5029 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
5031         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
5033 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
5035         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5036         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
5037         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
5039 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
5041         * tst-cancel24.cc: Use C headers instead of C++ headers.
5043 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
5045         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
5046         sparc-linux configured glibc.
5047         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
5048         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
5049         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
5050         atomic_compare_and_exchange_val_24_acq instead of
5051         atomic_compare_and_exchange_val_acq.
5052         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
5053         instead of atomic_exchange_rel.
5054         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
5055         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
5056         file.
5057         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
5058         file.
5059         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
5060         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
5061         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
5062         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
5063         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
5064         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
5065         New file.
5066         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
5067         New file.
5068         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
5069         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
5070         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
5071         file.
5072         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
5073         file.
5074         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
5076 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
5078         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
5079         mutex initializers.
5081 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
5083         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
5084         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5085         THREAD_COPY_POINTER_GUARD): Define.
5086         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
5087         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
5089 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
5091         * version.c: Update copyright year.
5093 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5095         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
5096         .eh_frame section, use cfi_* directives.
5097         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
5099 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
5101         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
5102         now.
5104 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
5106         * sysdeps/pthread/sigaction.c: Removed.
5107         * sigaction.c: New file.
5108         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
5110 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
5112         * Makefile (tests): Add tst-signal7.
5113         * tst-signal7.c: New file.
5115 2005-12-27  Roland McGrath  <roland@redhat.com>
5117         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
5118         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
5119         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
5120         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
5121         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
5122         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
5123         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
5124         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
5125         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
5126         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
5127         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
5129 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
5131         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
5132         and __prev field to pthread_mutex_t.
5133         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5134         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5135         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5136         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5137         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
5138         to pthread_mutex_t.
5140 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
5142         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
5143         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
5144         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
5145         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
5146         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
5147         and PTHREAD_MUTEXATTR_FLAG_BITS.
5148         * descr.h (struct pthread): Add robust_list field and define
5149         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
5150         * pthread_mutexattr_getrobust.c: New file.
5151         * pthread_mutexattr_setrobust.c: New file.
5152         * pthread_mutex_consistent.c: New file.
5153         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
5154         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
5155         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
5156         Adjust pthread_mutex_t initializers.
5157         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
5158         field to pthread_mutex_t.
5159         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
5160         and __prev field to pthread_mutex_t.
5161         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
5162         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
5163         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
5164         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
5165         * pthread_mutexattr_gettype.c: Likewise.
5166         * pthread_mutexattr_setpshared.c: Likewise.
5167         * pthread_mutexattr_settype.c: Likewise.
5168         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
5169         Initialize mutex kind according to robust flag.
5170         * pthread_mutex_lock.c: Implement local robust mutex.
5171         * pthread_mutex_timedlock.c: Likewise.
5172         * pthread_mutex_trylock.c: Likewise.
5173         * pthread_mutex_unlock.c: Likewise.
5174         * pthread_create.c (start_thread): Mark robust mutexes which remained
5175         locked as dead.
5176         * tst-robust1.c: New file.
5177         * tst-robust2.c: New file.
5178         * tst-robust3.c: New file.
5179         * tst-robust4.c: New file.
5180         * tst-robust5.c: New file.
5181         * tst-robust6.c: New file.
5182         * tst-robust7.c: New file.
5183         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
5184         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
5185         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
5186         tst-robust5, tst-robust6, and tst-robust7.
5188         * tst-typesizes.c: New file.
5189         * Makefile (tests): Add tst-typesizes.
5191         * tst-once3.c: More debug output.
5193 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
5195         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
5196         missing after last change.
5198         * version.c: Update copyright year.
5200 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
5202         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
5203         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
5204         * pthread_mutex_trylock.c: Likewise.
5205         * pthread_mutex_timedlock.c: Likewise.
5206         * pthread_mutex_unlock.c: Likewise.
5208 2005-12-22  Roland McGrath  <roland@redhat.com>
5210         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
5211         so that #include_next's search location is not reset to the -I..
5212         directory where <nptl/...> can be found.
5214 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
5216         [BZ #1913]
5217         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5218         Fix unwind info.  Remove useless branch prediction prefix.
5219         * tst-cancel24.cc: New file.
5220         * Makefile: Add rules to build and run tst-cancel24.
5222 2005-12-21  Roland McGrath  <roland@redhat.com>
5224         * libc-cancellation.c: Use <> rather than "" #includes.
5225         * pt-cleanup.c: Likewise.
5226         * pthread_create.c: Likewise.
5227         * pthread_join.c: Likewise.
5228         * pthread_timedjoin.c: Likewise.
5229         * pthread_tryjoin.c: Likewise.
5230         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
5231         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
5232         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
5233         * unwind.c: Likewise.
5235 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5237         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
5238         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
5239         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5240         THREAD_COPY_POINTER_GUARD): Define.
5242 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
5244         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
5245         rather than one.
5246         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5247         THREAD_COPY_POINTER_GUARD): Define.
5248         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
5249         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
5250         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5251         THREAD_COPY_POINTER_GUARD): Define.
5252         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
5253         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
5254         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
5255         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
5256         Use PTR_DEMANGLE for B0 if defined.
5258 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
5260         * pthread_create.c (__pthread_create_2_1): Use
5261         THREAD_COPY_POINTER_GUARD if available.
5262         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
5263         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
5264         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
5265         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
5266         * sysdeps/x86_64/tls.h: Likewise.
5268 2005-12-15  Roland McGrath  <roland@redhat.com>
5270         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
5272 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
5274         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
5275         sysdeps/generic.
5276         * errno-loc.c: New file.
5278 2005-12-12  Roland McGrath  <roland@redhat.com>
5280         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
5281         adjustments before choosing stack size.  Update minimum stack size
5282         calculation to match allocate_stack change.
5284 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
5286         * allocatestack.c (allocate_stack): Don't demand that there is an
5287         additional full page available on the stack beside guard, TLS, the
5288         minimum stack.
5290 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
5292         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5293         (__cleanup_fct_attribute): Use __regparm__ not regparm.
5295         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
5296         compiling 32-bit code we must define __cleanup_fct_attribute.
5298 005-11-24  Jakub Jelinek  <jakub@redhat.com>
5300         [BZ #1920]
5301         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
5302         __attribute__ instead of __attribute.
5303         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5304         (__cleanup_fct_attribute): Likewise.
5306 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
5308         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
5309         a write barrier before writing libgcc_s_getcfa.
5311 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
5313         * sysdeps/unix/sysv/linux/configure: Removed.
5315 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
5317         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
5318         optional init_array/fini_array support.
5320 2005-10-24  Roland McGrath  <roland@redhat.com>
5322         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
5323         versioned_symbol use.
5325 2005-10-16  Roland McGrath  <roland@redhat.com>
5327         * init.c (__pthread_initialize_minimal_internal): Even when using a
5328         compile-time default stack size, apply the minimum that allocate_stack
5329         will require, and round up to page size.
5331 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
5333         * Makefile ($(test-modules)): Remove static pattern rule.
5335 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
5336             Ulrich Drepper  <drepper@redhat.com>
5338         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
5339         alignment in callback function.
5340         * Makefile: Add rules to build and run tst-align3.
5341         * tst-align3.c: New file.
5343 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
5345         * allocatestack.c (setxid_signal_thread): Add
5346         INTERNAL_SYSCALL_DECL (err).
5348 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
5350         * allocatestack.c (setxid_signal_thread): Need to use
5351         atomic_compare_and_exchange_bool_acq.
5353 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
5354             Jakub Jelinek  <jakub@redhat.com>
5356         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
5357         CANCEL_RESTMASK.
5358         (struct pthread): Move specific_used field to avoid padding.
5359         Add setxid_futex field.
5360         * init.c (sighandler_setxid): Reset setxid flag and release the
5361         setxid futex.
5362         * allocatestack.c (setxid_signal_thread): New function.  Broken
5363         out of the bodies of the two loops in __nptl_setxid.  For undetached
5364         threads check whether they are exiting and if yes, don't send a signal.
5365         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
5366         * pthread_create.c (start_thread): For undetached threads, check
5367         whether setxid bit is set.  If yes, wait until signal has been
5368         processed.
5370         * allocatestack.c (STACK_VARIABLES): Initialize them.
5371         * pthread_create.c (__pthread_create_2_1): Initialize pd.
5373 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
5375         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
5376         waiters, awake all waiters on the associated mutex.
5378 2005-09-22  Roland McGrath  <roland@redhat.com>
5380         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
5381         ../sysdeps/x86_64/hp-timing.h).
5383 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
5385         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
5386         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5387         (lll_futex_wake_unlock): Define.
5388         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
5389         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5390         (lll_futex_wake_unlock): Define.
5391         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
5392         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5393         (lll_futex_wake_unlock): Define.
5394         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
5395         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5396         (lll_futex_wake_unlock): Define.
5397         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
5398         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5399         (lll_futex_wake_unlock): Define.
5400         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
5401         lll_futex_wake_unlock.
5402         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
5403         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5404         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5405         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
5406         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5407         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5409 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5411         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5412         Fix typo in register name.
5414 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
5416         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5417         Use __sigfillset.  Document that sigfillset does the right thing wrt
5418         to SIGSETXID.
5420 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
5422         [BZ #1102]
5423         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
5424         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
5425         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
5426         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
5427         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
5428         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
5429         in the structure.
5430         * Makefile (tests): Add tst-initializers1.
5431         (CFLAGS-tst-initializers1.c): Set.
5432         * tst-initializers1.c: New test.
5434 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
5436         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
5437         Make sure __flags are located at offset 48 from the start of the
5438         structure.
5440 2005-07-02  Roland McGrath  <roland@redhat.com>
5442         * Makeconfig: Comment fix.
5444 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
5446         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
5447         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
5448         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
5449         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
5450         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5451         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5452         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
5453         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
5454         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
5455         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5457 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
5459         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
5460         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5461         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
5462         fields.
5463         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5464         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
5465         field.  Put in sysinfo field unconditionally.
5466         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5467         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
5468         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5469         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
5470         fields.
5471         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5472         * pthread_create.c (__pthread_create_2_1): Use
5473         THREAD_COPY_STACK_GUARD macro.
5474         * Makefile: Add rules to build and run tst-stackguard1{,-static}
5475         tests.
5476         * tst-stackguard1.c: New file.
5477         * tst-stackguard1-static.c: New file.
5479 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
5481         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5482         Invoke CGOTSETUP and CGOTRESTORE.
5483         (CGOTSETUP, CGOTRESTORE): Define.
5485 2005-05-29  Richard Henderson  <rth@redhat.com>
5487         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
5488         (tf_write, tf_writev): Use it.
5489         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
5490         the system minimum.
5492 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
5494         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5495         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
5496         __librt_*_asynccancel@local.
5498 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
5500         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
5501         all occurrences of JUMPTARGET.  Instead append @local to labels.
5503 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
5505         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
5506         size/alignment of struct pthread rather than tcbhead_t.
5507         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5508         Likewise.
5509         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5510         Likewise.
5511         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5512         Likewise.
5514 2005-05-19  Richard Henderson  <rth@redhat.com>
5516         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
5517         __sync_val_compare_and_swap, not explicit _si variant.
5518         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
5520 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
5522         [BZ #915]
5523         * sysdeps/pthread/pthread.h: Avoid empty initializers.
5525 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
5527         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
5528         .eh_frame section, use cfi_* directives.
5530 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
5532         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
5533         of "" includes.
5535 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
5537         [BZ #1075]
5538         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
5539         aio_write blocks.
5541 2005-04-27  Roland McGrath  <roland@redhat.com>
5543         * Makefile (tests): Remove tst-clock2.
5545         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
5546         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
5547         translating to the kernel clockid_t for our own process/thread clock.
5549         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
5551 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
5553         * old_pthread_cond_init.c: Include <errno.h>.
5554         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
5555         process shared or uses clock other than CLOCK_REALTIME.
5556         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
5558 2005-04-13  David S. Miller  <davem@davemloft.net>
5560         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
5561         * sysdeps/sparc/sparc64/clone.S: New file.
5563 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
5565         [BZ #1102]
5566         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
5567         __inline instead of inline.
5568         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
5570 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
5572         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
5573         functionally equivalent, but shorter instructions.
5574         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5575         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5576         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5577         Likewise.
5578         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
5579         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5580         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5581         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5582         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5583         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
5584         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5585         Likewise.
5586         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5587         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5588         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5589         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
5590         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
5592 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
5594         * sysdeps/mips/Makefile: New file.
5595         * sysdeps/mips/nptl-sysdep.S: New file.
5596         * sysdeps/mips/tcb-offsets.sym: New file.
5597         * sysdeps/mips/pthread_spin_lock.S: New file.
5598         * sysdeps/mips/pthread_spin_trylock.S: New file.
5599         * sysdeps/mips/pthreaddef.h: New file.
5600         * sysdeps/mips/tls.h: New file.
5601         * sysdeps/mips/jmpbuf-unwind.h: New file.
5602         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
5603         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
5604         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
5605         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
5606         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
5607         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
5608         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
5609         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
5610         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
5611         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
5613 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
5615         [BZ #1112]
5616         * pthread_create.c (__pthread_create_2_1): Rename syscall error
5617         variable to scerr.
5619 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
5621         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
5623 2005-02-25  Roland McGrath  <roland@redhat.com>
5625         * alloca_cutoff.c: Correct license text.
5626         * tst-unload.c: Likewise.
5627         * sysdeps/pthread/allocalim.h: Likewise.
5628         * sysdeps/pthread/pt-initfini.c: Likewise.
5629         * sysdeps/pthread/bits/libc-lock.h: Likewise.
5630         * sysdeps/pthread/bits/sigthread.h: Likewise.
5631         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
5632         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
5634 2005-02-16  Roland McGrath  <roland@redhat.com>
5636         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
5637         Use unsigned int * for ptr_nthreads.
5639 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
5641         [BZ #721]
5642         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
5643         gcc4.
5645 2005-02-07  Richard Henderson  <rth@redhat.com>
5647         [BZ #787]
5648         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
5649         argument.
5651 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
5653         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
5654         order of arguments in invocation of atomic_add_zero.
5656 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
5658         [BZ #737]
5659         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
5660         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
5661         at least gotntpoff relocation and addition.
5662         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
5663         Likewise.
5664         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
5665         Likewise.
5666         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5667         Likewise.
5669 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
5671         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
5672         entry for static tls deallocation fix.
5673         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
5674         also contains information whether the memory pointed to is static
5675         TLS or not.
5676         * sysdeps/i386/tls.h: Likewise.
5677         * sysdeps/ia64/tls.h: Likewise.
5678         * sysdeps/powerpc/tls.h: Likewise.
5679         * sysdeps/s390/tls.h: Likewise.
5680         * sysdeps/sh/tls.h: Likewise.
5681         * sysdeps/sparc/tls.h: Likewise.
5682         * sysdeps/x86_64/tls.h: Likewise.
5684 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
5686         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
5688 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
5690         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
5691         %esp.
5692         * Makefile (tests): Add tst-align2.
5693         * tst-align2.c: New test.
5694         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
5695         -mpreferred-stack-boundary=4.
5697 2004-12-18  Roland McGrath  <roland@redhat.com>
5699         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
5700         New file removed withdrawn for the moment.
5702 2004-12-17  Richard Henderson  <rth@redhat.com>
5704         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
5705         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
5707 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
5709         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
5710         Increased PTHREAD_STACK_MIN.
5712         * tst-context1.c (stacks): Use bigger stack size.
5714 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
5716         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
5717         * sysdeps/sparc/tcb-offsets.sym: Add TID.
5719 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
5721         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
5722         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
5723         * sysdeps/s390/tcb-offsets.sym (TID): Add.
5725 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
5727         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
5729 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
5731         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
5732         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
5734         * tst-getpid1.c: If child crashes, report this first.  Print which
5735         signal.
5737 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
5739         * init.c (__pthread_initialize_minimal_internal): Also unblock
5740         SIGSETXID.
5742 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
5744         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
5745         _POSIX_THREAD_CPUTIME): Define to 0.
5746         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
5747         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
5748         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
5749         __timer_signal_thread_tclk): Remove.
5750         (init_module): Remove their initialization.
5751         (thread_cleanup): Remove their cleanup assertions.
5752         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
5753         __timer_signal_thread_tclk): Remove.
5754         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
5755         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
5756         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
5758 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
5760         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
5761         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
5763         * Makefile (tests): Add tst-getpid2.
5764         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
5765         (do_test): Use it.  Use __clone2 instead of clone on ia64.
5766         * tst-getpid2.c: New test.
5768 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5770         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
5772 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
5774         * Makefile (tests): Add tst-getpid1.
5775         * tst-getpid1.c: New file.
5776         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
5777         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
5779 2004-12-02  Roland McGrath  <roland@redhat.com>
5781         * Makefile (libpthread-nonshared): Variable removed.
5782         ($(objpfx)libpthread_nonshared.a): Target removed.
5783         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
5784         These are now handled by generic magic from
5785         libpthread-static-only-routines being set.
5787 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
5789         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
5790         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
5791         _POSIX_THREAD_PRIO_PROTECT): Define.
5792         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5793         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5794         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5796 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
5798         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
5799         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
5800         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
5801         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
5802         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5803         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5804         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5806 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
5808         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
5810         * Makefile (libpthread-routines): Add pthread_setschedprio.
5811         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
5812         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
5813         * pthread_setschedprio.c: New file.
5815 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
5817         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
5818         * pthread_cancel.c (pthread_create): Likewise.
5820         * Makefile (libpthread-routines): Add vars.
5821         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
5822         * init.c (__default_stacksize, __is_smp): Remove.
5823         * vars.c: New file.
5824         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
5825         and define a wrapper macro.
5826         (PTHREAD_STATIC_FN_REQUIRE): Define.
5827         * allocatestack.c (__find_thread_by_id): Undefine.
5828         * pthread_create (__pthread_keys): Remove.
5829         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
5830         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
5831         PTHREAD_STATIC_FN_REQUIRE.
5833 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5835         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
5836         parameter to REGISTER macro.
5838 2004-11-17  Roland McGrath  <roland@redhat.com>
5840         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
5841         Make sure SIGCANCEL is blocked as well.
5843 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
5845         * sysdeps/pthread/setxid.h: New file.
5846         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
5847         (struct xid_command): Add forward decl.
5848         (struct pthread_functions): Change return type of __nptl_setxid hook
5849         to int.
5850         * pthreadP.h (__nptl_setxid): Change return type to int.
5851         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
5852         calling thread, return its return value and set errno on failure.
5853         * descr.h (struct xid_command): Change id type to long array.
5855         * Makefile: Add rules to build and test tst-setuid1 and
5856         tst-setuid1-static.
5857         * tst-setuid1.c: New test.
5858         * tst-setuid1-static.c: New test.
5860 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
5862         * Makefile (tests): Add tst-exit3.
5863         * tst-exit3.c: New test.
5865 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
5867         * Makefile (tests): Add tst-exit2.
5868         * tst-exit2.c: New file.
5870 2004-11-09  Roland McGrath  <roland@redhat.com>
5872         [BZ #530]
5873         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
5874         here, before calling clone.
5875         * pthread_create.c (start_thread): Don't do it here.
5877 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
5879         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
5881 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
5883         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
5884         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
5885         assembler warning.
5887 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
5889         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
5890         if sched_priority is not between minprio and maxprio.
5892 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5894         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5895         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
5897         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
5898         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
5900 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
5902         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
5903         not-cancelable I/O functions.
5905 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5907         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
5908         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
5909         make sure 2 is stored in the futex and we looked at the old value.
5910         Fix a few other problems to return the correct value.
5912 2004-10-14  Richard Henderson  <rth@redhat.com>
5914         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
5915         make gcc4 happy.
5917 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
5919         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
5920         of pthread-functions.h and pthreaddef.h.
5921         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
5923         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5924         Change __data.__nwaiters from int to unsigned int.
5926         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
5927         sysconf (_SC_THREAD_CPUTIME) returns negative value.
5929         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
5930         before return type.
5932         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
5933         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
5935 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
5937         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
5938         test fails, remove message queue.
5939         (tf_msgsnd): Likewise.
5941 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
5943         * tst-clock1.c: Change #ifdef to #if defined.
5944         * tst-clock2.c: Likewise.
5945         * tst-cond11.c: Likewise.
5947         * sysdeps/pthread/timer_create.c (timer_create): Use
5948         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
5949         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
5950         THREAD_CPUTIME.
5952 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
5954         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
5955         _POSIX_THREAD_CPUTIME): Define to 0.
5957 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
5959         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
5960         and _POSIX_THREAD_CPUTIME to zero.
5961         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5962         * tst-barrier2.c: Fix testing for POSIX feature.
5963         * tst-clock1.c: Likewise.
5964         * tst-clock2.c: Likewise.
5965         * tst-cond11.c: Likewise.
5966         * tst-cond4.c: Likewise.
5967         * tst-cond6.c: Likewise.
5968         * tst-flock2.c: Likewise.
5969         * tst-mutex4.c: Likewise.
5970         * tst-mutex9.c: Likewise.
5971         * tst-rwlock12.c: Likewise.
5972         * tst-rwlock4.c: Likewise.
5973         * tst-signal1.c: Likewise.
5974         * tst-spin2.c: Likewise.
5975         * sysdeps/pthread/posix-timer.h: Likewise.
5976         * sysdeps/pthread/timer_create.c: Likewise.
5977         * sysdeps/pthread/timer_routines.c: Likewise.
5979 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
5981         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5982         (__lll_mutex_timedlock_wait): Address futex correctly.
5984         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5985         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
5986         make sure 2 is stored in the futex and we looked at the old value.
5987         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5988         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
5989         which might very well made the code not working at all before.
5990         [BZ #417]
5992 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
5994         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
5995         allow SIGSETXID to be sent.
5996         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
5997         for SIGSETXID to be defined.
5998         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
5999         SIGSETXID cannot be blocked.
6001         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6002         Add __extension__ to long long types.
6003         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6004         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6005         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6006         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6007         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
6008         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6009         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6011 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
6013         * descr.h (struct pthread): Add stopped_start field.
6014         * sysdeps/pthread/createthread.c (create_thread): Set
6015         start_stopped flag in descriptor for new thread appropriately.
6016         * pthread_create.c (start_thread): Only take lock to be stopped on
6017         startup if stopped_start flag says so.
6019 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
6021         * pthread_create.c (__pthread_create_2_1): Remember whether thread
6022         is created detached and if yes, do not try to free the stack in case
6023         the thread creation failed.
6024         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
6025         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
6026         case there has been no error.  [BZ #405]
6028         * pthread_create.c (start_thread): Don't wait for scheduler data
6029         etc to be set at the beginning of the function.  The cancellation
6030         infrastructure must have been set up.  And enable async
6031         cancellation before potentially going to sleep.  [BZ #401]
6033 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
6035         * Versions: Remove exports for pthread_set*id_np functions.
6036         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
6037         for now.
6038         * Makefile: Don't build pthread_set*id code for now.
6040 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
6042         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
6043         internal use.
6044         * allocatestack.c (__nptl_setxid): New function.
6045         * descr.h (struct xid_command): Define type.
6046         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
6047         (sighandler_setxid): New function.
6048         (__pthread_initialize_minimal): Register sighandler_setxid for
6049         SIGCANCEL.
6050         * pt-allocrtsig.c: Update comment.
6051         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
6052         Declare __nptl_setxid.
6053         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
6054         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
6055         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
6056         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
6057         and pthread_setresuid_np.
6058         * pthread_setgid_np.c: New file.
6059         * pthread_setuid_np.c: New file.
6060         * pthread_setegid_np.c: New file.
6061         * pthread_seteuid_np.c: New file.
6062         * pthread_setregid_np.c: New file.
6063         * pthread_setreuid_np.c: New file.
6064         * pthread_setresgid_np.c: New file.
6065         * pthread_setresuid_np.c: New file.
6066         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
6067         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
6068         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
6069         and pthread_setresuid_np.
6070         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
6071         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
6072         pthread_setregid, and pthread_setresgid.
6074 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
6076         * allocatestack.c (allocate_stack): Return EAGAIN instead of
6077         ENOMEM when out of memory.
6079 2004-09-10  Roland McGrath  <roland@redhat.com>
6081         [BZ #379]
6082         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
6083         code, since we don't try to use the broken CLONE_STOPPED any more.
6084         * pthread_create.c (start_thread): Likewise.
6086 2004-09-15  Richard Henderson  <rth@redhat.com>
6088         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
6090 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
6092         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
6093         (__libc_unwind_longjmp): Delete macro and declare as function.
6094         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
6095         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
6096         nptl directory.
6097         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
6098         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
6099         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
6101 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
6103         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
6104         for __USE_XOPEN2K.
6105         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
6106         types also for __USE_XOPEN2K.
6107         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6108         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6109         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6110         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6111         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6112         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6113         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6114         [BZ #320]
6116 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
6118         * sysdeps/pthread/pthread.h
6119         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
6120         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
6121         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
6122         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
6123         [BZ #375]
6125 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
6127         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
6128         PSEUDO to be used with . prefix.
6130         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
6131         Use atomic_increment instead of atomic_exchange_and_add.
6132         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
6133         Likewise.
6134         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
6135         Likewise.
6136         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
6137         Likewise.
6139         * allocatestack.c (allocate_stack): Use atomic_increment_val
6140         instead of atomic_exchange_and_add.
6141         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
6142         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
6143         Likewise.
6144         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6145         Likewise.
6147         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
6148         the initialization function might throw.
6150 2005-09-05  Richard Henderson  <rth@redhat.com>
6152         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
6153         Move definition inside libpthread, libc, librt check.  Provide
6154         definition for rtld.
6156 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
6158         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
6159         * sysdeps/i386/jmpbuf-unwind.h: Likewise
6160         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
6161         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
6162         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
6163         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
6164         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
6165         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
6166         * unwind.c: Use it.
6168         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6169         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
6170         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6171         Likewise.
6172         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
6173         Decrement __nwaiters.  If pthread_cond_destroy has been called and
6174         this is the last waiter, signal pthread_cond_destroy caller and
6175         avoid using the pthread_cond_t structure after unlock.
6176         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6177         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6178         Read clock type from the least significant bits of __nwaiters instead
6179         of __clock.
6180         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6181         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
6183 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
6185         [BZ #342]
6186         * Makefile (tests): Add tst-cond20 and tst-cond21.
6187         * tst-cond20.c: New test.
6188         * tst-cond21.c: New test.
6189         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
6190         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
6191         it unsigned int.
6192         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6193         Likewise.
6194         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6195         (pthread_cond_t): Likewise.
6196         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6197         Likewise.
6198         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6199         Likewise.
6200         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6201         Likewise.
6202         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
6203         (cond_nwaiters): New.
6204         (clock_bits): New.
6205         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
6206         if there are waiters not signalled yet.
6207         Wait until all already signalled waiters wake up.
6208         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
6209         __nwaiters.  If pthread_cond_destroy has been called and this is the
6210         last waiter, signal pthread_cond_destroy caller and avoid using
6211         the pthread_cond_t structure after unlock.
6212         (__pthread_cond_wait): Increment __nwaiters in the beginning,
6213         decrement it when leaving.  If pthread_cond_destroy has been called
6214         and this is the last waiter, signal pthread_cond_destroy caller.
6215         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6216         Likewise.  Read clock type from the least significant bits of
6217         __nwaiters instead of __clock.
6218         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
6219         whether clock ID can be encoded in COND_CLOCK_BITS bits.
6220         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
6221         clock type just from the last COND_CLOCK_BITS bits of value.
6222         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
6223         instead of __clock, just from second bit of condattr's value.
6225 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
6227         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
6228         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
6229         != 64.
6230         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6232 2004-08-15  Roland McGrath  <roland@frob.com>
6234         * pthread_atfork.c: Update copyright terms including special exception
6235         for these trivial files, which are statically linked into executables
6236         that use dynamic linking for the significant library code.
6238 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
6240         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
6241         pthread_rwlock_rdlock.
6242         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
6243         Decrease __nr_readers_queued after reacquiring lock.
6244         * sysdeps/pthread/pthread_rwlock_timedrdlock
6245         (pthread_rwlock_timedrdlock): Likewise.
6246         Reported by Bob Cook <bobcook47@hotmail.com>.
6248 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
6250         * tst-rwlock14.c (tf): Read main thread handle from *ARG
6251         before pthread_barrier_wait.
6253 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
6255         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
6256         Remove unnecessary exception handling data.
6258 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
6260         [BZ #284]
6261         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
6262         instead of clockid_t.
6264 2004-07-21  Roland McGrath  <roland@redhat.com>
6266         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
6268 2004-07-19  Roland McGrath  <roland@redhat.com>
6270         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
6272 2004-07-02  Roland McGrath  <roland@redhat.com>
6274         * configure: Don't exit.
6276 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6278         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6279         (__pthread_cond_timedwait): Check for invalid nanosecond in
6280         timeout value.
6282 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
6284         * Makefile: Add rules to build and run tst-fini1.
6285         * tst-fini1.c: New file.
6286         * tst-fini1mod.c: New file.
6288 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
6290         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
6291         if no cancellation support is needed.
6292         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6293         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6294         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6295         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6296         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6297         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6298         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6299         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
6300         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
6302         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
6303         only if not already defined.
6305 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
6307         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
6308         constraint "m" instead of "0" for futex.
6310         * shlib-versions: Add powerpc64-.*-linux.*.
6312 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
6314         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
6315         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
6316         for valid tv_nsec.
6317         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
6318         1 billion and 64-bit tv_nsec which is valid when truncated to 32
6319         bits.
6321 2004-06-29  Roland McGrath  <roland@redhat.com>
6323         * Banner: NPTL no longer has its own version number.
6324         * Makefile (nptl-version): Variable removed.
6325         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
6326         using $(version), the glibc version number.
6328 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6330         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6331         Fix branch offset for a PLT entry.
6332         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
6333         Likewise.
6334         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
6335         Likewise.
6336         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
6337         Likewise.
6338         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
6339         Likewise.
6341 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
6343         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
6344         unconditionally.
6346 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
6348         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
6349         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
6350         instead of tv_sec.
6351         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
6352         (pthread_rwlock_timedrdlock): Likewise.
6354 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
6356         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6357         Set __r7 to val, not mutex.
6359 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
6361         * Makefile: Add rules to build tst-rwlock14.
6362         * tst-rwlock14.c: New file.
6364 2004-06-24  Boris Hu  <boris.hu@intel.com>
6366         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
6367         check.
6368         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6370 2004-06-19  Andreas Jaeger  <aj@suse.de>
6372         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
6373         assembler in last patch.
6375 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
6377         * sysdeps/pthread/pthread_cond_timedwait.c
6378         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
6379         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6380         (__pthread_cond_timedwait): Check for invalid nanosecond in
6381         timeout value.
6382         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6383         * tst-cond19.c: New file.
6384         * Makefile: Add rules to build and run tst-cond19.
6386 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
6388         * tst-context1.c (GUARD_PATTERN): Defined.
6389         (tst_context_t): Define struct containing ucontext_t & guard words.
6390         (ctx): Declare as an array of tst_context_t.
6391         (fct): Verify uc_link & guard words are still valid.
6392         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
6394 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6396         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6397         Add __data.__futex field, reshuffle __data.__clock.
6398         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
6399         (__pthread_cond_signal): Increment __futex at the same time as
6400         __wakeup_seq or __total_seq.  Pass address of __futex instead of
6401         address of low 32-bits of __wakeup_seq to futex syscall.
6402         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6403         (__pthread_cond_wait): Likewise.  Pass __futex value from before
6404         releasing internal lock to FUTEX_WAIT.
6405         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6406         (__pthread_cond_timedwait): Likewise.
6407         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6408         (FUTEX_CMP_REQUEUE): Define.
6409         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6410         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6411         Pass __futex value from before the unlock and __futex address instead
6412         of address of low 32-bits of __wakeup_seq to futex syscall.
6413         Fallback to FUTEX_WAKE all on any errors.
6415 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
6417         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
6418         comment typo.
6419         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
6420         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
6421         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
6422         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
6423         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
6425 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
6427         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
6428         Add memory clobber to inline assembly.
6429         (__lll_mutex_trylock): Likewise.
6430         (__lll_mutex_cond_trylock): Likewise.
6432 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
6434         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6435         Pass val argument as 6th system call argument in %r7.
6437 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
6439         * Makefile (tests): Add tst-cond16.
6440         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
6441         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
6442         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6443         Add __data.__futex field, reshuffle __data.__clock.
6444         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
6445         (__pthread_cond_signal): Increment __futex at the same time as
6446         __wakeup_seq or __total_seq.  Pass address of __futex instead of
6447         address of low 32-bits of __wakeup_seq to futex syscall.
6448         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
6449         (__pthread_cond_wait): Likewise.  Pass __futex value from before
6450         releasing internal lock to FUTEX_WAIT.
6451         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
6452         (__pthread_cond_timedwait): Likewise.
6453         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
6454         (FUTEX_CMP_REQUEUE): Define.
6455         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6456         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6457         Pass __futex value from before the unlock and __futex address instead
6458         of address of low 32-bits of __wakeup_seq to futex syscall.
6459         Fallback to FUTEX_WAKE all on any errors.
6460         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
6461         Define.
6462         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6463         internally.  Return non-zero if error, zero if success.
6464         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6465         Add __data.__futex field, reshuffle __data.__clock.
6466         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
6467         Define.
6468         (lll_futex_requeue): Add val argument, return 1 unconditionally
6469         for the time being.
6470         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6471         Add __data.__futex field, reshuffle __data.__clock.
6472         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6473         Define.
6474         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6475         internally.  Return non-zero if error, zero if success.
6476         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6477         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
6478         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6479         Define.
6480         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6481         internally.  Return non-zero if error, zero if success.
6482         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6483         Add __data.__futex field, reshuffle __data.__clock.
6484         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
6485         Define.
6486         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6487         internally.  Return non-zero if error, zero if success.
6488         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6489         Add __data.__futex field, reshuffle __data.__clock.
6490         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6491         Add __data.__futex field, reshuffle __data.__clock.
6492         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
6493         Increment __futex at the same time as __wakeup_seq or __total_seq.
6494         Pass address of __futex instead of address of low 32-bits of
6495         __wakeup_seq to futex syscall.
6496         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6497         Pass __futex value from before releasing internal lock
6498         to FUTEX_WAIT.
6499         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6500         Likewise.  Avoid unnecessary shadowing of variables.
6501         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
6502         Set __futex to 2 * __total_seq.  Pass __futex value from before the
6503         unlock and __futex address instead of address of low 32-bits of
6504         __wakeup_seq to futex_requeue macro, adjust for new return value
6505         meaning.
6506         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
6507         (__pthread_cond_signal): Increment __futex at the same time as
6508         __wakeup_seq or __total_seq.  Pass address of __futex instead of
6509         address of low 32-bits of __wakeup_seq to futex syscall.
6510         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
6511         (__pthread_cond_wait): Likewise.  Pass __futex value from before
6512         releasing internal lock to FUTEX_WAIT.
6513         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6514         (__pthread_cond_timedwait): Likewise.
6515         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6516         (FUTEX_CMP_REQUEUE): Define.
6517         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6518         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6519         Pass __futex value from before the unlock and __futex address instead
6520         of address of low 32-bits of __wakeup_seq to futex syscall.
6521         Fallback to FUTEX_WAKE all on any errors.
6523 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6525         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
6526         Add nop to align the end of critical section.
6527         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
6529 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6531         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6532         Add __broadcast_seq field.
6533         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
6534         all waiters as woken with woken_seq and bump broadcast counter.
6535         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
6536         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
6537         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6538         Comment typo fixes.  Avoid returning -ETIMEDOUT.
6540 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
6542         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6543         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
6544         Reported by Kaz Kojima.
6546 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
6548         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
6550 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
6552         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
6553         __broadcast_seq with bc_seq after acquiring internal lock instead of
6554         before it.
6556 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
6558         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
6559         compilation.
6560         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6561         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
6562         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6563         (pthread_cond_t): Add __data.__broadcast_seq field.
6564         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6565         (FRAME_SIZE): Define.
6566         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
6567         Comment typo fixes.
6568         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
6569         Define.
6570         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
6571         typo fixes.
6572         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6573         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
6574         fixes.
6576 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
6578         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
6579         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6580         Add __broadcast_seq field.
6581         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6582         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6583         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6584         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6585         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6586         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
6587         all waiters as woken with woken_seq and bump broadcast counter.
6588         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
6589         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
6590         __broadcast_seq field.
6591         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6592         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6593         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
6594         * pthread_cond_init.c: Initialize __broadcast_seq field.
6595         * Makefile (tests): Add tst-cond17 and tst-cond18.
6596         Add .NOTPARALLEL goal.
6597         * tst-cond16.c: New file.  From Jakub.
6598         * tst-cond17.c: New file.  From Jakub.
6599         * tst-cond18.c: New file.  From Jakub.
6601 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
6603         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
6604         unwind info.
6606         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
6607         Parametrize frame size.  Correct some unwind info.
6608         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6610 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
6612         * tst-stack3.c: Note testing functionality beyond POSIX.
6614 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
6616         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
6617         Change conditional from ifdef to if.
6619 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
6621         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
6622         SYSDEP_CANCEL_ERROR): Define.
6623         (PSEUDO): Use it.
6625 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
6627         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
6629 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
6631         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
6633 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6635         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
6636         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6637         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
6638         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6640 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
6642         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
6643         thread has all signals blocked.
6645 2004-04-18  Andreas Jaeger  <aj@suse.de>
6647         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
6648         (SEM_VALUE_MAX): Add missing brace.
6650 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
6652         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
6653         in rt subdir.
6654         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
6655         * sysdeps/pthread/tst-mqueue8x.c: New test.
6656         * tst-cancel4.c: Update comment about message queues.
6658         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
6659         return it_value { 0, 0 }.
6660         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
6661         like SIGEV_SIGNAL.
6662         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
6663         assertion for SIGEV_NONE.
6664         (thread_attr_compare): Compare all attributes, not just a partial
6665         subset.
6667 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
6669         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
6671 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
6673         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
6674         Just use a plain number.
6675         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
6676         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
6677         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
6678         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
6679         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
6680         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
6681         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6683 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6685         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
6686         frame info.
6687         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6689 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
6691         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
6692         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
6693         of calling sigwaitinfo.
6695 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
6697         * allocatestack.c (allocate_stack): Set reported_guardsize
6698         unconditionally.
6699         * pthread_getattr_np.c (pthread_getattr_np): Use
6700         reported_guardsize instead of guardsize.
6701         * descr.h (struct pthread): Add reported_guardsize field.
6703 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
6705         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
6707 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
6709         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
6711 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
6713         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
6714         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
6715         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
6716         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
6717         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
6718         Define.
6719         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
6720         (_POSIX_MESSAGE_PASSING): Define.
6721         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
6722         (_POSIX_MESSAGE_PASSING): Define.
6723         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
6724         (_POSIX_MESSAGE_PASSING): Define.
6726 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
6728         * tst-context1.c (fct): Check whether correct stack is used.
6730 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
6732         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
6733         matching constraints for asm mem parameters.
6735         * tst-clock2.c (tf): Don't define unless needed.
6737 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
6739         * Makefile (link-libc-static): Use $(static-gnulib) instead of
6740         $(gnulib).
6742 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
6744         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
6745         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
6746         * pthreadP.h: Declare __nptl_deallocate_tsd.
6747         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
6748         Adjust caller.
6750         * Makefile (tests): Add tst-tsd5.
6751         * tst-tsd5.c: New file.
6753 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
6755         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6756         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
6757         is SHLIB_COMPAT check.
6758         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
6759         (__pthread_attr_getaffinity_old): Likewise.
6760         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6761         (__pthread_getaffinity_old): Likewise.
6762         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6763         (__pthread_setaffinity_old): Likewise.
6765 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
6767         * allocatestack.c (_make_stacks_executable): Call
6768         _dl_make_stack_executable first.
6770 2004-03-24  Roland McGrath  <roland@redhat.com>
6772         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
6773         constraint instead of "0".
6775 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
6777         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6778         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
6780         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
6781         code to avoid warning.
6783 2004-03-24  Andreas Jaeger  <aj@suse.de>
6785         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6786         (__pthread_attr_setaffinity_old): Remove const.
6788 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
6790         * sysdeps/unix/sysv/linux/smp.h: New file.
6791         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
6792         * init.c: Define __is_smp.
6793         (__pthread_initialize_minimal_internal): Call is_smp_system to
6794         initialize __is_smp.
6795         * pthreadP.h: Declare __is_smp.
6796         Define MAX_ADAPTIVE_COUNT is necessary.
6797         * pthread_mutex_init.c: Add comment regarding __spins field.
6798         * pthread_mutex_lock.c: Implement adaptive mutex type.
6799         * pthread_mutex_timedlock.c: Likewise.
6800         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
6801         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
6802         Add __spins field.
6803         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6804         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6805         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6806         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6807         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6808         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6809         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6810         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
6811         lll_mutex_cond_trylock.
6812         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6813         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6814         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6815         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6816         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6817         Define BUSY_WAIT_NOP.
6818         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6819         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6821         * tst-mutex5.c: Add support for testing adaptive mutexes.
6822         * tst-mutex7.c: Likewise.
6823         * tst-mutex5a.c: New file.
6824         * tst-mutex7a.c: New file.
6825         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
6827         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6828         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
6829         vgettimeofday call might destroy the content.
6831         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
6832         @pause in the loop.
6834         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
6835         No need to restrict type of ret.  Make it int.  Add comment.
6837         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
6838         Remove unnecessary setne instruction.
6840 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
6842         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6843         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
6844         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
6845         If realloc fails, break out of the loop.
6847 2004-03-20  Andreas Jaeger  <aj@suse.de>
6849         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6850         (__pthread_setaffinity_old): Fix interface.
6851         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6852         (__pthread_getaffinity_old): Likewise.
6854         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6855         (__pthread_setaffinity_new): Remove duplicate declaration.
6857 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6859         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
6860         the return value to a safe register.
6861         (CDISABLE): Set the function argument correctly.
6863 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6865         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
6866         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
6867         Rewrite so that only one locked memory operation per round is needed.
6868         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
6869         (pthread_barrier_wait): After wakeup, release lock only when the
6870         last thread stopped using the barrier object.
6871         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6872         (__pthread_cond_wait): Don't store mutex address if the current
6873         value is ~0l.  Add correct cleanup support and unwind info.
6874         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6875         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6876         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
6877         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
6878         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6879         Add correct cleanup support and unwind info.
6880         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
6881         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
6882         information for syscall wrappers.
6884 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
6886         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6887         cpusetsize field, remove next.
6888         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
6889         parameter for size of the CPU set.
6890         (pthread_setaffinity_np): Likewise.
6891         (pthread_attr_getaffinity_np): Likewise.
6892         (pthread_attr_setaffinity_np): Likewise.
6893         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
6894         interface change, keep compatibility code.
6895         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
6896         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
6897         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
6898         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
6899         __pthread_getaffinity_np.
6900         * Versions: Add version for changed interfaces.
6901         * tst-attr3.c: Adjust test for interface change.
6902         * pthread_getattr_np.c: Query the kernel about the affinity mask with
6903         increasing buffer sizes.
6904         * pthread_attr_destroy.c: Remove unused list handling.
6905         * pthread_attr_init.c: Likewise.
6907 2004-03-17  Roland McGrath  <roland@redhat.com>
6909         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
6910         first argument to clock_getres so we ever enable kernel timers.
6912 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
6914         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
6916 2004-03-12  Richard Henderson  <rth@redhat.com>
6918         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
6919         oldvalue from CENABLE to CDISABLE.
6921 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
6923         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
6924         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
6925         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
6926         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
6928 2004-03-11  Richard Henderson  <rth@redhat.com>
6930         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
6931         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
6932         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
6934 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
6936         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
6937         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
6938         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
6940 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
6942         * forward.c (__pthread_cond_broadcast_2_0,
6943         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
6944         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
6945         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
6947 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6949         * sysdeps/sh/tcb-offsets.sym: Add PID.
6950         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
6951         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
6953 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
6955         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
6956         include <sysdep-cancel.h>, vfork is no cancellation point.
6957         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
6958         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
6959         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
6961 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
6963         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
6964         libc_hidden_def.
6965         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
6966         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
6967         Likewise.
6968         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
6969         Likewise.
6970         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
6971         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
6972         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
6973         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
6974         of DO_CALL_VIA_BREAK.  Work around a gas problem.
6976         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
6977         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
6978         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
6979         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
6980         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
6981         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
6983         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
6984         a local register for saving old PID.  Negate PID in parent upon exit.
6986         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
6987         tcb-offsets.h.
6988         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
6989         before syscall, set to the old value in the parent afterwards.
6990         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
6991         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
6992         tcb-offsets.h.
6993         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
6994         before syscall, set to the old value in the parent afterwards.
6995         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
6996         * sysdeps/s390/tcb-offsets.sym: Add PID.
6998         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
6999         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
7000         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
7001         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
7002         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
7003         * sysdeps/sparc/tcb-offsets.sym: Add PID.
7005 2004-03-10  Andreas Schwab  <schwab@suse.de>
7007         * sysdeps/ia64/tcb-offsets.sym: Add PID.
7008         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
7009         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
7011 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
7013         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
7014         * tst-cancel21.c (do_one_test): Likewise.
7015         Reported by Gordon Jin <gordon.jin@intel.com>.
7017 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
7019         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
7020         if non-zero and set to INT_MIN if zero.
7021         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
7022         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
7023         (SAVE_PID, RESTORE_PID): Define.
7024         (__vfork): Use it.
7025         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
7026         Use relative path to avoid including NPTL i386/vfork.S.
7027         (SAVE_PID, RESTORE_PID): Define.
7028         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
7029         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
7030         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
7031         tst-vfork2x.
7032         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
7033         * tst-vfork1.c: New test.
7034         * tst-vfork2.c: New test.
7035         * tst-vfork1x.c: New test.
7036         * tst-vfork2x.c: New test.
7038 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
7040         * sysdeps/i386/tcb-offsets.sym: Add PID.
7041         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7042         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
7043         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
7045 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
7047         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
7049 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
7051         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
7052         _rtld_global_ro.
7054 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
7056         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
7057         _rtld_global_ro.
7059         * tst-once4.c: Remove unnecessary macro definition.
7061         * tst-mutex7.c (do_test): Limit thread stack size.
7062         * tst-once2.c (do_test): Likewise.
7063         * tst-tls3.c (do_test): Likewise.
7064         * tst-tls1.c (do_test): Likewise.
7065         * tst-signal3.c (do_test): Likewise.
7066         * tst-kill6.c (do_test): Likewise.
7067         * tst-key4.c (do_test): Likewise.
7068         * tst-join4.c (do_test): Likewise.
7069         * tst-fork1.c (do_test): Likewise.
7070         * tst-context1.c (do_test): Likewise.
7071         * tst-cond2.c (do_test): Likewise.
7072         * tst-cond10.c (do_test): Likewise.
7073         * tst-clock2.c (do_test): Likewise.
7074         * tst-cancel10.c (do_test): Likewise.
7075         * tst-basic2.c (do_test): Likewise.
7076         * tst-barrier4.c (do_test): Likewise.
7078 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
7080         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
7082 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
7084         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7085         (__pthread_cond_timedwait): Optimize wakeup test.
7086         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7087         (__pthread_cond_wait): Likewise.
7088         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
7089         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7090         Likewise.
7092 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
7094         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7095         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
7096         the atomic instruction needed.
7097         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
7098         (__lll_mutex_lock_wait): Likewise.
7100 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
7102         * Makefile (tests): Add tst-cond14 and tst-cond15.
7103         * tst-cond14.c: New file.
7104         * tst-cond15.c: New file.
7106 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
7108         * sysdeps/pthread/createthread.c (create_thread): Remove use of
7109         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
7110         needs to be implemented differently to be useful.
7112 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
7114         * pthread_attr_setschedparam.c: Don't test priority against limits
7115         here.  Set ATTR_FLAG_SCHED_SET flag.
7116         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
7117         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
7118         from parent thread to child.  If attribute is used and scheduling
7119         parameters are not inherited, copy parameters from attribute or
7120         compute them.  Check priority value.
7121         * pthread_getschedparam.c: If the parameters aren't known yet get
7122         them from the kernel.
7123         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
7124         ATTR_FLAG_POLICY_SET flag for thread.
7125         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
7126         and ATTR_FLAG_POLICY_SET.
7128         * sysdeps/pthread/createthread.c: Use tgkill if possible.
7130         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
7131         fail if stack address hasn't been set.  Just return 0.
7133 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
7135         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
7136         libpthread for the files in this list.
7137         (CFLAGS-tst-unload): Removed.
7138         * tst-unload.c (do_test): Don't use complete path for
7139         LIBPHREAD_SO.
7141         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
7142         tst-_res1mod2.
7144 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
7146         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7147         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
7148         operation per round is needed.
7149         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
7150         (__lll_mutex_lock_wait): Likewise.
7152 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
7154         * tst-cancel9.c (cleanup): Don't print to stderr.
7156 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7158         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
7160 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
7162         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
7163         (__syscall_error_handler2): Call CDISABLE.
7164         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
7165         (__syscall_error_handler2): Call CDISABLE.
7167         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7168         Release lock before the loop, don't reacquire it.
7170         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
7172 2004-02-19  Andreas Schwab  <schwab@suse.de>
7174         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7175         Fix last change.
7177 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
7179         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
7180         (pthread_barrier_wait): After wakeup, release lock only when the
7181         last thread stopped using the barrier object.
7182         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
7183         (pthread_barrier_wait): Likewise.
7184         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7185         Likewise.
7186         * Makefile (tests): Add tst-barrier4.
7187         * tst-barrier4.c: New file.
7189         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7190         (__pthread_cond_timedwait): Perform timeout test while holding
7191         internal lock to prevent wakeup race.
7192         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
7193         * sysdeps/pthread/pthread_cond_timedwait.c
7194         (__pthread_cond_timedwait): Likewise.
7195         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7196         (__pthread_cond_timedwait): Likewise.
7198 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
7200         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
7201         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
7202         * Makefile (tests): Add tst-rwlock13.
7203         * tst-rwlock13.c: New test.
7205 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
7207         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7208         (__condvar_tw_cleanup): Little optimization.
7209         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
7211 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
7213         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
7214         libpthread as "lib" parameter to SHLIB_COMPAT.
7215         (__novmx_siglongjmp): Fix typo in function name.
7216         (__novmx_longjmp): Fix typo in function name.
7218 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
7220         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
7221         __builtin_expect.
7223         * sysdeps/generic/pt-longjmp.c: Moved to...
7224         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
7226 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
7228         * Makefile (libpthread-routines): Add pt-cleanup.
7229         * pt-longjmp.c: Removed.
7230         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
7231         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
7232         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
7233         Version longjmp, siglongjmp for GLIBC_2.3.4.
7234         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
7236 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
7238         * sysdeps/pthread/pthread_cond_timedwait.c
7239         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
7240         Reuse code.  Add __builtin_expects.
7242         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7243         (__pthread_cond_timedwait): Get internal lock in case timeout has
7244         passed before the futex syscall.
7245         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7247 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
7249         * allocatestack.c: Pretty printing.
7251         * sysdeps/pthread/createthread.c (create_thread): Don't add
7252         CLONE_DETACHED bit if it is not necessary.
7254 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
7256         * pthread_getattr_np.c: Include ldsodefs.h.
7258 2004-01-16  Richard Henderson  <rth@redhat.com>
7260         * allocatestack.c: Don't declare __libc_stack_end.
7261         * init.c (__pthread_initialize_minimal_internal): Likewise.
7262         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
7264 2004-01-15  Richard Henderson  <rth@redhat.com>
7266         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
7267         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
7268         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
7269         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
7270         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
7271         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
7272         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
7273         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
7275 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
7277         * init.c (pthread_functions): Make array const.
7279 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
7281         * allocatestack.c (__make_stacks_executable): Change interface.
7282         Check parameters.  Pass parameter on to libc counterpart.
7283         * pthreadP.h: Change declaration.
7285 2004-01-13  Richard Henderson  <rth@redhat.com>
7287         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
7288         prototype form.
7289         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
7290         Likewise.
7292         * sysdeps/alpha/Makefile: New file.
7293         * sysdeps/alpha/tcb-offsets.sym: New file.
7294         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
7295         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
7297         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
7298         on powerpc version.
7300 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
7302         * Makefile (tests): Add tst-backtrace1.
7303         * tst-backtrace1.c: New test.
7305 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
7307         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
7308         register as second parameter to the REGISTER macro.
7309         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
7310         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
7311         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
7312         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
7313         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
7314         of thread register as second parameter to REGISTER macro in 64 case.
7316 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
7318         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
7319         (CFLAGS-getpid.o): Defined.
7320         (CFLAGS-getpid.os): Defined.
7322 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
7324         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
7325         returned for main thread does not overlap with any other VMA.
7326         Patch by Jakub Jelinek.
7328 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
7330         * tst-raise1.c: Include stdio.h.
7332 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
7334         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
7335         setting with __ASSUME_TGKILL || defined __NR_tgkill.
7336         If pid is 0, set it to selftid.
7337         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
7338         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
7339         != 0, return self->tid without doing a syscall.
7340         * descr.h (struct pthread): Move pid field after tid.
7342         * Makefile (tests): Add tst-raise1.
7343         * tst-raise1.c: New file.
7345 2003-12-23  Roland McGrath  <roland@redhat.com>
7347         * tst-oddstacklimit.c: New file.
7348         * Makefile (tests): Add it.
7349         (tst-oddstacklimit-ENV): New variable.
7351         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
7352         value up to page size for __default_stacksize.
7354 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
7356         * Makefile (tests): Add tst-eintr5.
7357         * tst-eintr5.c: New file.
7359         * eintr.c (eintr_source): Prevent sending signal to self.
7361         * tst-eintr2.c (tf1): Improve error message.
7363 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
7365         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
7366         * sysdeps/unix/sysv/linux/getpid.c: New file.
7367         * pthread_cancel.c: Add comment explaining use of PID field.
7368         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
7369         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
7370         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
7371         temporarily to signal the field must not be relied on and updated
7372         by getpid().
7373         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
7374         temporarily negative.
7375         * sysdeps/unix/sysv/linux/raise.c: Likewise.
7377 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
7379         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
7380         (eintr_source): If ARG != NULL, use pthread_kill.
7381         * tst-eintr1.c: Adjust for this change.
7382         * tst-eintr2.c: Likewise.
7383         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
7384         * tst-eintr3.c: New file.
7385         * tst-eintr4.c: New file.
7387 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
7389         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
7390         if CANCELSTATE_BITMASK is set.
7391         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
7392         Likewise.
7394         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
7395         (tests-reverse): Add tst-cancel23.
7396         * tst-cancel22.c: New test.
7397         * tst-cancel23.c: New test.
7399 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
7401         * tst-eintr1.c: Better error messages.
7403         * Makefile (tests): Add tst-eintr2.
7404         * tst-eintr2.c: New file.
7406 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
7408         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
7409         (CFLAGS-tst-cancelx21.c): Set.
7410         * tst-cancel21.c: New test.
7411         * tst-cancelx21.c: New test.
7413         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
7414         comparison operand.
7415         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
7416         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
7417         * pt-longjmp.c: Include jmpbuf-unwind.h.
7418         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
7419         _JMPBUF_UNWINDS.  Adjust compared pointers.
7420         * init.c (__pthread_initialize_minimal_internal): Initialize
7421         pd->stackblock_size.
7422         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
7423         * sysdeps/alpha/jmpbuf-unwind.h: New file.
7424         * sysdeps/i386/jmpbuf-unwind.h: New file.
7425         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
7426         * sysdeps/s390/jmpbuf-unwind.h: New file.
7427         * sysdeps/sh/jmpbuf-unwind.h: New file.
7428         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
7429         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
7430         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
7431         (_JMPBUF_CFA_UNWINDS): Remove.
7432         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
7434 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
7436         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
7437         (CFLAGS-tst-cancelx20.c): Set.
7438         * tst-cancel20.c: New test.
7439         * tst-cancelx20.c: New test.
7441 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
7443         * init.c (__pthread_initialize_minimal_internal): Don't treat
7444         architectures with separate register stack special here when
7445         computing default stack size.
7447 2003-12-17  Roland McGrath  <roland@redhat.com>
7449         * Makefile (tst-cancelx7-ARGS): New variable.
7450         Reportd by Greg Schafer <gschafer@zip.com.au>.
7452 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
7454         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
7455         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
7456         (tst-stack3-ENV): Set.
7457         ($(objpfx)tst-stack3-mem): New.
7458         * tst-stack3.c: New test.
7460 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
7462         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
7463         Add unwind directives.  Drop unused .regstk directive.
7464         (_fini_EPILOG_BEGINS): Add unwind directives.
7466 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
7468         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
7469         Assume parameter is a pointer.
7470         (lll_futex_wake): Likewise.
7471         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
7472         Likewise.
7473         (lll_futex_wake): Likewise.
7474         Reported by Boris Hu.
7475         * sysdeps/unix/sysv/linux/unregister-atfork.c
7476         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
7478         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
7480 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
7482         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
7483         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
7484         __rtld_lock_initialize for ld.so lock.
7485         Patch in part by Adam Li <adam.li@intel.com>.
7487 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
7489         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
7490         in $(gnulib).  Also, remove stale comment.
7492 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
7494         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
7495         advantage of new syscall stub and optimize accordingly.
7497         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
7498         from SYS_futex, to match expectations of
7499         sysdep.h:DO_INLINE_SYSCALL.
7500         (lll_futex_clobbers): Remove.
7501         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
7502         (lll_futex_wake): Likewise.
7503         (lll_futex_requeue): Likewise.
7504         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
7505         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
7506         Jelinek).
7507         (__lll_mutex_lock): Likewise.
7508         (__lll_mutex_cond_lock): Likewise.
7509         (__lll_mutex_timed_lock): Likewise.
7510         (__lll_mutex_unlock): Likewise.
7511         (__lll_mutex_unlock_force): Likewise.
7513         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
7514         comes before the include of <sysdep.h>.
7515         (THREAD_SELF_SYSINFO): New macro.
7516         (THREAD_SYSINFO): Likewise.
7517         (INIT_SYSINFO): New macro.
7518         (TLS_INIT_TP): Call INIT_SYSINFO.
7520         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
7522         * sysdeps/pthread/createthread.c (create_thread): Use
7523         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
7524         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
7525         THREAD_SELF_SYSINFO instead of open code.
7526         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
7527         (THREAD_SYSINFO): Likewise.
7529         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
7531         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
7533 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
7535         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
7536         instead of .init.  Patch by David Mosberger.
7538 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
7540         * sysdeps/pthread/configure.in: Remove broken declaration in C
7541         cleanup handling check.
7543 2003-11-30  Andreas Jaeger  <aj@suse.de>
7545         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
7546         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
7547         Likewise.
7549 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
7551         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
7552         * pthread_attr_destroy.c: Include shlib-compat.h.
7553         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
7554         is set in iattr->flags.
7555         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
7557 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
7559         * Makefile (distribute): Add tst-cleanup4aux.c.
7561         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
7562         include.
7564 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
7566         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
7567         pthread_cond_signal.
7569         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
7570         store mutex address if the current value is ~0l.
7571         * sysdeps/pthread/pthread_cond_timedwait.c
7572         (__pthread_cond_timedwait): Likewise.
7573         * sysdeps/pthread/pthread_cond_broadcast.c
7574         (__pthread_cond_broadcast): Don't use requeue for pshared
7575         condvars.
7577         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7578         (__pthread_cond_wait): Don't store mutex address if the current
7579         value is ~0l.
7580         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7581         (__pthread_cond_timedwait): Likewise.
7582         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
7583         (__pthread_cond_broadcast): Don't use requeue for pshared
7584         condvars.
7586         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
7587         element with ~0l for pshared condvars, with NULL otherwise.
7589         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7590         (__pthread_cond_wait): Don't store mutex address if the current
7591         value is ~0l.
7592         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7593         (__pthread_cond_timedwait): Likewise.
7594         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
7595         (__pthread_cond_broadcast): Don't use requeue for pshared
7596         condvars.
7598         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
7599         * tst-cond12.c: New file.
7600         * tst-cond13.c: New file.
7602 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
7604         * sysdeps/pthread/configure.in: Make missing forced unwind support
7605         fatal.
7607 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
7609         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
7611 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
7613         * Makefile: Add magic to clean up correctly.
7615 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
7617         * unwind.c (FRAME_LEFT): Define.
7618         (unwind_stop): Handle old style cleanups here.
7619         (__pthread_unwind): Handle old style cleanups only if
7620         !HAVE_FORCED_UNWIND.
7621         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
7622         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
7623         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
7624         ($(objpfx)tst-cleanupx4): Likewise.
7625         * tst-cleanup4.c: New test.
7626         * tst-cleanup4aux.c: New.
7627         * tst-cleanupx4.c: New test.
7629 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
7631         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
7632         lll_mutex_*lock macros to skip atomic operations on some archs.
7634 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
7636         * sysdeps/pthread/tst-timer.c (main): Initialize
7637         sigev2.sigev_value as well.
7639 2003-10-15  Roland McGrath  <roland@redhat.com>
7641         * sysdeps/pthread/configure.in: Barf if visibility attribute support
7642         is missing.
7643         * sysdeps/pthread/configure: Regenerated.
7645 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7647         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
7648         locking macros.  No distinction between normal and mutex locking
7649         anymore.
7650         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
7651         Merge bits from lowlevelmutex.S we still need.
7652         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
7653         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7654         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
7655         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
7656         new mutex implementation.
7657         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
7658         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7659         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7660         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7661         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7662         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7663         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7664         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7665         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7666         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
7667         symbol for entry point to avoid cancellation.
7669 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
7671         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
7672         changes.
7673         (SAVE_OLDTYPE_0): Fix a typo.
7675 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
7677         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
7678         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
7680 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
7682         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
7683         correct offset.
7685 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
7687         * Makefile (tests): Add tst-cancel19.
7688         * tst-cancel19.c: New test.
7690 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
7692         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
7693         restoring of the old cancellation type.
7695 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
7697         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
7699 2003-09-27  Wolfram Gloger  <wg@malloc.de>
7701         * sysdeps/pthread/malloc-machine.h: New file
7703 2003-09-24  Roland McGrath  <roland@redhat.com>
7705         * allocatestack.c (__make_stacks_executable): Don't ignore return
7706         value from _dl_make_stack_executable.
7708 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
7710         * allocatestack.c (__make_stacks_executable): Also change
7711         permission of the currently unused stacks.
7713         * allocatestack.c (change_stack_perm): Split out from
7714         __make_stacks_executable.
7715         (allocate_stack): If the required permission changed between the time
7716         we started preparing the stack and queueing it, change the permission.
7717         (__make_stacks_executable): Call change_stack_perm.
7719         * Makefile: Build tst-execstack-mod locally.
7720         * tst-execstack-mod.c: New file.
7722 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
7724         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
7726 2003-09-23  Roland McGrath  <roland@redhat.com>
7728         * tst-execstack.c: New file.
7729         * Makefile (tests): Add it.
7730         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
7731         (LDFLAGS-tst-execstack): New variable.
7733         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
7734         whether to use PROT_EXEC for stack mmap.
7735         (__make_stacks_executable): New function.
7736         * pthreadP.h: Declare it.
7737         * init.c (__pthread_initialize_minimal_internal): Set
7738         GL(dl_make_stack_executable_hook) to that.
7740 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
7742         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
7743         recommendation from AMD re avoidance of lock prefix.
7745 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
7747         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
7748         lll_futex_timed_wait instead of lll_futex_wait.
7749         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
7750         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
7751         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
7752         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
7753         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
7754         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
7755         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
7756         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
7757         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
7758         Completely revamp the locking macros.  No distinction between
7759         normal and mutex locking anymore.
7760         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
7761         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
7762         __lll_lock_timedwait): Fix prototypes.
7763         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
7764         __lll_lock_timedwait): Likewise.
7765         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
7766         macros, add __builtin_expect.
7767         (lll_mutex_timedlock): Likewise.  Fix return value.
7768         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
7769         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
7770         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
7771         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
7772         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
7773         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
7774         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
7775         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
7777 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
7779         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7780         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
7781         operation if possible.
7783         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
7784         like jumping over the lock prefix.
7786 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
7788         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
7789         locking macros.  No distinction between normal and mutex locking
7790         anymore.
7791         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7792         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
7793         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7794         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
7795         locking.  Merge bits from lowlevelmutex.S we still need.
7796         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
7797         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
7798         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
7799         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
7800         * Makefile (routines): Remove libc-lowlevelmutex.
7801         (libpthread-rountines): Remove lowlevelmutex.
7802         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
7803         for new mutex implementation.
7804         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7805         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7806         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7807         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7808         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7809         Likewise.
7810         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7811         Likewise.
7812         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
7813         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7814         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
7815         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
7816         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7817         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7818         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7819         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
7820         Likewise.
7821         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
7822         Likewise.
7823         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
7824         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7825         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7826         Don't use requeue.
7827         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7828         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
7830 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
7832         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
7833         in parameters of asm with output parameters.
7835         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
7836         type of DECR parameter to int.
7837         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
7839 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
7841         * tst-attr3.c (tf, do_test): Print stack start/end/size and
7842         guardsize for each thread.
7844 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
7846         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
7847         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
7848         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
7850         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
7851         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
7852         NULL.
7853         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
7854         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
7855         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7856         (pthread_getaffinity_np): Add hidden_def.
7858         * Makefile (tests): Add tst-attr3.
7859         * tst-attr3.c: New test.
7861         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
7863 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
7865         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
7866         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
7868 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
7870         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
7871         * tst-align.c: Include tst-stack-align.h.
7872         (tf, do_test): Use TEST_STACK_ALIGN macro.
7874 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
7876         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
7877         variable.
7879 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
7881         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
7882         stack-related values for the initial thread.
7884 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
7886         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
7888 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
7890         * pthread_mutex_lock.c: Minor code rearrangements.
7892 2003-09-05  Roland McGrath  <roland@redhat.com>
7894         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
7895         Instead, include ../nptl_db/db_info.c to do its magic.
7896         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
7897         (__pthread_pthread_key_2ndlevel_size): Likewise.
7898         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
7899         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
7900         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
7901         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
7902         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
7903         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
7904         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
7905         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
7906         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
7907         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
7908         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
7909         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
7910         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
7911         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
7912         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
7913         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
7914         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
7916 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
7918         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
7919         of pthread_t to be compatible with LT.
7920         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7921         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7922         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7923         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7924         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
7925         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7926         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7928 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
7930         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
7932 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
7934         * unwind-forcedunwind.c: Move to...
7935         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
7936         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
7937         * sysdeps/pthread/jmpbuf-unwind.h: New file.
7938         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
7939         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
7940         * unwind.c: Include jmpbuf-unwind.h.
7941         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
7943 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
7945         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
7946         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
7947         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
7948         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
7949         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
7950         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
7951         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
7952         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
7953         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
7954         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
7955         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
7956         function.
7957         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
7958         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
7959         * Makefile (tests): Add tst-stack2.
7960         * tst-stack2.c: New test.
7961         * tst-stack1.c: Include limits.h and sys/param.h.
7962         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
7964         * pthread_condattr_setpshared.c: Include errno.h.
7965         (pthread_condattr_setpshared): Return EINVAL if pshared
7966         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
7968         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
7969         defined symbol for entry point to avoid cancellation.
7970         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
7971         Likewise.
7972         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
7973         Likewise.
7974         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
7975         Likewise.
7976         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
7977         Likewise.
7978         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
7979         Likewise.
7980         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
7981         __close_nocancel, __read_nocancel, __write_nocancel,
7982         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
7983         libpthread.so or librt.so, define to corresponding function
7984         without _nocancel suffix.
7985         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
7986         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
7987         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
7989         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
7991 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
7993         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
7994         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
7996         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
7997         in subsections has a symbol associated with it.
7999         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
8000         defined symbol for entry point to avoid cancellation.
8001         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
8003 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
8005         * Makefile (tests): Add tst-tls5.
8006         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
8007         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
8008         ($(objpfx)tst-tls5): New.
8009         ($(objpfx)tst-tls6.out): Likewise.
8010         (tests): Depend on $(objpfx)tst-tls6.out.
8011         * tst-tls3.c: Include stdint.h and pthreaddef.h.
8012         (do_test): Check pthread_self () return value alignment.
8013         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
8014         (tf): Check pthread_self () return value alignment.
8015         * tst-tls5.c: New test.
8016         * tst-tls5.h: New.
8017         * tst-tls5mod.c: New.
8018         * tst-tls5moda.c: New.
8019         * tst-tls5modb.c: New.
8020         * tst-tls5modc.c: New.
8021         * tst-tls5modd.c: New.
8022         * tst-tls5mode.c: New.
8023         * tst-tls5modf.c: New.
8024         * tst-tls6.sh: New test.
8026         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
8027         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
8028         * init.c (pthread_functions): Initialize them.
8029         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
8030         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
8031         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
8032         pthread_cond_timedwait@@GLIBC_2.3.2.
8034 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
8036         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
8037         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
8038         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
8039         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
8040         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
8041         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
8043         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
8045         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
8046         _POSIX_THREAD_PRIORITY_SCHEDULING.
8047         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
8049 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
8051         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
8052         nested function, use static inline function from libio.h.
8053         Code by Richard Henderson.
8055         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
8056         weak.
8058 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
8060         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
8061         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
8062         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
8063         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
8064         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
8065         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
8066         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
8067         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
8068         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
8069         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
8070         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
8071         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
8072         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
8073         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
8074         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
8075         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
8076         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
8077         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
8078         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
8079         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
8080         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
8081         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
8082         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
8083         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
8084         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
8085         * sysdeps/sparc/tls.h: New file.
8086         * sysdeps/sparc/tcb-offsets.sym: New file.
8087         * sysdeps/sparc/Makefile: New file.
8088         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
8089         * init.c [__sparc__] (__NR_set_tid_address): Define.
8091 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
8093         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
8094         _IO_release_lock): Define.
8096 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
8098         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
8099         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
8101 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
8103         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
8104         (__pthread_cleanup_class): Add missing return types of member
8105         functions.
8107 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
8109         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8110         (lll_mutex_unlock_force): Add memory barrier between store and futex
8111         syscall.
8113 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
8115         * tst-cancel4.c (do_test): Also unlink tempfname and remove
8116         tempmsg in first loop.
8118 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
8120         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8121         _POSIX_THREAD_PRIORITY_SCHEDULING.
8122         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8124 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
8126         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
8127         (__rtld_lock_default_lock_recursive,
8128         __rtld_lock_default_unlock_recursive): Define.
8129         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
8130         __rtld_lock_unlock_recursive): Define using
8131         GL(_dl_rtld_*lock_recursive).
8132         * init.c (__pthread_initialize_minimal_internal): Initialize
8133         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
8134         Lock GL(_dl_load_lock) the same number of times as
8135         GL(_dl_load_lock) using non-mt implementation was nested.
8137         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
8138         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
8140 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
8142         * tst-cancel17.c (do_test): Make len2 maximum of page size and
8143         PIPE_BUF.
8145 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
8147         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
8149 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
8151         * sysdeps/pthread/createthread.c (do_clone): Move error handling
8152         to first syscall error check.  Move syscall error check for tkill
8153         into __ASSUME_CLONE_STOPPED #ifdef.
8155 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
8157         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
8158         is not defined, do explicit synchronization.
8159         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
8160         is not defined also unlock pd->lock for non-debugging case in case
8161         it is necessary.
8162         * pthread_create.c (start_thread): Always get and release pd->lock
8163         if __ASSUME_CLONE_STOPPED is not defined.
8164         (start_thread_debug): Removed.  Adjust users.
8165         * allocatestack.c (allocate_stack): Always initialize lock if
8166         __ASSUME_CLONE_STOPPED is not defined.
8167         * Makefile (tests): Add tst-sched1.
8168         * tst-sched1.c: New file.
8170         * sysdeps/pthread/createthread.c (do_clone): Only use
8171         sched_setschduler and pass correct parameters.
8173 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
8175         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
8176         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
8177         PTHREAD_STACK_MIN in comments.
8179 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
8181         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8182         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
8183         argument.
8184         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
8185         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
8186         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
8187         (__pthread_cleanup_upto): Fix prototype.
8188         (_longjmp_unwind): Adjust caller.
8189         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
8190         Change second argument to const struct pointer.
8191         * tst-sem8.c (main): Remove unused s2 and s3 variables.
8192         * tst-sem9.c (main): Likewise.
8193         * unwind.c: Include string.h for strlen prototype.
8195 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
8197         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8198         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
8199         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
8200         Define HAVE_CMOV.
8201         Patch by Nicholas Miell <nmiell@attbi.com>.
8203 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
8205         * init.c (__pthread_initialize_minimal_internal): Initialize
8206         GL(dl_init_static_tls).
8207         * pthreadP.h (__pthread_init_static_tls): New prototype.
8208         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
8209         New functions.
8210         * Makefile (tests): Add tst-tls4.
8211         (modules-names): Add tst-tls4moda and tst-tls4modb.
8212         ($(objpfx)tst-tls4): Link against libdl and libpthread.
8213         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
8214         tst-tls4modb.so.
8215         * tst-tls4.c: New file.
8216         * tst-tls4moda.c: New file.
8217         * tst-tls4modb.c: New file.
8219 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
8221         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
8222         before __timer_dealloc.
8223         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
8224         Don't call list_unlink.
8226 2003-07-29  Roland McGrath  <roland@redhat.com>
8228         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
8230 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
8232         * tst-cancel17.c (do_test): Check if aio_cancel failed.
8233         Don't reuse struct aiocb A if it failed.
8234         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
8235         not just one byte, as that does not block.
8237 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
8239         * sysdeps/pthread/unwind-resume.c: New file.
8240         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
8241         unwind-resume in csu subdir.
8242         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
8243         exceptions.
8244         (librt-sysdep_routines, librt-shared-only-routines): Add
8245         rt-unwind-resume.
8246         * sysdeps/pthread/rt-unwind-resume.c: New file.
8247         * unwind-forcedunwind.c: New file.
8248         * Makefile (libpthread-routines): Add unwind-forcedunwind.
8249         (libpthread-shared-only-routines): Likewise.
8250         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
8251         * pthreadP.h (pthread_cancel_init): New prototype.
8252         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
8254         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
8255         attr argument const struct pthread_attr *.
8257         * res.c (__res_state): Return __resp.
8258         * descr.h: Include resolv.h.
8259         (struct pthread): Add res field.
8260         * pthread_create.c: Include resolv.h.
8261         (start_thread): Initialize __resp.
8262         * Makefile (tests): Add tst-_res1.
8263         (module-names): Add tst-_res1mod1, tst-_res1mod2.
8264         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
8265         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
8266         libpthread.
8267         * tst-_res1.c: New file.
8268         * tst-_res1mod1.c: New file.
8269         * tst-_res1mod2.c: New file.
8271 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
8273         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
8275         * Makefile: Define various *-no-z-defs variables for test DSOs
8276         which has undefined symbols.
8278 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
8280         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
8281         Retry if the stwcx fails to store once_control.
8283 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
8285         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
8286         pthread_attr_setaffinity.
8287         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
8288         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
8289         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
8290         * pthread_attr_destroy.c: Free cpuset element if allocated.
8291         * pthread_create.c: Pass iattr as additional parameter to
8292         create_thread.
8293         * sysdeps/pthread/createthread.c: If attribute is provided and
8294         a new thread is created with affinity set or scheduling parameters,
8295         start thread with CLONE_STOPPED.
8296         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
8297         pthread_attr_setaffinity.
8298         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
8299         cpuset element.
8301 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
8303         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
8305 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
8307         * sysdeps/pthread/configure.in: Require CFI directives also for
8308         ppc and s390.
8310 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
8312         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
8313         Add cfi directives.
8315 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
8317         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
8318         CLEANUP_JMP_BUF.
8319         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
8320         registers as variables.  Call __pthread_mutex_unlock_usercnt.
8321         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8322         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
8323         not self pointer in __writer.  Compare with TID to determine
8324         deadlocks.
8325         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8326         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
8327         Likewise.
8328         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
8329         Likewise.
8330         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
8331         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8332         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
8333         macros also when compiling librt.
8335 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
8337         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
8338         -fasynchronous-unwind-tables.
8339         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
8340         (PSEUDO): Add cfi directives.
8341         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
8342         Likewise.
8343         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
8344         Likewise.
8346 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
8348         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
8349         __pthread_unregister_cancel): Add prototypes and hidden_proto.
8350         * unwind.c (__pthread_unwind_next): Add hidden_def.
8351         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
8352         Likewise.
8353         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
8354         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
8355         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
8356         Likewise.
8357         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
8358         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
8359         Likewise.
8360         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
8361         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
8362         __pthread_unregister_cancel and __pthread_unwind_next.
8364 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
8366         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
8367         different symbol for the cancellation syscall wrapper and
8368         non-cancellation syscall wrapper.
8369         (PSEUDO_END): Define.
8371 2003-07-05  Richard Henderson  <rth@redhat.com>
8373         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
8374         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
8375         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8376         return actual return value from the syscall, not 0.
8378 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
8380         * descr.h (struct pthread): Add pid field.
8381         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
8382         (__reclaim_stacks): Likewise.
8383         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
8384         also check for PID of the signal source.
8385         (__pthread_initialize_minimal_internal): Also initialize pid field
8386         of initial thread's descriptor.
8387         * pthread_cancel.c: Use tgkill instead of tkill if possible.
8388         * sysdeps/unix/sysv/linux/fork.c: Likewise.
8389         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
8390         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8391         * sysdeps/unix/sysv/linux/raise.c: Likewise.
8393 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
8395         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
8396         Fix use of parameter.
8397         (__libc_cleanup_pop): Likewise.
8399 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
8401         * init.c (sigcancel_handler): Change parameters to match handler
8402         for SA_SIGACTION.  Check signal number and code to recognize
8403         invalid invocations.
8405 2003-07-03  Roland McGrath  <roland@redhat.com>
8407         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
8408         Apply sizeof (struct pthread) bias to r13 value.
8410 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
8412         * sysdeps/pthread/configure.in: Require CFI directives.
8414         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
8415         definition.
8416         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
8417         libpthread compilation.
8418         * unwind.c (__pthread_unwind): Add hidden_def.
8419         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
8421 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
8423         * libc-cancellation.c (__libc_cleanup_routine): Define.
8424         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
8425         (__pthread_cleanup_pop): Define.
8427 2003-07-01  Richard Henderson  <rth@redhat.com>
8429         * sysdeps/alpha/elf/pt-initfini.c: New file.
8430         * sysdeps/alpha/pthread_spin_lock.S: New file.
8431         * sysdeps/alpha/pthread_spin_trylock.S: New file.
8432         * sysdeps/alpha/pthreaddef.h: New file.
8433         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
8434         * sysdeps/alpha/tls.h: New file.
8435         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
8436         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
8437         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
8438         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
8439         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
8440         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
8441         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
8442         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
8443         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
8444         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
8446 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
8448         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
8449         cleanup support and unwind info.
8451 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
8453         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
8454         Use correct cleanup handler registration.  Add unwind info.
8455         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
8456         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
8457         * tst-once3.c: Add cleanup handler and check it is called.
8458         * tst-once4.c: Likewise.
8459         * tst-oncex3.c: New file.
8460         * tst-oncex4.c: New file.
8461         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
8463 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
8465         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
8467 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
8469         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
8470         (tf_msgsnd): Likewise.
8472         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
8473         premature returns a bit more.
8475 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
8477         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
8478         definition to the front.
8480         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
8481         the cleanup functions to make the names unique.  Fix dwarf opcode
8482         un unwind table.
8483         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
8484         functions to make the names unique.  Fix CFA offset for two blocks.
8486 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
8488         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
8489         missing closing braces.
8490         Patch by Christophe Saout <christophe@saout.de>.
8492 2003-06-24  Roland McGrath  <roland@redhat.com>
8494         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
8496 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
8498         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
8499         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
8501         * pthreadP.h: Declare __find_thread_by_id.
8502         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
8503         * pthread_clock_gettime.c: Allow using other thread's clock.
8504         * pthread_clock_settime.c: Likewise.
8505         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8506         * Makefile: Add rules to build and run tst-clock2.
8507         * tst-clock2.c: New file.
8509 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
8511         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
8512         to use exception-based cleanup handler.
8513         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8515         * tst-cond8.c (ch): Announce that we are done.
8517         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
8519         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
8520         Also test aio_suspend with timeout value.
8522 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
8524         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
8525         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
8526         attribute_hidden.
8528         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
8529         (__pthread_mutex_lock_internal): Likewise.
8530         (__pthread_mutex_unlock_internal): Likewise.
8531         (__pthread_mutex_unlock_usercnt): Declare.
8532         * pthread_mutex_destroy.c: Always fail if used in any way.
8533         * pthread_mutex_init.c: Update comment.
8534         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
8535         * pthread_mutex_timedlock.c: Adjust __nusers.
8536         * pthread_mutex_trylock.c: Adjust __nusers.
8537         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
8538         and public interfaces are wrapper with pass additional parameter.
8539         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
8540         parameter zero.
8541         * tst-mutex8.c: New file.
8542         * Makefile (tests): Add tst-mutex8.
8543         * sysdeps/pthread/pthread_cond_timedwait.c: Call
8544         __pthread_mutex_unlock_usercnt.
8545         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8546         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8547         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8548         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8549         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8550         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
8551         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8552         Add __nusers.
8553         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8554         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8555         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8556         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8557         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8559         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
8560         * pthread_mutex_timedlock.c: Likewise.
8561         * pthread_mutex_trylock.c: Adjust __nusers.
8562         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
8563         * tst-mutex9.c: New file.
8564         * Makefile (tests): Add tst-mutex9.
8565         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
8566         * sysdeps/ia64/tls.h: Likewise.
8567         * sysdeps/powerpc/tls.h: Likewise.
8568         * sysdeps/s390/tls.h: Likewise.
8569         * sysdeps/sh/tls.h: Likewise.
8570         * sysdeps/x86_64/tls.h: Likewise.
8571         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8572         Change type of __owner.
8573         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8574         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8575         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8576         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8577         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8579 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
8581         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
8582         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
8584         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
8585         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
8586         instead of nr to lll_futex_wake.  Only set errno and return -1
8587         if err < 0.
8589         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
8590         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8591         return actual return value from the syscall, not 0.
8593 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
8595         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
8596         find a random value.
8597         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
8598         errno==EIDRM.
8600         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
8601         compat_timer_settime.
8602         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
8603         compat_timer_gettime.
8604         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
8605         compat_timer_getoverrun.
8606         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
8607         compat_timer_delete.
8609         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
8610         error-checking mutex detect busy mutexes.
8612 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
8614         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
8615         Add ax to clobber list.
8616         (lll_mutex_cond_lock): Likewise.
8617         (lll_mutex_unlock): Likewise.
8618         (lll_lock): Likewise.
8619         (lll_unlock): Likewise.
8621         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
8622         * tst-cancel18.c: New file.
8623         * tst-cancelx18.c: New file.
8625         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
8626         and tcdrain.
8628         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
8629         * tst-cancel17.c: New file.
8630         * tst-cancelx17.c: New file.
8632         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
8633         * sysdeps/unix/sysv/linux/sigwait.c: New file.
8634         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
8636         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
8638 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
8640         * sysdeps/pthread/createthread.c (create_thread): Set
8641         header.multiple_threads unconditionally.
8642         * allocatestack.c (allocate_stack): Likewise.
8643         * descr.h (struct pthread): Add header.multiple_threads
8644         unconditionally.
8645         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
8646         Define for librt.  #error if neither libpthread, libc nor librt.
8647         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
8648         Likewise.
8649         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
8650         CDISABLE): Likewise.
8651         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
8652         CDISABLE): Likewise.
8653         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
8654         CDISABLE): Likewise.
8655         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
8656         CDISABLE): Likewise.  Access header.multiple_threads outside of
8657         libc and libpthread.
8658         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
8659         Likewise.
8660         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
8661         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
8663 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
8665         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
8666         Also test early cancellation before the thread reaches the cancellation
8667         point.
8669         * Makefile: Compile forward.c with exceptions.
8671         * sysdeps/unix/sysv/linux/sleep.c: New file.
8673 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
8675         * Makefile: Add CFLAGS definition to compile function wrappers
8676         duplicated from libc with exceptions.
8677         * tst-cancel4.c: Also check cancellation handlers.
8679         * Makefile: Add rules to build and run tst-cancel16 and
8680         tst-cancelx16.  Add missing CFLAGS definitions.
8681         * tst-cancel16.c: New file.
8682         * tst-cancelx16.c: New file.
8684 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
8686         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8687         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
8688         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
8689         (DL_SYSINFO_IMPLEMENTATION): Likewise.
8691         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
8692         (LIBC_CANCEL_RESET): Likewise.
8693         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
8694         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
8695         librt-cancellation.
8696         (CFLAGS-libcrt-cancellation.c): Define.
8697         * sysdeps/pthread/librt-cancellation.c: New file.
8698         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
8699         macros also when compiling librt.
8700         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
8701         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
8702         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
8703         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
8704         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
8705         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
8706         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
8708         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
8709         compat_timer_create.
8711 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
8713         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
8715         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
8716         __register_atfork.
8717         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
8718         Add libc_hidden_def.
8720 2003-06-13  Roland McGrath  <roland@redhat.com>
8722         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
8723         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
8725 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
8727         * allocatestack.c (queue_stack): Always inline.
8728         * ptreadhP.h (__do_cancel): Likewise.
8730 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
8732         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
8733         a typo.
8735 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
8737         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8738         (__pthread_cond_signal): Remove incorrect second addition for
8739         cond_lock!=0.
8741 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
8743         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8744         (__pthread_cond_signal): Use correct futex pointer in
8745         __lll_mutex_lock_wait call.
8747         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8748         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
8750 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
8752         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
8753         cancelable.
8754         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
8755         Likewise.
8757         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
8758         hand-written CFI generation code.  Since ENTRY/END also initiated
8759         CFI frames this caused two CFI sets to be generated.
8761 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
8763         * cleanup_routine.c: New file.
8764         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
8765         * sysdeps/pthread/pthread.h: Add support for fully exception-based
8766         cleanup handling.
8767         * Makefile (libpthread-routines): Add cleanup_routine.
8768         Add more CFLAGS variables to compile with exceptions.  Add comments
8769         why which file needs unwind tables.
8770         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
8771         tests.
8772         * tst-cancelx1.c: New file.
8773         * tst-cancelx2.c: New file.
8774         * tst-cancelx3.c: New file.
8775         * tst-cancelx4.c: New file.
8776         * tst-cancelx5.c: New file.
8777         * tst-cancelx6.c: New file.
8778         * tst-cancelx7.c: New file.
8779         * tst-cancelx8.c: New file.
8780         * tst-cancelx9.c: New file.
8781         * tst-cancelx10.c: New file.
8782         * tst-cancelx11.c: New file.
8783         * tst-cancelx12.c: New file.
8784         * tst-cancelx13.c: New file.
8785         * tst-cancelx14.c: New file.
8786         * tst-cancelx15.c: New file.
8787         * tst-cleanupx0.c: New file.
8788         * tst-cleanupx0.expect: New file.
8789         * tst-cleanupx1.c: New file.
8790         * tst-cleanupx2.c: New file.
8791         * tst-cleanupx3.c: New file.
8793         * tst-cleanup0.c: Make standard compliant.
8794         * tst-cleanup1.c: Likewise.
8796         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
8797         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
8798         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8799         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8800         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8801         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8802         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
8803         CLEANUP_JMP_BUF.
8804         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8805         * tst-cancel12.c: New file.
8806         * tst-cancel13.c: New file.
8807         * tst-cancel14.c: New file.
8808         * tst-cancel15.c: New file.
8809         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
8810         and tst-cancel15.
8812         * tst-cancel1.c: Add some comments.
8814         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
8815         timeout correctly.
8817 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
8819         * Makefile (CFLAGS-pthread_cancel.c): Define.
8821 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
8823         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
8824         Change type of __writer element to int.
8825         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8826         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8827         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8828         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8829         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8830         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
8831         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8832         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
8833         Compare with TID to determine deadlocks.
8834         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8835         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8836         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
8837         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8838         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8839         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8840         Likewise.
8841         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8842         Likewise.
8843         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8844         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8845         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
8846         Likewise.
8847         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
8848         Likewise.
8849         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8850         * Makefile (tests): Add tst-rwlock12.
8851         * tst-rwlock12.c: New file.
8853 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
8855         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
8856         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
8857         Remove bogus hidden_proto.
8858         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8859         Likewise.
8860         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
8861         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
8862         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
8863         ___lll_mutex_timedlock): Likewise.
8865 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
8867         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8868         (__pthread_cond_signal): Add some code to eventually handle
8869         cond_lock!=0.
8871 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
8873         * Makefile (tests): Add tst-exec4.
8874         (tst-exec4-ARGS): Define.
8875         * tst-exec4.c: New file.
8877 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
8879         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
8880         Also fail if tv_nsec < 0.
8881         (__lll_timedwait_tid): Likewise.
8882         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
8883         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
8884         Likewise.
8885         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
8886         Likewise.
8887         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
8888         Likewise.
8889         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
8890         Likewise.
8891         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
8892         Likewise.
8893         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
8894         Likewise.
8896         * Makefile (tests): Add tst-sem8 and tst-sem9.
8897         * tst-sem8.c: New file.
8898         * tst-sem9.c: New file.
8899         * sem_open.c: Fix creation of in_use record if the file exists but
8900         no internal record.
8902         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
8903         definitions.
8905         * sysdeps/pthread/timer_create.c (timer_create): In case
8906         evp==NULL, assign timer ID to sival_ptr.
8908         * descr.h (struct pthread_unwind_buf): Change type of prev element to
8909         struct pthread_unwind_buf *.
8910         (struct pthread): Likewise for cleanup_jmp_buf element.
8912         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
8913         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
8914         * unwind.c (__pthread_unwind_next): Likewise.
8916 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
8918         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8919         (lll_futex_timed_wait): Use int for futex value parameter.
8920         (lll_futex_wake): Likewise.
8921         (lll_futex_requeue): Likewise.
8923         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
8924         Replace one memory operation with one register operation.
8926         * tst-join4.c (do_test): Fix error message.
8928         * tst-rwlock6.c (do_test): Use correct format specifier.
8930         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8931         (__lll_mutex_lock_wait): Replace one memory operation with one
8932         register operation.
8933         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
8934         (__lll_mutex_lock_wait): Likewise.
8936         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8937         (__lll_mutex_cond_lock): Add one to value parameter of
8938         __lll_lock_wait to reflect reality in the futex syscall.
8939         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8940         (lll_mutex_cond_lock): Likewise.
8942 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
8944         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
8945         New function.
8946         (lll_mutex_cond_lock): Define.
8948 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
8950         * Makefile (tests): Add tst-signal6.
8951         * tst-signal6.c: New file.
8953         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
8954         (__lll_mutex_unlock_force): New function
8955         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
8957         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8958         (__lll_mutex_unlock_force): New function.
8959         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
8961         * tst-rwlock7.c (do_test): Use correct format specifier.
8963         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
8964         Find break parameter in correct asm argument.
8966 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
8968         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
8969         Remove out4.
8970         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
8971         error occured.
8972         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
8973         Add __mutex.
8974         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
8975         lll_futex_requeue, lll_mutex_unlock_force): Define.
8977 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
8979         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8980         (pthread_cond_t): Add __mutex.
8981         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
8982         lll_futex_requeue, lll_mutex_unlock_force): Define.
8984 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
8986         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
8987         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
8988         Add __mutex field.
8989         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
8990         Define.
8991         (lll_futex_wait, lll_futex_wake): Define.
8992         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
8993         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
8994         FUTEX_REQUEUE instead of FUTEX_WAIT.
8995         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
8996         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
8997         mutex which was used in condvar structure.  Call
8998         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
8999         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
9001         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
9002         include tcb-offsets.h.  Read wakeup value in locked region.
9003         Use the value of gbr register as THREAD_ID.
9004         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9005         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9006         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9008         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
9009         macros.
9011 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
9013         * sysdeps/pthread/pthread_cond_broadcast.c
9014         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
9016 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
9018         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
9019         typo in register name.
9020         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
9021         correctly.  Actually use requeue.  Little optimization.
9022         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
9023         mutex address early.  Handle cancellation state as 32-bit value.
9024         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9025         Remove unnecessary label.
9027 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
9029         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
9030         instead of FUTEX_WAIT.
9031         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
9032         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9033         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9034         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
9035         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
9036         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
9037         used in condvar structure.  Call __pthread_mutex_cond_lock instead
9038         of __pthread_mutex_lock_internal.
9039         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9040         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9041         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
9042         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
9043         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9044         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9045         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
9046         Add pthread_mutex_cond_lock.
9047         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
9048         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
9049         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
9050         lll_mutex_cond_lock.
9051         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
9052         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9053         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9054         Add __mutex field.
9055         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9056         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9058         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
9059         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
9061         * pthreadP.h: Declare __pthread_mutex_cond_lock.
9062         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
9063         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
9064         macro don't define aliases.
9066         * cancellation.c: Remove __pthread_enable_asynccancel_2.
9067         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
9068         * sysdeps/pthread/pthread_cond_timedwait.c: Use
9069         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
9070         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9071         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9072         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
9073         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9074         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9076 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
9078         * sem_open.c: Fix one endless loop.  Implement correct semantics
9079         wrt opening the same semaphore more then once.
9080         * sem_close.c: Adjust for sem_open change.
9081         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
9082         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
9083         * Makefile (tests): Add tst-sem7.
9084         * tst-sem7.c: New file.
9086 2003-05-16  Roland McGrath  <roland@redhat.com>
9088         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
9089         uninitialized variable braino.
9091 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
9093         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
9094         test for syscall availability.
9096         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
9097         __no_posix_timers to -1 if the syscalls don't exist.
9099         * pthread_join.c (pthread_join): Set tid field of the joined
9100         thread to -1.  This isn't necessary but helps to recognize some
9101         error conditions with almost no cost.
9103         * allocatestack.c (FREE_P): Also negative values indicate an
9104         unused stack.
9106         * unwind.c: Include <unistd.h>.
9108 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
9110         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
9112 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
9114         * Makefile (crti-objs, crtn-objs): New variables.
9115         (omit-deps, extra-objs): Add crtn.
9116         ($(objpfx)libpthread.so): Depend on both crti and crtn
9117         and links to them in multidir.
9118         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
9120 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
9122         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
9123         (lll_mutex_unlock): Use atomic_exchange_rel.
9125 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
9127         * cond-perf.c (cons): Add missing locking around setting of alldone.
9129 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
9131         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
9132         related macros.
9133         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9135 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
9137         * tst-sem6.c: New file.
9138         * Makefile (tests): Add tst-sem6.
9140         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
9141         Use atomic_exchange_rel instead of atomic_exchange.
9142         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
9143         Likewise.
9145         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
9146         code for lll_futex_wait and lll_futex_wake in static apps.  Use
9147         vsyscall is possible.
9149         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
9150         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
9151         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
9152         pthread_setaffinity_np.
9153         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
9154         and pthread_setaffinity_np.
9155         * Makefile (libpthread-routines): Add pthread_getaffinity and
9156         pthread_setaffinity.
9158         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
9159         use it in case mmap to allocate the stack fails.
9160         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
9161         ARCH_MAP_FLAGS here.
9162         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
9163         ARCH_RETRY_MMAP.
9165 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
9167         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
9168         handler implementation.  It is now lockless in fork().
9169         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
9170         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
9171         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
9172         declare the __fork_*_lists.
9173         (struct fork_handler): Include pointers to all three functions.
9174         Add next, refcntr and need_signal elements.
9175         (__fork_handlers): New declaration.
9176         (__register_atfork_malloc): Remove declaration.
9177         (HAVE_register_atfork_malloc): Remove definition.
9178         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
9179         __pthread_child_handler variable.
9180         (__libc_pthread_init): Use __register_atfork instead of explicitly
9181         adding to the list.
9182         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
9183         and lll_futex_wake.
9184         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9186         * unwind.c (unwind_cleanup): Print error message and then abort.  This
9187         function must never be reached.
9189         * cond-perf.c: New file.
9191 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
9193         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
9195 2003-05-04  Roland McGrath  <roland@redhat.com>
9197         * Makefile ($(objpfx)../libc.so): New target.
9199 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
9201         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9202         (pthread_condattr_t): Size is only an int, don't use long for
9203         alignment.
9204         (pthread_mutexattr_t): Likewise.
9205         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9206         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9207         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9209 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
9211         * sysdeps/i386/tls.h: Define THREAD_ID.
9212         * sysdeps/ia64/tls.h: Likewise.
9213         * sysdeps/powerpc/tls.h: Likewise.
9214         * sysdeps/s390/tls.h: Likewise.
9215         * sysdeps/sh/tls.h: Likewise.
9216         * sysdeps/x86_64/tls.h: Likewise.
9217         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
9218         record ownership.
9219         * pthread_mutex_timedlock.c: Likewise.
9220         * pthread_mutex_trylock.c: Likewise.
9221         * pthread_mutex_unlock.c: Likewise.
9222         * pthread_rwlock_trywrlock.c: Likewise.
9223         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
9224         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9225         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
9226         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9228         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
9229         flag.
9231 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
9233         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9234         (__SIZEOF_PTHREAD_COND_T): Define to 48.
9235         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
9236         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
9237         Make __align long long instead of long.
9238         (pthread_rwlock_t): Formatting.
9239         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
9240         (pthread_rwlock_t): Formatting.
9241         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9242         (pthread_cond_t): Make __align long long instead of long.
9243         (pthread_rwlock_t): Move __flags field to the same position as in
9244         linuxthreads.
9246 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
9248         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
9249         * tst-rwlock7.c (do_test): Likewise.
9251 2003-04-26  Roland McGrath  <roland@redhat.com>
9253         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
9255 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
9257         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
9258         sizeof (struct pthread).
9259         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
9260         1 struct pthread.
9261         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
9262         to 0.
9263         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
9264         struct pthread.
9265         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
9266         to 32-bit bytes.
9267         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
9268         tcbp.
9269         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
9270         unneccessarily.
9271         (NO_TLS_OFFSET): Define.
9272         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
9273         add TLS_TCB_SIZE unnecessarily.
9275 2003-04-22  Roland McGrath  <roland@redhat.com>
9277         * Makeconfig (shared-thread-library): Reverse link order to work
9278         around linker bug.
9280 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
9282         * semaphore.h: Fix typo in comment.
9284 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
9286         * sysdeps/pthread/sigfillset.c: New file.
9288         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
9289         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
9290         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
9291         * sysdeps/pthread/sigaction.c: Likewise.
9292         * sysdeps/pthread/sigprocmask.c: New file.
9293         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
9294         __SIGRTMIN+1.
9295         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9296         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
9297         in this case.
9299 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
9301         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9302         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
9304         * sysdeps/unix/sysv/linux/unregister-atfork.c
9305         (__unregister_atfork): Don't free memory not allocated dynamically.
9307         * semaphore.h: Remove __THROW marker from cancellation points.
9308         * nptl/sysdeps/pthread/pthread.h: Likewise.
9310 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
9312         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
9313         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
9314         __THROW.
9316 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
9318         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
9320 2003-04-15  Roland McGrath  <roland@redhat.com>
9322         * forward.c (__pthread_unwind): Tweak to avoid warning.
9324 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
9326         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
9328 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
9330         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
9331         overflow CFA advance instructions.
9332         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9334 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
9336         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
9337         * sysdeps/i386/pthread_spin_lock.c: Likewise.
9338         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
9339         defined.
9341         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
9342         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
9343         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
9344         DW_CFA_advance_loc for .Laddl-.Lsubl.
9346 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
9348         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
9349         position-independent unwind data for static libraries.
9350         Add missing unwind info.  Add comments.
9352         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
9353         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9354         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9355         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9357 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
9359         * Makefile: Make sure all cancellation points are compiled with
9360         exception and asynchronous unwind tables.
9362         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
9363         which mishandles loading of global object addresses in PIC.
9364         (THREAD_SETMEM_NC): Likewise.
9366 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
9368         * pthread.h: Define new data structure for cleanup buffer.  Declare
9369         new cleanup handler interfaces.
9370         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
9371         (struct pthread): Add cleanup_jmp_buf pointer.  Define
9372         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
9373         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
9374         it.  Declare old cleanup handler installation functions.
9375         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
9376         handling.
9377         * cleanup_defer.c: Likewise.
9378         * cleanup_compat.c: New file.  Old cleanup code.
9379         * cleanup_def_compat.c: New file.  Old cleanup code.
9380         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
9381         if own thread descriptor.
9382         * unwind.c: New file.
9383         * forward.c: Add __pthread_unwind.
9384         * init.c (pthread_functions): Add __pthread_unwind.
9385         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
9386         Add ptr___pthread_unwind.
9387         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
9388         and unwind function.
9389         * Makefile (libpthread-routines): Add cleanup_compat,
9390         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
9391         table generation if necessary.
9392         * version.c: Record whether unwind support is compiled in.
9393         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
9394         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
9395         handler interfaces.
9396         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
9397         complication to generate unwind information for syscall wrappers.
9398         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
9399         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
9400         __cleanup_fct_attribute.
9402         * Makefile: Add rules to build and run tst-cleanup0.
9403         * tst-cleanup0.c: New file.
9404         * tst-cleanup0.expect: New file.
9406         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
9407         caller.  Optimize to avoid often unecessary local variable.
9409 2003-04-11  Roland McGrath  <roland@redhat.com>
9411         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
9412         sets variable `multidir'; include that.
9413         (generated): Add it.
9414         ($(objpfx)$(multidir)/crti.o): New target.
9415         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
9417 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
9419         * tst-attr2.c (do_test): Add cast to avoid warning.
9420         * tst-mutex4.c (do_test): Likewise.
9422 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
9424         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
9425         in child.
9427 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
9429         * Makefile (tests): Add tst-detach1.
9430         * tst-detach1.c: New file.
9432 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
9434         * sysdeps/pthread/pthread.h: Remove duplicate
9435         pthread_cleanup_{push,pop} definitions.
9437         * tst-barrier2.c: Eliminate warnings.
9438         * tst-cancel4.c: Likewise.
9439         * tst-cond4.c: Likewise.
9440         * tst-cond6.c: Likewise.
9441         * tst-detach1.c: Likewise.
9442         * tst-rwlock4.c: Likewise.
9443         * tst-rwlock6.c: Likewise.
9444         * tst-rwlock7.c: Likewise.
9445         * tst-sem3.c: Likewise.
9446         * tst-spin2.c: Likewise.
9447         * tst-umask1.c: Likewise.
9449 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
9451         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
9453 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
9455         * descr.h (struct pthread): Move cancelhandling member to the front.
9457 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
9459         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
9460         malloc_parent, and malloc_child statically.
9461         (__register_atfork_malloc): New function.
9462         (free_mem): Don't free any of the malloc_* variables on the list.
9463         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
9464         Define HAVE_register_atfork_malloc.
9466 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
9468         * sysdeps/pthread/createthread.c (create_thread): Add some more
9469         comments explaining when to set multiple_threads and when not.
9471         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9472         THREAD_ATOMIC_BIT_SET if not already defined.
9473         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9474         THREAD_ATOMIC_BIT_SET:
9475         * sysdeps/x86_64/tls.h: Likewise.
9476         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
9477         THREAD_ATOMIC_CMPXCHG_VAL.
9478         (_pthread_cleanup_pop_restore): Likewise.
9479         * cancellation.c (__pthread_enable_asynccancel): Likewise.
9480         (__pthread_enable_asynccancel_2): Likewise.
9481         (__pthread_disable_asynccancel): Likewise.
9482         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9483         (__libc_disable_asynccancel): Likewise.
9484         * init.c (sigcancel_handler): Likewise.
9485         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
9486         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
9488 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
9490         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
9491         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9492         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
9493         * Makefile (tests): Add tst-cancel11.
9494         * tst-cancel11.c: New file.
9496 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
9498         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
9499         round, not the first.  Use specific_used flag instead of local
9500         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
9501         (__free_tcb): Don't call deallocate_tsd here.
9502         (start_thread): Call deallocate_tsd here.
9503         * pthread_setspecific.c: Set specific_used flag really only when
9504         needed.
9505         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
9506         * tst-tsd3.c: New file.
9507         * tst-tsd4.c: New file.
9509 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
9511         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
9512         Use atomic_exchange_and_add instead of __lll_add.
9513         (__lll_mutex_timedlock): Likewise.
9514         Patch by Ian Wienand.
9516 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
9518         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9519         (SINGLE_THREAD_P): Fix typo.
9520         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
9522 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
9524         * Makefile (tests): Add tst-align.
9525         * tst-align.c: New file.
9526         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
9528         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
9529         function correctly.
9531         * tst-tsd2.c: Add casts to avoid warnings.
9533 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
9535         * descr.h (struct pthread): Move most often used elements to the front.
9537 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
9539         * Makefile (libpthread-routines): Add pthread_atfork.
9540         (libpthread-static-only-routines): Add pthread_atfork.
9542 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
9544         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
9545         of TLS_DTV_AT_TP.
9546         (INSTALL_DTV): Add parens.
9547         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
9548         Use passed descr instead of THREAD_SELF.
9549         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
9550         (__lll_mutex_timedlock_wait): Correct expected value after
9551         spurious wakeup.
9552         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
9553         Release lock before waking up the waiters.
9554         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
9555         criteria.  Reorderstruct passed to cleanup handler.  Fix
9556         handling of cancellation and failung pthread_mutex_unlock call.
9557         Use __pthread_enable_asynccancel_2 instead of
9558         __pthread_enable_asynccancel.
9559         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
9560         Return result of lock re-get if it fails.
9561         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
9562         for __pthread_cleanup_push.
9563         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
9564         completely broken rwlock implementation.
9565         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9566         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9567         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9568         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
9569         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9570         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
9571         versioned_symbol macro.
9572         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
9573         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
9575 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
9577         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
9578         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
9579         and __helper_tid.
9580         (struct timer): Remove th and bar field.
9581         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
9582         debugging code.  Create only one helper thread.
9583         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
9584         helper thread.
9585         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9586         Renamed.  Define statically.  Use thread info from siginfo.
9587         (__helper_once): New variable.
9588         (__helper_tid): New variable.
9589         (__reset_helper_control): New function.
9590         (__start_helper_thread): New function.
9592         * pthread_create.c (start_thread): Don't use setjmp inside
9593         __builtin_expect to work around gcc bug.
9595         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
9596         timer_delete syscall fails, but not with ENOSYS, set
9597         __no_posix_timers.
9599         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
9600         (timer_settime): Fix typo.
9601         * sysdeps/unix/sysv/linux/timer_getoverr.c
9602         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
9604 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
9606         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
9607         offset of cleanupbuf.__prev.
9609 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
9611         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
9612         of included file.
9614 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
9616         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
9617         NULL provide default definition to syscall.
9619 2003-03-25  Roland McGrath  <roland@redhat.com>
9621         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
9622         (timer_id2ptr): Fix typo.
9624 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
9626         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
9627         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
9628         * sysdeps/ia64/pthreaddef.h: Likewise.
9629         * sysdeps/powerpc/pthreaddef.h: Likewise.
9630         * sysdeps/s390/pthreaddef.h: Likewise.
9631         * sysdeps/sh/pthreaddef.h: Likewise.
9632         * sysdeps/x86_64/pthreaddef.h: Likewise.
9633         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
9634         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
9635         being changed.
9636         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
9637         SIGTIMER is not unblocked.
9638         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
9639         RT signal taken.
9640         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
9641         be send.
9642         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
9643         pass pointer through as ID.
9644         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
9645         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
9646         * sysdeps/unix/sysv/linux/timer_create.c: New file.
9647         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
9648         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
9649         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
9650         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
9651         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
9652         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
9653         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
9654         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
9655         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
9656         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
9657         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
9658         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
9659         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
9660         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
9661         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
9662         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
9663         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
9664         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
9665         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
9666         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
9667         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
9668         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
9669         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
9670         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
9671         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
9672         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
9673         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
9674         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
9675         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
9676         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
9678         * pthreadP.h: Remove FRAME_LEFT definition.
9679         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
9680         already left frame.  Programs which have this problem are not POSIX
9681         compliant.
9682         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
9684 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
9686         * sysdeps/pthread/tst-timer.c: Check return values of the
9687         functions we test.
9689 2003-03-23  Roland McGrath  <roland@redhat.com>
9691         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
9692         * tst-tls3mod.c: Likewise.
9693         * tst-tls1.c: Likewise.
9694         * tst-tls2.c: Likewise.
9696         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
9697         undefined behavior.
9699         * tst-join5.c (tf1, tf2): Add a cast.
9701         * Makeconfig (includes): Append -I$(..)nptl to this variable.
9703         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
9704         Don't test anything.
9705         * tst-cond4.c: Likewise.
9706         * tst-cond6.c: Likewise.
9707         * tst-flock2.c: Likewise.
9708         * tst-mutex4.c: Likewise.
9709         * tst-rwlock4.c: Likewise.
9710         * tst-signal1.c: Likewise.
9711         * tst-spin2.c: Likewise.
9712         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
9714         * tst-mutex4.c: Use test-skeleton.c.
9715         * tst-spin2.c: Likewise.
9716         * tst-sysconf.c: Likewise.
9717         * tst-barrier2.c: Likewise.
9718         * tst-cond4.c: Likewise.
9719         * tst-cond6.c: Likewise.
9720         * tst-rwlock4.c: Likewise.
9721         * tst-unload.c: Likewise.
9722         * tst-flock2.c (do_test): Use return instead of exit.
9724 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
9726         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
9728 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
9730         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9731         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
9732         instead of __lll_compare_and_swap.
9733         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
9734         Likewise.
9735         Removed definition if __lll_compare_and_swap.
9737         * cancellation.c: Adjust for new form of compare&exchange macros.
9738         * cleanup_defer.c: Likewise.
9739         * init.c: Likewise.
9740         * libc-cancellation.c: Likewise.
9741         * old_pthread_cond_broadcast.c: Likewise.
9742         * old_pthread_cond_signal.c: Likewise.
9743         * old_pthread_cond_timedwait.c: Likewise.
9744         * old_pthread_cond_wait.c: Likewise.
9745         * pthread_cancel.c: Likewise.
9746         * pthread_create.c: Likewise.
9747         * pthread_detach.c: Likewise.
9748         * pthread_join.c: Likewise.
9749         * pthread_key_delete.c: Likewise.
9750         * pthread_setcancelstate.c: Likewise.
9751         * pthread_setcanceltype.c: Likewise.
9752         * pthread_timedjoin.c: Likewise.
9753         * pthread_tryjoin.c: Likewise.
9754         * sysdeps/pthread/createthread.c: Likewise.
9756 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
9758         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
9759         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
9760         definitions.  Replace uses with calls to atomic_* functions.
9761         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
9762         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
9763         __lll_test_and_set calls with atomic_exchange_and_add and
9764         atomic_exchange calls respectively.
9765         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
9766         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
9767         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
9768         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
9769         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
9770         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
9771         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
9773         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
9774         returns the old value.
9776 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
9778         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
9779         int for variable OLDVAL and correct inline assembler contraint.
9780         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
9781         type int for variable OLD.
9783         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
9784         only for s390-32.
9785         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
9786         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
9787         instead of multiple_threads field in the TCB.
9789 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
9791         * sysdeps/i386/i686/bits/atomic.h: Removed.
9792         * sysdeps/i386/i586/bits/atomic.h: Removed.
9793         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
9794         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
9795         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
9796         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
9797         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
9798         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
9799         * atomic.h: Removed.  Moved to glibc.
9801         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
9802         support for clock selection.
9804         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
9805         signalling waiters.
9807 2003-03-18  Roland McGrath  <roland@redhat.com>
9809         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
9810         Add __lll_rel_instr first.  Add memory clobber.
9811         (lll_mutex_unlock): Use __lll_test_and_set.
9812         From Paul Mackerras <paulus@samba.org>.
9814         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
9815         unconditionally.
9816         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9817         (SINGLE_THREAD_P):  Add `header.' prefix.
9818         From Paul Mackerras <paulus@samba.org>.
9820         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
9821         pthread_timedjoin_np to ...
9822         (libpthread: GLIBC_2.3.3): ... here.
9823         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
9825         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
9826         Avoid shadowing VAL variable.
9828         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
9829         New macro.
9831 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
9833         * Makefile (tests): Add tst-cond11.
9834         * tst-cond11.c: New file.
9836         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
9837         struct passed to cleanup handler to eliminate one more
9838         instruction.
9839         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9841         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9842         (pthrad_cond_t): Replace __unused field with __clock.
9844         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
9845         waken all waiters in cleanup handler.
9846         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9847         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9849         * pthread_condattr_getclock.c: New file.
9850         * pthread_condattr_setclock.c: New file.
9851         * sysdeps/pthread/pthread.h: Declare these new functions.
9852         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
9853         * Makefile (libpthread-routines): Add the new functions.
9854         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
9855         Renamed field to value.  Document use of the bits.
9856         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
9857         change.
9858         * pthread_condattr_setpshared.c: Likewise.
9859         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
9860         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
9861         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9862         Add __clock field.
9863         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9864         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9865         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9866         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
9867         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
9868         Implement clock selection.
9869         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
9870         * pthread-errnos.sym: Add ENOSYS.
9871         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
9872         _POSIX_CLOCK_SELECTION.
9873         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
9875         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
9876         invalid .size directive.
9878 2003-03-17  Roland McGrath  <roland@redhat.com>
9880         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
9881         Formatting tweaks.
9883 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
9885         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
9886         Use __lll_add instead of spelling it out.  Use protected symbol names.
9887         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
9888         Use __lll_add.
9889         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
9890         Renamed from lll_compare_and_swap.  Use new name where necessary.
9891         (__lll_add): Defined.
9892         (__lll_dec_if_positive): Defined.
9893         (__lll_test_and_set): Defined.
9894         * sysdeps/ia64/pthread_spin_init.c: Removed.
9895         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
9896         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
9897         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
9898         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
9899         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
9900         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
9901         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
9902         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
9903         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
9904         __sync_lock_release_si.
9905         Patch by Jakub Jelinek.
9907         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
9908         Fix timeout handling.
9909         (__lll_timedwait_tid): Likewise.
9910         (lll_unlock_wake_cb): Wake up other waiters if necessary.
9911         Patch by Jakub Jelinek.
9913         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
9915 2003-03-17  Roland McGrath  <roland@redhat.com>
9917         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
9918         * sysdeps/pthread/pthread_spin_init.c: New file.
9919         * sysdeps/pthread/pthread_spin_unlock.c: New file.
9920         * sysdeps/powerpc/Makefile: New file.
9921         * sysdeps/powerpc/pthread_spin_lock.c: New file.
9922         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
9923         * sysdeps/powerpc/pthreaddef.h: New file.
9924         * sysdeps/powerpc/tcb-offsets.sym: New file.
9925         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
9926         * sysdeps/powerpc/tls.h: New file.
9927         * sysdeps/powerpc/bits/atomic.h: New file.
9928         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
9929         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
9930         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
9932         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
9933         * sysdeps/unix/sysv/linux/sem_post.c: New file.
9934         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
9935         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
9936         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
9937         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
9938         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
9939         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
9940         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
9941         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
9942         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
9943         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
9944         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
9945         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
9946         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
9948         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
9949         not gettimeofday.
9950         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
9951         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
9952         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
9953         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
9954         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9956 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
9958         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
9959         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
9960         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9961         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9962         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
9964 2003-03-16  Roland McGrath  <roland@redhat.com>
9966         * tst-fork4.c: Include <string.h>.
9967         * tst-signal2.c: Likewise.
9968         * tst-mutex5.c (do_test): exit -> return.
9969         * tst-mutex2.c: Include <stdlib.h>.
9971 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
9973         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9974         (__lll_mutex_timedlock_wait): Correct expected value after
9975         spurious wakeup.  Otherwise we would never wait again.
9977         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
9978         zone versus inline asm stupidity.  Use correct instructions.
9980         * tst-rwlock6.c: Add some more status output.
9982 2003-03-15  Roland McGrath  <roland@redhat.com>
9984         * sysdeps/pthread/configure.in: New file.
9985         * sysdeps/pthread/configure: New file (generated).
9987 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
9989         * allocatestack.c (allocate_stack): Store the exact stack size of
9990         user allocated stacks.
9992 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
9994         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
9995         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
9996         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
9997         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
9998         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
9999         Use `header.' prefix.
10000         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
10002 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
10004         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
10005         __builtin_frame_address, use stack pointer.
10007         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
10008         instead of __builtin_frame_pointer.
10010 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
10012         * tst-basic1.c (do_test): Add cast to avoid warning.
10013         * tst-basic2.c (do_test): Likewise.
10015         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
10016         amount of stack correction.
10018         * tst-fork4.c: Use test-skeleton.c.
10020 2003-03-14  Roland McGrath  <roland@redhat.com>
10022         * init.c: Fix typo "#eli" for "#else".
10024 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
10026         * allocatestack.c (__stack_user): Use hidden_data_def.
10027         * pthread_create.c (__pthread_keys): Likewise.
10029         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
10031 2003-03-14  Roland McGrath  <roland@redhat.com>
10033         * tst-fork4.c: New file.
10034         * Makefile (tests): Add it.
10036         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
10037         we always define the padding space.
10038         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
10039         stopped supporting its own extensions fully.
10040         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
10041         struct also called `header', so `header.multiple_threads' is the field
10042         name to use on all machines.
10043         * allocatestack.c (allocate_stack): Use `header.' prefix.
10044         * sysdeps/pthread/createthread.c (create_thread): Likewise.
10045         * pthread_create.c (__pthread_create_2_1): Likewise.
10046         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
10047         (THREAD_SELF): Likewise.
10048         * sysdeps/x86_64/tls.h: Likewise.
10049         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
10050         (SINGLE_THREAD_P): Likewise.
10051         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
10052         (SINGLE_THREAD_P): Likewise.
10053         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
10054         (SINGLE_THREAD_P): Likewise.
10056         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
10057         value directly.
10059 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
10061         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
10062         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
10064         * pthread_create.c (start_thread): setjmp is expected to return 0.
10066         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
10067         (THREAD_GETMEM_NC): Likewise.
10069 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
10071         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
10072         and the size of the stack which must be allocated is a multiple,
10073         allocate one more page.
10074         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
10075         MULTI_PAGE_ALIASING.
10077 2003-03-13  Roland McGrath  <roland@redhat.com>
10079         * pthread_create.c (start_thread): Set EXITING_BIT after the
10080         event-reporting (and destructors), not before.
10082 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
10084         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
10085         lll_futex_wake): Declare register variables as long int instead of
10086         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
10087         Make syscall arguments clobbered by the syscall.
10088         (lll_futex_wait): Define using lll_futex_timed_wait.
10090         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
10091         to void *.
10093         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
10094         PPID if [! NDEBUG].
10096         * allocatestack.c (nptl_ncreated): Only declare if
10097         COLORING_INCREMENT != 0.
10099         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
10100         (__libc_enable_asynccancel_2): Remove prototype.
10102         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
10103         ctid to match kernel.
10105 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
10107         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
10108         libc_multiple_threads.
10109         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
10110         __libc_multiple_threads to...
10111         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
10113         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
10114         versioning.
10115         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10116         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10118         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
10119         (__pthread_once_internal): Define.
10121         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
10122         macros instead of .symver directly.
10123         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
10124         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
10126         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
10127         * sysdeps/x86_64/tcb-offsets.sym: New file.
10128         * sysdeps/x86_64/Makefile: New file.
10130         * sysdeps/i386/tcb-offsets.sym: Add SELF.
10131         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
10132         to access own pthread_t in TCB.
10133         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10134         Likewise.
10135         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10136         Likewise.
10137         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10139 2003-03-12  Roland McGrath  <roland@redhat.com>
10141         * pthread-errnos.sym: New file.
10142         * Makefile (gen-as-const-headers): New variable, list that file.
10143         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
10144         header <pthread-errnos.h> instead of defining errno values here.
10145         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
10146         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
10147         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
10148         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10149         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10150         Likewise.
10151         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10152         Likewise.
10153         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
10154         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10155         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10156         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10157         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10158         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10159         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
10160         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
10161         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
10162         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
10163         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
10164         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
10165         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
10166         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
10167         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
10168         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
10169         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
10170         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
10171         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
10172         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
10173         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10174         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
10175         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
10176         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
10177         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
10178         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
10179         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
10181         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
10182         CLONE_CHILD_SETTID worked.
10184 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
10186         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
10187         file.
10188         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
10189         file.
10191         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
10192         (pthread_cond_t): Add padding.
10194         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
10195         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
10196         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
10198         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
10199         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
10200         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
10201         (__pthread_rwlock_timedrdlock): Likewise.
10202         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
10203         (__pthread_rwlock_wrlock): Likewise.
10204         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
10205         (__pthread_rwlock_rdlock): Likewise.
10207         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
10209         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
10210         result of lock re-get if it fails.
10212 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
10214         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
10215         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
10216         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
10217         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
10218         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
10219         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
10220         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
10221         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
10222         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10223         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10225         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
10226         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
10228         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
10229         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
10230         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
10231         (create_thread): Likewise.
10232         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
10233         * init.c (__pthread_initialize_minimal_internal): Initialize
10234         __libc_multiple_threads_ptr if necessary.
10235         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
10236         __pthread_multiple_threads and __libc_multiple_threads_ptr.
10237         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
10238         __libc_multiple_threads.
10239         (__libc_pthread_init): Return pointer to __libc_pthread_init if
10240         necessary.
10242         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
10243         (THREAD_SETMEM_NC): Likewise.
10245         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
10246         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
10247         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
10248         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
10250         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
10251         Eliminate one entire instruction.
10253         * cancellation.c (__pthread_enable_asynccancel_2): New function.
10254         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
10255         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
10256         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
10257         instead of __pthread_enable_asynccancel.
10258         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10259         (__pthread_cond_wait): Likewise.
10260         * sysdeps/pthread/pthread_cond_timedwait.c
10261         (__pthread_cond_timedwait): Likewise.
10262         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
10264         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10265         (__condvar_cleanup): Wake up all waiters in case we got signaled
10266         after being woken up but before disabling asynchronous
10267         cancellation.
10268         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10269         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
10270         (__condvar_cleanup): Likewise.
10272         * init.c (__NR_set_tid_address): If already defined, don't redefine.
10273         Make it an error if architecture has no #if case.  Add x86-64.
10275         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
10276         pt-initfini.s generation.
10278         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
10279         (TLS_INIT_TP): Fix typo.
10281 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
10283         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
10284         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
10286         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
10287         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
10288         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
10289         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
10290         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
10291         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10292         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10293         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10295 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
10297         * sysdeps/pthread/pthread_cond_timedwait.c
10298         (__pthread_cond_timedwait): Return the result of the final
10299         locking.  If it succeeds, the regular function return value.
10301         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
10302         Return result of the final locking.
10303         * version.c (__nptl_main): Work around problems with the strange
10304         INTERNAL_SYSCALL macro on ppc32.
10305         * init.c (__pthread_initialize_minimal_internal): Unblock
10306         SIGCANCEL in case the parent blocked it.
10307         Reported by Paul Mackerras <paulus@samba.org>.
10309         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
10310         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
10311         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
10313 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
10315         * sysdeps/pthread/pthread_cond_timedwait.c
10316         (__pthread_cond_timedwait): Unlock and fail if
10317         __pthread_mutex_unlock_internal failed.
10319         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
10320         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
10321         Use ARCH_CLONE.
10322         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
10323         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
10324         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
10325         ALLOCATE_STACK): New macros.
10326         (TLS_TPADJ): New macro.
10327         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
10328         (allocate_stack): Handle TLS_DTV_AT_TP and
10329         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
10330         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
10331         Don't set PD->self.
10332         * init.c [__ia64__] (__NR_set_tid_address): Define.
10334         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
10335         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
10336         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
10337         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
10338         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
10339         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
10340         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
10341         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
10342         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
10343         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
10344         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
10345         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
10346         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
10347         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
10348         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
10349         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
10350         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
10351         * sysdeps/ia64/bits/atomic.h: New file.
10352         * sysdeps/ia64/Makefile: New file.
10353         * sysdeps/ia64/pthread_spin_init.c: New file.
10354         * sysdeps/ia64/pthread_spin_lock.c: New file.
10355         * sysdeps/ia64/pthread_spin_trylock.c: New file.
10356         * sysdeps/ia64/pthread_spin_unlock.c: New file.
10357         * sysdeps/ia64/pthreaddef.h: New file.
10358         * sysdeps/ia64/tcb-offsets.sym: New file.
10359         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
10360         * sysdeps/ia64/tls.h: New file.
10362         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
10363         to syscall instead of no arguments.
10365 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
10367         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
10368         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
10369         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
10370         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
10372         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
10373         unused code.
10375         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
10377         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10378         lowlevelbarrier.sym.
10379         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
10380         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
10381         Include lowlevelbarrier.h and don't define offsets locally.
10382         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
10384         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
10385         (__lll_mutex_lock_wait): Reverse order of first two parameters.
10386         (__lll_mutex_timedlock_wait): Likewise.
10387         (lll_mutex_lock): Adjust asm for that.
10388         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
10389         (lll_lock): Adjust asm for operand order change.
10390         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
10391         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
10393         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
10394         Reverse order of parameters.
10395         (__lll_timedwait_tid): Remove regparms attribute.
10396         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
10397         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
10399         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10400         (__lll_timedwait_tid): Remove one unnecessary instruction.
10402         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
10403         __lll_mutex_timedlock_wait only for NOT_IN_libc.
10404         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
10405         lowlevelmutex.S.
10407         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
10408         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
10409         for NOT_IN_libc.
10410         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
10411         lowlevellock.S.
10413         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
10414         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
10415         for libc.so.
10416         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
10417         define LOCK here (if UP is not defined).  The actual code is in
10418         lowlevelmutex.S.
10420         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
10421         LOCK is already defined.  Don't define lll_unlock_wake_cb and
10422         __lll_timedwait_tid for libc.so.
10423         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
10424         define LOCK here (if UP is not defined).  The actual code is in
10425         lowlevellock.S.
10427         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
10428         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
10429         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
10430         instead of lowlevelsem.h.
10431         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10432         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10433         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10435         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10436         lowlevelrwlock.sym.
10437         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
10438         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
10439         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
10441         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
10442         register loading.
10443         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
10444         last changed.  D'oh.
10446         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
10448         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
10449         of __libc_locking_needed.
10450         (lll_trylock): Initialize %eax to zero.
10452         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
10453         pthread_cond_t definition.
10455 2003-03-10  Roland McGrath  <roland@redhat.com>
10457         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
10458         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
10459         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
10460         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
10461         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
10463         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
10464         Instead of setting PD->multiple_threads, set globals
10465         __pthread_multiple_threads and __libc_multiple_threads.
10466         * sysdeps/pthread/createthread.c (create_thread): Likewise.
10467         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
10468         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
10470         * descr.h (struct pthread): Conditionalize first member on
10471         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
10472         containing an anonymous tcbhead_t.  Move `list' member out.
10473         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
10474         * allocatestack.c: Remove use of `header.data.' prefix.
10475         * pthread_create.c: Likewise.
10476         * init.c (__pthread_initialize_minimal_internal): Likewise.
10477         * sysdeps/pthread/createthread.c (create_thread): Likewise.
10478         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
10479         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
10480         * sysdeps/x86_64/tls.h: Likewise.
10481         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
10482         (SINGLE_THREAD_P): Likewise.
10483         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
10484         (SINGLE_THREAD_P): Likewise.
10485         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
10486         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
10488 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
10490         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
10492         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
10493         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10495         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
10496         leftovers from the ia32 code.
10498         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
10499         memory load.
10500         (clear_once_control): Don't load %esi.
10502         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
10503         handling.
10505         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10507         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
10508         * sysdeps/unix/sysv/linux/createthread.c: ...here.
10510         * Makefile (tests): Add tst-cond10.
10511         * tst-cond10.c: New file.
10513 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
10515         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
10516         * tst-signal3.c (do_test): Likewise.
10517         * tst-sem5.c (do_test): Likewise.
10518         * tst-kill6.c (do_test): Likewise.
10519         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
10521         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
10522         of inc/dec.
10523         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
10524         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
10525         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
10526         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
10527         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10528         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10529         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10530         Likewise.
10531         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10532         Likewise.
10533         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
10534         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10535         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10536         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10537         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10538         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
10539         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10540         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10542         * allocatestack.c (allocate_stack): If mprotect() fails free the
10543         TLS memory.
10545 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
10547         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
10549         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
10550         lll_wake_tid.  This was used only to work around kernel limits in
10551         the early days.
10552         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
10553         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
10554         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10555         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
10557         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
10558         (__pthread_initialize_minimal_internal): Change initialization of
10559         __static_tls_align_m1 appropriately.
10560         * pthreadP.h (__static_tls_align_m1): Renamed from
10561         __static_tls_align.
10562         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
10563         instead of __static_tls_align-1.
10565 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
10567         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
10569         * pthread_create.c: Define __pthread_keys using nocommon
10570         attribute, not by placing it explicitly in bss.
10571         Remove DEFINE_DEALLOC definition.  Not needed anymore.
10573         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
10574         Use it in mmap call to allocate stacks.
10576         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
10578         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
10579         result of the thread function.
10581 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
10583         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
10584         version is just fine.
10586         * sysdeps/unix/sysv/linux/libc_pthread_init.c
10587         (__pthread_child_handler): Renamed from pthread_child_handler,
10588         exported, and marked hidden.  Change all users.
10589         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
10590         free __pthread_child_handler from child list.
10592 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
10594         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
10596         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
10597         Fix handling of cancellation and failing pthread_mutex_unlock call.
10598         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10599         (__pthread_cond_wait): Likewise.
10601         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
10602         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
10603         lll_futex_timed_wait call.
10604         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
10605         (pthread_rwlock_timedwrlock): Likewise.
10607         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
10608         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
10609         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
10611         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
10612         check of lll_futex_wake return value.
10614 2003-03-03  Roland McGrath  <roland@redhat.com>
10616         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
10618         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10619         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
10620         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
10622 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
10624         * sysdeps/pthread/timer_create.c (timer_create): Return correct
10625         error for CPU clocks.
10627         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
10628         _POSIX_MONOTONIC_CLOCK.
10629         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
10631         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
10632         recent kernels.
10634 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
10636         * descr.h (struct pthread): Move cleanup field to the front.
10638 2003-03-01  Roland McGrath  <roland@redhat.com>
10640         * sem_open.c (sem_open): Braino fix.
10642 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
10644         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
10645         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
10646         __pthread_cleanup_pop functionality.
10647         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10649         * descr.h (struct pthread): Move tid field to the front now that
10650         it is often used.
10652         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
10653         (__lll_mutex_timedlock_wait): Remove.
10654         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10655         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
10656         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10657         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10658         (lll_unlock_wake_cb): Don't save and restore %esi.
10659         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
10660         %esi.
10661         (__lll_timedwait_tid): Add alignment.
10662         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
10663         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
10664         %esi.
10665         (__lll_timedwait_tid): Removed.
10666         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
10667         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
10668         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
10669         (pthread_barrier_wait): Don't save, load, and restore %esi for
10670         last thread.
10671         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
10672         (__pthread_cond_signal): Don't save, load, and restore %esi.
10673         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
10674         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
10675         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
10676         Don't save, load, and restore %esi.
10678 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
10680         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
10681         Release lock before waking up the waiters.
10683         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
10685         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
10686         (reader_thread): Likewise.
10688         * sysdeps/pthread/pthread_rwlock_unlock.c
10689         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
10690         to wake up readers if there are none.
10692         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
10693         Release internal lock before wake threads.
10695 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
10697         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
10698         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
10699         predefined.
10700         * tst-rwlock9.c: Likewise.
10701         * tst-rwlock10.c: New file.
10702         * tst-rwlock11.c: New file.
10704         * Makefile (tests): Add tst-dlsym1.
10705         * tst-dlsym1.c: New file.
10707         * init.c (__pthread_initialize_minimal_internal): Set
10708         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
10709         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
10711 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
10713         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
10715         * tst-cond2.c: Fix sychronization with child.
10717         * tst-rwlock8.c (reader_thread): Remove unused variable.
10719         * Makefile: Add rules to build and run tst-tls3.
10720         * tst-tls3.c: New file.
10721         * tst-tls3mod.c: New file.
10723         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
10724         * tst-rwlock8.c: New file.
10725         * tst-rwlock9.c: New file.
10726         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
10727         complete broken rwlock implementation.
10728         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10729         Likewise.
10730         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10731         Likewise.
10732         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10733         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10734         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
10735         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
10736         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
10737         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
10738         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
10740 2003-02-23  Roland McGrath  <roland@redhat.com>
10742         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
10744 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
10746         * Makefile (tests): Add tst-context1.
10747         * tst-context1.c: New file.
10749         * Makefile (tests): Add tst-tls1 and tst-tls2.
10750         * tst-tls1.c: New file.
10751         * tst-tls2.c: New file.
10753         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
10754         for failed cmpxchg.
10756         * pthread_create.c (start_thread): Set EXITING_BIT early.
10758         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
10759         (THREAD_GETMEM_NC): Likewise.
10761 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
10763         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
10764         off 3 more bytes by using offset-less instructions when possible.
10766         * Makefile: Add dependency for $(objpfx)version.d.
10768         * eintr.c (eintr_source): Add unnecessary return but the compiler
10769         insists.
10771         * tst-kill3.c: Include <unistd.h>.
10773 2003-02-21  Roland McGrath  <roland@redhat.com>
10775         * pthread_create.c (start_thread): Call __libc_thread_freeres.
10777 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
10779         * Makefile (tests): Add tst-eintr1.
10780         (distribute): Add eintr.c.
10781         * tst-eintr1.c: New file.
10782         * eintr.c: New file.
10784         * pthread_cancel.c (pthread_cancel): Use tkill directly.
10786         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
10787         Disallow sending SIGCANCEL.
10789         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
10790         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
10791         * tst-kill1.c: New file.
10792         * tst-kill2.c: New file.
10793         * tst-kill3.c: New file.
10794         * tst-kill5.c: New file.
10795         * tst-kill6.c: New file.
10796         * tst-basic7.c: Renamed to...
10797         * tst-kill4.c: ...this.
10799 2003-02-21  Roland McGrath  <roland@redhat.com>
10801         * Makefile (install-lib-ldscripts): New variable.
10803 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
10805         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
10806         * pthread_cancel.c: Use INVALID_TD_P.
10807         * pthread_detach.c: Likewise.
10808         * pthread_getschedparam.c: Likewise.
10809         * pthread_setschedparam.c: Likewise.
10810         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
10811         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
10812         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
10813         * pthread_timedjoin.c: Likewise.
10815         * tst-basic7.c: Include <signal.h>.
10817         * pthread_join.c (pthread_join): Limited checking for invalid
10818         descriptors.
10819         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
10821 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
10823         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
10824         beginning of the loop.  Clear the entire first block of TSD.
10825         * Makefile (tests): Add tst-key4.
10826         * tst-key4.c: New file.
10828 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
10830         * Makefile (tests): Add tst-basic7.
10831         * tst-basic7.c: New file.
10833         * pthread_create.c (deallocate_tsd): Mark as internal_function.
10834         Add some more __builtin_expect.
10836         * pthreadP.h: Define dummy version of DEBUGGING_P.
10838 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
10840         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
10841         _POSIX_THREAD_PRIORITY_SCHEDULING.
10842         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
10843         _XOPEN_REALTIME_THREADS.
10844         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
10846         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
10847         kernel returns EINVAL for PID <= 0, work around it.
10849         * Makefile (tests): Add tst-signal5.
10850         * tst-signal5.c: New file.
10852         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
10853         and LOGIN_NAME_MAX.
10855         * tst-cancel1.c (tf): Block all signals.
10857         * Makefile (tests): Add tst-basic6.
10858         * tst-basic6.c: New file.
10860         * tst-basic1.c: Add test for process ID.
10862         * Makefile (tests): Add tst-cancel10.
10863         * tst-cancel10.c: New file.
10865         * Makefile (tests): Add tst-signal4.
10866         * tst-signal4.c: New file.
10868         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
10869         __sigismember instead of sigismember.  Add __builtin_expect.
10871 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
10873         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
10874         pthread_setcancelstate, and pthread_rwlock_setpshared.
10876         * tst-cancel7.c (do_test): Make sure the pid file exists before
10877         canceling the thread.
10879         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
10880         pthread_rwlock_timedrdlock tests.
10881         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
10882         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10883         Check for invalid tv_nsec field.
10884         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10885         Likewise.
10887         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
10888         recursive mutex of overflow.
10890         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
10892         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
10893         going into an endless loop.
10894         * Makefile (tests): Add tst-cancel9.
10895         * tst-cancel9.c: New file.
10897         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
10899 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
10901         * tst-mutex5.c (do_test): Add more timedlock tests.
10903         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
10904         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
10906         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
10907         use INLINE_SYSCALL.  Error number is returned, not -1.
10909         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
10910         and __deallocate_stack with internal_function.
10911         * pthread_create.c: Adjust definitions appropriately.
10912         * allocatestack.c: Likewise.
10914         * pthread_join.c: Add one more __builtin_expect.
10915         * pthread_timedjoin.c: Likewise.
10917         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
10918         not data of sequence number does not match.
10919         Add one __builtin_expect.
10921         * Makefile (tests): Add tst-clock1.
10922         * tst-clock1.c: New file.
10924         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
10925         negative arguments.
10926         * Makefile (tests): Add tst-basic5.
10927         * tst-basic5.c: New file.
10929 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
10931         * Makefile (tests): Add tst-basic4.
10932         * tst-basic4.c: New file.
10934         * pthreadP.h: Add declaraction for __nptl_nthreads.
10935         * pthread_create.c: Define __nptl_nthreads
10936         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
10937         after thread is done.  If then zero, call exit(0).
10938         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10939         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
10940         * init.c (pthread_functions): Initialize ptr_nthreads.
10941         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
10942         (__reclaim_stacks): Decrement __nptl_nthreads.
10943         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
10944         Define.
10945         * Makefile (tests): Add tst-basic3.
10946         * tst-basic3.c: New file.
10948         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
10949         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
10950         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
10951         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
10952         if asynchronous canceling is enabled.
10953         * pthread_join.c (pthread_join): When recognizing circular joins,
10954         take into account the other thread might be already canceled.
10955         * Makefile (tests): Add tst-join5.
10956         * tst-join5.c: New file.
10958         * Makefile (tests): Add tst-join4.
10959         * tst-join4.c: New file.
10961 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
10963         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
10965 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
10967         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
10968         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
10969         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
10970         warning.
10971         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
10972         to avoid warning.
10973         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
10974         error if lll_futex_wake failed.
10976 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
10978         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
10979         handling of cancellation and failung pthread_mutex_unlock call.
10980         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10981         * Makefile (tests): Add tst-cond8 and tst-cond9.
10982         * tst-cond8.c: New file.
10983         * tst-cond9.c: New file.
10985         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
10987         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
10988         non-standard initializers with __USE_GNU.
10990         * Makefile (tests): Add tst-cleanup3.
10991         * tst-cleanup3.c: New file.
10993 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
10995         * Makefile (tests): Add tst-attr1 and tst-attr2.
10996         * tst-attr1.c: New file.
10997         * tst-attr2.c: New file.
10999         * Makefile: Add rules to build and run tst-atfork2 test.
11000         * tst-atfork2.c: New file.
11001         * tst-atfork2mod.c: New file.
11003         * sysdeps/unix/sysv/linux/unregister-atfork.c
11004         (__unregister_atfork): Free the memory allocated for the handlers
11005         after removing them from the lists.
11007         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
11008         cleanup function.
11010         * tst-atfork1.c (do_test): Wait for the child we forked.
11011         Report error in child.
11013         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
11015         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
11017 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
11019         * Makefile (tests): Add tst-cancel8.
11020         * tst-cancel8.c: New file.
11022         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
11023         clearing of control variable.
11024         * Makefile (tests): Add tst-once3 and tst-once4.
11025         * tst-once3.c: New file.
11026         * tst-once4.c: New file.
11028 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
11030         * sysdeps/sh/Makefile: New file.
11031         * sysdeps/sh/bits/atomic.h: New file.
11032         * sysdeps/sh/pthread_spin_init.c: New file.
11033         * sysdeps/sh/pthread_spin_lock.c: New file.
11034         * sysdeps/sh/pthread_spin_trylock.S: New file.
11035         * sysdeps/sh/pthread_spin_unlock.S: New file.
11036         * sysdeps/sh/pthreaddef.h: New file.
11037         * sysdeps/sh/tcb-offsets.sym: New file.
11038         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
11039         * sysdeps/sh/tls.h: New file.
11040         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
11041         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
11042         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
11043         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
11044         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
11045         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
11046         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
11047         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
11048         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
11049         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
11050         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
11051         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
11052         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
11053         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
11054         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
11055         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
11056         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
11057         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
11058         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
11059         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
11060         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
11061         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
11062         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
11063         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
11064         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
11065         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
11066         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
11067         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
11068         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
11069         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
11071 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
11073         * tst-cond2.c: Rearrange code to not rely on behavior undefined
11074         according to POSIX.
11076         * tst-basic2.c (do_test): Lock mutex before creating the thread.
11078 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
11080         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
11081         (TLS_GET_FS): New #define.
11082         (TLS_SET_FS): New #define.
11083         Correct value of __NR_set_thread_area.
11085         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
11087 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
11089         * Makefile (tests): Add tst-popen1.
11090         * tst-popen1.c: New file.
11092         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
11093         but inactive generalization.
11094         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
11095         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
11096         Minor optimization, remove one instruction.
11097         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
11099 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
11101         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
11103 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
11105         * init.c (__NR_set_tid_address): Add #ifdef for s390.
11106         * sysdeps/pthread/pthread_barrier_wait.c: New file.
11107         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
11108         * sysdeps/pthread/pthread_cond_signal.c: New file.
11109         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
11110         * sysdeps/pthread/pthread_cond_wait.c: New file.
11111         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
11112         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
11113         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
11114         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
11115         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
11116         * sysdeps/s390/Makefile: New file.
11117         * sysdeps/s390/bits/atomic.h: New file.
11118         * sysdeps/s390/pthread_spin_init.c: New file.
11119         * sysdeps/s390/pthread_spin_lock.c: New file.
11120         * sysdeps/s390/pthread_spin_trylock.c: New file.
11121         * sysdeps/s390/pthread_spin_unlock.c: New file.
11122         * sysdeps/s390/pthreaddef.h: New file.
11123         * sysdeps/s390/tcb-offsets.sym: New file.
11124         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
11125         * sysdeps/s390/tls.h: New file.
11126         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
11127         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
11128         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
11129         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
11130         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
11131         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
11132         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
11133         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
11134         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
11135         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
11136         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
11137         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
11138         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
11139         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
11140         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
11141         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
11142         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
11143         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
11144         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
11145         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
11146         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
11147         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
11148         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
11150 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
11152         * atomic.h: Add a couple more default implementations.
11153         (atomic_compare_and_exchange_acq): Use
11154         __arch_compare_and_exchange_32_acq in return value definition.  It
11155         always exists.
11156         (atomic_bit_set): Renamed from atomic_set_bit.
11157         Add missing atomic_ prefixes.
11159         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
11160         thread library is available, use correct value to mark initialized
11161         once variable.
11163 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
11165         * allocatestack.c (allocate_stack): Use __getpagesize instead of
11166         __sysconf to determine pagesize.
11168         * pthread_create.c: Include <atomic.h>.
11169         * allocatestack.c (allocate_stack): Implement coloring of the
11170         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
11171         size minus one.  Adjust users.
11172         * sysdeps/i386/i686/Makefile: New file.
11174 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
11176         * allocatestack.c: Improve comment throughout the file.
11178         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
11179         (__lll_lock_wait): Add branch prediction.
11180         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
11181         (__lll_lock_wait): Likewise.
11182         (lll_unlock_wake_cb): Removed.
11184 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
11186         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
11187         _POSIX_THREAD_PRIORITY_SCHEDULING.
11189 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
11191         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
11192         Fix return type of ptr___pthread_getspecific.
11194 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
11196         * Makefile (tests): Add tst-umask1.
11197         (tst-umask1-ARGS): Define.
11198         * tst-umask1.c: New file.
11200 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
11202         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
11203         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
11204         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
11205         pthread_rwlock_unlock.
11206         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
11207         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
11208         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
11209         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
11210         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11211         New file.
11212         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
11213         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11214         New file.
11215         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
11216         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
11217         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
11218         New file.
11219         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
11220         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
11221         New file.
11222         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
11223         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
11224         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
11225         New file.
11226         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
11227         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
11228         New file.
11229         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
11231         * Makefile (libpthread-routines): Remove lowlevelcond and
11232         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
11233         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
11234         and pthread_cond_broadcast.
11235         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
11236         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
11237         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
11238         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
11239         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
11240         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
11241         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
11242         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
11243         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
11244         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
11245         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
11246         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
11247         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
11248         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
11249         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
11250         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
11251         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
11252         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
11253         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
11254         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
11255         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
11256         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
11257         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
11258         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
11259         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
11260         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
11261         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
11262         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
11263         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
11264         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
11265         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
11267         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
11268         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
11269         of the code is moved to ...
11270         * sysdeps/pthread/createthread.c: ...here.  New file.
11272 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
11274         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
11275         (__new_sem_post): Clear %eax before returning.
11276         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
11278         * Makefile (tests): Add tst-cleanup2.
11279         * tst-cleanup2.c: New file.
11281         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
11282         Interpret first parameter correctly.
11284 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
11286         * Makefile (headers): Add bits/semaphore.h.
11288 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
11290         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
11291         if not SHARED.
11293 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
11295         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
11296         must be used and mapping failed.
11297         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
11299         * Makefile (CFLAGS-pthread_self.os): Define this, not
11300         CFLAGS-pthread_self.c.
11302 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
11304         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
11305         lll_unlock_wake_cb.
11307         * Makefile (libpthread-routines): Add version.  Add rules to build
11308         version.os and banner.h.
11309         * version.c: New file.
11311 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
11313         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
11314         the alias unconditional.
11315         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
11317 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
11319         * Makefile (CFLAGS-pthread_self.c): New definition.
11321 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
11323         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
11324         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
11325         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
11326         * init.c (__pthread_initialize_minimal_internal): Likewise.
11328 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
11330         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
11332         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
11333         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11334         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11335         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
11336         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11337         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11339 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
11341         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
11342         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
11343         * tst-cancel-wrappers.sh: Remove all exceptions.
11345 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
11347         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
11348         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
11350         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
11351         Use __libc_pthread_functions array if SHARED.
11353         * pthreadP.h: Move pthread_cond_2_0_t definition to...
11354         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
11356         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
11357         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
11358         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
11359         __libc_ptf_call instead of __libc_maybe_call.
11360         (PTF): New #define.
11361         (__libc_cleanup_region_start): Wrap function name with PTF call.
11362         (__libc_cleanup_region_end): Likewise.
11363         (__libc_cleanup_end): Likewise.
11365         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
11366         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
11367         * pthread_key_create.c: Add __pthread_key_create_internal alias.
11368         * pthreadP.h: Add prototypes.
11370         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
11371         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
11372         __pthread_rwlock_unlock aliases.
11373         * pthreadP.h: Add prototypes for new aliases.
11375         * pthreadP.h (struct pthead_functions): Moved to...
11376         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
11377         * init.c (pthread_functions): Add initializers for new elements.
11379         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
11380         __pthread_cleanup_pop_restore aliases.
11381         * pthreadP.h: Add prototypes.
11383         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
11384         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
11385         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
11386         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
11387         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
11388         * pthreadP.h: Adjust prototypes and callers.
11390 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
11392         * Makefile (tests): Add tst-cancel7.
11393         (tst-cancel7-ARGS): New variable.
11394         * tst-cancel7.c: New file.
11396         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
11397         around gcc defficiencies.
11398         * old_pthread_cond_signal.c: Likewise.
11399         * old_pthread_cond_timedwait.c: Likewise.
11400         * old_pthread_cond_wait.c: Likewise.
11402         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
11404 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
11406         * Makefile (tests): Add tst-cond7.
11407         * tst-cond7.c: New file.
11409         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11410         (condvar_cleanup): Get condvar address from the right place.
11412         * atomic.h: Correct definitions of atomic_full_barrier,
11413         atomic_read_barrier, atomic_write_barrier.
11415         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
11416         race-free.
11417         * old_pthread_cond_signal.c: Likewise.
11418         * old_pthread_cond_timedwait.c: Likewise.
11419         * old_pthread_cond_wait.c: Likewise.
11421 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
11423         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
11425 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
11427         * pthreadP.h (pthread_cond_2_0_t): New type.
11428         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
11429         Use new type for the 2.0 condvar function prototypes.
11430         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
11431         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
11432         parameter.
11433         * old_pthread_cond_destroy.c: Likewise.
11434         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
11435         * old_pthread_cond_signal.c: Likewise.
11436         * old_pthread_cond_timedwait.c: Likewise.
11437         * old_pthread_cond_wait.c: Likewise.
11439         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11440         (__pthread_cond_wait): Don't save cancellation mode and seq value
11441         in same location.
11443         * herrno.c (__h_errno_location): Don't define as weak.
11445 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
11447         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
11448         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
11449         and pthread_cond_wait.
11450         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
11451         Renamed to...
11452         (__pthread_cond_broadcast_2_0): ... this.
11453         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
11454         Renamed to...
11455         (__pthread_cond_destroy_2_0): ... this.
11456         * old_pthread_cond_init.c (__old_pthread_cond_init):
11457         Renamed to...
11458         (__pthread_cond_init_2_0): ... this.
11459         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
11460         Renamed to...
11461         (__pthread_cond_signal_2_0): ... this.
11462         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
11463         Renamed to...
11464         (__pthread_cond_wait_2_0): ... this.
11465         * pthread_cond_destroy.c: Include shlib-compat.h.
11466         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
11467         * pthread_cond_init.c: Include shlib-compat.h.
11468         (pthread_cond_init): Change strong_alias into versioned_symbol.
11469         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
11470         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
11471         fields.
11472         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
11473         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
11474         __pthread_cond_wait_2_0): New prototypes.
11475         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
11476         __old_pthread_cond_init, __old_pthread_cond_signal,
11477         __old_pthread_cond_wait): Removed.
11478         * init.c: Include shlib-compat.h.
11479         (pthread_functions): Guard ptr___pthread_attr_init_2_0
11480         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
11481         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
11482         ptr___pthread_cond_*_2_0 fields.
11483         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
11484         pthread_cond_*@GLIBC_2.0 compatibility symbols.
11486         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
11487         LIBC_SIGACTION was not yet defined.
11488         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
11489         [!defined LIBC_SIGACTION] (__sigaction): New function and
11490         libc_hidden_weak.
11491         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
11492         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
11494 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
11496         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
11498 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
11500         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
11501         New, larger type definition.
11502         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
11503         implementation.
11504         * Versions [libpthread]: Add definitions for new pthread_cond_*
11505         interfaces for version GLIBC_2.3.2.
11506         * pthread_cond_init.c: Update initialization for new type definition.
11507         * Makefile (libpthread-routines): Remove pthread_cond_wait,
11508         pthread_cond_timedwait, pthread_cond_signal, and
11509         pthread_cond_broadcast.  Add old_pthread_cond_init,
11510         old_pthread_cond_destroy, old_pthread_cond_wait,
11511         old_pthread_cond_timedwait, old_pthread_cond_signal, and
11512         old_pthread_cond_broadcast.
11513         * old_pthread_cond_broadcast.c: New file.
11514         * old_pthread_cond_destroy.c: New file.
11515         * old_pthread_cond_init.c: New file.
11516         * old_pthread_cond_signal.c: New file.
11517         * old_pthread_cond_timedwait.c: New file.
11518         * old_pthread_cond_wait.c: New file.
11519         * pthreadP.h: Add prototypes for the compatibility interfaces.
11521         * pthread_cond_destroy.c: Don't include <errno.h>.
11523 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
11525         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
11526         unnecessary zero offset when addressing MUTEX.
11528 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
11530         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
11531         __register_atfork.
11532         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
11533         for __register_atfork.
11535 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
11537         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
11538         instead of ASSEMBLER test macro.
11540         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
11541         __libc_current_sigrtmax): Add libc_hidden_def.
11543         * sysdeps/pthread/list.h: Remove assert.h include.
11545 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
11547         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
11548         __pthread_initialize_minimal_internal not
11549         __pthread_initialize_minimal.
11551 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
11553         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
11554         __pthread_initialize_minimal as hidden.
11556         * init.c (__pthread_initialize_minimal_internal): Don't mark as
11557         constructor.
11559 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
11561         * Makefile ($(inst_libdir)/libpthread.so): Depend on
11562         $(common-objpfx)format.lds, include that into the output script.
11563         Fix comment.
11564         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
11566 2002-12-28  Andreas Jaeger  <aj@suse.de>
11568         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
11569         nsec resolution changes.
11570         (xstat64_conv): Likewise.
11571         (xstat32_conv): Likewise.
11572         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
11573         struct kernel_stat.
11574         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
11575         structs stat and stat64.
11576         * time/time.h (__timespec_defined): Define for __USE_MISC.
11577         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
11579 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
11581         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
11582         argument.
11583         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
11584         (pthread_exit): Use strong_alias to avoid warnings.
11585         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
11586         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
11587         ptr___pthread_attr_init_2_*.
11588         * init.c (pthread_functions): Adjust.
11590 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
11592         * forward.c: Make all functions available by default again.  It
11593         caused too much trouble.
11595         * pt-siglongjmp.c: Removed.
11597 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
11599         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
11600         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
11601         * sysdeps/i386/Makefile: New file.
11602         * sysdeps/i386/tcb-offsets.sym: New file.
11603         * sysdeps/pthread/tcb-offsets.h: New file.
11604         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11605         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
11607         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
11608         __register_atfork...
11609         (GLIBC_2.3.2): ...here.
11611 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
11613         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
11614         pthread_attr_setstackaddr with __attribute_deprecated__.
11616 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
11618         * pt-system.c (system): Remove cancellation handling.
11619         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
11620         cancellation routines.
11622 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
11624         * descr.h: Include <dl-sysdep.h>.
11625         (struct pthread): Move header.data.list to the back of the struct.
11626         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
11627         (MULTIPLE_THREADS_OFFSET): Adjust offset.
11628         (SYSINFO_OFFSEET): Likewise.
11630 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
11632         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
11633         Define.
11634         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
11635         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
11636         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
11637         (USE_DL_SYSINFO): Undef.
11639 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
11641         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
11642         $(common-objpfx)libc.so.
11643         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
11644         it is bigger than pipe buffer size even on arches with bigger
11645         page size.
11646         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
11648 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
11650         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
11651         correct errno access for case that USE___THREAD is not defined.
11653 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
11655         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
11656         Patch by Marijn Ros <marijn@mad.scientist.com>.
11658 2002-12-22  Roland McGrath  <roland@redhat.com>
11660         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
11662 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
11664         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
11666 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
11668         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
11669         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
11670         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
11672         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
11673         of int $0x80.
11674         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11675         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
11676         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
11677         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
11678         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
11679         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
11680         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
11681         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
11683         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
11684         sysenter.
11685         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
11687         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
11689         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
11690         in new TCB.
11691         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
11692         that sysinfo is properly initialized.
11693         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
11694         to 1 only for ld.so.
11696         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
11697         RTLD_CORRECT_DYNAMIC_WEAK.
11699 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
11701         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
11702         Use return 0 as 6th argument to FORWARD4.
11703         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
11705 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
11707         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
11708         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
11709         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
11710         (INIT_SYSINFO): New #define.
11711         (TLS_TP_INIT): Use INIT_SYSINFO.
11712         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11713         At test to make sure SYSINFO_OFFSET value is correct.
11714         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
11716 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
11718         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
11719         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
11720         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
11721         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
11722         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
11723         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
11724         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
11726 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
11728         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
11729         macro instead of using int $0x80 directly.
11731         * sysdeps/pthread/bits/stdio-lock.h: New file.
11732         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
11733         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
11734         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
11735         * Makefile (routines): Add libc-lowlevelmutex.
11737         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
11738         __i686.get_pc_thunk.dx.
11740 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
11742         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
11743         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
11744         ($(objpfx)tst-cancel-wrappers.out): New rule.
11745         * tst-cancel-wrappers.sh: New test.
11746         * tst-locale1.c: Include signal.h.
11747         (uselocale): Test static linking of __libc_current_sigrt*.
11749 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
11751         * Makefile (tests): Add tst-cancel6.
11752         * tst-cancel6.c: New file
11754 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
11756         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
11757         Define meaningfully for assembler as well.
11758         * pthreadP.h (struct pthread_functions): Remove
11759         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
11760         and ptr_pthread_attr_init_2_1 fields.
11761         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
11762         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
11763         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
11764         (FORWARD3): Define using FORWARD4.
11765         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
11766         versions.
11767         * pt-system.c: Remove duplicate stdlib.h include.
11769 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
11771         * sem_init.c: Define sem_init@GLIBC_2.0.
11772         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
11773         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
11775         * flockfile.c: Moved to...
11776         * sysdeps/pthread/flockfile.c: ...here.  New file.
11777         * funlockfile.c: Moved to...
11778         * sysdeps/pthread/funlockfile.c: ...here.  New file.
11779         * ftrylockfile.c: Moved to...
11780         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
11782 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
11784         * libc-cancellation.c: Guard both function with
11785         #if !defined NOT_IN_libc.
11786         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
11787         automatically provided pthread wrappers.
11788         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
11789         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
11790         nor in libpthread.
11791         * pt-open.c: Removed.
11792         * pt-fcntl.c: Removed.
11793         * pt-fsync.c: Removed.
11794         * pt-lseek.c: Removed.
11795         * pt-msgrcv.c: Removed.
11796         * pt-msgsnd.c: Removed.
11797         * pt-msync.c: Removed.
11798         * pt-nanosleep.c: Removed.
11799         * pt-open64.c: Removed.
11800         * pt-pause.c: Removed.
11801         * pt-pread.c: Removed.
11802         * pt-pread64.c: Removed.
11803         * pt-pwrite.c: Removed.
11804         * pt-pwrite64.c: Removed.
11805         * pt-read.c: Removed.
11806         * pt-recv.c: Removed.
11807         * pt-recvfrom.c: Removed.
11808         * pt-recvmsg.c: Removed.
11809         * pt-send.c: Removed.
11810         * pt-sendto.c: Removed.
11811         * pt-sigtimedwait.c: Removed.
11812         * pt-sigwait.c: Removed.
11813         * pt-wait.c: Removed.
11814         * pt-waitpid.c: Removed.
11815         * pt-write.c: Removed.
11816         * pt-accept.c: Removed.
11817         * pt-close.c: Removed.
11818         * pt-connect.c: Removed.
11819         * pt-lseek64.c: Removed.
11820         * pt-sendmsg.c: Removed.
11821         * pt-tcdrain.c: Removed.
11823 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
11825         * init.c (__pthread_initialize_minimal_internal): Renamed from
11826         __pthread_initialize_minimal.  Make old name an alias.  This
11827         converts a normal relocation into a relative relocation.
11829         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
11831         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
11832         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
11833         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
11834         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
11835         pt-sigwaitinfo, pt-waitid, and pt-writev.
11836         * pt-creat.c: Removed.
11837         * pt-poll.c: Removed.
11838         * pt-pselect.c: Removed.
11839         * pt-readv.c: Removed.
11840         * pt-select.c: Removed.
11841         * pt-sigpause.c: Removed.
11842         * pt-sigsuspend.c: Removed.
11843         * pt-sigwaitinfo.c: Removed.
11844         * pt-waitid.c: Removed.
11845         * pt-writev.c: Removed.
11847         * init.c (pthread_functions): New variable.
11848         (__pthread_initialize_minimal): Pass pointer to pthread_functions
11849         (or NULL) to __libc_pthread_init.
11850         * forward.c: Rewrite to use __libc:pthread_functions array to get
11851         function addresses.
11852         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
11853         prototype.
11854         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11855         Take new parameter.  Copy content of variable pointed to by it
11856         to __libc_pthread_init.
11858         * pthreadP.h (struct pthread_functions): New type.
11859         (__libc_pthread_init): Declare.
11861         * pthread_attr_destroy.c: Add namespace protected alias.
11862         * pthread_attr_getdetachstate.c: Likewise.
11863         * pthread_attr_getinheritsched.c: Likewise.
11864         * pthread_attr_getschedparam.c: Likewise.
11865         * pthread_attr_getschedpolicy.c: Likewise.
11866         * pthread_attr_getscope.c: Likewise.
11867         * pthread_attr_setdetachstate.c: Likewise.
11868         * pthread_attr_setinheritsched.c: Likewise.
11869         * pthread_attr_setschedparam.c: Likewise.
11870         * pthread_attr_setschedpolicy.c: Likewise.
11871         * pthread_attr_setscope.c: Likewise.
11872         * pthread_cond_broadcast.c: Likewise.
11873         * pthread_cond_destroy.c: Likewise.
11874         * pthread_cond_init.c: Likewise.
11875         * pthread_cond_signal.c: Likewise.
11876         * pthread_cond_wait.c: Likewise.
11877         * pthread_condattr_destroy.c: Likewise.
11878         * pthread_condattr_init.c: Likewise.
11879         * pthread_equal.c: Likewise.
11880         * pthread_exit.c: Likewise.
11881         * pthread_getschedparam.c: Likewise.
11882         * pthread_self.c: Likewise.
11883         * pthread_setcancelstate.c: Likewise.
11884         * pthread_setschedparam.c: Likewise.
11885         * pthread_mutex_destroy.c: Likewise.
11886         * pthread_mutex_init.c: Likewise.
11887         * pthreadP.h: Add prototypes for the aliases.
11889         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
11890         multiple_threads member in correct TCB to 1.
11892         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
11893         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
11894         member of thread decriptor, otherwise return unconditionally 1.
11896 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
11898         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
11899         regular Linux version.  Remove file.
11900         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
11901         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
11902         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
11903         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
11904         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
11905         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
11906         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
11907         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
11908         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
11909         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
11910         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
11911         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
11912         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
11913         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
11914         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
11915         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
11916         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
11917         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
11918         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
11919         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
11920         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
11921         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
11922         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
11923         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
11924         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
11925         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
11926         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
11927         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
11928         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
11929         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
11931 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
11933         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
11934         * sysdeps/unix/sysv/linux/open.c: Removed.
11935         * sysdeps/unix/sysv/linux/fsync.c: Removed.
11936         * sysdeps/unix/sysv/linux/lseek.c: Removed.
11937         * sysdeps/unix/sysv/linux/msync.c: Removed.
11938         * sysdeps/unix/sysv/linux/read.c: Removed.
11939         * sysdeps/unix/sysv/linux/close.c: Removed.
11940         * sysdeps/unix/sysv/linux/creat.c: Removed.
11941         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
11942         * sysdeps/unix/sysv/linux/pause.c: Removed.
11943         * sysdeps/unix/sysv/linux/select.c: Removed.
11944         * sysdeps/unix/sysv/linux/write.c: Removed.
11946 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
11948         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
11949         element in TCB to see whether locking is needed.
11951         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
11952         MULTIPLE_THREADS_OFFSET value is correct.
11954         * sysdeps/unix/sysv/linux/close.c: New file.
11955         * sysdeps/unix/sysv/linux/connect.S: New file.
11956         * sysdeps/unix/sysv/linux/creat.c: New file.
11957         * sysdeps/unix/sysv/linux/fsync.c: New file.
11958         * sysdeps/unix/sysv/linux/llseek.c: New file.
11959         * sysdeps/unix/sysv/linux/lseek.c: New file.
11960         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
11961         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
11962         * sysdeps/unix/sysv/linux/msync.c: New file.
11963         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
11964         * sysdeps/unix/sysv/linux/open.c: New file.
11965         * sysdeps/unix/sysv/linux/open64.c: New file.
11966         * sysdeps/unix/sysv/linux/pause.c: New file.
11967         * sysdeps/unix/sysv/linux/poll.c: New file.
11968         * sysdeps/unix/sysv/linux/pread.c: New file.
11969         * sysdeps/unix/sysv/linux/pread64.c: New file.
11970         * sysdeps/unix/sysv/linux/pselect.c: New file.
11971         * sysdeps/unix/sysv/linux/pwrite.c: New file.
11972         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
11973         * sysdeps/unix/sysv/linux/readv.c: New file.
11974         * sysdeps/unix/sysv/linux/recv.S: New file.
11975         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
11976         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
11977         * sysdeps/unix/sysv/linux/select.c: New file.
11978         * sysdeps/unix/sysv/linux/send.S: New file.
11979         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
11980         * sysdeps/unix/sysv/linux/sendto.S: New file.
11981         * sysdeps/unix/sysv/linux/sigpause.c: New file.
11982         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
11983         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
11984         * sysdeps/unix/sysv/linux/sigwait.c: New file.
11985         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
11986         * sysdeps/unix/sysv/linux/system.c: New file.
11987         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
11988         * sysdeps/unix/sysv/linux/wait.c: New file.
11989         * sysdeps/unix/sysv/linux/waitid.c: New file.
11990         * sysdeps/unix/sysv/linux/waitpid.c: New file.
11991         * sysdeps/unix/sysv/linux/writev.c: New file.
11992         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
11994         * pt-readv.c: Fix comment.
11996 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
11998         * tst-cleanup1.c: Include stdlib.h.
12000         * tst-cancel5.c: New test.
12001         * Makefile (tests): Add tst-cancel5.
12002         (tst-cancel5): Link against libc.so libpthread.so in that order.
12004 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
12006         * forward.c (test_loaded): Prevent recursive calls.
12008         * Makefile (routines): Add libc-cancellation.
12009         * libc-cancellation.c: New file.
12010         * descr.h (struct pthread): Add multiple_threads field.
12011         * allocatestack.c (allocate_stack): Initialize multiple_header field of
12012         new thread descriptor to 1.
12013         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
12014         Initialize multiple_thread field after successful thread creation.
12015         * cancellation.c (__do_cancel): Move to pthreadP.h.
12016         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
12017         (__pthread_disable_asynccancel): Add internal_function attribute.
12018         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
12019         * pthread_setcancelstate.c: Likewise.
12020         * pthread_setcanceltype.c: Likewise.
12021         * pthread_exit.c: Likewise.
12022         * pthreadP.h (CANCELLATION_P): Likewise.
12023         (__do_cancel): Define as static inline.
12024         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
12025         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
12026         declarations.
12027         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
12028         fields.  Define MULTIPLE_THREADS_OFFSET.
12029         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
12030         declaration.
12031         * sysdeps/unix/sysv/linux/accept.S: New file.
12032         * sysdeps/unix/sysv/linux/read.c: New file.
12033         * sysdeps/unix/sysv/linux/write.c: New file.
12034         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
12035         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
12036         initialization of __libc_locking_needed.
12037         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
12038         __libc_locking_needed, use multiple_threads field in TCB.
12039         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
12041 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
12043         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
12044         version.
12045         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
12047         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
12048         access to __libc_locking_needed for PIC.
12050 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
12052         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
12053         declare for libc.so.
12054         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
12055         expression.
12056         (__libc_lock_lock): Put into statement expression.
12057         (__libc_lock_unlock): Remove trailing semicolon.
12058         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
12060 2002-12-12  Roland McGrath  <roland@redhat.com>
12062         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
12063         "m" constraint to refer to __libc_locking_needed.  Declare it here.
12065 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
12067         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
12068         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
12069         Initialize __libc_locking_needed.
12070         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
12071         instead of __register_pthread_fork_handler.
12072         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
12073         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
12074         fork-gen with libc_pthread_init.
12075         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
12076         of __register_pthread_fork_handler.
12077         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
12078         of __register_pthread_fork_handler.
12079         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
12080         __libc_locking_needed to determine whether lock prefix can be avoided.
12081         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
12083 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
12085         * Makefile (tests): Add tst-cleanup1.
12086         * tst-cleanup1.c: New file.
12087         * cancellation.c (__cleanup_thread): Removed.
12088         (__do_cancel): Remove call to __cleanup_thread.
12089         * pthreadP.h: Remove __cleanup_thread prorotype.
12091         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
12092         Remember function and argument even if cancellation handler
12093         function is not available.
12094         (__libc_cleanup_region_end): Execute registered function directly if
12095         pthread functions are not available.
12096         (__libc_cleanup_end): Likewise.
12098         * init.c (__pthread_initialize_minimal): Fix initialization in
12099         static lib by preventing gcc from being too clever.
12101 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
12103         * init.c (__pthread_initialize_minimal): Remove unneccesary
12104         sigaddset call.
12106         * Makefile (tests): We can run tst-locale2 now.
12108 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
12110         * Versions: Remove duplicated sigwait entry.
12112 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
12114         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
12115         inside libpthread.
12117         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
12119         * pthreadP.h: Declare __pthread_enable_asynccancel and
12120         __pthread_disable_asynccancel.
12121         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
12122         (CANCEL_RESET): Use __pthread_disable_asynccancel.
12123         * cancellation.c (__pthread_enable_asynccancel): New function.
12124         (__pthread_disable_asynccancel): New function.
12125         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
12126         * pt-close.c: Likewise.
12127         * pt-connect.c: Likewise.
12128         * pt-creat.c: Likewise.
12129         * pt-fcntl.c: Likewise.
12130         * pt-fsync.c: Likewise.
12131         * pt-lseek.c: Likewise.
12132         * pt-lseek64.c: Likewise.
12133         * pt-msgrcv.c: Likewise.
12134         * pt-msgsnd.c: Likewise.
12135         * pt-msync.c: Likewise.
12136         * pt-nanosleep.c: Likewise.
12137         * pt-open.c: Likewise.
12138         * pt-open64.c: Likewise.
12139         * pt-pause.c: Likewise.
12140         * pt-poll.c: Likewise.
12141         * pt-pread.c: Likewise.
12142         * pt-pread64.c: Likewise.
12143         * pt-pselect.c: Likewise.
12144         * pt-pwrite.c: Likewise.
12145         * pt-pwrite64.c: Likewise.
12146         * pt-read.c: Likewise.
12147         * pt-readv.c: Likewise.
12148         * pt-recv.c: Likewise.
12149         * pt-recvfrom.c: Likewise.
12150         * pt-recvmsg.c: Likewise.
12151         * pt-select.c: Likewise.
12152         * pt-send.c: Likewise.
12153         * pt-sendmsg.c: Likewise.
12154         * pt-sendto.c: Likewise.
12155         * pt-sigpause.c: Likewise.
12156         * pt-sigsuspend.c: Likewise.
12157         * pt-sigtimedwait.c: Likewise.
12158         * pt-sigwait.c: Likewise.
12159         * pt-sigwaitinfo.c: Likewise.
12160         * pt-system.c: Likewise.
12161         * pt-tcdrain.c: Likewise.
12162         * pt-wait.c: Likewise.
12163         * pt-waitid.c: Likewise.
12164         * pt-waitpid.c: Likewise.
12165         * pt-write.c: Likewise.
12166         * pt-writev.c: Likewise.
12167         * pthread_join.c: Likewise.
12168         * pthread_timedjoin.c: Likewise.
12170         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
12171         (__xpg_sigpause): New function.
12172         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
12174 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
12176         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
12178         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
12179         _GI_pthread_cleanup_pop to pthreadP.h.
12181         * ftrylockfile.c: Use _IO_lock_trylock instead of
12182         pthread_mutex_trylock.
12184         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
12185         (CANCEL_RESET): Likewise.
12186         (__pthread_setcanceltype_): Declare.
12187         (__pthread_mutex_lock_internal): Declare.
12188         (__pthread_mutex_unlock_internal): Declare.
12189         (__pthread_once_internal): Declare.
12190         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
12191         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
12193         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
12194         and pthread_mutex_unlock.
12195         * pthread_cond_wait.c: Likewise.
12196         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
12197         * pthread_mutex_unlock.c: Likewise.
12199         * pthread_setcanceltype.c: Add additional alias
12200         __pthread_setcanceltype.
12202         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
12203         * sem_open.c (sem_open): Likewise.
12204         Use __libc_open, __libc_write, and __libc_close instead of
12205         open, write, and close respectively.
12207         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
12208         Rewrite as statement expression since it must return a value.
12210         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
12211         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
12212         __pthread_kill.
12214         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
12215         alias __pthread_once_internal.
12217         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
12219 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
12221         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
12222         * tst-stdio1.c: New file.
12223         * tst-stdio2.c: New file.
12225         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
12227         * Makefile (tests): Comment out tst-locale2 for now.
12228         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
12230         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
12231         -D_IO_MTSAFE_IO.
12232         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
12233         Use _IO_lock_init instead of explicit assignment.
12235         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
12236         Define __libc_lock_* and __libc_lock_recursive macros with
12237         lowlevellock macros, not pthread mutexes.
12239         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
12240         of pthread_mutex_lock.
12241         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
12242         instead of pthread_mutex_unlock.
12244 2002-12-06  Roland McGrath  <roland@redhat.com>
12246         * allocatestack.c (__stack_user): Use uninitialized defn.
12247         * init.c (__pthread_initialize_minimal): Initialize it here.
12249 2002-12-05  Roland McGrath  <roland@redhat.com>
12251         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
12252         string.
12253         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
12255         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
12256         missing & here too.
12258 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
12260         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12261         lowlevellock.
12262         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
12263         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
12264         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
12265         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
12266         for __libc_lock_* macros.
12267         * Makefile (routines): Add libc-lowlevellock.
12269 2002-10-09  Roland McGrath  <roland@redhat.com>
12271         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
12272         Under [__PIC__], call the function via the pointer fetched for
12273         comparison rather than a call by name that uses the PLT.
12274         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
12275         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
12276         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
12277         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
12278         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
12280 2002-12-04  Roland McGrath  <roland@redhat.com>
12282         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
12284         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
12285         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
12287         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
12289 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
12291         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
12292         a completely opaque, non-integer type.
12293         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
12295 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
12297         * sysdeps/i386/tls.h: Include stdlib.h.
12298         * sysdeps/x86_64/tls.h: Likewise.
12300 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
12302         * Makefile (tests): Add tst-locale2.
12303         (tests-static): Likewise.
12304         * tst-locale2.c: New file.
12306         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
12307         volatile and add memory clobbers to lock operations.
12309 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
12311         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
12312         * sysdeps/i386/i486/bits/atomic.h: New file.
12313         * sysdeps/i386/i586/bits/atomic.h: New file.
12314         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
12315         include i486 version.
12316         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
12317         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
12318         Patch by Marijn Ros <marijn@mad.scientist.com>.
12320         * allocatestack.c (get_cached_stack): Don't crash if we first
12321         found a stack with a larger size then needed.
12322         Reported by Hui Huang <hui.huang@sun.com>.
12324         * Makefile (tests): Add tst-sysconf.
12325         * tst-sysconf.c: New file.
12327         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
12328         PTHREAD_THREADS_MAX.
12330 2002-12-02  Roland McGrath  <roland@redhat.com>
12332         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
12333         Declare using hidden_proto instead of attribute_hidden, so there are
12334         non-.hidden static symbols for gdb to find.
12335         (__pthread_keys): Likewise.
12336         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
12337         * allocatestack.c (__stack_user): Likewise.
12338         * pthread_create.c (__pthread_keys): Likewise.
12339         (__nptl_threads_events, __nptl_last_event): Make these static instead
12340         of hidden.
12341         * pthread_key_create.c (__pthread_pthread_keys_max,
12342         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
12344 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
12346         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
12347         statically.
12348         * tst-locale1.c: New file.
12350         * pthread_cond_timedwait.c: Include <stdlib.h>.
12352         * Makefile (tests): Add tst-fork2 and tst-fork3.
12353         * tst-fork2.c: New file.
12354         * tst-fork3.c: New file.
12356 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
12358         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
12360         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
12361         require it to 200112L.
12363         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
12364         instruction only if HAVE_CMOV is defined.
12365         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
12367         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
12369         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
12371         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
12373         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
12375 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
12377         * sysdeps/x86_64/bits/atomic.h: New file.
12379         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
12380         16-bit operations.
12382         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
12383         possible since gettid cannot fail.
12385         * sysdeps/x86_64/pthreaddef.h: New file.
12387         * sysdeps/i386/pthreaddef.h (gettid): Removed.
12389         * sysdeps/x86_64/pthread_spin_init.c: New file.
12390         * sysdeps/x86_64/pthread_spin_lock.c: New file.
12391         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
12392         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
12394         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
12395         Add missing lock prefix.  Minute optimization.
12397         * tst-spin2.c (main): Also check successful trylock call.
12399         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
12400         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
12402         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
12403         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
12405         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
12406         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
12407         value in case of an error.  Add support for INTERNAL_SYSCALL.
12409         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
12410         value in case of an error.
12412         * sysdeps/x86_64/tls.h: New file.
12414 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
12416         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
12417         takes the array member name and the index as parameters.
12418         (THREAD_SETMEM_NC): Likewise.
12419         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
12420         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
12421         interfaces.
12423         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
12424         to decide which code to use.
12425         (THREAD_SETMEM_NC): Likewise.
12427         * allocatestack.c (queue_stack): Don't remove stack from list here.
12428         Do it in the caller.  Correct condition to prematurely terminate
12429         loop to free stacks.
12430         (__deallocate_stack): Remove stack from list here.
12432 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
12434         * Makefile (tests): Add tst-stack1.
12435         * tst-stack1.c: New file.
12437         * allocatestack.c (allocate_stack): Initialize the TCB on a user
12438         provided stack.
12440         * pthread_attr_getstack.c: Return bottom of the thread area.
12442 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
12444         * Makefile (libpthread-routines): Add pt-allocrtsig and
12445         pthread_kill_other_threads.
12446         * pt-allocrtsig.c: New file.
12447         * pthread_kill_other_threads.c: New file.
12448         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
12449         all three functions.
12450         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12451         allocrtsig.
12452         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
12453         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
12454         and __libc_allocate_rtsig_private.
12455         * Versions (libpthread): Export pthread_kill_other_threads_np,
12456         __libc_current_sigrtmin, and __libc_current_sigrtmax.
12458 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
12460         * allocatestack.c (allocate_stack): stackaddr in attribute points to
12461         the end of the stack.  Adjust computations.
12462         When mprotect call fails dequeue stack and free it.
12463         * pthread_attr_setstack.c: Store top of the stack in stackaddr
12464         attribute.
12465         * pthread_getattr_np.c: Likewise.
12467         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
12468         surprises.
12470 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
12472         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
12473         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
12475 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
12477         * pthread_getspecific.c: Optimize access to first 2nd-level array.
12478         * pthread_setspecific.c: Likewise.
12480 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
12482         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
12483         definitions.  Get them from the official place.
12484         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
12486         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
12487         Use new CLONE_ flags in clone() calls.
12489         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
12490         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
12492         * Versions: Add pthread_* functions for libc.
12493         * forward.c: New file.
12495         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
12496         errno-loc.
12497         * herrno.c: New file.
12498         * res.c: New file.
12500         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
12501         sem_trywait, and sem_timedwait.  Add herrno and res.
12502         * sem_init.c: Don't initialize lock and waiters members.
12503         * sem_open.c: Likewise.
12504         * sem_post.c: Removed.
12505         * sem_wait.c: Removed.
12506         * sem_trywait.c: Removed.
12507         * sem_timedwait.c: Removed.
12508         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
12509         Includes full implementations of sem_post, sem_wait, sem_trywait,
12510         and sem_timedwait.
12511         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
12512         for new implementation.
12513         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
12514         and waiters fields.
12516         * tst-sem3.c: Improve error message.
12517         * tst-signal3.c: Likewise.
12519         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
12520         to tell the kernel about the termination futex and to initialize tid
12521         member.  Don't initialize main_thread.
12522         * descr.h (struct pthread): Remove main_thread member.
12523         * cancelllation.c (__do_cancel): Remove code handling main thread.
12524         The main thread is not special anymore.
12526         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
12527         size of the stacks to stack_cache_actsize.
12529         * pt-readv.c: Add missing "defined".
12530         * pt-sigwait.c: Likewise.
12531         * pt-writev.c: Likewise.
12533 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
12535         * Versions: Export __connect from libpthread.
12536         Patch by Luca Barbieri <ldb@ldb.ods.org>.
12538         * Makefile (libpthread-routines): Add pt-raise.
12539         * sysdeps/unix/sysv/linux/raise.c: New file.
12540         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
12541         * sysdeps/generic/pt-raise.c: New file.
12543         * pthread_cond_init.c: Initialize all data elements of the condvar
12544         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
12546         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
12547         * pthread_create.c: Likewise.
12549         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
12550         * tst-key1.c: New file.
12551         * tst-key2.c: New file.
12552         * tst-key3.c: New file.
12554         * Versions: Export pthread_detach for version GLIBC_2.0.
12555         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
12557 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
12559         * pthread_key_create.c: Terminate search after an unused key was found.
12560         Patch by Luca Barbieri <ldb@ldb.ods.org>.
12562         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
12563         Patch by Luca Barbieri <ldb@ldb.ods.org>.
12565 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
12567         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
12568         dynamic lookup for errno in PIC.
12570         * allocatestack.c (get_cached_stack): Rearrange code slightly to
12571         release the stack lock as soon as possible.
12572         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
12573         the static TLS block.
12574         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
12576         * cancellation.c: Renamed from cancelation.c.
12577         * Makefile: Adjust accordingly.
12578         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
12579         * cleanup_defer.c: Use CANCELLATION_P.
12580         * pthread_testcancel.c: Likewise.
12581         * descr.h: Fix spelling in comments.
12582         * init.c: Likewise.
12583         * pthread_getattr_np.c: Likewise.
12584         * pthread_getschedparam.c: Likewise.
12585         * pthread_setschedparam.c: Likewise.
12586         * Versions: Likewise.
12588         * pt-pselect.c: New file.
12589         * Makefile (libpthread-routines): Add pt-pselect.
12590         * Versions: Add pselect.
12592         * tst-cancel4.c: New file.
12593         * Makefile (tests): Add tst-cancel4.
12595 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
12597         * pthread_mutex_lock.c: Always record lock ownership.
12598         * pthread_mutex_timedlock.c: Likewise.
12599         * pthread_mutex_trylock.c: Likewise.
12601         * pt-readv.c: New file.
12602         * pt-writev.c: New file.
12603         * pt-creat.c: New file.
12604         * pt-msgrcv.c: New file.
12605         * pt-msgsnd.c: New file.
12606         * pt-poll.c: New file.
12607         * pt-select.c: New file.
12608         * pt-sigpause.c: New file.
12609         * pt-sigsuspend.c: New file.
12610         * pt-sigwait.c: New file.
12611         * pt-sigwaitinfo.c: New file.
12612         * pt-waitid.c: New file.
12613         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
12614         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
12615         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
12616         * Versions: Add all the new functions.
12618         * tst-exit1.c: New file.
12619         * Makefile (tests): Add tst-exit1.
12621         * sem_timedwait.c: Minor optimization for more optimal fastpath.
12623 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
12625         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
12627         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
12628         call.  pthread_join is an official cancellation point.
12629         * pthread_timedjoin.c: Likewise.
12631         * pthread_cond_wait.c: Revert order in which internal lock are dropped
12632         and the condvar's mutex are retrieved.
12633         * pthread_cond_timedwait.c: Likewise.
12634         Reported by dice@saros.East.Sun.COM.
12636 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
12638         * pthreadP.h: Cut out all type definitions and move them...
12639         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
12640         * pthreadP.h: Include <internaltypes.h>.
12642         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
12643         performance tweaks.
12645         * sem_trywait.c: Shuffle #includes around to get right order.
12646         * sem_timedwait.c: Likewise.
12647         * sem_post.c: Likewise.
12648         * sem_wait.c: Likewise.
12650         * nptl 0.3 released.
12652         * Makefile (tests): Add tst-signal3.
12653         * tst-signal3.c: New file.
12655 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
12657         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
12658         the asms modify the sem object.
12659         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
12661         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
12662         the actual members.
12663         * pthreadP.h (struct sem): New type.  Actual semaphore type.
12664         * semaphoreP.h: Include pthreadP.h.
12665         * sem_getvalue.c: Adjust to sem_t change.
12666         * sem_init.c: Likewise.
12667         * sem_open.c: Likewise.
12668         * sem_post.c: Likewise.
12669         * sem_timedwait.c: Likewise.
12670         * sem_trywait.c: Likewise.
12671         * sem_wait.c: Likewise.
12673 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
12675         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
12676         * tst-basic2.c: New file.
12677         * tst-exec1.c: New file.
12678         * tst-exec2.c: New file.
12679         * tst-exec3.c: New file.
12681         * tst-fork1.c: Remove extra */.
12683         * nptl 0.2 released.  The API for IA-32 is complete.