PowerPC: unify math_ldbl.h implementations
[glibc.git] / nptl / ChangeLog
blobb95068716e4f2b86aaf55f75102e1580f7358341
1 2012-12-08  Siddhesh Poyarekar  <siddhesh@redhat.com>
3         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind):
4         Declare LOCAL_VAR as char.
6 2012-12-04  Joseph Myers  <joseph@codesourcery.com>
8         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__old_sem_post):
9         Cast result of atomic_increment_val to (void) instead of storing
10         in otherwise-unused variable.
12 2012-12-03  Allan McRae  <allan@archlinux.org>
14         * Makefile (LDFLAGS-tst-cond24, LDFLAGS-tst-cond25): Remove.
16 2012-11-26  H.J. Lu  <hongjiu.lu@intel.com>
18         * unwind.c (__pthread_unwind): Pass address of unwind_cleanup
19         to THREAD_SETMEM.
20         * sysdeps/i386/tls.h: Include <libc-internal.h>.
21         (THREAD_SETMEM): Use cast_to_integer before casting to uint64_t.
22         (THREAD_SETMEM_NC): Likewise.
23         * sysdeps/x86_64/tls.h: Include <libc-internal.h>.
24         (THREAD_SETMEM): Use cast_to_integer before casting to uint64_t.
25         (THREAD_SETMEM_NC): Likewise.
27 2012-11-21  Joseph Myers  <joseph@codesourcery.com>
29         * sysdeps/unix/sysv/linux/sem_post.c (__old_sem_post): Cast result
30         of atomic_increment_val to (void) instead of storing in
31         otherwise-unused variable.
33         * pthread_cond_timedwait.c (__pthread_cond_timedwait)
34         [__NR_clock_gettime]: Cast result of INTERNAL_VSYSCALL to void
35         instead of storing in otherwise-unused variable.
37 2012-11-14  Marcus Shawcroft  <marcus.shawcroft@linaro.org>
39         * Makefile (CFLAGS-open.c, CFLAGS-open64.c, CFLAGS-pause.c)
40           (CFLAGS-recv.c, CFLAGS-send.c): Define.
42 2012-11-06  Chris Metcalf  <cmetcalf@tilera.com>
44         * tst-sem14.c (TIMEOUT): Set timeout to 10 seconds.
45         * tst-cond24.c (TIMEOUT): Increase from 10 to 20 seconds.
47 2012-11-05  Siddhesh Poyarekar  <siddhesh@redhat.com>
49         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Time out
50         if absolute timeout is negative.
51         [__ASSUME_FUTEX_CLOCK_REALTIME &&
52         lll_futex_timed_wait_bitset]: Use lll_futex_timed_wait_bitset.
53         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
54         Likewise.
55         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
56         Likewise.
57         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
58         (__lll_robust_timedlock_wait): Likewise.
59         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
60         (lll_futex_timed_wait_bitset): New macro.
61         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
62         (lll_futex_timed_wait_bitset): Likewise.
64 2012-11-03  David S. Miller  <davem@davemloft.net>
66         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (BUSY_WAIT_NOP):
67         Add missing spaces.
68         (__cpu_relax): Likewise.
70 2012-11-02  H.J. Lu  <hongjiu.lu@intel.com>
72         * sysdeps/x86_64/tls.h: Don't include <xmmintrin.h>.
73         (__128bits): New struct typedef.
74         (tcbhead_t): Replace __m128 with __128bits.
76 2012-10-30  Aurelien Jarno  <aurelien@aurel32.net>
77             Joseph Myers  <joseph@codesourcery.com>
79         * Makefile (tst-cancel7-ARGS): Use exec in --command argument.
81 2012-10-28  David S. Miller  <davem@davemloft.net>
83         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (BUSY_WAIT_NOP):
84         Define when we have v9 instructions available.
85         * sysdeps/unix/sysv/linux/sparc/sparc64/cpu_relax.S: New file.
86         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/cpu_relax.S: New
87         file.
88         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/Makefile: New
89         file.
90         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Add cpu_relax
91         to libpthread-routines.
93 2012-10-25  Roland McGrath  <roland@hack.frob.com>
95         * tst-cond-except.c (TEST_FUNCTION): New macro.
97 2012-10-25  Joseph Myers  <joseph@codesourcery.com>
99         * Makefile ($(objpfx)tst-tls6.out): Use $(BASH) not $(SHELL) to
100         run tst-tls6.sh.
101         * tst-tls6.sh: Use /bin/bash not /bin/sh.
103 2012-10-25  Roland McGrath  <roland@hack.frob.com>
105         * tst-basic2.c (do_test): Return RESULT, not always zero.
107         * tst-cond25.c: Include <stdint.h>
108         (waiter): Add casts to uintptr_t between casting integer<->pointer.
109         (timed_waiter): Likewise.
110         (do_test_wait): Likewise.
111         * tst-cond-except.c (thr): Likewise.
112         (do_test): Use prototype definition.
114 2012-10-24  Joseph Myers  <joseph@codesourcery.com>
115             Jim Blandy  <jimb@codesourcery.com>
117         * Makefile ($(objpfx)tst-tls6.out): Pass $(test-wrapper-env) to
118         tst-tls6.sh.
119         * tst-tls6.sh (test_wrapper_env): New variable.  Use it to run
120         programs with LD_PRELOAD set.
122 2012-10-24  Roland McGrath  <roland@hack.frob.com>
124         * Makefile ($(objpfx)tst-cond11, $(objpfx)tst-cond19): Targets removed.
125         ($(objpfx)tst-sem5, $(objpfx)tst-cancel18): Likewise.
126         ((objpfx)tst-cancelx18, $(objpfx)tst-clock2): Likewise.
127         ($(objpfx)tst-rwlock14): Likewise.
129 2012-10-24  Joseph Myers  <joseph@codesourcery.com>
131         * Makefile (tests): Remove tst-oddstacklimit.
132         (test-srcs): New variable.
133         (tst-oddstacklimit-ENV): Remove.
134         [$(run-built-tests) = yes] (tests): Depend on
135         $(objpfx)tst-oddstacklimit.out.
136         [$(run-built-tests) = yes] ($(objpfx)tst-oddstacklimit.out): New
137         target.
138         * tst-oddstacklimit.c: Do not include "tst-basic1.c".  Use
139         setrlimit before executing tst-basic1 test passed to --command.
141 2012-10-23  Joseph Myers  <joseph@codesourcery.com>
143         * Makefile [$(cross-compiling) = no]: Change condition to
144         [$(run-built-tests) = yes].
146 2012-10-23  Jim Blandy  <jimb@codesourcery.com>
147             Joseph Myers  <joseph@codesourcery.com>
149         * Makefile (tst-cancel7-ARGS): Use $(host-built-program-cmd).
150         (tst-exec4-ARGS): Likewise.
151         (tst-stackguard1-ARGS): Likewise.
153 2012-10-21  Jim Blandy  <jimb@codesourcery.com>
154             Joseph Myers  <joseph@codesourcery.com>
156         * Makefile ($(objpfx)tst-cancel-wrappers.out): Pass $(NM) to
157         tst-cancel-wrappers.sh.
158         * tst-cancel-wrappers.sh: Use nm program given as first argument,
159         not hardcoded "nm".
161 2012-10-17  Siddhesh Poyarekar  <siddhesh@redhat.com>
163         * tst-cond25.c (do_test_wait): Don't check for return value from
164         pthread_cancel.
166 2012-10-16  Siddhesh Poyarekar  <siddhesh@redhat.com>
168         [BZ #14652]
169         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
170         (__condvar_tw_cleanup):  Adjust the mutex data structure if it
171         was locked by FUTEX_WAIT_REQUEUE_PI.
172         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait
173         (__condvar_w_cleanup): Likewise.
174         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
175         (__condvar_cleanup2): Likewise.
176         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
177         (__condvar_cleanup1): Likewise.
179 2012-10-10  Carlos O'Donell  <carlos@systemhalted.org>
181         * sysdeps/pthread/pthread.h [!(defined __GNUC__ &&
182         defined __EXCEPTIONS) && defined __USE_GNU]
183         (pthread_cleanup_push_defer_np): Fix formatting.
185 2012-10-10  Siddhesh Poyarekar  <siddhesh@redhat.com>
187         [BZ #14652]
188         * Makefile (tests): New test case tst-cond25.
189         (LDFLAGS-tst-cond25): Link tst-cond25 against librt.
190         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
191         (__condvar_tw_cleanup): Lock mutex only if we don't already
192         own it.
193         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
194         (__condvar_w_cleanup): Likewise.
195         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add TID_MASK.
196         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
197         (__condvar_cleanup2): Lock mutex only if we don't already
198         own it.
199         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
200         (__condvar_cleanup1): Likewise.
201         * tst-cond25.c: New test case.
203 2012-10-09  Roland McGrath  <roland@hack.frob.com>
205         * sysdeps/pthread/configure: Regenerated.
206         * sysdeps/x86_64/configure: Regenerated.
208 2012-10-05  David S. Miller  <davem@davemloft.net>
210         [BZ #14568]
211         * sysdeps/sparc/tls.h (DB_THREAD_SELF_INCLUDE): Delete.
212         (DB_THREAD_SELF): Use constants for the register offsets.  Correct
213         the case of a 64-bit debugger with a 32-bit inferior.
215 2012-10-05  H.J. Lu  <hongjiu.lu@intel.com>
217         [BZ #14557]
218         * Makefile (tests-static): Add tst-cancel24-static,
219         tst-cond8-static tst-mutex8-static, tst-mutexpi8-static,
220         tst-sem11-static and tst-sem12-static.
221         (tests): Likewise.
222         (LDLIBS-tst-cancel24-static): New macro.
223         * tst-cancel24-static.cc: New file.
224         * tst-cond8-static.c: Likewise.
225         * tst-mutex8-static.c: Likewise.
226         * tst-mutexpi8-static.c: Likewise.
227         * tst-sem11-static.c: Likewise.
228         * tst-sem12-static.c: Likewise.
230 2012-10-05  Siddhesh Poyarekar  <siddhesh@redhat.com>
232         [BZ #14417]
233         * Makefile (tests): New test case tst-cond24.
234         (LDFLAGS-tst-cond24): Link tst-cond24 against librt.
235         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
236         (__pthread_cond_timedwait): Unlock mutex before going back to
237         wait in PI case.
238         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
239         (__pthread_cond_wait): Likewise.  Revert handling of EAGAIN
240         return from futex_wait.
241         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
242         (__pthread_cond_timedwait): Unlock mutex before going back to
243         wait in PI case.  Set requeue_pi flag only if wait returned 0.
244         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
245         (__pthread_cond_wait): Likewise.  Revert handling of EAGAIN
246         return from futex_wait.
247         * tst-cond24.c: New test case.
249 2012-10-04  Roland McGrath  <roland@hack.frob.com>
251         * pthread_create.c (start_thread): Use __madvise, not madvise.
253 2012-10-02  H.J. Lu  <hongjiu.lu@intel.com>
255         * sysdeps/i386/tls.h: Update copyright years.
257 2012-10-02  Siddhesh Poyarekar  <siddhesh@redhat.com>
259         * pthread_create.c (start_thread): Fix clone flag name in
260         comment to CLONE_CHILD_CLEARTID.
261         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
262         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
263         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
264         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
265         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
266         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
268 2012-10-01  Siddhesh Poyarekar  <siddhesh@redhat.com>
270         [BZ #14477]
271         * Makefile (tests): Add tst-cond-except.
272         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
273         (__pthread_cond_timedwait): Mark instructions where %ebx is
274         incremented in PI case.
275         (.gcc_except_table): Add entry to jump to __condvar_tw_cleanup2
276         for the marked PI case instructions.
277         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
278         (__pthread_cond_wait): Mark instructions where %ebx is
279         incremented in PI case.
280         (.gcc_except_table): Add entry to jump to __condvar_w_cleanup2
281         for the marked PI case instructions.
282         * tst-cond-except.c: New test case.
284 2012-09-24  Dmitry V. Levin  <ldv@altlinux.org>
286         * tst-tls6.sh: Add "set -e".
287         * Makefile: Do not specify -e option when running testsuite
288         shell scripts.
290         * tst-tls6.sh: Add copyright header.
292 2012-09-24  H.J. Lu  <hongjiu.lu@intel.com>
294         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Add "()" when casting
295         to uint64_t for 64-bit store.
296         (THREAD_SETMEM_NC): Likewise.
298 2012-09-19  H.J. Lu  <hongjiu.lu@intel.com>
300         * sysdeps/i386/tls.h (THREAD_SETMEM): Cast to uint64_t for
301         64-bit store.
302         (THREAD_SETMEM_NC): Likewise.
304 2012-09-14  Jeff Law  <law@redhat.com>
306         [BZ #14583]
307         * sysdeps/pthread/pthread.h: Fix prototype of __sigsetjmp.
309 2012-09-13  H.J. Lu  <hongjiu.lu@intel.com>
311         [BZ #14576]
312         * sysdeps/pthread/bits/libc-lockP.h (__rtld_lock_init_recursive):
313         Removed.
315 2012-09-07  H.J. Lu  <hongjiu.lu@intel.com>
317         * Makefile (LDFLAGS-tst-cancel24): Renamed to ...
318         (LDLIBS-tst-cancel24): This.
320 2012-09-06  H.J. Lu  <hongjiu.lu@intel.com>
322         [BZ #14545]
323         * Makefile (tests-static): Add tst-cancel21-static.
324         (tests): Likewise.
325         * tst-cancel21-static.c: New file.
327 2012-09-01  Joseph Myers  <joseph@codesourcery.com>
329         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
330         [!__ASSUME_POSIX_CPU_TIMERS]: Remove conditional code.
331         [__NR_clock_getres]: Make code unconditional.
332         (pthread_getcpuclockid): Remove code left unreachable by removal
333         of conditionals.
335 2012-08-31  Joseph Myers  <joseph@codesourcery.com>
337         [BZ #14532]
338         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Use
339         atomic_compare_and_exchange_bool_rel.
340         * tst-sem14.c: New file.
341         * Makefile (tests): Add tst-sem14.
343 2012-08-15  Roland McGrath  <roland@hack.frob.com>
345         * Makefile (CFLAGS-flockfile.c): Use $(libio-mtsafe) instead
346         of -D_IO_MTSAFE_IO.
347         (CFLAGS-ftrylockfile.c, CFLAGS-funlockfile.c): Likewise.
348         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-fork.c): Likewise.
350 2012-08-16  Joseph Myers  <joseph@codesourcery.com>
352         * pthread_cond_timedwait.c (__pthread_cond_timedwait)
353         [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
354         * pthread_condattr_setclock.c (pthread_condattr_setclock)
355         [!__ASSUME_POSIX_TIMERS]: Likewise.
356         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
357         (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
358         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
359         [!__ASSUME_POSIX_TIMERS]: Likewise.
360         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
361         (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
362         * sysdeps/unix/sysv/linux/timer_create.c [__NR_timer_create]: Make
363         code unconditional.
364         [!__NR-timer_create]: Remove conditional code.
365         (timer_create) [!__ASSUME_POSIX_TIMERS]: Likewise.
366         * sysdeps/unix/sysv/linux/timer_delete.c [__NR_timer_delete]: Make
367         code unconditional.
368         [!__NR_timer_delete]: Remove conditional code.
369         (timer_delete) [!__ASSUME_POSIX_TIMERS]: Likewise.
370         * sysdeps/unix/sysv/linux/timer_getoverr.c
371         [__NR_timer_getoverrun]: Make code unconditional.
372         [!__NR_timer_getoverrun]: Remove conditional code.
373         (timer_getoverrun) [!__ASSUME_POSIX_TIMERS]: Likewise.
374         * sysdeps/unix/sysv/linux/timer_gettime.c [__NR_timer_gettime]:
375         Make code unconditional.
376         [!__NR_timer_gettime]: Remove conditional code.
377         (timer_gettime) [!__ASSUME_POSIX_TIMERS]: Likewise.
378         * sysdeps/unix/sysv/linux/timer_routines.c [__NR_timer_create]:
379         Make code unconditional.
380         [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
381         * sysdeps/unix/sysv/linux/timer_settime.c [__NR_timer_settime]:
382         Make code unconditional.
383         [!__NR_timer_settime]: Remove conditional code.
384         (timer_settime) [!__ASSUME_POSIX_TIMERS]: Likewise.
385         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
386         (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Remove
387         conditional code.
389 2012-08-15  Tom de Vries  <vries@codesourcery.com>
390             Maxim Kuvyrkov  <maxim@codesourcery.com>
392         * sysdeps/pthread/bits/libc-lockP.h (__libc_lock_lock)
393         (__libc_lock_trylock): Allow pre-existing definitions.
395 2012-08-15  Maxim Kuvyrkov  <maxim@codesourcery.com>
397         * pthread_spin_lock.c: New file.
398         * pthread_spin_trylock.c: New file.
400 2012-08-08  Joseph Myers  <joseph@codesourcery.com>
402         * allocatestack.c (setxid_signal_thread) [__ASSUME_TGKILL]: Make
403         code unconditional.
404         (setxid_signal_thread) [!__ASSUME_TGKILL]: Remove conditional code.
405         * pthread_cancel.c (pthread_cancel) [__ASSUME_TGKILL]: Make code
406         unconditional.
407         (pthread_cancel) [!__ASSUME_TGKILL]: Remove conditional code.
408         * sysdeps/pthread/createthread.c (do_clone) [__ASSUME_TGKILL]:
409         Make code unconditional.
410         (do_clone) [!__ASSUME_TGKILL]: Remove conditional code.
411         * sysdeps/unix/sysv/linux/pt-raise.c (raise) [__ASSUME_TGKILL ||
412         __NR_tgkill]: Make code unconditional.
413         (raise) [__ASSUME_TGKILL]: Likewise.
414         (raise) [!__ASSUME_TGKILL]: Remove conditional code.
415         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill)
416         [__ASSUME_TGKILL]: Make code unconditional.
417         (__pthread_kill) [!__ASSUME_TGKILL]: Remove conditional code.
418         * sysdeps/unix/sysv/linux/raise.c (raise) [__ASSUME_TGKILL ||
419         __NR_tgkill]: Make code unconditional.
420         (raise) [__ASSUME_TGKILL]: Likewise.
421         (raise) [!__ASSUME_TGKILL]: Remove conditional code.
423 2012-08-07  Joseph Myers  <joseph@codesourcery.com>
425         * sysdeps/pthread/createthread.c (create_thread)
426         [!__ASSUME_NO_CLONE_DETACHED]: Remove conditional code.
428 2012-08-03  Joseph Myers  <joseph@codesourcery.com>
430         * nptl-init.c (sigcancel_handler) [__ASSUME_CORRECT_SI_PID]: Make
431         code unconditional.
432         (sighandler_setxid) [__ASSUME_CORRECT_SI_PID]: Likewise.
434 2012-07-28  Siddhesh Poyarekar  <siddhesh@redhat.com>
436         * tst-pthread-getattr.c (MAX_STACK_SIZE): New macro.
437         (pagesize): New static variable.
438         (allocate_and_test): Return MEM.  Rename parameter to TARGET.
439         (check_stack_top): New local variables MEM and PAGEMASK.  Cap
440         stack size to MAX_STACK_SIZE.  Call allocate_and_test for
441         halfway up the stack top page.  Verify that the top page was
442         written into.
443         (do_test): Get pagesize using sysconf.
445 2012-07-25  Andreas Schwab  <schwab@linux-m68k.org>
447         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Remove pseudo_end
448         label.
449         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Likewise.
450         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO):
451         Likewise.
453 2012-07-25  Siddhesh Poyarekar  <siddhesh@redhat.com>
455         * tst-pthread-getattr.c: Revert last change.
457 2012-07-20  Siddhesh Poyarekar  <siddhesh@redhat.com>
459         * tst-pthread-getattr.c (MAX_STACK_SIZE): New max cap for stack
460         size.
461         (_MIN): New macro.
462         (allocate_and_test): Return STACKADDR.  Access STACKADDR instead
463         of MEM to test.
464         (check_stack_top): Read valued written into STACKADDR in
465         allocate_and_test.  Cap stack size to MAX_STACK_SIZE.
467 2012-07-19  Siddhesh Poyarekar  <siddhesh@redhat.com>
469         * nptl-init.c (sighandler_setxid): Fix the comment that
470         describes it.
472 2012-06-23  Thomas Schwinge  <thomas@codesourcery.com>
474         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
475         (__lll_robust_timedlock_wait): Simplify CFI directives.
477 2012-06-20  Siddhesh Poyarekar  <siddhesh@redhat.com>
479         [BZ #12416]
480         * Makefile (tests): Add test case.
481         * pthread_getattr_np.c (pthread_getattr_np): Deduct pages below
482         the __libc_stack_end page from stacksize.  Truncate stacksize to
483         make it page aligned when it is computed from RLIMIT_STACK.
484         * tst-pthread-getattr.c: New test case. Verify that stackaddr is
485         accessible.
487 2012-06-07  Carlos Sánchez de La Lama  <csanchezdll@gmail.com>
489         [BZ #14205]
490         * sysdeps/sparc/sparc32/pthread_spin_lock.S: Do not use v9
491         branches.
493 2012-06-04  Siddhesh Poyarekar  <siddhesh@redhat.com>
494             Jakub Jelinek  <jakub@redhat.com>
496         [BZ #14188]
497         * sysdeps/pthread/pthread.h
498         [!(defined __GNUC__ && defined __EXCEPTIONS)]
499         (pthread_cleanup_push, pthread_cleanup_push_defer_np): Use
500         __libc_unlikely instead of __builtin_expect.
502 2012-05-30  H.J. Lu  <hongjiu.lu@intel.com>
504         [BZ #14117]
505         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Removed.
506         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
507         * sysdeps/unix/sysv/linux/i386/Implies: New file.
508         * sysdeps/unix/sysv/linux/x86_64/Implies: Likewise.
509         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Renamed
510         to ...
511         * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: This.
512         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Renamed
513         to ...
514         * sysdeps/unix/sysv/linux/x86/bits/semaphore.h: This.
516 2012-05-30  Andreas Schwab  <schwab@linux-m68k.org>
518         [BZ #14132]
519         * nptl-init.c (pthread_functions): Remove use of INTUSE and
520         _internal aliases.
521         (__pthread_initialize_minimal_internal): Likewise.
522         * sem_open.c: Likewise.
523         * sem_unlink.c: Likewise.
524         * pthreadP.h: Replace _internal aliases by hidden_proto
525         declarations.
526         * pthread_getspecific.c: Replace _internal alias by hidden_def.
527         * pthread_key_create.c: Likewise.
528         * pthread_mutex_destroy.c: Likewise.
529         * pthread_mutex_init.c: Likewise.
530         * pthread_mutex_lock.c: Likewise.
531         * pthread_mutex_unlock.c: Likewise.
532         * pthread_once.c: Likewise.
533         * pthread_rwlock_rdlock.c: Likewise.
534         * pthread_rwlock_unlock.c: Likewise.
535         * pthread_rwlock_wrlock.c: Likewise.
536         * pthread_setspecific.c: Likewise.
537         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
538         Likewise.
539         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
540         Likewise.
541         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
542         Likewise.
543         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
544         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
545         * sysdeps/unix/sysv/linux/s390/pthread_once.c: Likewise.
546         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
547         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
548         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
549         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
550         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
551         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
552         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
553         Likewise.
554         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
555         Likewise.
556         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
557         Likewise.
559 2012-05-27  Chung-Lin Tang  <cltang@codesourcery.com>
561         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO, LOAD_ARGS_1)
562         (LOAD_ARGS_2 ,LOAD_ARGS_3 ,LOAD_ARGS_4): Add CFI restores.
564         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_lock_wait_private)
565         (__lll_lock_wait, __lll_timedlock_wait, __lll_timedwait_tid): Add CFI
566         directives.
567         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
568         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Likewise.
569         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
570         (pthread_barrier_wait): Likewise.
571         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
572         (__pthread_cond_broadcast): Likewise.
573         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
574         (__pthread_cond_signal): Likewise.
575         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
576         (__pthread_cond_timedwait): Likewise.
577         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S (__pthread_cond_wait):
578         Likewise.
579         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S
580         (__pthread_rwlock_rdlock): Likewise.
581         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
582         (pthread_rwlock_timedrdlock): Likewise.
583         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
584         (pthread_rwlock_timedwrlock): Likewise.
585         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
586         (__pthread_rwlock_unlock): Likewise.
587         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S
588         (__pthread_rwlock_wrlock): Likewise.
589         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post): Likewise.
590         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
591         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
592         Likewise.
593         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
595 2012-05-26  Siddhesh Poyarekar  <siddhesh@redhat.com>
597         [BZ #12416]
598         * nptl/pthread_getattr_np.c (pthread_getattr_np): Use
599         __libc_stack_end rounded to the end of containing page as the
600         real stack end.
602 2012-05-25  Rayson Ho  <rho@redhat.com>
604         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Low-level SystemTap
605         probes for i386.
606         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
607         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
608         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
609         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
610         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
611         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
612         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
613         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
615 2012-05-25  Rayson Ho  <rho@redhat.com>
616             Roland McGrath  <roland@hack.frob.com>
618         * DESIGN-systemtap-probes.txt: New file.
619         * pthread_cond_broadcast.c: SystemTap probes.
620         * pthread_cond_init.c: Likewise.
621         * pthread_cond_signal.c: Likewise.
622         * pthread_cond_wait.c: Likewise.
623         * pthread_cond_destroy.c: Likewise.
624         * pthread_create.c: Likewise.
625         * pthread_join.c: Likewise.
626         * pthread_mutex_destroy.c: Likewise.
627         * pthread_mutex_init.c: Likewise.
628         * pthread_mutex_lock.c: Likewise.
629         * pthread_mutex_timedlock.c: Likewise.
630         * pthread_mutex_unlock.c: Likewise.
631         * pthread_rwlock_destroy.c: Likewise.
632         * pthread_rwlock_rdlock.c: Likewise.
633         * pthread_rwlock_unlock.c: Likewise.
634         * pthread_rwlock_wrlock.c: Likewise.
635         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
636         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
637         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
638         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
639         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
640         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
641         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
642         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
644 2012-05-24  Roland McGrath  <roland@hack.frob.com>
646         * pthread_create.c (start_thread): Define pthread_start LIBC_PROBE.
648 2012-05-17  Andreas Jaeger  <aj@suse.de>
650         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
651         (HAVE_DL_DISCOVER_OSVERSION): Don't declare _dl_discover_osversion
652         only for older kernels.
654 2012-05-15  Joseph Myers  <joseph@codesourcery.com>
656         * pthreadP.h [!__NR_set_robust_list] (__NR_set_robust_list): Do
657         not define.
659 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
661         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_lock): Load
662         futex pointer into RDI_LP.  Use RSP_LP to operate on stack.
663         (lll_robust_lock): Likewise.
664         (lll_cond_lock): Likewise.
665         (lll_robust_cond_lock): Likewise.
666         (lll_timedlock): Likewise.
667         (lll_robust_timedlock): Likewise.
668         (lll_unlock): Likewise.
669         (lll_robust_unlock): Likewise.
671 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
673         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use
674         LP_OP(cmp) and RCX_LP on dep_mutex pointer.
676 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
678         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Use LP_OP(op)
679         on NWAITERS.
680         (__gcc_personality_v0): Replace 8-byte data alignment with
681         LP_SIZE alignment and .quad with ASM_ADDR.
683 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
685         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Use LP_OP(op)
686         on NWAITERS.
687         (__gcc_personality_v0): Replace 8-byte data alignment with
688         LP_SIZE alignment and .quad with ASM_ADDR.
690 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
692         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Use LP_OP(cmp) on
693         NWAITERS, which is unsigned long int.
695 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
697         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
698         (__gcc_personality_v0): Replace 8-byte data alignment with
699         LP_SIZE alignment and .quad with ASM_ADDR.
701 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
703         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Use
704         LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer.  Load
705         __vdso_clock_gettime pointer into RAX_LP.
706         (__gcc_personality_v0): Replace 8-byte data alignment with
707         LP_SIZE alignment and .quad with ASM_ADDR.
709 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
711         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Use
712         LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer.  Load
713         __vdso_clock_gettime pointer into RAX_LP.
714         (__gcc_personality_v0): Replace 8-byte data alignment with
715         LP_SIZE alignment and .quad with ASM_ADDR.
717 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
719         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Use
720         LP_OP(cmp) and R8_LP on dep_mutex pointer.
722 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
724         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Use LP_OP(mov)
725         to update pointer in memory.  Load pointer into RDI_LP.
727 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
729         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
730         (LLL_STUB_UNWIND_INFO_START): Align label to LP_SIZE instead
731         of 8.
732         (LLL_STUB_UNWIND_INFO_END): Likewise.
733         (lll_timedlock): Load timeout pointer into RDX_LP.
734         (lll_robust_timedlock): Likewise.
736 2012-05-15  Siddhesh Poyarekar  <siddhesh@redhat.com>
737             Jakub Jelinek  <jakub@redhat.com>
739         [BZ #13613]
740         * Makefile (tests): Add test cases.
741         * descr.h (struct pthread): Add a comment describing multiple_threads.
742         * pthreadP.h (__pthread_multiple_threads): Expand comment to include
743         single-process case.
744         * pthread_cancel.c (pthread_cancel): Enable multiple_threads
745         before setting cancelstate of the thread.
746         * sysdeps/unix/sysv/linux/libc_multiple_threads.c
747         (__libc_multiple_threads): Add explanatory comment.
748         * tst-cancel-self-cancelstate.c: New test case.
749         * tst-cancel-self-canceltype.c: Likewise.
750         * tst-cancel-self-cleanup.c: Supporting file for test cases.
751         * tst-cancel-self-testcancel.c: New test case.
752         * tst-cancel-self.c: Likewise.
753         * vars.c: Expand comment to include single-process case.
755 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
757         * sysdeps/x86_64/tls.h: Don't include <bits/wordsize.h>.
758         (tcbhead_t): Remove __x86_64__ check.  Align rtld_savespace_sse
759         to 32 bytes.
761 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
763         * sysdeps/pthread/pthread.h (__PTHREAD_RWLOCK_INT_FLAGS_SHARED):
764         New.
765         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Check
766         __PTHREAD_RWLOCK_INT_FLAGS_SHARED instead of __WORDSIZE.
768 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
770         * shlib-versions: Move x86_64-.*-linux.* entry to ...
771         * sysdeps/x86_64/64/shlib-versions: Here.  New file.
772         * sysdeps/x86_64/x32/shlib-versions: New file.
774 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
776         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Define x32
777         __SIZEOF_PTHREAD_XXX_T.
778         (__pthread_internal_list): Check __x86_64__ instead of __WORDSIZE.
779         (pthread_mutex_t): Likewise.
780         (pthread_rwlock_t): Likewise.
781         (__PTHREAD_RWLOCK_INT_FLAGS_SHARED): New.  Defined if __x86_64__
782         is defined.
784 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
786         * sysdeps/x86_64/x32/tls.h: New file.
788 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
790         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Use uint64_t on 64-bit
791         integer.
792         (THREAD_SETMEM_NC): Likewise.
794 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
796         * sysdeps/x86_64/tls.h (THREAD_SELF): Replace movq/%q0 with
797         mov/%0.
799 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
801         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
802         (__cleanup_fct_attribute): Check __x86_64__ instead of
803         __WORDSIZE.
805 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
807         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER): Check
808         __PTHREAD_MUTEX_HAVE_PREV instead of __WORDSIZE.
809         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Likewise.
810         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
811         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
813 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
815         * pthread_create.c (start_thread): Check __PTHREAD_MUTEX_HAVE_PREV
816         instead of __WORDSIZE.
818 2012-05-10  Thomas Schwinge  <thomas@schwinge.name>
820         [BZ #3748]
821         * sysdeps/pthread/bits/libc-lockP.h (__libc_once_get): New macro.
823 2012-05-09  Chung-Lin Tang  <cltang@codesourcery.com>
825         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
826         (__pthread_cond_timedwait): Use CFI directives.
827         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
828         (__pthread_cond_wait): Likewise.
829         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
830         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
832 2012-05-03  David S. Miller  <davem@davemloft.net>
834         * sysdeps/sparc/sparc64/pthread_spin_unlock.S: Fix thinko, we
835         always have to return 0, especially for the pthread_spin_init
836         alias.
837         * sysdeps/sparc/sparc32/pthread_spin_lock.S: Add missing trailing
838         newline.
839         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: Likewise.
840         * sysdeps/sparc/sparc64/pthread_spin_lock.S: Likewise.
842 2012-05-02  David S. Miller  <davem@davemloft.net>
844         * sysdeps/sparc/sparc64/pthread_spin_lock.S: New.
845         * sysdeps/sparc/sparc64/pthread_spin_lock.c: Delete.
846         * sysdeps/sparc/sparc64/pthread_spin_unlock.S: New.
847         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: Delete.
848         * sysdeps/sparc/sparc64/pthread_spin_trylock.S: New.
849         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: Delete.
850         * sysdeps/sparc/sparc64/pthread_spin_init.c: New.
851         * sysdeps/sparc/sparc32/pthread_spin_lock.S: New.
852         * sysdeps/sparc/sparc32/pthread_spin_lock.c: Delete.
853         * sysdeps/sparc/sparc32/pthread_spin_trylock.S: New.
854         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: Delete.
855         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: New.
856         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: Delete.
857         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.S: New.
858         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: Delete.
859         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.S: New.
860         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: Delete.
861         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_init.c: New.
863 2012-05-02  Allan McRae  <allan@archlinux.org>
865         * Makefile: (LDFLAGS-tst-tls5): Use $(no-as-needed).
866         (LDFLAGS-tst-cancel24): Likewise.
868 2012-05-02  Paul Pluzhnikov  <ppluzhnikov@google.com>
870         * sysdeps/i386/pthread_spin_lock.S: New.
871         * sysdeps/i386/pthread_spin_lock.c: Delete.
872         * sysdeps/x86_64/pthread_spin_lock.S: New.
873         * sysdeps/x86_64/pthread_spin_lock.c: Delete.
875 2012-04-28  Andreas Schwab  <schwab@linux-m68k.org>
877         * Makefile ($(objpfx)tst-stack3-mem, $(objpfx)tst-tls6.out): Don't
878         run when cross-compiling.
880 2012-04-26  Siddhesh Poyarekar  <siddhesh@redhat.com>
882         * sysdeps/pthread/unwind-forcedunwind.c: Include gnu/lib-names.h
883         instead of libgcc_s.h.
885 2012-04-20  Paul Pluzhnikov  <ppluzhnikov@google.com>
887         * sysdeps/x86_64/tls.h (TLS_GET_FS, TLS_SET_FS): Delete.
889 2012-03-27  David S. Miller  <davem@davemloft.net>
891         * tst-cond16.c (do_test): Use a thread stack size which is either
892         PTHREAD_STACK_MIN or the page size, whichever is larger.
893         * tst-cond18.c (do_test): Likewise.
895 2012-03-19  H.J. Lu  <hongjiu.lu@intel.com>
897         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Use
898         register char * __asm__("rsp") to get stack frame.
900 2012-03-19  H.J. Lu  <hongjiu.lu@intel.com>
902         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (SYS_futex): Use
903         __NR_futex directly.
905 2012-03-19  H.J. Lu  <hongjiu.lu@intel.com>
907         * unwind.c (unwind_stop): Cast _Unwind_GetCFA return to
908         _Unwind_Ptr first.
910 2012-03-16  David S. Miller  <davem@davemloft.net>
912         [BZ #13844]
913         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: Include using <..>
914         instead of "...".
915         * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c:
916         Delete, not needed.
918 2012-03-15  David S. Miller  <davem@davemloft.net>
920         [BZ #13844]
921         * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c: New file.
923 2012-03-09  Paul Eggert  <eggert@cs.ucla.edu>
925         [BZ #13673]
926         * pt-crti.S: Replace FSF snail mail address with URL.
928 2012-03-09  Joseph Myers  <joseph@codesourcery.com>
930         * sysdeps/pthread/pthread.h (__need_clockid_t, __need_timespec):
931         Do not define before including <time.h>.
933 2012-03-08  David S. Miller  <davem@davemloft.net>
935         * sysdeps/unix/sysv/linux/sparc/sem_post.c: Update copyright year.
937 2012-03-08  Thomas Schwinge  <thomas@codesourcery.com>
939         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
940         Check for timestamp before the Epoch.
942         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Fix
943         updating nwaiters.
945         * tst-sem13.c (do_test): Add another test case.
946         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
947         Fix updating nwaiters.
949 2012-03-07  Joseph Myers  <joseph@codesourcery.com>
951         [BZ #10545]
952         * sysdeps/pthread/configure.in (libc_cv_forced_unwind): Change
953         link test to a compile test.
954         (libc_cv_c_cleanup): Likewise.  Declare puts rather than including
955         <stdio.h>.
956         * sysdeps/pthread/configure: Regenerated.
958 2012-03-07  Ulrich Drepper  <drepper@gmail.com>
960         * Makefile (distribute): Remove variable.
962 2012-01-23  Thomas Schwinge  <thomas@codesourcery.com>
964         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Get rid of
965         superfluous assignment.
966         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c (sem_timedwait):
967         Likewise.
968         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
969         (sem_timedwait): Likewise.
971 2012-03-06  Ulrich Drepper  <drepper@gmail.com>
973         * sysdeps/pthread/bits/libc-lock.h: Move information not needed in
974         installed headers to...
975         * sysdeps/pthread/bits/libc-lockP.h: ...here.  New file.
977 2012-03-06  David S. Miller  <davem@davemloft.net>
979         * sysdeps/unix/sysv/linux/sparc/sem_post.c (__new_sem_post): Use
980         atomic_increment and remove unused local variable.
981         (__old_sem_post): Likewise.
983 2012-02-27  David S. Miller  <davem@davemloft.net>
985         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Don't refer to
986         non-existing __pthread_attr.
987         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
988         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
989         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
990         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
991         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
993 2012-02-26  Ulrich Drepper  <drepper@gmail.com>
995         * sysdeps/pthread/pthread.h: Define __need_clockid_t for __USE_XOPEN2K.
997         * sysdeps/pthread/pthread.h: Define __need_timespec before including
998         <time.h>.
999         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Name pthread_attr_t
1000         union.
1001         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1002         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1003         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1004         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1005         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1007 2012-02-21  Joseph Myers  <joseph@codesourcery.com>
1009         [BZ #13695]
1010         * Makefile (generated): Remove crti.S, crtn.S, defs.h and
1011         pt-initfini.s.
1012         [crti.S not in sysdirs] (omit-deps): Do not append.
1013         [crti.S not in sysdirs] (CFLAGS-pt-initfini.s): Remove variable.
1014         [crti.S not in sysdirs] (pt-initfini.c): Remove vpath directive.
1015         [crti.S not in sysdirs] ($(objpfx)crti.S): Remove rule.
1016         [crti.S not in sysdirs] ($(objpfx)crtn.S): Likewise.
1017         [crti.S not in sysdirs] ($(objpfx)defs.h): Likewise.
1018         [crti.S not in sysdirs] ($(objpfx)crti.o): Likewise.
1019         [crti.S not in sysdirs] ($(objpfx)crtn.o): Likewise.
1020         [crti.S in sysdirs] (extra-objs): Append unconditionally.
1021         [crti.S in sysdirs] ($(objpfx)crti.o): Define rule
1022         unconditionally.
1023         * sysdeps/pthread/pt-initfini.c: Remove file.
1025 2012-02-16  Richard Henderson  <rth@twiddle.net>
1027         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Remove file.
1028         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Remove file.
1030 2012-02-15  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1032         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Remove file.
1034 2012-02-16  David S. Miller  <davem@davemloft.net>
1036         * sysdeps/sparc/Makefile: Add -fPIC when building pt-crti.S and crtn.S
1038 2012-02-15  Marek Polacek  <polacek@redhat.com>
1040         * sysdeps/unix/sysv/linux/x86_64/Makefile: Remove file.
1042 2012-02-09  Paul Eggert  <eggert@cs.ucla.edu>
1044         Replace FSF snail mail address with URLs, as per GNU coding standards.
1046 2012-02-08  Andreas Schwab  <schwab@linux-m68k.org>
1048         * Makefile (extra-objs) [crti.S in sysdirs]: Add pt-crti.o.
1050 2012-02-08  Joseph Myers  <joseph@codesourcery.com>
1052         Support crti.S and crtn.S provided directly by architectures.
1053         * Makefile [crti.S in sysdirs] (omit-deps): Do not append.
1054         [crti.S in sysdirs] (CFLAGS-pt-initfini.s): Do not define variable.
1055         [crti.S in sysdirs] ($(objpfx)pt-initfini.s): Disable rule.
1056         [crti.S in sysdirs] ($(objpfx)crti.S): Likewise.
1057         [crti.S in sysdirs] ($(objpfx)crtn.S): Likewise.
1058         [crti.S in sysdirs] ($(objpfx)defs.h): Likewise.
1059         [crti.S in sysdirs] ($(objpfx)crti.o): Likewise.
1060         [crti.S in sysdirs] ($(objpfx)crtn.o): Likewise.
1061         [crti.S in sysdirs] (pt-initfini.c): Remove vpath directive.
1062         [crti.S in sysdirs] ($(objpfx)crti.o): New rule.
1063         * pt-crti.S: New file.
1064         * sysdeps/unix/sysv/linux/i386/Makefile: Remove file.
1066 2012-02-03  Joseph Myers  <joseph@codesourcery.com>
1068         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
1069         macros for PIC register setup.
1070         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1071         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1072         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1073         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1074         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1076 2012-01-11  Marek Polacek  <polacek@redhat.com>
1078         * forward.c (FORWARD_NORETURN): Define macro.
1079         (__pthread_unwind): Use FORWARD_NORETURN macro to avoid warning.
1080         (__pthread_exit): Likewise.
1082 2012-01-10  Ulrich Drepper  <drepper@gmail.com>
1084         * sysdeps/pthread/pthread.h: Add const attribute to pthread_equal.
1086         * pthreadP.h: Add noreturn to __pthread_exit.
1087         * sysdeps/pthread/pthread-functions.h: Likewise for ptr___pthread_exit.
1089 2011-12-30  Adhemerval Zanella  <azanella@linux.vnet.ibm.com>
1091         * sysdeps/unix/sysv/linux/aio_misc.h (__aio_create_helper_thread):
1092         Call pthread_attr_setstacksize() with result of
1093         __pthread_get_minstack() to account for application TLS usage.
1095 2012-01-08  Marek Polacek  <polacek@redhat.com>
1097         * sysdeps/unix/sysv/linux/mq_notify.c: Include <nptl/pthreadP.h>.
1099 2012-01-07  Ulrich Drepper  <drepper@gmail.com>
1101         [BZ #13553]
1102         * pthreadP.h: Use const instead of __const.
1103         * semaphore.h: Likewise.
1104         * sysdeps/pthread/bits/libc-lock.h: Likewise.
1105         * sysdeps/pthread/bits/sigthread.h: Likewise.
1106         * sysdeps/pthread/pthread.h: Likewise.
1108         * Makefile: Remove elf=yes test, only ELF is supported.
1110         * shlib-versions: Remove entries for ports architectures.
1112         In case anyone cares, the IA-64 architecture could move to ports.
1113         * sysdeps/ia64/*: Removed.
1114         * sysdeps/unix/sysv/linux/ia64/*: Removed.
1116 2011-12-22  Ulrich Drepper  <drepper@gmail.com>
1118         * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread): Use
1119         __pthread_get_minstack.
1120         * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Likewise.
1122         [BZ #13088]
1123         * sysdeps/unix/sysv/linux/timer_routines.c: Get minimum stack size
1124         through __pthread_get_minstack.
1125         * nptl-init.c (__pthread_initialize_minimal_internal): Get page size
1126         directly from _rtld_global_ro.
1127         (__pthread_get_minstack): New function.
1128         * pthreadP.h: Declare __pthread_get_minstack.
1129         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_get_minstack.
1131 2011-12-21  Ulrich Drepper  <drepper@gmail.com>
1133         [BZ #13515]
1134         * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1135         Correct reading name from file.
1137 2011-12-14  Carlos O'Donell  <carlos@systemhalted.org>
1139         * allocatestack.c (allocate_stack): Return errno on failure.
1141 2011-12-14  Jeff Law  <law@redhat.com>
1143         [BZ #5245]
1144         * pthread_create.c (__pthread_create_2_1): Translate ENOMEM to EAGAIN.
1146 2011-11-28  Andreas Schwab  <schwab@redhat.com>
1148         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Handle
1149         EAGAIN from FUTEX_WAIT_REQUEUE_PI.
1150         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1152 2011-11-15  Ulrich Drepper  <drepper@gmail.com>
1154         * pthread_getattr_np.c (pthread_getattr_np): Set FD_CLOEXEC for
1155         /proc/self/maps.
1157 2011-10-29  Ulrich Drepper  <drepper@gmail.com>
1159         [BZ #13358]
1160         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1161         (__pthread_cond_timedwait): Initialize %r15 correctly also for code
1162         path for kernels with FUTEX_CLOCK_REALTIME.
1163         Debugged by H.J. Lu <hjl.tools@gmail.com>.
1165 2011-10-27  Andreas Schwab  <schwab@redhat.com>
1167         [BZ #13344]
1168         * sysdeps/pthread/pthread.h: Use __THREADNL instead of __THREAD
1169         for memory synchronization functions.
1170         * semaphore.h: Likewise.
1172 2011-10-24  Ulrich Drepper  <drepper@gmail.com>
1174         * tst-cancel7.c: Avoid warning.
1175         * tst-mutex6.c: Likewise.
1176         * tst-mutex9.c: Likewise.
1177         * tst-mutexpi6.c: Likewise.
1179 2011-10-23  Ulrich Drepper  <drepper@gmail.com>
1181         * sysdeps/i386/tls.h: Remove #include <list.h>.
1183 2011-10-15  Ulrich Drepper  <drepper@gmail.com>
1185         * pthread_create.c (start_thread): Call __ctype_init.
1187 2011-09-15  Andreas Schwab  <schwab@redhat.com>
1189         * sysdeps/pthread/list.h: Define only list_t if __need_list_t is
1190         defined.
1191         (list_add): Add atomic_write_barrier.
1192         * descr.h: Define __need_list_t before including <list.h>.
1193         * nptl-init.c: Include <list.h>
1194         * allocatestack.c: Likewise.
1196 2011-09-11  Ulrich Drepper  <drepper@gmail.com>
1198         * sysdeps/i386/tls.h: Remove HAVE_TLS_SUPPORT test.
1199         * sysdeps/ia64/tls.h: Likewise.
1200         * sysdeps/powerpc/tls.h: Likewise.
1201         * sysdeps/s390/tls.h: Likewise.
1202         * sysdeps/sh/tls.h: Likewise.
1203         * sysdeps/sparc/tls.h: Likewise.
1204         * sysdeps/x86_64/tls.h: Likewise.
1206 2011-09-10  Ulrich Drepper  <drepper@gmail.com>
1208         * sysdeps/pthread/malloc-machine.h: Define MUTEX_INITIALIZER.
1210         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Don't handle
1211         !USE___THREAD.
1212         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1213         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1214         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1215         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1216         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
1217         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
1218         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
1219         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
1220         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1221         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1222         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
1223         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1225         * tst-tls1.c: Support for __thread is now mandatory.
1226         * tst-tls2.c: Likewise.
1227         * tst-tls3.c: Likewise.
1228         * tst-tls3mod.c: Likewise.
1229         * tst-tls4.c: Likewise.
1230         * tst-tls4moda.c: Likewise.
1231         * tst-tls4modb.c: Likewise.
1232         * tst-tls5.h: Likewise.
1234 2011-09-08  Ulrich Drepper  <drepper@gmail.com>
1236         [BZ #12403]
1237         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1238         (pthread_rwlock_timedwrlock): Use correct macro in test.
1239         Patch by H.J. Lu <hongjiu.lu@intel.com>.
1241 2011-09-06  Ulrich Drepper  <drepper@gmail.com>
1243         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): Don't
1244         use gettimeofday vsyscall, just call gettimeofday.
1245         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1246         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
1247         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1248         Likewise.
1249         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1250         Likewise.
1251         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1252         Simplify __vdso_clock_gettime use.
1254 2011-09-05  David S. Miller  <davem@davemloft.net>
1256         * sysdeps/unix/sysv/linux/sem_timedwait.c (do_futex_timed_wait):
1257         New function.
1258         (sem_timedwait): Call it to force an exception region around
1259         the async cancel enable and the futex operation.
1260         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: Likewise.
1261         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: Likewise.
1262         * sysdeps/unix/sysv/linux/sem_wait.c (do_futex_wait): New function.
1263         (__new_sem_wait): Call it to force an exception region around
1264         the async cancel enable and the futex operation.
1265         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: Likewise.
1266         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: Likewise.
1268 2011-08-31  Andreas Schwab  <schwab@redhat.com>
1270         * allocatestack.c (setxid_mark_thread): Ensure that the exiting
1271         thread is woken up.
1273 2011-08-20  David S. Miller  <davem@davemloft.net>
1275         * Makefile (tst-cleanup0.out): Fix typo in output redirection.
1277 2011-08-14  Roland McGrath  <roland@hack.frob.com>
1279         * sysdeps/i386/pthreaddef.h (TCB_ALIGNMENT): Set to 64, optimal on Atom.
1280         * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Likewise.
1282 2011-08-08  Andreas Schwab  <schwab@redhat.com>
1284         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned
1285         stack.
1286         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1287         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1289 2011-07-22  Ulrich Drepper  <drepper@gmail.com>
1291         * sysdeps/pthread/unwind-forcedunwind.c (_Unwind_Resume): Add read
1292         barrier.
1293         (__gcc_personality_v0): Likewise.
1294         (_Unwind_ForcedUnwind): Likewise.
1295         (_Unwind_GetCFA): Likewise.
1297 2011-07-14  Roland McGrath  <roland@hack.frob.com>
1299         * allocatestack.c (__reclaim_stacks): Use uintptr_t cast rather than
1300         UINTMAX_C.
1302 2011-06-30  Ulrich Drepper  <drepper@gmail.com>
1304         * nptl-init.c (__nptl_set_robust): New function.
1305         (pthread_functions): Add reference.
1306         * npthreadP.h: Declare __nptl_set_robust.
1307         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
1308         ptr_set_robust member.
1309         * sysdeps/unix/sysv/linux/fork.c: Call set_robust_list syscall in
1310         child if threads are used.
1312 2011-06-14  Andreas Jaeger  <aj@suse.de>
1314         * pthread_rwlock_init.c: Include <string.h> for memset declaration.
1316 2011-05-11  Ulrich Drepper  <drepper@gmail.com>
1318         [BZ #386]
1319         * allocatestack.c (allocate_stack): Convert ENOMEM error to EAGAIN.
1321 2011-04-10  Ulrich Drepper  <drepper@gmail.com>
1323         [BZ #12650]
1324         * allocatestack.c (get_cached_stack): Deallocate DTV entries before
1325         clearing memory.
1326         Patch partly by Robert Rex <robert.rex@exasol.com>.
1328 2011-01-19  Roland McGrath  <roland@redhat.com>
1330         * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
1331         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1332         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
1333         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1334         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
1335         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
1337 2011-01-16  Andreas Schwab  <schwab@linux-m68k.org>
1339         * Makefile (test-extras): Add tst-cleanup4aux.
1341 2011-01-14  Ulrich Drepper  <drepper@gmail.com>
1343         [BZ #10563]
1344         * sysdeps/pthread/setxid.h (__SETXID_1): Add cast to assignment.
1345         (__SETXID_2): Likewise.
1346         (__SETXID_3): Likewise.
1348 2011-01-13  Ulrich Drepper  <drepper@gmail.com>
1350         [BZ #10484]
1351         * Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
1352         * alloca_cutoff.c: Add libc_hidden_def.
1354 2010-10-13  H.J. Lu  <hongjiu.lu@intel.com>
1356         [BZ #12113]
1357         * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
1358         * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
1359         of "struct pthread".
1361 2010-09-21  Andreas Schwab  <schwab@redhat.com>
1363         * sysdeps/pthread/pthread.h (pthread_cleanup_push)
1364         [!__EXCEPTIONS]: Mangle local variable not_first_call.
1365         (pthread_cleanup_push_defer_np): Likewise.
1367 2010-09-03  Ulrich Drepper  <drepper@redhat.com>
1369         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are
1370         small.
1372 2010-08-10  Dinakar Guniguntala  <dino@in.ibm.com>
1373             Stefan Hajnoczi  <stefanha@linux.vnet.ibm.com>
1375         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
1376         FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
1378 2010-08-12  H.J. Lu  <hongjiu.lu@intel.com>
1380         * sysdeps/unix/sysv/linux/i386/Makefile: New file.
1382 2010-05-01  Alan Modra  <amodra@gmail.com>
1384         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1385         (PSEUDO): Use correct cr save.  Don't use wrong parm save area
1386         to save temps.  Correct cfi for possible later frame manipulation.
1387         (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
1388         (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
1389         (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
1390         (DOCARGS_6, UNDOCARGS_6): Likewise.
1391         (CENABLE, CDISABLE): Add nops for non-shared calls.
1393 2010-07-06  Andreas Schwab  <schwab@redhat.com>
1395         * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1396         Fix type mismatch.
1398 2010-07-03  Ulrich Drepper  <drepper@redhat.com>
1400         * tst-abstime.c (do_test): Some more cleanups
1402 2010-07-02  Ulrich Drepper  <drepper@redhat.com>
1404         * tst-abstime.c: Correct testing and add test for sem_timedwait.
1406 2010-07-01  Andreas Schwab  <schwab@redhat.com>
1407             Ulrich Drepper  <drepper@redhat.com>
1409         * Makefile (tests): Add tst-abstime.
1410         * tst-abstime.c: New file.
1411         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1412         (__lll_timedlock_wait): Check for timestamp before the Epoch.
1413         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1414         (__lll_timedlock_wait): Likewise.
1415         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1416         (__lll_robust_timedlock_wait): Likewise.
1417         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1418         (__pthread_cond_timedwait): Likewise.
1419         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1420         (pthread_rwlock_timedrdlock): Likewise.
1421         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1422         (pthread_rwlock_timedwrlock): Likewise.
1423         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1424         Likewise.
1426 2010-07-01  Ulrich Drepper  <drepper@redhat.com>
1428         * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
1430 2010-06-01  Takashi Yoshii  <takashi.yoshii.zj@renesas.com>
1432         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
1433         location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
1435 2010-04-09  Ulrich Drepper  <drepper@redhat.com>
1437         [BZ #11390]
1438         * sysdeps/unix/sysv/linux/pthread_getname.c: New file.
1439         * sysdeps/unix/sysv/linux/pthread_setname.c: New file.
1440         * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and
1441         pthread_setname.
1442         * Makefile (libpthread-routines): Add pthread_getname and
1443         pthread_setname.
1444         * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12.
1446 2010-04-05  Thomas Schwinge  <thomas@schwinge.name>
1448         * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/.
1449         * sysdeps/pthread/rt-unwind-resume.c: Likewise.
1450         * sysdeps/pthread/Makefile: Remove csu section and rt section's
1451         unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead.
1453 2010-03-23  Luis Machado  <luisgpm@br.ibm.com>
1455         * pthread_cond_timedwait.c: Add check for
1456         HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
1457         (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
1458         INTERNAL_SYSCALL.
1460 2010-03-09  Ulrich Drepper  <drepper@redhat.com>
1462         * pthread_create.c (__pthread_create_2_1): If priorities are incorrect
1463         and the call fails wake eventually waiting setxid threads.  Don't free
1464         stack here if we try starting a thread.
1465         * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter
1466         if the clone call failed.
1468 2010-03-08  Andreas Schwab  <schwab@redhat.com>
1470         * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
1471         * allocatestack.c (get_cached_stack): Set setxid_futex.
1472         (allocate_stack): Likewise.
1474 2010-03-05  Andreas Schwab  <schwab@redhat.com>
1475             Ulrich Drepper  <drepper@redhat.com>
1477         * allocatestack.c (setxid_mark_thread): Delay handling of thread if
1478         it is creating a thread or it is just being created.
1479         * pthread_create.c (start_thread): Wake setxid thread if it is
1480         waiting.
1481         (__pthread_create_2_1): Initialize setxid_futex.
1482         * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it
1483         is waiting.
1485 2010-01-15  Ulrich Drepper  <drepper@redhat.com>
1487         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1488         Fix unwind info.
1489         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1491 2010-01-15  Michal Schmidt  <mschmidt@redhat.com>
1493         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1494         Fix pthread_cond_timedwait with requeue-PI.
1495         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1496         Fix pthread_cond_wait with requeue-PI.
1498 2010-01-14  Ulrich Drepper  <drepper@redhat.com>
1500         * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
1501         and pthread_mutexattr_setrobust for GLIBC_2.12.
1502         * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
1503         * pthread_mutexattr_getrobust.c: Define alias
1504         pthread_mutexattr_getrobust.
1505         * pthread_mutexattr_setrobust.c: Define alias
1506         pthread_mutexattr_setrobust.
1508 2010-01-12  Ulrich Drepper  <drepper@redhat.com>
1510         * sysdeps/pthread/pthread.h: Cleanup.  Fix up for XPG7.
1512 2010-01-08  Ulrich Drepper  <drepper@redhat.com>
1514         * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
1516 2009-12-18  Thomas Schwinge  <thomas@codesourcery.com>
1518         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
1519         call __gmon_start__.
1520         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
1522 2009-12-17  Ulrich Drepper  <drepper@redhat.com>
1524         * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
1525         using memset.
1527 2009-12-01  Dinakar Guniguntala  <dino@in.ibm.com>
1529         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
1530         FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1531         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
1532         is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1533         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1534         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
1535         is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1536         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1538 2009-12-12  Ulrich Drepper  <drepper@redhat.com>
1540         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1541         Don't update nwaiters after invalid timeout is recognized.
1543 2009-11-27  Thomas Schwinge  <thomas@codesourcery.com>
1545         * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
1546         __gmon_start__.
1548 2009-11-27  Andreas Schwab  <schwab@redhat.com>
1550         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
1551         THREAD_SELF->cancelhandling after returning from futex call.
1553 2009-11-24  Ulrich Drepper  <drepper@redhat.com>
1555         * tst-sem13.c: New file.
1556         * Makefile (tests): Add tst-sem13.
1558 2009-11-22  Roland McGrath  <roland@redhat.com>
1560         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
1561         instead of recapitulating its contents.
1563 2009-11-18  Ulrich Drepper  <drepper@redhat.com>
1565         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
1566         optimizations and cleanups.
1568 2009-11-18  Dinakar Guniguntala  <dino@in.ibm.com>
1570         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1571         Remove redundant code. Fix cfi offsets.
1572         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1573         Fix cfi offsets.
1575 2009-11-17  Ulrich Drepper  <drepper@redhat.com>
1577         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
1578         reduce size of unwind info.
1580         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
1581         cfi directives.
1582         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1583         Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
1585 2009-11-03  Andreas Schwab  <schwab@linux-m68k.org>
1587         [BZ #4457]
1588         * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
1589         LIBGCC_S_SO.
1590         * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
1592 2009-10-30  Ulrich Drepper  <drepper@redhat.com>
1594         * tst-sem11.c (main): Rewrite to avoid aliasing problems.
1596         [BZ #3270]
1597         * allocatestack.c (__nptl_setxid): Perform the operation in multiple
1598         steps to avoid races with creation and terminations.
1599         * nptl-init.c (sighandler_setxid): Adjust.
1600         Patch by Daniel Jacobowitz.
1602 2009-09-07  Andreas Schwab  <schwab@redhat.com>
1604         * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
1606 2009-09-02  Suzuki K P  <suzuki@in.ibm.com>
1607             Joseph Myers  <joseph@codesourcery.com>
1609         [BZ #7094]
1610         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1611         Initialize the sigev_notify field for newly created timer to make sure
1612         the timer gets deleted from the active timer's list upon timer_delete.
1614 2009-08-27  Andrew Stubbs  <ams@codesourcery.com>
1616         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1617         Correct a logic error.
1619 2009-08-25  Ulrich Drepper  <drepper@redhat.com>
1621         * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
1622         of the field in local variables.
1623         (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
1624         variable and don't unconditionally clear it.
1626 2009-08-24  Ulrich Drepper  <drepper@redhat.com>
1628         * pthread_create.c (start_thread): Hint to the kernel that memory for
1629         the stack can be reused.  We do not mark all the memory.  The part
1630         still in use and some reserve are kept.
1632 2009-08-23  Ulrich Drepper  <drepper@redhat.com>
1634         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
1636 2009-08-11  Ulrich Drepper  <drepper@redhat.com>
1638         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
1639         directives.
1641 2009-08-10  Ulrich Drepper  <drepper@redhat.com>
1643         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
1644         directives.
1645         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1647 2009-08-10  Andreas Schwab  <schwab@redhat.com>
1649         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1650         (__pthread_cond_signal): Don't clobber register used for syscall
1651         number.
1653 2009-08-08  Ulrich Drepper  <drepper@redhat.com>
1655         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1656         Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
1658         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1659         (__pthread_cond_wait): Optimize by avoiding use of callee-safe
1660         register.
1662 2009-08-07  Ulrich Drepper  <drepper@redhat.com>
1664         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
1665         enabled by the special *_asynccancel functions.
1666         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1667         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1669         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
1671 2009-08-04  Ulrich Drepper  <drepper@redhat.com>
1673         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
1674         * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
1675         * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
1676         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
1677         since we can assume the special __*_{en,dis}able_asynccancel
1678         functions.
1679         (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
1680         * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
1681         and PTHREAD_CANCELED.
1683 2009-07-31  Ulrich Drepper  <drepper@redhat.com>
1685         * descr.h: Better definition of *_BITMASK macros for cancellation.
1687 2009-07-29  Ulrich Drepper  <drepper@redhat.com>
1689         * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
1691         * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
1692         dynamic linker might have to save.
1693         Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
1694         RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL.  Pretty
1695         printing.
1697         * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
1699 2009-07-28  Ulrich Drepper  <drepper@redhat.com>
1701         * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
1702         New function.
1703         * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
1704         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
1705         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
1706         requeue_pi for robust mutexes.
1707         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1708         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1709         Don't only skip __pthread_mutex_cond_lock.  Call instead
1710         __pthread_mutex_cond_lock_adjust.
1711         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1713         * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
1714         optimization of PI mutex handling.
1716 2009-07-27  Ulrich Drepper  <drepper@redhat.com>
1718         [BZ #10418]
1719         * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
1720         instead of of _acq variants of cmpxchg.
1722 2009-07-23  Ulrich Drepper  <drepper@redhat.com>
1724         * sysdeps/x86_64/configure.in: New file.
1726         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
1727         path when not using absolute timeout futex.
1729 2009-07-20  Ulrich Drepper  <drepper@redhat.com>
1731         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
1732         optimizations of last changes.
1733         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1735 2009-07-19  Ulrich Drepper  <drepper@redhat.com>
1737         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1738         FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1739         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
1740         is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1741         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1742         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
1743         is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1744         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1746         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1747         (__pthread_cond_timedwait): Make more robust.
1749 2009-07-18  Ulrich Drepper  <drepper@redhat.com>
1751         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1752         (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
1753         directly use absolute timeout.
1755         * tst-sem5.c (do_test): Add test for premature timeout.
1756         * Makefile: Linu tst-sem5 with librt.
1758         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1759         (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
1760         directly use absolute timeout.
1761         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1762         (pthread_rwlock_timedrdlock): Likewise.
1764         * tst-cond11.c (run_test): Add test to check that the timeout is
1765         long enough.
1767         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1768         (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
1769         directly use absolute timeout.
1771         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1772         (__pthread_cond_wait): Convert to using exception handler instead of
1773         registered unwind buffer.
1774         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1775         (__pthread_cond_timedwait): Likewise.
1777 2009-07-17  Ulrich Drepper  <drepper@redhat.com>
1779         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1780         If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
1781         use absolute timeout.
1783         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
1784         handling of uncontested semaphore.
1786         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1787         (__condvar_cleanup): Rewrite to use cfi directives instead of
1788         hand-coded unwind tables.
1789         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
1790         Likewise.
1791         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
1792         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1793         Likewise.
1795 2009-06-12  Ulrich Drepper  <drepper@redhat.com>
1797         * Makefile (libpthread-routines): Add pthread_sigqueue.
1798         * Versions: Add pthread_sigqueue for GLIBC_2.11.
1799         * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
1800         * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
1802 2009-06-11  Ulrich Drepper  <drepper@redhat.com>
1804         [BZ #10262]
1805         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1806         (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
1807         cannot be assumed.
1808         Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
1810 2009-05-16  Ulrich Drepper  <drepper@redhat.com>
1812         * libc-cancellation.c: Move __libc_cleanup_routine to...
1813         * libc-cleanup.c: ...here.  New file.
1814         * Makefile (routines): Add libc-cleanup.
1816         * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
1817         test.
1818         * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
1819         * sysdeps/pthread/librt-cancellation.c: Likewise.
1821         [BZ #9924]
1822         * nptl-init.c: Renamed from init.c.
1823         * Makefile: Change all occurences of init.c to nptl-init.c.
1825 2009-05-15  Ulrich Drepper  <drepper@redhat.com>
1827         * cancellation.c (__pthread_disable_asynccancel): Correct the bits
1828         to test when deciding on the delay.
1829         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1830         * pthread_cancel.c: Close race between deciding on sending a signal
1831         and setting the CANCELING_BIT bit.
1833         * cancellation.c (__pthread_disable_asynccancel): Don't return if
1834         thread is canceled.
1835         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1837 2009-04-27  Ulrich Drepper  <drepper@redhat.com>
1839         * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
1840         is available.
1841         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1842         * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
1843         * sysdeps/i386/tls.h: Likewise.
1844         (tcbhead_t): Add __private_tm member.
1846 2009-04-26  Ulrich Drepper  <drepper@redhat.com>
1848         * sem_open.c (sem_open): Rewrite initialization of initsem to
1849         avoid warnings.
1851         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1852         Avoid warning by using may_alias attribute on ptrhack.
1854 2009-04-22  Ulrich Drepper  <drepper@redhat.com>
1856         [BZ #10090]
1857         * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
1858         Check policy and priority for validity.
1859         Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
1861 2009-03-15  Ulrich Drepper  <drepper@redhat.com>
1863         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1864         (__pthread_cond_timedwait): Change to use cfi directives instead of
1865         hand-coded unwind sections.
1867 2009-03-10  Ulrich Drepper  <drepper@redhat.com>
1869         * init.c (nptl_freeres): Compile only for SHARED.
1871 2009-03-09  Jakub Jelinek  <jakub@redhat.com>
1873         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
1874         FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
1875         FUTEX_BITSET_MATCH_ANY.
1877 2009-02-27  Roland McGrath  <roland@redhat.com>
1879         * init.c (__nptl_initial_report_events): Mark __attribute_used__.
1880         * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
1882 2009-02-26  Ulrich Drepper  <drepper@redhat.com>
1884         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1885         _POSIX_THREAD_ROBUST_PRIO_INHERIT and
1886         _POSIX_THREAD_ROBUST_PRIO_PROTECT.  Reset value of macros from
1887         200112L to 200809L.
1889 2009-02-25  Ulrich Drepper  <drepper@redhat.com>
1891         * sysdeps/pthread/pthread.h: The robust mutex functions are in
1892         POSIX 2008.
1894 2009-02-24  Ulrich Drepper  <drepper@redhat.com>
1896         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
1897         Unify name of include protector macro.
1899 2009-02-14  SUGIOKA Toshinobu  <sugioka@itonet.co.jp>
1901         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
1902         LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
1904 2009-01-29  Ulrich Drepper  <drepper@redhat.com>
1906         * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
1907         pointer variables.
1909         * allocatestack.c (__free_stacks): Renamed from free_stacks.
1910         (__free_stack_cache): Removed.  Change callers to call __free_stacks.
1911         * init.c (nptl_freeres): New function.
1912         (pthread_functions): Initialize ptr_freeres to nptl_freeres.
1913         * pthreadP.h: Don't declare __free_stack_cache.  Declare __free_stacks.
1914         * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
1915         variable.
1916         (pthread_cancel_init): Depend in libgcc_s_handle for decision to
1917         load DSO.  Assign last.
1918         (__unwind_freeres): New function.
1920         * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
1921         for better debugging.  No need to use stack_list_add here.
1923 2009-01-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1925         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1926         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
1927         instead of computing relative timeout.
1928         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1929         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
1931 2009-01-25  Ulrich Drepper  <drepper@redhat.com>
1933         * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
1935 2009-01-08  Ulrich Drepper  <drepper@redhat.com>
1937         * sysdeps/pthread/list.h (list_add): Initialize new element first.
1938         (list_add_tail): Removed.
1940 2009-01-07  Ulrich Drepper  <drepper@redhat.com>
1942         * (in_flight_stack): New variable.
1943         (stack_list_del): New function.  Use instead of list_del.
1944         (stack_list_add): New function.  Use instead of list_add when adding to
1945         stack_cache and stack_used lists.
1946         (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
1947         when the fork call interrupted another thread.
1949 2009-01-04  Ulrich Drepper  <drepper@redhat.com>
1951         * init.c (__pthread_initialize_minimal_internal): Optimize test
1952         FUTEX_CLOCK_REALTIME a bit.
1954 2009-01-03  Ulrich Drepper  <drepper@redhat.com>
1956         * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
1957         only passing five parameters to FUTEX_WAIT_BITSET call.
1959         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1960         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
1961         instead of computing relative timeout.
1963 2009-01-02  Ulrich Drepper  <drepper@redhat.com>
1965         * init.c (__pthread_initialize_minimal_internal): Check for
1966         FUTEX_CLOCK_REALTIME flag.
1967         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
1968         Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
1969         relative timeout.
1971         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1972         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
1973         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1974         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1975         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1976         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1978 2008-12-09  Ulrich Drepper  <drepper@redhat.com>
1980         * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
1981         loop body instead of ; to avoid gcc warnings.
1982         (pthread_cleanup_pop_restore_np): Likewise.
1983         Patch by Caolán McNamara <caolanm@redhat.com>.
1985 2008-12-09  Jakub Jelinek  <jakub@redhat.com>
1987         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
1988         fast path here, for robust/PI/PP mutexes call
1989         __pthread_mutex_lock_full.  Don't use switch, instead use a series
1990         of ifs according to their probability.
1991         (__pthread_mutex_lock_full): New function.
1992         * pthread_mutex_unlock.c: Include assert.h.
1993         (__pthread_mutex_unlock_usercnt): Handle only the
1994         fast path here, for robust/PI/PP mutexes call
1995         __pthread_mutex_unlock_full.  Don't use switch, instead use a series
1996         of ifs according to their probability.
1997         (__pthread_mutex_unlock_full): New function.
1998         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
1999         (__pthread_mutex_lock_full): Define.
2001 2008-12-08  Ulrich Drepper  <drepper@redhat.com>
2003         * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
2004         implementation.  Add necessary padding and.
2005         * descr.h (struct pthread): Increase padding for tcbhead_t to 24
2006         words.
2008 2008-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2010         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
2011         and FUTEX_WAKE_BITSET.
2013 2008-12-02  Ulrich Drepper  <drepper@redhat.com>
2015         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
2016         and FUTEX_WAKE_BITSET.
2017         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2018         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2019         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2020         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2022 2008-11-25  Roland McGrath  <roland@redhat.com>
2024         * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
2025         Subdirectories moved to ports repository as
2026         sysdeps/.../nptl subdirectories.
2028 2008-11-12  Jakub Jelinek  <jakub@redhat.com>
2030         [BZ #7008]
2031         * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
2032         of old value.
2033         * pthread_cond_init.c (__pthread_cond_init): Fix
2034         cond->__data.__nwaiters initialization.
2035         * Makefile (tests): Add tst-cond23.
2036         * tst-cond23.c: New test.
2038 2008-11-07  Jakub Jelinek  <jakub@redhat.com>
2040         * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
2041         arguments.
2042         (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
2043         arguments.
2045 2008-11-01  Ulrich Drepper  <drepper@redhat.com>
2047         [BZ #6955]
2048         * pthread_mutex_lock.c: Add support for private PI mutexes.
2049         * pthread_mutex_timedlock.c: Likewise.
2050         * pthread_mutex_trylock.c: Likewise.
2051         * pthread_mutex_unlock.c: Likewise.
2052         Patch mostly by Ben Jackson <ben@ben.com>.
2054 2008-10-31  Ulrich Drepper  <drepper@redhat.com>
2056         [BZ #6843]
2057         * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
2058         Increase stack size for helper thread.
2060 2008-10-06  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2062         * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
2063         assembly with a clobber list for access registers a0 and a1.
2065 2008-09-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2067         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
2068         to force runp->refcntr to be read from memory.
2070 2008-09-08  Richard Guenther  <rguenther@suse.de>
2072         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
2073         lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2074         lll_timedlock, lll_robust_timedlock, lll_unlock,
2075         lll_robust_unlock): Promote private to int.
2077 2008-08-15  Ulrich Drepper  <drepper@redhat.com>
2079         * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
2080         ARCH_RETRY_MMAP definitions.
2081         * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
2082         Define MAP_STACK when not defined.
2083         (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS.  Remove
2084         handling of ARCH_RETRY_MMAP.
2086 2008-07-30  Ulrich Drepper  <drepper@redhat.com>
2088         * tst-align2.c (f): Print message that f is reached.
2090 2008-04-28  Hiroki Kaminaga  <kaminaga@sm.sony.co.jp>
2092         [BZ #6740]
2093         * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
2094         definition with #ifndef __ASSUME_PRIVATE_FUTEX.
2096 2008-07-25  Ulrich Drepper  <drepper@redhat.com>
2098         * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
2099         SOCK_CLOEXEC if possible.
2101 2008-05-29  Ulrich Drepper  <drepper@redhat.com>
2103         * Makefile (tests): Add tst-rwlock2a.
2104         * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
2105         * tst-rwlock2a.c: New file.
2107 2008-06-12  Ulrich Drepper  <drepper@redhat.com>
2109         * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
2111 2008-05-17  Samuel Thibault  <samuel.thibault@ens-lyon.org>
2113         * sysdeps/pthread/pthread.h: Fix typo in comment.
2115 2008-05-28  Ulrich Drepper  <drepper@redhat.com>
2117         * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
2118         of CPU set to the kernel.
2120 2008-05-23  Paul Pluzhnikov  <ppluzhnikov@google.com>
2122         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
2123         cfi directives.
2124         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
2125         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
2126         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2127         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2128         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2129         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2131 2008-05-22  Paul Pluzhnikov  <ppluzhnikov@google.com>
2133         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
2134         cfi directives.
2135         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2136         Likewise.
2137         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2138         Likewise.
2139         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2140         Likewise.
2142 2008-05-26  Ulrich Drepper  <drepper@redhat.com>
2144         * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
2146 2008-05-20  Jakub Jelinek  <jakub@redhat.com>
2148         David S. Miller  <davem@davemloft.net>
2150         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
2152 2008-05-10  Ulrich Drepper  <drepper@redhat.com>
2154         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
2155         __pshared correctly.
2156         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2157         Likewise.
2158         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2159         Likewise.
2160         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
2161         Likewise.
2162         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
2163         Likewise.
2164         Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
2166 2008-04-14  David S. Miller  <davem@davemloft.net>
2168         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2169         (__old_sem_wait): Fix argument to lll_futex_wait().
2171 2007-11-26  Daniel Jacobowitz  <dan@codesourcery.com>
2173         * pthread_create.c: Require pthread_mutex_trylock and
2174         pthread_key_delete for libgcc.
2176 2008-04-08  Jakub Jelinek  <jakub@redhat.com>
2178         [BZ #6020]
2179         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
2180         (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
2181         Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
2183 2008-03-27  Ulrich Drepper  <drepper@redhat.com>
2185         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
2186         <linux/limits.h> has defined it.
2187         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2188         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2189         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2190         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2192 2008-03-18  Jakub Jelinek  <jakub@redhat.com>
2194         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
2195         of ASSEMBLER.
2196         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2197         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
2199 2008-03-14  Ulrich Drepper  <drepper@redhat.com>
2201         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
2202         HAVE_DL_DISCOVER_OSVERSION.
2203         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2204         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
2206 2008-03-07  Ulrich Drepper  <drepper@redhat.com>
2208         [BZ #5778]
2209         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
2210         _POSIX_CHOWN_RESTRICTED value to zero.
2212 2008-01-31  Roland McGrath  <roland@redhat.com>
2214         * Makefile (omit-deps): Variable removed.
2216 2008-01-30  Ulrich Drepper  <drepper@redhat.com>
2218         * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
2219         unnecessary addr32 prefix.
2221 2008-01-29  Roland McGrath  <roland@redhat.com>
2223         * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
2225 2008-01-22  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2227         * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
2229 2008-01-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2231         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
2232         a scratch register.
2233         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
2234         (__lll_lock_wait_private): Fix typo.
2235         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
2236         (pthread_barrier_wait): Likewise.  Adjust XADD use.
2237         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
2238         Adjust XADD use.
2239         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
2240         (pthread_rwlock_timedrdlock): Return correct return value.
2241         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
2242         (pthread_rwlock_timedwrlock): Likewise.
2244 2008-01-15  Ulrich Drepper  <drepper@redhat.com>
2246         * tst-eintr2.c (do_test): make sure that if mutex_lock in main
2247         thread returns the program exits with an error code.
2249 2008-01-10  Ulrich Drepper  <drepper@redhat.com>
2251         * pthread-errnos.sym: Add EOVERFLOW.
2252         * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
2253         * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
2254         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2255         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2257 2007-12-14  Ulrich Drepper  <drepper@redhat.com>
2259         * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
2260         parameter.  Passed it as permission to mmap.
2261         * allocatestack.c (allocate_stack): Pass prot as second parameter
2262         to ARCH_RETRY_MMAP.
2264 2007-12-12  Ulrich Drepper  <drepper@redhat.com>
2266         * tst-basic7.c: Allocate memory for the stack.
2268         [BZ #5465]
2269         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
2270         (__pthread_cond_timedwait): Don't use VDSO.
2271         Patch by Michal Januszewski.
2273 2007-12-07  Ulrich Drepper  <drepper@redhat.com>
2275         [BZ #5455]
2276         * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
2277         Allow label before pthread_cleanup_pop.
2278         (pthread_cleanup_pop_restore_np): Likewise.
2280 2007-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2282         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
2283         Store 2 before returning ETIMEDOUT.
2285 2007-11-23  Ulrich Drepper  <drepper@redhat.com>
2287         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
2288         Store 2 before returning ETIMEDOUT.
2289         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
2290         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
2291         (__lll_lock_wait_private): Optimize.
2292         (__lll_lock_wait): Likewise.
2294 2007-11-20  Jakub Jelinek  <jakub@redhat.com>
2296         * sysdeps/pthread/pthread.h (pthread_cleanup_push,
2297         pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
2298         g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
2300 2007-11-08  Ulrich Drepper  <drepper@redhat.com>
2302         [BZ #5240]
2303         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
2304         If we time out, try one last time to lock the futex to avoid
2305         losing a wakeup signal.
2306         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2307         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2309         [BZ #5245]
2310         * sysdeps/pthread/createthread.c (do_clone): Translate clone error
2311         if necessary.
2313 2007-11-07  Ulrich Drepper  <drepper@redhat.com>
2315         [BZ #5245]
2316         * allocatestack.c (allocate_stack): Change ENOMEM error in case
2317         mmap failed to EAGAIN.
2318         * Makefile (tests): Add tst-basic7.
2319         * tst-basic7.c: New file.
2321 2007-11-05  Ulrich Drepper  <drepper@redhat.com>
2323         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
2324         Use __linkin_atfork.
2326 2007-11-03  Mike Frysinger  <vapier@gentoo.org>
2328         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
2329         missing line continuations.
2330         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
2331         LOAD_FUTEX_WAKE): Likewise.  Also add missing 3rd parameter.
2333 2007-10-28  Ulrich Drepper  <drepper@redhat.com>
2335         [BZ #5220]
2336         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
2337         __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
2338         (struct timer): Add next element.
2339         * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
2340         enqueue timer structure into __active_timer_sigev_thread list.
2341         * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
2342         remove timer struct from __active_timer_sigev_thread.
2343         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2344         Before using timer structure make sure it is still on the
2345         __active_timer_sigev_thread list.  Keep lock until done.
2346         Define __active_timer_sigev_thread and
2347         __active_timer_sigev_thread_lock.
2349 2007-10-27  Ulrich Drepper  <drepper@redhat.com>
2351         * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
2352         Redefine thread_atfork for use of ATFORK_MEM.
2353         * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
2354         * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
2355         function.
2356         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2357         Use atomic operation when removing first element of list.
2359 2007-10-17  Jakub Jelinek  <jakub@redhat.com>
2361         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
2362         routine instead of an alias to __new_sem_post.
2364 2007-10-15  Jakub Jelinek  <jakub@redhat.com>
2366         * init.c (__pthread_initialize_minimal): Initialize word to appease
2367         valgrind.
2369 2007-10-10  Jakub Jelinek  <jakub@redhat.com>
2371         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
2372         libc.so just clear NAME.
2373         (__libc_rwlock_fini): Nop inside of libc.so.
2374         * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
2375         all zeros.
2377 2007-09-02  Ulrich Drepper  <drepper@redhat.com>
2379         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2380         (__pthread_cond_wait): Fix unlocking of internal lock after mutex
2381         unlocking failed.
2382         Patch by Luca Barbieri <luca.barbieri@gmail.com>.
2384 2007-08-21  Ulrich Drepper  <drepper@redhat.com>
2386         [BZ #4938]
2387         * allocatestack.c (__reclaim_stacks): Clear the TSD in the
2388         reclaimed stack if necessary.
2389         * Makefile (tests): Add tst-tsd6.
2390         * tst-tsd6.c: New file.
2392 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
2394         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
2395         Add private argument.
2397 2007-08-20  Ulrich Drepper  <drepper@redhat.com>
2399         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2400         (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
2402 2007-08-16  Jakub Jelinek  <jakub@redhat.com>
2404         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
2405         (__lll_robust_timedlock): Pass private as last argument to
2406         __lll_robust_timedlock_wait.
2407         (__lll_unlock): Fix a pasto.
2409 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
2411         * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
2412         sparc_old_sem): New structs.
2413         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2414         (__sem_wait_cleanup): New function.
2415         (__new_sem_wait): Use sparc_new_sem structure.  Bump and afterwards
2416         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
2417         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2418         lll_futex_wait.
2419         (__old_sem_wait): New function.
2420         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
2421         nptl/sysdeps/unix/sysv/linux/sparc version.
2422         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
2423         Likewise.
2424         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
2425         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
2426         (__new_sem_trywait): Use sparc_old_sem structure.
2427         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
2428         (sem_timedwait): Use sparc_new_sem structure.  Bump and afterwards
2429         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
2430         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2431         lll_futex_timed_wait.
2432         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
2433         Use sparc_new_sem structure.  Only wake if nwaiters > 0.  Pass
2434         isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2435         lll_futex_wake.
2436         (__old_sem_post): New function.
2437         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
2438         * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
2439         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
2440         * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
2441         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
2442         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
2444 2007-08-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2446         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2447         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2448         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2449         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2450         * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
2451         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2452         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2453         Use FUTEX_WAKE_OP.
2454         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2455         kernel-features.h and tcb-offsets.h.
2456         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2457         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2458         process private.
2459         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2460         tcb-offsets.h.
2461         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
2462         to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2463         process private.
2464         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
2465         __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2466         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
2467         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2468         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2469         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2470         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2472 2007-08-14  Jakub Jelinek  <jakub@redhat.com>
2474         * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
2475         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
2476         (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
2477         lll_futex_timed_wait.
2479         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
2480         __lll_robust_unlock): Rewrite as macros instead of inline functions.
2481         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
2482         __lll_robust_unlock, __lll_wait_tid): Likewise.
2484 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
2486         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
2487         Fix a pasto.
2488         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
2489         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2490         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2491         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2492         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2493         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2494         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2495         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
2496         kernel-features.h.
2497         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2498         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2499         process private.  Switch DW_CFA_advance_loc1 and some
2500         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2501         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2502         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
2503         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2504         process private.  Switch DW_CFA_advance_loc{1,2} and some
2505         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2506         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
2507         #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2508         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2509         Likewise.
2510         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2511         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2512         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2513         Likewise.
2514         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2515         (__pthread_cond_broadcast): Compare %r8 instead of
2516         dep_mutex-cond_*(%rdi) with $-1.
2517         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2518         (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
2519         of oring.
2521 2007-08-13  Ulrich Drepper  <drepper@redhat.com>
2523         * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
2525 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
2527         * allocatestack.c: Include kernel-features.h.
2528         * pthread_create.c: Likewise.
2529         * pthread_mutex_init.c: Likewise.
2530         * init.c: Likewise.
2531         * pthread_cond_timedwait.c: Likewise.
2532         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2533         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2534         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2535         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2536         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2537         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2538         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2539         Likewise.
2540         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2541         Likewise.
2542         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2543         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2544         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2545         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2547 2007-08-12  Jakub Jelinek  <jakub@redhat.com>
2549         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2550         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2551         byte elements.  One of them is the new __shared element.
2552         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2553         adjust names of other padding elements.
2554         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2555         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2556         byte elements.  One of them is the new __shared element.
2557         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2558         adjust names of other padding elements.
2559         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
2560         Renamed __pad1 element to __shared, adjust names of other padding
2561         elements.
2562         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2563         (pthread_rwlock_t): Likewise.
2564         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
2565         typo.
2567 2007-08-09  Anton Blanchard  <anton@samba.org>
2569         * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
2571 2007-08-12  Ulrich Drepper  <drepper@redhat.com>
2573         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
2574         <kernel-features.h>.
2575         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2577 2007-08-11  Ulrich Drepper  <drepper@redhat.com>
2579         * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
2580         * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
2581         dealing with robust mutexes.
2582         * pthread_mutex_timedlock.c: Likewise.
2583         * pthread_mutex_trylock.c: Likewise.
2584         * pthread_mutex_unlock.c: Likewise.
2585         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2587 2007-08-06  Jakub Jelinek  <jakub@redhat.com>
2589         * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
2590         (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
2591         (PTHREAD_MUTEX_PSHARED): Define.
2592         * pthread_mutex_init.c (__pthread_mutex_init): Set
2593         PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
2594         mutexes.
2595         * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
2596         instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
2597         as second argument to lll_lock.
2598         (LLL_MUTEX_TRYLOCK): Take mutex as argument
2599         instead of its __data.__lock field.
2600         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
2601         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
2602         to lll_robust_lock.
2603         (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
2604         LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
2605         instead of mutex->__data.__kind directly, pass
2606         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
2607         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
2608         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
2609         directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
2610         (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
2611         to lll_timedlock, lll_robust_timedlock, lll_unlock and
2612         lll_futex_timed_wait.  Use PTHREAD_MUTEX_TYPE (mutex) instead
2613         of mutex->__data.__kind directly.
2614         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
2615         PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
2616         lll_robust_timedlock, lll_unlock and lll_futex_timed_wait.  Use
2617         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
2618         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
2619         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
2620         and lll_futex_wake.
2621         * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
2622         PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
2623         Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
2624         directly.
2625         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
2626         Take mutex as argument instead of its __data.__lock field, pass
2627         PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
2628         (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
2629         __data.__lock field.
2630         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
2631         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
2632         to lll_robust_cond_lock.
2633         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
2634         variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
2635         lll_futex_wake.  Don't use lll_futex_requeue if dependent mutex
2636         has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
2637         * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
2638         variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
2639         lll_futex_wait.
2640         * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
2641         variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
2642         lll_futex_wake.
2643         * pthread_cond_timedwait.c (__pthread_cond_wait): Add
2644         pshared variable, pass it to lll_lock, lll_unlock,
2645         lll_futex_timedwait and lll_futex_wake.
2646         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
2647         pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
2648         and lll_futex_wake.
2649         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
2650         lll_futex_wake_unlock): Add private argument, use __lll_private_flag
2651         macro.
2652         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
2653         lll_futex_wake_unlock): Likewise.
2654         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
2655         Likewise.
2656         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
2657         lll_futex_wake_unlock): Likewise.
2658         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
2659         Likewise.
2660         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
2661         lll_futex_wake_unlock): Likewise.
2662         (lll_futex_wake): Fix a typo.
2663         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
2664         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2665         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2666         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2667         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2668         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2669         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2670         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2671         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2672         (__pthread_cond_timedwait): Likewise.
2673         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
2674         (__condvar_cleanup, __pthread_cond_wait): Likewise.
2676 2007-08-05  Jakub Jelinek  <jakub@redhat.com>
2678         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
2679         Don't use CGOTSETUP and CGOTRESTORE macros.
2680         (CGOTSETUP, CGOTRESTORE): Remove.
2681         <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
2682         @local symbol.
2684 2007-08-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2686         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
2687         definitions for private futexes.
2688         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
2689         kernel-features.h and lowlevellock.h.  Use private futexes if
2690         they are available.
2691         (__lll_lock_wait_private, __lll_unlock_wake_private): New.
2692         (__lll_mutex_lock_wait): Rename to
2693         (__lll_lock_wait): ... this.  Don't compile in for libc.so.
2694         (__lll_mutex_timedlock_wait): Rename to ...
2695         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.
2696         Don't compile in for libc.so.
2697         (__lll_mutex_unlock_wake): Rename to ...
2698         (__lll_unlock_wake): ... this.  Don't compile in for libc.so.
2699         (__lll_timedwait_tid): Use __NR_gettimeofday.
2700         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
2701         the header from assembler.  Renamed all lll_mutex_* resp.
2702         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
2703         Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
2704         (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
2705         Define.
2706         (__lll_lock_wait_private): Add prototype.
2707         (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
2708         __lll_robust_timedlock_wait, __lll_unlock_wake_private,
2709         __lll_unlock_wake): Likewise.
2710         (lll_lock): Add private argument.  Call __lll_lock_wait_private
2711         if private is constant LLL_PRIVATE.
2712         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2713         lll_timedlock, lll_robust_timedlock): Add private argument.
2714         (lll_unlock): Add private argument.  Call __lll_unlock_wake_private
2715         if private is constant LLL_PRIVATE.
2716         (lll_robust_unlock, lll_robust_dead): Add private argument.
2717         (lll_lock_t): Remove.
2718         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2719         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2720         lll_cond_wake, lll_cond_broadcast): Remove.
2721         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
2722         kernel-features.h and lowlevellock.h.
2723         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2724         (LOAD_FUTEX_WAIT): Define.
2725         (__lll_robust_mutex_lock_wait): Rename to ...
2726         (__lll_robust_lock_wait): ... this.  Add private argument.
2727         Use LOAD_FUTEX_WAIT macro.
2728         (__lll_robust_mutex_timedlock_wait): Rename to ...
2729         (__lll_robust_timedlock_wait): ... this.    Add private argument.
2730         Use __NR_gettimeofday.  Use LOAD_FUTEX_WAIT macro.
2731         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
2732         lowlevellock.h.
2733         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2734         (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
2735         __lll_mutex_{lock,unlock}_*.
2736         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
2737         lowlevellock.h and pthread-errnos.h.
2738         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2739         FUTEX_CMP_REQUEUE, EINVAL): Remove.
2740         (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
2741         __lll_mutex_{lock,unlock}_*.
2742         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
2743         lowlevellock.h and pthread-errnos.h.
2744         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
2745         (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
2746         __lll_mutex_{lock,unlock}_*.
2747         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2748         lowlevellock.h.
2749         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
2750         (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
2751         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
2752         (__condvar_tw_cleanup): Likewise.
2753         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2754         lowlevellock.h.
2755         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2756         (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
2757         __lll_mutex_{lock,unlock}_*.
2758         ( __condvar_w_cleanup): Likewise.
2759         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
2760         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2761         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
2762         lowlevellock.h.
2763         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2764         (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
2765         __lll_mutex_{lock,unlock}_*.
2766         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
2767         lowlevellock.h.
2768         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2769         FUTEX_PRIVATE_FLAG): Remove.
2770         (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
2771         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
2772         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
2773         lowlevellock.h.
2774         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2775         FUTEX_PRIVATE_FLAG): Remove.
2776         (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
2777         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
2778         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
2779         lowlevellock.h.
2780         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2781         (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
2782         __lll_mutex_{lock,unlock}_*.
2783         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
2784         lowlevellock.h.
2785         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2786         (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
2787         __lll_mutex_{lock,unlock}_*.
2788         * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
2789         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2790         (__new_sem_post): Use standard initial exec code sequences.
2791         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
2792         lowlevellock.h.
2793         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2794         FUTEX_PRIVATE_FLAG): Remove.
2795         (sem_timedwait): Use __NR_gettimeofday.  Use standard initial
2796         exec code sequences.
2797         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
2798         (__new_sem_trywait): Use standard initial exec code sequences.
2799         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
2800         (__new_sem_wait): Use standard initial exec code sequences.
2802 2007-07-31  Anton Blanchard  <anton@samba.org>
2804         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
2805         Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
2806         atomic_full_barrier.
2808 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
2810         * allocatestack.c (stack_cache_lock): Change type to int.
2811         (get_cached_stack, allocate_stack, __deallocate_stack,
2812         __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
2813         __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
2814         as second argument to lll_lock and lll_unlock macros on
2815         stack_cache_lock.
2816         * pthread_create.c (__find_in_stack_list): Likewise.
2817         (start_thread): Similarly with pd->lock.  Use lll_robust_dead
2818         macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
2819         as second argument.
2820         * descr.h (struct pthread): Change lock and setxid_futex field
2821         type to int.
2822         * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
2823         LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
2824         * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
2825         * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
2826         Likewise.
2827         * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
2828         * pthread_cond_init.c (__pthread_cond_init): Likewise.
2829         * pthreadP.h (__attr_list_lock): Change type to int.
2830         * pthread_attr_init.c (__attr_list_lock): Likewise.
2831         * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
2832         ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
2833         lll_{,un}lock.
2834         * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
2835         also for lll_futex_{wake,wait}.
2836         * pthread_barrier_init.c (pthread_barrier_init): Make iattr
2837         a pointer to const.
2838         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
2839         LLL_SHARED as second argument to lll_{,un}lock.
2840         * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
2841         * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
2842         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
2843         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
2844         Likewise.
2845         * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
2846         as second argument to lll_{,un}lock macros on pd->lock.
2847         * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
2848         * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
2849         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2850         * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
2851         Likewise.
2852         * sysdeps/pthread/createthread.c (do_clone, create_thread):
2853         Likewise.
2854         * pthread_once.c (once_lock): Change type to int.
2855         (__pthread_once): Pass LLL_PRIVATE as second argument to
2856         lll_{,un}lock macros on once_lock.
2857         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
2858         lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
2859         rwlock->__data.__shared as second argument to them and similarly
2860         for lll_futex_w*.
2861         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
2862         Likewise.
2863         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
2864         Likewise.
2865         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
2866         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
2867         * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
2868         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
2869         * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
2870         to lll_{,un}lock macros on __sem_mappings_lock.
2871         * sem_open.c (check_add_mapping): Likewise.
2872         (__sem_mappings_lock): Change type to int.
2873         * semaphoreP.h (__sem_mappings_lock): Likewise.
2874         * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
2875         LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
2876         instead of lll_*mutex_*, pass LLL_SHARED as last
2877         argument.
2878         (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
2879         pass LLL_SHARED as last argument.
2880         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
2881         LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
2882         lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
2883         pass LLL_SHARED as last argument.
2884         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2885         lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
2886         LLL_SHARED as last argument.
2887         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
2888         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
2889         Similarly.
2890         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
2891         __libc_lock_lock_recursive, __libc_lock_unlock,
2892         __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
2893         argument to lll_{,un}lock.
2894         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
2895         _IO_lock_unlock): Likewise.
2896         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
2897         compound literal.
2898         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2899         Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
2900         __fork_lock.
2901         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
2902         free_mem): Likewise.
2903         (__fork_lock): Change type to int.
2904         * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
2905         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
2906         isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
2907         lll_futex_wake.
2908         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
2909         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
2910         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
2911         New function.
2912         (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
2913         pass it through to lll_futex_*wait, only compile in when
2914         IS_IN_libpthread.
2915         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2916         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
2917         argument and pass it through to lll_futex_*wait.
2918         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
2919         lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
2920         lll_robust_*.  Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
2921         inline functions to __lll_* resp. __lll_robust_*.
2922         (LLL_MUTEX_LOCK_INITIALIZER): Remove.
2923         (lll_mutex_dead): Add private argument.
2924         (__lll_lock_wait_private): New prototype.
2925         (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
2926         __lll_robust_lock_timedwait): Add private argument to prototypes.
2927         (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
2928         call __lll_lock_wait_private, otherwise pass private to
2929         __lll_lock_wait.
2930         (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
2931         __lll_robust_timedlock): Add private argument, pass it to
2932         __lll_*wait functions.
2933         (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
2934         call __lll_unlock_wake_private, otherwise pass private to
2935         __lll_unlock_wake.
2936         (__lll_robust_unlock): Add private argument, pass it to
2937         __lll_robust_unlock_wake.
2938         (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
2939         lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
2940         argument, pass it through to __lll_* inline function.
2941         (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
2942         (lll_lock_t): Remove.
2943         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2944         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2945         lll_cond_wake, lll_cond_broadcast): Remove.
2946         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2947         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2948         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2949         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2950         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
2951         the header from assembler.  Renamed all lll_mutex_* resp.
2952         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
2953         (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
2954         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2955         (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
2956         LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
2957         (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
2958         __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
2959         Remove prototype.
2960         (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
2961         (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
2962         rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
2963         (lll_trylock): Likewise, use __lll_trylock_asm, pass
2964         MULTIPLE_THREADS_OFFSET as another asm operand.
2965         (lll_lock): Add private argument, use __lll_lock_asm_start, pass
2966         MULTIPLE_THREADS_OFFSET as last asm operand, call
2967         __lll_lock_wait_private if private is constant LLL_PRIVATE,
2968         otherwise pass private as another argument to __lll_lock_wait.
2969         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2970         lll_timedlock, lll_robust_timedlock): Add private argument, pass
2971         private as another argument to __lll_*lock_wait call.
2972         (lll_unlock): Add private argument, use __lll_unlock_asm, pass
2973         MULTIPLE_THREADS_OFFSET as another asm operand, call
2974         __lll_unlock_wake_private if private is constant LLL_PRIVATE,
2975         otherwise pass private as another argument to __lll_unlock_wake.
2976         (lll_robust_unlock): Add private argument, pass private as another
2977         argument to __lll_unlock_wake.
2978         (lll_robust_dead): Add private argument, use __lll_private_flag
2979         macro.
2980         (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
2981         LLL_MUTEX_LOCK_INITIALIZER.
2982         (lll_lock_t): Remove.
2983         (LLL_LOCK_INITIALIZER_WAITERS): Define.
2984         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2985         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2986         lll_cond_wake, lll_cond_broadcast): Remove.
2987         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2988         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
2989         2007-05-2{3,9} changes.
2990         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
2991         kernel-features.h and lowlevellock.h.
2992         (LOAD_PRIVATE_FUTEX_WAIT): Define.
2993         (LOAD_FUTEX_WAIT): Rewritten.
2994         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
2995         define.
2996         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
2997         (__lll_mutex_lock_wait): Rename to ...
2998         (__lll_lock_wait): ... this.  Take futex addr from %edx instead of
2999         %ecx, %ecx is now private argument.  Don't compile in for libc.so.
3000         (__lll_mutex_timedlock_wait): Rename to ...
3001         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.  %esi
3002         contains private argument.  Don't compile in for libc.so.
3003         (__lll_mutex_unlock_wake): Rename to ...
3004         (__lll_unlock_wake): ... this.  %ecx contains private argument.
3005         Don't compile in for libc.so.
3006         (__lll_timedwait_tid): Use __NR_gettimeofday.
3007         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
3008         kernel-features.h and lowlevellock.h.
3009         (LOAD_FUTEX_WAIT): Define.
3010         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
3011         define.
3012         (__lll_robust_mutex_lock_wait): Rename to ...
3013         (__lll_robust_lock_wait): ... this.  Futex addr is now in %edx
3014         argument, %ecx argument contains private.  Use LOAD_FUTEX_WAIT
3015         macro.
3016         (__lll_robust_mutex_timedlock_wait): Rename to ...
3017         (__lll_robust_timedlock_wait): ... this.  Use __NR_gettimeofday.
3018         %esi argument contains private, use LOAD_FUTEX_WAIT macro.
3019         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
3020         lowlevellock.h.
3021         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3022         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
3023         PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
3024         __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
3025         to __lll_lock_wait in %edx.
3026         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
3027         Include lowlevellock.h and pthread-errnos.h.
3028         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3029         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
3030         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
3031         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3032         pass LLL_SHARED in %ecx to both __lll_lock_wait and
3033         __lll_unlock_wake.
3034         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
3035         Include lowlevellock.h and pthread-errnos.h.
3036         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
3037         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
3038         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
3039         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3040         pass LLL_SHARED in %ecx to both __lll_lock_wait and
3041         __lll_unlock_wake.
3042         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
3043         Include lowlevellock.h.
3044         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3045         Don't define.
3046         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
3047         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3048         pass LLL_SHARED in %ecx to both __lll_lock_wait and
3049         __lll_unlock_wake.  Use __NR_gettimeofday.
3050         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
3051         Include lowlevellock.h.
3052         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3053         (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
3054         to __lll_*, pass cond_lock address in %edx rather than %ecx to
3055         __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
3056         and __lll_unlock_wake.
3057         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
3058         Include lowlevellock.h.
3059         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3060         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
3061         MUTEX(%ebx) address in %edx rather than %ecx to
3062         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
3063         and __lll_unlock_wake.  Move return value from %ecx to %edx
3064         register.
3065         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3066         Include lowlevellock.h.
3067         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3068         Don't define.
3069         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3070         MUTEX(%ebp) address in %edx rather than %ecx to
3071         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
3072         and __lll_unlock_wake.  Move return value from %ecx to %edx
3073         register.  Use __NR_gettimeofday.
3074         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3075         Include lowlevellock.h.
3076         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3077         Don't define.
3078         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3079         MUTEX(%ebp) address in %edx rather than %ecx to
3080         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
3081         and __lll_unlock_wake.  Move return value from %ecx to %edx
3082         register.  Use __NR_gettimeofday.
3083         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
3084         Include lowlevellock.h.
3085         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3086         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
3087         MUTEX(%edi) address in %edx rather than %ecx to
3088         __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
3089         and __lll_unlock_wake.
3090         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
3091         Include lowlevellock.h.
3092         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3093         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3094         MUTEX(%ebx) address in %edx rather than %ecx to
3095         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
3096         and __lll_unlock_wake.  Move return value from %ecx to %edx
3097         register.
3098         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
3099         lowlevellock.h.
3100         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
3101         define.
3102         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
3103         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
3104         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
3105         lowlevellock.h.
3106         (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
3107         (sem_timedwait): Use __NR_gettimeofday.
3108         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
3109         lowlevellock.h.
3110         (LOCK): Don't define.
3111         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
3112         lowlevellock.h.
3113         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3114         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
3115         are waiters.
3116         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
3117         2007-05-2{3,9} changes.
3118         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
3119         kernel-features.h and lowlevellock.h.
3120         (LOAD_PRIVATE_FUTEX_WAIT): Define.
3121         (LOAD_FUTEX_WAIT): Rewritten.
3122         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
3123         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
3124         (__lll_mutex_lock_wait): Rename to ...
3125         (__lll_lock_wait): ... this.  %esi is now private argument.
3126         Don't compile in for libc.so.
3127         (__lll_mutex_timedlock_wait): Rename to ...
3128         (__lll_timedlock_wait): ... this.  %esi contains private argument.
3129         Don't compile in for libc.so.
3130         (__lll_mutex_unlock_wake): Rename to ...
3131         (__lll_unlock_wake): ... this.  %esi contains private argument.
3132         Don't compile in for libc.so.
3133         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
3134         kernel-features.h and lowlevellock.h.
3135         (LOAD_FUTEX_WAIT): Define.
3136         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
3137         (__lll_robust_mutex_lock_wait): Rename to ...
3138         (__lll_robust_lock_wait): ... this.  %esi argument contains private.
3139         Use LOAD_FUTEX_WAIT macro.
3140         (__lll_robust_mutex_timedlock_wait): Rename to ...
3141         (__lll_robust_timedlock_wait): ... this. %esi argument contains
3142         private, use LOAD_FUTEX_WAIT macro.
3143         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
3144         lowlevellock.h.
3145         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3146         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
3147         PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
3148         __lll_lock_wait and __lll_unlock_wake.
3149         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
3150         Include lowlevellock.h and pthread-errnos.h.
3151         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3152         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
3153         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
3154         pass LLL_SHARED in %esi to both __lll_lock_wait and
3155         __lll_unlock_wake.
3156         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
3157         Include lowlevellock.h and pthread-errnos.h.
3158         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
3159         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
3160         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
3161         pass LLL_SHARED in %esi to both __lll_lock_wait and
3162         __lll_unlock_wake.
3163         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
3164         Include lowlevellock.h.
3165         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3166         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
3167         pass LLL_SHARED in %esi to both __lll_lock_wait and
3168         __lll_unlock_wake.
3169         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
3170         Include lowlevellock.h.
3171         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3172         (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
3173         to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
3174         and __lll_unlock_wake.
3175         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
3176         Include lowlevellock.h.
3177         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3178         Don't define.
3179         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
3180         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3181         and __lll_unlock_wake.
3182         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3183         Include lowlevellock.h.
3184         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3185         Don't define.
3186         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3187         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3188         and __lll_unlock_wake.
3189         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3190         Include lowlevellock.h.
3191         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3192         Don't define.
3193         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3194         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3195         and __lll_unlock_wake.
3196         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
3197         Include lowlevellock.h.
3198         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3199         Don't define.
3200         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
3201         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3202         and __lll_unlock_wake.
3203         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
3204         Include lowlevellock.h.
3205         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3206         Don't define.
3207         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3208         pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
3209         and __lll_unlock_wake.
3210         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
3211         lowlevellock.h.
3212         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
3213         define.
3214         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
3215         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
3216         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
3217         lowlevellock.h.
3218         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3219         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
3220         lowlevellock.h.
3221         (LOCK): Don't define.
3222         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
3223         lowlevellock.h.
3224         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3225         * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
3226         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
3227         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
3228         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
3229         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
3230         (__lll_lock_wait_private): New function.
3231         (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
3232         it to lll_futex_*wait.  Don't compile in for libc.so.
3233         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
3234         Remove.
3235         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
3236         (struct sparc_pthread_barrier): Remove.
3237         (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
3238         struct sparc_pthread_barrier.  Pass
3239         ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
3240         and lll_futex_wait macros.
3241         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3242         Remove.
3243         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3244         Include sparc pthread_barrier_wait.c instead of generic one.
3246 2007-07-30  Jakub Jelinek  <jakub@redhat.com>
3248         * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
3250         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
3251         (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
3252         %ecx.
3253         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
3254         (pthread_rwlock_timedwrlock): Likewise.
3255         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
3256         (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
3258 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
3260         * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
3262 2007-07-26  Jakub Jelinek  <jakub@redhat.com>
3264         * tst-locale2.c (useless): Add return statement.
3266 2007-07-24  Jakub Jelinek  <jakub@redhat.com>
3268         * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
3269         lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
3270         * pthread_create.c (start_thread): Likewise.
3271         * init.c (sighandler_setxid): Likewise.
3272         * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3273         * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3274         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3275         * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3276         * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3277         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3278         * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3279         * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3280         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
3281         Likewise.
3282         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
3283         Likewise.
3284         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
3285         Likewise.
3286         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
3287         __rtld_notify): Likewise.
3288         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
3289         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
3290         __pthread_once): Likewise.
3291         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
3292         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3293         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3294         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3295         (lll_futex_wait): Add private argument, define as wrapper around
3296         lll_futex_timed_wait.
3297         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3298         use __lll_private_flag macro.
3299         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3300         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3301         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
3302         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3303         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3304         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3305         (lll_futex_wait): Add private argument, define as wrapper around
3306         lll_futex_timed_wait.
3307         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3308         use __lll_private_flag macro.
3309         (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
3310         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3311         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
3312         Define.
3313         (lll_futex_timed_wait, lll_futex_wake): Use it.
3314         (lll_private_futex_wait, lll_private_futex_timed_wait,
3315         lll_private_futex_wake): Removed.
3316         * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
3317         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3318         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3319         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3320         (lll_futex_wait): Add private argument, define as wrapper around
3321         lll_futex_timed_wait.
3322         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3323         use __lll_private_flag macro.
3324         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3325         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3326         to lll_futex_*.
3327         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3328         (lll_private_futex_wait, lll_private_futex_timed_wait,
3329         lll_private_futex_wake): Removed.
3330         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
3331         Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
3332         (lll_private_futex_wait, lll_private_futex_timed_wait,
3333         lll_private_futex_wake): Removed.
3334         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
3335         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3336         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3337         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3338         (lll_futex_wait): Add private argument, define as wrapper around
3339         lll_futex_timed_wait.
3340         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3341         use __lll_private_flag macro.
3342         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3343         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3344         to lll_futex_*.
3345         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
3346         Define.
3347         (lll_futex_timed_wait, lll_futex_wake): Use it.
3348         (lll_private_futex_wait, lll_private_futex_timed_wait,
3349         lll_private_futex_wake): Removed.
3351 2007-07-27  Jakub Jelinek  <jakub@redhat.com>
3353         * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
3354         of the structure for sparc32.
3356 2007-07-26  Aurelien Jarno  <aurelien@aurel32.net>
3358         * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
3360 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
3362         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3363         code used when private futexes are assumed.
3364         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3365         Likewise.
3367 2007-07-23  Jakub Jelinek  <jakub@redhat.com>
3369         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3370         (__lll_private_flag): Define.
3371         (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
3372         (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
3373         __lll_private_flag.
3374         (lll_private_futex_wait, lll_private_futex_timedwait,
3375         lll_private_futex_wake): Define as wrapper around non-_private
3376         macros.
3377         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3378         (__lll_private_flag): Define.
3379         (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
3380         (lll_private_futex_wait, lll_private_futex_timedwait,
3381         lll_private_futex_wake): Define as wrapper around non-_private
3382         macros.
3384 2007-07-10  Steven Munroe  <sjmunroe@us.ibm.com>
3386         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
3387         parameter to lll_futex_wait call.
3388         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
3390         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3391         Replace lll_futex_wait with lll_private_futex_wait.
3392         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3393         Add LLL_SHARED parameter to lll_futex_wake().
3395         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
3396         LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
3397         lll_private_futex_wake.
3398         (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
3399         bit from private parm before syscall.
3400         (lll_futex_timed_wait): Likewise.
3401         (lll_futex_wake): Likewise.
3402         (lll_futex_wake_unlock): Likewise.
3403         (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
3404         (lll_robust_mutex_unlock): Likewise.
3405         (lll_mutex_unlock_force): Likewise.
3406         (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
3408 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
3410         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3411         compilation when unconditionally using private futexes.
3412         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3413         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3414         Likewise.
3415         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3416         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3418 2007-07-17  Jakub Jelinek  <jakub@redhat.com>
3420         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
3421         Define.
3423 2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3425         * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
3426         kernel-features.h.
3428 2007-05-16  Roland McGrath  <roland@redhat.com>
3430         * init.c (__nptl_initial_report_events): New variable.
3431         (__pthread_initialize_minimal_internal): Initialize pd->report_events
3432         to that.
3434 2007-06-22  Jakub Jelinek  <jakub@redhat.com>
3436         * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
3437         cpusetsize if pthread_getaffinity_np failed with ENOSYS.
3439 2007-06-19  Ulrich Drepper  <drepper@redhat.com>
3441         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
3442         implementation.
3444 2007-06-18  Ulrich Drepper  <drepper@redhat.com>
3446         * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
3447         * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
3448         * pthread_mutex_timedlock.c: Likewise.
3449         * pthread_mutex_trylock.c: Likewise.
3450         * pthread_mutex_unlock.c: Likewise.
3452 2007-06-17  Andreas Schwab  <schwab@suse.de>
3454         * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
3455         sections.
3457 2007-06-17  Ulrich Drepper  <drepper@redhat.com>
3459         * allocatestack.c (allocate_stack): Make code compile if
3460         __ASSUME_PRIVATE_FUTEX is set.
3462 2007-06-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3464         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
3465         (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
3466         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
3467         (__pthread_rwlock_wrlock): Likewise.
3468         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
3469         (pthread_rwlock_timedrdlock): Likewise.
3470         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
3471         (pthread_rwlock_timedwrlock): Likewise.
3472         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
3473         (__pthread_rwlock_unlock): Likewise.
3475 2007-06-10  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3477         * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
3478         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
3479         Split __flags into __flags, __shared, __pad1 and __pad2.
3480         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
3481         futexes if they are available.
3482         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
3483         in libc-lowlevellock.S allow using private futexes.
3484         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
3485         FUTEX_PRIVATE_FLAG.  Add additional parameter to lll_futex_wait,
3486         lll_futex_timed_wait and lll_futex_wake.  Change lll_futex_wait
3487         to call lll_futex_timed_wait.  Add lll_private_futex_wait,
3488         lll_private_futex_timed_wait and lll_private_futex_wake.
3489         (lll_robust_mutex_unlock): Fix typo.
3490         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
3491         field in futex command setup.
3492         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
3493         COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
3494         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
3495         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
3496         if they are available.  Remove clear_once_control.
3497         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
3498         futexes if they are available.
3499         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3500         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3501         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
3502         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3503         * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
3504         Wake only when there are waiters.
3505         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
3506         support.  Indicate that there are waiters.  Remove unnecessary
3507         extra cancellation test.
3508         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.  Removed
3509         left-over duplication of __sem_wait_cleanup.
3511 2007-06-07  Ulrich Drepper  <drepper@redhat.com>
3513         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
3514         parameter to lll_futex_wait, lll_futex_timed_wait, and
3515         lll_futex_wake.  Change lll_futex_wait to call lll_futex_timed_wait.
3516         Add lll_private_futex_wait, lll_private_futex_timed_wait, and
3517         lll_private_futex_wake.
3518         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3519         * allocatestack.c: Adjust use of lll_futex_* macros.
3520         * init.c: Likewise.
3521         * lowlevellock.h: Likewise.
3522         * pthread_barrier_wait.c: Likewise.
3523         * pthread_cond_broadcast.c: Likewise.
3524         * pthread_cond_destroy.c: Likewise.
3525         * pthread_cond_signal.c: Likewise.
3526         * pthread_cond_timedwait.c: Likewise.
3527         * pthread_cond_wait.c: Likewise.
3528         * pthread_create.c: Likewise.
3529         * pthread_mutex_lock.c: Likewise.
3530         * pthread_mutex_setprioceiling.c: Likewise.
3531         * pthread_mutex_timedlock.c: Likewise.
3532         * pthread_mutex_unlock.c: Likewise.
3533         * pthread_rwlock_timedrdlock.c: Likewise.
3534         * pthread_rwlock_timedwrlock.c: Likewise.
3535         * pthread_rwlock_unlock.c: Likewise.
3536         * sysdeps/alpha/tls.h: Likewise.
3537         * sysdeps/i386/tls.h: Likewise.
3538         * sysdeps/ia64/tls.h: Likewise.
3539         * sysdeps/powerpc/tls.h: Likewise.
3540         * sysdeps/pthread/aio_misc.h: Likewise.
3541         * sysdeps/pthread/gai_misc.h: Likewise.
3542         * sysdeps/s390/tls.h: Likewise.
3543         * sysdeps/sh/tls.h: Likewise.
3544         * sysdeps/sparc/tls.h: Likewise.
3545         * sysdeps/unix/sysv/linux/fork.c: Likewise.
3546         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
3547         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
3548         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
3549         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
3550         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3551         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
3552         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3553         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
3554         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
3555         Likewise.
3556         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
3557         * sysdeps/x86_64/tls.h: Likewise.
3559 2007-05-29  Ulrich Drepper  <drepper@redhat.com>
3561         * pthread_getattr_np.c: No need to install a cancellation handler,
3562         this is no cancellation point.
3563         * pthread_getschedparam.c: Likewise.
3564         * pthread_setschedparam.c: Likewise.
3565         * pthread_setschedprio.c: Likewise.
3566         * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
3567         lll_unlock_wake_cb.
3568         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3569         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3570         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3571         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3572         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3573         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3574         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
3575         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
3576         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3577         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
3578         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3579         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3581         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
3582         whether there are more than one thread makes no sense here since
3583         we only call the slow path if the locks are taken.
3584         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
3586         * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
3587         COND_NWAITERS_SHIFT.
3588         * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
3589         COND_CLOCK_BITS.
3590         * pthread_cond_init.c: Likewise.
3591         * pthread_cond_timedwait.c: Likewise.
3592         * pthread_cond_wait.c: Likewise.
3593         * pthread_condattr_getclock.c: Likewise.
3594         * pthread_condattr_setclock.c: Likewise.
3595         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
3596         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3597         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3598         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3599         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3601 2007-05-28  Jakub Jelinek  <jakub@redhat.com>
3603         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
3604         unistd.h.
3606         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
3607         insn suffix.
3608         (THREAD_GSCOPE_GET_FLAG): Remove.
3609         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
3610         * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
3611         changes.
3612         * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
3613         (THREAD_GSCOPE_GET_FLAG): Remove.
3614         (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
3615         instead of THREAD_GSCOPE_GET_FLAG.
3616         (THREAD_GSCOPE_SET_FLAG): Likewise.  Add atomic_write_barrier after
3617         it.
3618         * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3619         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3620         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3621         THREAD_GSCOPE_WAIT): Define.
3622         * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3623         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3624         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3625         THREAD_GSCOPE_WAIT): Define.
3626         * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3627         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3628         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3629         THREAD_GSCOPE_WAIT): Define.
3630         * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3631         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3632         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3633         THREAD_GSCOPE_WAIT): Define.
3635 2007-05-24  Richard Henderson  <rth@redhat.com>
3637         * descr.h (struct pthread): Add header.gscope_flag.
3638         * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3639         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3640         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3641         THREAD_GSCOPE_WAIT): Define.
3643 2007-05-27  Ulrich Drepper  <drepper@redhat.com>
3645         * init.c: Make it compile with older kernel headers.
3647         * tst-initializers1.c: Show through exit code which test failed.
3649         * pthread_rwlock_init.c: Also initialize __shared field.
3650         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
3651         element in rwlock structure into four byte elements.  One of them is
3652         the new __shared element.
3653         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
3654         Likewise.
3655         [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
3656         __shared, adjust names of other padding elements.
3657         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3658         * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
3659         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
3660         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
3661         FUTEX_PRIVATE_FLAG.
3662         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
3663         futex to use private operations if possible.
3664         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3665         Likewise.
3666         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3667         Likewise.
3668         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3669         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3670         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3671         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3672         Likewise.
3673         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3674         Likewise.
3675         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3676         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3678 2007-05-26  Ulrich Drepper  <drepper@redhat.com>
3680         * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
3681         * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
3682         * pthread_rwlock_timedrdlock.c: Likewise.
3683         * pthread_rwlock_tryrdlock.c: Likewise.
3685         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
3686         optimization.
3688         * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
3689         * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
3690         duplication of __sem_wait_cleanup.
3692         * allocatestack.c: Revert last change.
3693         * init.c: Likewise.
3694         * sysdeps/i386/tls.h: Likewise.
3695         * sysdeps/x86_64/tls.h: Likewise.
3696         * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
3697         header structure.
3698         * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
3700         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
3701         Add private field.
3702         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
3703         * pthread_barrier_init.c: Set private flag if pshared and private
3704         futexes are supported.
3705         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
3706         private field in futex command setup.
3707         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3709 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
3711         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
3712         support.
3713         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3714         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3715         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3716         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3717         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3719         * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
3720         * sem_init.c (__new_sem_init): Rewrite to initialize all three
3721         fields in the structure.
3722         (__old_sem_init): New function.
3723         * sem_open.c: Initialize all fields of the structure.
3724         * sem_getvalue.c: Adjust for renamed element.
3725         * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
3726         (gen-as-const-headers): Add structsem.sym.
3727         * sysdeps/unix/sysv/linux/structsem.sym: New file.
3728         * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
3729         struct new_sem.  Add struct old_sem.
3730         * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
3731         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
3732         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3733         * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
3734         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3735         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3736         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3737         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3738         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3739         * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
3740         * tst-sem10.c: New file.
3741         * tst-sem11.c: New file.
3742         * tst-sem12.c: New file.
3743         * tst-typesizes.c: Test struct new_sem and struct old_sem instead
3744         of struct sem.
3746 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
3747             Jakub Jelinek  <jakub@redhat.com>
3749         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3750         Move __pthread_enable_asynccancel right before futex syscall.
3751         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
3752         Likewise.
3754 2007-05-24  Jakub Jelinek  <jakub@redhat.com>
3756         * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
3757         THREAD_COPY_PRIVATE_FUTEX): Define.
3758         * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
3759         THREAD_COPY_PRIVATE_FUTEX): Define.
3760         * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
3761         * init.c (__pthread_initialize_minimal_internal): Use
3762         THREAD_SET_PRIVATE_FUTEX.
3764         * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
3765         (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
3766         THREAD_GSCOPE_FLAG_WAIT): Define.
3767         (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
3768         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
3769         * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
3770         PTR_DEMANGLE.
3771         (THREAD_GSCOPE_GET_FLAG): Define.
3772         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
3773         * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
3774         instead of ->header.gscope_flag directly.
3776 2007-05-23  Ulrich Drepper  <drepper@redhat.com>
3778         * init.c (__pthread_initialize_minimal_internal): Check whether
3779         private futexes are available.
3780         * allocatestack.c (allocate_stack): Copy private_futex field from
3781         current thread into the new stack.
3782         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
3783         futexes if they are available.
3784         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
3785         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
3786         in libc-lowlevellock.S allow using private futexes.
3787         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3788         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
3789         FUTEX_PRIVATE_FLAG.
3790         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3791         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
3792         if they are available.
3793         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
3794         * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
3795         * sysdeps/i386/tcb-offsets.sym: Likewise.
3796         * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
3797         * sysdeps/i386/tls.h (tcbhead_t): Likewise.
3799 2007-05-21  Ulrich Drepper  <drepper@redhat.com>
3801         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3802         Remove ptr_wait_lookup_done again.
3803         * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
3804         (__pthread_initialize_minimal_internal): Initialize
3805         _dl_wait_lookup_done pointer in _rtld_global directly.
3806         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3807         Remove code to code _dl_wait_lookup_done.
3808         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
3809         encrypted for now.
3811 2007-05-21  Jakub Jelinek  <jakub@redhat.com>
3813         * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
3814         pthread_mutex_init failed with ENOTSUP.
3816 2007-05-19  Ulrich Drepper  <drepper@redhat.com>
3818         * allocatestack.c (__wait_lookup_done): New function.
3819         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3820         Add ptr_wait_lookup_done.
3821         * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
3822         * pthreadP.h: Declare __wait_lookup_done.
3823         * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
3824         Define macros to implement reference handling of global scope.
3825         * sysdeps/x86_64/tls.h: Likewise.
3826         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3827         Initialize GL(dl_wait_lookup_done).
3829 2007-05-17  Ulrich Drepper  <drepper@redhat.com>
3831         [BZ #4512]
3832         * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
3833         is detected.
3834         * pthread_mutex_timedlock.c: Likewise.
3835         * pthread_mutex_trylock.c: Likewise.
3836         Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
3838         * Makefile (tests): Add tst-robust9 and tst-robustpi9.
3839         * tst-robust9.c: New file.
3840         * tst-robustpi9.c: New file.
3842         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
3843         unnecessary extra cancellation test.
3845 2007-05-14  Ulrich Drepper  <drepper@redhat.com>
3847         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
3848         extra cancellation test.
3849         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3851 2007-05-10  Ulrich Drepper  <drepper@redhat.com>
3853         * descr.h (struct pthread): Rearrange members to fill hole in
3854         64-bit layout.
3856         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
3857         (__pthread_setaffinity_new): If syscall was successful and
3858         RESET_VGETCPU_CACHE is defined, use it before returning.
3859         * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
3861 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
3863         [BZ #4455]
3864         * tst-align2.c: Include stackinfo.h.
3865         * tst-getpid1.c: Likewise.
3867 2007-05-02  Carlos O'Donell  <carlos@systemhalted.org>
3869         [BZ #4455]
3870         * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
3871         * tst-getpid1.c (do_test): Likewise.
3873         [BZ #4456]
3874         * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
3875         (allocate_stack): Likewise.
3877 2007-05-07  Ulrich Drepper  <drepper@redhat.com>
3879         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3880         (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
3881         (__lll_robust_timedlock_wait): Likewise.
3882         Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
3884 2007-05-06  Mike Frysinger  <vapier@gentoo.org>
3886         [BZ #4465]
3887         * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
3888         * tst-cancel4.c (tf_fdatasync): New test.
3890 2007-04-27  Ulrich Drepper  <drepper@redhat.com>
3892         [BZ #4392]
3893         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
3894         check mutexes like normal mutexes.
3896         [BZ #4306]
3897         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
3898         Initialize the whole sigevent structure to appease valgrind.
3900 2007-04-25  Ulrich Drepper  <drepper@redhat.com>
3902         * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
3903         * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
3905 2007-04-06  Ulrich Drepper  <drepper@redhat.com>
3907         * tst-locale1.c: Avoid warnings.
3908         * tst-locale2.c: Likewise.
3910 2007-03-19  Steven Munroe  <sjmunroe@us.ibm.com>
3912         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3913         (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
3915 2007-03-16  Jakub Jelinek  <jakub@redhat.com>
3917         * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
3918         __extern_always_inline where appropriate.
3919         * sysdeps/pthread/pthread.h: Likewise.
3921 2007-03-13  Richard Henderson  <rth@redhat.com>
3923         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
3924         separate cfi regions for the two subsections.
3926 2007-02-25  Ulrich Drepper  <drepper@redhat.com>
3928         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
3929         new thread, don't just decrement it.
3930         Patch by Suzuki K P <suzuki@in.ibm.com>.
3932 2007-02-21  Ulrich Drepper  <drepper@redhat.com>
3934         * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
3935         PTHFCT_CALL definition.
3937 2007-02-18  Ulrich Drepper  <drepper@redhat.com>
3939         * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
3940         available, don't use it.
3942 2007-02-09  Jakub Jelinek  <jakub@redhat.com>
3944         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3945         (__lll_mutex_timedlock_wait): Use correct pointer when we don't
3946         call into the kernel to delay.
3948 2007-01-18  Ulrich Drepper  <drepper@redhat.com>
3950         * tst-initializers1.c: We want to test the initializers as seen
3951         outside of libc, so undefined _LIBC.
3953         * pthread_join.c (cleanup): Avoid warning.
3955 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
3957         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3958         (__lll_timedwait_tid): Add unwind info.
3960         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
3961         function table, mangle the pointers.
3962         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
3963         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
3964         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
3965         demangle pointers before use.
3966         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
3967         demangle pointer.
3968         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
3969         * sysdeps/pthread/setxid.h: Likewise.
3971 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
3973         * tst-rwlock7.c: Show some more information in case of correct
3974         behavior.
3976 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
3978         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3979         (lll_futex_timed_wait): Undo part of last change, don't negate
3980         return value.
3982 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
3984         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
3985         FUTEX_CMP_REQUEUE and lll_futex_requeue.
3987 2006-12-28  David S. Miller  <davem@davemloft.net>
3989         * shlib-versions: Fix sparc64 linux target specification.
3991 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
3993         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3994         Adjust include path for pthread_barrier_wait.c move.
3996 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
3998         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
3999         tid isn't reread from pd->tid in between ESRCH test and the syscall.
4001 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
4003         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
4004         6 argument cancellable syscalls.
4005         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
4006         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
4007         6 argument cancellable syscalls.
4008         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
4010 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
4012         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
4013         (__rtld_mrlock_initialize): Add missing closing parenthesis.
4015 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
4017         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
4018         __sync_lock_release instead of __sync_lock_release_si.
4020 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
4022         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
4023         Define.
4024         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
4025         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
4026         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4027         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4028         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4029         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4030         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4031         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4032         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4033         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4034         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4036 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
4038         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
4039         * pthread_barrier_wait.c: ...here.
4040         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
4041         * pthread_cond_broadcast.c: ...here.
4042         * sysdeps/pthread/pthread_cond_signal.c: Move to...
4043         * pthread_cond_signal.c: ...here.
4044         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
4045         * pthread_cond_timedwait.c: ...here.
4046         * sysdeps/pthread/pthread_cond_wait.c: Move to...
4047         * pthread_cond_wait.c: ...here.
4048         * sysdeps/pthread/pthread_once.c: Move to...
4049         * pthread_once.c: ...here.
4050         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
4051         * pthread_rwlock_rdlock.c: ...here.
4052         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
4053         * pthread_rwlock_timedrdlock.c: ...here.
4054         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
4055         * pthread_rwlock_timedwrlock.c: ...here.
4056         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
4057         * pthread_rwlock_unlock.c: ...here.
4058         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
4059         * pthread_rwlock_wrlock.c: ...here.
4060         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
4061         * pthread_spin_destroy.c: ...here.
4062         * sysdeps/pthread/pthread_spin_init.c: Move to...
4063         * pthread_spin_init.c: ...here.
4064         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
4065         * pthread_spin_unlock.c: ...here.
4066         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
4067         * pthread_getcpuclockid.c: ...here.
4069         * init.c: USE_TLS support is now always enabled.
4070         * tst-tls5.h: Likewise.
4071         * sysdeps/alpha/tls.h: Likewise.
4072         * sysdeps/i386/tls.h: Likewise.
4073         * sysdeps/ia64/tls.h: Likewise.
4074         * sysdeps/powerpc/tls.h: Likewise.
4075         * sysdeps/s390/tls.h: Likewise.
4076         * sysdeps/sh/tls.h: Likewise.
4077         * sysdeps/sparc/tls.h: Likewise.
4078         * sysdeps/x86_64/tls.h: Likewise.
4080 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
4082         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
4083         __rtld_mrlock_change): Update oldval if atomic compare and exchange
4084         failed.
4086         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4087         Define to THREAD_SELF->header.multiple_threads.
4088         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
4089         Likewise.
4090         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
4091         Likewise.
4092         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
4093         (SINGLE_THREAD_P): Likewise.
4094         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
4095         (SINGLE_THREAD_P): Likewise.
4096         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4097         (SINGLE_THREAD_P): Likewise.
4098         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
4099         (SINGLE_THREAD_P): Likewise.
4100         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
4101         Likewise.
4102         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
4103         (SINGLE_THREAD_P): Likewise.
4104         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
4105         (SINGLE_THREAD_P): Likewise.
4106         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
4107         Likewise.
4109 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
4111         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
4112         by default rather than 2_3_3.
4114 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
4116         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
4117         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
4118         atomic_* instead of catomic_* macros.
4120 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
4122         [BZ #3285]
4123         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
4124         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
4125         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4126         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4127         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4128         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
4129         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4130         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4131         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4132         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
4133         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4134         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4135         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4137 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
4139         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
4140         cancelable syscalls with six parameters.
4142         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
4143         operations instead of atomic_*.
4145 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
4147         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
4149 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
4151         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
4152         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
4153         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
4154         New file.
4155         * pthread_attr_setstack.c: Allow overwriting the version number of the
4156         new symbol.
4157         * pthread_attr_setstacksize.c: Likewise.
4158         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
4159         it.
4160         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
4161         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
4163 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
4165         [BZ #3251]
4166         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
4167         Patch by Petr Baudis.
4169 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
4171         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
4173         * tst-cancel2.c (tf): Loop as long as something was written.
4175 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4177         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
4178         mutexes wake all mutexes.
4179         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
4180         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
4181         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4183 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
4185         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
4186         to guarantee the thread is always canceled.
4188 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
4190         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
4191         Include stdlib.h.
4192         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
4193         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
4194         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4195         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4196         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4198 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
4200         [BZ #3123]
4201         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
4202         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
4203         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4204         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4205         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4206         * Makefile (tests): Add tst-cond22.
4207         * tst-cond22.c: New file.
4209 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
4211         [BZ #3124]
4212         * descr.h (struct pthread): Add parent_cancelhandling.
4213         * sysdeps/pthread/createthread.c (create_thread): Pass parent
4214         cancelhandling value to child.
4215         * pthread_create.c (start_thread): If parent thread was canceled
4216         reset the SIGCANCEL mask.
4217         * Makefile (tests): Add tst-cancel25.
4218         * tst-cancel25.c: New file.
4220 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
4221             Ulrich Drepper  <drepper@redhat.com>
4223         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
4224         counterp if it is already zero.
4225         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
4227 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
4228             Roland McGrath  <roland@redhat.com>
4230         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4231         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4232         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
4233         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4234         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4235         lll_robust_mutex_timedlock, lll_mutex_unlock,
4236         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4237         Add _L_*_ symbols around the subsection.
4238         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
4239         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
4241 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
4242             Roland McGrath  <roland@redhat.com>
4244         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4245         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4246         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
4247         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4248         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4249         lll_robust_mutex_timedlock, lll_mutex_unlock,
4250         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4251         Add _L_*_ symbols around the subsection.
4252         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
4253         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
4255 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
4257         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
4258         change because it can disturb too much existing code.  If real hard
4259         reader preference is needed we'll introduce another type.
4260         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4261         (pthread_rwlock_timedwrlock): Likewise.
4262         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4263         Likewise.
4265 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
4267         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
4268         reader preference.
4269         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4270         (pthread_rwlock_timedwrlock): Likewise.
4271         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4272         Likewise.
4274 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
4276         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
4277         Only define ifdef SHARED.
4279 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
4281         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
4282         (free_stacks): ...here.
4283         (__free_stack_cache): New function.
4284         * pthreadP.h: Declare __free_stack_cache.
4285         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
4286         ptr_freeres.
4287         * init.c (pthread_functions): Initialize ptr_freeres.
4288         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
4289         New freeres function.
4291 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
4293         [BZ #3018]
4294         * Makefile (extra-objs): Add modules to extra-test-objs instead.
4296 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
4298         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4299         _XOPEN_REALTIME_THREADS.
4301 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
4303         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
4304         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
4305         HAVE_CLOCK_GETTIME_VSYSCALL.
4306         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
4308 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
4310         * sysdeps/unix/sysv/linux/bits/posix_opt.h
4311         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
4312         * descr.h (struct priority_protection_data): New type.
4313         (struct pthread): Add tpp field.
4314         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
4315         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
4316         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
4317         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
4318         TPP mutexes.
4319         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
4320         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
4321         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
4322         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
4323         * tpp.c: New file.
4324         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
4325         boosted by TPP.
4326         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
4327         * pthread_mutexattr_getprioceiling.c
4328         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
4329         in the SCHED_FIFO priority range.
4330         * pthread_mutexattr_setprioceiling.c
4331         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
4332         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
4333         if mutex is not TPP.  Ceiling is now in __data.__lock.
4334         * pthread_mutex_setprioceiling.c: Include stdbool.h.
4335         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
4336         is now in __data.__lock.  Add locking.
4337         * pthread_create.c (__free_tcb): Free pd->tpp structure.
4338         * Makefile (libpthread-routines): Add tpp.
4339         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
4340         * tst-tpp.h: New file.
4341         * tst-mutexpp1.c: New file.
4342         * tst-mutexpp6.c: New file.
4343         * tst-mutexpp10.c: New file.
4344         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
4345         * tst-mutex6.c (TEST_FUNCTION): Likewise.
4347 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
4349         [BZ #2843]
4350         * pthread_join.c (pthread_join): Account for self being canceled
4351         when checking for deadlocks.
4352         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
4353         (tf1): Don't print anything after pthread_join returns, this would be
4354         another cancellation point.
4355         (tf2): Likewise.
4356         * tst-join6.c: New file.
4357         * Makefile (tests): Add tst-join6.
4359 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
4361         [BZ #2892]
4362         * pthread_setspecific.c (__pthread_setspecific): Check
4363         out-of-range index before checking for unused key.
4365         * sysdeps/pthread/gai_misc.h: New file.
4367 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
4369         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
4370         file.  Don't use sysctl.
4371         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
4372         overwrite the file if this is likely not true.
4374 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
4376         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
4377         * Makefile (tests): Add tst-getpid3.
4378         * tst-getpid3.c: New file.
4380 2006-07-30  Roland McGrath  <roland@redhat.com>
4382         * Makefile (libpthread-routines): Add ptw-sigsuspend.
4384         * sysdeps/unix/sysv/linux/i386/not-cancel.h
4385         (pause_not_cancel): New macro.
4386         (nanosleep_not_cancel): New macro.
4387         (sigsuspend_not_cancel): New macro.
4388         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
4389         nanosleep_not_cancel macro from <not-cancel.h>.
4390         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
4391         macro from <not-cancel.h>.
4393 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
4394             Jakub Jelinek  <jakub@redhat.com>
4396         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
4397         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
4398         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
4399         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
4400         * pthread_mutex_init.c: Add support for priority inheritance mutex.
4401         * pthread_mutex_lock.c: Likewise.
4402         * pthread_mutex_timedlock.c: Likewise.
4403         * pthread_mutex_trylock.c: Likewise.
4404         * pthread_mutex_unlock.c: Likewise.
4405         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
4406         all mutexes.
4407         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
4408         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
4409         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
4410         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
4411         pthread-pi-defines.sym.
4412         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
4413         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
4414         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4415         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
4416         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4417         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4418         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4419         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
4420         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
4421         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4422         _POSIX_THREAD_PRIO_INHERIT to 200112L.
4423         * tst-mutex1.c: Adjust to allow use in PI mutex test.
4424         * tst-mutex2.c: Likewise.
4425         * tst-mutex3.c: Likewise.
4426         * tst-mutex4.c: Likewise.
4427         * tst-mutex5.c: Likewise.
4428         * tst-mutex6.c: Likewise.
4429         * tst-mutex7.c: Likewise.
4430         * tst-mutex7a.c: Likewise.
4431         * tst-mutex8.c: Likewise.
4432         * tst-mutex9.c: Likewise.
4433         * tst-robust1.c: Likewise.
4434         * tst-robust7.c: Likewise.
4435         * tst-robust8.c: Likewise.
4436         * tst-mutexpi1.c: New file.
4437         * tst-mutexpi2.c: New file.
4438         * tst-mutexpi3.c: New file.
4439         * tst-mutexpi4.c: New file.
4440         * tst-mutexpi5.c: New file.
4441         * tst-mutexpi6.c: New file.
4442         * tst-mutexpi7.c: New file.
4443         * tst-mutexpi7a.c: New file.
4444         * tst-mutexpi8.c: New file.
4445         * tst-mutexpi9.c: New file.
4446         * tst-robust1.c: New file.
4447         * tst-robust2.c: New file.
4448         * tst-robust3.c: New file.
4449         * tst-robust4.c: New file.
4450         * tst-robust5.c: New file.
4451         * tst-robust6.c: New file.
4452         * tst-robust7.c: New file.
4453         * tst-robust8.c: New file.
4454         * Makefile (tests): Add the new tests.
4456         * pthread_create.c (start_thread): Add some casts to avoid warnings.
4457         * pthread_mutex_destroy.c: Remove unneeded label.
4459 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
4461         * pthread_mutex_init.c (__pthread_mutex_init): Move some
4462         computations to compile time.
4464 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
4466         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
4468 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
4470         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
4472 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
4474         * pthread_key_create.c (__pthread_key_create): Do away with
4475         __pthread_keys_lock.
4477         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4478         (__kernel_cpumask_size): Mark as hidden.
4479         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4481         * sem_open.c (__sem_mappings_lock): Mark as hidden.
4482         * semaphoreP.h (__sem_mappings_lock): Likewise.
4484 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
4486         * pthread_atfork.c: Mark __dso_handle as hidden.
4488 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
4490         [BZ #2644]
4491         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
4492         the reload problem.  Change the one path in pthread_cancel_init
4493         which causes the problem.  Force gcc to reload.  Simplify callers.
4494         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
4495         (_Unwind_GetBSP): Undo last patch.
4497 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
4499         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
4500         function pointer is reloaded after pthread_cancel_init calls.
4502         [BZ #2644]
4503         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
4504         pointers are reloaded after pthread_cancel_init calls.
4506 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
4508         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
4509         __always_inline.
4511 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
4513         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4514         Allocate new object which is passed to timer_sigev_thread so that
4515         the timer can be deleted before the new thread is scheduled.
4517 2006-04-26  Roland McGrath  <roland@redhat.com>
4519         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
4521 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
4523         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
4524         suffix for conditional jumps.
4525         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
4526         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4527         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
4528         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
4529         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4530         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4532         * init.c (sigcancel_handler): Compare with correct PID even if the
4533         thread is in the middle of a fork call.
4534         (sighandler_setxid): Likewise.
4535         Reported by Suzuki K P <suzuki@in.ibm.com> .
4537 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
4539         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
4541 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
4543         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
4544         fails [Coverity CID 105].
4546 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
4548         * sysdeps/pthread/pthread.h: Add nonnull attributes.
4550 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
4552         [BZ #2505]
4553         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
4554         Define __lll_rel_instr using lwsync.
4556 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
4558         * allocatestack.c (allocate_stack): Always initialize robust_head.
4559         * descr.h: Define struct robust_list_head.
4560         (struct pthread): Use robust_list_head in robust mutex list definition.
4561         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
4562         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
4563         (__pthread_initialize_minimal_internal): Register robust_list with
4564         the kernel.
4565         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
4566         Declare __set_robust_list_avail.
4567         * pthread_create.c (start_thread): Register robust_list of new thread.
4568         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
4569         waiters.
4570         * pthread_mutex_destroy.c: For robust mutexes don't look at the
4571         number of users, it's unreliable.
4572         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
4573         set_robust_list syscall is available.
4574         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
4575         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
4576         Set robust_head.list_op_pending before trying to lock a robust mutex.
4577         * pthread_mutex_timedlock.c: Likewise.
4578         * pthread_mutex_trylock.c: Likewise.
4579         * pthread_mutex_unlock.c: Likewise for unlocking.
4580         * Makefile (tests): Add tst-robust8.
4581         * tst-robust8.c: New file.
4583 2006-03-08  Andreas Schwab  <schwab@suse.de>
4585         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
4586         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
4588 2006-03-05  Roland McGrath  <roland@redhat.com>
4590         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
4591         and $config_os doesn't match *linux*.
4593 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
4595         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
4596         Use __syscall_error.
4597         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4598         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
4599         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
4600         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4601         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
4602         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
4604 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
4606         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
4608 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
4610         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
4611         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
4612         mutex.
4613         (__lll_robust_timedlock_wait): Likewise.
4614         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
4615         (__lll_robust_lock_wait): Likewise.
4616         (__lll_robust_timedlock_wait): Likewise.
4617         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
4618         (__lll_robust_lock_wait): Likewise.
4619         (__lll_robust_timedlock_wait): Likewise.
4621 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
4623         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
4624         lll_robust_mutex_trylock, lll_robust_mutex_lock,
4625         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
4626         lll_robust_mutex_unlock): Define.
4627         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
4629 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
4631         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
4632         instead of <clone.S>.
4634 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
4636         * Makefile (libpthread-routines): Add
4637         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
4638         and pthread_mutex_[sg]etprioceiling.
4639         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
4640         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
4641         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
4642         pthread_mutex_setprioceiling.
4643         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
4644         PTHREAD_PRIO_PROTECT): New enum values.
4645         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
4646         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
4647         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
4648         prototypes.
4649         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
4650         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
4651         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
4652         Define.
4653         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
4654         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
4655         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
4656         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
4657         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
4658         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
4659         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
4660         protocol mutexes.
4661         * pthread_mutex_getprioceiling.c: New file.
4662         * pthread_mutex_setprioceiling.c: New file.
4663         * pthread_mutexattr_getprioceiling.c: New file.
4664         * pthread_mutexattr_setprioceiling.c: New file.
4665         * pthread_mutexattr_getprotocol.c: New file.
4666         * pthread_mutexattr_setprotocol.c: New file.
4668 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
4670         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
4672 2006-02-27  Roland McGrath  <roland@redhat.com>
4674         * sysdeps/pthread/Subdirs: List nptl here too.
4675         * configure (libc_add_on_canonical): New variable.
4677         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
4679         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
4680         self to get main source tree's file.
4681         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
4682         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
4683         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
4684         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
4685         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
4686         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
4687         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
4688         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
4689         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
4690         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
4691         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
4692         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
4693         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
4695         * Makefile: Use $(sysdirs) in vpath directive.
4697         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
4698         (CPPFLAGS-timer_routines.c): Likewise.
4700         * Makeconfig (includes): Variable removed.
4702 2006-02-26  Roland McGrath  <roland@redhat.com>
4704         * sysdeps/generic/pt-raise.c: Moved to ...
4705         * pt-raise.c: ... here.
4706         * sysdeps/generic/lowlevellock.h: Moved to ...
4707         * lowlevellock.h: ... here.
4709 2006-02-23  Roland McGrath  <roland@redhat.com>
4711         * descr.h (struct pthread): Add final member `end_padding'.
4712         (PTHREAD_STRUCT_END_PADDING): Use it.
4714 2006-02-20  Roland McGrath  <roland@redhat.com>
4716         * sysdeps/mips: Directory removed, saved in ports repository.
4717         * sysdeps/unix/sysv/linux/mips: Likewise.
4719 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
4721         * tst-robust1.c: Add second mutex to check that the mutex list is
4722         handled correctly.
4724 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
4726         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
4727         lll_robust_mutex_trylock, lll_robust_mutex_lock,
4728         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
4729         lll_robust_mutex_unlock): New macros.
4730         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
4731         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4732         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4733         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4734         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
4736 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4738         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
4739         definitions.
4740         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
4742 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
4744         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4745         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
4746         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4747         (lll_robust_mutex_unlock): Likewise.
4749 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
4751         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
4752         Set robust_list.__next rather than robust_list.
4753         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4754         (__pthread_list_t): New typedef.
4755         (pthread_mutex_t): Replace __next and __prev fields with __list.
4756         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
4757         (__pthread_list_t): New typedef.
4758         (pthread_mutex_t): Replace __next and __prev fields with __list.
4759         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4760         (__pthread_list_t, __pthread_slist_t): New typedefs.
4761         (pthread_mutex_t): Replace __next and __prev fields with __list.
4762         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
4763         (__pthread_list_t, __pthread_slist_t): New typedefs.
4764         (pthread_mutex_t): Replace __next and __prev fields with __list.
4765         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
4766         (__pthread_list_t, __pthread_slist_t): New typedefs.
4767         (pthread_mutex_t): Replace __next and __prev fields with __list.
4768         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
4769         (__pthread_slist_t): New typedef.
4770         (pthread_mutex_t): Replace __next field with __list.
4772 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
4774         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
4775         PTHREAD_MUTEX_OWNERDEAD.
4776         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
4777         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
4778         * Makefile (libpthread-routines): Add lowlevelrobustlock.
4779         * pthread_create.c (start_thread): Very much simplify robust_list loop.
4780         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
4781         to PTHREAD_MUTEX_INCONSISTENT.
4782         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
4783         * pthread_mutex_lock.c: Reimplement robust mutex handling.
4784         * pthread_mutex_trylock.c: Likewise.
4785         * pthread_mutex_timedlock.c: Likewise.
4786         * pthread_mutex_unlock.c: Likewise.
4787         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4788         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
4789         lowlevelrobustlock.sym.
4790         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
4791         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
4792         definitions.
4793         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4794         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
4795         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
4796         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
4797         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
4799 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
4801         * allocatestack.c (allocate_stack): Initialize robust_list.
4802         * init.c (__pthread_initialize_minimal_internal): Likewise.
4803         * descr.h (struct xid_command): Pretty printing.
4804         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
4805         robust_list.  Adjust macros.
4806         * pthread_create.c (start_thread): Adjust robust_list handling.
4807         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
4808         but the owner for all robust mutex types.
4809         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
4810         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
4811         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4812         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
4814         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
4815         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
4817 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
4819         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
4820         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
4822 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4824         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
4825         Return status.
4826         (lll_futex_timed_wait): Define.
4828 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
4830         * tst-cancel4.c: Test ppoll.
4832 2006-01-18  Andreas Jaeger  <aj@suse.de>
4834         [BZ #2167]
4835         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
4836         (pthread_mutex_t): Follow changes for other archs.  Based on patch
4837         by Jim Gifford <patches@jg555.com>.
4839 2006-01-13  Richard Henderson  <rth@redhat.com>
4841         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
4843 2006-01-10  Roland McGrath  <roland@redhat.com>
4845         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
4846         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
4847         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
4848         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4849         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4850         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4851         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4852         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
4853         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4854         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4856 2006-01-09  Roland McGrath  <roland@redhat.com>
4858         * tst-initializers1-c89.c: New file.
4859         * tst-initializers1-c99.c: New file.
4860         * tst-initializers1-gnu89.c: New file.
4861         * tst-initializers1-gnu99.c: New file.
4862         * Makefile (tests): Add them.
4863         (CFLAGS-tst-initializers1-c89.c): New variable.
4864         (CFLAGS-tst-initializers1-c99.c): New variable.
4865         (CFLAGS-tst-initializers1-gnu89.c): New variable.
4866         (CFLAGS-tst-initializers1-gnu99.c): New variable.
4868         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4869         Use __extension__ on anonymous union definition.
4870         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4871         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4872         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4873         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4874         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4876 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
4878         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4879         Don't give the union a name because it changes the mangled name.
4880         Instead name the struct for __data.
4881         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
4882         Likewise.
4883         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
4884         Likewise.
4886 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
4888         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
4889         stack bias to mc_ftp field.
4891 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
4893         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
4894         being too clever and reloading the futex value where it shouldn't.
4896 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
4898         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
4899         correct type.
4901 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
4903         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
4904         Add cfi directives.
4906 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
4908         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
4909         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
4910         rename in tcbhead_t.
4912         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4913         Don't give the union a name because it changes the mangled name.
4914         Instead name the struct for __data.
4915         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4916         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4917         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4918         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4919         * pthread_create.c (start_thread): Adjust robust mutex free loop.
4920         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
4922 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
4924         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
4925         Return status.
4926         (lll_futex_timed_wait): Define.
4927         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4928         * sysdeps/pthread/aio_misc.h: New file.
4930 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
4932         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
4934 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
4936         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4937         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
4938         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4940 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
4942         * tst-cancel24.cc: Use C headers instead of C++ headers.
4944 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
4946         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
4947         sparc-linux configured glibc.
4948         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
4949         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
4950         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
4951         atomic_compare_and_exchange_val_24_acq instead of
4952         atomic_compare_and_exchange_val_acq.
4953         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
4954         instead of atomic_exchange_rel.
4955         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
4956         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
4957         file.
4958         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
4959         file.
4960         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
4961         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
4962         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
4963         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
4964         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
4965         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
4966         New file.
4967         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
4968         New file.
4969         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
4970         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
4971         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
4972         file.
4973         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
4974         file.
4975         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
4977 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
4979         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
4980         mutex initializers.
4982 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
4984         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
4985         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4986         THREAD_COPY_POINTER_GUARD): Define.
4987         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
4988         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
4990 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
4992         * version.c: Update copyright year.
4994 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4996         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
4997         .eh_frame section, use cfi_* directives.
4998         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
5000 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
5002         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
5003         now.
5005 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
5007         * sysdeps/pthread/sigaction.c: Removed.
5008         * sigaction.c: New file.
5009         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
5011 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
5013         * Makefile (tests): Add tst-signal7.
5014         * tst-signal7.c: New file.
5016 2005-12-27  Roland McGrath  <roland@redhat.com>
5018         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
5019         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
5020         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
5021         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
5022         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
5023         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
5024         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
5025         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
5026         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
5027         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
5028         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
5030 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
5032         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
5033         and __prev field to pthread_mutex_t.
5034         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5035         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5036         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5037         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5038         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
5039         to pthread_mutex_t.
5041 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
5043         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
5044         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
5045         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
5046         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
5047         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
5048         and PTHREAD_MUTEXATTR_FLAG_BITS.
5049         * descr.h (struct pthread): Add robust_list field and define
5050         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
5051         * pthread_mutexattr_getrobust.c: New file.
5052         * pthread_mutexattr_setrobust.c: New file.
5053         * pthread_mutex_consistent.c: New file.
5054         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
5055         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
5056         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
5057         Adjust pthread_mutex_t initializers.
5058         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
5059         field to pthread_mutex_t.
5060         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
5061         and __prev field to pthread_mutex_t.
5062         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
5063         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
5064         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
5065         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
5066         * pthread_mutexattr_gettype.c: Likewise.
5067         * pthread_mutexattr_setpshared.c: Likewise.
5068         * pthread_mutexattr_settype.c: Likewise.
5069         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
5070         Initialize mutex kind according to robust flag.
5071         * pthread_mutex_lock.c: Implement local robust mutex.
5072         * pthread_mutex_timedlock.c: Likewise.
5073         * pthread_mutex_trylock.c: Likewise.
5074         * pthread_mutex_unlock.c: Likewise.
5075         * pthread_create.c (start_thread): Mark robust mutexes which remained
5076         locked as dead.
5077         * tst-robust1.c: New file.
5078         * tst-robust2.c: New file.
5079         * tst-robust3.c: New file.
5080         * tst-robust4.c: New file.
5081         * tst-robust5.c: New file.
5082         * tst-robust6.c: New file.
5083         * tst-robust7.c: New file.
5084         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
5085         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
5086         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
5087         tst-robust5, tst-robust6, and tst-robust7.
5089         * tst-typesizes.c: New file.
5090         * Makefile (tests): Add tst-typesizes.
5092         * tst-once3.c: More debug output.
5094 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
5096         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
5097         missing after last change.
5099         * version.c: Update copyright year.
5101 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
5103         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
5104         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
5105         * pthread_mutex_trylock.c: Likewise.
5106         * pthread_mutex_timedlock.c: Likewise.
5107         * pthread_mutex_unlock.c: Likewise.
5109 2005-12-22  Roland McGrath  <roland@redhat.com>
5111         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
5112         so that #include_next's search location is not reset to the -I..
5113         directory where <nptl/...> can be found.
5115 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
5117         [BZ #1913]
5118         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5119         Fix unwind info.  Remove useless branch prediction prefix.
5120         * tst-cancel24.cc: New file.
5121         * Makefile: Add rules to build and run tst-cancel24.
5123 2005-12-21  Roland McGrath  <roland@redhat.com>
5125         * libc-cancellation.c: Use <> rather than "" #includes.
5126         * pt-cleanup.c: Likewise.
5127         * pthread_create.c: Likewise.
5128         * pthread_join.c: Likewise.
5129         * pthread_timedjoin.c: Likewise.
5130         * pthread_tryjoin.c: Likewise.
5131         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
5132         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
5133         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
5134         * unwind.c: Likewise.
5136 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5138         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
5139         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
5140         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5141         THREAD_COPY_POINTER_GUARD): Define.
5143 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
5145         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
5146         rather than one.
5147         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5148         THREAD_COPY_POINTER_GUARD): Define.
5149         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
5150         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
5151         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5152         THREAD_COPY_POINTER_GUARD): Define.
5153         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
5154         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
5155         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
5156         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
5157         Use PTR_DEMANGLE for B0 if defined.
5159 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
5161         * pthread_create.c (__pthread_create_2_1): Use
5162         THREAD_COPY_POINTER_GUARD if available.
5163         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
5164         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
5165         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
5166         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
5167         * sysdeps/x86_64/tls.h: Likewise.
5169 2005-12-15  Roland McGrath  <roland@redhat.com>
5171         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
5173 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
5175         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
5176         sysdeps/generic.
5177         * errno-loc.c: New file.
5179 2005-12-12  Roland McGrath  <roland@redhat.com>
5181         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
5182         adjustments before choosing stack size.  Update minimum stack size
5183         calculation to match allocate_stack change.
5185 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
5187         * allocatestack.c (allocate_stack): Don't demand that there is an
5188         additional full page available on the stack beside guard, TLS, the
5189         minimum stack.
5191 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
5193         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5194         (__cleanup_fct_attribute): Use __regparm__ not regparm.
5196         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
5197         compiling 32-bit code we must define __cleanup_fct_attribute.
5199 005-11-24  Jakub Jelinek  <jakub@redhat.com>
5201         [BZ #1920]
5202         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
5203         __attribute__ instead of __attribute.
5204         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5205         (__cleanup_fct_attribute): Likewise.
5207 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
5209         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
5210         a write barrier before writing libgcc_s_getcfa.
5212 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
5214         * sysdeps/unix/sysv/linux/configure: Removed.
5216 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
5218         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
5219         optional init_array/fini_array support.
5221 2005-10-24  Roland McGrath  <roland@redhat.com>
5223         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
5224         versioned_symbol use.
5226 2005-10-16  Roland McGrath  <roland@redhat.com>
5228         * init.c (__pthread_initialize_minimal_internal): Even when using a
5229         compile-time default stack size, apply the minimum that allocate_stack
5230         will require, and round up to page size.
5232 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
5234         * Makefile ($(test-modules)): Remove static pattern rule.
5236 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
5237             Ulrich Drepper  <drepper@redhat.com>
5239         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
5240         alignment in callback function.
5241         * Makefile: Add rules to build and run tst-align3.
5242         * tst-align3.c: New file.
5244 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
5246         * allocatestack.c (setxid_signal_thread): Add
5247         INTERNAL_SYSCALL_DECL (err).
5249 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
5251         * allocatestack.c (setxid_signal_thread): Need to use
5252         atomic_compare_and_exchange_bool_acq.
5254 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
5255             Jakub Jelinek  <jakub@redhat.com>
5257         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
5258         CANCEL_RESTMASK.
5259         (struct pthread): Move specific_used field to avoid padding.
5260         Add setxid_futex field.
5261         * init.c (sighandler_setxid): Reset setxid flag and release the
5262         setxid futex.
5263         * allocatestack.c (setxid_signal_thread): New function.  Broken
5264         out of the bodies of the two loops in __nptl_setxid.  For undetached
5265         threads check whether they are exiting and if yes, don't send a signal.
5266         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
5267         * pthread_create.c (start_thread): For undetached threads, check
5268         whether setxid bit is set.  If yes, wait until signal has been
5269         processed.
5271         * allocatestack.c (STACK_VARIABLES): Initialize them.
5272         * pthread_create.c (__pthread_create_2_1): Initialize pd.
5274 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
5276         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
5277         waiters, awake all waiters on the associated mutex.
5279 2005-09-22  Roland McGrath  <roland@redhat.com>
5281         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
5282         ../sysdeps/x86_64/hp-timing.h).
5284 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
5286         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
5287         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5288         (lll_futex_wake_unlock): Define.
5289         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
5290         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5291         (lll_futex_wake_unlock): Define.
5292         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
5293         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5294         (lll_futex_wake_unlock): Define.
5295         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
5296         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5297         (lll_futex_wake_unlock): Define.
5298         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
5299         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5300         (lll_futex_wake_unlock): Define.
5301         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
5302         lll_futex_wake_unlock.
5303         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
5304         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5305         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5306         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
5307         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5308         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5310 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5312         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5313         Fix typo in register name.
5315 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
5317         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5318         Use __sigfillset.  Document that sigfillset does the right thing wrt
5319         to SIGSETXID.
5321 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
5323         [BZ #1102]
5324         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
5325         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
5326         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
5327         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
5328         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
5329         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
5330         in the structure.
5331         * Makefile (tests): Add tst-initializers1.
5332         (CFLAGS-tst-initializers1.c): Set.
5333         * tst-initializers1.c: New test.
5335 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
5337         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
5338         Make sure __flags are located at offset 48 from the start of the
5339         structure.
5341 2005-07-02  Roland McGrath  <roland@redhat.com>
5343         * Makeconfig: Comment fix.
5345 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
5347         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
5348         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
5349         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
5350         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
5351         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5352         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5353         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
5354         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
5355         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
5356         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5358 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
5360         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
5361         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5362         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
5363         fields.
5364         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5365         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
5366         field.  Put in sysinfo field unconditionally.
5367         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5368         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
5369         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5370         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
5371         fields.
5372         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5373         * pthread_create.c (__pthread_create_2_1): Use
5374         THREAD_COPY_STACK_GUARD macro.
5375         * Makefile: Add rules to build and run tst-stackguard1{,-static}
5376         tests.
5377         * tst-stackguard1.c: New file.
5378         * tst-stackguard1-static.c: New file.
5380 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
5382         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5383         Invoke CGOTSETUP and CGOTRESTORE.
5384         (CGOTSETUP, CGOTRESTORE): Define.
5386 2005-05-29  Richard Henderson  <rth@redhat.com>
5388         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
5389         (tf_write, tf_writev): Use it.
5390         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
5391         the system minimum.
5393 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
5395         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5396         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
5397         __librt_*_asynccancel@local.
5399 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
5401         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
5402         all occurrences of JUMPTARGET.  Instead append @local to labels.
5404 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
5406         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
5407         size/alignment of struct pthread rather than tcbhead_t.
5408         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5409         Likewise.
5410         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5411         Likewise.
5412         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5413         Likewise.
5415 2005-05-19  Richard Henderson  <rth@redhat.com>
5417         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
5418         __sync_val_compare_and_swap, not explicit _si variant.
5419         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
5421 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
5423         [BZ #915]
5424         * sysdeps/pthread/pthread.h: Avoid empty initializers.
5426 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
5428         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
5429         .eh_frame section, use cfi_* directives.
5431 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
5433         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
5434         of "" includes.
5436 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
5438         [BZ #1075]
5439         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
5440         aio_write blocks.
5442 2005-04-27  Roland McGrath  <roland@redhat.com>
5444         * Makefile (tests): Remove tst-clock2.
5446         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
5447         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
5448         translating to the kernel clockid_t for our own process/thread clock.
5450         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
5452 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
5454         * old_pthread_cond_init.c: Include <errno.h>.
5455         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
5456         process shared or uses clock other than CLOCK_REALTIME.
5457         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
5459 2005-04-13  David S. Miller  <davem@davemloft.net>
5461         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
5462         * sysdeps/sparc/sparc64/clone.S: New file.
5464 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
5466         [BZ #1102]
5467         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
5468         __inline instead of inline.
5469         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
5471 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
5473         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
5474         functionally equivalent, but shorter instructions.
5475         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5476         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5477         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5478         Likewise.
5479         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
5480         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5481         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5482         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5483         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5484         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
5485         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5486         Likewise.
5487         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5488         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5489         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5490         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
5491         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
5493 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
5495         * sysdeps/mips/Makefile: New file.
5496         * sysdeps/mips/nptl-sysdep.S: New file.
5497         * sysdeps/mips/tcb-offsets.sym: New file.
5498         * sysdeps/mips/pthread_spin_lock.S: New file.
5499         * sysdeps/mips/pthread_spin_trylock.S: New file.
5500         * sysdeps/mips/pthreaddef.h: New file.
5501         * sysdeps/mips/tls.h: New file.
5502         * sysdeps/mips/jmpbuf-unwind.h: New file.
5503         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
5504         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
5505         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
5506         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
5507         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
5508         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
5509         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
5510         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
5511         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
5512         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
5514 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
5516         [BZ #1112]
5517         * pthread_create.c (__pthread_create_2_1): Rename syscall error
5518         variable to scerr.
5520 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
5522         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
5524 2005-02-25  Roland McGrath  <roland@redhat.com>
5526         * alloca_cutoff.c: Correct license text.
5527         * tst-unload.c: Likewise.
5528         * sysdeps/pthread/allocalim.h: Likewise.
5529         * sysdeps/pthread/pt-initfini.c: Likewise.
5530         * sysdeps/pthread/bits/libc-lock.h: Likewise.
5531         * sysdeps/pthread/bits/sigthread.h: Likewise.
5532         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
5533         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
5535 2005-02-16  Roland McGrath  <roland@redhat.com>
5537         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
5538         Use unsigned int * for ptr_nthreads.
5540 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
5542         [BZ #721]
5543         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
5544         gcc4.
5546 2005-02-07  Richard Henderson  <rth@redhat.com>
5548         [BZ #787]
5549         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
5550         argument.
5552 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
5554         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
5555         order of arguments in invocation of atomic_add_zero.
5557 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
5559         [BZ #737]
5560         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
5561         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
5562         at least gotntpoff relocation and addition.
5563         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
5564         Likewise.
5565         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
5566         Likewise.
5567         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5568         Likewise.
5570 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
5572         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
5573         entry for static tls deallocation fix.
5574         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
5575         also contains information whether the memory pointed to is static
5576         TLS or not.
5577         * sysdeps/i386/tls.h: Likewise.
5578         * sysdeps/ia64/tls.h: Likewise.
5579         * sysdeps/powerpc/tls.h: Likewise.
5580         * sysdeps/s390/tls.h: Likewise.
5581         * sysdeps/sh/tls.h: Likewise.
5582         * sysdeps/sparc/tls.h: Likewise.
5583         * sysdeps/x86_64/tls.h: Likewise.
5585 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
5587         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
5589 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
5591         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
5592         %esp.
5593         * Makefile (tests): Add tst-align2.
5594         * tst-align2.c: New test.
5595         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
5596         -mpreferred-stack-boundary=4.
5598 2004-12-18  Roland McGrath  <roland@redhat.com>
5600         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
5601         New file removed withdrawn for the moment.
5603 2004-12-17  Richard Henderson  <rth@redhat.com>
5605         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
5606         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
5608 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
5610         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
5611         Increased PTHREAD_STACK_MIN.
5613         * tst-context1.c (stacks): Use bigger stack size.
5615 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
5617         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
5618         * sysdeps/sparc/tcb-offsets.sym: Add TID.
5620 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
5622         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
5623         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
5624         * sysdeps/s390/tcb-offsets.sym (TID): Add.
5626 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
5628         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
5630 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
5632         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
5633         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
5635         * tst-getpid1.c: If child crashes, report this first.  Print which
5636         signal.
5638 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
5640         * init.c (__pthread_initialize_minimal_internal): Also unblock
5641         SIGSETXID.
5643 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
5645         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
5646         _POSIX_THREAD_CPUTIME): Define to 0.
5647         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
5648         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
5649         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
5650         __timer_signal_thread_tclk): Remove.
5651         (init_module): Remove their initialization.
5652         (thread_cleanup): Remove their cleanup assertions.
5653         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
5654         __timer_signal_thread_tclk): Remove.
5655         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
5656         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
5657         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
5659 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
5661         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
5662         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
5664         * Makefile (tests): Add tst-getpid2.
5665         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
5666         (do_test): Use it.  Use __clone2 instead of clone on ia64.
5667         * tst-getpid2.c: New test.
5669 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5671         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
5673 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
5675         * Makefile (tests): Add tst-getpid1.
5676         * tst-getpid1.c: New file.
5677         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
5678         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
5680 2004-12-02  Roland McGrath  <roland@redhat.com>
5682         * Makefile (libpthread-nonshared): Variable removed.
5683         ($(objpfx)libpthread_nonshared.a): Target removed.
5684         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
5685         These are now handled by generic magic from
5686         libpthread-static-only-routines being set.
5688 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
5690         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
5691         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
5692         _POSIX_THREAD_PRIO_PROTECT): Define.
5693         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5694         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5695         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5697 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
5699         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
5700         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
5701         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
5702         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
5703         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5704         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5705         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5707 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
5709         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
5711         * Makefile (libpthread-routines): Add pthread_setschedprio.
5712         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
5713         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
5714         * pthread_setschedprio.c: New file.
5716 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
5718         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
5719         * pthread_cancel.c (pthread_create): Likewise.
5721         * Makefile (libpthread-routines): Add vars.
5722         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
5723         * init.c (__default_stacksize, __is_smp): Remove.
5724         * vars.c: New file.
5725         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
5726         and define a wrapper macro.
5727         (PTHREAD_STATIC_FN_REQUIRE): Define.
5728         * allocatestack.c (__find_thread_by_id): Undefine.
5729         * pthread_create (__pthread_keys): Remove.
5730         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
5731         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
5732         PTHREAD_STATIC_FN_REQUIRE.
5734 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5736         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
5737         parameter to REGISTER macro.
5739 2004-11-17  Roland McGrath  <roland@redhat.com>
5741         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
5742         Make sure SIGCANCEL is blocked as well.
5744 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
5746         * sysdeps/pthread/setxid.h: New file.
5747         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
5748         (struct xid_command): Add forward decl.
5749         (struct pthread_functions): Change return type of __nptl_setxid hook
5750         to int.
5751         * pthreadP.h (__nptl_setxid): Change return type to int.
5752         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
5753         calling thread, return its return value and set errno on failure.
5754         * descr.h (struct xid_command): Change id type to long array.
5756         * Makefile: Add rules to build and test tst-setuid1 and
5757         tst-setuid1-static.
5758         * tst-setuid1.c: New test.
5759         * tst-setuid1-static.c: New test.
5761 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
5763         * Makefile (tests): Add tst-exit3.
5764         * tst-exit3.c: New test.
5766 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
5768         * Makefile (tests): Add tst-exit2.
5769         * tst-exit2.c: New file.
5771 2004-11-09  Roland McGrath  <roland@redhat.com>
5773         [BZ #530]
5774         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
5775         here, before calling clone.
5776         * pthread_create.c (start_thread): Don't do it here.
5778 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
5780         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
5782 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
5784         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
5785         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
5786         assembler warning.
5788 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
5790         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
5791         if sched_priority is not between minprio and maxprio.
5793 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5795         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5796         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
5798         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
5799         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
5801 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
5803         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
5804         not-cancelable I/O functions.
5806 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5808         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
5809         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
5810         make sure 2 is stored in the futex and we looked at the old value.
5811         Fix a few other problems to return the correct value.
5813 2004-10-14  Richard Henderson  <rth@redhat.com>
5815         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
5816         make gcc4 happy.
5818 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
5820         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
5821         of pthread-functions.h and pthreaddef.h.
5822         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
5824         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5825         Change __data.__nwaiters from int to unsigned int.
5827         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
5828         sysconf (_SC_THREAD_CPUTIME) returns negative value.
5830         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
5831         before return type.
5833         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
5834         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
5836 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
5838         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
5839         test fails, remove message queue.
5840         (tf_msgsnd): Likewise.
5842 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
5844         * tst-clock1.c: Change #ifdef to #if defined.
5845         * tst-clock2.c: Likewise.
5846         * tst-cond11.c: Likewise.
5848         * sysdeps/pthread/timer_create.c (timer_create): Use
5849         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
5850         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
5851         THREAD_CPUTIME.
5853 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
5855         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
5856         _POSIX_THREAD_CPUTIME): Define to 0.
5858 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
5860         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
5861         and _POSIX_THREAD_CPUTIME to zero.
5862         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5863         * tst-barrier2.c: Fix testing for POSIX feature.
5864         * tst-clock1.c: Likewise.
5865         * tst-clock2.c: Likewise.
5866         * tst-cond11.c: Likewise.
5867         * tst-cond4.c: Likewise.
5868         * tst-cond6.c: Likewise.
5869         * tst-flock2.c: Likewise.
5870         * tst-mutex4.c: Likewise.
5871         * tst-mutex9.c: Likewise.
5872         * tst-rwlock12.c: Likewise.
5873         * tst-rwlock4.c: Likewise.
5874         * tst-signal1.c: Likewise.
5875         * tst-spin2.c: Likewise.
5876         * sysdeps/pthread/posix-timer.h: Likewise.
5877         * sysdeps/pthread/timer_create.c: Likewise.
5878         * sysdeps/pthread/timer_routines.c: Likewise.
5880 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
5882         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5883         (__lll_mutex_timedlock_wait): Address futex correctly.
5885         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5886         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
5887         make sure 2 is stored in the futex and we looked at the old value.
5888         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5889         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
5890         which might very well made the code not working at all before.
5891         [BZ #417]
5893 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
5895         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
5896         allow SIGSETXID to be sent.
5897         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
5898         for SIGSETXID to be defined.
5899         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
5900         SIGSETXID cannot be blocked.
5902         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5903         Add __extension__ to long long types.
5904         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5905         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5906         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5907         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5908         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5909         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5910         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5912 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
5914         * descr.h (struct pthread): Add stopped_start field.
5915         * sysdeps/pthread/createthread.c (create_thread): Set
5916         start_stopped flag in descriptor for new thread appropriately.
5917         * pthread_create.c (start_thread): Only take lock to be stopped on
5918         startup if stopped_start flag says so.
5920 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
5922         * pthread_create.c (__pthread_create_2_1): Remember whether thread
5923         is created detached and if yes, do not try to free the stack in case
5924         the thread creation failed.
5925         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
5926         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
5927         case there has been no error.  [BZ #405]
5929         * pthread_create.c (start_thread): Don't wait for scheduler data
5930         etc to be set at the beginning of the function.  The cancellation
5931         infrastructure must have been set up.  And enable async
5932         cancellation before potentially going to sleep.  [BZ #401]
5934 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
5936         * Versions: Remove exports for pthread_set*id_np functions.
5937         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
5938         for now.
5939         * Makefile: Don't build pthread_set*id code for now.
5941 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
5943         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
5944         internal use.
5945         * allocatestack.c (__nptl_setxid): New function.
5946         * descr.h (struct xid_command): Define type.
5947         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
5948         (sighandler_setxid): New function.
5949         (__pthread_initialize_minimal): Register sighandler_setxid for
5950         SIGCANCEL.
5951         * pt-allocrtsig.c: Update comment.
5952         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
5953         Declare __nptl_setxid.
5954         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
5955         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
5956         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
5957         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
5958         and pthread_setresuid_np.
5959         * pthread_setgid_np.c: New file.
5960         * pthread_setuid_np.c: New file.
5961         * pthread_setegid_np.c: New file.
5962         * pthread_seteuid_np.c: New file.
5963         * pthread_setregid_np.c: New file.
5964         * pthread_setreuid_np.c: New file.
5965         * pthread_setresgid_np.c: New file.
5966         * pthread_setresuid_np.c: New file.
5967         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
5968         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
5969         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
5970         and pthread_setresuid_np.
5971         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
5972         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
5973         pthread_setregid, and pthread_setresgid.
5975 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
5977         * allocatestack.c (allocate_stack): Return EAGAIN instead of
5978         ENOMEM when out of memory.
5980 2004-09-10  Roland McGrath  <roland@redhat.com>
5982         [BZ #379]
5983         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
5984         code, since we don't try to use the broken CLONE_STOPPED any more.
5985         * pthread_create.c (start_thread): Likewise.
5987 2004-09-15  Richard Henderson  <rth@redhat.com>
5989         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
5991 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
5993         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
5994         (__libc_unwind_longjmp): Delete macro and declare as function.
5995         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
5996         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
5997         nptl directory.
5998         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
5999         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
6000         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
6002 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
6004         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
6005         for __USE_XOPEN2K.
6006         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
6007         types also for __USE_XOPEN2K.
6008         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6009         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6010         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6011         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6012         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6013         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6014         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6015         [BZ #320]
6017 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
6019         * sysdeps/pthread/pthread.h
6020         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
6021         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
6022         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
6023         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
6024         [BZ #375]
6026 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
6028         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
6029         PSEUDO to be used with . prefix.
6031         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
6032         Use atomic_increment instead of atomic_exchange_and_add.
6033         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
6034         Likewise.
6035         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
6036         Likewise.
6037         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
6038         Likewise.
6040         * allocatestack.c (allocate_stack): Use atomic_increment_val
6041         instead of atomic_exchange_and_add.
6042         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
6043         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
6044         Likewise.
6045         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6046         Likewise.
6048         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
6049         the initialization function might throw.
6051 2005-09-05  Richard Henderson  <rth@redhat.com>
6053         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
6054         Move definition inside libpthread, libc, librt check.  Provide
6055         definition for rtld.
6057 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
6059         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
6060         * sysdeps/i386/jmpbuf-unwind.h: Likewise
6061         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
6062         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
6063         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
6064         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
6065         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
6066         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
6067         * unwind.c: Use it.
6069         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6070         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
6071         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6072         Likewise.
6073         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
6074         Decrement __nwaiters.  If pthread_cond_destroy has been called and
6075         this is the last waiter, signal pthread_cond_destroy caller and
6076         avoid using the pthread_cond_t structure after unlock.
6077         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6078         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6079         Read clock type from the least significant bits of __nwaiters instead
6080         of __clock.
6081         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6082         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
6084 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
6086         [BZ #342]
6087         * Makefile (tests): Add tst-cond20 and tst-cond21.
6088         * tst-cond20.c: New test.
6089         * tst-cond21.c: New test.
6090         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
6091         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
6092         it unsigned int.
6093         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6094         Likewise.
6095         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6096         (pthread_cond_t): Likewise.
6097         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6098         Likewise.
6099         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6100         Likewise.
6101         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6102         Likewise.
6103         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
6104         (cond_nwaiters): New.
6105         (clock_bits): New.
6106         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
6107         if there are waiters not signalled yet.
6108         Wait until all already signalled waiters wake up.
6109         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
6110         __nwaiters.  If pthread_cond_destroy has been called and this is the
6111         last waiter, signal pthread_cond_destroy caller and avoid using
6112         the pthread_cond_t structure after unlock.
6113         (__pthread_cond_wait): Increment __nwaiters in the beginning,
6114         decrement it when leaving.  If pthread_cond_destroy has been called
6115         and this is the last waiter, signal pthread_cond_destroy caller.
6116         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6117         Likewise.  Read clock type from the least significant bits of
6118         __nwaiters instead of __clock.
6119         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
6120         whether clock ID can be encoded in COND_CLOCK_BITS bits.
6121         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
6122         clock type just from the last COND_CLOCK_BITS bits of value.
6123         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
6124         instead of __clock, just from second bit of condattr's value.
6126 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
6128         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
6129         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
6130         != 64.
6131         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6133 2004-08-15  Roland McGrath  <roland@frob.com>
6135         * pthread_atfork.c: Update copyright terms including special exception
6136         for these trivial files, which are statically linked into executables
6137         that use dynamic linking for the significant library code.
6139 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
6141         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
6142         pthread_rwlock_rdlock.
6143         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
6144         Decrease __nr_readers_queued after reacquiring lock.
6145         * sysdeps/pthread/pthread_rwlock_timedrdlock
6146         (pthread_rwlock_timedrdlock): Likewise.
6147         Reported by Bob Cook <bobcook47@hotmail.com>.
6149 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
6151         * tst-rwlock14.c (tf): Read main thread handle from *ARG
6152         before pthread_barrier_wait.
6154 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
6156         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
6157         Remove unnecessary exception handling data.
6159 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
6161         [BZ #284]
6162         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
6163         instead of clockid_t.
6165 2004-07-21  Roland McGrath  <roland@redhat.com>
6167         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
6169 2004-07-19  Roland McGrath  <roland@redhat.com>
6171         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
6173 2004-07-02  Roland McGrath  <roland@redhat.com>
6175         * configure: Don't exit.
6177 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6179         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6180         (__pthread_cond_timedwait): Check for invalid nanosecond in
6181         timeout value.
6183 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
6185         * Makefile: Add rules to build and run tst-fini1.
6186         * tst-fini1.c: New file.
6187         * tst-fini1mod.c: New file.
6189 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
6191         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
6192         if no cancellation support is needed.
6193         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6194         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6195         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6196         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6197         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6198         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6199         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6200         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
6201         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
6203         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
6204         only if not already defined.
6206 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
6208         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
6209         constraint "m" instead of "0" for futex.
6211         * shlib-versions: Add powerpc64-.*-linux.*.
6213 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
6215         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
6216         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
6217         for valid tv_nsec.
6218         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
6219         1 billion and 64-bit tv_nsec which is valid when truncated to 32
6220         bits.
6222 2004-06-29  Roland McGrath  <roland@redhat.com>
6224         * Banner: NPTL no longer has its own version number.
6225         * Makefile (nptl-version): Variable removed.
6226         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
6227         using $(version), the glibc version number.
6229 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6231         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6232         Fix branch offset for a PLT entry.
6233         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
6234         Likewise.
6235         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
6236         Likewise.
6237         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
6238         Likewise.
6239         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
6240         Likewise.
6242 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
6244         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
6245         unconditionally.
6247 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
6249         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
6250         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
6251         instead of tv_sec.
6252         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
6253         (pthread_rwlock_timedrdlock): Likewise.
6255 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
6257         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6258         Set __r7 to val, not mutex.
6260 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
6262         * Makefile: Add rules to build tst-rwlock14.
6263         * tst-rwlock14.c: New file.
6265 2004-06-24  Boris Hu  <boris.hu@intel.com>
6267         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
6268         check.
6269         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6271 2004-06-19  Andreas Jaeger  <aj@suse.de>
6273         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
6274         assembler in last patch.
6276 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
6278         * sysdeps/pthread/pthread_cond_timedwait.c
6279         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
6280         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6281         (__pthread_cond_timedwait): Check for invalid nanosecond in
6282         timeout value.
6283         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6284         * tst-cond19.c: New file.
6285         * Makefile: Add rules to build and run tst-cond19.
6287 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
6289         * tst-context1.c (GUARD_PATTERN): Defined.
6290         (tst_context_t): Define struct containing ucontext_t & guard words.
6291         (ctx): Declare as an array of tst_context_t.
6292         (fct): Verify uc_link & guard words are still valid.
6293         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
6295 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6297         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6298         Add __data.__futex field, reshuffle __data.__clock.
6299         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
6300         (__pthread_cond_signal): Increment __futex at the same time as
6301         __wakeup_seq or __total_seq.  Pass address of __futex instead of
6302         address of low 32-bits of __wakeup_seq to futex syscall.
6303         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6304         (__pthread_cond_wait): Likewise.  Pass __futex value from before
6305         releasing internal lock to FUTEX_WAIT.
6306         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6307         (__pthread_cond_timedwait): Likewise.
6308         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6309         (FUTEX_CMP_REQUEUE): Define.
6310         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6311         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6312         Pass __futex value from before the unlock and __futex address instead
6313         of address of low 32-bits of __wakeup_seq to futex syscall.
6314         Fallback to FUTEX_WAKE all on any errors.
6316 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
6318         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
6319         comment typo.
6320         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
6321         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
6322         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
6323         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
6324         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
6326 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
6328         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
6329         Add memory clobber to inline assembly.
6330         (__lll_mutex_trylock): Likewise.
6331         (__lll_mutex_cond_trylock): Likewise.
6333 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
6335         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6336         Pass val argument as 6th system call argument in %r7.
6338 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
6340         * Makefile (tests): Add tst-cond16.
6341         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
6342         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
6343         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6344         Add __data.__futex field, reshuffle __data.__clock.
6345         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
6346         (__pthread_cond_signal): Increment __futex at the same time as
6347         __wakeup_seq or __total_seq.  Pass address of __futex instead of
6348         address of low 32-bits of __wakeup_seq to futex syscall.
6349         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
6350         (__pthread_cond_wait): Likewise.  Pass __futex value from before
6351         releasing internal lock to FUTEX_WAIT.
6352         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
6353         (__pthread_cond_timedwait): Likewise.
6354         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
6355         (FUTEX_CMP_REQUEUE): Define.
6356         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6357         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6358         Pass __futex value from before the unlock and __futex address instead
6359         of address of low 32-bits of __wakeup_seq to futex syscall.
6360         Fallback to FUTEX_WAKE all on any errors.
6361         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
6362         Define.
6363         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6364         internally.  Return non-zero if error, zero if success.
6365         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6366         Add __data.__futex field, reshuffle __data.__clock.
6367         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
6368         Define.
6369         (lll_futex_requeue): Add val argument, return 1 unconditionally
6370         for the time being.
6371         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6372         Add __data.__futex field, reshuffle __data.__clock.
6373         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6374         Define.
6375         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6376         internally.  Return non-zero if error, zero if success.
6377         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6378         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
6379         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6380         Define.
6381         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6382         internally.  Return non-zero if error, zero if success.
6383         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6384         Add __data.__futex field, reshuffle __data.__clock.
6385         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
6386         Define.
6387         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6388         internally.  Return non-zero if error, zero if success.
6389         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6390         Add __data.__futex field, reshuffle __data.__clock.
6391         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6392         Add __data.__futex field, reshuffle __data.__clock.
6393         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
6394         Increment __futex at the same time as __wakeup_seq or __total_seq.
6395         Pass address of __futex instead of address of low 32-bits of
6396         __wakeup_seq to futex syscall.
6397         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6398         Pass __futex value from before releasing internal lock
6399         to FUTEX_WAIT.
6400         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6401         Likewise.  Avoid unnecessary shadowing of variables.
6402         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
6403         Set __futex to 2 * __total_seq.  Pass __futex value from before the
6404         unlock and __futex address instead of address of low 32-bits of
6405         __wakeup_seq to futex_requeue macro, adjust for new return value
6406         meaning.
6407         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
6408         (__pthread_cond_signal): Increment __futex at the same time as
6409         __wakeup_seq or __total_seq.  Pass address of __futex instead of
6410         address of low 32-bits of __wakeup_seq to futex syscall.
6411         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
6412         (__pthread_cond_wait): Likewise.  Pass __futex value from before
6413         releasing internal lock to FUTEX_WAIT.
6414         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6415         (__pthread_cond_timedwait): Likewise.
6416         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6417         (FUTEX_CMP_REQUEUE): Define.
6418         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6419         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6420         Pass __futex value from before the unlock and __futex address instead
6421         of address of low 32-bits of __wakeup_seq to futex syscall.
6422         Fallback to FUTEX_WAKE all on any errors.
6424 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6426         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
6427         Add nop to align the end of critical section.
6428         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
6430 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6432         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6433         Add __broadcast_seq field.
6434         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
6435         all waiters as woken with woken_seq and bump broadcast counter.
6436         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
6437         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
6438         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6439         Comment typo fixes.  Avoid returning -ETIMEDOUT.
6441 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
6443         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6444         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
6445         Reported by Kaz Kojima.
6447 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
6449         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
6451 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
6453         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
6454         __broadcast_seq with bc_seq after acquiring internal lock instead of
6455         before it.
6457 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
6459         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
6460         compilation.
6461         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6462         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
6463         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6464         (pthread_cond_t): Add __data.__broadcast_seq field.
6465         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6466         (FRAME_SIZE): Define.
6467         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
6468         Comment typo fixes.
6469         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
6470         Define.
6471         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
6472         typo fixes.
6473         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6474         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
6475         fixes.
6477 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
6479         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
6480         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6481         Add __broadcast_seq field.
6482         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6483         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6484         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6485         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6486         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6487         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
6488         all waiters as woken with woken_seq and bump broadcast counter.
6489         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
6490         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
6491         __broadcast_seq field.
6492         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6493         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6494         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
6495         * pthread_cond_init.c: Initialize __broadcast_seq field.
6496         * Makefile (tests): Add tst-cond17 and tst-cond18.
6497         Add .NOTPARALLEL goal.
6498         * tst-cond16.c: New file.  From Jakub.
6499         * tst-cond17.c: New file.  From Jakub.
6500         * tst-cond18.c: New file.  From Jakub.
6502 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
6504         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
6505         unwind info.
6507         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
6508         Parametrize frame size.  Correct some unwind info.
6509         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6511 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
6513         * tst-stack3.c: Note testing functionality beyond POSIX.
6515 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
6517         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
6518         Change conditional from ifdef to if.
6520 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
6522         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
6523         SYSDEP_CANCEL_ERROR): Define.
6524         (PSEUDO): Use it.
6526 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
6528         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
6530 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
6532         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
6534 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6536         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
6537         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6538         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
6539         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6541 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
6543         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
6544         thread has all signals blocked.
6546 2004-04-18  Andreas Jaeger  <aj@suse.de>
6548         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
6549         (SEM_VALUE_MAX): Add missing brace.
6551 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
6553         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
6554         in rt subdir.
6555         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
6556         * sysdeps/pthread/tst-mqueue8x.c: New test.
6557         * tst-cancel4.c: Update comment about message queues.
6559         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
6560         return it_value { 0, 0 }.
6561         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
6562         like SIGEV_SIGNAL.
6563         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
6564         assertion for SIGEV_NONE.
6565         (thread_attr_compare): Compare all attributes, not just a partial
6566         subset.
6568 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
6570         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
6572 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
6574         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
6575         Just use a plain number.
6576         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
6577         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
6578         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
6579         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
6580         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
6581         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
6582         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6584 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6586         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
6587         frame info.
6588         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6590 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
6592         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
6593         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
6594         of calling sigwaitinfo.
6596 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
6598         * allocatestack.c (allocate_stack): Set reported_guardsize
6599         unconditionally.
6600         * pthread_getattr_np.c (pthread_getattr_np): Use
6601         reported_guardsize instead of guardsize.
6602         * descr.h (struct pthread): Add reported_guardsize field.
6604 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
6606         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
6608 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
6610         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
6612 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
6614         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
6615         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
6616         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
6617         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
6618         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
6619         Define.
6620         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
6621         (_POSIX_MESSAGE_PASSING): Define.
6622         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
6623         (_POSIX_MESSAGE_PASSING): Define.
6624         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
6625         (_POSIX_MESSAGE_PASSING): Define.
6627 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
6629         * tst-context1.c (fct): Check whether correct stack is used.
6631 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
6633         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
6634         matching constraints for asm mem parameters.
6636         * tst-clock2.c (tf): Don't define unless needed.
6638 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
6640         * Makefile (link-libc-static): Use $(static-gnulib) instead of
6641         $(gnulib).
6643 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
6645         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
6646         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
6647         * pthreadP.h: Declare __nptl_deallocate_tsd.
6648         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
6649         Adjust caller.
6651         * Makefile (tests): Add tst-tsd5.
6652         * tst-tsd5.c: New file.
6654 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
6656         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6657         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
6658         is SHLIB_COMPAT check.
6659         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
6660         (__pthread_attr_getaffinity_old): Likewise.
6661         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6662         (__pthread_getaffinity_old): Likewise.
6663         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6664         (__pthread_setaffinity_old): Likewise.
6666 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
6668         * allocatestack.c (_make_stacks_executable): Call
6669         _dl_make_stack_executable first.
6671 2004-03-24  Roland McGrath  <roland@redhat.com>
6673         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
6674         constraint instead of "0".
6676 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
6678         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6679         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
6681         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
6682         code to avoid warning.
6684 2004-03-24  Andreas Jaeger  <aj@suse.de>
6686         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6687         (__pthread_attr_setaffinity_old): Remove const.
6689 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
6691         * sysdeps/unix/sysv/linux/smp.h: New file.
6692         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
6693         * init.c: Define __is_smp.
6694         (__pthread_initialize_minimal_internal): Call is_smp_system to
6695         initialize __is_smp.
6696         * pthreadP.h: Declare __is_smp.
6697         Define MAX_ADAPTIVE_COUNT is necessary.
6698         * pthread_mutex_init.c: Add comment regarding __spins field.
6699         * pthread_mutex_lock.c: Implement adaptive mutex type.
6700         * pthread_mutex_timedlock.c: Likewise.
6701         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
6702         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
6703         Add __spins field.
6704         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6705         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6706         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6707         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6708         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6709         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6710         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6711         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
6712         lll_mutex_cond_trylock.
6713         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6714         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6715         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6716         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6717         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6718         Define BUSY_WAIT_NOP.
6719         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6720         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6722         * tst-mutex5.c: Add support for testing adaptive mutexes.
6723         * tst-mutex7.c: Likewise.
6724         * tst-mutex5a.c: New file.
6725         * tst-mutex7a.c: New file.
6726         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
6728         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6729         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
6730         vgettimeofday call might destroy the content.
6732         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
6733         @pause in the loop.
6735         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
6736         No need to restrict type of ret.  Make it int.  Add comment.
6738         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
6739         Remove unnecessary setne instruction.
6741 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
6743         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6744         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
6745         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
6746         If realloc fails, break out of the loop.
6748 2004-03-20  Andreas Jaeger  <aj@suse.de>
6750         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6751         (__pthread_setaffinity_old): Fix interface.
6752         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6753         (__pthread_getaffinity_old): Likewise.
6755         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6756         (__pthread_setaffinity_new): Remove duplicate declaration.
6758 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6760         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
6761         the return value to a safe register.
6762         (CDISABLE): Set the function argument correctly.
6764 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6766         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
6767         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
6768         Rewrite so that only one locked memory operation per round is needed.
6769         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
6770         (pthread_barrier_wait): After wakeup, release lock only when the
6771         last thread stopped using the barrier object.
6772         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6773         (__pthread_cond_wait): Don't store mutex address if the current
6774         value is ~0l.  Add correct cleanup support and unwind info.
6775         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6776         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6777         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
6778         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
6779         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6780         Add correct cleanup support and unwind info.
6781         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
6782         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
6783         information for syscall wrappers.
6785 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
6787         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6788         cpusetsize field, remove next.
6789         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
6790         parameter for size of the CPU set.
6791         (pthread_setaffinity_np): Likewise.
6792         (pthread_attr_getaffinity_np): Likewise.
6793         (pthread_attr_setaffinity_np): Likewise.
6794         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
6795         interface change, keep compatibility code.
6796         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
6797         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
6798         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
6799         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
6800         __pthread_getaffinity_np.
6801         * Versions: Add version for changed interfaces.
6802         * tst-attr3.c: Adjust test for interface change.
6803         * pthread_getattr_np.c: Query the kernel about the affinity mask with
6804         increasing buffer sizes.
6805         * pthread_attr_destroy.c: Remove unused list handling.
6806         * pthread_attr_init.c: Likewise.
6808 2004-03-17  Roland McGrath  <roland@redhat.com>
6810         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
6811         first argument to clock_getres so we ever enable kernel timers.
6813 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
6815         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
6817 2004-03-12  Richard Henderson  <rth@redhat.com>
6819         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
6820         oldvalue from CENABLE to CDISABLE.
6822 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
6824         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
6825         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
6826         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
6827         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
6829 2004-03-11  Richard Henderson  <rth@redhat.com>
6831         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
6832         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
6833         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
6835 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
6837         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
6838         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
6839         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
6841 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
6843         * forward.c (__pthread_cond_broadcast_2_0,
6844         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
6845         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
6846         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
6848 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6850         * sysdeps/sh/tcb-offsets.sym: Add PID.
6851         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
6852         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
6854 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
6856         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
6857         include <sysdep-cancel.h>, vfork is no cancellation point.
6858         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
6859         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
6860         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
6862 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
6864         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
6865         libc_hidden_def.
6866         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
6867         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
6868         Likewise.
6869         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
6870         Likewise.
6871         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
6872         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
6873         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
6874         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
6875         of DO_CALL_VIA_BREAK.  Work around a gas problem.
6877         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
6878         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
6879         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
6880         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
6881         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
6882         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
6884         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
6885         a local register for saving old PID.  Negate PID in parent upon exit.
6887         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
6888         tcb-offsets.h.
6889         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
6890         before syscall, set to the old value in the parent afterwards.
6891         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
6892         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
6893         tcb-offsets.h.
6894         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
6895         before syscall, set to the old value in the parent afterwards.
6896         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
6897         * sysdeps/s390/tcb-offsets.sym: Add PID.
6899         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
6900         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
6901         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
6902         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
6903         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
6904         * sysdeps/sparc/tcb-offsets.sym: Add PID.
6906 2004-03-10  Andreas Schwab  <schwab@suse.de>
6908         * sysdeps/ia64/tcb-offsets.sym: Add PID.
6909         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
6910         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
6912 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
6914         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
6915         * tst-cancel21.c (do_one_test): Likewise.
6916         Reported by Gordon Jin <gordon.jin@intel.com>.
6918 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
6920         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
6921         if non-zero and set to INT_MIN if zero.
6922         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
6923         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
6924         (SAVE_PID, RESTORE_PID): Define.
6925         (__vfork): Use it.
6926         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
6927         Use relative path to avoid including NPTL i386/vfork.S.
6928         (SAVE_PID, RESTORE_PID): Define.
6929         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
6930         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
6931         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
6932         tst-vfork2x.
6933         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
6934         * tst-vfork1.c: New test.
6935         * tst-vfork2.c: New test.
6936         * tst-vfork1x.c: New test.
6937         * tst-vfork2x.c: New test.
6939 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
6941         * sysdeps/i386/tcb-offsets.sym: Add PID.
6942         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6943         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
6944         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
6946 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
6948         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
6950 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
6952         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
6953         _rtld_global_ro.
6955 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
6957         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
6958         _rtld_global_ro.
6960         * tst-once4.c: Remove unnecessary macro definition.
6962         * tst-mutex7.c (do_test): Limit thread stack size.
6963         * tst-once2.c (do_test): Likewise.
6964         * tst-tls3.c (do_test): Likewise.
6965         * tst-tls1.c (do_test): Likewise.
6966         * tst-signal3.c (do_test): Likewise.
6967         * tst-kill6.c (do_test): Likewise.
6968         * tst-key4.c (do_test): Likewise.
6969         * tst-join4.c (do_test): Likewise.
6970         * tst-fork1.c (do_test): Likewise.
6971         * tst-context1.c (do_test): Likewise.
6972         * tst-cond2.c (do_test): Likewise.
6973         * tst-cond10.c (do_test): Likewise.
6974         * tst-clock2.c (do_test): Likewise.
6975         * tst-cancel10.c (do_test): Likewise.
6976         * tst-basic2.c (do_test): Likewise.
6977         * tst-barrier4.c (do_test): Likewise.
6979 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
6981         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
6983 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
6985         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6986         (__pthread_cond_timedwait): Optimize wakeup test.
6987         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
6988         (__pthread_cond_wait): Likewise.
6989         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6990         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6991         Likewise.
6993 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
6995         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6996         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
6997         the atomic instruction needed.
6998         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6999         (__lll_mutex_lock_wait): Likewise.
7001 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
7003         * Makefile (tests): Add tst-cond14 and tst-cond15.
7004         * tst-cond14.c: New file.
7005         * tst-cond15.c: New file.
7007 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
7009         * sysdeps/pthread/createthread.c (create_thread): Remove use of
7010         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
7011         needs to be implemented differently to be useful.
7013 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
7015         * pthread_attr_setschedparam.c: Don't test priority against limits
7016         here.  Set ATTR_FLAG_SCHED_SET flag.
7017         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
7018         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
7019         from parent thread to child.  If attribute is used and scheduling
7020         parameters are not inherited, copy parameters from attribute or
7021         compute them.  Check priority value.
7022         * pthread_getschedparam.c: If the parameters aren't known yet get
7023         them from the kernel.
7024         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
7025         ATTR_FLAG_POLICY_SET flag for thread.
7026         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
7027         and ATTR_FLAG_POLICY_SET.
7029         * sysdeps/pthread/createthread.c: Use tgkill if possible.
7031         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
7032         fail if stack address hasn't been set.  Just return 0.
7034 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
7036         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
7037         libpthread for the files in this list.
7038         (CFLAGS-tst-unload): Removed.
7039         * tst-unload.c (do_test): Don't use complete path for
7040         LIBPHREAD_SO.
7042         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
7043         tst-_res1mod2.
7045 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
7047         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7048         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
7049         operation per round is needed.
7050         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
7051         (__lll_mutex_lock_wait): Likewise.
7053 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
7055         * tst-cancel9.c (cleanup): Don't print to stderr.
7057 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7059         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
7061 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
7063         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
7064         (__syscall_error_handler2): Call CDISABLE.
7065         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
7066         (__syscall_error_handler2): Call CDISABLE.
7068         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7069         Release lock before the loop, don't reacquire it.
7071         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
7073 2004-02-19  Andreas Schwab  <schwab@suse.de>
7075         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7076         Fix last change.
7078 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
7080         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
7081         (pthread_barrier_wait): After wakeup, release lock only when the
7082         last thread stopped using the barrier object.
7083         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
7084         (pthread_barrier_wait): Likewise.
7085         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7086         Likewise.
7087         * Makefile (tests): Add tst-barrier4.
7088         * tst-barrier4.c: New file.
7090         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7091         (__pthread_cond_timedwait): Perform timeout test while holding
7092         internal lock to prevent wakeup race.
7093         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
7094         * sysdeps/pthread/pthread_cond_timedwait.c
7095         (__pthread_cond_timedwait): Likewise.
7096         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7097         (__pthread_cond_timedwait): Likewise.
7099 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
7101         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
7102         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
7103         * Makefile (tests): Add tst-rwlock13.
7104         * tst-rwlock13.c: New test.
7106 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
7108         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7109         (__condvar_tw_cleanup): Little optimization.
7110         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
7112 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
7114         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
7115         libpthread as "lib" parameter to SHLIB_COMPAT.
7116         (__novmx_siglongjmp): Fix typo in function name.
7117         (__novmx_longjmp): Fix typo in function name.
7119 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
7121         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
7122         __builtin_expect.
7124         * sysdeps/generic/pt-longjmp.c: Moved to...
7125         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
7127 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
7129         * Makefile (libpthread-routines): Add pt-cleanup.
7130         * pt-longjmp.c: Removed.
7131         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
7132         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
7133         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
7134         Version longjmp, siglongjmp for GLIBC_2.3.4.
7135         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
7137 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
7139         * sysdeps/pthread/pthread_cond_timedwait.c
7140         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
7141         Reuse code.  Add __builtin_expects.
7143         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7144         (__pthread_cond_timedwait): Get internal lock in case timeout has
7145         passed before the futex syscall.
7146         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7148 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
7150         * allocatestack.c: Pretty printing.
7152         * sysdeps/pthread/createthread.c (create_thread): Don't add
7153         CLONE_DETACHED bit if it is not necessary.
7155 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
7157         * pthread_getattr_np.c: Include ldsodefs.h.
7159 2004-01-16  Richard Henderson  <rth@redhat.com>
7161         * allocatestack.c: Don't declare __libc_stack_end.
7162         * init.c (__pthread_initialize_minimal_internal): Likewise.
7163         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
7165 2004-01-15  Richard Henderson  <rth@redhat.com>
7167         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
7168         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
7169         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
7170         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
7171         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
7172         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
7173         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
7174         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
7176 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
7178         * init.c (pthread_functions): Make array const.
7180 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
7182         * allocatestack.c (__make_stacks_executable): Change interface.
7183         Check parameters.  Pass parameter on to libc counterpart.
7184         * pthreadP.h: Change declaration.
7186 2004-01-13  Richard Henderson  <rth@redhat.com>
7188         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
7189         prototype form.
7190         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
7191         Likewise.
7193         * sysdeps/alpha/Makefile: New file.
7194         * sysdeps/alpha/tcb-offsets.sym: New file.
7195         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
7196         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
7198         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
7199         on powerpc version.
7201 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
7203         * Makefile (tests): Add tst-backtrace1.
7204         * tst-backtrace1.c: New test.
7206 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
7208         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
7209         register as second parameter to the REGISTER macro.
7210         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
7211         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
7212         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
7213         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
7214         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
7215         of thread register as second parameter to REGISTER macro in 64 case.
7217 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
7219         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
7220         (CFLAGS-getpid.o): Defined.
7221         (CFLAGS-getpid.os): Defined.
7223 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
7225         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
7226         returned for main thread does not overlap with any other VMA.
7227         Patch by Jakub Jelinek.
7229 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
7231         * tst-raise1.c: Include stdio.h.
7233 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
7235         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
7236         setting with __ASSUME_TGKILL || defined __NR_tgkill.
7237         If pid is 0, set it to selftid.
7238         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
7239         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
7240         != 0, return self->tid without doing a syscall.
7241         * descr.h (struct pthread): Move pid field after tid.
7243         * Makefile (tests): Add tst-raise1.
7244         * tst-raise1.c: New file.
7246 2003-12-23  Roland McGrath  <roland@redhat.com>
7248         * tst-oddstacklimit.c: New file.
7249         * Makefile (tests): Add it.
7250         (tst-oddstacklimit-ENV): New variable.
7252         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
7253         value up to page size for __default_stacksize.
7255 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
7257         * Makefile (tests): Add tst-eintr5.
7258         * tst-eintr5.c: New file.
7260         * eintr.c (eintr_source): Prevent sending signal to self.
7262         * tst-eintr2.c (tf1): Improve error message.
7264 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
7266         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
7267         * sysdeps/unix/sysv/linux/getpid.c: New file.
7268         * pthread_cancel.c: Add comment explaining use of PID field.
7269         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
7270         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
7271         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
7272         temporarily to signal the field must not be relied on and updated
7273         by getpid().
7274         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
7275         temporarily negative.
7276         * sysdeps/unix/sysv/linux/raise.c: Likewise.
7278 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
7280         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
7281         (eintr_source): If ARG != NULL, use pthread_kill.
7282         * tst-eintr1.c: Adjust for this change.
7283         * tst-eintr2.c: Likewise.
7284         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
7285         * tst-eintr3.c: New file.
7286         * tst-eintr4.c: New file.
7288 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
7290         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
7291         if CANCELSTATE_BITMASK is set.
7292         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
7293         Likewise.
7295         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
7296         (tests-reverse): Add tst-cancel23.
7297         * tst-cancel22.c: New test.
7298         * tst-cancel23.c: New test.
7300 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
7302         * tst-eintr1.c: Better error messages.
7304         * Makefile (tests): Add tst-eintr2.
7305         * tst-eintr2.c: New file.
7307 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
7309         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
7310         (CFLAGS-tst-cancelx21.c): Set.
7311         * tst-cancel21.c: New test.
7312         * tst-cancelx21.c: New test.
7314         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
7315         comparison operand.
7316         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
7317         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
7318         * pt-longjmp.c: Include jmpbuf-unwind.h.
7319         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
7320         _JMPBUF_UNWINDS.  Adjust compared pointers.
7321         * init.c (__pthread_initialize_minimal_internal): Initialize
7322         pd->stackblock_size.
7323         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
7324         * sysdeps/alpha/jmpbuf-unwind.h: New file.
7325         * sysdeps/i386/jmpbuf-unwind.h: New file.
7326         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
7327         * sysdeps/s390/jmpbuf-unwind.h: New file.
7328         * sysdeps/sh/jmpbuf-unwind.h: New file.
7329         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
7330         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
7331         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
7332         (_JMPBUF_CFA_UNWINDS): Remove.
7333         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
7335 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
7337         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
7338         (CFLAGS-tst-cancelx20.c): Set.
7339         * tst-cancel20.c: New test.
7340         * tst-cancelx20.c: New test.
7342 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
7344         * init.c (__pthread_initialize_minimal_internal): Don't treat
7345         architectures with separate register stack special here when
7346         computing default stack size.
7348 2003-12-17  Roland McGrath  <roland@redhat.com>
7350         * Makefile (tst-cancelx7-ARGS): New variable.
7351         Reportd by Greg Schafer <gschafer@zip.com.au>.
7353 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
7355         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
7356         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
7357         (tst-stack3-ENV): Set.
7358         ($(objpfx)tst-stack3-mem): New.
7359         * tst-stack3.c: New test.
7361 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
7363         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
7364         Add unwind directives.  Drop unused .regstk directive.
7365         (_fini_EPILOG_BEGINS): Add unwind directives.
7367 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
7369         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
7370         Assume parameter is a pointer.
7371         (lll_futex_wake): Likewise.
7372         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
7373         Likewise.
7374         (lll_futex_wake): Likewise.
7375         Reported by Boris Hu.
7376         * sysdeps/unix/sysv/linux/unregister-atfork.c
7377         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
7379         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
7381 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
7383         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
7384         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
7385         __rtld_lock_initialize for ld.so lock.
7386         Patch in part by Adam Li <adam.li@intel.com>.
7388 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
7390         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
7391         in $(gnulib).  Also, remove stale comment.
7393 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
7395         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
7396         advantage of new syscall stub and optimize accordingly.
7398         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
7399         from SYS_futex, to match expectations of
7400         sysdep.h:DO_INLINE_SYSCALL.
7401         (lll_futex_clobbers): Remove.
7402         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
7403         (lll_futex_wake): Likewise.
7404         (lll_futex_requeue): Likewise.
7405         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
7406         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
7407         Jelinek).
7408         (__lll_mutex_lock): Likewise.
7409         (__lll_mutex_cond_lock): Likewise.
7410         (__lll_mutex_timed_lock): Likewise.
7411         (__lll_mutex_unlock): Likewise.
7412         (__lll_mutex_unlock_force): Likewise.
7414         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
7415         comes before the include of <sysdep.h>.
7416         (THREAD_SELF_SYSINFO): New macro.
7417         (THREAD_SYSINFO): Likewise.
7418         (INIT_SYSINFO): New macro.
7419         (TLS_INIT_TP): Call INIT_SYSINFO.
7421         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
7423         * sysdeps/pthread/createthread.c (create_thread): Use
7424         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
7425         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
7426         THREAD_SELF_SYSINFO instead of open code.
7427         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
7428         (THREAD_SYSINFO): Likewise.
7430         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
7432         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
7434 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
7436         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
7437         instead of .init.  Patch by David Mosberger.
7439 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
7441         * sysdeps/pthread/configure.in: Remove broken declaration in C
7442         cleanup handling check.
7444 2003-11-30  Andreas Jaeger  <aj@suse.de>
7446         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
7447         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
7448         Likewise.
7450 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
7452         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
7453         * pthread_attr_destroy.c: Include shlib-compat.h.
7454         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
7455         is set in iattr->flags.
7456         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
7458 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
7460         * Makefile (distribute): Add tst-cleanup4aux.c.
7462         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
7463         include.
7465 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
7467         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
7468         pthread_cond_signal.
7470         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
7471         store mutex address if the current value is ~0l.
7472         * sysdeps/pthread/pthread_cond_timedwait.c
7473         (__pthread_cond_timedwait): Likewise.
7474         * sysdeps/pthread/pthread_cond_broadcast.c
7475         (__pthread_cond_broadcast): Don't use requeue for pshared
7476         condvars.
7478         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7479         (__pthread_cond_wait): Don't store mutex address if the current
7480         value is ~0l.
7481         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7482         (__pthread_cond_timedwait): Likewise.
7483         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
7484         (__pthread_cond_broadcast): Don't use requeue for pshared
7485         condvars.
7487         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
7488         element with ~0l for pshared condvars, with NULL otherwise.
7490         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7491         (__pthread_cond_wait): Don't store mutex address if the current
7492         value is ~0l.
7493         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7494         (__pthread_cond_timedwait): Likewise.
7495         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
7496         (__pthread_cond_broadcast): Don't use requeue for pshared
7497         condvars.
7499         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
7500         * tst-cond12.c: New file.
7501         * tst-cond13.c: New file.
7503 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
7505         * sysdeps/pthread/configure.in: Make missing forced unwind support
7506         fatal.
7508 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
7510         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
7512 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
7514         * Makefile: Add magic to clean up correctly.
7516 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
7518         * unwind.c (FRAME_LEFT): Define.
7519         (unwind_stop): Handle old style cleanups here.
7520         (__pthread_unwind): Handle old style cleanups only if
7521         !HAVE_FORCED_UNWIND.
7522         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
7523         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
7524         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
7525         ($(objpfx)tst-cleanupx4): Likewise.
7526         * tst-cleanup4.c: New test.
7527         * tst-cleanup4aux.c: New.
7528         * tst-cleanupx4.c: New test.
7530 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
7532         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
7533         lll_mutex_*lock macros to skip atomic operations on some archs.
7535 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
7537         * sysdeps/pthread/tst-timer.c (main): Initialize
7538         sigev2.sigev_value as well.
7540 2003-10-15  Roland McGrath  <roland@redhat.com>
7542         * sysdeps/pthread/configure.in: Barf if visibility attribute support
7543         is missing.
7544         * sysdeps/pthread/configure: Regenerated.
7546 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7548         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
7549         locking macros.  No distinction between normal and mutex locking
7550         anymore.
7551         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
7552         Merge bits from lowlevelmutex.S we still need.
7553         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
7554         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7555         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
7556         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
7557         new mutex implementation.
7558         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
7559         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7560         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7561         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7562         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7563         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7564         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7565         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7566         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7567         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
7568         symbol for entry point to avoid cancellation.
7570 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
7572         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
7573         changes.
7574         (SAVE_OLDTYPE_0): Fix a typo.
7576 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
7578         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
7579         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
7581 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
7583         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
7584         correct offset.
7586 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
7588         * Makefile (tests): Add tst-cancel19.
7589         * tst-cancel19.c: New test.
7591 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
7593         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
7594         restoring of the old cancellation type.
7596 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
7598         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
7600 2003-09-27  Wolfram Gloger  <wg@malloc.de>
7602         * sysdeps/pthread/malloc-machine.h: New file
7604 2003-09-24  Roland McGrath  <roland@redhat.com>
7606         * allocatestack.c (__make_stacks_executable): Don't ignore return
7607         value from _dl_make_stack_executable.
7609 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
7611         * allocatestack.c (__make_stacks_executable): Also change
7612         permission of the currently unused stacks.
7614         * allocatestack.c (change_stack_perm): Split out from
7615         __make_stacks_executable.
7616         (allocate_stack): If the required permission changed between the time
7617         we started preparing the stack and queueing it, change the permission.
7618         (__make_stacks_executable): Call change_stack_perm.
7620         * Makefile: Build tst-execstack-mod locally.
7621         * tst-execstack-mod.c: New file.
7623 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
7625         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
7627 2003-09-23  Roland McGrath  <roland@redhat.com>
7629         * tst-execstack.c: New file.
7630         * Makefile (tests): Add it.
7631         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
7632         (LDFLAGS-tst-execstack): New variable.
7634         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
7635         whether to use PROT_EXEC for stack mmap.
7636         (__make_stacks_executable): New function.
7637         * pthreadP.h: Declare it.
7638         * init.c (__pthread_initialize_minimal_internal): Set
7639         GL(dl_make_stack_executable_hook) to that.
7641 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
7643         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
7644         recommendation from AMD re avoidance of lock prefix.
7646 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
7648         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
7649         lll_futex_timed_wait instead of lll_futex_wait.
7650         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
7651         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
7652         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
7653         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
7654         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
7655         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
7656         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
7657         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
7658         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
7659         Completely revamp the locking macros.  No distinction between
7660         normal and mutex locking anymore.
7661         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
7662         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
7663         __lll_lock_timedwait): Fix prototypes.
7664         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
7665         __lll_lock_timedwait): Likewise.
7666         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
7667         macros, add __builtin_expect.
7668         (lll_mutex_timedlock): Likewise.  Fix return value.
7669         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
7670         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
7671         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
7672         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
7673         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
7674         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
7675         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
7676         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
7678 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
7680         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7681         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
7682         operation if possible.
7684         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
7685         like jumping over the lock prefix.
7687 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
7689         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
7690         locking macros.  No distinction between normal and mutex locking
7691         anymore.
7692         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7693         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
7694         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7695         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
7696         locking.  Merge bits from lowlevelmutex.S we still need.
7697         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
7698         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
7699         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
7700         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
7701         * Makefile (routines): Remove libc-lowlevelmutex.
7702         (libpthread-rountines): Remove lowlevelmutex.
7703         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
7704         for new mutex implementation.
7705         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7706         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7707         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7708         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7709         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7710         Likewise.
7711         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7712         Likewise.
7713         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
7714         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7715         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
7716         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
7717         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7718         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7719         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7720         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
7721         Likewise.
7722         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
7723         Likewise.
7724         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
7725         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7726         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7727         Don't use requeue.
7728         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7729         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
7731 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
7733         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
7734         in parameters of asm with output parameters.
7736         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
7737         type of DECR parameter to int.
7738         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
7740 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
7742         * tst-attr3.c (tf, do_test): Print stack start/end/size and
7743         guardsize for each thread.
7745 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
7747         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
7748         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
7749         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
7751         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
7752         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
7753         NULL.
7754         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
7755         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
7756         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7757         (pthread_getaffinity_np): Add hidden_def.
7759         * Makefile (tests): Add tst-attr3.
7760         * tst-attr3.c: New test.
7762         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
7764 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
7766         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
7767         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
7769 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
7771         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
7772         * tst-align.c: Include tst-stack-align.h.
7773         (tf, do_test): Use TEST_STACK_ALIGN macro.
7775 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
7777         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
7778         variable.
7780 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
7782         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
7783         stack-related values for the initial thread.
7785 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
7787         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
7789 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
7791         * pthread_mutex_lock.c: Minor code rearrangements.
7793 2003-09-05  Roland McGrath  <roland@redhat.com>
7795         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
7796         Instead, include ../nptl_db/db_info.c to do its magic.
7797         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
7798         (__pthread_pthread_key_2ndlevel_size): Likewise.
7799         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
7800         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
7801         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
7802         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
7803         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
7804         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
7805         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
7806         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
7807         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
7808         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
7809         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
7810         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
7811         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
7812         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
7813         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
7814         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
7815         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
7817 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
7819         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
7820         of pthread_t to be compatible with LT.
7821         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7822         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7823         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7824         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7825         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
7826         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7827         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7829 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
7831         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
7833 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
7835         * unwind-forcedunwind.c: Move to...
7836         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
7837         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
7838         * sysdeps/pthread/jmpbuf-unwind.h: New file.
7839         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
7840         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
7841         * unwind.c: Include jmpbuf-unwind.h.
7842         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
7844 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
7846         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
7847         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
7848         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
7849         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
7850         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
7851         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
7852         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
7853         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
7854         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
7855         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
7856         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
7857         function.
7858         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
7859         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
7860         * Makefile (tests): Add tst-stack2.
7861         * tst-stack2.c: New test.
7862         * tst-stack1.c: Include limits.h and sys/param.h.
7863         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
7865         * pthread_condattr_setpshared.c: Include errno.h.
7866         (pthread_condattr_setpshared): Return EINVAL if pshared
7867         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
7869         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
7870         defined symbol for entry point to avoid cancellation.
7871         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
7872         Likewise.
7873         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
7874         Likewise.
7875         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
7876         Likewise.
7877         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
7878         Likewise.
7879         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
7880         Likewise.
7881         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
7882         __close_nocancel, __read_nocancel, __write_nocancel,
7883         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
7884         libpthread.so or librt.so, define to corresponding function
7885         without _nocancel suffix.
7886         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
7887         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
7888         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
7890         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
7892 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
7894         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
7895         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
7897         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
7898         in subsections has a symbol associated with it.
7900         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
7901         defined symbol for entry point to avoid cancellation.
7902         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
7904 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
7906         * Makefile (tests): Add tst-tls5.
7907         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
7908         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
7909         ($(objpfx)tst-tls5): New.
7910         ($(objpfx)tst-tls6.out): Likewise.
7911         (tests): Depend on $(objpfx)tst-tls6.out.
7912         * tst-tls3.c: Include stdint.h and pthreaddef.h.
7913         (do_test): Check pthread_self () return value alignment.
7914         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
7915         (tf): Check pthread_self () return value alignment.
7916         * tst-tls5.c: New test.
7917         * tst-tls5.h: New.
7918         * tst-tls5mod.c: New.
7919         * tst-tls5moda.c: New.
7920         * tst-tls5modb.c: New.
7921         * tst-tls5modc.c: New.
7922         * tst-tls5modd.c: New.
7923         * tst-tls5mode.c: New.
7924         * tst-tls5modf.c: New.
7925         * tst-tls6.sh: New test.
7927         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
7928         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
7929         * init.c (pthread_functions): Initialize them.
7930         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
7931         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
7932         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
7933         pthread_cond_timedwait@@GLIBC_2.3.2.
7935 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
7937         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
7938         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
7939         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
7940         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
7941         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
7942         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
7944         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
7946         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
7947         _POSIX_THREAD_PRIORITY_SCHEDULING.
7948         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
7950 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
7952         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
7953         nested function, use static inline function from libio.h.
7954         Code by Richard Henderson.
7956         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
7957         weak.
7959 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
7961         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
7962         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
7963         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
7964         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
7965         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
7966         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
7967         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
7968         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
7969         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
7970         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
7971         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
7972         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
7973         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
7974         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
7975         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
7976         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
7977         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
7978         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
7979         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
7980         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
7981         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
7982         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
7983         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
7984         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
7985         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
7986         * sysdeps/sparc/tls.h: New file.
7987         * sysdeps/sparc/tcb-offsets.sym: New file.
7988         * sysdeps/sparc/Makefile: New file.
7989         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
7990         * init.c [__sparc__] (__NR_set_tid_address): Define.
7992 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
7994         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
7995         _IO_release_lock): Define.
7997 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
7999         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
8000         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
8002 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
8004         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
8005         (__pthread_cleanup_class): Add missing return types of member
8006         functions.
8008 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
8010         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8011         (lll_mutex_unlock_force): Add memory barrier between store and futex
8012         syscall.
8014 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
8016         * tst-cancel4.c (do_test): Also unlink tempfname and remove
8017         tempmsg in first loop.
8019 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
8021         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8022         _POSIX_THREAD_PRIORITY_SCHEDULING.
8023         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8025 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
8027         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
8028         (__rtld_lock_default_lock_recursive,
8029         __rtld_lock_default_unlock_recursive): Define.
8030         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
8031         __rtld_lock_unlock_recursive): Define using
8032         GL(_dl_rtld_*lock_recursive).
8033         * init.c (__pthread_initialize_minimal_internal): Initialize
8034         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
8035         Lock GL(_dl_load_lock) the same number of times as
8036         GL(_dl_load_lock) using non-mt implementation was nested.
8038         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
8039         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
8041 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
8043         * tst-cancel17.c (do_test): Make len2 maximum of page size and
8044         PIPE_BUF.
8046 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
8048         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
8050 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
8052         * sysdeps/pthread/createthread.c (do_clone): Move error handling
8053         to first syscall error check.  Move syscall error check for tkill
8054         into __ASSUME_CLONE_STOPPED #ifdef.
8056 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
8058         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
8059         is not defined, do explicit synchronization.
8060         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
8061         is not defined also unlock pd->lock for non-debugging case in case
8062         it is necessary.
8063         * pthread_create.c (start_thread): Always get and release pd->lock
8064         if __ASSUME_CLONE_STOPPED is not defined.
8065         (start_thread_debug): Removed.  Adjust users.
8066         * allocatestack.c (allocate_stack): Always initialize lock if
8067         __ASSUME_CLONE_STOPPED is not defined.
8068         * Makefile (tests): Add tst-sched1.
8069         * tst-sched1.c: New file.
8071         * sysdeps/pthread/createthread.c (do_clone): Only use
8072         sched_setschduler and pass correct parameters.
8074 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
8076         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
8077         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
8078         PTHREAD_STACK_MIN in comments.
8080 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
8082         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8083         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
8084         argument.
8085         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
8086         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
8087         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
8088         (__pthread_cleanup_upto): Fix prototype.
8089         (_longjmp_unwind): Adjust caller.
8090         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
8091         Change second argument to const struct pointer.
8092         * tst-sem8.c (main): Remove unused s2 and s3 variables.
8093         * tst-sem9.c (main): Likewise.
8094         * unwind.c: Include string.h for strlen prototype.
8096 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
8098         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8099         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
8100         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
8101         Define HAVE_CMOV.
8102         Patch by Nicholas Miell <nmiell@attbi.com>.
8104 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
8106         * init.c (__pthread_initialize_minimal_internal): Initialize
8107         GL(dl_init_static_tls).
8108         * pthreadP.h (__pthread_init_static_tls): New prototype.
8109         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
8110         New functions.
8111         * Makefile (tests): Add tst-tls4.
8112         (modules-names): Add tst-tls4moda and tst-tls4modb.
8113         ($(objpfx)tst-tls4): Link against libdl and libpthread.
8114         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
8115         tst-tls4modb.so.
8116         * tst-tls4.c: New file.
8117         * tst-tls4moda.c: New file.
8118         * tst-tls4modb.c: New file.
8120 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
8122         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
8123         before __timer_dealloc.
8124         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
8125         Don't call list_unlink.
8127 2003-07-29  Roland McGrath  <roland@redhat.com>
8129         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
8131 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
8133         * tst-cancel17.c (do_test): Check if aio_cancel failed.
8134         Don't reuse struct aiocb A if it failed.
8135         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
8136         not just one byte, as that does not block.
8138 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
8140         * sysdeps/pthread/unwind-resume.c: New file.
8141         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
8142         unwind-resume in csu subdir.
8143         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
8144         exceptions.
8145         (librt-sysdep_routines, librt-shared-only-routines): Add
8146         rt-unwind-resume.
8147         * sysdeps/pthread/rt-unwind-resume.c: New file.
8148         * unwind-forcedunwind.c: New file.
8149         * Makefile (libpthread-routines): Add unwind-forcedunwind.
8150         (libpthread-shared-only-routines): Likewise.
8151         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
8152         * pthreadP.h (pthread_cancel_init): New prototype.
8153         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
8155         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
8156         attr argument const struct pthread_attr *.
8158         * res.c (__res_state): Return __resp.
8159         * descr.h: Include resolv.h.
8160         (struct pthread): Add res field.
8161         * pthread_create.c: Include resolv.h.
8162         (start_thread): Initialize __resp.
8163         * Makefile (tests): Add tst-_res1.
8164         (module-names): Add tst-_res1mod1, tst-_res1mod2.
8165         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
8166         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
8167         libpthread.
8168         * tst-_res1.c: New file.
8169         * tst-_res1mod1.c: New file.
8170         * tst-_res1mod2.c: New file.
8172 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
8174         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
8176         * Makefile: Define various *-no-z-defs variables for test DSOs
8177         which has undefined symbols.
8179 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
8181         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
8182         Retry if the stwcx fails to store once_control.
8184 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
8186         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
8187         pthread_attr_setaffinity.
8188         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
8189         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
8190         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
8191         * pthread_attr_destroy.c: Free cpuset element if allocated.
8192         * pthread_create.c: Pass iattr as additional parameter to
8193         create_thread.
8194         * sysdeps/pthread/createthread.c: If attribute is provided and
8195         a new thread is created with affinity set or scheduling parameters,
8196         start thread with CLONE_STOPPED.
8197         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
8198         pthread_attr_setaffinity.
8199         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
8200         cpuset element.
8202 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
8204         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
8206 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
8208         * sysdeps/pthread/configure.in: Require CFI directives also for
8209         ppc and s390.
8211 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
8213         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
8214         Add cfi directives.
8216 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
8218         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
8219         CLEANUP_JMP_BUF.
8220         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
8221         registers as variables.  Call __pthread_mutex_unlock_usercnt.
8222         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8223         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
8224         not self pointer in __writer.  Compare with TID to determine
8225         deadlocks.
8226         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8227         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
8228         Likewise.
8229         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
8230         Likewise.
8231         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
8232         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8233         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
8234         macros also when compiling librt.
8236 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
8238         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
8239         -fasynchronous-unwind-tables.
8240         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
8241         (PSEUDO): Add cfi directives.
8242         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
8243         Likewise.
8244         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
8245         Likewise.
8247 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
8249         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
8250         __pthread_unregister_cancel): Add prototypes and hidden_proto.
8251         * unwind.c (__pthread_unwind_next): Add hidden_def.
8252         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
8253         Likewise.
8254         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
8255         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
8256         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
8257         Likewise.
8258         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
8259         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
8260         Likewise.
8261         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
8262         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
8263         __pthread_unregister_cancel and __pthread_unwind_next.
8265 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
8267         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
8268         different symbol for the cancellation syscall wrapper and
8269         non-cancellation syscall wrapper.
8270         (PSEUDO_END): Define.
8272 2003-07-05  Richard Henderson  <rth@redhat.com>
8274         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
8275         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
8276         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8277         return actual return value from the syscall, not 0.
8279 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
8281         * descr.h (struct pthread): Add pid field.
8282         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
8283         (__reclaim_stacks): Likewise.
8284         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
8285         also check for PID of the signal source.
8286         (__pthread_initialize_minimal_internal): Also initialize pid field
8287         of initial thread's descriptor.
8288         * pthread_cancel.c: Use tgkill instead of tkill if possible.
8289         * sysdeps/unix/sysv/linux/fork.c: Likewise.
8290         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
8291         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8292         * sysdeps/unix/sysv/linux/raise.c: Likewise.
8294 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
8296         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
8297         Fix use of parameter.
8298         (__libc_cleanup_pop): Likewise.
8300 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
8302         * init.c (sigcancel_handler): Change parameters to match handler
8303         for SA_SIGACTION.  Check signal number and code to recognize
8304         invalid invocations.
8306 2003-07-03  Roland McGrath  <roland@redhat.com>
8308         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
8309         Apply sizeof (struct pthread) bias to r13 value.
8311 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
8313         * sysdeps/pthread/configure.in: Require CFI directives.
8315         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
8316         definition.
8317         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
8318         libpthread compilation.
8319         * unwind.c (__pthread_unwind): Add hidden_def.
8320         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
8322 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
8324         * libc-cancellation.c (__libc_cleanup_routine): Define.
8325         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
8326         (__pthread_cleanup_pop): Define.
8328 2003-07-01  Richard Henderson  <rth@redhat.com>
8330         * sysdeps/alpha/elf/pt-initfini.c: New file.
8331         * sysdeps/alpha/pthread_spin_lock.S: New file.
8332         * sysdeps/alpha/pthread_spin_trylock.S: New file.
8333         * sysdeps/alpha/pthreaddef.h: New file.
8334         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
8335         * sysdeps/alpha/tls.h: New file.
8336         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
8337         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
8338         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
8339         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
8340         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
8341         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
8342         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
8343         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
8344         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
8345         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
8347 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
8349         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
8350         cleanup support and unwind info.
8352 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
8354         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
8355         Use correct cleanup handler registration.  Add unwind info.
8356         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
8357         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
8358         * tst-once3.c: Add cleanup handler and check it is called.
8359         * tst-once4.c: Likewise.
8360         * tst-oncex3.c: New file.
8361         * tst-oncex4.c: New file.
8362         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
8364 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
8366         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
8368 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
8370         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
8371         (tf_msgsnd): Likewise.
8373         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
8374         premature returns a bit more.
8376 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
8378         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
8379         definition to the front.
8381         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
8382         the cleanup functions to make the names unique.  Fix dwarf opcode
8383         un unwind table.
8384         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
8385         functions to make the names unique.  Fix CFA offset for two blocks.
8387 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
8389         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
8390         missing closing braces.
8391         Patch by Christophe Saout <christophe@saout.de>.
8393 2003-06-24  Roland McGrath  <roland@redhat.com>
8395         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
8397 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
8399         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
8400         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
8402         * pthreadP.h: Declare __find_thread_by_id.
8403         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
8404         * pthread_clock_gettime.c: Allow using other thread's clock.
8405         * pthread_clock_settime.c: Likewise.
8406         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8407         * Makefile: Add rules to build and run tst-clock2.
8408         * tst-clock2.c: New file.
8410 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
8412         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
8413         to use exception-based cleanup handler.
8414         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8416         * tst-cond8.c (ch): Announce that we are done.
8418         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
8420         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
8421         Also test aio_suspend with timeout value.
8423 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
8425         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
8426         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
8427         attribute_hidden.
8429         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
8430         (__pthread_mutex_lock_internal): Likewise.
8431         (__pthread_mutex_unlock_internal): Likewise.
8432         (__pthread_mutex_unlock_usercnt): Declare.
8433         * pthread_mutex_destroy.c: Always fail if used in any way.
8434         * pthread_mutex_init.c: Update comment.
8435         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
8436         * pthread_mutex_timedlock.c: Adjust __nusers.
8437         * pthread_mutex_trylock.c: Adjust __nusers.
8438         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
8439         and public interfaces are wrapper with pass additional parameter.
8440         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
8441         parameter zero.
8442         * tst-mutex8.c: New file.
8443         * Makefile (tests): Add tst-mutex8.
8444         * sysdeps/pthread/pthread_cond_timedwait.c: Call
8445         __pthread_mutex_unlock_usercnt.
8446         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8447         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8448         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8449         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8450         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8451         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
8452         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8453         Add __nusers.
8454         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8455         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8456         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8457         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8458         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8460         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
8461         * pthread_mutex_timedlock.c: Likewise.
8462         * pthread_mutex_trylock.c: Adjust __nusers.
8463         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
8464         * tst-mutex9.c: New file.
8465         * Makefile (tests): Add tst-mutex9.
8466         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
8467         * sysdeps/ia64/tls.h: Likewise.
8468         * sysdeps/powerpc/tls.h: Likewise.
8469         * sysdeps/s390/tls.h: Likewise.
8470         * sysdeps/sh/tls.h: Likewise.
8471         * sysdeps/x86_64/tls.h: Likewise.
8472         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8473         Change type of __owner.
8474         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8475         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8476         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8477         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8478         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8480 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
8482         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
8483         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
8485         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
8486         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
8487         instead of nr to lll_futex_wake.  Only set errno and return -1
8488         if err < 0.
8490         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
8491         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8492         return actual return value from the syscall, not 0.
8494 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
8496         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
8497         find a random value.
8498         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
8499         errno==EIDRM.
8501         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
8502         compat_timer_settime.
8503         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
8504         compat_timer_gettime.
8505         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
8506         compat_timer_getoverrun.
8507         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
8508         compat_timer_delete.
8510         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
8511         error-checking mutex detect busy mutexes.
8513 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
8515         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
8516         Add ax to clobber list.
8517         (lll_mutex_cond_lock): Likewise.
8518         (lll_mutex_unlock): Likewise.
8519         (lll_lock): Likewise.
8520         (lll_unlock): Likewise.
8522         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
8523         * tst-cancel18.c: New file.
8524         * tst-cancelx18.c: New file.
8526         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
8527         and tcdrain.
8529         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
8530         * tst-cancel17.c: New file.
8531         * tst-cancelx17.c: New file.
8533         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
8534         * sysdeps/unix/sysv/linux/sigwait.c: New file.
8535         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
8537         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
8539 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
8541         * sysdeps/pthread/createthread.c (create_thread): Set
8542         header.multiple_threads unconditionally.
8543         * allocatestack.c (allocate_stack): Likewise.
8544         * descr.h (struct pthread): Add header.multiple_threads
8545         unconditionally.
8546         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
8547         Define for librt.  #error if neither libpthread, libc nor librt.
8548         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
8549         Likewise.
8550         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
8551         CDISABLE): Likewise.
8552         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
8553         CDISABLE): Likewise.
8554         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
8555         CDISABLE): Likewise.
8556         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
8557         CDISABLE): Likewise.  Access header.multiple_threads outside of
8558         libc and libpthread.
8559         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
8560         Likewise.
8561         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
8562         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
8564 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
8566         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
8567         Also test early cancellation before the thread reaches the cancellation
8568         point.
8570         * Makefile: Compile forward.c with exceptions.
8572         * sysdeps/unix/sysv/linux/sleep.c: New file.
8574 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
8576         * Makefile: Add CFLAGS definition to compile function wrappers
8577         duplicated from libc with exceptions.
8578         * tst-cancel4.c: Also check cancellation handlers.
8580         * Makefile: Add rules to build and run tst-cancel16 and
8581         tst-cancelx16.  Add missing CFLAGS definitions.
8582         * tst-cancel16.c: New file.
8583         * tst-cancelx16.c: New file.
8585 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
8587         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8588         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
8589         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
8590         (DL_SYSINFO_IMPLEMENTATION): Likewise.
8592         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
8593         (LIBC_CANCEL_RESET): Likewise.
8594         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
8595         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
8596         librt-cancellation.
8597         (CFLAGS-libcrt-cancellation.c): Define.
8598         * sysdeps/pthread/librt-cancellation.c: New file.
8599         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
8600         macros also when compiling librt.
8601         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
8602         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
8603         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
8604         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
8605         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
8606         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
8607         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
8609         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
8610         compat_timer_create.
8612 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
8614         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
8616         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
8617         __register_atfork.
8618         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
8619         Add libc_hidden_def.
8621 2003-06-13  Roland McGrath  <roland@redhat.com>
8623         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
8624         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
8626 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
8628         * allocatestack.c (queue_stack): Always inline.
8629         * ptreadhP.h (__do_cancel): Likewise.
8631 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
8633         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
8634         a typo.
8636 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
8638         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8639         (__pthread_cond_signal): Remove incorrect second addition for
8640         cond_lock!=0.
8642 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
8644         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8645         (__pthread_cond_signal): Use correct futex pointer in
8646         __lll_mutex_lock_wait call.
8648         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8649         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
8651 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
8653         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
8654         cancelable.
8655         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
8656         Likewise.
8658         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
8659         hand-written CFI generation code.  Since ENTRY/END also initiated
8660         CFI frames this caused two CFI sets to be generated.
8662 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
8664         * cleanup_routine.c: New file.
8665         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
8666         * sysdeps/pthread/pthread.h: Add support for fully exception-based
8667         cleanup handling.
8668         * Makefile (libpthread-routines): Add cleanup_routine.
8669         Add more CFLAGS variables to compile with exceptions.  Add comments
8670         why which file needs unwind tables.
8671         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
8672         tests.
8673         * tst-cancelx1.c: New file.
8674         * tst-cancelx2.c: New file.
8675         * tst-cancelx3.c: New file.
8676         * tst-cancelx4.c: New file.
8677         * tst-cancelx5.c: New file.
8678         * tst-cancelx6.c: New file.
8679         * tst-cancelx7.c: New file.
8680         * tst-cancelx8.c: New file.
8681         * tst-cancelx9.c: New file.
8682         * tst-cancelx10.c: New file.
8683         * tst-cancelx11.c: New file.
8684         * tst-cancelx12.c: New file.
8685         * tst-cancelx13.c: New file.
8686         * tst-cancelx14.c: New file.
8687         * tst-cancelx15.c: New file.
8688         * tst-cleanupx0.c: New file.
8689         * tst-cleanupx0.expect: New file.
8690         * tst-cleanupx1.c: New file.
8691         * tst-cleanupx2.c: New file.
8692         * tst-cleanupx3.c: New file.
8694         * tst-cleanup0.c: Make standard compliant.
8695         * tst-cleanup1.c: Likewise.
8697         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
8698         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
8699         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8700         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8701         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8702         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8703         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
8704         CLEANUP_JMP_BUF.
8705         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8706         * tst-cancel12.c: New file.
8707         * tst-cancel13.c: New file.
8708         * tst-cancel14.c: New file.
8709         * tst-cancel15.c: New file.
8710         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
8711         and tst-cancel15.
8713         * tst-cancel1.c: Add some comments.
8715         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
8716         timeout correctly.
8718 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
8720         * Makefile (CFLAGS-pthread_cancel.c): Define.
8722 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
8724         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
8725         Change type of __writer element to int.
8726         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8727         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8728         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8729         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8730         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8731         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
8732         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8733         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
8734         Compare with TID to determine deadlocks.
8735         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8736         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8737         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
8738         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8739         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8740         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8741         Likewise.
8742         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8743         Likewise.
8744         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8745         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8746         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
8747         Likewise.
8748         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
8749         Likewise.
8750         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8751         * Makefile (tests): Add tst-rwlock12.
8752         * tst-rwlock12.c: New file.
8754 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
8756         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
8757         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
8758         Remove bogus hidden_proto.
8759         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8760         Likewise.
8761         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
8762         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
8763         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
8764         ___lll_mutex_timedlock): Likewise.
8766 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
8768         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8769         (__pthread_cond_signal): Add some code to eventually handle
8770         cond_lock!=0.
8772 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
8774         * Makefile (tests): Add tst-exec4.
8775         (tst-exec4-ARGS): Define.
8776         * tst-exec4.c: New file.
8778 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
8780         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
8781         Also fail if tv_nsec < 0.
8782         (__lll_timedwait_tid): Likewise.
8783         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
8784         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
8785         Likewise.
8786         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
8787         Likewise.
8788         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
8789         Likewise.
8790         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
8791         Likewise.
8792         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
8793         Likewise.
8794         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
8795         Likewise.
8797         * Makefile (tests): Add tst-sem8 and tst-sem9.
8798         * tst-sem8.c: New file.
8799         * tst-sem9.c: New file.
8800         * sem_open.c: Fix creation of in_use record if the file exists but
8801         no internal record.
8803         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
8804         definitions.
8806         * sysdeps/pthread/timer_create.c (timer_create): In case
8807         evp==NULL, assign timer ID to sival_ptr.
8809         * descr.h (struct pthread_unwind_buf): Change type of prev element to
8810         struct pthread_unwind_buf *.
8811         (struct pthread): Likewise for cleanup_jmp_buf element.
8813         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
8814         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
8815         * unwind.c (__pthread_unwind_next): Likewise.
8817 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
8819         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8820         (lll_futex_timed_wait): Use int for futex value parameter.
8821         (lll_futex_wake): Likewise.
8822         (lll_futex_requeue): Likewise.
8824         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
8825         Replace one memory operation with one register operation.
8827         * tst-join4.c (do_test): Fix error message.
8829         * tst-rwlock6.c (do_test): Use correct format specifier.
8831         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8832         (__lll_mutex_lock_wait): Replace one memory operation with one
8833         register operation.
8834         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
8835         (__lll_mutex_lock_wait): Likewise.
8837         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8838         (__lll_mutex_cond_lock): Add one to value parameter of
8839         __lll_lock_wait to reflect reality in the futex syscall.
8840         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8841         (lll_mutex_cond_lock): Likewise.
8843 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
8845         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
8846         New function.
8847         (lll_mutex_cond_lock): Define.
8849 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
8851         * Makefile (tests): Add tst-signal6.
8852         * tst-signal6.c: New file.
8854         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
8855         (__lll_mutex_unlock_force): New function
8856         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
8858         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8859         (__lll_mutex_unlock_force): New function.
8860         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
8862         * tst-rwlock7.c (do_test): Use correct format specifier.
8864         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
8865         Find break parameter in correct asm argument.
8867 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
8869         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
8870         Remove out4.
8871         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
8872         error occured.
8873         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
8874         Add __mutex.
8875         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
8876         lll_futex_requeue, lll_mutex_unlock_force): Define.
8878 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
8880         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8881         (pthread_cond_t): Add __mutex.
8882         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
8883         lll_futex_requeue, lll_mutex_unlock_force): Define.
8885 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
8887         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
8888         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
8889         Add __mutex field.
8890         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
8891         Define.
8892         (lll_futex_wait, lll_futex_wake): Define.
8893         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
8894         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
8895         FUTEX_REQUEUE instead of FUTEX_WAIT.
8896         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
8897         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
8898         mutex which was used in condvar structure.  Call
8899         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
8900         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
8902         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
8903         include tcb-offsets.h.  Read wakeup value in locked region.
8904         Use the value of gbr register as THREAD_ID.
8905         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8906         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8907         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8909         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
8910         macros.
8912 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
8914         * sysdeps/pthread/pthread_cond_broadcast.c
8915         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
8917 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
8919         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
8920         typo in register name.
8921         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
8922         correctly.  Actually use requeue.  Little optimization.
8923         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
8924         mutex address early.  Handle cancellation state as 32-bit value.
8925         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8926         Remove unnecessary label.
8928 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
8930         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
8931         instead of FUTEX_WAIT.
8932         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
8933         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8934         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8935         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
8936         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8937         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
8938         used in condvar structure.  Call __pthread_mutex_cond_lock instead
8939         of __pthread_mutex_lock_internal.
8940         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8941         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8942         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8943         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
8944         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8945         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8946         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
8947         Add pthread_mutex_cond_lock.
8948         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
8949         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
8950         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
8951         lll_mutex_cond_lock.
8952         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
8953         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8954         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
8955         Add __mutex field.
8956         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8957         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8959         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
8960         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8962         * pthreadP.h: Declare __pthread_mutex_cond_lock.
8963         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
8964         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
8965         macro don't define aliases.
8967         * cancellation.c: Remove __pthread_enable_asynccancel_2.
8968         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
8969         * sysdeps/pthread/pthread_cond_timedwait.c: Use
8970         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
8971         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8972         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8973         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8974         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8975         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8977 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
8979         * sem_open.c: Fix one endless loop.  Implement correct semantics
8980         wrt opening the same semaphore more then once.
8981         * sem_close.c: Adjust for sem_open change.
8982         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
8983         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
8984         * Makefile (tests): Add tst-sem7.
8985         * tst-sem7.c: New file.
8987 2003-05-16  Roland McGrath  <roland@redhat.com>
8989         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
8990         uninitialized variable braino.
8992 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
8994         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
8995         test for syscall availability.
8997         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
8998         __no_posix_timers to -1 if the syscalls don't exist.
9000         * pthread_join.c (pthread_join): Set tid field of the joined
9001         thread to -1.  This isn't necessary but helps to recognize some
9002         error conditions with almost no cost.
9004         * allocatestack.c (FREE_P): Also negative values indicate an
9005         unused stack.
9007         * unwind.c: Include <unistd.h>.
9009 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
9011         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
9013 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
9015         * Makefile (crti-objs, crtn-objs): New variables.
9016         (omit-deps, extra-objs): Add crtn.
9017         ($(objpfx)libpthread.so): Depend on both crti and crtn
9018         and links to them in multidir.
9019         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
9021 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
9023         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
9024         (lll_mutex_unlock): Use atomic_exchange_rel.
9026 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
9028         * cond-perf.c (cons): Add missing locking around setting of alldone.
9030 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
9032         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
9033         related macros.
9034         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9036 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
9038         * tst-sem6.c: New file.
9039         * Makefile (tests): Add tst-sem6.
9041         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
9042         Use atomic_exchange_rel instead of atomic_exchange.
9043         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
9044         Likewise.
9046         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
9047         code for lll_futex_wait and lll_futex_wake in static apps.  Use
9048         vsyscall is possible.
9050         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
9051         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
9052         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
9053         pthread_setaffinity_np.
9054         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
9055         and pthread_setaffinity_np.
9056         * Makefile (libpthread-routines): Add pthread_getaffinity and
9057         pthread_setaffinity.
9059         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
9060         use it in case mmap to allocate the stack fails.
9061         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
9062         ARCH_MAP_FLAGS here.
9063         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
9064         ARCH_RETRY_MMAP.
9066 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
9068         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
9069         handler implementation.  It is now lockless in fork().
9070         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
9071         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
9072         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
9073         declare the __fork_*_lists.
9074         (struct fork_handler): Include pointers to all three functions.
9075         Add next, refcntr and need_signal elements.
9076         (__fork_handlers): New declaration.
9077         (__register_atfork_malloc): Remove declaration.
9078         (HAVE_register_atfork_malloc): Remove definition.
9079         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
9080         __pthread_child_handler variable.
9081         (__libc_pthread_init): Use __register_atfork instead of explicitly
9082         adding to the list.
9083         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
9084         and lll_futex_wake.
9085         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9087         * unwind.c (unwind_cleanup): Print error message and then abort.  This
9088         function must never be reached.
9090         * cond-perf.c: New file.
9092 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
9094         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
9096 2003-05-04  Roland McGrath  <roland@redhat.com>
9098         * Makefile ($(objpfx)../libc.so): New target.
9100 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
9102         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9103         (pthread_condattr_t): Size is only an int, don't use long for
9104         alignment.
9105         (pthread_mutexattr_t): Likewise.
9106         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9107         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9108         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9110 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
9112         * sysdeps/i386/tls.h: Define THREAD_ID.
9113         * sysdeps/ia64/tls.h: Likewise.
9114         * sysdeps/powerpc/tls.h: Likewise.
9115         * sysdeps/s390/tls.h: Likewise.
9116         * sysdeps/sh/tls.h: Likewise.
9117         * sysdeps/x86_64/tls.h: Likewise.
9118         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
9119         record ownership.
9120         * pthread_mutex_timedlock.c: Likewise.
9121         * pthread_mutex_trylock.c: Likewise.
9122         * pthread_mutex_unlock.c: Likewise.
9123         * pthread_rwlock_trywrlock.c: Likewise.
9124         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
9125         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9126         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
9127         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9129         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
9130         flag.
9132 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
9134         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9135         (__SIZEOF_PTHREAD_COND_T): Define to 48.
9136         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
9137         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
9138         Make __align long long instead of long.
9139         (pthread_rwlock_t): Formatting.
9140         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
9141         (pthread_rwlock_t): Formatting.
9142         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9143         (pthread_cond_t): Make __align long long instead of long.
9144         (pthread_rwlock_t): Move __flags field to the same position as in
9145         linuxthreads.
9147 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
9149         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
9150         * tst-rwlock7.c (do_test): Likewise.
9152 2003-04-26  Roland McGrath  <roland@redhat.com>
9154         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
9156 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
9158         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
9159         sizeof (struct pthread).
9160         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
9161         1 struct pthread.
9162         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
9163         to 0.
9164         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
9165         struct pthread.
9166         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
9167         to 32-bit bytes.
9168         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
9169         tcbp.
9170         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
9171         unneccessarily.
9172         (NO_TLS_OFFSET): Define.
9173         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
9174         add TLS_TCB_SIZE unnecessarily.
9176 2003-04-22  Roland McGrath  <roland@redhat.com>
9178         * Makeconfig (shared-thread-library): Reverse link order to work
9179         around linker bug.
9181 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
9183         * semaphore.h: Fix typo in comment.
9185 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
9187         * sysdeps/pthread/sigfillset.c: New file.
9189         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
9190         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
9191         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
9192         * sysdeps/pthread/sigaction.c: Likewise.
9193         * sysdeps/pthread/sigprocmask.c: New file.
9194         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
9195         __SIGRTMIN+1.
9196         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9197         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
9198         in this case.
9200 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
9202         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9203         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
9205         * sysdeps/unix/sysv/linux/unregister-atfork.c
9206         (__unregister_atfork): Don't free memory not allocated dynamically.
9208         * semaphore.h: Remove __THROW marker from cancellation points.
9209         * nptl/sysdeps/pthread/pthread.h: Likewise.
9211 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
9213         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
9214         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
9215         __THROW.
9217 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
9219         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
9221 2003-04-15  Roland McGrath  <roland@redhat.com>
9223         * forward.c (__pthread_unwind): Tweak to avoid warning.
9225 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
9227         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
9229 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
9231         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
9232         overflow CFA advance instructions.
9233         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9235 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
9237         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
9238         * sysdeps/i386/pthread_spin_lock.c: Likewise.
9239         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
9240         defined.
9242         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
9243         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
9244         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
9245         DW_CFA_advance_loc for .Laddl-.Lsubl.
9247 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
9249         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
9250         position-independent unwind data for static libraries.
9251         Add missing unwind info.  Add comments.
9253         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
9254         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9255         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9256         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9258 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
9260         * Makefile: Make sure all cancellation points are compiled with
9261         exception and asynchronous unwind tables.
9263         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
9264         which mishandles loading of global object addresses in PIC.
9265         (THREAD_SETMEM_NC): Likewise.
9267 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
9269         * pthread.h: Define new data structure for cleanup buffer.  Declare
9270         new cleanup handler interfaces.
9271         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
9272         (struct pthread): Add cleanup_jmp_buf pointer.  Define
9273         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
9274         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
9275         it.  Declare old cleanup handler installation functions.
9276         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
9277         handling.
9278         * cleanup_defer.c: Likewise.
9279         * cleanup_compat.c: New file.  Old cleanup code.
9280         * cleanup_def_compat.c: New file.  Old cleanup code.
9281         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
9282         if own thread descriptor.
9283         * unwind.c: New file.
9284         * forward.c: Add __pthread_unwind.
9285         * init.c (pthread_functions): Add __pthread_unwind.
9286         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
9287         Add ptr___pthread_unwind.
9288         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
9289         and unwind function.
9290         * Makefile (libpthread-routines): Add cleanup_compat,
9291         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
9292         table generation if necessary.
9293         * version.c: Record whether unwind support is compiled in.
9294         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
9295         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
9296         handler interfaces.
9297         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
9298         complication to generate unwind information for syscall wrappers.
9299         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
9300         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
9301         __cleanup_fct_attribute.
9303         * Makefile: Add rules to build and run tst-cleanup0.
9304         * tst-cleanup0.c: New file.
9305         * tst-cleanup0.expect: New file.
9307         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
9308         caller.  Optimize to avoid often unecessary local variable.
9310 2003-04-11  Roland McGrath  <roland@redhat.com>
9312         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
9313         sets variable `multidir'; include that.
9314         (generated): Add it.
9315         ($(objpfx)$(multidir)/crti.o): New target.
9316         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
9318 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
9320         * tst-attr2.c (do_test): Add cast to avoid warning.
9321         * tst-mutex4.c (do_test): Likewise.
9323 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
9325         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
9326         in child.
9328 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
9330         * Makefile (tests): Add tst-detach1.
9331         * tst-detach1.c: New file.
9333 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
9335         * sysdeps/pthread/pthread.h: Remove duplicate
9336         pthread_cleanup_{push,pop} definitions.
9338         * tst-barrier2.c: Eliminate warnings.
9339         * tst-cancel4.c: Likewise.
9340         * tst-cond4.c: Likewise.
9341         * tst-cond6.c: Likewise.
9342         * tst-detach1.c: Likewise.
9343         * tst-rwlock4.c: Likewise.
9344         * tst-rwlock6.c: Likewise.
9345         * tst-rwlock7.c: Likewise.
9346         * tst-sem3.c: Likewise.
9347         * tst-spin2.c: Likewise.
9348         * tst-umask1.c: Likewise.
9350 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
9352         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
9354 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
9356         * descr.h (struct pthread): Move cancelhandling member to the front.
9358 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
9360         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
9361         malloc_parent, and malloc_child statically.
9362         (__register_atfork_malloc): New function.
9363         (free_mem): Don't free any of the malloc_* variables on the list.
9364         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
9365         Define HAVE_register_atfork_malloc.
9367 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
9369         * sysdeps/pthread/createthread.c (create_thread): Add some more
9370         comments explaining when to set multiple_threads and when not.
9372         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9373         THREAD_ATOMIC_BIT_SET if not already defined.
9374         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9375         THREAD_ATOMIC_BIT_SET:
9376         * sysdeps/x86_64/tls.h: Likewise.
9377         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
9378         THREAD_ATOMIC_CMPXCHG_VAL.
9379         (_pthread_cleanup_pop_restore): Likewise.
9380         * cancellation.c (__pthread_enable_asynccancel): Likewise.
9381         (__pthread_enable_asynccancel_2): Likewise.
9382         (__pthread_disable_asynccancel): Likewise.
9383         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9384         (__libc_disable_asynccancel): Likewise.
9385         * init.c (sigcancel_handler): Likewise.
9386         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
9387         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
9389 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
9391         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
9392         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9393         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
9394         * Makefile (tests): Add tst-cancel11.
9395         * tst-cancel11.c: New file.
9397 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
9399         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
9400         round, not the first.  Use specific_used flag instead of local
9401         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
9402         (__free_tcb): Don't call deallocate_tsd here.
9403         (start_thread): Call deallocate_tsd here.
9404         * pthread_setspecific.c: Set specific_used flag really only when
9405         needed.
9406         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
9407         * tst-tsd3.c: New file.
9408         * tst-tsd4.c: New file.
9410 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
9412         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
9413         Use atomic_exchange_and_add instead of __lll_add.
9414         (__lll_mutex_timedlock): Likewise.
9415         Patch by Ian Wienand.
9417 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
9419         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9420         (SINGLE_THREAD_P): Fix typo.
9421         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
9423 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
9425         * Makefile (tests): Add tst-align.
9426         * tst-align.c: New file.
9427         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
9429         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
9430         function correctly.
9432         * tst-tsd2.c: Add casts to avoid warnings.
9434 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
9436         * descr.h (struct pthread): Move most often used elements to the front.
9438 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
9440         * Makefile (libpthread-routines): Add pthread_atfork.
9441         (libpthread-static-only-routines): Add pthread_atfork.
9443 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
9445         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
9446         of TLS_DTV_AT_TP.
9447         (INSTALL_DTV): Add parens.
9448         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
9449         Use passed descr instead of THREAD_SELF.
9450         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
9451         (__lll_mutex_timedlock_wait): Correct expected value after
9452         spurious wakeup.
9453         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
9454         Release lock before waking up the waiters.
9455         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
9456         criteria.  Reorderstruct passed to cleanup handler.  Fix
9457         handling of cancellation and failung pthread_mutex_unlock call.
9458         Use __pthread_enable_asynccancel_2 instead of
9459         __pthread_enable_asynccancel.
9460         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
9461         Return result of lock re-get if it fails.
9462         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
9463         for __pthread_cleanup_push.
9464         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
9465         completely broken rwlock implementation.
9466         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9467         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9468         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9469         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
9470         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9471         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
9472         versioned_symbol macro.
9473         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
9474         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
9476 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
9478         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
9479         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
9480         and __helper_tid.
9481         (struct timer): Remove th and bar field.
9482         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
9483         debugging code.  Create only one helper thread.
9484         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
9485         helper thread.
9486         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9487         Renamed.  Define statically.  Use thread info from siginfo.
9488         (__helper_once): New variable.
9489         (__helper_tid): New variable.
9490         (__reset_helper_control): New function.
9491         (__start_helper_thread): New function.
9493         * pthread_create.c (start_thread): Don't use setjmp inside
9494         __builtin_expect to work around gcc bug.
9496         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
9497         timer_delete syscall fails, but not with ENOSYS, set
9498         __no_posix_timers.
9500         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
9501         (timer_settime): Fix typo.
9502         * sysdeps/unix/sysv/linux/timer_getoverr.c
9503         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
9505 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
9507         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
9508         offset of cleanupbuf.__prev.
9510 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
9512         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
9513         of included file.
9515 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
9517         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
9518         NULL provide default definition to syscall.
9520 2003-03-25  Roland McGrath  <roland@redhat.com>
9522         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
9523         (timer_id2ptr): Fix typo.
9525 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
9527         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
9528         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
9529         * sysdeps/ia64/pthreaddef.h: Likewise.
9530         * sysdeps/powerpc/pthreaddef.h: Likewise.
9531         * sysdeps/s390/pthreaddef.h: Likewise.
9532         * sysdeps/sh/pthreaddef.h: Likewise.
9533         * sysdeps/x86_64/pthreaddef.h: Likewise.
9534         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
9535         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
9536         being changed.
9537         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
9538         SIGTIMER is not unblocked.
9539         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
9540         RT signal taken.
9541         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
9542         be send.
9543         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
9544         pass pointer through as ID.
9545         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
9546         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
9547         * sysdeps/unix/sysv/linux/timer_create.c: New file.
9548         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
9549         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
9550         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
9551         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
9552         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
9553         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
9554         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
9555         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
9556         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
9557         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
9558         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
9559         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
9560         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
9561         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
9562         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
9563         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
9564         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
9565         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
9566         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
9567         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
9568         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
9569         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
9570         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
9571         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
9572         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
9573         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
9574         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
9575         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
9576         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
9577         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
9579         * pthreadP.h: Remove FRAME_LEFT definition.
9580         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
9581         already left frame.  Programs which have this problem are not POSIX
9582         compliant.
9583         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
9585 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
9587         * sysdeps/pthread/tst-timer.c: Check return values of the
9588         functions we test.
9590 2003-03-23  Roland McGrath  <roland@redhat.com>
9592         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
9593         * tst-tls3mod.c: Likewise.
9594         * tst-tls1.c: Likewise.
9595         * tst-tls2.c: Likewise.
9597         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
9598         undefined behavior.
9600         * tst-join5.c (tf1, tf2): Add a cast.
9602         * Makeconfig (includes): Append -I$(..)nptl to this variable.
9604         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
9605         Don't test anything.
9606         * tst-cond4.c: Likewise.
9607         * tst-cond6.c: Likewise.
9608         * tst-flock2.c: Likewise.
9609         * tst-mutex4.c: Likewise.
9610         * tst-rwlock4.c: Likewise.
9611         * tst-signal1.c: Likewise.
9612         * tst-spin2.c: Likewise.
9613         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
9615         * tst-mutex4.c: Use test-skeleton.c.
9616         * tst-spin2.c: Likewise.
9617         * tst-sysconf.c: Likewise.
9618         * tst-barrier2.c: Likewise.
9619         * tst-cond4.c: Likewise.
9620         * tst-cond6.c: Likewise.
9621         * tst-rwlock4.c: Likewise.
9622         * tst-unload.c: Likewise.
9623         * tst-flock2.c (do_test): Use return instead of exit.
9625 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
9627         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
9629 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
9631         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9632         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
9633         instead of __lll_compare_and_swap.
9634         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
9635         Likewise.
9636         Removed definition if __lll_compare_and_swap.
9638         * cancellation.c: Adjust for new form of compare&exchange macros.
9639         * cleanup_defer.c: Likewise.
9640         * init.c: Likewise.
9641         * libc-cancellation.c: Likewise.
9642         * old_pthread_cond_broadcast.c: Likewise.
9643         * old_pthread_cond_signal.c: Likewise.
9644         * old_pthread_cond_timedwait.c: Likewise.
9645         * old_pthread_cond_wait.c: Likewise.
9646         * pthread_cancel.c: Likewise.
9647         * pthread_create.c: Likewise.
9648         * pthread_detach.c: Likewise.
9649         * pthread_join.c: Likewise.
9650         * pthread_key_delete.c: Likewise.
9651         * pthread_setcancelstate.c: Likewise.
9652         * pthread_setcanceltype.c: Likewise.
9653         * pthread_timedjoin.c: Likewise.
9654         * pthread_tryjoin.c: Likewise.
9655         * sysdeps/pthread/createthread.c: Likewise.
9657 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
9659         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
9660         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
9661         definitions.  Replace uses with calls to atomic_* functions.
9662         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
9663         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
9664         __lll_test_and_set calls with atomic_exchange_and_add and
9665         atomic_exchange calls respectively.
9666         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
9667         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
9668         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
9669         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
9670         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
9671         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
9672         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
9674         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
9675         returns the old value.
9677 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
9679         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
9680         int for variable OLDVAL and correct inline assembler contraint.
9681         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
9682         type int for variable OLD.
9684         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
9685         only for s390-32.
9686         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
9687         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
9688         instead of multiple_threads field in the TCB.
9690 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
9692         * sysdeps/i386/i686/bits/atomic.h: Removed.
9693         * sysdeps/i386/i586/bits/atomic.h: Removed.
9694         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
9695         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
9696         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
9697         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
9698         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
9699         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
9700         * atomic.h: Removed.  Moved to glibc.
9702         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
9703         support for clock selection.
9705         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
9706         signalling waiters.
9708 2003-03-18  Roland McGrath  <roland@redhat.com>
9710         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
9711         Add __lll_rel_instr first.  Add memory clobber.
9712         (lll_mutex_unlock): Use __lll_test_and_set.
9713         From Paul Mackerras <paulus@samba.org>.
9715         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
9716         unconditionally.
9717         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9718         (SINGLE_THREAD_P):  Add `header.' prefix.
9719         From Paul Mackerras <paulus@samba.org>.
9721         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
9722         pthread_timedjoin_np to ...
9723         (libpthread: GLIBC_2.3.3): ... here.
9724         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
9726         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
9727         Avoid shadowing VAL variable.
9729         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
9730         New macro.
9732 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
9734         * Makefile (tests): Add tst-cond11.
9735         * tst-cond11.c: New file.
9737         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
9738         struct passed to cleanup handler to eliminate one more
9739         instruction.
9740         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9742         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9743         (pthrad_cond_t): Replace __unused field with __clock.
9745         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
9746         waken all waiters in cleanup handler.
9747         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9748         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9750         * pthread_condattr_getclock.c: New file.
9751         * pthread_condattr_setclock.c: New file.
9752         * sysdeps/pthread/pthread.h: Declare these new functions.
9753         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
9754         * Makefile (libpthread-routines): Add the new functions.
9755         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
9756         Renamed field to value.  Document use of the bits.
9757         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
9758         change.
9759         * pthread_condattr_setpshared.c: Likewise.
9760         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
9761         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
9762         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9763         Add __clock field.
9764         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9765         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9766         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9767         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
9768         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
9769         Implement clock selection.
9770         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
9771         * pthread-errnos.sym: Add ENOSYS.
9772         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
9773         _POSIX_CLOCK_SELECTION.
9774         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
9776         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
9777         invalid .size directive.
9779 2003-03-17  Roland McGrath  <roland@redhat.com>
9781         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
9782         Formatting tweaks.
9784 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
9786         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
9787         Use __lll_add instead of spelling it out.  Use protected symbol names.
9788         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
9789         Use __lll_add.
9790         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
9791         Renamed from lll_compare_and_swap.  Use new name where necessary.
9792         (__lll_add): Defined.
9793         (__lll_dec_if_positive): Defined.
9794         (__lll_test_and_set): Defined.
9795         * sysdeps/ia64/pthread_spin_init.c: Removed.
9796         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
9797         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
9798         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
9799         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
9800         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
9801         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
9802         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
9803         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
9804         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
9805         __sync_lock_release_si.
9806         Patch by Jakub Jelinek.
9808         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
9809         Fix timeout handling.
9810         (__lll_timedwait_tid): Likewise.
9811         (lll_unlock_wake_cb): Wake up other waiters if necessary.
9812         Patch by Jakub Jelinek.
9814         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
9816 2003-03-17  Roland McGrath  <roland@redhat.com>
9818         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
9819         * sysdeps/pthread/pthread_spin_init.c: New file.
9820         * sysdeps/pthread/pthread_spin_unlock.c: New file.
9821         * sysdeps/powerpc/Makefile: New file.
9822         * sysdeps/powerpc/pthread_spin_lock.c: New file.
9823         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
9824         * sysdeps/powerpc/pthreaddef.h: New file.
9825         * sysdeps/powerpc/tcb-offsets.sym: New file.
9826         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
9827         * sysdeps/powerpc/tls.h: New file.
9828         * sysdeps/powerpc/bits/atomic.h: New file.
9829         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
9830         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
9831         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
9833         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
9834         * sysdeps/unix/sysv/linux/sem_post.c: New file.
9835         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
9836         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
9837         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
9838         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
9839         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
9840         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
9841         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
9842         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
9843         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
9844         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
9845         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
9846         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
9847         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
9849         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
9850         not gettimeofday.
9851         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
9852         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
9853         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
9854         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
9855         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9857 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
9859         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
9860         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
9861         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9862         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9863         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
9865 2003-03-16  Roland McGrath  <roland@redhat.com>
9867         * tst-fork4.c: Include <string.h>.
9868         * tst-signal2.c: Likewise.
9869         * tst-mutex5.c (do_test): exit -> return.
9870         * tst-mutex2.c: Include <stdlib.h>.
9872 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
9874         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9875         (__lll_mutex_timedlock_wait): Correct expected value after
9876         spurious wakeup.  Otherwise we would never wait again.
9878         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
9879         zone versus inline asm stupidity.  Use correct instructions.
9881         * tst-rwlock6.c: Add some more status output.
9883 2003-03-15  Roland McGrath  <roland@redhat.com>
9885         * sysdeps/pthread/configure.in: New file.
9886         * sysdeps/pthread/configure: New file (generated).
9888 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
9890         * allocatestack.c (allocate_stack): Store the exact stack size of
9891         user allocated stacks.
9893 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
9895         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
9896         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
9897         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
9898         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
9899         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
9900         Use `header.' prefix.
9901         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
9903 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
9905         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
9906         __builtin_frame_address, use stack pointer.
9908         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
9909         instead of __builtin_frame_pointer.
9911 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
9913         * tst-basic1.c (do_test): Add cast to avoid warning.
9914         * tst-basic2.c (do_test): Likewise.
9916         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
9917         amount of stack correction.
9919         * tst-fork4.c: Use test-skeleton.c.
9921 2003-03-14  Roland McGrath  <roland@redhat.com>
9923         * init.c: Fix typo "#eli" for "#else".
9925 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
9927         * allocatestack.c (__stack_user): Use hidden_data_def.
9928         * pthread_create.c (__pthread_keys): Likewise.
9930         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
9932 2003-03-14  Roland McGrath  <roland@redhat.com>
9934         * tst-fork4.c: New file.
9935         * Makefile (tests): Add it.
9937         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
9938         we always define the padding space.
9939         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
9940         stopped supporting its own extensions fully.
9941         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
9942         struct also called `header', so `header.multiple_threads' is the field
9943         name to use on all machines.
9944         * allocatestack.c (allocate_stack): Use `header.' prefix.
9945         * sysdeps/pthread/createthread.c (create_thread): Likewise.
9946         * pthread_create.c (__pthread_create_2_1): Likewise.
9947         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
9948         (THREAD_SELF): Likewise.
9949         * sysdeps/x86_64/tls.h: Likewise.
9950         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
9951         (SINGLE_THREAD_P): Likewise.
9952         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
9953         (SINGLE_THREAD_P): Likewise.
9954         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
9955         (SINGLE_THREAD_P): Likewise.
9957         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
9958         value directly.
9960 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
9962         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
9963         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
9965         * pthread_create.c (start_thread): setjmp is expected to return 0.
9967         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
9968         (THREAD_GETMEM_NC): Likewise.
9970 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
9972         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
9973         and the size of the stack which must be allocated is a multiple,
9974         allocate one more page.
9975         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
9976         MULTI_PAGE_ALIASING.
9978 2003-03-13  Roland McGrath  <roland@redhat.com>
9980         * pthread_create.c (start_thread): Set EXITING_BIT after the
9981         event-reporting (and destructors), not before.
9983 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
9985         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
9986         lll_futex_wake): Declare register variables as long int instead of
9987         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
9988         Make syscall arguments clobbered by the syscall.
9989         (lll_futex_wait): Define using lll_futex_timed_wait.
9991         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
9992         to void *.
9994         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
9995         PPID if [! NDEBUG].
9997         * allocatestack.c (nptl_ncreated): Only declare if
9998         COLORING_INCREMENT != 0.
10000         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
10001         (__libc_enable_asynccancel_2): Remove prototype.
10003         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
10004         ctid to match kernel.
10006 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
10008         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
10009         libc_multiple_threads.
10010         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
10011         __libc_multiple_threads to...
10012         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
10014         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
10015         versioning.
10016         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10017         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10019         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
10020         (__pthread_once_internal): Define.
10022         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
10023         macros instead of .symver directly.
10024         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
10025         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
10027         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
10028         * sysdeps/x86_64/tcb-offsets.sym: New file.
10029         * sysdeps/x86_64/Makefile: New file.
10031         * sysdeps/i386/tcb-offsets.sym: Add SELF.
10032         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
10033         to access own pthread_t in TCB.
10034         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10035         Likewise.
10036         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10037         Likewise.
10038         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10040 2003-03-12  Roland McGrath  <roland@redhat.com>
10042         * pthread-errnos.sym: New file.
10043         * Makefile (gen-as-const-headers): New variable, list that file.
10044         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
10045         header <pthread-errnos.h> instead of defining errno values here.
10046         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
10047         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
10048         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
10049         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10050         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10051         Likewise.
10052         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10053         Likewise.
10054         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
10055         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10056         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10057         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10058         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10059         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10060         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
10061         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
10062         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
10063         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
10064         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
10065         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
10066         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
10067         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
10068         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
10069         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
10070         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
10071         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
10072         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
10073         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
10074         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10075         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
10076         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
10077         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
10078         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
10079         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
10080         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
10082         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
10083         CLONE_CHILD_SETTID worked.
10085 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
10087         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
10088         file.
10089         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
10090         file.
10092         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
10093         (pthread_cond_t): Add padding.
10095         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
10096         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
10097         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
10099         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
10100         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
10101         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
10102         (__pthread_rwlock_timedrdlock): Likewise.
10103         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
10104         (__pthread_rwlock_wrlock): Likewise.
10105         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
10106         (__pthread_rwlock_rdlock): Likewise.
10108         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
10110         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
10111         result of lock re-get if it fails.
10113 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
10115         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
10116         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
10117         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
10118         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
10119         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
10120         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
10121         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
10122         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
10123         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10124         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10126         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
10127         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
10129         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
10130         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
10131         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
10132         (create_thread): Likewise.
10133         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
10134         * init.c (__pthread_initialize_minimal_internal): Initialize
10135         __libc_multiple_threads_ptr if necessary.
10136         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
10137         __pthread_multiple_threads and __libc_multiple_threads_ptr.
10138         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
10139         __libc_multiple_threads.
10140         (__libc_pthread_init): Return pointer to __libc_pthread_init if
10141         necessary.
10143         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
10144         (THREAD_SETMEM_NC): Likewise.
10146         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
10147         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
10148         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
10149         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
10151         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
10152         Eliminate one entire instruction.
10154         * cancellation.c (__pthread_enable_asynccancel_2): New function.
10155         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
10156         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
10157         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
10158         instead of __pthread_enable_asynccancel.
10159         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10160         (__pthread_cond_wait): Likewise.
10161         * sysdeps/pthread/pthread_cond_timedwait.c
10162         (__pthread_cond_timedwait): Likewise.
10163         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
10165         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10166         (__condvar_cleanup): Wake up all waiters in case we got signaled
10167         after being woken up but before disabling asynchronous
10168         cancellation.
10169         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10170         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
10171         (__condvar_cleanup): Likewise.
10173         * init.c (__NR_set_tid_address): If already defined, don't redefine.
10174         Make it an error if architecture has no #if case.  Add x86-64.
10176         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
10177         pt-initfini.s generation.
10179         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
10180         (TLS_INIT_TP): Fix typo.
10182 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
10184         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
10185         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
10187         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
10188         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
10189         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
10190         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
10191         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
10192         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10193         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10194         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10196 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
10198         * sysdeps/pthread/pthread_cond_timedwait.c
10199         (__pthread_cond_timedwait): Return the result of the final
10200         locking.  If it succeeds, the regular function return value.
10202         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
10203         Return result of the final locking.
10204         * version.c (__nptl_main): Work around problems with the strange
10205         INTERNAL_SYSCALL macro on ppc32.
10206         * init.c (__pthread_initialize_minimal_internal): Unblock
10207         SIGCANCEL in case the parent blocked it.
10208         Reported by Paul Mackerras <paulus@samba.org>.
10210         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
10211         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
10212         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
10214 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
10216         * sysdeps/pthread/pthread_cond_timedwait.c
10217         (__pthread_cond_timedwait): Unlock and fail if
10218         __pthread_mutex_unlock_internal failed.
10220         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
10221         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
10222         Use ARCH_CLONE.
10223         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
10224         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
10225         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
10226         ALLOCATE_STACK): New macros.
10227         (TLS_TPADJ): New macro.
10228         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
10229         (allocate_stack): Handle TLS_DTV_AT_TP and
10230         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
10231         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
10232         Don't set PD->self.
10233         * init.c [__ia64__] (__NR_set_tid_address): Define.
10235         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
10236         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
10237         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
10238         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
10239         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
10240         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
10241         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
10242         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
10243         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
10244         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
10245         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
10246         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
10247         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
10248         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
10249         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
10250         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
10251         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
10252         * sysdeps/ia64/bits/atomic.h: New file.
10253         * sysdeps/ia64/Makefile: New file.
10254         * sysdeps/ia64/pthread_spin_init.c: New file.
10255         * sysdeps/ia64/pthread_spin_lock.c: New file.
10256         * sysdeps/ia64/pthread_spin_trylock.c: New file.
10257         * sysdeps/ia64/pthread_spin_unlock.c: New file.
10258         * sysdeps/ia64/pthreaddef.h: New file.
10259         * sysdeps/ia64/tcb-offsets.sym: New file.
10260         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
10261         * sysdeps/ia64/tls.h: New file.
10263         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
10264         to syscall instead of no arguments.
10266 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
10268         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
10269         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
10270         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
10271         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
10273         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
10274         unused code.
10276         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
10278         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10279         lowlevelbarrier.sym.
10280         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
10281         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
10282         Include lowlevelbarrier.h and don't define offsets locally.
10283         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
10285         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
10286         (__lll_mutex_lock_wait): Reverse order of first two parameters.
10287         (__lll_mutex_timedlock_wait): Likewise.
10288         (lll_mutex_lock): Adjust asm for that.
10289         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
10290         (lll_lock): Adjust asm for operand order change.
10291         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
10292         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
10294         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
10295         Reverse order of parameters.
10296         (__lll_timedwait_tid): Remove regparms attribute.
10297         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
10298         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
10300         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10301         (__lll_timedwait_tid): Remove one unnecessary instruction.
10303         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
10304         __lll_mutex_timedlock_wait only for NOT_IN_libc.
10305         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
10306         lowlevelmutex.S.
10308         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
10309         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
10310         for NOT_IN_libc.
10311         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
10312         lowlevellock.S.
10314         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
10315         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
10316         for libc.so.
10317         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
10318         define LOCK here (if UP is not defined).  The actual code is in
10319         lowlevelmutex.S.
10321         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
10322         LOCK is already defined.  Don't define lll_unlock_wake_cb and
10323         __lll_timedwait_tid for libc.so.
10324         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
10325         define LOCK here (if UP is not defined).  The actual code is in
10326         lowlevellock.S.
10328         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
10329         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
10330         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
10331         instead of lowlevelsem.h.
10332         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10333         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10334         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10336         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10337         lowlevelrwlock.sym.
10338         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
10339         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
10340         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
10342         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
10343         register loading.
10344         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
10345         last changed.  D'oh.
10347         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
10349         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
10350         of __libc_locking_needed.
10351         (lll_trylock): Initialize %eax to zero.
10353         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
10354         pthread_cond_t definition.
10356 2003-03-10  Roland McGrath  <roland@redhat.com>
10358         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
10359         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
10360         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
10361         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
10362         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
10364         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
10365         Instead of setting PD->multiple_threads, set globals
10366         __pthread_multiple_threads and __libc_multiple_threads.
10367         * sysdeps/pthread/createthread.c (create_thread): Likewise.
10368         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
10369         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
10371         * descr.h (struct pthread): Conditionalize first member on
10372         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
10373         containing an anonymous tcbhead_t.  Move `list' member out.
10374         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
10375         * allocatestack.c: Remove use of `header.data.' prefix.
10376         * pthread_create.c: Likewise.
10377         * init.c (__pthread_initialize_minimal_internal): Likewise.
10378         * sysdeps/pthread/createthread.c (create_thread): Likewise.
10379         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
10380         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
10381         * sysdeps/x86_64/tls.h: Likewise.
10382         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
10383         (SINGLE_THREAD_P): Likewise.
10384         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
10385         (SINGLE_THREAD_P): Likewise.
10386         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
10387         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
10389 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
10391         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
10393         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
10394         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10396         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
10397         leftovers from the ia32 code.
10399         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
10400         memory load.
10401         (clear_once_control): Don't load %esi.
10403         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
10404         handling.
10406         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10408         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
10409         * sysdeps/unix/sysv/linux/createthread.c: ...here.
10411         * Makefile (tests): Add tst-cond10.
10412         * tst-cond10.c: New file.
10414 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
10416         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
10417         * tst-signal3.c (do_test): Likewise.
10418         * tst-sem5.c (do_test): Likewise.
10419         * tst-kill6.c (do_test): Likewise.
10420         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
10422         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
10423         of inc/dec.
10424         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
10425         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
10426         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
10427         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
10428         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10429         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10430         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10431         Likewise.
10432         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10433         Likewise.
10434         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
10435         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10436         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10437         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10438         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10439         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
10440         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10441         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10443         * allocatestack.c (allocate_stack): If mprotect() fails free the
10444         TLS memory.
10446 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
10448         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
10450         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
10451         lll_wake_tid.  This was used only to work around kernel limits in
10452         the early days.
10453         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
10454         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
10455         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10456         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
10458         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
10459         (__pthread_initialize_minimal_internal): Change initialization of
10460         __static_tls_align_m1 appropriately.
10461         * pthreadP.h (__static_tls_align_m1): Renamed from
10462         __static_tls_align.
10463         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
10464         instead of __static_tls_align-1.
10466 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
10468         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
10470         * pthread_create.c: Define __pthread_keys using nocommon
10471         attribute, not by placing it explicitly in bss.
10472         Remove DEFINE_DEALLOC definition.  Not needed anymore.
10474         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
10475         Use it in mmap call to allocate stacks.
10477         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
10479         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
10480         result of the thread function.
10482 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
10484         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
10485         version is just fine.
10487         * sysdeps/unix/sysv/linux/libc_pthread_init.c
10488         (__pthread_child_handler): Renamed from pthread_child_handler,
10489         exported, and marked hidden.  Change all users.
10490         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
10491         free __pthread_child_handler from child list.
10493 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
10495         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
10497         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
10498         Fix handling of cancellation and failing pthread_mutex_unlock call.
10499         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10500         (__pthread_cond_wait): Likewise.
10502         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
10503         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
10504         lll_futex_timed_wait call.
10505         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
10506         (pthread_rwlock_timedwrlock): Likewise.
10508         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
10509         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
10510         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
10512         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
10513         check of lll_futex_wake return value.
10515 2003-03-03  Roland McGrath  <roland@redhat.com>
10517         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
10519         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10520         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
10521         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
10523 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
10525         * sysdeps/pthread/timer_create.c (timer_create): Return correct
10526         error for CPU clocks.
10528         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
10529         _POSIX_MONOTONIC_CLOCK.
10530         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
10532         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
10533         recent kernels.
10535 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
10537         * descr.h (struct pthread): Move cleanup field to the front.
10539 2003-03-01  Roland McGrath  <roland@redhat.com>
10541         * sem_open.c (sem_open): Braino fix.
10543 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
10545         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
10546         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
10547         __pthread_cleanup_pop functionality.
10548         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10550         * descr.h (struct pthread): Move tid field to the front now that
10551         it is often used.
10553         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
10554         (__lll_mutex_timedlock_wait): Remove.
10555         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10556         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
10557         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10558         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10559         (lll_unlock_wake_cb): Don't save and restore %esi.
10560         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
10561         %esi.
10562         (__lll_timedwait_tid): Add alignment.
10563         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
10564         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
10565         %esi.
10566         (__lll_timedwait_tid): Removed.
10567         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
10568         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
10569         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
10570         (pthread_barrier_wait): Don't save, load, and restore %esi for
10571         last thread.
10572         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
10573         (__pthread_cond_signal): Don't save, load, and restore %esi.
10574         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
10575         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
10576         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
10577         Don't save, load, and restore %esi.
10579 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
10581         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
10582         Release lock before waking up the waiters.
10584         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
10586         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
10587         (reader_thread): Likewise.
10589         * sysdeps/pthread/pthread_rwlock_unlock.c
10590         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
10591         to wake up readers if there are none.
10593         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
10594         Release internal lock before wake threads.
10596 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
10598         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
10599         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
10600         predefined.
10601         * tst-rwlock9.c: Likewise.
10602         * tst-rwlock10.c: New file.
10603         * tst-rwlock11.c: New file.
10605         * Makefile (tests): Add tst-dlsym1.
10606         * tst-dlsym1.c: New file.
10608         * init.c (__pthread_initialize_minimal_internal): Set
10609         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
10610         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
10612 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
10614         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
10616         * tst-cond2.c: Fix sychronization with child.
10618         * tst-rwlock8.c (reader_thread): Remove unused variable.
10620         * Makefile: Add rules to build and run tst-tls3.
10621         * tst-tls3.c: New file.
10622         * tst-tls3mod.c: New file.
10624         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
10625         * tst-rwlock8.c: New file.
10626         * tst-rwlock9.c: New file.
10627         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
10628         complete broken rwlock implementation.
10629         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10630         Likewise.
10631         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10632         Likewise.
10633         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10634         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10635         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
10636         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
10637         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
10638         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
10639         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
10641 2003-02-23  Roland McGrath  <roland@redhat.com>
10643         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
10645 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
10647         * Makefile (tests): Add tst-context1.
10648         * tst-context1.c: New file.
10650         * Makefile (tests): Add tst-tls1 and tst-tls2.
10651         * tst-tls1.c: New file.
10652         * tst-tls2.c: New file.
10654         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
10655         for failed cmpxchg.
10657         * pthread_create.c (start_thread): Set EXITING_BIT early.
10659         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
10660         (THREAD_GETMEM_NC): Likewise.
10662 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
10664         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
10665         off 3 more bytes by using offset-less instructions when possible.
10667         * Makefile: Add dependency for $(objpfx)version.d.
10669         * eintr.c (eintr_source): Add unnecessary return but the compiler
10670         insists.
10672         * tst-kill3.c: Include <unistd.h>.
10674 2003-02-21  Roland McGrath  <roland@redhat.com>
10676         * pthread_create.c (start_thread): Call __libc_thread_freeres.
10678 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
10680         * Makefile (tests): Add tst-eintr1.
10681         (distribute): Add eintr.c.
10682         * tst-eintr1.c: New file.
10683         * eintr.c: New file.
10685         * pthread_cancel.c (pthread_cancel): Use tkill directly.
10687         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
10688         Disallow sending SIGCANCEL.
10690         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
10691         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
10692         * tst-kill1.c: New file.
10693         * tst-kill2.c: New file.
10694         * tst-kill3.c: New file.
10695         * tst-kill5.c: New file.
10696         * tst-kill6.c: New file.
10697         * tst-basic7.c: Renamed to...
10698         * tst-kill4.c: ...this.
10700 2003-02-21  Roland McGrath  <roland@redhat.com>
10702         * Makefile (install-lib-ldscripts): New variable.
10704 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
10706         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
10707         * pthread_cancel.c: Use INVALID_TD_P.
10708         * pthread_detach.c: Likewise.
10709         * pthread_getschedparam.c: Likewise.
10710         * pthread_setschedparam.c: Likewise.
10711         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
10712         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
10713         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
10714         * pthread_timedjoin.c: Likewise.
10716         * tst-basic7.c: Include <signal.h>.
10718         * pthread_join.c (pthread_join): Limited checking for invalid
10719         descriptors.
10720         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
10722 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
10724         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
10725         beginning of the loop.  Clear the entire first block of TSD.
10726         * Makefile (tests): Add tst-key4.
10727         * tst-key4.c: New file.
10729 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
10731         * Makefile (tests): Add tst-basic7.
10732         * tst-basic7.c: New file.
10734         * pthread_create.c (deallocate_tsd): Mark as internal_function.
10735         Add some more __builtin_expect.
10737         * pthreadP.h: Define dummy version of DEBUGGING_P.
10739 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
10741         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
10742         _POSIX_THREAD_PRIORITY_SCHEDULING.
10743         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
10744         _XOPEN_REALTIME_THREADS.
10745         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
10747         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
10748         kernel returns EINVAL for PID <= 0, work around it.
10750         * Makefile (tests): Add tst-signal5.
10751         * tst-signal5.c: New file.
10753         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
10754         and LOGIN_NAME_MAX.
10756         * tst-cancel1.c (tf): Block all signals.
10758         * Makefile (tests): Add tst-basic6.
10759         * tst-basic6.c: New file.
10761         * tst-basic1.c: Add test for process ID.
10763         * Makefile (tests): Add tst-cancel10.
10764         * tst-cancel10.c: New file.
10766         * Makefile (tests): Add tst-signal4.
10767         * tst-signal4.c: New file.
10769         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
10770         __sigismember instead of sigismember.  Add __builtin_expect.
10772 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
10774         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
10775         pthread_setcancelstate, and pthread_rwlock_setpshared.
10777         * tst-cancel7.c (do_test): Make sure the pid file exists before
10778         canceling the thread.
10780         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
10781         pthread_rwlock_timedrdlock tests.
10782         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
10783         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10784         Check for invalid tv_nsec field.
10785         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10786         Likewise.
10788         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
10789         recursive mutex of overflow.
10791         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
10793         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
10794         going into an endless loop.
10795         * Makefile (tests): Add tst-cancel9.
10796         * tst-cancel9.c: New file.
10798         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
10800 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
10802         * tst-mutex5.c (do_test): Add more timedlock tests.
10804         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
10805         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
10807         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
10808         use INLINE_SYSCALL.  Error number is returned, not -1.
10810         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
10811         and __deallocate_stack with internal_function.
10812         * pthread_create.c: Adjust definitions appropriately.
10813         * allocatestack.c: Likewise.
10815         * pthread_join.c: Add one more __builtin_expect.
10816         * pthread_timedjoin.c: Likewise.
10818         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
10819         not data of sequence number does not match.
10820         Add one __builtin_expect.
10822         * Makefile (tests): Add tst-clock1.
10823         * tst-clock1.c: New file.
10825         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
10826         negative arguments.
10827         * Makefile (tests): Add tst-basic5.
10828         * tst-basic5.c: New file.
10830 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
10832         * Makefile (tests): Add tst-basic4.
10833         * tst-basic4.c: New file.
10835         * pthreadP.h: Add declaraction for __nptl_nthreads.
10836         * pthread_create.c: Define __nptl_nthreads
10837         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
10838         after thread is done.  If then zero, call exit(0).
10839         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10840         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
10841         * init.c (pthread_functions): Initialize ptr_nthreads.
10842         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
10843         (__reclaim_stacks): Decrement __nptl_nthreads.
10844         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
10845         Define.
10846         * Makefile (tests): Add tst-basic3.
10847         * tst-basic3.c: New file.
10849         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
10850         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
10851         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
10852         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
10853         if asynchronous canceling is enabled.
10854         * pthread_join.c (pthread_join): When recognizing circular joins,
10855         take into account the other thread might be already canceled.
10856         * Makefile (tests): Add tst-join5.
10857         * tst-join5.c: New file.
10859         * Makefile (tests): Add tst-join4.
10860         * tst-join4.c: New file.
10862 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
10864         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
10866 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
10868         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
10869         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
10870         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
10871         warning.
10872         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
10873         to avoid warning.
10874         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
10875         error if lll_futex_wake failed.
10877 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
10879         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
10880         handling of cancellation and failung pthread_mutex_unlock call.
10881         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10882         * Makefile (tests): Add tst-cond8 and tst-cond9.
10883         * tst-cond8.c: New file.
10884         * tst-cond9.c: New file.
10886         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
10888         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
10889         non-standard initializers with __USE_GNU.
10891         * Makefile (tests): Add tst-cleanup3.
10892         * tst-cleanup3.c: New file.
10894 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
10896         * Makefile (tests): Add tst-attr1 and tst-attr2.
10897         * tst-attr1.c: New file.
10898         * tst-attr2.c: New file.
10900         * Makefile: Add rules to build and run tst-atfork2 test.
10901         * tst-atfork2.c: New file.
10902         * tst-atfork2mod.c: New file.
10904         * sysdeps/unix/sysv/linux/unregister-atfork.c
10905         (__unregister_atfork): Free the memory allocated for the handlers
10906         after removing them from the lists.
10908         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
10909         cleanup function.
10911         * tst-atfork1.c (do_test): Wait for the child we forked.
10912         Report error in child.
10914         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
10916         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
10918 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
10920         * Makefile (tests): Add tst-cancel8.
10921         * tst-cancel8.c: New file.
10923         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
10924         clearing of control variable.
10925         * Makefile (tests): Add tst-once3 and tst-once4.
10926         * tst-once3.c: New file.
10927         * tst-once4.c: New file.
10929 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
10931         * sysdeps/sh/Makefile: New file.
10932         * sysdeps/sh/bits/atomic.h: New file.
10933         * sysdeps/sh/pthread_spin_init.c: New file.
10934         * sysdeps/sh/pthread_spin_lock.c: New file.
10935         * sysdeps/sh/pthread_spin_trylock.S: New file.
10936         * sysdeps/sh/pthread_spin_unlock.S: New file.
10937         * sysdeps/sh/pthreaddef.h: New file.
10938         * sysdeps/sh/tcb-offsets.sym: New file.
10939         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
10940         * sysdeps/sh/tls.h: New file.
10941         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
10942         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
10943         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
10944         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
10945         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
10946         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
10947         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
10948         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
10949         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
10950         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
10951         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
10952         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
10953         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
10954         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
10955         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
10956         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
10957         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
10958         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
10959         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
10960         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
10961         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
10962         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
10963         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
10964         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
10965         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
10966         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
10967         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
10968         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
10969         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
10970         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
10972 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
10974         * tst-cond2.c: Rearrange code to not rely on behavior undefined
10975         according to POSIX.
10977         * tst-basic2.c (do_test): Lock mutex before creating the thread.
10979 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
10981         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
10982         (TLS_GET_FS): New #define.
10983         (TLS_SET_FS): New #define.
10984         Correct value of __NR_set_thread_area.
10986         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
10988 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
10990         * Makefile (tests): Add tst-popen1.
10991         * tst-popen1.c: New file.
10993         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
10994         but inactive generalization.
10995         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10996         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10997         Minor optimization, remove one instruction.
10998         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
11000 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
11002         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
11004 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
11006         * init.c (__NR_set_tid_address): Add #ifdef for s390.
11007         * sysdeps/pthread/pthread_barrier_wait.c: New file.
11008         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
11009         * sysdeps/pthread/pthread_cond_signal.c: New file.
11010         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
11011         * sysdeps/pthread/pthread_cond_wait.c: New file.
11012         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
11013         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
11014         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
11015         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
11016         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
11017         * sysdeps/s390/Makefile: New file.
11018         * sysdeps/s390/bits/atomic.h: New file.
11019         * sysdeps/s390/pthread_spin_init.c: New file.
11020         * sysdeps/s390/pthread_spin_lock.c: New file.
11021         * sysdeps/s390/pthread_spin_trylock.c: New file.
11022         * sysdeps/s390/pthread_spin_unlock.c: New file.
11023         * sysdeps/s390/pthreaddef.h: New file.
11024         * sysdeps/s390/tcb-offsets.sym: New file.
11025         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
11026         * sysdeps/s390/tls.h: New file.
11027         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
11028         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
11029         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
11030         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
11031         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
11032         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
11033         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
11034         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
11035         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
11036         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
11037         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
11038         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
11039         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
11040         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
11041         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
11042         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
11043         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
11044         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
11045         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
11046         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
11047         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
11048         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
11049         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
11051 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
11053         * atomic.h: Add a couple more default implementations.
11054         (atomic_compare_and_exchange_acq): Use
11055         __arch_compare_and_exchange_32_acq in return value definition.  It
11056         always exists.
11057         (atomic_bit_set): Renamed from atomic_set_bit.
11058         Add missing atomic_ prefixes.
11060         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
11061         thread library is available, use correct value to mark initialized
11062         once variable.
11064 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
11066         * allocatestack.c (allocate_stack): Use __getpagesize instead of
11067         __sysconf to determine pagesize.
11069         * pthread_create.c: Include <atomic.h>.
11070         * allocatestack.c (allocate_stack): Implement coloring of the
11071         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
11072         size minus one.  Adjust users.
11073         * sysdeps/i386/i686/Makefile: New file.
11075 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
11077         * allocatestack.c: Improve comment throughout the file.
11079         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
11080         (__lll_lock_wait): Add branch prediction.
11081         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
11082         (__lll_lock_wait): Likewise.
11083         (lll_unlock_wake_cb): Removed.
11085 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
11087         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
11088         _POSIX_THREAD_PRIORITY_SCHEDULING.
11090 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
11092         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
11093         Fix return type of ptr___pthread_getspecific.
11095 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
11097         * Makefile (tests): Add tst-umask1.
11098         (tst-umask1-ARGS): Define.
11099         * tst-umask1.c: New file.
11101 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
11103         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
11104         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
11105         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
11106         pthread_rwlock_unlock.
11107         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
11108         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
11109         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
11110         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
11111         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11112         New file.
11113         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
11114         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11115         New file.
11116         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
11117         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
11118         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
11119         New file.
11120         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
11121         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
11122         New file.
11123         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
11124         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
11125         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
11126         New file.
11127         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
11128         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
11129         New file.
11130         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
11132         * Makefile (libpthread-routines): Remove lowlevelcond and
11133         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
11134         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
11135         and pthread_cond_broadcast.
11136         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
11137         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
11138         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
11139         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
11140         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
11141         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
11142         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
11143         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
11144         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
11145         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
11146         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
11147         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
11148         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
11149         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
11150         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
11151         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
11152         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
11153         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
11154         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
11155         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
11156         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
11157         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
11158         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
11159         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
11160         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
11161         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
11162         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
11163         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
11164         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
11165         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
11166         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
11168         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
11169         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
11170         of the code is moved to ...
11171         * sysdeps/pthread/createthread.c: ...here.  New file.
11173 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
11175         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
11176         (__new_sem_post): Clear %eax before returning.
11177         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
11179         * Makefile (tests): Add tst-cleanup2.
11180         * tst-cleanup2.c: New file.
11182         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
11183         Interpret first parameter correctly.
11185 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
11187         * Makefile (headers): Add bits/semaphore.h.
11189 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
11191         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
11192         if not SHARED.
11194 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
11196         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
11197         must be used and mapping failed.
11198         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
11200         * Makefile (CFLAGS-pthread_self.os): Define this, not
11201         CFLAGS-pthread_self.c.
11203 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
11205         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
11206         lll_unlock_wake_cb.
11208         * Makefile (libpthread-routines): Add version.  Add rules to build
11209         version.os and banner.h.
11210         * version.c: New file.
11212 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
11214         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
11215         the alias unconditional.
11216         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
11218 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
11220         * Makefile (CFLAGS-pthread_self.c): New definition.
11222 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
11224         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
11225         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
11226         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
11227         * init.c (__pthread_initialize_minimal_internal): Likewise.
11229 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
11231         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
11233         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
11234         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11235         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11236         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
11237         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11238         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11240 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
11242         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
11243         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
11244         * tst-cancel-wrappers.sh: Remove all exceptions.
11246 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
11248         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
11249         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
11251         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
11252         Use __libc_pthread_functions array if SHARED.
11254         * pthreadP.h: Move pthread_cond_2_0_t definition to...
11255         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
11257         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
11258         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
11259         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
11260         __libc_ptf_call instead of __libc_maybe_call.
11261         (PTF): New #define.
11262         (__libc_cleanup_region_start): Wrap function name with PTF call.
11263         (__libc_cleanup_region_end): Likewise.
11264         (__libc_cleanup_end): Likewise.
11266         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
11267         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
11268         * pthread_key_create.c: Add __pthread_key_create_internal alias.
11269         * pthreadP.h: Add prototypes.
11271         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
11272         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
11273         __pthread_rwlock_unlock aliases.
11274         * pthreadP.h: Add prototypes for new aliases.
11276         * pthreadP.h (struct pthead_functions): Moved to...
11277         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
11278         * init.c (pthread_functions): Add initializers for new elements.
11280         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
11281         __pthread_cleanup_pop_restore aliases.
11282         * pthreadP.h: Add prototypes.
11284         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
11285         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
11286         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
11287         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
11288         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
11289         * pthreadP.h: Adjust prototypes and callers.
11291 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
11293         * Makefile (tests): Add tst-cancel7.
11294         (tst-cancel7-ARGS): New variable.
11295         * tst-cancel7.c: New file.
11297         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
11298         around gcc defficiencies.
11299         * old_pthread_cond_signal.c: Likewise.
11300         * old_pthread_cond_timedwait.c: Likewise.
11301         * old_pthread_cond_wait.c: Likewise.
11303         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
11305 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
11307         * Makefile (tests): Add tst-cond7.
11308         * tst-cond7.c: New file.
11310         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11311         (condvar_cleanup): Get condvar address from the right place.
11313         * atomic.h: Correct definitions of atomic_full_barrier,
11314         atomic_read_barrier, atomic_write_barrier.
11316         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
11317         race-free.
11318         * old_pthread_cond_signal.c: Likewise.
11319         * old_pthread_cond_timedwait.c: Likewise.
11320         * old_pthread_cond_wait.c: Likewise.
11322 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
11324         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
11326 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
11328         * pthreadP.h (pthread_cond_2_0_t): New type.
11329         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
11330         Use new type for the 2.0 condvar function prototypes.
11331         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
11332         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
11333         parameter.
11334         * old_pthread_cond_destroy.c: Likewise.
11335         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
11336         * old_pthread_cond_signal.c: Likewise.
11337         * old_pthread_cond_timedwait.c: Likewise.
11338         * old_pthread_cond_wait.c: Likewise.
11340         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11341         (__pthread_cond_wait): Don't save cancellation mode and seq value
11342         in same location.
11344         * herrno.c (__h_errno_location): Don't define as weak.
11346 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
11348         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
11349         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
11350         and pthread_cond_wait.
11351         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
11352         Renamed to...
11353         (__pthread_cond_broadcast_2_0): ... this.
11354         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
11355         Renamed to...
11356         (__pthread_cond_destroy_2_0): ... this.
11357         * old_pthread_cond_init.c (__old_pthread_cond_init):
11358         Renamed to...
11359         (__pthread_cond_init_2_0): ... this.
11360         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
11361         Renamed to...
11362         (__pthread_cond_signal_2_0): ... this.
11363         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
11364         Renamed to...
11365         (__pthread_cond_wait_2_0): ... this.
11366         * pthread_cond_destroy.c: Include shlib-compat.h.
11367         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
11368         * pthread_cond_init.c: Include shlib-compat.h.
11369         (pthread_cond_init): Change strong_alias into versioned_symbol.
11370         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
11371         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
11372         fields.
11373         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
11374         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
11375         __pthread_cond_wait_2_0): New prototypes.
11376         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
11377         __old_pthread_cond_init, __old_pthread_cond_signal,
11378         __old_pthread_cond_wait): Removed.
11379         * init.c: Include shlib-compat.h.
11380         (pthread_functions): Guard ptr___pthread_attr_init_2_0
11381         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
11382         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
11383         ptr___pthread_cond_*_2_0 fields.
11384         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
11385         pthread_cond_*@GLIBC_2.0 compatibility symbols.
11387         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
11388         LIBC_SIGACTION was not yet defined.
11389         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
11390         [!defined LIBC_SIGACTION] (__sigaction): New function and
11391         libc_hidden_weak.
11392         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
11393         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
11395 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
11397         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
11399 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
11401         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
11402         New, larger type definition.
11403         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
11404         implementation.
11405         * Versions [libpthread]: Add definitions for new pthread_cond_*
11406         interfaces for version GLIBC_2.3.2.
11407         * pthread_cond_init.c: Update initialization for new type definition.
11408         * Makefile (libpthread-routines): Remove pthread_cond_wait,
11409         pthread_cond_timedwait, pthread_cond_signal, and
11410         pthread_cond_broadcast.  Add old_pthread_cond_init,
11411         old_pthread_cond_destroy, old_pthread_cond_wait,
11412         old_pthread_cond_timedwait, old_pthread_cond_signal, and
11413         old_pthread_cond_broadcast.
11414         * old_pthread_cond_broadcast.c: New file.
11415         * old_pthread_cond_destroy.c: New file.
11416         * old_pthread_cond_init.c: New file.
11417         * old_pthread_cond_signal.c: New file.
11418         * old_pthread_cond_timedwait.c: New file.
11419         * old_pthread_cond_wait.c: New file.
11420         * pthreadP.h: Add prototypes for the compatibility interfaces.
11422         * pthread_cond_destroy.c: Don't include <errno.h>.
11424 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
11426         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
11427         unnecessary zero offset when addressing MUTEX.
11429 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
11431         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
11432         __register_atfork.
11433         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
11434         for __register_atfork.
11436 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
11438         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
11439         instead of ASSEMBLER test macro.
11441         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
11442         __libc_current_sigrtmax): Add libc_hidden_def.
11444         * sysdeps/pthread/list.h: Remove assert.h include.
11446 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
11448         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
11449         __pthread_initialize_minimal_internal not
11450         __pthread_initialize_minimal.
11452 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
11454         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
11455         __pthread_initialize_minimal as hidden.
11457         * init.c (__pthread_initialize_minimal_internal): Don't mark as
11458         constructor.
11460 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
11462         * Makefile ($(inst_libdir)/libpthread.so): Depend on
11463         $(common-objpfx)format.lds, include that into the output script.
11464         Fix comment.
11465         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
11467 2002-12-28  Andreas Jaeger  <aj@suse.de>
11469         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
11470         nsec resolution changes.
11471         (xstat64_conv): Likewise.
11472         (xstat32_conv): Likewise.
11473         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
11474         struct kernel_stat.
11475         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
11476         structs stat and stat64.
11477         * time/time.h (__timespec_defined): Define for __USE_MISC.
11478         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
11480 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
11482         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
11483         argument.
11484         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
11485         (pthread_exit): Use strong_alias to avoid warnings.
11486         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
11487         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
11488         ptr___pthread_attr_init_2_*.
11489         * init.c (pthread_functions): Adjust.
11491 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
11493         * forward.c: Make all functions available by default again.  It
11494         caused too much trouble.
11496         * pt-siglongjmp.c: Removed.
11498 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
11500         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
11501         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
11502         * sysdeps/i386/Makefile: New file.
11503         * sysdeps/i386/tcb-offsets.sym: New file.
11504         * sysdeps/pthread/tcb-offsets.h: New file.
11505         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11506         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
11508         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
11509         __register_atfork...
11510         (GLIBC_2.3.2): ...here.
11512 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
11514         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
11515         pthread_attr_setstackaddr with __attribute_deprecated__.
11517 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
11519         * pt-system.c (system): Remove cancellation handling.
11520         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
11521         cancellation routines.
11523 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
11525         * descr.h: Include <dl-sysdep.h>.
11526         (struct pthread): Move header.data.list to the back of the struct.
11527         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
11528         (MULTIPLE_THREADS_OFFSET): Adjust offset.
11529         (SYSINFO_OFFSEET): Likewise.
11531 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
11533         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
11534         Define.
11535         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
11536         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
11537         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
11538         (USE_DL_SYSINFO): Undef.
11540 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
11542         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
11543         $(common-objpfx)libc.so.
11544         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
11545         it is bigger than pipe buffer size even on arches with bigger
11546         page size.
11547         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
11549 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
11551         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
11552         correct errno access for case that USE___THREAD is not defined.
11554 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
11556         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
11557         Patch by Marijn Ros <marijn@mad.scientist.com>.
11559 2002-12-22  Roland McGrath  <roland@redhat.com>
11561         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
11563 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
11565         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
11567 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
11569         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
11570         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
11571         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
11573         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
11574         of int $0x80.
11575         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11576         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
11577         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
11578         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
11579         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
11580         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
11581         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
11582         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
11584         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
11585         sysenter.
11586         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
11588         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
11590         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
11591         in new TCB.
11592         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
11593         that sysinfo is properly initialized.
11594         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
11595         to 1 only for ld.so.
11597         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
11598         RTLD_CORRECT_DYNAMIC_WEAK.
11600 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
11602         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
11603         Use return 0 as 6th argument to FORWARD4.
11604         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
11606 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
11608         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
11609         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
11610         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
11611         (INIT_SYSINFO): New #define.
11612         (TLS_TP_INIT): Use INIT_SYSINFO.
11613         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11614         At test to make sure SYSINFO_OFFSET value is correct.
11615         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
11617 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
11619         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
11620         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
11621         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
11622         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
11623         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
11624         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
11625         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
11627 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
11629         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
11630         macro instead of using int $0x80 directly.
11632         * sysdeps/pthread/bits/stdio-lock.h: New file.
11633         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
11634         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
11635         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
11636         * Makefile (routines): Add libc-lowlevelmutex.
11638         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
11639         __i686.get_pc_thunk.dx.
11641 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
11643         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
11644         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
11645         ($(objpfx)tst-cancel-wrappers.out): New rule.
11646         * tst-cancel-wrappers.sh: New test.
11647         * tst-locale1.c: Include signal.h.
11648         (uselocale): Test static linking of __libc_current_sigrt*.
11650 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
11652         * Makefile (tests): Add tst-cancel6.
11653         * tst-cancel6.c: New file
11655 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
11657         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
11658         Define meaningfully for assembler as well.
11659         * pthreadP.h (struct pthread_functions): Remove
11660         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
11661         and ptr_pthread_attr_init_2_1 fields.
11662         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
11663         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
11664         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
11665         (FORWARD3): Define using FORWARD4.
11666         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
11667         versions.
11668         * pt-system.c: Remove duplicate stdlib.h include.
11670 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
11672         * sem_init.c: Define sem_init@GLIBC_2.0.
11673         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
11674         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
11676         * flockfile.c: Moved to...
11677         * sysdeps/pthread/flockfile.c: ...here.  New file.
11678         * funlockfile.c: Moved to...
11679         * sysdeps/pthread/funlockfile.c: ...here.  New file.
11680         * ftrylockfile.c: Moved to...
11681         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
11683 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
11685         * libc-cancellation.c: Guard both function with
11686         #if !defined NOT_IN_libc.
11687         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
11688         automatically provided pthread wrappers.
11689         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
11690         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
11691         nor in libpthread.
11692         * pt-open.c: Removed.
11693         * pt-fcntl.c: Removed.
11694         * pt-fsync.c: Removed.
11695         * pt-lseek.c: Removed.
11696         * pt-msgrcv.c: Removed.
11697         * pt-msgsnd.c: Removed.
11698         * pt-msync.c: Removed.
11699         * pt-nanosleep.c: Removed.
11700         * pt-open64.c: Removed.
11701         * pt-pause.c: Removed.
11702         * pt-pread.c: Removed.
11703         * pt-pread64.c: Removed.
11704         * pt-pwrite.c: Removed.
11705         * pt-pwrite64.c: Removed.
11706         * pt-read.c: Removed.
11707         * pt-recv.c: Removed.
11708         * pt-recvfrom.c: Removed.
11709         * pt-recvmsg.c: Removed.
11710         * pt-send.c: Removed.
11711         * pt-sendto.c: Removed.
11712         * pt-sigtimedwait.c: Removed.
11713         * pt-sigwait.c: Removed.
11714         * pt-wait.c: Removed.
11715         * pt-waitpid.c: Removed.
11716         * pt-write.c: Removed.
11717         * pt-accept.c: Removed.
11718         * pt-close.c: Removed.
11719         * pt-connect.c: Removed.
11720         * pt-lseek64.c: Removed.
11721         * pt-sendmsg.c: Removed.
11722         * pt-tcdrain.c: Removed.
11724 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
11726         * init.c (__pthread_initialize_minimal_internal): Renamed from
11727         __pthread_initialize_minimal.  Make old name an alias.  This
11728         converts a normal relocation into a relative relocation.
11730         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
11732         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
11733         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
11734         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
11735         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
11736         pt-sigwaitinfo, pt-waitid, and pt-writev.
11737         * pt-creat.c: Removed.
11738         * pt-poll.c: Removed.
11739         * pt-pselect.c: Removed.
11740         * pt-readv.c: Removed.
11741         * pt-select.c: Removed.
11742         * pt-sigpause.c: Removed.
11743         * pt-sigsuspend.c: Removed.
11744         * pt-sigwaitinfo.c: Removed.
11745         * pt-waitid.c: Removed.
11746         * pt-writev.c: Removed.
11748         * init.c (pthread_functions): New variable.
11749         (__pthread_initialize_minimal): Pass pointer to pthread_functions
11750         (or NULL) to __libc_pthread_init.
11751         * forward.c: Rewrite to use __libc:pthread_functions array to get
11752         function addresses.
11753         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
11754         prototype.
11755         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11756         Take new parameter.  Copy content of variable pointed to by it
11757         to __libc_pthread_init.
11759         * pthreadP.h (struct pthread_functions): New type.
11760         (__libc_pthread_init): Declare.
11762         * pthread_attr_destroy.c: Add namespace protected alias.
11763         * pthread_attr_getdetachstate.c: Likewise.
11764         * pthread_attr_getinheritsched.c: Likewise.
11765         * pthread_attr_getschedparam.c: Likewise.
11766         * pthread_attr_getschedpolicy.c: Likewise.
11767         * pthread_attr_getscope.c: Likewise.
11768         * pthread_attr_setdetachstate.c: Likewise.
11769         * pthread_attr_setinheritsched.c: Likewise.
11770         * pthread_attr_setschedparam.c: Likewise.
11771         * pthread_attr_setschedpolicy.c: Likewise.
11772         * pthread_attr_setscope.c: Likewise.
11773         * pthread_cond_broadcast.c: Likewise.
11774         * pthread_cond_destroy.c: Likewise.
11775         * pthread_cond_init.c: Likewise.
11776         * pthread_cond_signal.c: Likewise.
11777         * pthread_cond_wait.c: Likewise.
11778         * pthread_condattr_destroy.c: Likewise.
11779         * pthread_condattr_init.c: Likewise.
11780         * pthread_equal.c: Likewise.
11781         * pthread_exit.c: Likewise.
11782         * pthread_getschedparam.c: Likewise.
11783         * pthread_self.c: Likewise.
11784         * pthread_setcancelstate.c: Likewise.
11785         * pthread_setschedparam.c: Likewise.
11786         * pthread_mutex_destroy.c: Likewise.
11787         * pthread_mutex_init.c: Likewise.
11788         * pthreadP.h: Add prototypes for the aliases.
11790         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
11791         multiple_threads member in correct TCB to 1.
11793         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
11794         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
11795         member of thread decriptor, otherwise return unconditionally 1.
11797 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
11799         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
11800         regular Linux version.  Remove file.
11801         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
11802         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
11803         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
11804         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
11805         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
11806         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
11807         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
11808         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
11809         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
11810         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
11811         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
11812         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
11813         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
11814         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
11815         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
11816         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
11817         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
11818         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
11819         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
11820         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
11821         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
11822         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
11823         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
11824         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
11825         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
11826         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
11827         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
11828         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
11829         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
11830         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
11832 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
11834         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
11835         * sysdeps/unix/sysv/linux/open.c: Removed.
11836         * sysdeps/unix/sysv/linux/fsync.c: Removed.
11837         * sysdeps/unix/sysv/linux/lseek.c: Removed.
11838         * sysdeps/unix/sysv/linux/msync.c: Removed.
11839         * sysdeps/unix/sysv/linux/read.c: Removed.
11840         * sysdeps/unix/sysv/linux/close.c: Removed.
11841         * sysdeps/unix/sysv/linux/creat.c: Removed.
11842         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
11843         * sysdeps/unix/sysv/linux/pause.c: Removed.
11844         * sysdeps/unix/sysv/linux/select.c: Removed.
11845         * sysdeps/unix/sysv/linux/write.c: Removed.
11847 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
11849         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
11850         element in TCB to see whether locking is needed.
11852         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
11853         MULTIPLE_THREADS_OFFSET value is correct.
11855         * sysdeps/unix/sysv/linux/close.c: New file.
11856         * sysdeps/unix/sysv/linux/connect.S: New file.
11857         * sysdeps/unix/sysv/linux/creat.c: New file.
11858         * sysdeps/unix/sysv/linux/fsync.c: New file.
11859         * sysdeps/unix/sysv/linux/llseek.c: New file.
11860         * sysdeps/unix/sysv/linux/lseek.c: New file.
11861         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
11862         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
11863         * sysdeps/unix/sysv/linux/msync.c: New file.
11864         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
11865         * sysdeps/unix/sysv/linux/open.c: New file.
11866         * sysdeps/unix/sysv/linux/open64.c: New file.
11867         * sysdeps/unix/sysv/linux/pause.c: New file.
11868         * sysdeps/unix/sysv/linux/poll.c: New file.
11869         * sysdeps/unix/sysv/linux/pread.c: New file.
11870         * sysdeps/unix/sysv/linux/pread64.c: New file.
11871         * sysdeps/unix/sysv/linux/pselect.c: New file.
11872         * sysdeps/unix/sysv/linux/pwrite.c: New file.
11873         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
11874         * sysdeps/unix/sysv/linux/readv.c: New file.
11875         * sysdeps/unix/sysv/linux/recv.S: New file.
11876         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
11877         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
11878         * sysdeps/unix/sysv/linux/select.c: New file.
11879         * sysdeps/unix/sysv/linux/send.S: New file.
11880         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
11881         * sysdeps/unix/sysv/linux/sendto.S: New file.
11882         * sysdeps/unix/sysv/linux/sigpause.c: New file.
11883         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
11884         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
11885         * sysdeps/unix/sysv/linux/sigwait.c: New file.
11886         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
11887         * sysdeps/unix/sysv/linux/system.c: New file.
11888         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
11889         * sysdeps/unix/sysv/linux/wait.c: New file.
11890         * sysdeps/unix/sysv/linux/waitid.c: New file.
11891         * sysdeps/unix/sysv/linux/waitpid.c: New file.
11892         * sysdeps/unix/sysv/linux/writev.c: New file.
11893         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
11895         * pt-readv.c: Fix comment.
11897 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
11899         * tst-cleanup1.c: Include stdlib.h.
11901         * tst-cancel5.c: New test.
11902         * Makefile (tests): Add tst-cancel5.
11903         (tst-cancel5): Link against libc.so libpthread.so in that order.
11905 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
11907         * forward.c (test_loaded): Prevent recursive calls.
11909         * Makefile (routines): Add libc-cancellation.
11910         * libc-cancellation.c: New file.
11911         * descr.h (struct pthread): Add multiple_threads field.
11912         * allocatestack.c (allocate_stack): Initialize multiple_header field of
11913         new thread descriptor to 1.
11914         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
11915         Initialize multiple_thread field after successful thread creation.
11916         * cancellation.c (__do_cancel): Move to pthreadP.h.
11917         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
11918         (__pthread_disable_asynccancel): Add internal_function attribute.
11919         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
11920         * pthread_setcancelstate.c: Likewise.
11921         * pthread_setcanceltype.c: Likewise.
11922         * pthread_exit.c: Likewise.
11923         * pthreadP.h (CANCELLATION_P): Likewise.
11924         (__do_cancel): Define as static inline.
11925         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
11926         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
11927         declarations.
11928         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
11929         fields.  Define MULTIPLE_THREADS_OFFSET.
11930         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
11931         declaration.
11932         * sysdeps/unix/sysv/linux/accept.S: New file.
11933         * sysdeps/unix/sysv/linux/read.c: New file.
11934         * sysdeps/unix/sysv/linux/write.c: New file.
11935         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
11936         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
11937         initialization of __libc_locking_needed.
11938         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
11939         __libc_locking_needed, use multiple_threads field in TCB.
11940         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11942 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
11944         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
11945         version.
11946         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
11948         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
11949         access to __libc_locking_needed for PIC.
11951 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
11953         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
11954         declare for libc.so.
11955         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
11956         expression.
11957         (__libc_lock_lock): Put into statement expression.
11958         (__libc_lock_unlock): Remove trailing semicolon.
11959         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
11961 2002-12-12  Roland McGrath  <roland@redhat.com>
11963         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
11964         "m" constraint to refer to __libc_locking_needed.  Declare it here.
11966 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
11968         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
11969         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
11970         Initialize __libc_locking_needed.
11971         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
11972         instead of __register_pthread_fork_handler.
11973         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
11974         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
11975         fork-gen with libc_pthread_init.
11976         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
11977         of __register_pthread_fork_handler.
11978         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
11979         of __register_pthread_fork_handler.
11980         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
11981         __libc_locking_needed to determine whether lock prefix can be avoided.
11982         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11984 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
11986         * Makefile (tests): Add tst-cleanup1.
11987         * tst-cleanup1.c: New file.
11988         * cancellation.c (__cleanup_thread): Removed.
11989         (__do_cancel): Remove call to __cleanup_thread.
11990         * pthreadP.h: Remove __cleanup_thread prorotype.
11992         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
11993         Remember function and argument even if cancellation handler
11994         function is not available.
11995         (__libc_cleanup_region_end): Execute registered function directly if
11996         pthread functions are not available.
11997         (__libc_cleanup_end): Likewise.
11999         * init.c (__pthread_initialize_minimal): Fix initialization in
12000         static lib by preventing gcc from being too clever.
12002 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
12004         * init.c (__pthread_initialize_minimal): Remove unneccesary
12005         sigaddset call.
12007         * Makefile (tests): We can run tst-locale2 now.
12009 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
12011         * Versions: Remove duplicated sigwait entry.
12013 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
12015         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
12016         inside libpthread.
12018         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
12020         * pthreadP.h: Declare __pthread_enable_asynccancel and
12021         __pthread_disable_asynccancel.
12022         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
12023         (CANCEL_RESET): Use __pthread_disable_asynccancel.
12024         * cancellation.c (__pthread_enable_asynccancel): New function.
12025         (__pthread_disable_asynccancel): New function.
12026         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
12027         * pt-close.c: Likewise.
12028         * pt-connect.c: Likewise.
12029         * pt-creat.c: Likewise.
12030         * pt-fcntl.c: Likewise.
12031         * pt-fsync.c: Likewise.
12032         * pt-lseek.c: Likewise.
12033         * pt-lseek64.c: Likewise.
12034         * pt-msgrcv.c: Likewise.
12035         * pt-msgsnd.c: Likewise.
12036         * pt-msync.c: Likewise.
12037         * pt-nanosleep.c: Likewise.
12038         * pt-open.c: Likewise.
12039         * pt-open64.c: Likewise.
12040         * pt-pause.c: Likewise.
12041         * pt-poll.c: Likewise.
12042         * pt-pread.c: Likewise.
12043         * pt-pread64.c: Likewise.
12044         * pt-pselect.c: Likewise.
12045         * pt-pwrite.c: Likewise.
12046         * pt-pwrite64.c: Likewise.
12047         * pt-read.c: Likewise.
12048         * pt-readv.c: Likewise.
12049         * pt-recv.c: Likewise.
12050         * pt-recvfrom.c: Likewise.
12051         * pt-recvmsg.c: Likewise.
12052         * pt-select.c: Likewise.
12053         * pt-send.c: Likewise.
12054         * pt-sendmsg.c: Likewise.
12055         * pt-sendto.c: Likewise.
12056         * pt-sigpause.c: Likewise.
12057         * pt-sigsuspend.c: Likewise.
12058         * pt-sigtimedwait.c: Likewise.
12059         * pt-sigwait.c: Likewise.
12060         * pt-sigwaitinfo.c: Likewise.
12061         * pt-system.c: Likewise.
12062         * pt-tcdrain.c: Likewise.
12063         * pt-wait.c: Likewise.
12064         * pt-waitid.c: Likewise.
12065         * pt-waitpid.c: Likewise.
12066         * pt-write.c: Likewise.
12067         * pt-writev.c: Likewise.
12068         * pthread_join.c: Likewise.
12069         * pthread_timedjoin.c: Likewise.
12071         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
12072         (__xpg_sigpause): New function.
12073         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
12075 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
12077         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
12079         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
12080         _GI_pthread_cleanup_pop to pthreadP.h.
12082         * ftrylockfile.c: Use _IO_lock_trylock instead of
12083         pthread_mutex_trylock.
12085         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
12086         (CANCEL_RESET): Likewise.
12087         (__pthread_setcanceltype_): Declare.
12088         (__pthread_mutex_lock_internal): Declare.
12089         (__pthread_mutex_unlock_internal): Declare.
12090         (__pthread_once_internal): Declare.
12091         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
12092         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
12094         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
12095         and pthread_mutex_unlock.
12096         * pthread_cond_wait.c: Likewise.
12097         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
12098         * pthread_mutex_unlock.c: Likewise.
12100         * pthread_setcanceltype.c: Add additional alias
12101         __pthread_setcanceltype.
12103         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
12104         * sem_open.c (sem_open): Likewise.
12105         Use __libc_open, __libc_write, and __libc_close instead of
12106         open, write, and close respectively.
12108         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
12109         Rewrite as statement expression since it must return a value.
12111         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
12112         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
12113         __pthread_kill.
12115         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
12116         alias __pthread_once_internal.
12118         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
12120 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
12122         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
12123         * tst-stdio1.c: New file.
12124         * tst-stdio2.c: New file.
12126         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
12128         * Makefile (tests): Comment out tst-locale2 for now.
12129         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
12131         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
12132         -D_IO_MTSAFE_IO.
12133         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
12134         Use _IO_lock_init instead of explicit assignment.
12136         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
12137         Define __libc_lock_* and __libc_lock_recursive macros with
12138         lowlevellock macros, not pthread mutexes.
12140         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
12141         of pthread_mutex_lock.
12142         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
12143         instead of pthread_mutex_unlock.
12145 2002-12-06  Roland McGrath  <roland@redhat.com>
12147         * allocatestack.c (__stack_user): Use uninitialized defn.
12148         * init.c (__pthread_initialize_minimal): Initialize it here.
12150 2002-12-05  Roland McGrath  <roland@redhat.com>
12152         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
12153         string.
12154         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
12156         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
12157         missing & here too.
12159 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
12161         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12162         lowlevellock.
12163         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
12164         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
12165         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
12166         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
12167         for __libc_lock_* macros.
12168         * Makefile (routines): Add libc-lowlevellock.
12170 2002-10-09  Roland McGrath  <roland@redhat.com>
12172         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
12173         Under [__PIC__], call the function via the pointer fetched for
12174         comparison rather than a call by name that uses the PLT.
12175         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
12176         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
12177         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
12178         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
12179         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
12181 2002-12-04  Roland McGrath  <roland@redhat.com>
12183         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
12185         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
12186         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
12188         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
12190 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
12192         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
12193         a completely opaque, non-integer type.
12194         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
12196 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
12198         * sysdeps/i386/tls.h: Include stdlib.h.
12199         * sysdeps/x86_64/tls.h: Likewise.
12201 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
12203         * Makefile (tests): Add tst-locale2.
12204         (tests-static): Likewise.
12205         * tst-locale2.c: New file.
12207         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
12208         volatile and add memory clobbers to lock operations.
12210 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
12212         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
12213         * sysdeps/i386/i486/bits/atomic.h: New file.
12214         * sysdeps/i386/i586/bits/atomic.h: New file.
12215         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
12216         include i486 version.
12217         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
12218         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
12219         Patch by Marijn Ros <marijn@mad.scientist.com>.
12221         * allocatestack.c (get_cached_stack): Don't crash if we first
12222         found a stack with a larger size then needed.
12223         Reported by Hui Huang <hui.huang@sun.com>.
12225         * Makefile (tests): Add tst-sysconf.
12226         * tst-sysconf.c: New file.
12228         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
12229         PTHREAD_THREADS_MAX.
12231 2002-12-02  Roland McGrath  <roland@redhat.com>
12233         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
12234         Declare using hidden_proto instead of attribute_hidden, so there are
12235         non-.hidden static symbols for gdb to find.
12236         (__pthread_keys): Likewise.
12237         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
12238         * allocatestack.c (__stack_user): Likewise.
12239         * pthread_create.c (__pthread_keys): Likewise.
12240         (__nptl_threads_events, __nptl_last_event): Make these static instead
12241         of hidden.
12242         * pthread_key_create.c (__pthread_pthread_keys_max,
12243         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
12245 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
12247         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
12248         statically.
12249         * tst-locale1.c: New file.
12251         * pthread_cond_timedwait.c: Include <stdlib.h>.
12253         * Makefile (tests): Add tst-fork2 and tst-fork3.
12254         * tst-fork2.c: New file.
12255         * tst-fork3.c: New file.
12257 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
12259         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
12261         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
12262         require it to 200112L.
12264         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
12265         instruction only if HAVE_CMOV is defined.
12266         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
12268         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
12270         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
12272         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
12274         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
12276 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
12278         * sysdeps/x86_64/bits/atomic.h: New file.
12280         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
12281         16-bit operations.
12283         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
12284         possible since gettid cannot fail.
12286         * sysdeps/x86_64/pthreaddef.h: New file.
12288         * sysdeps/i386/pthreaddef.h (gettid): Removed.
12290         * sysdeps/x86_64/pthread_spin_init.c: New file.
12291         * sysdeps/x86_64/pthread_spin_lock.c: New file.
12292         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
12293         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
12295         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
12296         Add missing lock prefix.  Minute optimization.
12298         * tst-spin2.c (main): Also check successful trylock call.
12300         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
12301         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
12303         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
12304         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
12306         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
12307         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
12308         value in case of an error.  Add support for INTERNAL_SYSCALL.
12310         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
12311         value in case of an error.
12313         * sysdeps/x86_64/tls.h: New file.
12315 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
12317         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
12318         takes the array member name and the index as parameters.
12319         (THREAD_SETMEM_NC): Likewise.
12320         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
12321         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
12322         interfaces.
12324         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
12325         to decide which code to use.
12326         (THREAD_SETMEM_NC): Likewise.
12328         * allocatestack.c (queue_stack): Don't remove stack from list here.
12329         Do it in the caller.  Correct condition to prematurely terminate
12330         loop to free stacks.
12331         (__deallocate_stack): Remove stack from list here.
12333 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
12335         * Makefile (tests): Add tst-stack1.
12336         * tst-stack1.c: New file.
12338         * allocatestack.c (allocate_stack): Initialize the TCB on a user
12339         provided stack.
12341         * pthread_attr_getstack.c: Return bottom of the thread area.
12343 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
12345         * Makefile (libpthread-routines): Add pt-allocrtsig and
12346         pthread_kill_other_threads.
12347         * pt-allocrtsig.c: New file.
12348         * pthread_kill_other_threads.c: New file.
12349         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
12350         all three functions.
12351         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12352         allocrtsig.
12353         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
12354         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
12355         and __libc_allocate_rtsig_private.
12356         * Versions (libpthread): Export pthread_kill_other_threads_np,
12357         __libc_current_sigrtmin, and __libc_current_sigrtmax.
12359 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
12361         * allocatestack.c (allocate_stack): stackaddr in attribute points to
12362         the end of the stack.  Adjust computations.
12363         When mprotect call fails dequeue stack and free it.
12364         * pthread_attr_setstack.c: Store top of the stack in stackaddr
12365         attribute.
12366         * pthread_getattr_np.c: Likewise.
12368         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
12369         surprises.
12371 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
12373         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
12374         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
12376 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
12378         * pthread_getspecific.c: Optimize access to first 2nd-level array.
12379         * pthread_setspecific.c: Likewise.
12381 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
12383         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
12384         definitions.  Get them from the official place.
12385         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
12387         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
12388         Use new CLONE_ flags in clone() calls.
12390         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
12391         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
12393         * Versions: Add pthread_* functions for libc.
12394         * forward.c: New file.
12396         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
12397         errno-loc.
12398         * herrno.c: New file.
12399         * res.c: New file.
12401         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
12402         sem_trywait, and sem_timedwait.  Add herrno and res.
12403         * sem_init.c: Don't initialize lock and waiters members.
12404         * sem_open.c: Likewise.
12405         * sem_post.c: Removed.
12406         * sem_wait.c: Removed.
12407         * sem_trywait.c: Removed.
12408         * sem_timedwait.c: Removed.
12409         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
12410         Includes full implementations of sem_post, sem_wait, sem_trywait,
12411         and sem_timedwait.
12412         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
12413         for new implementation.
12414         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
12415         and waiters fields.
12417         * tst-sem3.c: Improve error message.
12418         * tst-signal3.c: Likewise.
12420         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
12421         to tell the kernel about the termination futex and to initialize tid
12422         member.  Don't initialize main_thread.
12423         * descr.h (struct pthread): Remove main_thread member.
12424         * cancelllation.c (__do_cancel): Remove code handling main thread.
12425         The main thread is not special anymore.
12427         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
12428         size of the stacks to stack_cache_actsize.
12430         * pt-readv.c: Add missing "defined".
12431         * pt-sigwait.c: Likewise.
12432         * pt-writev.c: Likewise.
12434 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
12436         * Versions: Export __connect from libpthread.
12437         Patch by Luca Barbieri <ldb@ldb.ods.org>.
12439         * Makefile (libpthread-routines): Add pt-raise.
12440         * sysdeps/unix/sysv/linux/raise.c: New file.
12441         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
12442         * sysdeps/generic/pt-raise.c: New file.
12444         * pthread_cond_init.c: Initialize all data elements of the condvar
12445         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
12447         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
12448         * pthread_create.c: Likewise.
12450         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
12451         * tst-key1.c: New file.
12452         * tst-key2.c: New file.
12453         * tst-key3.c: New file.
12455         * Versions: Export pthread_detach for version GLIBC_2.0.
12456         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
12458 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
12460         * pthread_key_create.c: Terminate search after an unused key was found.
12461         Patch by Luca Barbieri <ldb@ldb.ods.org>.
12463         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
12464         Patch by Luca Barbieri <ldb@ldb.ods.org>.
12466 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
12468         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
12469         dynamic lookup for errno in PIC.
12471         * allocatestack.c (get_cached_stack): Rearrange code slightly to
12472         release the stack lock as soon as possible.
12473         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
12474         the static TLS block.
12475         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
12477         * cancellation.c: Renamed from cancelation.c.
12478         * Makefile: Adjust accordingly.
12479         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
12480         * cleanup_defer.c: Use CANCELLATION_P.
12481         * pthread_testcancel.c: Likewise.
12482         * descr.h: Fix spelling in comments.
12483         * init.c: Likewise.
12484         * pthread_getattr_np.c: Likewise.
12485         * pthread_getschedparam.c: Likewise.
12486         * pthread_setschedparam.c: Likewise.
12487         * Versions: Likewise.
12489         * pt-pselect.c: New file.
12490         * Makefile (libpthread-routines): Add pt-pselect.
12491         * Versions: Add pselect.
12493         * tst-cancel4.c: New file.
12494         * Makefile (tests): Add tst-cancel4.
12496 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
12498         * pthread_mutex_lock.c: Always record lock ownership.
12499         * pthread_mutex_timedlock.c: Likewise.
12500         * pthread_mutex_trylock.c: Likewise.
12502         * pt-readv.c: New file.
12503         * pt-writev.c: New file.
12504         * pt-creat.c: New file.
12505         * pt-msgrcv.c: New file.
12506         * pt-msgsnd.c: New file.
12507         * pt-poll.c: New file.
12508         * pt-select.c: New file.
12509         * pt-sigpause.c: New file.
12510         * pt-sigsuspend.c: New file.
12511         * pt-sigwait.c: New file.
12512         * pt-sigwaitinfo.c: New file.
12513         * pt-waitid.c: New file.
12514         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
12515         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
12516         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
12517         * Versions: Add all the new functions.
12519         * tst-exit1.c: New file.
12520         * Makefile (tests): Add tst-exit1.
12522         * sem_timedwait.c: Minor optimization for more optimal fastpath.
12524 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
12526         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
12528         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
12529         call.  pthread_join is an official cancellation point.
12530         * pthread_timedjoin.c: Likewise.
12532         * pthread_cond_wait.c: Revert order in which internal lock are dropped
12533         and the condvar's mutex are retrieved.
12534         * pthread_cond_timedwait.c: Likewise.
12535         Reported by dice@saros.East.Sun.COM.
12537 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
12539         * pthreadP.h: Cut out all type definitions and move them...
12540         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
12541         * pthreadP.h: Include <internaltypes.h>.
12543         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
12544         performance tweaks.
12546         * sem_trywait.c: Shuffle #includes around to get right order.
12547         * sem_timedwait.c: Likewise.
12548         * sem_post.c: Likewise.
12549         * sem_wait.c: Likewise.
12551         * nptl 0.3 released.
12553         * Makefile (tests): Add tst-signal3.
12554         * tst-signal3.c: New file.
12556 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
12558         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
12559         the asms modify the sem object.
12560         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
12562         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
12563         the actual members.
12564         * pthreadP.h (struct sem): New type.  Actual semaphore type.
12565         * semaphoreP.h: Include pthreadP.h.
12566         * sem_getvalue.c: Adjust to sem_t change.
12567         * sem_init.c: Likewise.
12568         * sem_open.c: Likewise.
12569         * sem_post.c: Likewise.
12570         * sem_timedwait.c: Likewise.
12571         * sem_trywait.c: Likewise.
12572         * sem_wait.c: Likewise.
12574 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
12576         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
12577         * tst-basic2.c: New file.
12578         * tst-exec1.c: New file.
12579         * tst-exec2.c: New file.
12580         * tst-exec3.c: New file.
12582         * tst-fork1.c: Remove extra */.
12584         * nptl 0.2 released.  The API for IA-32 is complete.