soft-fp: Fix used without set warning in _FP_MUL and _FP_DIV
[glibc.git] / nptl / ChangeLog
blobe8c1ddf7e7a42ea7fda9193d2b2593cd490769d9
1 2012-12-04  Joseph Myers  <joseph@codesourcery.com>
3         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__old_sem_post):
4         Cast result of atomic_increment_val to (void) instead of storing
5         in otherwise-unused variable.
7 2012-12-03  Allan McRae  <allan@archlinux.org>
9         * Makefile (LDFLAGS-tst-cond24, LDFLAGS-tst-cond25): Remove.
11 2012-11-26  H.J. Lu  <hongjiu.lu@intel.com>
13         * unwind.c (__pthread_unwind): Pass address of unwind_cleanup
14         to THREAD_SETMEM.
15         * sysdeps/i386/tls.h: Include <libc-internal.h>.
16         (THREAD_SETMEM): Use cast_to_integer before casting to uint64_t.
17         (THREAD_SETMEM_NC): Likewise.
18         * sysdeps/x86_64/tls.h: Include <libc-internal.h>.
19         (THREAD_SETMEM): Use cast_to_integer before casting to uint64_t.
20         (THREAD_SETMEM_NC): Likewise.
22 2012-11-21  Joseph Myers  <joseph@codesourcery.com>
24         * sysdeps/unix/sysv/linux/sem_post.c (__old_sem_post): Cast result
25         of atomic_increment_val to (void) instead of storing in
26         otherwise-unused variable.
28         * pthread_cond_timedwait.c (__pthread_cond_timedwait)
29         [__NR_clock_gettime]: Cast result of INTERNAL_VSYSCALL to void
30         instead of storing in otherwise-unused variable.
32 2012-11-14  Marcus Shawcroft  <marcus.shawcroft@linaro.org>
34         * Makefile (CFLAGS-open.c, CFLAGS-open64.c, CFLAGS-pause.c)
35           (CFLAGS-recv.c, CFLAGS-send.c): Define.
37 2012-11-06  Chris Metcalf  <cmetcalf@tilera.com>
39         * tst-sem14.c (TIMEOUT): Set timeout to 10 seconds.
40         * tst-cond24.c (TIMEOUT): Increase from 10 to 20 seconds.
42 2012-11-05  Siddhesh Poyarekar  <siddhesh@redhat.com>
44         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Time out
45         if absolute timeout is negative.
46         [__ASSUME_FUTEX_CLOCK_REALTIME &&
47         lll_futex_timed_wait_bitset]: Use lll_futex_timed_wait_bitset.
48         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
49         Likewise.
50         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
51         Likewise.
52         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
53         (__lll_robust_timedlock_wait): Likewise.
54         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
55         (lll_futex_timed_wait_bitset): New macro.
56         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
57         (lll_futex_timed_wait_bitset): Likewise.
59 2012-11-03  David S. Miller  <davem@davemloft.net>
61         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (BUSY_WAIT_NOP):
62         Add missing spaces.
63         (__cpu_relax): Likewise.
65 2012-11-02  H.J. Lu  <hongjiu.lu@intel.com>
67         * sysdeps/x86_64/tls.h: Don't include <xmmintrin.h>.
68         (__128bits): New struct typedef.
69         (tcbhead_t): Replace __m128 with __128bits.
71 2012-10-30  Aurelien Jarno  <aurelien@aurel32.net>
72             Joseph Myers  <joseph@codesourcery.com>
74         * Makefile (tst-cancel7-ARGS): Use exec in --command argument.
76 2012-10-28  David S. Miller  <davem@davemloft.net>
78         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (BUSY_WAIT_NOP):
79         Define when we have v9 instructions available.
80         * sysdeps/unix/sysv/linux/sparc/sparc64/cpu_relax.S: New file.
81         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/cpu_relax.S: New
82         file.
83         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/Makefile: New
84         file.
85         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Add cpu_relax
86         to libpthread-routines.
88 2012-10-25  Roland McGrath  <roland@hack.frob.com>
90         * tst-cond-except.c (TEST_FUNCTION): New macro.
92 2012-10-25  Joseph Myers  <joseph@codesourcery.com>
94         * Makefile ($(objpfx)tst-tls6.out): Use $(BASH) not $(SHELL) to
95         run tst-tls6.sh.
96         * tst-tls6.sh: Use /bin/bash not /bin/sh.
98 2012-10-25  Roland McGrath  <roland@hack.frob.com>
100         * tst-basic2.c (do_test): Return RESULT, not always zero.
102         * tst-cond25.c: Include <stdint.h>
103         (waiter): Add casts to uintptr_t between casting integer<->pointer.
104         (timed_waiter): Likewise.
105         (do_test_wait): Likewise.
106         * tst-cond-except.c (thr): Likewise.
107         (do_test): Use prototype definition.
109 2012-10-24  Joseph Myers  <joseph@codesourcery.com>
110             Jim Blandy  <jimb@codesourcery.com>
112         * Makefile ($(objpfx)tst-tls6.out): Pass $(test-wrapper-env) to
113         tst-tls6.sh.
114         * tst-tls6.sh (test_wrapper_env): New variable.  Use it to run
115         programs with LD_PRELOAD set.
117 2012-10-24  Roland McGrath  <roland@hack.frob.com>
119         * Makefile ($(objpfx)tst-cond11, $(objpfx)tst-cond19): Targets removed.
120         ($(objpfx)tst-sem5, $(objpfx)tst-cancel18): Likewise.
121         ((objpfx)tst-cancelx18, $(objpfx)tst-clock2): Likewise.
122         ($(objpfx)tst-rwlock14): Likewise.
124 2012-10-24  Joseph Myers  <joseph@codesourcery.com>
126         * Makefile (tests): Remove tst-oddstacklimit.
127         (test-srcs): New variable.
128         (tst-oddstacklimit-ENV): Remove.
129         [$(run-built-tests) = yes] (tests): Depend on
130         $(objpfx)tst-oddstacklimit.out.
131         [$(run-built-tests) = yes] ($(objpfx)tst-oddstacklimit.out): New
132         target.
133         * tst-oddstacklimit.c: Do not include "tst-basic1.c".  Use
134         setrlimit before executing tst-basic1 test passed to --command.
136 2012-10-23  Joseph Myers  <joseph@codesourcery.com>
138         * Makefile [$(cross-compiling) = no]: Change condition to
139         [$(run-built-tests) = yes].
141 2012-10-23  Jim Blandy  <jimb@codesourcery.com>
142             Joseph Myers  <joseph@codesourcery.com>
144         * Makefile (tst-cancel7-ARGS): Use $(host-built-program-cmd).
145         (tst-exec4-ARGS): Likewise.
146         (tst-stackguard1-ARGS): Likewise.
148 2012-10-21  Jim Blandy  <jimb@codesourcery.com>
149             Joseph Myers  <joseph@codesourcery.com>
151         * Makefile ($(objpfx)tst-cancel-wrappers.out): Pass $(NM) to
152         tst-cancel-wrappers.sh.
153         * tst-cancel-wrappers.sh: Use nm program given as first argument,
154         not hardcoded "nm".
156 2012-10-17  Siddhesh Poyarekar  <siddhesh@redhat.com>
158         * tst-cond25.c (do_test_wait): Don't check for return value from
159         pthread_cancel.
161 2012-10-16  Siddhesh Poyarekar  <siddhesh@redhat.com>
163         [BZ #14652]
164         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
165         (__condvar_tw_cleanup):  Adjust the mutex data structure if it
166         was locked by FUTEX_WAIT_REQUEUE_PI.
167         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait
168         (__condvar_w_cleanup): Likewise.
169         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
170         (__condvar_cleanup2): Likewise.
171         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
172         (__condvar_cleanup1): Likewise.
174 2012-10-10  Carlos O'Donell  <carlos@systemhalted.org>
176         * sysdeps/pthread/pthread.h [!(defined __GNUC__ &&
177         defined __EXCEPTIONS) && defined __USE_GNU]
178         (pthread_cleanup_push_defer_np): Fix formatting.
180 2012-10-10  Siddhesh Poyarekar  <siddhesh@redhat.com>
182         [BZ #14652]
183         * Makefile (tests): New test case tst-cond25.
184         (LDFLAGS-tst-cond25): Link tst-cond25 against librt.
185         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
186         (__condvar_tw_cleanup): Lock mutex only if we don't already
187         own it.
188         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
189         (__condvar_w_cleanup): Likewise.
190         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add TID_MASK.
191         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
192         (__condvar_cleanup2): Lock mutex only if we don't already
193         own it.
194         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
195         (__condvar_cleanup1): Likewise.
196         * tst-cond25.c: New test case.
198 2012-10-09  Roland McGrath  <roland@hack.frob.com>
200         * sysdeps/pthread/configure: Regenerated.
201         * sysdeps/x86_64/configure: Regenerated.
203 2012-10-05  David S. Miller  <davem@davemloft.net>
205         [BZ #14568]
206         * sysdeps/sparc/tls.h (DB_THREAD_SELF_INCLUDE): Delete.
207         (DB_THREAD_SELF): Use constants for the register offsets.  Correct
208         the case of a 64-bit debugger with a 32-bit inferior.
210 2012-10-05  H.J. Lu  <hongjiu.lu@intel.com>
212         [BZ #14557]
213         * Makefile (tests-static): Add tst-cancel24-static,
214         tst-cond8-static tst-mutex8-static, tst-mutexpi8-static,
215         tst-sem11-static and tst-sem12-static.
216         (tests): Likewise.
217         (LDLIBS-tst-cancel24-static): New macro.
218         * tst-cancel24-static.cc: New file.
219         * tst-cond8-static.c: Likewise.
220         * tst-mutex8-static.c: Likewise.
221         * tst-mutexpi8-static.c: Likewise.
222         * tst-sem11-static.c: Likewise.
223         * tst-sem12-static.c: Likewise.
225 2012-10-05  Siddhesh Poyarekar  <siddhesh@redhat.com>
227         [BZ #14417]
228         * Makefile (tests): New test case tst-cond24.
229         (LDFLAGS-tst-cond24): Link tst-cond24 against librt.
230         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
231         (__pthread_cond_timedwait): Unlock mutex before going back to
232         wait in PI case.
233         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
234         (__pthread_cond_wait): Likewise.  Revert handling of EAGAIN
235         return from futex_wait.
236         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
237         (__pthread_cond_timedwait): Unlock mutex before going back to
238         wait in PI case.  Set requeue_pi flag only if wait returned 0.
239         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
240         (__pthread_cond_wait): Likewise.  Revert handling of EAGAIN
241         return from futex_wait.
242         * tst-cond24.c: New test case.
244 2012-10-04  Roland McGrath  <roland@hack.frob.com>
246         * pthread_create.c (start_thread): Use __madvise, not madvise.
248 2012-10-02  H.J. Lu  <hongjiu.lu@intel.com>
250         * sysdeps/i386/tls.h: Update copyright years.
252 2012-10-02  Siddhesh Poyarekar  <siddhesh@redhat.com>
254         * pthread_create.c (start_thread): Fix clone flag name in
255         comment to CLONE_CHILD_CLEARTID.
256         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
257         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
258         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
259         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
260         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
261         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
263 2012-10-01  Siddhesh Poyarekar  <siddhesh@redhat.com>
265         [BZ #14477]
266         * Makefile (tests): Add tst-cond-except.
267         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
268         (__pthread_cond_timedwait): Mark instructions where %ebx is
269         incremented in PI case.
270         (.gcc_except_table): Add entry to jump to __condvar_tw_cleanup2
271         for the marked PI case instructions.
272         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
273         (__pthread_cond_wait): Mark instructions where %ebx is
274         incremented in PI case.
275         (.gcc_except_table): Add entry to jump to __condvar_w_cleanup2
276         for the marked PI case instructions.
277         * tst-cond-except.c: New test case.
279 2012-09-24  Dmitry V. Levin  <ldv@altlinux.org>
281         * tst-tls6.sh: Add "set -e".
282         * Makefile: Do not specify -e option when running testsuite
283         shell scripts.
285         * tst-tls6.sh: Add copyright header.
287 2012-09-24  H.J. Lu  <hongjiu.lu@intel.com>
289         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Add "()" when casting
290         to uint64_t for 64-bit store.
291         (THREAD_SETMEM_NC): Likewise.
293 2012-09-19  H.J. Lu  <hongjiu.lu@intel.com>
295         * sysdeps/i386/tls.h (THREAD_SETMEM): Cast to uint64_t for
296         64-bit store.
297         (THREAD_SETMEM_NC): Likewise.
299 2012-09-14  Jeff Law  <law@redhat.com>
301         [BZ #14583]
302         * sysdeps/pthread/pthread.h: Fix prototype of __sigsetjmp.
304 2012-09-13  H.J. Lu  <hongjiu.lu@intel.com>
306         [BZ #14576]
307         * sysdeps/pthread/bits/libc-lockP.h (__rtld_lock_init_recursive):
308         Removed.
310 2012-09-07  H.J. Lu  <hongjiu.lu@intel.com>
312         * Makefile (LDFLAGS-tst-cancel24): Renamed to ...
313         (LDLIBS-tst-cancel24): This.
315 2012-09-06  H.J. Lu  <hongjiu.lu@intel.com>
317         [BZ #14545]
318         * Makefile (tests-static): Add tst-cancel21-static.
319         (tests): Likewise.
320         * tst-cancel21-static.c: New file.
322 2012-09-01  Joseph Myers  <joseph@codesourcery.com>
324         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
325         [!__ASSUME_POSIX_CPU_TIMERS]: Remove conditional code.
326         [__NR_clock_getres]: Make code unconditional.
327         (pthread_getcpuclockid): Remove code left unreachable by removal
328         of conditionals.
330 2012-08-31  Joseph Myers  <joseph@codesourcery.com>
332         [BZ #14532]
333         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Use
334         atomic_compare_and_exchange_bool_rel.
335         * tst-sem14.c: New file.
336         * Makefile (tests): Add tst-sem14.
338 2012-08-15  Roland McGrath  <roland@hack.frob.com>
340         * Makefile (CFLAGS-flockfile.c): Use $(libio-mtsafe) instead
341         of -D_IO_MTSAFE_IO.
342         (CFLAGS-ftrylockfile.c, CFLAGS-funlockfile.c): Likewise.
343         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-fork.c): Likewise.
345 2012-08-16  Joseph Myers  <joseph@codesourcery.com>
347         * pthread_cond_timedwait.c (__pthread_cond_timedwait)
348         [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
349         * pthread_condattr_setclock.c (pthread_condattr_setclock)
350         [!__ASSUME_POSIX_TIMERS]: Likewise.
351         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
352         (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
353         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
354         [!__ASSUME_POSIX_TIMERS]: Likewise.
355         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
356         (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
357         * sysdeps/unix/sysv/linux/timer_create.c [__NR_timer_create]: Make
358         code unconditional.
359         [!__NR-timer_create]: Remove conditional code.
360         (timer_create) [!__ASSUME_POSIX_TIMERS]: Likewise.
361         * sysdeps/unix/sysv/linux/timer_delete.c [__NR_timer_delete]: Make
362         code unconditional.
363         [!__NR_timer_delete]: Remove conditional code.
364         (timer_delete) [!__ASSUME_POSIX_TIMERS]: Likewise.
365         * sysdeps/unix/sysv/linux/timer_getoverr.c
366         [__NR_timer_getoverrun]: Make code unconditional.
367         [!__NR_timer_getoverrun]: Remove conditional code.
368         (timer_getoverrun) [!__ASSUME_POSIX_TIMERS]: Likewise.
369         * sysdeps/unix/sysv/linux/timer_gettime.c [__NR_timer_gettime]:
370         Make code unconditional.
371         [!__NR_timer_gettime]: Remove conditional code.
372         (timer_gettime) [!__ASSUME_POSIX_TIMERS]: Likewise.
373         * sysdeps/unix/sysv/linux/timer_routines.c [__NR_timer_create]:
374         Make code unconditional.
375         [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
376         * sysdeps/unix/sysv/linux/timer_settime.c [__NR_timer_settime]:
377         Make code unconditional.
378         [!__NR_timer_settime]: Remove conditional code.
379         (timer_settime) [!__ASSUME_POSIX_TIMERS]: Likewise.
380         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
381         (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Remove
382         conditional code.
384 2012-08-15  Tom de Vries  <vries@codesourcery.com>
385             Maxim Kuvyrkov  <maxim@codesourcery.com>
387         * sysdeps/pthread/bits/libc-lockP.h (__libc_lock_lock)
388         (__libc_lock_trylock): Allow pre-existing definitions.
390 2012-08-15  Maxim Kuvyrkov  <maxim@codesourcery.com>
392         * pthread_spin_lock.c: New file.
393         * pthread_spin_trylock.c: New file.
395 2012-08-08  Joseph Myers  <joseph@codesourcery.com>
397         * allocatestack.c (setxid_signal_thread) [__ASSUME_TGKILL]: Make
398         code unconditional.
399         (setxid_signal_thread) [!__ASSUME_TGKILL]: Remove conditional code.
400         * pthread_cancel.c (pthread_cancel) [__ASSUME_TGKILL]: Make code
401         unconditional.
402         (pthread_cancel) [!__ASSUME_TGKILL]: Remove conditional code.
403         * sysdeps/pthread/createthread.c (do_clone) [__ASSUME_TGKILL]:
404         Make code unconditional.
405         (do_clone) [!__ASSUME_TGKILL]: Remove conditional code.
406         * sysdeps/unix/sysv/linux/pt-raise.c (raise) [__ASSUME_TGKILL ||
407         __NR_tgkill]: Make code unconditional.
408         (raise) [__ASSUME_TGKILL]: Likewise.
409         (raise) [!__ASSUME_TGKILL]: Remove conditional code.
410         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill)
411         [__ASSUME_TGKILL]: Make code unconditional.
412         (__pthread_kill) [!__ASSUME_TGKILL]: Remove conditional code.
413         * sysdeps/unix/sysv/linux/raise.c (raise) [__ASSUME_TGKILL ||
414         __NR_tgkill]: Make code unconditional.
415         (raise) [__ASSUME_TGKILL]: Likewise.
416         (raise) [!__ASSUME_TGKILL]: Remove conditional code.
418 2012-08-07  Joseph Myers  <joseph@codesourcery.com>
420         * sysdeps/pthread/createthread.c (create_thread)
421         [!__ASSUME_NO_CLONE_DETACHED]: Remove conditional code.
423 2012-08-03  Joseph Myers  <joseph@codesourcery.com>
425         * nptl-init.c (sigcancel_handler) [__ASSUME_CORRECT_SI_PID]: Make
426         code unconditional.
427         (sighandler_setxid) [__ASSUME_CORRECT_SI_PID]: Likewise.
429 2012-07-28  Siddhesh Poyarekar  <siddhesh@redhat.com>
431         * tst-pthread-getattr.c (MAX_STACK_SIZE): New macro.
432         (pagesize): New static variable.
433         (allocate_and_test): Return MEM.  Rename parameter to TARGET.
434         (check_stack_top): New local variables MEM and PAGEMASK.  Cap
435         stack size to MAX_STACK_SIZE.  Call allocate_and_test for
436         halfway up the stack top page.  Verify that the top page was
437         written into.
438         (do_test): Get pagesize using sysconf.
440 2012-07-25  Andreas Schwab  <schwab@linux-m68k.org>
442         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Remove pseudo_end
443         label.
444         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Likewise.
445         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO):
446         Likewise.
448 2012-07-25  Siddhesh Poyarekar  <siddhesh@redhat.com>
450         * tst-pthread-getattr.c: Revert last change.
452 2012-07-20  Siddhesh Poyarekar  <siddhesh@redhat.com>
454         * tst-pthread-getattr.c (MAX_STACK_SIZE): New max cap for stack
455         size.
456         (_MIN): New macro.
457         (allocate_and_test): Return STACKADDR.  Access STACKADDR instead
458         of MEM to test.
459         (check_stack_top): Read valued written into STACKADDR in
460         allocate_and_test.  Cap stack size to MAX_STACK_SIZE.
462 2012-07-19  Siddhesh Poyarekar  <siddhesh@redhat.com>
464         * nptl-init.c (sighandler_setxid): Fix the comment that
465         describes it.
467 2012-06-23  Thomas Schwinge  <thomas@codesourcery.com>
469         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
470         (__lll_robust_timedlock_wait): Simplify CFI directives.
472 2012-06-20  Siddhesh Poyarekar  <siddhesh@redhat.com>
474         [BZ #12416]
475         * Makefile (tests): Add test case.
476         * pthread_getattr_np.c (pthread_getattr_np): Deduct pages below
477         the __libc_stack_end page from stacksize.  Truncate stacksize to
478         make it page aligned when it is computed from RLIMIT_STACK.
479         * tst-pthread-getattr.c: New test case. Verify that stackaddr is
480         accessible.
482 2012-06-07  Carlos Sánchez de La Lama  <csanchezdll@gmail.com>
484         [BZ #14205]
485         * sysdeps/sparc/sparc32/pthread_spin_lock.S: Do not use v9
486         branches.
488 2012-06-04  Siddhesh Poyarekar  <siddhesh@redhat.com>
489             Jakub Jelinek  <jakub@redhat.com>
491         [BZ #14188]
492         * sysdeps/pthread/pthread.h
493         [!(defined __GNUC__ && defined __EXCEPTIONS)]
494         (pthread_cleanup_push, pthread_cleanup_push_defer_np): Use
495         __libc_unlikely instead of __builtin_expect.
497 2012-05-30  H.J. Lu  <hongjiu.lu@intel.com>
499         [BZ #14117]
500         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Removed.
501         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
502         * sysdeps/unix/sysv/linux/i386/Implies: New file.
503         * sysdeps/unix/sysv/linux/x86_64/Implies: Likewise.
504         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Renamed
505         to ...
506         * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: This.
507         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Renamed
508         to ...
509         * sysdeps/unix/sysv/linux/x86/bits/semaphore.h: This.
511 2012-05-30  Andreas Schwab  <schwab@linux-m68k.org>
513         [BZ #14132]
514         * nptl-init.c (pthread_functions): Remove use of INTUSE and
515         _internal aliases.
516         (__pthread_initialize_minimal_internal): Likewise.
517         * sem_open.c: Likewise.
518         * sem_unlink.c: Likewise.
519         * pthreadP.h: Replace _internal aliases by hidden_proto
520         declarations.
521         * pthread_getspecific.c: Replace _internal alias by hidden_def.
522         * pthread_key_create.c: Likewise.
523         * pthread_mutex_destroy.c: Likewise.
524         * pthread_mutex_init.c: Likewise.
525         * pthread_mutex_lock.c: Likewise.
526         * pthread_mutex_unlock.c: Likewise.
527         * pthread_once.c: Likewise.
528         * pthread_rwlock_rdlock.c: Likewise.
529         * pthread_rwlock_unlock.c: Likewise.
530         * pthread_rwlock_wrlock.c: Likewise.
531         * pthread_setspecific.c: Likewise.
532         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
533         Likewise.
534         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
535         Likewise.
536         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
537         Likewise.
538         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
539         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
540         * sysdeps/unix/sysv/linux/s390/pthread_once.c: Likewise.
541         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
542         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
543         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
544         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
545         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
546         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
547         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
548         Likewise.
549         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
550         Likewise.
551         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
552         Likewise.
554 2012-05-27  Chung-Lin Tang  <cltang@codesourcery.com>
556         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO, LOAD_ARGS_1)
557         (LOAD_ARGS_2 ,LOAD_ARGS_3 ,LOAD_ARGS_4): Add CFI restores.
559         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_lock_wait_private)
560         (__lll_lock_wait, __lll_timedlock_wait, __lll_timedwait_tid): Add CFI
561         directives.
562         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
563         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Likewise.
564         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
565         (pthread_barrier_wait): Likewise.
566         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
567         (__pthread_cond_broadcast): Likewise.
568         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
569         (__pthread_cond_signal): Likewise.
570         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
571         (__pthread_cond_timedwait): Likewise.
572         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S (__pthread_cond_wait):
573         Likewise.
574         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S
575         (__pthread_rwlock_rdlock): Likewise.
576         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
577         (pthread_rwlock_timedrdlock): Likewise.
578         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
579         (pthread_rwlock_timedwrlock): Likewise.
580         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
581         (__pthread_rwlock_unlock): Likewise.
582         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S
583         (__pthread_rwlock_wrlock): Likewise.
584         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post): Likewise.
585         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
586         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
587         Likewise.
588         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
590 2012-05-26  Siddhesh Poyarekar  <siddhesh@redhat.com>
592         [BZ #12416]
593         * nptl/pthread_getattr_np.c (pthread_getattr_np): Use
594         __libc_stack_end rounded to the end of containing page as the
595         real stack end.
597 2012-05-25  Rayson Ho  <rho@redhat.com>
599         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Low-level SystemTap
600         probes for i386.
601         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
602         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
603         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
604         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
605         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
606         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
607         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
608         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
610 2012-05-25  Rayson Ho  <rho@redhat.com>
611             Roland McGrath  <roland@hack.frob.com>
613         * DESIGN-systemtap-probes.txt: New file.
614         * pthread_cond_broadcast.c: SystemTap probes.
615         * pthread_cond_init.c: Likewise.
616         * pthread_cond_signal.c: Likewise.
617         * pthread_cond_wait.c: Likewise.
618         * pthread_cond_destroy.c: Likewise.
619         * pthread_create.c: Likewise.
620         * pthread_join.c: Likewise.
621         * pthread_mutex_destroy.c: Likewise.
622         * pthread_mutex_init.c: Likewise.
623         * pthread_mutex_lock.c: Likewise.
624         * pthread_mutex_timedlock.c: Likewise.
625         * pthread_mutex_unlock.c: Likewise.
626         * pthread_rwlock_destroy.c: Likewise.
627         * pthread_rwlock_rdlock.c: Likewise.
628         * pthread_rwlock_unlock.c: Likewise.
629         * pthread_rwlock_wrlock.c: Likewise.
630         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
631         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
632         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
633         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
634         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
635         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
636         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
637         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
639 2012-05-24  Roland McGrath  <roland@hack.frob.com>
641         * pthread_create.c (start_thread): Define pthread_start LIBC_PROBE.
643 2012-05-17  Andreas Jaeger  <aj@suse.de>
645         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
646         (HAVE_DL_DISCOVER_OSVERSION): Don't declare _dl_discover_osversion
647         only for older kernels.
649 2012-05-15  Joseph Myers  <joseph@codesourcery.com>
651         * pthreadP.h [!__NR_set_robust_list] (__NR_set_robust_list): Do
652         not define.
654 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
656         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_lock): Load
657         futex pointer into RDI_LP.  Use RSP_LP to operate on stack.
658         (lll_robust_lock): Likewise.
659         (lll_cond_lock): Likewise.
660         (lll_robust_cond_lock): Likewise.
661         (lll_timedlock): Likewise.
662         (lll_robust_timedlock): Likewise.
663         (lll_unlock): Likewise.
664         (lll_robust_unlock): Likewise.
666 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
668         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use
669         LP_OP(cmp) and RCX_LP on dep_mutex pointer.
671 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
673         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Use LP_OP(op)
674         on NWAITERS.
675         (__gcc_personality_v0): Replace 8-byte data alignment with
676         LP_SIZE alignment and .quad with ASM_ADDR.
678 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
680         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Use LP_OP(op)
681         on NWAITERS.
682         (__gcc_personality_v0): Replace 8-byte data alignment with
683         LP_SIZE alignment and .quad with ASM_ADDR.
685 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
687         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Use LP_OP(cmp) on
688         NWAITERS, which is unsigned long int.
690 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
692         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
693         (__gcc_personality_v0): Replace 8-byte data alignment with
694         LP_SIZE alignment and .quad with ASM_ADDR.
696 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
698         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Use
699         LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer.  Load
700         __vdso_clock_gettime pointer into RAX_LP.
701         (__gcc_personality_v0): Replace 8-byte data alignment with
702         LP_SIZE alignment and .quad with ASM_ADDR.
704 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
706         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Use
707         LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer.  Load
708         __vdso_clock_gettime pointer into RAX_LP.
709         (__gcc_personality_v0): Replace 8-byte data alignment with
710         LP_SIZE alignment and .quad with ASM_ADDR.
712 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
714         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Use
715         LP_OP(cmp) and R8_LP on dep_mutex pointer.
717 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
719         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Use LP_OP(mov)
720         to update pointer in memory.  Load pointer into RDI_LP.
722 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
724         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
725         (LLL_STUB_UNWIND_INFO_START): Align label to LP_SIZE instead
726         of 8.
727         (LLL_STUB_UNWIND_INFO_END): Likewise.
728         (lll_timedlock): Load timeout pointer into RDX_LP.
729         (lll_robust_timedlock): Likewise.
731 2012-05-15  Siddhesh Poyarekar  <siddhesh@redhat.com>
732             Jakub Jelinek  <jakub@redhat.com>
734         [BZ #13613]
735         * Makefile (tests): Add test cases.
736         * descr.h (struct pthread): Add a comment describing multiple_threads.
737         * pthreadP.h (__pthread_multiple_threads): Expand comment to include
738         single-process case.
739         * pthread_cancel.c (pthread_cancel): Enable multiple_threads
740         before setting cancelstate of the thread.
741         * sysdeps/unix/sysv/linux/libc_multiple_threads.c
742         (__libc_multiple_threads): Add explanatory comment.
743         * tst-cancel-self-cancelstate.c: New test case.
744         * tst-cancel-self-canceltype.c: Likewise.
745         * tst-cancel-self-cleanup.c: Supporting file for test cases.
746         * tst-cancel-self-testcancel.c: New test case.
747         * tst-cancel-self.c: Likewise.
748         * vars.c: Expand comment to include single-process case.
750 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
752         * sysdeps/x86_64/tls.h: Don't include <bits/wordsize.h>.
753         (tcbhead_t): Remove __x86_64__ check.  Align rtld_savespace_sse
754         to 32 bytes.
756 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
758         * sysdeps/pthread/pthread.h (__PTHREAD_RWLOCK_INT_FLAGS_SHARED):
759         New.
760         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Check
761         __PTHREAD_RWLOCK_INT_FLAGS_SHARED instead of __WORDSIZE.
763 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
765         * shlib-versions: Move x86_64-.*-linux.* entry to ...
766         * sysdeps/x86_64/64/shlib-versions: Here.  New file.
767         * sysdeps/x86_64/x32/shlib-versions: New file.
769 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
771         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Define x32
772         __SIZEOF_PTHREAD_XXX_T.
773         (__pthread_internal_list): Check __x86_64__ instead of __WORDSIZE.
774         (pthread_mutex_t): Likewise.
775         (pthread_rwlock_t): Likewise.
776         (__PTHREAD_RWLOCK_INT_FLAGS_SHARED): New.  Defined if __x86_64__
777         is defined.
779 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
781         * sysdeps/x86_64/x32/tls.h: New file.
783 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
785         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Use uint64_t on 64-bit
786         integer.
787         (THREAD_SETMEM_NC): Likewise.
789 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
791         * sysdeps/x86_64/tls.h (THREAD_SELF): Replace movq/%q0 with
792         mov/%0.
794 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
796         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
797         (__cleanup_fct_attribute): Check __x86_64__ instead of
798         __WORDSIZE.
800 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
802         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER): Check
803         __PTHREAD_MUTEX_HAVE_PREV instead of __WORDSIZE.
804         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Likewise.
805         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
806         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
808 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
810         * pthread_create.c (start_thread): Check __PTHREAD_MUTEX_HAVE_PREV
811         instead of __WORDSIZE.
813 2012-05-10  Thomas Schwinge  <thomas@schwinge.name>
815         [BZ #3748]
816         * sysdeps/pthread/bits/libc-lockP.h (__libc_once_get): New macro.
818 2012-05-09  Chung-Lin Tang  <cltang@codesourcery.com>
820         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
821         (__pthread_cond_timedwait): Use CFI directives.
822         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
823         (__pthread_cond_wait): Likewise.
824         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
825         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
827 2012-05-03  David S. Miller  <davem@davemloft.net>
829         * sysdeps/sparc/sparc64/pthread_spin_unlock.S: Fix thinko, we
830         always have to return 0, especially for the pthread_spin_init
831         alias.
832         * sysdeps/sparc/sparc32/pthread_spin_lock.S: Add missing trailing
833         newline.
834         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: Likewise.
835         * sysdeps/sparc/sparc64/pthread_spin_lock.S: Likewise.
837 2012-05-02  David S. Miller  <davem@davemloft.net>
839         * sysdeps/sparc/sparc64/pthread_spin_lock.S: New.
840         * sysdeps/sparc/sparc64/pthread_spin_lock.c: Delete.
841         * sysdeps/sparc/sparc64/pthread_spin_unlock.S: New.
842         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: Delete.
843         * sysdeps/sparc/sparc64/pthread_spin_trylock.S: New.
844         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: Delete.
845         * sysdeps/sparc/sparc64/pthread_spin_init.c: New.
846         * sysdeps/sparc/sparc32/pthread_spin_lock.S: New.
847         * sysdeps/sparc/sparc32/pthread_spin_lock.c: Delete.
848         * sysdeps/sparc/sparc32/pthread_spin_trylock.S: New.
849         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: Delete.
850         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: New.
851         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: Delete.
852         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.S: New.
853         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: Delete.
854         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.S: New.
855         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: Delete.
856         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_init.c: New.
858 2012-05-02  Allan McRae  <allan@archlinux.org>
860         * Makefile: (LDFLAGS-tst-tls5): Use $(no-as-needed).
861         (LDFLAGS-tst-cancel24): Likewise.
863 2012-05-02  Paul Pluzhnikov  <ppluzhnikov@google.com>
865         * sysdeps/i386/pthread_spin_lock.S: New.
866         * sysdeps/i386/pthread_spin_lock.c: Delete.
867         * sysdeps/x86_64/pthread_spin_lock.S: New.
868         * sysdeps/x86_64/pthread_spin_lock.c: Delete.
870 2012-04-28  Andreas Schwab  <schwab@linux-m68k.org>
872         * Makefile ($(objpfx)tst-stack3-mem, $(objpfx)tst-tls6.out): Don't
873         run when cross-compiling.
875 2012-04-26  Siddhesh Poyarekar  <siddhesh@redhat.com>
877         * sysdeps/pthread/unwind-forcedunwind.c: Include gnu/lib-names.h
878         instead of libgcc_s.h.
880 2012-04-20  Paul Pluzhnikov  <ppluzhnikov@google.com>
882         * sysdeps/x86_64/tls.h (TLS_GET_FS, TLS_SET_FS): Delete.
884 2012-03-27  David S. Miller  <davem@davemloft.net>
886         * tst-cond16.c (do_test): Use a thread stack size which is either
887         PTHREAD_STACK_MIN or the page size, whichever is larger.
888         * tst-cond18.c (do_test): Likewise.
890 2012-03-19  H.J. Lu  <hongjiu.lu@intel.com>
892         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Use
893         register char * __asm__("rsp") to get stack frame.
895 2012-03-19  H.J. Lu  <hongjiu.lu@intel.com>
897         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (SYS_futex): Use
898         __NR_futex directly.
900 2012-03-19  H.J. Lu  <hongjiu.lu@intel.com>
902         * unwind.c (unwind_stop): Cast _Unwind_GetCFA return to
903         _Unwind_Ptr first.
905 2012-03-16  David S. Miller  <davem@davemloft.net>
907         [BZ #13844]
908         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: Include using <..>
909         instead of "...".
910         * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c:
911         Delete, not needed.
913 2012-03-15  David S. Miller  <davem@davemloft.net>
915         [BZ #13844]
916         * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c: New file.
918 2012-03-09  Paul Eggert  <eggert@cs.ucla.edu>
920         [BZ #13673]
921         * pt-crti.S: Replace FSF snail mail address with URL.
923 2012-03-09  Joseph Myers  <joseph@codesourcery.com>
925         * sysdeps/pthread/pthread.h (__need_clockid_t, __need_timespec):
926         Do not define before including <time.h>.
928 2012-03-08  David S. Miller  <davem@davemloft.net>
930         * sysdeps/unix/sysv/linux/sparc/sem_post.c: Update copyright year.
932 2012-03-08  Thomas Schwinge  <thomas@codesourcery.com>
934         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
935         Check for timestamp before the Epoch.
937         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Fix
938         updating nwaiters.
940         * tst-sem13.c (do_test): Add another test case.
941         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
942         Fix updating nwaiters.
944 2012-03-07  Joseph Myers  <joseph@codesourcery.com>
946         [BZ #10545]
947         * sysdeps/pthread/configure.in (libc_cv_forced_unwind): Change
948         link test to a compile test.
949         (libc_cv_c_cleanup): Likewise.  Declare puts rather than including
950         <stdio.h>.
951         * sysdeps/pthread/configure: Regenerated.
953 2012-03-07  Ulrich Drepper  <drepper@gmail.com>
955         * Makefile (distribute): Remove variable.
957 2012-01-23  Thomas Schwinge  <thomas@codesourcery.com>
959         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Get rid of
960         superfluous assignment.
961         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c (sem_timedwait):
962         Likewise.
963         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
964         (sem_timedwait): Likewise.
966 2012-03-06  Ulrich Drepper  <drepper@gmail.com>
968         * sysdeps/pthread/bits/libc-lock.h: Move information not needed in
969         installed headers to...
970         * sysdeps/pthread/bits/libc-lockP.h: ...here.  New file.
972 2012-03-06  David S. Miller  <davem@davemloft.net>
974         * sysdeps/unix/sysv/linux/sparc/sem_post.c (__new_sem_post): Use
975         atomic_increment and remove unused local variable.
976         (__old_sem_post): Likewise.
978 2012-02-27  David S. Miller  <davem@davemloft.net>
980         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Don't refer to
981         non-existing __pthread_attr.
982         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
983         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
984         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
985         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
986         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
988 2012-02-26  Ulrich Drepper  <drepper@gmail.com>
990         * sysdeps/pthread/pthread.h: Define __need_clockid_t for __USE_XOPEN2K.
992         * sysdeps/pthread/pthread.h: Define __need_timespec before including
993         <time.h>.
994         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Name pthread_attr_t
995         union.
996         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
997         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
998         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
999         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1000         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1002 2012-02-21  Joseph Myers  <joseph@codesourcery.com>
1004         [BZ #13695]
1005         * Makefile (generated): Remove crti.S, crtn.S, defs.h and
1006         pt-initfini.s.
1007         [crti.S not in sysdirs] (omit-deps): Do not append.
1008         [crti.S not in sysdirs] (CFLAGS-pt-initfini.s): Remove variable.
1009         [crti.S not in sysdirs] (pt-initfini.c): Remove vpath directive.
1010         [crti.S not in sysdirs] ($(objpfx)crti.S): Remove rule.
1011         [crti.S not in sysdirs] ($(objpfx)crtn.S): Likewise.
1012         [crti.S not in sysdirs] ($(objpfx)defs.h): Likewise.
1013         [crti.S not in sysdirs] ($(objpfx)crti.o): Likewise.
1014         [crti.S not in sysdirs] ($(objpfx)crtn.o): Likewise.
1015         [crti.S in sysdirs] (extra-objs): Append unconditionally.
1016         [crti.S in sysdirs] ($(objpfx)crti.o): Define rule
1017         unconditionally.
1018         * sysdeps/pthread/pt-initfini.c: Remove file.
1020 2012-02-16  Richard Henderson  <rth@twiddle.net>
1022         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Remove file.
1023         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Remove file.
1025 2012-02-15  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1027         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Remove file.
1029 2012-02-16  David S. Miller  <davem@davemloft.net>
1031         * sysdeps/sparc/Makefile: Add -fPIC when building pt-crti.S and crtn.S
1033 2012-02-15  Marek Polacek  <polacek@redhat.com>
1035         * sysdeps/unix/sysv/linux/x86_64/Makefile: Remove file.
1037 2012-02-09  Paul Eggert  <eggert@cs.ucla.edu>
1039         Replace FSF snail mail address with URLs, as per GNU coding standards.
1041 2012-02-08  Andreas Schwab  <schwab@linux-m68k.org>
1043         * Makefile (extra-objs) [crti.S in sysdirs]: Add pt-crti.o.
1045 2012-02-08  Joseph Myers  <joseph@codesourcery.com>
1047         Support crti.S and crtn.S provided directly by architectures.
1048         * Makefile [crti.S in sysdirs] (omit-deps): Do not append.
1049         [crti.S in sysdirs] (CFLAGS-pt-initfini.s): Do not define variable.
1050         [crti.S in sysdirs] ($(objpfx)pt-initfini.s): Disable rule.
1051         [crti.S in sysdirs] ($(objpfx)crti.S): Likewise.
1052         [crti.S in sysdirs] ($(objpfx)crtn.S): Likewise.
1053         [crti.S in sysdirs] ($(objpfx)defs.h): Likewise.
1054         [crti.S in sysdirs] ($(objpfx)crti.o): Likewise.
1055         [crti.S in sysdirs] ($(objpfx)crtn.o): Likewise.
1056         [crti.S in sysdirs] (pt-initfini.c): Remove vpath directive.
1057         [crti.S in sysdirs] ($(objpfx)crti.o): New rule.
1058         * pt-crti.S: New file.
1059         * sysdeps/unix/sysv/linux/i386/Makefile: Remove file.
1061 2012-02-03  Joseph Myers  <joseph@codesourcery.com>
1063         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
1064         macros for PIC register setup.
1065         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1066         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1067         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1068         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1069         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1071 2012-01-11  Marek Polacek  <polacek@redhat.com>
1073         * forward.c (FORWARD_NORETURN): Define macro.
1074         (__pthread_unwind): Use FORWARD_NORETURN macro to avoid warning.
1075         (__pthread_exit): Likewise.
1077 2012-01-10  Ulrich Drepper  <drepper@gmail.com>
1079         * sysdeps/pthread/pthread.h: Add const attribute to pthread_equal.
1081         * pthreadP.h: Add noreturn to __pthread_exit.
1082         * sysdeps/pthread/pthread-functions.h: Likewise for ptr___pthread_exit.
1084 2011-12-30  Adhemerval Zanella  <azanella@linux.vnet.ibm.com>
1086         * sysdeps/unix/sysv/linux/aio_misc.h (__aio_create_helper_thread):
1087         Call pthread_attr_setstacksize() with result of
1088         __pthread_get_minstack() to account for application TLS usage.
1090 2012-01-08  Marek Polacek  <polacek@redhat.com>
1092         * sysdeps/unix/sysv/linux/mq_notify.c: Include <nptl/pthreadP.h>.
1094 2012-01-07  Ulrich Drepper  <drepper@gmail.com>
1096         [BZ #13553]
1097         * pthreadP.h: Use const instead of __const.
1098         * semaphore.h: Likewise.
1099         * sysdeps/pthread/bits/libc-lock.h: Likewise.
1100         * sysdeps/pthread/bits/sigthread.h: Likewise.
1101         * sysdeps/pthread/pthread.h: Likewise.
1103         * Makefile: Remove elf=yes test, only ELF is supported.
1105         * shlib-versions: Remove entries for ports architectures.
1107         In case anyone cares, the IA-64 architecture could move to ports.
1108         * sysdeps/ia64/*: Removed.
1109         * sysdeps/unix/sysv/linux/ia64/*: Removed.
1111 2011-12-22  Ulrich Drepper  <drepper@gmail.com>
1113         * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread): Use
1114         __pthread_get_minstack.
1115         * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Likewise.
1117         [BZ #13088]
1118         * sysdeps/unix/sysv/linux/timer_routines.c: Get minimum stack size
1119         through __pthread_get_minstack.
1120         * nptl-init.c (__pthread_initialize_minimal_internal): Get page size
1121         directly from _rtld_global_ro.
1122         (__pthread_get_minstack): New function.
1123         * pthreadP.h: Declare __pthread_get_minstack.
1124         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_get_minstack.
1126 2011-12-21  Ulrich Drepper  <drepper@gmail.com>
1128         [BZ #13515]
1129         * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1130         Correct reading name from file.
1132 2011-12-14  Carlos O'Donell  <carlos@systemhalted.org>
1134         * allocatestack.c (allocate_stack): Return errno on failure.
1136 2011-12-14  Jeff Law  <law@redhat.com>
1138         [BZ #5245]
1139         * pthread_create.c (__pthread_create_2_1): Translate ENOMEM to EAGAIN.
1141 2011-11-28  Andreas Schwab  <schwab@redhat.com>
1143         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Handle
1144         EAGAIN from FUTEX_WAIT_REQUEUE_PI.
1145         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1147 2011-11-15  Ulrich Drepper  <drepper@gmail.com>
1149         * pthread_getattr_np.c (pthread_getattr_np): Set FD_CLOEXEC for
1150         /proc/self/maps.
1152 2011-10-29  Ulrich Drepper  <drepper@gmail.com>
1154         [BZ #13358]
1155         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1156         (__pthread_cond_timedwait): Initialize %r15 correctly also for code
1157         path for kernels with FUTEX_CLOCK_REALTIME.
1158         Debugged by H.J. Lu <hjl.tools@gmail.com>.
1160 2011-10-27  Andreas Schwab  <schwab@redhat.com>
1162         [BZ #13344]
1163         * sysdeps/pthread/pthread.h: Use __THREADNL instead of __THREAD
1164         for memory synchronization functions.
1165         * semaphore.h: Likewise.
1167 2011-10-24  Ulrich Drepper  <drepper@gmail.com>
1169         * tst-cancel7.c: Avoid warning.
1170         * tst-mutex6.c: Likewise.
1171         * tst-mutex9.c: Likewise.
1172         * tst-mutexpi6.c: Likewise.
1174 2011-10-23  Ulrich Drepper  <drepper@gmail.com>
1176         * sysdeps/i386/tls.h: Remove #include <list.h>.
1178 2011-10-15  Ulrich Drepper  <drepper@gmail.com>
1180         * pthread_create.c (start_thread): Call __ctype_init.
1182 2011-09-15  Andreas Schwab  <schwab@redhat.com>
1184         * sysdeps/pthread/list.h: Define only list_t if __need_list_t is
1185         defined.
1186         (list_add): Add atomic_write_barrier.
1187         * descr.h: Define __need_list_t before including <list.h>.
1188         * nptl-init.c: Include <list.h>
1189         * allocatestack.c: Likewise.
1191 2011-09-11  Ulrich Drepper  <drepper@gmail.com>
1193         * sysdeps/i386/tls.h: Remove HAVE_TLS_SUPPORT test.
1194         * sysdeps/ia64/tls.h: Likewise.
1195         * sysdeps/powerpc/tls.h: Likewise.
1196         * sysdeps/s390/tls.h: Likewise.
1197         * sysdeps/sh/tls.h: Likewise.
1198         * sysdeps/sparc/tls.h: Likewise.
1199         * sysdeps/x86_64/tls.h: Likewise.
1201 2011-09-10  Ulrich Drepper  <drepper@gmail.com>
1203         * sysdeps/pthread/malloc-machine.h: Define MUTEX_INITIALIZER.
1205         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Don't handle
1206         !USE___THREAD.
1207         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1208         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1209         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1210         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1211         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
1212         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
1213         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
1214         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
1215         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1216         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1217         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
1218         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1220         * tst-tls1.c: Support for __thread is now mandatory.
1221         * tst-tls2.c: Likewise.
1222         * tst-tls3.c: Likewise.
1223         * tst-tls3mod.c: Likewise.
1224         * tst-tls4.c: Likewise.
1225         * tst-tls4moda.c: Likewise.
1226         * tst-tls4modb.c: Likewise.
1227         * tst-tls5.h: Likewise.
1229 2011-09-08  Ulrich Drepper  <drepper@gmail.com>
1231         [BZ #12403]
1232         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1233         (pthread_rwlock_timedwrlock): Use correct macro in test.
1234         Patch by H.J. Lu <hongjiu.lu@intel.com>.
1236 2011-09-06  Ulrich Drepper  <drepper@gmail.com>
1238         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): Don't
1239         use gettimeofday vsyscall, just call gettimeofday.
1240         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1241         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
1242         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1243         Likewise.
1244         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1245         Likewise.
1246         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1247         Simplify __vdso_clock_gettime use.
1249 2011-09-05  David S. Miller  <davem@davemloft.net>
1251         * sysdeps/unix/sysv/linux/sem_timedwait.c (do_futex_timed_wait):
1252         New function.
1253         (sem_timedwait): Call it to force an exception region around
1254         the async cancel enable and the futex operation.
1255         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: Likewise.
1256         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: Likewise.
1257         * sysdeps/unix/sysv/linux/sem_wait.c (do_futex_wait): New function.
1258         (__new_sem_wait): Call it to force an exception region around
1259         the async cancel enable and the futex operation.
1260         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: Likewise.
1261         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: Likewise.
1263 2011-08-31  Andreas Schwab  <schwab@redhat.com>
1265         * allocatestack.c (setxid_mark_thread): Ensure that the exiting
1266         thread is woken up.
1268 2011-08-20  David S. Miller  <davem@davemloft.net>
1270         * Makefile (tst-cleanup0.out): Fix typo in output redirection.
1272 2011-08-14  Roland McGrath  <roland@hack.frob.com>
1274         * sysdeps/i386/pthreaddef.h (TCB_ALIGNMENT): Set to 64, optimal on Atom.
1275         * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Likewise.
1277 2011-08-08  Andreas Schwab  <schwab@redhat.com>
1279         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned
1280         stack.
1281         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1282         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1284 2011-07-22  Ulrich Drepper  <drepper@gmail.com>
1286         * sysdeps/pthread/unwind-forcedunwind.c (_Unwind_Resume): Add read
1287         barrier.
1288         (__gcc_personality_v0): Likewise.
1289         (_Unwind_ForcedUnwind): Likewise.
1290         (_Unwind_GetCFA): Likewise.
1292 2011-07-14  Roland McGrath  <roland@hack.frob.com>
1294         * allocatestack.c (__reclaim_stacks): Use uintptr_t cast rather than
1295         UINTMAX_C.
1297 2011-06-30  Ulrich Drepper  <drepper@gmail.com>
1299         * nptl-init.c (__nptl_set_robust): New function.
1300         (pthread_functions): Add reference.
1301         * npthreadP.h: Declare __nptl_set_robust.
1302         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
1303         ptr_set_robust member.
1304         * sysdeps/unix/sysv/linux/fork.c: Call set_robust_list syscall in
1305         child if threads are used.
1307 2011-06-14  Andreas Jaeger  <aj@suse.de>
1309         * pthread_rwlock_init.c: Include <string.h> for memset declaration.
1311 2011-05-11  Ulrich Drepper  <drepper@gmail.com>
1313         [BZ #386]
1314         * allocatestack.c (allocate_stack): Convert ENOMEM error to EAGAIN.
1316 2011-04-10  Ulrich Drepper  <drepper@gmail.com>
1318         [BZ #12650]
1319         * allocatestack.c (get_cached_stack): Deallocate DTV entries before
1320         clearing memory.
1321         Patch partly by Robert Rex <robert.rex@exasol.com>.
1323 2011-01-19  Roland McGrath  <roland@redhat.com>
1325         * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
1326         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1327         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
1328         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1329         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
1330         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
1332 2011-01-16  Andreas Schwab  <schwab@linux-m68k.org>
1334         * Makefile (test-extras): Add tst-cleanup4aux.
1336 2011-01-14  Ulrich Drepper  <drepper@gmail.com>
1338         [BZ #10563]
1339         * sysdeps/pthread/setxid.h (__SETXID_1): Add cast to assignment.
1340         (__SETXID_2): Likewise.
1341         (__SETXID_3): Likewise.
1343 2011-01-13  Ulrich Drepper  <drepper@gmail.com>
1345         [BZ #10484]
1346         * Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
1347         * alloca_cutoff.c: Add libc_hidden_def.
1349 2010-10-13  H.J. Lu  <hongjiu.lu@intel.com>
1351         [BZ #12113]
1352         * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
1353         * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
1354         of "struct pthread".
1356 2010-09-21  Andreas Schwab  <schwab@redhat.com>
1358         * sysdeps/pthread/pthread.h (pthread_cleanup_push)
1359         [!__EXCEPTIONS]: Mangle local variable not_first_call.
1360         (pthread_cleanup_push_defer_np): Likewise.
1362 2010-09-03  Ulrich Drepper  <drepper@redhat.com>
1364         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are
1365         small.
1367 2010-08-10  Dinakar Guniguntala  <dino@in.ibm.com>
1368             Stefan Hajnoczi  <stefanha@linux.vnet.ibm.com>
1370         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
1371         FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
1373 2010-08-12  H.J. Lu  <hongjiu.lu@intel.com>
1375         * sysdeps/unix/sysv/linux/i386/Makefile: New file.
1377 2010-05-01  Alan Modra  <amodra@gmail.com>
1379         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1380         (PSEUDO): Use correct cr save.  Don't use wrong parm save area
1381         to save temps.  Correct cfi for possible later frame manipulation.
1382         (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
1383         (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
1384         (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
1385         (DOCARGS_6, UNDOCARGS_6): Likewise.
1386         (CENABLE, CDISABLE): Add nops for non-shared calls.
1388 2010-07-06  Andreas Schwab  <schwab@redhat.com>
1390         * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1391         Fix type mismatch.
1393 2010-07-03  Ulrich Drepper  <drepper@redhat.com>
1395         * tst-abstime.c (do_test): Some more cleanups
1397 2010-07-02  Ulrich Drepper  <drepper@redhat.com>
1399         * tst-abstime.c: Correct testing and add test for sem_timedwait.
1401 2010-07-01  Andreas Schwab  <schwab@redhat.com>
1402             Ulrich Drepper  <drepper@redhat.com>
1404         * Makefile (tests): Add tst-abstime.
1405         * tst-abstime.c: New file.
1406         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1407         (__lll_timedlock_wait): Check for timestamp before the Epoch.
1408         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1409         (__lll_timedlock_wait): Likewise.
1410         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1411         (__lll_robust_timedlock_wait): Likewise.
1412         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1413         (__pthread_cond_timedwait): Likewise.
1414         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1415         (pthread_rwlock_timedrdlock): Likewise.
1416         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1417         (pthread_rwlock_timedwrlock): Likewise.
1418         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1419         Likewise.
1421 2010-07-01  Ulrich Drepper  <drepper@redhat.com>
1423         * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
1425 2010-06-01  Takashi Yoshii  <takashi.yoshii.zj@renesas.com>
1427         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
1428         location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
1430 2010-04-09  Ulrich Drepper  <drepper@redhat.com>
1432         [BZ #11390]
1433         * sysdeps/unix/sysv/linux/pthread_getname.c: New file.
1434         * sysdeps/unix/sysv/linux/pthread_setname.c: New file.
1435         * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and
1436         pthread_setname.
1437         * Makefile (libpthread-routines): Add pthread_getname and
1438         pthread_setname.
1439         * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12.
1441 2010-04-05  Thomas Schwinge  <thomas@schwinge.name>
1443         * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/.
1444         * sysdeps/pthread/rt-unwind-resume.c: Likewise.
1445         * sysdeps/pthread/Makefile: Remove csu section and rt section's
1446         unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead.
1448 2010-03-23  Luis Machado  <luisgpm@br.ibm.com>
1450         * pthread_cond_timedwait.c: Add check for
1451         HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
1452         (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
1453         INTERNAL_SYSCALL.
1455 2010-03-09  Ulrich Drepper  <drepper@redhat.com>
1457         * pthread_create.c (__pthread_create_2_1): If priorities are incorrect
1458         and the call fails wake eventually waiting setxid threads.  Don't free
1459         stack here if we try starting a thread.
1460         * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter
1461         if the clone call failed.
1463 2010-03-08  Andreas Schwab  <schwab@redhat.com>
1465         * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
1466         * allocatestack.c (get_cached_stack): Set setxid_futex.
1467         (allocate_stack): Likewise.
1469 2010-03-05  Andreas Schwab  <schwab@redhat.com>
1470             Ulrich Drepper  <drepper@redhat.com>
1472         * allocatestack.c (setxid_mark_thread): Delay handling of thread if
1473         it is creating a thread or it is just being created.
1474         * pthread_create.c (start_thread): Wake setxid thread if it is
1475         waiting.
1476         (__pthread_create_2_1): Initialize setxid_futex.
1477         * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it
1478         is waiting.
1480 2010-01-15  Ulrich Drepper  <drepper@redhat.com>
1482         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1483         Fix unwind info.
1484         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1486 2010-01-15  Michal Schmidt  <mschmidt@redhat.com>
1488         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1489         Fix pthread_cond_timedwait with requeue-PI.
1490         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1491         Fix pthread_cond_wait with requeue-PI.
1493 2010-01-14  Ulrich Drepper  <drepper@redhat.com>
1495         * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
1496         and pthread_mutexattr_setrobust for GLIBC_2.12.
1497         * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
1498         * pthread_mutexattr_getrobust.c: Define alias
1499         pthread_mutexattr_getrobust.
1500         * pthread_mutexattr_setrobust.c: Define alias
1501         pthread_mutexattr_setrobust.
1503 2010-01-12  Ulrich Drepper  <drepper@redhat.com>
1505         * sysdeps/pthread/pthread.h: Cleanup.  Fix up for XPG7.
1507 2010-01-08  Ulrich Drepper  <drepper@redhat.com>
1509         * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
1511 2009-12-18  Thomas Schwinge  <thomas@codesourcery.com>
1513         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
1514         call __gmon_start__.
1515         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
1517 2009-12-17  Ulrich Drepper  <drepper@redhat.com>
1519         * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
1520         using memset.
1522 2009-12-01  Dinakar Guniguntala  <dino@in.ibm.com>
1524         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
1525         FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1526         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
1527         is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1528         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1529         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
1530         is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1531         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1533 2009-12-12  Ulrich Drepper  <drepper@redhat.com>
1535         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1536         Don't update nwaiters after invalid timeout is recognized.
1538 2009-11-27  Thomas Schwinge  <thomas@codesourcery.com>
1540         * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
1541         __gmon_start__.
1543 2009-11-27  Andreas Schwab  <schwab@redhat.com>
1545         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
1546         THREAD_SELF->cancelhandling after returning from futex call.
1548 2009-11-24  Ulrich Drepper  <drepper@redhat.com>
1550         * tst-sem13.c: New file.
1551         * Makefile (tests): Add tst-sem13.
1553 2009-11-22  Roland McGrath  <roland@redhat.com>
1555         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
1556         instead of recapitulating its contents.
1558 2009-11-18  Ulrich Drepper  <drepper@redhat.com>
1560         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
1561         optimizations and cleanups.
1563 2009-11-18  Dinakar Guniguntala  <dino@in.ibm.com>
1565         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1566         Remove redundant code. Fix cfi offsets.
1567         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1568         Fix cfi offsets.
1570 2009-11-17  Ulrich Drepper  <drepper@redhat.com>
1572         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
1573         reduce size of unwind info.
1575         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
1576         cfi directives.
1577         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1578         Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
1580 2009-11-03  Andreas Schwab  <schwab@linux-m68k.org>
1582         [BZ #4457]
1583         * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
1584         LIBGCC_S_SO.
1585         * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
1587 2009-10-30  Ulrich Drepper  <drepper@redhat.com>
1589         * tst-sem11.c (main): Rewrite to avoid aliasing problems.
1591         [BZ #3270]
1592         * allocatestack.c (__nptl_setxid): Perform the operation in multiple
1593         steps to avoid races with creation and terminations.
1594         * nptl-init.c (sighandler_setxid): Adjust.
1595         Patch by Daniel Jacobowitz.
1597 2009-09-07  Andreas Schwab  <schwab@redhat.com>
1599         * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
1601 2009-09-02  Suzuki K P  <suzuki@in.ibm.com>
1602             Joseph Myers  <joseph@codesourcery.com>
1604         [BZ #7094]
1605         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1606         Initialize the sigev_notify field for newly created timer to make sure
1607         the timer gets deleted from the active timer's list upon timer_delete.
1609 2009-08-27  Andrew Stubbs  <ams@codesourcery.com>
1611         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1612         Correct a logic error.
1614 2009-08-25  Ulrich Drepper  <drepper@redhat.com>
1616         * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
1617         of the field in local variables.
1618         (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
1619         variable and don't unconditionally clear it.
1621 2009-08-24  Ulrich Drepper  <drepper@redhat.com>
1623         * pthread_create.c (start_thread): Hint to the kernel that memory for
1624         the stack can be reused.  We do not mark all the memory.  The part
1625         still in use and some reserve are kept.
1627 2009-08-23  Ulrich Drepper  <drepper@redhat.com>
1629         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
1631 2009-08-11  Ulrich Drepper  <drepper@redhat.com>
1633         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
1634         directives.
1636 2009-08-10  Ulrich Drepper  <drepper@redhat.com>
1638         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
1639         directives.
1640         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1642 2009-08-10  Andreas Schwab  <schwab@redhat.com>
1644         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1645         (__pthread_cond_signal): Don't clobber register used for syscall
1646         number.
1648 2009-08-08  Ulrich Drepper  <drepper@redhat.com>
1650         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1651         Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
1653         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1654         (__pthread_cond_wait): Optimize by avoiding use of callee-safe
1655         register.
1657 2009-08-07  Ulrich Drepper  <drepper@redhat.com>
1659         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
1660         enabled by the special *_asynccancel functions.
1661         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1662         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1664         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
1666 2009-08-04  Ulrich Drepper  <drepper@redhat.com>
1668         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
1669         * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
1670         * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
1671         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
1672         since we can assume the special __*_{en,dis}able_asynccancel
1673         functions.
1674         (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
1675         * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
1676         and PTHREAD_CANCELED.
1678 2009-07-31  Ulrich Drepper  <drepper@redhat.com>
1680         * descr.h: Better definition of *_BITMASK macros for cancellation.
1682 2009-07-29  Ulrich Drepper  <drepper@redhat.com>
1684         * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
1686         * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
1687         dynamic linker might have to save.
1688         Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
1689         RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL.  Pretty
1690         printing.
1692         * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
1694 2009-07-28  Ulrich Drepper  <drepper@redhat.com>
1696         * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
1697         New function.
1698         * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
1699         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
1700         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
1701         requeue_pi for robust mutexes.
1702         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1703         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1704         Don't only skip __pthread_mutex_cond_lock.  Call instead
1705         __pthread_mutex_cond_lock_adjust.
1706         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1708         * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
1709         optimization of PI mutex handling.
1711 2009-07-27  Ulrich Drepper  <drepper@redhat.com>
1713         [BZ #10418]
1714         * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
1715         instead of of _acq variants of cmpxchg.
1717 2009-07-23  Ulrich Drepper  <drepper@redhat.com>
1719         * sysdeps/x86_64/configure.in: New file.
1721         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
1722         path when not using absolute timeout futex.
1724 2009-07-20  Ulrich Drepper  <drepper@redhat.com>
1726         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
1727         optimizations of last changes.
1728         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1730 2009-07-19  Ulrich Drepper  <drepper@redhat.com>
1732         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1733         FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1734         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
1735         is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1736         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1737         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
1738         is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1739         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1741         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1742         (__pthread_cond_timedwait): Make more robust.
1744 2009-07-18  Ulrich Drepper  <drepper@redhat.com>
1746         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1747         (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
1748         directly use absolute timeout.
1750         * tst-sem5.c (do_test): Add test for premature timeout.
1751         * Makefile: Linu tst-sem5 with librt.
1753         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1754         (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
1755         directly use absolute timeout.
1756         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1757         (pthread_rwlock_timedrdlock): Likewise.
1759         * tst-cond11.c (run_test): Add test to check that the timeout is
1760         long enough.
1762         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1763         (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
1764         directly use absolute timeout.
1766         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1767         (__pthread_cond_wait): Convert to using exception handler instead of
1768         registered unwind buffer.
1769         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1770         (__pthread_cond_timedwait): Likewise.
1772 2009-07-17  Ulrich Drepper  <drepper@redhat.com>
1774         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1775         If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
1776         use absolute timeout.
1778         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
1779         handling of uncontested semaphore.
1781         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1782         (__condvar_cleanup): Rewrite to use cfi directives instead of
1783         hand-coded unwind tables.
1784         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
1785         Likewise.
1786         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
1787         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1788         Likewise.
1790 2009-06-12  Ulrich Drepper  <drepper@redhat.com>
1792         * Makefile (libpthread-routines): Add pthread_sigqueue.
1793         * Versions: Add pthread_sigqueue for GLIBC_2.11.
1794         * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
1795         * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
1797 2009-06-11  Ulrich Drepper  <drepper@redhat.com>
1799         [BZ #10262]
1800         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1801         (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
1802         cannot be assumed.
1803         Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
1805 2009-05-16  Ulrich Drepper  <drepper@redhat.com>
1807         * libc-cancellation.c: Move __libc_cleanup_routine to...
1808         * libc-cleanup.c: ...here.  New file.
1809         * Makefile (routines): Add libc-cleanup.
1811         * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
1812         test.
1813         * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
1814         * sysdeps/pthread/librt-cancellation.c: Likewise.
1816         [BZ #9924]
1817         * nptl-init.c: Renamed from init.c.
1818         * Makefile: Change all occurences of init.c to nptl-init.c.
1820 2009-05-15  Ulrich Drepper  <drepper@redhat.com>
1822         * cancellation.c (__pthread_disable_asynccancel): Correct the bits
1823         to test when deciding on the delay.
1824         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1825         * pthread_cancel.c: Close race between deciding on sending a signal
1826         and setting the CANCELING_BIT bit.
1828         * cancellation.c (__pthread_disable_asynccancel): Don't return if
1829         thread is canceled.
1830         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1832 2009-04-27  Ulrich Drepper  <drepper@redhat.com>
1834         * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
1835         is available.
1836         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
1837         * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
1838         * sysdeps/i386/tls.h: Likewise.
1839         (tcbhead_t): Add __private_tm member.
1841 2009-04-26  Ulrich Drepper  <drepper@redhat.com>
1843         * sem_open.c (sem_open): Rewrite initialization of initsem to
1844         avoid warnings.
1846         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1847         Avoid warning by using may_alias attribute on ptrhack.
1849 2009-04-22  Ulrich Drepper  <drepper@redhat.com>
1851         [BZ #10090]
1852         * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
1853         Check policy and priority for validity.
1854         Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
1856 2009-03-15  Ulrich Drepper  <drepper@redhat.com>
1858         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1859         (__pthread_cond_timedwait): Change to use cfi directives instead of
1860         hand-coded unwind sections.
1862 2009-03-10  Ulrich Drepper  <drepper@redhat.com>
1864         * init.c (nptl_freeres): Compile only for SHARED.
1866 2009-03-09  Jakub Jelinek  <jakub@redhat.com>
1868         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
1869         FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
1870         FUTEX_BITSET_MATCH_ANY.
1872 2009-02-27  Roland McGrath  <roland@redhat.com>
1874         * init.c (__nptl_initial_report_events): Mark __attribute_used__.
1875         * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
1877 2009-02-26  Ulrich Drepper  <drepper@redhat.com>
1879         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
1880         _POSIX_THREAD_ROBUST_PRIO_INHERIT and
1881         _POSIX_THREAD_ROBUST_PRIO_PROTECT.  Reset value of macros from
1882         200112L to 200809L.
1884 2009-02-25  Ulrich Drepper  <drepper@redhat.com>
1886         * sysdeps/pthread/pthread.h: The robust mutex functions are in
1887         POSIX 2008.
1889 2009-02-24  Ulrich Drepper  <drepper@redhat.com>
1891         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
1892         Unify name of include protector macro.
1894 2009-02-14  SUGIOKA Toshinobu  <sugioka@itonet.co.jp>
1896         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
1897         LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
1899 2009-01-29  Ulrich Drepper  <drepper@redhat.com>
1901         * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
1902         pointer variables.
1904         * allocatestack.c (__free_stacks): Renamed from free_stacks.
1905         (__free_stack_cache): Removed.  Change callers to call __free_stacks.
1906         * init.c (nptl_freeres): New function.
1907         (pthread_functions): Initialize ptr_freeres to nptl_freeres.
1908         * pthreadP.h: Don't declare __free_stack_cache.  Declare __free_stacks.
1909         * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
1910         variable.
1911         (pthread_cancel_init): Depend in libgcc_s_handle for decision to
1912         load DSO.  Assign last.
1913         (__unwind_freeres): New function.
1915         * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
1916         for better debugging.  No need to use stack_list_add here.
1918 2009-01-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1920         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
1921         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
1922         instead of computing relative timeout.
1923         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1924         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
1926 2009-01-25  Ulrich Drepper  <drepper@redhat.com>
1928         * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
1930 2009-01-08  Ulrich Drepper  <drepper@redhat.com>
1932         * sysdeps/pthread/list.h (list_add): Initialize new element first.
1933         (list_add_tail): Removed.
1935 2009-01-07  Ulrich Drepper  <drepper@redhat.com>
1937         * (in_flight_stack): New variable.
1938         (stack_list_del): New function.  Use instead of list_del.
1939         (stack_list_add): New function.  Use instead of list_add when adding to
1940         stack_cache and stack_used lists.
1941         (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
1942         when the fork call interrupted another thread.
1944 2009-01-04  Ulrich Drepper  <drepper@redhat.com>
1946         * init.c (__pthread_initialize_minimal_internal): Optimize test
1947         FUTEX_CLOCK_REALTIME a bit.
1949 2009-01-03  Ulrich Drepper  <drepper@redhat.com>
1951         * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
1952         only passing five parameters to FUTEX_WAIT_BITSET call.
1954         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1955         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
1956         instead of computing relative timeout.
1958 2009-01-02  Ulrich Drepper  <drepper@redhat.com>
1960         * init.c (__pthread_initialize_minimal_internal): Check for
1961         FUTEX_CLOCK_REALTIME flag.
1962         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
1963         Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
1964         relative timeout.
1966         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1967         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
1968         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1969         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1970         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1971         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1973 2008-12-09  Ulrich Drepper  <drepper@redhat.com>
1975         * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
1976         loop body instead of ; to avoid gcc warnings.
1977         (pthread_cleanup_pop_restore_np): Likewise.
1978         Patch by Caolán McNamara <caolanm@redhat.com>.
1980 2008-12-09  Jakub Jelinek  <jakub@redhat.com>
1982         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
1983         fast path here, for robust/PI/PP mutexes call
1984         __pthread_mutex_lock_full.  Don't use switch, instead use a series
1985         of ifs according to their probability.
1986         (__pthread_mutex_lock_full): New function.
1987         * pthread_mutex_unlock.c: Include assert.h.
1988         (__pthread_mutex_unlock_usercnt): Handle only the
1989         fast path here, for robust/PI/PP mutexes call
1990         __pthread_mutex_unlock_full.  Don't use switch, instead use a series
1991         of ifs according to their probability.
1992         (__pthread_mutex_unlock_full): New function.
1993         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
1994         (__pthread_mutex_lock_full): Define.
1996 2008-12-08  Ulrich Drepper  <drepper@redhat.com>
1998         * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
1999         implementation.  Add necessary padding and.
2000         * descr.h (struct pthread): Increase padding for tcbhead_t to 24
2001         words.
2003 2008-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2005         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
2006         and FUTEX_WAKE_BITSET.
2008 2008-12-02  Ulrich Drepper  <drepper@redhat.com>
2010         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
2011         and FUTEX_WAKE_BITSET.
2012         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2013         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2014         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2015         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2017 2008-11-25  Roland McGrath  <roland@redhat.com>
2019         * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
2020         Subdirectories moved to ports repository as
2021         sysdeps/.../nptl subdirectories.
2023 2008-11-12  Jakub Jelinek  <jakub@redhat.com>
2025         [BZ #7008]
2026         * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
2027         of old value.
2028         * pthread_cond_init.c (__pthread_cond_init): Fix
2029         cond->__data.__nwaiters initialization.
2030         * Makefile (tests): Add tst-cond23.
2031         * tst-cond23.c: New test.
2033 2008-11-07  Jakub Jelinek  <jakub@redhat.com>
2035         * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
2036         arguments.
2037         (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
2038         arguments.
2040 2008-11-01  Ulrich Drepper  <drepper@redhat.com>
2042         [BZ #6955]
2043         * pthread_mutex_lock.c: Add support for private PI mutexes.
2044         * pthread_mutex_timedlock.c: Likewise.
2045         * pthread_mutex_trylock.c: Likewise.
2046         * pthread_mutex_unlock.c: Likewise.
2047         Patch mostly by Ben Jackson <ben@ben.com>.
2049 2008-10-31  Ulrich Drepper  <drepper@redhat.com>
2051         [BZ #6843]
2052         * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
2053         Increase stack size for helper thread.
2055 2008-10-06  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2057         * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
2058         assembly with a clobber list for access registers a0 and a1.
2060 2008-09-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2062         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
2063         to force runp->refcntr to be read from memory.
2065 2008-09-08  Richard Guenther  <rguenther@suse.de>
2067         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
2068         lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2069         lll_timedlock, lll_robust_timedlock, lll_unlock,
2070         lll_robust_unlock): Promote private to int.
2072 2008-08-15  Ulrich Drepper  <drepper@redhat.com>
2074         * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
2075         ARCH_RETRY_MMAP definitions.
2076         * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
2077         Define MAP_STACK when not defined.
2078         (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS.  Remove
2079         handling of ARCH_RETRY_MMAP.
2081 2008-07-30  Ulrich Drepper  <drepper@redhat.com>
2083         * tst-align2.c (f): Print message that f is reached.
2085 2008-04-28  Hiroki Kaminaga  <kaminaga@sm.sony.co.jp>
2087         [BZ #6740]
2088         * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
2089         definition with #ifndef __ASSUME_PRIVATE_FUTEX.
2091 2008-07-25  Ulrich Drepper  <drepper@redhat.com>
2093         * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
2094         SOCK_CLOEXEC if possible.
2096 2008-05-29  Ulrich Drepper  <drepper@redhat.com>
2098         * Makefile (tests): Add tst-rwlock2a.
2099         * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
2100         * tst-rwlock2a.c: New file.
2102 2008-06-12  Ulrich Drepper  <drepper@redhat.com>
2104         * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
2106 2008-05-17  Samuel Thibault  <samuel.thibault@ens-lyon.org>
2108         * sysdeps/pthread/pthread.h: Fix typo in comment.
2110 2008-05-28  Ulrich Drepper  <drepper@redhat.com>
2112         * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
2113         of CPU set to the kernel.
2115 2008-05-23  Paul Pluzhnikov  <ppluzhnikov@google.com>
2117         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
2118         cfi directives.
2119         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
2120         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
2121         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2122         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2123         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2124         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2126 2008-05-22  Paul Pluzhnikov  <ppluzhnikov@google.com>
2128         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
2129         cfi directives.
2130         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2131         Likewise.
2132         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2133         Likewise.
2134         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2135         Likewise.
2137 2008-05-26  Ulrich Drepper  <drepper@redhat.com>
2139         * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
2141 2008-05-20  Jakub Jelinek  <jakub@redhat.com>
2143         David S. Miller  <davem@davemloft.net>
2145         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
2147 2008-05-10  Ulrich Drepper  <drepper@redhat.com>
2149         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
2150         __pshared correctly.
2151         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2152         Likewise.
2153         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2154         Likewise.
2155         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
2156         Likewise.
2157         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
2158         Likewise.
2159         Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
2161 2008-04-14  David S. Miller  <davem@davemloft.net>
2163         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2164         (__old_sem_wait): Fix argument to lll_futex_wait().
2166 2007-11-26  Daniel Jacobowitz  <dan@codesourcery.com>
2168         * pthread_create.c: Require pthread_mutex_trylock and
2169         pthread_key_delete for libgcc.
2171 2008-04-08  Jakub Jelinek  <jakub@redhat.com>
2173         [BZ #6020]
2174         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
2175         (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
2176         Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
2178 2008-03-27  Ulrich Drepper  <drepper@redhat.com>
2180         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
2181         <linux/limits.h> has defined it.
2182         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2183         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2184         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2185         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2187 2008-03-18  Jakub Jelinek  <jakub@redhat.com>
2189         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
2190         of ASSEMBLER.
2191         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2192         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
2194 2008-03-14  Ulrich Drepper  <drepper@redhat.com>
2196         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
2197         HAVE_DL_DISCOVER_OSVERSION.
2198         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2199         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
2201 2008-03-07  Ulrich Drepper  <drepper@redhat.com>
2203         [BZ #5778]
2204         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
2205         _POSIX_CHOWN_RESTRICTED value to zero.
2207 2008-01-31  Roland McGrath  <roland@redhat.com>
2209         * Makefile (omit-deps): Variable removed.
2211 2008-01-30  Ulrich Drepper  <drepper@redhat.com>
2213         * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
2214         unnecessary addr32 prefix.
2216 2008-01-29  Roland McGrath  <roland@redhat.com>
2218         * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
2220 2008-01-22  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2222         * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
2224 2008-01-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2226         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
2227         a scratch register.
2228         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
2229         (__lll_lock_wait_private): Fix typo.
2230         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
2231         (pthread_barrier_wait): Likewise.  Adjust XADD use.
2232         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
2233         Adjust XADD use.
2234         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
2235         (pthread_rwlock_timedrdlock): Return correct return value.
2236         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
2237         (pthread_rwlock_timedwrlock): Likewise.
2239 2008-01-15  Ulrich Drepper  <drepper@redhat.com>
2241         * tst-eintr2.c (do_test): make sure that if mutex_lock in main
2242         thread returns the program exits with an error code.
2244 2008-01-10  Ulrich Drepper  <drepper@redhat.com>
2246         * pthread-errnos.sym: Add EOVERFLOW.
2247         * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
2248         * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
2249         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2250         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2252 2007-12-14  Ulrich Drepper  <drepper@redhat.com>
2254         * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
2255         parameter.  Passed it as permission to mmap.
2256         * allocatestack.c (allocate_stack): Pass prot as second parameter
2257         to ARCH_RETRY_MMAP.
2259 2007-12-12  Ulrich Drepper  <drepper@redhat.com>
2261         * tst-basic7.c: Allocate memory for the stack.
2263         [BZ #5465]
2264         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
2265         (__pthread_cond_timedwait): Don't use VDSO.
2266         Patch by Michal Januszewski.
2268 2007-12-07  Ulrich Drepper  <drepper@redhat.com>
2270         [BZ #5455]
2271         * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
2272         Allow label before pthread_cleanup_pop.
2273         (pthread_cleanup_pop_restore_np): Likewise.
2275 2007-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2277         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
2278         Store 2 before returning ETIMEDOUT.
2280 2007-11-23  Ulrich Drepper  <drepper@redhat.com>
2282         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
2283         Store 2 before returning ETIMEDOUT.
2284         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
2285         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
2286         (__lll_lock_wait_private): Optimize.
2287         (__lll_lock_wait): Likewise.
2289 2007-11-20  Jakub Jelinek  <jakub@redhat.com>
2291         * sysdeps/pthread/pthread.h (pthread_cleanup_push,
2292         pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
2293         g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
2295 2007-11-08  Ulrich Drepper  <drepper@redhat.com>
2297         [BZ #5240]
2298         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
2299         If we time out, try one last time to lock the futex to avoid
2300         losing a wakeup signal.
2301         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2302         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2304         [BZ #5245]
2305         * sysdeps/pthread/createthread.c (do_clone): Translate clone error
2306         if necessary.
2308 2007-11-07  Ulrich Drepper  <drepper@redhat.com>
2310         [BZ #5245]
2311         * allocatestack.c (allocate_stack): Change ENOMEM error in case
2312         mmap failed to EAGAIN.
2313         * Makefile (tests): Add tst-basic7.
2314         * tst-basic7.c: New file.
2316 2007-11-05  Ulrich Drepper  <drepper@redhat.com>
2318         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
2319         Use __linkin_atfork.
2321 2007-11-03  Mike Frysinger  <vapier@gentoo.org>
2323         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
2324         missing line continuations.
2325         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
2326         LOAD_FUTEX_WAKE): Likewise.  Also add missing 3rd parameter.
2328 2007-10-28  Ulrich Drepper  <drepper@redhat.com>
2330         [BZ #5220]
2331         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
2332         __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
2333         (struct timer): Add next element.
2334         * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
2335         enqueue timer structure into __active_timer_sigev_thread list.
2336         * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
2337         remove timer struct from __active_timer_sigev_thread.
2338         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2339         Before using timer structure make sure it is still on the
2340         __active_timer_sigev_thread list.  Keep lock until done.
2341         Define __active_timer_sigev_thread and
2342         __active_timer_sigev_thread_lock.
2344 2007-10-27  Ulrich Drepper  <drepper@redhat.com>
2346         * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
2347         Redefine thread_atfork for use of ATFORK_MEM.
2348         * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
2349         * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
2350         function.
2351         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2352         Use atomic operation when removing first element of list.
2354 2007-10-17  Jakub Jelinek  <jakub@redhat.com>
2356         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
2357         routine instead of an alias to __new_sem_post.
2359 2007-10-15  Jakub Jelinek  <jakub@redhat.com>
2361         * init.c (__pthread_initialize_minimal): Initialize word to appease
2362         valgrind.
2364 2007-10-10  Jakub Jelinek  <jakub@redhat.com>
2366         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
2367         libc.so just clear NAME.
2368         (__libc_rwlock_fini): Nop inside of libc.so.
2369         * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
2370         all zeros.
2372 2007-09-02  Ulrich Drepper  <drepper@redhat.com>
2374         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2375         (__pthread_cond_wait): Fix unlocking of internal lock after mutex
2376         unlocking failed.
2377         Patch by Luca Barbieri <luca.barbieri@gmail.com>.
2379 2007-08-21  Ulrich Drepper  <drepper@redhat.com>
2381         [BZ #4938]
2382         * allocatestack.c (__reclaim_stacks): Clear the TSD in the
2383         reclaimed stack if necessary.
2384         * Makefile (tests): Add tst-tsd6.
2385         * tst-tsd6.c: New file.
2387 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
2389         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
2390         Add private argument.
2392 2007-08-20  Ulrich Drepper  <drepper@redhat.com>
2394         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2395         (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
2397 2007-08-16  Jakub Jelinek  <jakub@redhat.com>
2399         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
2400         (__lll_robust_timedlock): Pass private as last argument to
2401         __lll_robust_timedlock_wait.
2402         (__lll_unlock): Fix a pasto.
2404 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
2406         * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
2407         sparc_old_sem): New structs.
2408         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2409         (__sem_wait_cleanup): New function.
2410         (__new_sem_wait): Use sparc_new_sem structure.  Bump and afterwards
2411         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
2412         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2413         lll_futex_wait.
2414         (__old_sem_wait): New function.
2415         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
2416         nptl/sysdeps/unix/sysv/linux/sparc version.
2417         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
2418         Likewise.
2419         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
2420         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
2421         (__new_sem_trywait): Use sparc_old_sem structure.
2422         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
2423         (sem_timedwait): Use sparc_new_sem structure.  Bump and afterwards
2424         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
2425         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2426         lll_futex_timed_wait.
2427         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
2428         Use sparc_new_sem structure.  Only wake if nwaiters > 0.  Pass
2429         isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2430         lll_futex_wake.
2431         (__old_sem_post): New function.
2432         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
2433         * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
2434         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
2435         * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
2436         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
2437         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
2439 2007-08-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2441         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2442         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2443         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2444         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2445         * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
2446         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2447         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2448         Use FUTEX_WAKE_OP.
2449         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2450         kernel-features.h and tcb-offsets.h.
2451         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2452         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2453         process private.
2454         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2455         tcb-offsets.h.
2456         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
2457         to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2458         process private.
2459         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
2460         __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2461         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
2462         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2463         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2464         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2465         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2467 2007-08-14  Jakub Jelinek  <jakub@redhat.com>
2469         * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
2470         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
2471         (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
2472         lll_futex_timed_wait.
2474         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
2475         __lll_robust_unlock): Rewrite as macros instead of inline functions.
2476         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
2477         __lll_robust_unlock, __lll_wait_tid): Likewise.
2479 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
2481         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
2482         Fix a pasto.
2483         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
2484         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2485         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2486         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2487         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2488         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2489         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2490         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
2491         kernel-features.h.
2492         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2493         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2494         process private.  Switch DW_CFA_advance_loc1 and some
2495         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2496         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2497         (__pthread_cond_timedwait, __condvar_tw_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_loc{1,2} and some
2500         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2501         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
2502         #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2503         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2504         Likewise.
2505         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2506         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2507         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2508         Likewise.
2509         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2510         (__pthread_cond_broadcast): Compare %r8 instead of
2511         dep_mutex-cond_*(%rdi) with $-1.
2512         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2513         (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
2514         of oring.
2516 2007-08-13  Ulrich Drepper  <drepper@redhat.com>
2518         * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
2520 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
2522         * allocatestack.c: Include kernel-features.h.
2523         * pthread_create.c: Likewise.
2524         * pthread_mutex_init.c: Likewise.
2525         * init.c: Likewise.
2526         * pthread_cond_timedwait.c: Likewise.
2527         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2528         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2529         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2530         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2531         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2532         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2533         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2534         Likewise.
2535         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2536         Likewise.
2537         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2538         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2539         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2540         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2542 2007-08-12  Jakub Jelinek  <jakub@redhat.com>
2544         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2545         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2546         byte elements.  One of them is the new __shared element.
2547         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2548         adjust names of other padding elements.
2549         * sysdeps/unix/sysv/linux/s390/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/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
2555         Renamed __pad1 element to __shared, adjust names of other padding
2556         elements.
2557         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2558         (pthread_rwlock_t): Likewise.
2559         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
2560         typo.
2562 2007-08-09  Anton Blanchard  <anton@samba.org>
2564         * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
2566 2007-08-12  Ulrich Drepper  <drepper@redhat.com>
2568         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
2569         <kernel-features.h>.
2570         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2572 2007-08-11  Ulrich Drepper  <drepper@redhat.com>
2574         * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
2575         * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
2576         dealing with robust mutexes.
2577         * pthread_mutex_timedlock.c: Likewise.
2578         * pthread_mutex_trylock.c: Likewise.
2579         * pthread_mutex_unlock.c: Likewise.
2580         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2582 2007-08-06  Jakub Jelinek  <jakub@redhat.com>
2584         * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
2585         (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
2586         (PTHREAD_MUTEX_PSHARED): Define.
2587         * pthread_mutex_init.c (__pthread_mutex_init): Set
2588         PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
2589         mutexes.
2590         * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
2591         instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
2592         as second argument to lll_lock.
2593         (LLL_MUTEX_TRYLOCK): Take mutex as argument
2594         instead of its __data.__lock field.
2595         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
2596         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
2597         to lll_robust_lock.
2598         (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
2599         LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
2600         instead of mutex->__data.__kind directly, pass
2601         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
2602         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
2603         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
2604         directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
2605         (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
2606         to lll_timedlock, lll_robust_timedlock, lll_unlock and
2607         lll_futex_timed_wait.  Use PTHREAD_MUTEX_TYPE (mutex) instead
2608         of mutex->__data.__kind directly.
2609         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
2610         PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
2611         lll_robust_timedlock, lll_unlock and lll_futex_timed_wait.  Use
2612         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
2613         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
2614         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
2615         and lll_futex_wake.
2616         * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
2617         PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
2618         Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
2619         directly.
2620         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
2621         Take mutex as argument instead of its __data.__lock field, pass
2622         PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
2623         (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
2624         __data.__lock field.
2625         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
2626         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
2627         to lll_robust_cond_lock.
2628         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
2629         variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
2630         lll_futex_wake.  Don't use lll_futex_requeue if dependent mutex
2631         has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
2632         * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
2633         variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
2634         lll_futex_wait.
2635         * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
2636         variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
2637         lll_futex_wake.
2638         * pthread_cond_timedwait.c (__pthread_cond_wait): Add
2639         pshared variable, pass it to lll_lock, lll_unlock,
2640         lll_futex_timedwait and lll_futex_wake.
2641         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
2642         pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
2643         and lll_futex_wake.
2644         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
2645         lll_futex_wake_unlock): Add private argument, use __lll_private_flag
2646         macro.
2647         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
2648         lll_futex_wake_unlock): Likewise.
2649         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
2650         Likewise.
2651         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
2652         lll_futex_wake_unlock): Likewise.
2653         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
2654         Likewise.
2655         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
2656         lll_futex_wake_unlock): Likewise.
2657         (lll_futex_wake): Fix a typo.
2658         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
2659         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2660         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2661         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2662         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2663         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2664         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2665         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2666         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2667         (__pthread_cond_timedwait): Likewise.
2668         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
2669         (__condvar_cleanup, __pthread_cond_wait): Likewise.
2671 2007-08-05  Jakub Jelinek  <jakub@redhat.com>
2673         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
2674         Don't use CGOTSETUP and CGOTRESTORE macros.
2675         (CGOTSETUP, CGOTRESTORE): Remove.
2676         <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
2677         @local symbol.
2679 2007-08-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2681         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
2682         definitions for private futexes.
2683         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
2684         kernel-features.h and lowlevellock.h.  Use private futexes if
2685         they are available.
2686         (__lll_lock_wait_private, __lll_unlock_wake_private): New.
2687         (__lll_mutex_lock_wait): Rename to
2688         (__lll_lock_wait): ... this.  Don't compile in for libc.so.
2689         (__lll_mutex_timedlock_wait): Rename to ...
2690         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.
2691         Don't compile in for libc.so.
2692         (__lll_mutex_unlock_wake): Rename to ...
2693         (__lll_unlock_wake): ... this.  Don't compile in for libc.so.
2694         (__lll_timedwait_tid): Use __NR_gettimeofday.
2695         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
2696         the header from assembler.  Renamed all lll_mutex_* resp.
2697         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
2698         Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
2699         (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
2700         Define.
2701         (__lll_lock_wait_private): Add prototype.
2702         (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
2703         __lll_robust_timedlock_wait, __lll_unlock_wake_private,
2704         __lll_unlock_wake): Likewise.
2705         (lll_lock): Add private argument.  Call __lll_lock_wait_private
2706         if private is constant LLL_PRIVATE.
2707         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2708         lll_timedlock, lll_robust_timedlock): Add private argument.
2709         (lll_unlock): Add private argument.  Call __lll_unlock_wake_private
2710         if private is constant LLL_PRIVATE.
2711         (lll_robust_unlock, lll_robust_dead): Add private argument.
2712         (lll_lock_t): Remove.
2713         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2714         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2715         lll_cond_wake, lll_cond_broadcast): Remove.
2716         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
2717         kernel-features.h and lowlevellock.h.
2718         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2719         (LOAD_FUTEX_WAIT): Define.
2720         (__lll_robust_mutex_lock_wait): Rename to ...
2721         (__lll_robust_lock_wait): ... this.  Add private argument.
2722         Use LOAD_FUTEX_WAIT macro.
2723         (__lll_robust_mutex_timedlock_wait): Rename to ...
2724         (__lll_robust_timedlock_wait): ... this.    Add private argument.
2725         Use __NR_gettimeofday.  Use LOAD_FUTEX_WAIT macro.
2726         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
2727         lowlevellock.h.
2728         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2729         (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
2730         __lll_mutex_{lock,unlock}_*.
2731         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
2732         lowlevellock.h and pthread-errnos.h.
2733         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
2734         FUTEX_CMP_REQUEUE, EINVAL): Remove.
2735         (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
2736         __lll_mutex_{lock,unlock}_*.
2737         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
2738         lowlevellock.h and pthread-errnos.h.
2739         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
2740         (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
2741         __lll_mutex_{lock,unlock}_*.
2742         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2743         lowlevellock.h.
2744         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
2745         (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
2746         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
2747         (__condvar_tw_cleanup): Likewise.
2748         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2749         lowlevellock.h.
2750         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
2751         (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
2752         __lll_mutex_{lock,unlock}_*.
2753         ( __condvar_w_cleanup): Likewise.
2754         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
2755         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2756         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
2757         lowlevellock.h.
2758         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2759         (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
2760         __lll_mutex_{lock,unlock}_*.
2761         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
2762         lowlevellock.h.
2763         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2764         FUTEX_PRIVATE_FLAG): Remove.
2765         (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
2766         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
2767         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
2768         lowlevellock.h.
2769         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2770         FUTEX_PRIVATE_FLAG): Remove.
2771         (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
2772         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
2773         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
2774         lowlevellock.h.
2775         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2776         (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
2777         __lll_mutex_{lock,unlock}_*.
2778         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
2779         lowlevellock.h.
2780         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2781         (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
2782         __lll_mutex_{lock,unlock}_*.
2783         * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
2784         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
2785         (__new_sem_post): Use standard initial exec code sequences.
2786         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
2787         lowlevellock.h.
2788         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
2789         FUTEX_PRIVATE_FLAG): Remove.
2790         (sem_timedwait): Use __NR_gettimeofday.  Use standard initial
2791         exec code sequences.
2792         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
2793         (__new_sem_trywait): Use standard initial exec code sequences.
2794         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
2795         (__new_sem_wait): Use standard initial exec code sequences.
2797 2007-07-31  Anton Blanchard  <anton@samba.org>
2799         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
2800         Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
2801         atomic_full_barrier.
2803 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
2805         * allocatestack.c (stack_cache_lock): Change type to int.
2806         (get_cached_stack, allocate_stack, __deallocate_stack,
2807         __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
2808         __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
2809         as second argument to lll_lock and lll_unlock macros on
2810         stack_cache_lock.
2811         * pthread_create.c (__find_in_stack_list): Likewise.
2812         (start_thread): Similarly with pd->lock.  Use lll_robust_dead
2813         macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
2814         as second argument.
2815         * descr.h (struct pthread): Change lock and setxid_futex field
2816         type to int.
2817         * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
2818         LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
2819         * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
2820         * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
2821         Likewise.
2822         * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
2823         * pthread_cond_init.c (__pthread_cond_init): Likewise.
2824         * pthreadP.h (__attr_list_lock): Change type to int.
2825         * pthread_attr_init.c (__attr_list_lock): Likewise.
2826         * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
2827         ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
2828         lll_{,un}lock.
2829         * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
2830         also for lll_futex_{wake,wait}.
2831         * pthread_barrier_init.c (pthread_barrier_init): Make iattr
2832         a pointer to const.
2833         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
2834         LLL_SHARED as second argument to lll_{,un}lock.
2835         * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
2836         * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
2837         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
2838         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
2839         Likewise.
2840         * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
2841         as second argument to lll_{,un}lock macros on pd->lock.
2842         * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
2843         * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
2844         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2845         * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
2846         Likewise.
2847         * sysdeps/pthread/createthread.c (do_clone, create_thread):
2848         Likewise.
2849         * pthread_once.c (once_lock): Change type to int.
2850         (__pthread_once): Pass LLL_PRIVATE as second argument to
2851         lll_{,un}lock macros on once_lock.
2852         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
2853         lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
2854         rwlock->__data.__shared as second argument to them and similarly
2855         for lll_futex_w*.
2856         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
2857         Likewise.
2858         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
2859         Likewise.
2860         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
2861         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
2862         * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
2863         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
2864         * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
2865         to lll_{,un}lock macros on __sem_mappings_lock.
2866         * sem_open.c (check_add_mapping): Likewise.
2867         (__sem_mappings_lock): Change type to int.
2868         * semaphoreP.h (__sem_mappings_lock): Likewise.
2869         * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
2870         LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
2871         instead of lll_*mutex_*, pass LLL_SHARED as last
2872         argument.
2873         (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
2874         pass LLL_SHARED as last argument.
2875         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
2876         LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
2877         lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
2878         pass LLL_SHARED as last argument.
2879         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2880         lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
2881         LLL_SHARED as last argument.
2882         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
2883         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
2884         Similarly.
2885         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
2886         __libc_lock_lock_recursive, __libc_lock_unlock,
2887         __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
2888         argument to lll_{,un}lock.
2889         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
2890         _IO_lock_unlock): Likewise.
2891         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
2892         compound literal.
2893         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2894         Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
2895         __fork_lock.
2896         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
2897         free_mem): Likewise.
2898         (__fork_lock): Change type to int.
2899         * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
2900         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
2901         isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
2902         lll_futex_wake.
2903         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
2904         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
2905         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
2906         New function.
2907         (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
2908         pass it through to lll_futex_*wait, only compile in when
2909         IS_IN_libpthread.
2910         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2911         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
2912         argument and pass it through to lll_futex_*wait.
2913         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
2914         lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
2915         lll_robust_*.  Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
2916         inline functions to __lll_* resp. __lll_robust_*.
2917         (LLL_MUTEX_LOCK_INITIALIZER): Remove.
2918         (lll_mutex_dead): Add private argument.
2919         (__lll_lock_wait_private): New prototype.
2920         (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
2921         __lll_robust_lock_timedwait): Add private argument to prototypes.
2922         (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
2923         call __lll_lock_wait_private, otherwise pass private to
2924         __lll_lock_wait.
2925         (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
2926         __lll_robust_timedlock): Add private argument, pass it to
2927         __lll_*wait functions.
2928         (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
2929         call __lll_unlock_wake_private, otherwise pass private to
2930         __lll_unlock_wake.
2931         (__lll_robust_unlock): Add private argument, pass it to
2932         __lll_robust_unlock_wake.
2933         (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
2934         lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
2935         argument, pass it through to __lll_* inline function.
2936         (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
2937         (lll_lock_t): Remove.
2938         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2939         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2940         lll_cond_wake, lll_cond_broadcast): Remove.
2941         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2942         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2943         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2944         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2945         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
2946         the header from assembler.  Renamed all lll_mutex_* resp.
2947         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
2948         (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
2949         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
2950         (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
2951         LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
2952         (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
2953         __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
2954         Remove prototype.
2955         (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
2956         (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
2957         rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
2958         (lll_trylock): Likewise, use __lll_trylock_asm, pass
2959         MULTIPLE_THREADS_OFFSET as another asm operand.
2960         (lll_lock): Add private argument, use __lll_lock_asm_start, pass
2961         MULTIPLE_THREADS_OFFSET as last asm operand, call
2962         __lll_lock_wait_private if private is constant LLL_PRIVATE,
2963         otherwise pass private as another argument to __lll_lock_wait.
2964         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2965         lll_timedlock, lll_robust_timedlock): Add private argument, pass
2966         private as another argument to __lll_*lock_wait call.
2967         (lll_unlock): Add private argument, use __lll_unlock_asm, pass
2968         MULTIPLE_THREADS_OFFSET as another asm operand, call
2969         __lll_unlock_wake_private if private is constant LLL_PRIVATE,
2970         otherwise pass private as another argument to __lll_unlock_wake.
2971         (lll_robust_unlock): Add private argument, pass private as another
2972         argument to __lll_unlock_wake.
2973         (lll_robust_dead): Add private argument, use __lll_private_flag
2974         macro.
2975         (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
2976         LLL_MUTEX_LOCK_INITIALIZER.
2977         (lll_lock_t): Remove.
2978         (LLL_LOCK_INITIALIZER_WAITERS): Define.
2979         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
2980         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
2981         lll_cond_wake, lll_cond_broadcast): Remove.
2982         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2983         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
2984         2007-05-2{3,9} changes.
2985         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
2986         kernel-features.h and lowlevellock.h.
2987         (LOAD_PRIVATE_FUTEX_WAIT): Define.
2988         (LOAD_FUTEX_WAIT): Rewritten.
2989         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
2990         define.
2991         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
2992         (__lll_mutex_lock_wait): Rename to ...
2993         (__lll_lock_wait): ... this.  Take futex addr from %edx instead of
2994         %ecx, %ecx is now private argument.  Don't compile in for libc.so.
2995         (__lll_mutex_timedlock_wait): Rename to ...
2996         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.  %esi
2997         contains private argument.  Don't compile in for libc.so.
2998         (__lll_mutex_unlock_wake): Rename to ...
2999         (__lll_unlock_wake): ... this.  %ecx contains private argument.
3000         Don't compile in for libc.so.
3001         (__lll_timedwait_tid): Use __NR_gettimeofday.
3002         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
3003         kernel-features.h and lowlevellock.h.
3004         (LOAD_FUTEX_WAIT): Define.
3005         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
3006         define.
3007         (__lll_robust_mutex_lock_wait): Rename to ...
3008         (__lll_robust_lock_wait): ... this.  Futex addr is now in %edx
3009         argument, %ecx argument contains private.  Use LOAD_FUTEX_WAIT
3010         macro.
3011         (__lll_robust_mutex_timedlock_wait): Rename to ...
3012         (__lll_robust_timedlock_wait): ... this.  Use __NR_gettimeofday.
3013         %esi argument contains private, use LOAD_FUTEX_WAIT macro.
3014         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
3015         lowlevellock.h.
3016         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3017         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
3018         PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
3019         __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
3020         to __lll_lock_wait in %edx.
3021         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
3022         Include lowlevellock.h and pthread-errnos.h.
3023         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3024         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
3025         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
3026         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3027         pass LLL_SHARED in %ecx to both __lll_lock_wait and
3028         __lll_unlock_wake.
3029         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
3030         Include lowlevellock.h and pthread-errnos.h.
3031         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
3032         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
3033         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
3034         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3035         pass LLL_SHARED in %ecx to both __lll_lock_wait and
3036         __lll_unlock_wake.
3037         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
3038         Include lowlevellock.h.
3039         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3040         Don't define.
3041         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
3042         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3043         pass LLL_SHARED in %ecx to both __lll_lock_wait and
3044         __lll_unlock_wake.  Use __NR_gettimeofday.
3045         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
3046         Include lowlevellock.h.
3047         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3048         (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
3049         to __lll_*, pass cond_lock address in %edx rather than %ecx to
3050         __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
3051         and __lll_unlock_wake.
3052         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
3053         Include lowlevellock.h.
3054         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3055         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
3056         MUTEX(%ebx) address in %edx rather than %ecx to
3057         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
3058         and __lll_unlock_wake.  Move return value from %ecx to %edx
3059         register.
3060         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3061         Include lowlevellock.h.
3062         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3063         Don't define.
3064         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3065         MUTEX(%ebp) address in %edx rather than %ecx to
3066         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
3067         and __lll_unlock_wake.  Move return value from %ecx to %edx
3068         register.  Use __NR_gettimeofday.
3069         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3070         Include lowlevellock.h.
3071         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3072         Don't define.
3073         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3074         MUTEX(%ebp) address in %edx rather than %ecx to
3075         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
3076         and __lll_unlock_wake.  Move return value from %ecx to %edx
3077         register.  Use __NR_gettimeofday.
3078         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
3079         Include lowlevellock.h.
3080         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3081         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
3082         MUTEX(%edi) address in %edx rather than %ecx to
3083         __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
3084         and __lll_unlock_wake.
3085         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
3086         Include lowlevellock.h.
3087         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3088         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3089         MUTEX(%ebx) address in %edx rather than %ecx to
3090         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
3091         and __lll_unlock_wake.  Move return value from %ecx to %edx
3092         register.
3093         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
3094         lowlevellock.h.
3095         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
3096         define.
3097         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
3098         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
3099         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
3100         lowlevellock.h.
3101         (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
3102         (sem_timedwait): Use __NR_gettimeofday.
3103         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
3104         lowlevellock.h.
3105         (LOCK): Don't define.
3106         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
3107         lowlevellock.h.
3108         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3109         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
3110         are waiters.
3111         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
3112         2007-05-2{3,9} changes.
3113         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
3114         kernel-features.h and lowlevellock.h.
3115         (LOAD_PRIVATE_FUTEX_WAIT): Define.
3116         (LOAD_FUTEX_WAIT): Rewritten.
3117         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
3118         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
3119         (__lll_mutex_lock_wait): Rename to ...
3120         (__lll_lock_wait): ... this.  %esi is now private argument.
3121         Don't compile in for libc.so.
3122         (__lll_mutex_timedlock_wait): Rename to ...
3123         (__lll_timedlock_wait): ... this.  %esi contains private argument.
3124         Don't compile in for libc.so.
3125         (__lll_mutex_unlock_wake): Rename to ...
3126         (__lll_unlock_wake): ... this.  %esi contains private argument.
3127         Don't compile in for libc.so.
3128         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
3129         kernel-features.h and lowlevellock.h.
3130         (LOAD_FUTEX_WAIT): Define.
3131         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
3132         (__lll_robust_mutex_lock_wait): Rename to ...
3133         (__lll_robust_lock_wait): ... this.  %esi argument contains private.
3134         Use LOAD_FUTEX_WAIT macro.
3135         (__lll_robust_mutex_timedlock_wait): Rename to ...
3136         (__lll_robust_timedlock_wait): ... this. %esi argument contains
3137         private, use LOAD_FUTEX_WAIT macro.
3138         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
3139         lowlevellock.h.
3140         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3141         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
3142         PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
3143         __lll_lock_wait and __lll_unlock_wake.
3144         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
3145         Include lowlevellock.h and pthread-errnos.h.
3146         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3147         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
3148         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
3149         pass LLL_SHARED in %esi to both __lll_lock_wait and
3150         __lll_unlock_wake.
3151         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
3152         Include lowlevellock.h and pthread-errnos.h.
3153         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
3154         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
3155         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
3156         pass LLL_SHARED in %esi to both __lll_lock_wait and
3157         __lll_unlock_wake.
3158         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
3159         Include lowlevellock.h.
3160         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3161         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
3162         pass LLL_SHARED in %esi to both __lll_lock_wait and
3163         __lll_unlock_wake.
3164         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
3165         Include lowlevellock.h.
3166         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3167         (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
3168         to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
3169         and __lll_unlock_wake.
3170         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
3171         Include lowlevellock.h.
3172         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3173         Don't define.
3174         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
3175         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3176         and __lll_unlock_wake.
3177         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3178         Include lowlevellock.h.
3179         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3180         Don't define.
3181         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3182         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3183         and __lll_unlock_wake.
3184         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3185         Include lowlevellock.h.
3186         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3187         Don't define.
3188         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3189         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3190         and __lll_unlock_wake.
3191         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
3192         Include lowlevellock.h.
3193         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3194         Don't define.
3195         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
3196         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3197         and __lll_unlock_wake.
3198         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
3199         Include lowlevellock.h.
3200         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3201         Don't define.
3202         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3203         pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
3204         and __lll_unlock_wake.
3205         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
3206         lowlevellock.h.
3207         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
3208         define.
3209         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
3210         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
3211         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
3212         lowlevellock.h.
3213         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3214         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
3215         lowlevellock.h.
3216         (LOCK): Don't define.
3217         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
3218         lowlevellock.h.
3219         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3220         * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
3221         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
3222         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
3223         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
3224         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
3225         (__lll_lock_wait_private): New function.
3226         (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
3227         it to lll_futex_*wait.  Don't compile in for libc.so.
3228         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
3229         Remove.
3230         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
3231         (struct sparc_pthread_barrier): Remove.
3232         (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
3233         struct sparc_pthread_barrier.  Pass
3234         ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
3235         and lll_futex_wait macros.
3236         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3237         Remove.
3238         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3239         Include sparc pthread_barrier_wait.c instead of generic one.
3241 2007-07-30  Jakub Jelinek  <jakub@redhat.com>
3243         * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
3245         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
3246         (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
3247         %ecx.
3248         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
3249         (pthread_rwlock_timedwrlock): Likewise.
3250         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
3251         (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
3253 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
3255         * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
3257 2007-07-26  Jakub Jelinek  <jakub@redhat.com>
3259         * tst-locale2.c (useless): Add return statement.
3261 2007-07-24  Jakub Jelinek  <jakub@redhat.com>
3263         * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
3264         lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
3265         * pthread_create.c (start_thread): Likewise.
3266         * init.c (sighandler_setxid): Likewise.
3267         * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3268         * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3269         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3270         * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3271         * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3272         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3273         * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3274         * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3275         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
3276         Likewise.
3277         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
3278         Likewise.
3279         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
3280         Likewise.
3281         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
3282         __rtld_notify): Likewise.
3283         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
3284         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
3285         __pthread_once): Likewise.
3286         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
3287         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3288         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3289         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3290         (lll_futex_wait): Add private argument, define as wrapper around
3291         lll_futex_timed_wait.
3292         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3293         use __lll_private_flag macro.
3294         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3295         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3296         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
3297         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3298         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3299         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3300         (lll_futex_wait): Add private argument, define as wrapper around
3301         lll_futex_timed_wait.
3302         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3303         use __lll_private_flag macro.
3304         (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
3305         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3306         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
3307         Define.
3308         (lll_futex_timed_wait, lll_futex_wake): Use it.
3309         (lll_private_futex_wait, lll_private_futex_timed_wait,
3310         lll_private_futex_wake): Removed.
3311         * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
3312         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3313         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3314         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3315         (lll_futex_wait): Add private argument, define as wrapper around
3316         lll_futex_timed_wait.
3317         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3318         use __lll_private_flag macro.
3319         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3320         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3321         to lll_futex_*.
3322         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3323         (lll_private_futex_wait, lll_private_futex_timed_wait,
3324         lll_private_futex_wake): Removed.
3325         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
3326         Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
3327         (lll_private_futex_wait, lll_private_futex_timed_wait,
3328         lll_private_futex_wake): Removed.
3329         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
3330         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3331         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3332         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3333         (lll_futex_wait): Add private argument, define as wrapper around
3334         lll_futex_timed_wait.
3335         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3336         use __lll_private_flag macro.
3337         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3338         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3339         to lll_futex_*.
3340         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
3341         Define.
3342         (lll_futex_timed_wait, lll_futex_wake): Use it.
3343         (lll_private_futex_wait, lll_private_futex_timed_wait,
3344         lll_private_futex_wake): Removed.
3346 2007-07-27  Jakub Jelinek  <jakub@redhat.com>
3348         * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
3349         of the structure for sparc32.
3351 2007-07-26  Aurelien Jarno  <aurelien@aurel32.net>
3353         * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
3355 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
3357         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3358         code used when private futexes are assumed.
3359         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3360         Likewise.
3362 2007-07-23  Jakub Jelinek  <jakub@redhat.com>
3364         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3365         (__lll_private_flag): Define.
3366         (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
3367         (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
3368         __lll_private_flag.
3369         (lll_private_futex_wait, lll_private_futex_timedwait,
3370         lll_private_futex_wake): Define as wrapper around non-_private
3371         macros.
3372         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3373         (__lll_private_flag): Define.
3374         (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
3375         (lll_private_futex_wait, lll_private_futex_timedwait,
3376         lll_private_futex_wake): Define as wrapper around non-_private
3377         macros.
3379 2007-07-10  Steven Munroe  <sjmunroe@us.ibm.com>
3381         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
3382         parameter to lll_futex_wait call.
3383         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
3385         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3386         Replace lll_futex_wait with lll_private_futex_wait.
3387         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3388         Add LLL_SHARED parameter to lll_futex_wake().
3390         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
3391         LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
3392         lll_private_futex_wake.
3393         (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
3394         bit from private parm before syscall.
3395         (lll_futex_timed_wait): Likewise.
3396         (lll_futex_wake): Likewise.
3397         (lll_futex_wake_unlock): Likewise.
3398         (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
3399         (lll_robust_mutex_unlock): Likewise.
3400         (lll_mutex_unlock_force): Likewise.
3401         (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
3403 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
3405         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3406         compilation when unconditionally using private futexes.
3407         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3408         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3409         Likewise.
3410         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3411         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3413 2007-07-17  Jakub Jelinek  <jakub@redhat.com>
3415         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
3416         Define.
3418 2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3420         * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
3421         kernel-features.h.
3423 2007-05-16  Roland McGrath  <roland@redhat.com>
3425         * init.c (__nptl_initial_report_events): New variable.
3426         (__pthread_initialize_minimal_internal): Initialize pd->report_events
3427         to that.
3429 2007-06-22  Jakub Jelinek  <jakub@redhat.com>
3431         * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
3432         cpusetsize if pthread_getaffinity_np failed with ENOSYS.
3434 2007-06-19  Ulrich Drepper  <drepper@redhat.com>
3436         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
3437         implementation.
3439 2007-06-18  Ulrich Drepper  <drepper@redhat.com>
3441         * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
3442         * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
3443         * pthread_mutex_timedlock.c: Likewise.
3444         * pthread_mutex_trylock.c: Likewise.
3445         * pthread_mutex_unlock.c: Likewise.
3447 2007-06-17  Andreas Schwab  <schwab@suse.de>
3449         * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
3450         sections.
3452 2007-06-17  Ulrich Drepper  <drepper@redhat.com>
3454         * allocatestack.c (allocate_stack): Make code compile if
3455         __ASSUME_PRIVATE_FUTEX is set.
3457 2007-06-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3459         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
3460         (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
3461         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
3462         (__pthread_rwlock_wrlock): Likewise.
3463         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
3464         (pthread_rwlock_timedrdlock): Likewise.
3465         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
3466         (pthread_rwlock_timedwrlock): Likewise.
3467         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
3468         (__pthread_rwlock_unlock): Likewise.
3470 2007-06-10  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3472         * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
3473         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
3474         Split __flags into __flags, __shared, __pad1 and __pad2.
3475         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
3476         futexes if they are available.
3477         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
3478         in libc-lowlevellock.S allow using private futexes.
3479         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
3480         FUTEX_PRIVATE_FLAG.  Add additional parameter to lll_futex_wait,
3481         lll_futex_timed_wait and lll_futex_wake.  Change lll_futex_wait
3482         to call lll_futex_timed_wait.  Add lll_private_futex_wait,
3483         lll_private_futex_timed_wait and lll_private_futex_wake.
3484         (lll_robust_mutex_unlock): Fix typo.
3485         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
3486         field in futex command setup.
3487         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
3488         COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
3489         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
3490         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
3491         if they are available.  Remove clear_once_control.
3492         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
3493         futexes if they are available.
3494         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3495         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3496         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
3497         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3498         * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
3499         Wake only when there are waiters.
3500         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
3501         support.  Indicate that there are waiters.  Remove unnecessary
3502         extra cancellation test.
3503         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.  Removed
3504         left-over duplication of __sem_wait_cleanup.
3506 2007-06-07  Ulrich Drepper  <drepper@redhat.com>
3508         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
3509         parameter to lll_futex_wait, lll_futex_timed_wait, and
3510         lll_futex_wake.  Change lll_futex_wait to call lll_futex_timed_wait.
3511         Add lll_private_futex_wait, lll_private_futex_timed_wait, and
3512         lll_private_futex_wake.
3513         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3514         * allocatestack.c: Adjust use of lll_futex_* macros.
3515         * init.c: Likewise.
3516         * lowlevellock.h: Likewise.
3517         * pthread_barrier_wait.c: Likewise.
3518         * pthread_cond_broadcast.c: Likewise.
3519         * pthread_cond_destroy.c: Likewise.
3520         * pthread_cond_signal.c: Likewise.
3521         * pthread_cond_timedwait.c: Likewise.
3522         * pthread_cond_wait.c: Likewise.
3523         * pthread_create.c: Likewise.
3524         * pthread_mutex_lock.c: Likewise.
3525         * pthread_mutex_setprioceiling.c: Likewise.
3526         * pthread_mutex_timedlock.c: Likewise.
3527         * pthread_mutex_unlock.c: Likewise.
3528         * pthread_rwlock_timedrdlock.c: Likewise.
3529         * pthread_rwlock_timedwrlock.c: Likewise.
3530         * pthread_rwlock_unlock.c: Likewise.
3531         * sysdeps/alpha/tls.h: Likewise.
3532         * sysdeps/i386/tls.h: Likewise.
3533         * sysdeps/ia64/tls.h: Likewise.
3534         * sysdeps/powerpc/tls.h: Likewise.
3535         * sysdeps/pthread/aio_misc.h: Likewise.
3536         * sysdeps/pthread/gai_misc.h: Likewise.
3537         * sysdeps/s390/tls.h: Likewise.
3538         * sysdeps/sh/tls.h: Likewise.
3539         * sysdeps/sparc/tls.h: Likewise.
3540         * sysdeps/unix/sysv/linux/fork.c: Likewise.
3541         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
3542         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
3543         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
3544         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
3545         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3546         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
3547         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3548         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
3549         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
3550         Likewise.
3551         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
3552         * sysdeps/x86_64/tls.h: Likewise.
3554 2007-05-29  Ulrich Drepper  <drepper@redhat.com>
3556         * pthread_getattr_np.c: No need to install a cancellation handler,
3557         this is no cancellation point.
3558         * pthread_getschedparam.c: Likewise.
3559         * pthread_setschedparam.c: Likewise.
3560         * pthread_setschedprio.c: Likewise.
3561         * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
3562         lll_unlock_wake_cb.
3563         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3564         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3565         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3566         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3567         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3568         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3569         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
3570         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
3571         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3572         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
3573         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3574         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3576         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
3577         whether there are more than one thread makes no sense here since
3578         we only call the slow path if the locks are taken.
3579         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
3581         * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
3582         COND_NWAITERS_SHIFT.
3583         * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
3584         COND_CLOCK_BITS.
3585         * pthread_cond_init.c: Likewise.
3586         * pthread_cond_timedwait.c: Likewise.
3587         * pthread_cond_wait.c: Likewise.
3588         * pthread_condattr_getclock.c: Likewise.
3589         * pthread_condattr_setclock.c: Likewise.
3590         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
3591         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3592         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3593         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3594         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3596 2007-05-28  Jakub Jelinek  <jakub@redhat.com>
3598         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
3599         unistd.h.
3601         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
3602         insn suffix.
3603         (THREAD_GSCOPE_GET_FLAG): Remove.
3604         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
3605         * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
3606         changes.
3607         * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
3608         (THREAD_GSCOPE_GET_FLAG): Remove.
3609         (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
3610         instead of THREAD_GSCOPE_GET_FLAG.
3611         (THREAD_GSCOPE_SET_FLAG): Likewise.  Add atomic_write_barrier after
3612         it.
3613         * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3614         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3615         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3616         THREAD_GSCOPE_WAIT): Define.
3617         * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3618         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3619         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3620         THREAD_GSCOPE_WAIT): Define.
3621         * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3622         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3623         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3624         THREAD_GSCOPE_WAIT): Define.
3625         * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3626         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3627         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3628         THREAD_GSCOPE_WAIT): Define.
3630 2007-05-24  Richard Henderson  <rth@redhat.com>
3632         * descr.h (struct pthread): Add header.gscope_flag.
3633         * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3634         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3635         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3636         THREAD_GSCOPE_WAIT): Define.
3638 2007-05-27  Ulrich Drepper  <drepper@redhat.com>
3640         * init.c: Make it compile with older kernel headers.
3642         * tst-initializers1.c: Show through exit code which test failed.
3644         * pthread_rwlock_init.c: Also initialize __shared field.
3645         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
3646         element in rwlock structure into four byte elements.  One of them is
3647         the new __shared element.
3648         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
3649         Likewise.
3650         [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
3651         __shared, adjust names of other padding elements.
3652         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3653         * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
3654         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
3655         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
3656         FUTEX_PRIVATE_FLAG.
3657         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
3658         futex to use private operations if possible.
3659         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3660         Likewise.
3661         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3662         Likewise.
3663         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3664         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3665         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3666         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3667         Likewise.
3668         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3669         Likewise.
3670         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3671         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3673 2007-05-26  Ulrich Drepper  <drepper@redhat.com>
3675         * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
3676         * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
3677         * pthread_rwlock_timedrdlock.c: Likewise.
3678         * pthread_rwlock_tryrdlock.c: Likewise.
3680         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
3681         optimization.
3683         * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
3684         * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
3685         duplication of __sem_wait_cleanup.
3687         * allocatestack.c: Revert last change.
3688         * init.c: Likewise.
3689         * sysdeps/i386/tls.h: Likewise.
3690         * sysdeps/x86_64/tls.h: Likewise.
3691         * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
3692         header structure.
3693         * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
3695         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
3696         Add private field.
3697         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
3698         * pthread_barrier_init.c: Set private flag if pshared and private
3699         futexes are supported.
3700         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
3701         private field in futex command setup.
3702         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3704 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
3706         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
3707         support.
3708         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3709         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3710         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3711         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3712         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3714         * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
3715         * sem_init.c (__new_sem_init): Rewrite to initialize all three
3716         fields in the structure.
3717         (__old_sem_init): New function.
3718         * sem_open.c: Initialize all fields of the structure.
3719         * sem_getvalue.c: Adjust for renamed element.
3720         * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
3721         (gen-as-const-headers): Add structsem.sym.
3722         * sysdeps/unix/sysv/linux/structsem.sym: New file.
3723         * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
3724         struct new_sem.  Add struct old_sem.
3725         * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
3726         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
3727         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3728         * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
3729         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3730         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3731         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3732         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3733         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3734         * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
3735         * tst-sem10.c: New file.
3736         * tst-sem11.c: New file.
3737         * tst-sem12.c: New file.
3738         * tst-typesizes.c: Test struct new_sem and struct old_sem instead
3739         of struct sem.
3741 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
3742             Jakub Jelinek  <jakub@redhat.com>
3744         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3745         Move __pthread_enable_asynccancel right before futex syscall.
3746         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
3747         Likewise.
3749 2007-05-24  Jakub Jelinek  <jakub@redhat.com>
3751         * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
3752         THREAD_COPY_PRIVATE_FUTEX): Define.
3753         * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
3754         THREAD_COPY_PRIVATE_FUTEX): Define.
3755         * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
3756         * init.c (__pthread_initialize_minimal_internal): Use
3757         THREAD_SET_PRIVATE_FUTEX.
3759         * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
3760         (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
3761         THREAD_GSCOPE_FLAG_WAIT): Define.
3762         (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
3763         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
3764         * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
3765         PTR_DEMANGLE.
3766         (THREAD_GSCOPE_GET_FLAG): Define.
3767         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
3768         * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
3769         instead of ->header.gscope_flag directly.
3771 2007-05-23  Ulrich Drepper  <drepper@redhat.com>
3773         * init.c (__pthread_initialize_minimal_internal): Check whether
3774         private futexes are available.
3775         * allocatestack.c (allocate_stack): Copy private_futex field from
3776         current thread into the new stack.
3777         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
3778         futexes if they are available.
3779         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
3780         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
3781         in libc-lowlevellock.S allow using private futexes.
3782         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3783         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
3784         FUTEX_PRIVATE_FLAG.
3785         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3786         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
3787         if they are available.
3788         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
3789         * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
3790         * sysdeps/i386/tcb-offsets.sym: Likewise.
3791         * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
3792         * sysdeps/i386/tls.h (tcbhead_t): Likewise.
3794 2007-05-21  Ulrich Drepper  <drepper@redhat.com>
3796         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3797         Remove ptr_wait_lookup_done again.
3798         * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
3799         (__pthread_initialize_minimal_internal): Initialize
3800         _dl_wait_lookup_done pointer in _rtld_global directly.
3801         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3802         Remove code to code _dl_wait_lookup_done.
3803         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
3804         encrypted for now.
3806 2007-05-21  Jakub Jelinek  <jakub@redhat.com>
3808         * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
3809         pthread_mutex_init failed with ENOTSUP.
3811 2007-05-19  Ulrich Drepper  <drepper@redhat.com>
3813         * allocatestack.c (__wait_lookup_done): New function.
3814         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3815         Add ptr_wait_lookup_done.
3816         * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
3817         * pthreadP.h: Declare __wait_lookup_done.
3818         * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
3819         Define macros to implement reference handling of global scope.
3820         * sysdeps/x86_64/tls.h: Likewise.
3821         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
3822         Initialize GL(dl_wait_lookup_done).
3824 2007-05-17  Ulrich Drepper  <drepper@redhat.com>
3826         [BZ #4512]
3827         * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
3828         is detected.
3829         * pthread_mutex_timedlock.c: Likewise.
3830         * pthread_mutex_trylock.c: Likewise.
3831         Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
3833         * Makefile (tests): Add tst-robust9 and tst-robustpi9.
3834         * tst-robust9.c: New file.
3835         * tst-robustpi9.c: New file.
3837         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
3838         unnecessary extra cancellation test.
3840 2007-05-14  Ulrich Drepper  <drepper@redhat.com>
3842         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
3843         extra cancellation test.
3844         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3846 2007-05-10  Ulrich Drepper  <drepper@redhat.com>
3848         * descr.h (struct pthread): Rearrange members to fill hole in
3849         64-bit layout.
3851         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
3852         (__pthread_setaffinity_new): If syscall was successful and
3853         RESET_VGETCPU_CACHE is defined, use it before returning.
3854         * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
3856 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
3858         [BZ #4455]
3859         * tst-align2.c: Include stackinfo.h.
3860         * tst-getpid1.c: Likewise.
3862 2007-05-02  Carlos O'Donell  <carlos@systemhalted.org>
3864         [BZ #4455]
3865         * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
3866         * tst-getpid1.c (do_test): Likewise.
3868         [BZ #4456]
3869         * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
3870         (allocate_stack): Likewise.
3872 2007-05-07  Ulrich Drepper  <drepper@redhat.com>
3874         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3875         (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
3876         (__lll_robust_timedlock_wait): Likewise.
3877         Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
3879 2007-05-06  Mike Frysinger  <vapier@gentoo.org>
3881         [BZ #4465]
3882         * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
3883         * tst-cancel4.c (tf_fdatasync): New test.
3885 2007-04-27  Ulrich Drepper  <drepper@redhat.com>
3887         [BZ #4392]
3888         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
3889         check mutexes like normal mutexes.
3891         [BZ #4306]
3892         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
3893         Initialize the whole sigevent structure to appease valgrind.
3895 2007-04-25  Ulrich Drepper  <drepper@redhat.com>
3897         * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
3898         * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
3900 2007-04-06  Ulrich Drepper  <drepper@redhat.com>
3902         * tst-locale1.c: Avoid warnings.
3903         * tst-locale2.c: Likewise.
3905 2007-03-19  Steven Munroe  <sjmunroe@us.ibm.com>
3907         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3908         (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
3910 2007-03-16  Jakub Jelinek  <jakub@redhat.com>
3912         * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
3913         __extern_always_inline where appropriate.
3914         * sysdeps/pthread/pthread.h: Likewise.
3916 2007-03-13  Richard Henderson  <rth@redhat.com>
3918         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
3919         separate cfi regions for the two subsections.
3921 2007-02-25  Ulrich Drepper  <drepper@redhat.com>
3923         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
3924         new thread, don't just decrement it.
3925         Patch by Suzuki K P <suzuki@in.ibm.com>.
3927 2007-02-21  Ulrich Drepper  <drepper@redhat.com>
3929         * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
3930         PTHFCT_CALL definition.
3932 2007-02-18  Ulrich Drepper  <drepper@redhat.com>
3934         * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
3935         available, don't use it.
3937 2007-02-09  Jakub Jelinek  <jakub@redhat.com>
3939         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3940         (__lll_mutex_timedlock_wait): Use correct pointer when we don't
3941         call into the kernel to delay.
3943 2007-01-18  Ulrich Drepper  <drepper@redhat.com>
3945         * tst-initializers1.c: We want to test the initializers as seen
3946         outside of libc, so undefined _LIBC.
3948         * pthread_join.c (cleanup): Avoid warning.
3950 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
3952         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3953         (__lll_timedwait_tid): Add unwind info.
3955         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
3956         function table, mangle the pointers.
3957         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
3958         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
3959         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
3960         demangle pointers before use.
3961         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
3962         demangle pointer.
3963         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
3964         * sysdeps/pthread/setxid.h: Likewise.
3966 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
3968         * tst-rwlock7.c: Show some more information in case of correct
3969         behavior.
3971 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
3973         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3974         (lll_futex_timed_wait): Undo part of last change, don't negate
3975         return value.
3977 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
3979         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
3980         FUTEX_CMP_REQUEUE and lll_futex_requeue.
3982 2006-12-28  David S. Miller  <davem@davemloft.net>
3984         * shlib-versions: Fix sparc64 linux target specification.
3986 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
3988         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3989         Adjust include path for pthread_barrier_wait.c move.
3991 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
3993         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
3994         tid isn't reread from pd->tid in between ESRCH test and the syscall.
3996 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
3998         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
3999         6 argument cancellable syscalls.
4000         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
4001         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
4002         6 argument cancellable syscalls.
4003         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
4005 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
4007         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
4008         (__rtld_mrlock_initialize): Add missing closing parenthesis.
4010 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
4012         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
4013         __sync_lock_release instead of __sync_lock_release_si.
4015 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
4017         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
4018         Define.
4019         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
4020         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
4021         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4022         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4023         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4024         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4025         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4026         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4027         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4028         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4029         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4031 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
4033         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
4034         * pthread_barrier_wait.c: ...here.
4035         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
4036         * pthread_cond_broadcast.c: ...here.
4037         * sysdeps/pthread/pthread_cond_signal.c: Move to...
4038         * pthread_cond_signal.c: ...here.
4039         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
4040         * pthread_cond_timedwait.c: ...here.
4041         * sysdeps/pthread/pthread_cond_wait.c: Move to...
4042         * pthread_cond_wait.c: ...here.
4043         * sysdeps/pthread/pthread_once.c: Move to...
4044         * pthread_once.c: ...here.
4045         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
4046         * pthread_rwlock_rdlock.c: ...here.
4047         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
4048         * pthread_rwlock_timedrdlock.c: ...here.
4049         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
4050         * pthread_rwlock_timedwrlock.c: ...here.
4051         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
4052         * pthread_rwlock_unlock.c: ...here.
4053         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
4054         * pthread_rwlock_wrlock.c: ...here.
4055         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
4056         * pthread_spin_destroy.c: ...here.
4057         * sysdeps/pthread/pthread_spin_init.c: Move to...
4058         * pthread_spin_init.c: ...here.
4059         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
4060         * pthread_spin_unlock.c: ...here.
4061         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
4062         * pthread_getcpuclockid.c: ...here.
4064         * init.c: USE_TLS support is now always enabled.
4065         * tst-tls5.h: Likewise.
4066         * sysdeps/alpha/tls.h: Likewise.
4067         * sysdeps/i386/tls.h: Likewise.
4068         * sysdeps/ia64/tls.h: Likewise.
4069         * sysdeps/powerpc/tls.h: Likewise.
4070         * sysdeps/s390/tls.h: Likewise.
4071         * sysdeps/sh/tls.h: Likewise.
4072         * sysdeps/sparc/tls.h: Likewise.
4073         * sysdeps/x86_64/tls.h: Likewise.
4075 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
4077         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
4078         __rtld_mrlock_change): Update oldval if atomic compare and exchange
4079         failed.
4081         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4082         Define to THREAD_SELF->header.multiple_threads.
4083         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
4084         Likewise.
4085         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
4086         Likewise.
4087         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
4088         (SINGLE_THREAD_P): Likewise.
4089         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
4090         (SINGLE_THREAD_P): Likewise.
4091         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4092         (SINGLE_THREAD_P): Likewise.
4093         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
4094         (SINGLE_THREAD_P): Likewise.
4095         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
4096         Likewise.
4097         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
4098         (SINGLE_THREAD_P): Likewise.
4099         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
4100         (SINGLE_THREAD_P): Likewise.
4101         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
4102         Likewise.
4104 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
4106         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
4107         by default rather than 2_3_3.
4109 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
4111         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
4112         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
4113         atomic_* instead of catomic_* macros.
4115 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
4117         [BZ #3285]
4118         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
4119         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
4120         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4121         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4122         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4123         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
4124         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4125         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4126         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4127         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
4128         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4129         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4130         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4132 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
4134         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
4135         cancelable syscalls with six parameters.
4137         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
4138         operations instead of atomic_*.
4140 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
4142         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
4144 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
4146         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
4147         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
4148         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
4149         New file.
4150         * pthread_attr_setstack.c: Allow overwriting the version number of the
4151         new symbol.
4152         * pthread_attr_setstacksize.c: Likewise.
4153         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
4154         it.
4155         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
4156         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
4158 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
4160         [BZ #3251]
4161         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
4162         Patch by Petr Baudis.
4164 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
4166         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
4168         * tst-cancel2.c (tf): Loop as long as something was written.
4170 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4172         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
4173         mutexes wake all mutexes.
4174         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
4175         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
4176         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4178 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
4180         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
4181         to guarantee the thread is always canceled.
4183 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
4185         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
4186         Include stdlib.h.
4187         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
4188         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
4189         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4190         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4191         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4193 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
4195         [BZ #3123]
4196         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
4197         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
4198         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4199         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4200         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4201         * Makefile (tests): Add tst-cond22.
4202         * tst-cond22.c: New file.
4204 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
4206         [BZ #3124]
4207         * descr.h (struct pthread): Add parent_cancelhandling.
4208         * sysdeps/pthread/createthread.c (create_thread): Pass parent
4209         cancelhandling value to child.
4210         * pthread_create.c (start_thread): If parent thread was canceled
4211         reset the SIGCANCEL mask.
4212         * Makefile (tests): Add tst-cancel25.
4213         * tst-cancel25.c: New file.
4215 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
4216             Ulrich Drepper  <drepper@redhat.com>
4218         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
4219         counterp if it is already zero.
4220         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
4222 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
4223             Roland McGrath  <roland@redhat.com>
4225         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4226         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4227         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
4228         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4229         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4230         lll_robust_mutex_timedlock, lll_mutex_unlock,
4231         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4232         Add _L_*_ symbols around the subsection.
4233         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
4234         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
4236 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
4237             Roland McGrath  <roland@redhat.com>
4239         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4240         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4241         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
4242         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4243         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4244         lll_robust_mutex_timedlock, lll_mutex_unlock,
4245         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4246         Add _L_*_ symbols around the subsection.
4247         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
4248         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
4250 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
4252         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
4253         change because it can disturb too much existing code.  If real hard
4254         reader preference is needed we'll introduce another type.
4255         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4256         (pthread_rwlock_timedwrlock): Likewise.
4257         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4258         Likewise.
4260 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
4262         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
4263         reader preference.
4264         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4265         (pthread_rwlock_timedwrlock): Likewise.
4266         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4267         Likewise.
4269 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
4271         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
4272         Only define ifdef SHARED.
4274 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
4276         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
4277         (free_stacks): ...here.
4278         (__free_stack_cache): New function.
4279         * pthreadP.h: Declare __free_stack_cache.
4280         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
4281         ptr_freeres.
4282         * init.c (pthread_functions): Initialize ptr_freeres.
4283         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
4284         New freeres function.
4286 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
4288         [BZ #3018]
4289         * Makefile (extra-objs): Add modules to extra-test-objs instead.
4291 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
4293         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4294         _XOPEN_REALTIME_THREADS.
4296 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
4298         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
4299         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
4300         HAVE_CLOCK_GETTIME_VSYSCALL.
4301         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
4303 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
4305         * sysdeps/unix/sysv/linux/bits/posix_opt.h
4306         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
4307         * descr.h (struct priority_protection_data): New type.
4308         (struct pthread): Add tpp field.
4309         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
4310         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
4311         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
4312         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
4313         TPP mutexes.
4314         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
4315         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
4316         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
4317         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
4318         * tpp.c: New file.
4319         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
4320         boosted by TPP.
4321         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
4322         * pthread_mutexattr_getprioceiling.c
4323         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
4324         in the SCHED_FIFO priority range.
4325         * pthread_mutexattr_setprioceiling.c
4326         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
4327         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
4328         if mutex is not TPP.  Ceiling is now in __data.__lock.
4329         * pthread_mutex_setprioceiling.c: Include stdbool.h.
4330         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
4331         is now in __data.__lock.  Add locking.
4332         * pthread_create.c (__free_tcb): Free pd->tpp structure.
4333         * Makefile (libpthread-routines): Add tpp.
4334         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
4335         * tst-tpp.h: New file.
4336         * tst-mutexpp1.c: New file.
4337         * tst-mutexpp6.c: New file.
4338         * tst-mutexpp10.c: New file.
4339         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
4340         * tst-mutex6.c (TEST_FUNCTION): Likewise.
4342 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
4344         [BZ #2843]
4345         * pthread_join.c (pthread_join): Account for self being canceled
4346         when checking for deadlocks.
4347         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
4348         (tf1): Don't print anything after pthread_join returns, this would be
4349         another cancellation point.
4350         (tf2): Likewise.
4351         * tst-join6.c: New file.
4352         * Makefile (tests): Add tst-join6.
4354 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
4356         [BZ #2892]
4357         * pthread_setspecific.c (__pthread_setspecific): Check
4358         out-of-range index before checking for unused key.
4360         * sysdeps/pthread/gai_misc.h: New file.
4362 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
4364         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
4365         file.  Don't use sysctl.
4366         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
4367         overwrite the file if this is likely not true.
4369 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
4371         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
4372         * Makefile (tests): Add tst-getpid3.
4373         * tst-getpid3.c: New file.
4375 2006-07-30  Roland McGrath  <roland@redhat.com>
4377         * Makefile (libpthread-routines): Add ptw-sigsuspend.
4379         * sysdeps/unix/sysv/linux/i386/not-cancel.h
4380         (pause_not_cancel): New macro.
4381         (nanosleep_not_cancel): New macro.
4382         (sigsuspend_not_cancel): New macro.
4383         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
4384         nanosleep_not_cancel macro from <not-cancel.h>.
4385         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
4386         macro from <not-cancel.h>.
4388 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
4389             Jakub Jelinek  <jakub@redhat.com>
4391         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
4392         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
4393         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
4394         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
4395         * pthread_mutex_init.c: Add support for priority inheritance mutex.
4396         * pthread_mutex_lock.c: Likewise.
4397         * pthread_mutex_timedlock.c: Likewise.
4398         * pthread_mutex_trylock.c: Likewise.
4399         * pthread_mutex_unlock.c: Likewise.
4400         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
4401         all mutexes.
4402         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
4403         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
4404         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
4405         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
4406         pthread-pi-defines.sym.
4407         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
4408         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
4409         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4410         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
4411         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4412         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4413         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4414         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
4415         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
4416         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4417         _POSIX_THREAD_PRIO_INHERIT to 200112L.
4418         * tst-mutex1.c: Adjust to allow use in PI mutex test.
4419         * tst-mutex2.c: Likewise.
4420         * tst-mutex3.c: Likewise.
4421         * tst-mutex4.c: Likewise.
4422         * tst-mutex5.c: Likewise.
4423         * tst-mutex6.c: Likewise.
4424         * tst-mutex7.c: Likewise.
4425         * tst-mutex7a.c: Likewise.
4426         * tst-mutex8.c: Likewise.
4427         * tst-mutex9.c: Likewise.
4428         * tst-robust1.c: Likewise.
4429         * tst-robust7.c: Likewise.
4430         * tst-robust8.c: Likewise.
4431         * tst-mutexpi1.c: New file.
4432         * tst-mutexpi2.c: New file.
4433         * tst-mutexpi3.c: New file.
4434         * tst-mutexpi4.c: New file.
4435         * tst-mutexpi5.c: New file.
4436         * tst-mutexpi6.c: New file.
4437         * tst-mutexpi7.c: New file.
4438         * tst-mutexpi7a.c: New file.
4439         * tst-mutexpi8.c: New file.
4440         * tst-mutexpi9.c: New file.
4441         * tst-robust1.c: New file.
4442         * tst-robust2.c: New file.
4443         * tst-robust3.c: New file.
4444         * tst-robust4.c: New file.
4445         * tst-robust5.c: New file.
4446         * tst-robust6.c: New file.
4447         * tst-robust7.c: New file.
4448         * tst-robust8.c: New file.
4449         * Makefile (tests): Add the new tests.
4451         * pthread_create.c (start_thread): Add some casts to avoid warnings.
4452         * pthread_mutex_destroy.c: Remove unneeded label.
4454 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
4456         * pthread_mutex_init.c (__pthread_mutex_init): Move some
4457         computations to compile time.
4459 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
4461         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
4463 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
4465         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
4467 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
4469         * pthread_key_create.c (__pthread_key_create): Do away with
4470         __pthread_keys_lock.
4472         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4473         (__kernel_cpumask_size): Mark as hidden.
4474         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4476         * sem_open.c (__sem_mappings_lock): Mark as hidden.
4477         * semaphoreP.h (__sem_mappings_lock): Likewise.
4479 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
4481         * pthread_atfork.c: Mark __dso_handle as hidden.
4483 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
4485         [BZ #2644]
4486         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
4487         the reload problem.  Change the one path in pthread_cancel_init
4488         which causes the problem.  Force gcc to reload.  Simplify callers.
4489         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
4490         (_Unwind_GetBSP): Undo last patch.
4492 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
4494         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
4495         function pointer is reloaded after pthread_cancel_init calls.
4497         [BZ #2644]
4498         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
4499         pointers are reloaded after pthread_cancel_init calls.
4501 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
4503         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
4504         __always_inline.
4506 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
4508         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4509         Allocate new object which is passed to timer_sigev_thread so that
4510         the timer can be deleted before the new thread is scheduled.
4512 2006-04-26  Roland McGrath  <roland@redhat.com>
4514         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
4516 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
4518         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
4519         suffix for conditional jumps.
4520         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
4521         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4522         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
4523         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
4524         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4525         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4527         * init.c (sigcancel_handler): Compare with correct PID even if the
4528         thread is in the middle of a fork call.
4529         (sighandler_setxid): Likewise.
4530         Reported by Suzuki K P <suzuki@in.ibm.com> .
4532 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
4534         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
4536 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
4538         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
4539         fails [Coverity CID 105].
4541 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
4543         * sysdeps/pthread/pthread.h: Add nonnull attributes.
4545 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
4547         [BZ #2505]
4548         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
4549         Define __lll_rel_instr using lwsync.
4551 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
4553         * allocatestack.c (allocate_stack): Always initialize robust_head.
4554         * descr.h: Define struct robust_list_head.
4555         (struct pthread): Use robust_list_head in robust mutex list definition.
4556         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
4557         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
4558         (__pthread_initialize_minimal_internal): Register robust_list with
4559         the kernel.
4560         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
4561         Declare __set_robust_list_avail.
4562         * pthread_create.c (start_thread): Register robust_list of new thread.
4563         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
4564         waiters.
4565         * pthread_mutex_destroy.c: For robust mutexes don't look at the
4566         number of users, it's unreliable.
4567         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
4568         set_robust_list syscall is available.
4569         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
4570         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
4571         Set robust_head.list_op_pending before trying to lock a robust mutex.
4572         * pthread_mutex_timedlock.c: Likewise.
4573         * pthread_mutex_trylock.c: Likewise.
4574         * pthread_mutex_unlock.c: Likewise for unlocking.
4575         * Makefile (tests): Add tst-robust8.
4576         * tst-robust8.c: New file.
4578 2006-03-08  Andreas Schwab  <schwab@suse.de>
4580         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
4581         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
4583 2006-03-05  Roland McGrath  <roland@redhat.com>
4585         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
4586         and $config_os doesn't match *linux*.
4588 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
4590         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
4591         Use __syscall_error.
4592         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4593         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
4594         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
4595         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4596         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
4597         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
4599 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
4601         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
4603 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
4605         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
4606         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
4607         mutex.
4608         (__lll_robust_timedlock_wait): Likewise.
4609         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
4610         (__lll_robust_lock_wait): Likewise.
4611         (__lll_robust_timedlock_wait): Likewise.
4612         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
4613         (__lll_robust_lock_wait): Likewise.
4614         (__lll_robust_timedlock_wait): Likewise.
4616 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
4618         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
4619         lll_robust_mutex_trylock, lll_robust_mutex_lock,
4620         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
4621         lll_robust_mutex_unlock): Define.
4622         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
4624 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
4626         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
4627         instead of <clone.S>.
4629 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
4631         * Makefile (libpthread-routines): Add
4632         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
4633         and pthread_mutex_[sg]etprioceiling.
4634         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
4635         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
4636         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
4637         pthread_mutex_setprioceiling.
4638         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
4639         PTHREAD_PRIO_PROTECT): New enum values.
4640         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
4641         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
4642         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
4643         prototypes.
4644         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
4645         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
4646         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
4647         Define.
4648         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
4649         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
4650         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
4651         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
4652         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
4653         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
4654         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
4655         protocol mutexes.
4656         * pthread_mutex_getprioceiling.c: New file.
4657         * pthread_mutex_setprioceiling.c: New file.
4658         * pthread_mutexattr_getprioceiling.c: New file.
4659         * pthread_mutexattr_setprioceiling.c: New file.
4660         * pthread_mutexattr_getprotocol.c: New file.
4661         * pthread_mutexattr_setprotocol.c: New file.
4663 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
4665         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
4667 2006-02-27  Roland McGrath  <roland@redhat.com>
4669         * sysdeps/pthread/Subdirs: List nptl here too.
4670         * configure (libc_add_on_canonical): New variable.
4672         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
4674         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
4675         self to get main source tree's file.
4676         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
4677         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
4678         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
4679         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
4680         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
4681         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
4682         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
4683         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
4684         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
4685         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
4686         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
4687         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
4688         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
4690         * Makefile: Use $(sysdirs) in vpath directive.
4692         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
4693         (CPPFLAGS-timer_routines.c): Likewise.
4695         * Makeconfig (includes): Variable removed.
4697 2006-02-26  Roland McGrath  <roland@redhat.com>
4699         * sysdeps/generic/pt-raise.c: Moved to ...
4700         * pt-raise.c: ... here.
4701         * sysdeps/generic/lowlevellock.h: Moved to ...
4702         * lowlevellock.h: ... here.
4704 2006-02-23  Roland McGrath  <roland@redhat.com>
4706         * descr.h (struct pthread): Add final member `end_padding'.
4707         (PTHREAD_STRUCT_END_PADDING): Use it.
4709 2006-02-20  Roland McGrath  <roland@redhat.com>
4711         * sysdeps/mips: Directory removed, saved in ports repository.
4712         * sysdeps/unix/sysv/linux/mips: Likewise.
4714 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
4716         * tst-robust1.c: Add second mutex to check that the mutex list is
4717         handled correctly.
4719 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
4721         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
4722         lll_robust_mutex_trylock, lll_robust_mutex_lock,
4723         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
4724         lll_robust_mutex_unlock): New macros.
4725         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
4726         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4727         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4728         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4729         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
4731 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4733         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
4734         definitions.
4735         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
4737 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
4739         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4740         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
4741         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4742         (lll_robust_mutex_unlock): Likewise.
4744 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
4746         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
4747         Set robust_list.__next rather than robust_list.
4748         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4749         (__pthread_list_t): New typedef.
4750         (pthread_mutex_t): Replace __next and __prev fields with __list.
4751         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
4752         (__pthread_list_t): New typedef.
4753         (pthread_mutex_t): Replace __next and __prev fields with __list.
4754         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4755         (__pthread_list_t, __pthread_slist_t): New typedefs.
4756         (pthread_mutex_t): Replace __next and __prev fields with __list.
4757         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
4758         (__pthread_list_t, __pthread_slist_t): New typedefs.
4759         (pthread_mutex_t): Replace __next and __prev fields with __list.
4760         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
4761         (__pthread_list_t, __pthread_slist_t): New typedefs.
4762         (pthread_mutex_t): Replace __next and __prev fields with __list.
4763         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
4764         (__pthread_slist_t): New typedef.
4765         (pthread_mutex_t): Replace __next field with __list.
4767 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
4769         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
4770         PTHREAD_MUTEX_OWNERDEAD.
4771         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
4772         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
4773         * Makefile (libpthread-routines): Add lowlevelrobustlock.
4774         * pthread_create.c (start_thread): Very much simplify robust_list loop.
4775         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
4776         to PTHREAD_MUTEX_INCONSISTENT.
4777         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
4778         * pthread_mutex_lock.c: Reimplement robust mutex handling.
4779         * pthread_mutex_trylock.c: Likewise.
4780         * pthread_mutex_timedlock.c: Likewise.
4781         * pthread_mutex_unlock.c: Likewise.
4782         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4783         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
4784         lowlevelrobustlock.sym.
4785         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
4786         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
4787         definitions.
4788         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4789         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
4790         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
4791         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
4792         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
4794 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
4796         * allocatestack.c (allocate_stack): Initialize robust_list.
4797         * init.c (__pthread_initialize_minimal_internal): Likewise.
4798         * descr.h (struct xid_command): Pretty printing.
4799         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
4800         robust_list.  Adjust macros.
4801         * pthread_create.c (start_thread): Adjust robust_list handling.
4802         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
4803         but the owner for all robust mutex types.
4804         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
4805         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
4806         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4807         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
4809         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
4810         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
4812 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
4814         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
4815         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
4817 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4819         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
4820         Return status.
4821         (lll_futex_timed_wait): Define.
4823 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
4825         * tst-cancel4.c: Test ppoll.
4827 2006-01-18  Andreas Jaeger  <aj@suse.de>
4829         [BZ #2167]
4830         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
4831         (pthread_mutex_t): Follow changes for other archs.  Based on patch
4832         by Jim Gifford <patches@jg555.com>.
4834 2006-01-13  Richard Henderson  <rth@redhat.com>
4836         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
4838 2006-01-10  Roland McGrath  <roland@redhat.com>
4840         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
4841         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
4842         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
4843         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4844         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4845         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4846         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4847         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
4848         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4849         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4851 2006-01-09  Roland McGrath  <roland@redhat.com>
4853         * tst-initializers1-c89.c: New file.
4854         * tst-initializers1-c99.c: New file.
4855         * tst-initializers1-gnu89.c: New file.
4856         * tst-initializers1-gnu99.c: New file.
4857         * Makefile (tests): Add them.
4858         (CFLAGS-tst-initializers1-c89.c): New variable.
4859         (CFLAGS-tst-initializers1-c99.c): New variable.
4860         (CFLAGS-tst-initializers1-gnu89.c): New variable.
4861         (CFLAGS-tst-initializers1-gnu99.c): New variable.
4863         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4864         Use __extension__ on anonymous union definition.
4865         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4866         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4867         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4868         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4869         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4871 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
4873         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4874         Don't give the union a name because it changes the mangled name.
4875         Instead name the struct for __data.
4876         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
4877         Likewise.
4878         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
4879         Likewise.
4881 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
4883         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
4884         stack bias to mc_ftp field.
4886 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
4888         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
4889         being too clever and reloading the futex value where it shouldn't.
4891 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
4893         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
4894         correct type.
4896 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
4898         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
4899         Add cfi directives.
4901 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
4903         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
4904         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
4905         rename in tcbhead_t.
4907         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
4908         Don't give the union a name because it changes the mangled name.
4909         Instead name the struct for __data.
4910         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4911         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4912         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4913         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4914         * pthread_create.c (start_thread): Adjust robust mutex free loop.
4915         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
4917 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
4919         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
4920         Return status.
4921         (lll_futex_timed_wait): Define.
4922         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4923         * sysdeps/pthread/aio_misc.h: New file.
4925 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
4927         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
4929 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
4931         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4932         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
4933         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4935 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
4937         * tst-cancel24.cc: Use C headers instead of C++ headers.
4939 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
4941         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
4942         sparc-linux configured glibc.
4943         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
4944         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
4945         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
4946         atomic_compare_and_exchange_val_24_acq instead of
4947         atomic_compare_and_exchange_val_acq.
4948         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
4949         instead of atomic_exchange_rel.
4950         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
4951         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
4952         file.
4953         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
4954         file.
4955         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
4956         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
4957         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
4958         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
4959         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
4960         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
4961         New file.
4962         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
4963         New file.
4964         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
4965         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
4966         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
4967         file.
4968         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
4969         file.
4970         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
4972 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
4974         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
4975         mutex initializers.
4977 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
4979         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
4980         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
4981         THREAD_COPY_POINTER_GUARD): Define.
4982         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
4983         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
4985 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
4987         * version.c: Update copyright year.
4989 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4991         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
4992         .eh_frame section, use cfi_* directives.
4993         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
4995 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
4997         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
4998         now.
5000 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
5002         * sysdeps/pthread/sigaction.c: Removed.
5003         * sigaction.c: New file.
5004         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
5006 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
5008         * Makefile (tests): Add tst-signal7.
5009         * tst-signal7.c: New file.
5011 2005-12-27  Roland McGrath  <roland@redhat.com>
5013         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
5014         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
5015         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
5016         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
5017         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
5018         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
5019         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
5020         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
5021         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
5022         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
5023         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
5025 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
5027         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
5028         and __prev field to pthread_mutex_t.
5029         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5030         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5031         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5032         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5033         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
5034         to pthread_mutex_t.
5036 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
5038         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
5039         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
5040         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
5041         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
5042         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
5043         and PTHREAD_MUTEXATTR_FLAG_BITS.
5044         * descr.h (struct pthread): Add robust_list field and define
5045         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
5046         * pthread_mutexattr_getrobust.c: New file.
5047         * pthread_mutexattr_setrobust.c: New file.
5048         * pthread_mutex_consistent.c: New file.
5049         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
5050         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
5051         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
5052         Adjust pthread_mutex_t initializers.
5053         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
5054         field to pthread_mutex_t.
5055         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
5056         and __prev field to pthread_mutex_t.
5057         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
5058         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
5059         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
5060         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
5061         * pthread_mutexattr_gettype.c: Likewise.
5062         * pthread_mutexattr_setpshared.c: Likewise.
5063         * pthread_mutexattr_settype.c: Likewise.
5064         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
5065         Initialize mutex kind according to robust flag.
5066         * pthread_mutex_lock.c: Implement local robust mutex.
5067         * pthread_mutex_timedlock.c: Likewise.
5068         * pthread_mutex_trylock.c: Likewise.
5069         * pthread_mutex_unlock.c: Likewise.
5070         * pthread_create.c (start_thread): Mark robust mutexes which remained
5071         locked as dead.
5072         * tst-robust1.c: New file.
5073         * tst-robust2.c: New file.
5074         * tst-robust3.c: New file.
5075         * tst-robust4.c: New file.
5076         * tst-robust5.c: New file.
5077         * tst-robust6.c: New file.
5078         * tst-robust7.c: New file.
5079         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
5080         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
5081         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
5082         tst-robust5, tst-robust6, and tst-robust7.
5084         * tst-typesizes.c: New file.
5085         * Makefile (tests): Add tst-typesizes.
5087         * tst-once3.c: More debug output.
5089 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
5091         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
5092         missing after last change.
5094         * version.c: Update copyright year.
5096 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
5098         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
5099         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
5100         * pthread_mutex_trylock.c: Likewise.
5101         * pthread_mutex_timedlock.c: Likewise.
5102         * pthread_mutex_unlock.c: Likewise.
5104 2005-12-22  Roland McGrath  <roland@redhat.com>
5106         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
5107         so that #include_next's search location is not reset to the -I..
5108         directory where <nptl/...> can be found.
5110 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
5112         [BZ #1913]
5113         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5114         Fix unwind info.  Remove useless branch prediction prefix.
5115         * tst-cancel24.cc: New file.
5116         * Makefile: Add rules to build and run tst-cancel24.
5118 2005-12-21  Roland McGrath  <roland@redhat.com>
5120         * libc-cancellation.c: Use <> rather than "" #includes.
5121         * pt-cleanup.c: Likewise.
5122         * pthread_create.c: Likewise.
5123         * pthread_join.c: Likewise.
5124         * pthread_timedjoin.c: Likewise.
5125         * pthread_tryjoin.c: Likewise.
5126         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
5127         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
5128         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
5129         * unwind.c: Likewise.
5131 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5133         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
5134         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
5135         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5136         THREAD_COPY_POINTER_GUARD): Define.
5138 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
5140         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
5141         rather than one.
5142         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5143         THREAD_COPY_POINTER_GUARD): Define.
5144         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
5145         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
5146         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5147         THREAD_COPY_POINTER_GUARD): Define.
5148         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
5149         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
5150         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
5151         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
5152         Use PTR_DEMANGLE for B0 if defined.
5154 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
5156         * pthread_create.c (__pthread_create_2_1): Use
5157         THREAD_COPY_POINTER_GUARD if available.
5158         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
5159         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
5160         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
5161         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
5162         * sysdeps/x86_64/tls.h: Likewise.
5164 2005-12-15  Roland McGrath  <roland@redhat.com>
5166         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
5168 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
5170         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
5171         sysdeps/generic.
5172         * errno-loc.c: New file.
5174 2005-12-12  Roland McGrath  <roland@redhat.com>
5176         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
5177         adjustments before choosing stack size.  Update minimum stack size
5178         calculation to match allocate_stack change.
5180 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
5182         * allocatestack.c (allocate_stack): Don't demand that there is an
5183         additional full page available on the stack beside guard, TLS, the
5184         minimum stack.
5186 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
5188         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5189         (__cleanup_fct_attribute): Use __regparm__ not regparm.
5191         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
5192         compiling 32-bit code we must define __cleanup_fct_attribute.
5194 005-11-24  Jakub Jelinek  <jakub@redhat.com>
5196         [BZ #1920]
5197         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
5198         __attribute__ instead of __attribute.
5199         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5200         (__cleanup_fct_attribute): Likewise.
5202 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
5204         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
5205         a write barrier before writing libgcc_s_getcfa.
5207 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
5209         * sysdeps/unix/sysv/linux/configure: Removed.
5211 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
5213         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
5214         optional init_array/fini_array support.
5216 2005-10-24  Roland McGrath  <roland@redhat.com>
5218         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
5219         versioned_symbol use.
5221 2005-10-16  Roland McGrath  <roland@redhat.com>
5223         * init.c (__pthread_initialize_minimal_internal): Even when using a
5224         compile-time default stack size, apply the minimum that allocate_stack
5225         will require, and round up to page size.
5227 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
5229         * Makefile ($(test-modules)): Remove static pattern rule.
5231 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
5232             Ulrich Drepper  <drepper@redhat.com>
5234         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
5235         alignment in callback function.
5236         * Makefile: Add rules to build and run tst-align3.
5237         * tst-align3.c: New file.
5239 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
5241         * allocatestack.c (setxid_signal_thread): Add
5242         INTERNAL_SYSCALL_DECL (err).
5244 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
5246         * allocatestack.c (setxid_signal_thread): Need to use
5247         atomic_compare_and_exchange_bool_acq.
5249 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
5250             Jakub Jelinek  <jakub@redhat.com>
5252         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
5253         CANCEL_RESTMASK.
5254         (struct pthread): Move specific_used field to avoid padding.
5255         Add setxid_futex field.
5256         * init.c (sighandler_setxid): Reset setxid flag and release the
5257         setxid futex.
5258         * allocatestack.c (setxid_signal_thread): New function.  Broken
5259         out of the bodies of the two loops in __nptl_setxid.  For undetached
5260         threads check whether they are exiting and if yes, don't send a signal.
5261         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
5262         * pthread_create.c (start_thread): For undetached threads, check
5263         whether setxid bit is set.  If yes, wait until signal has been
5264         processed.
5266         * allocatestack.c (STACK_VARIABLES): Initialize them.
5267         * pthread_create.c (__pthread_create_2_1): Initialize pd.
5269 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
5271         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
5272         waiters, awake all waiters on the associated mutex.
5274 2005-09-22  Roland McGrath  <roland@redhat.com>
5276         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
5277         ../sysdeps/x86_64/hp-timing.h).
5279 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
5281         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
5282         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5283         (lll_futex_wake_unlock): Define.
5284         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
5285         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5286         (lll_futex_wake_unlock): Define.
5287         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
5288         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5289         (lll_futex_wake_unlock): Define.
5290         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
5291         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5292         (lll_futex_wake_unlock): Define.
5293         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
5294         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5295         (lll_futex_wake_unlock): Define.
5296         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
5297         lll_futex_wake_unlock.
5298         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
5299         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5300         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5301         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
5302         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5303         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5305 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5307         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5308         Fix typo in register name.
5310 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
5312         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5313         Use __sigfillset.  Document that sigfillset does the right thing wrt
5314         to SIGSETXID.
5316 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
5318         [BZ #1102]
5319         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
5320         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
5321         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
5322         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
5323         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
5324         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
5325         in the structure.
5326         * Makefile (tests): Add tst-initializers1.
5327         (CFLAGS-tst-initializers1.c): Set.
5328         * tst-initializers1.c: New test.
5330 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
5332         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
5333         Make sure __flags are located at offset 48 from the start of the
5334         structure.
5336 2005-07-02  Roland McGrath  <roland@redhat.com>
5338         * Makeconfig: Comment fix.
5340 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
5342         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
5343         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
5344         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
5345         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
5346         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5347         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5348         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
5349         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
5350         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
5351         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5353 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
5355         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
5356         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5357         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
5358         fields.
5359         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5360         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
5361         field.  Put in sysinfo field unconditionally.
5362         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5363         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
5364         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5365         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
5366         fields.
5367         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5368         * pthread_create.c (__pthread_create_2_1): Use
5369         THREAD_COPY_STACK_GUARD macro.
5370         * Makefile: Add rules to build and run tst-stackguard1{,-static}
5371         tests.
5372         * tst-stackguard1.c: New file.
5373         * tst-stackguard1-static.c: New file.
5375 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
5377         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5378         Invoke CGOTSETUP and CGOTRESTORE.
5379         (CGOTSETUP, CGOTRESTORE): Define.
5381 2005-05-29  Richard Henderson  <rth@redhat.com>
5383         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
5384         (tf_write, tf_writev): Use it.
5385         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
5386         the system minimum.
5388 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
5390         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5391         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
5392         __librt_*_asynccancel@local.
5394 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
5396         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
5397         all occurrences of JUMPTARGET.  Instead append @local to labels.
5399 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
5401         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
5402         size/alignment of struct pthread rather than tcbhead_t.
5403         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5404         Likewise.
5405         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5406         Likewise.
5407         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5408         Likewise.
5410 2005-05-19  Richard Henderson  <rth@redhat.com>
5412         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
5413         __sync_val_compare_and_swap, not explicit _si variant.
5414         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
5416 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
5418         [BZ #915]
5419         * sysdeps/pthread/pthread.h: Avoid empty initializers.
5421 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
5423         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
5424         .eh_frame section, use cfi_* directives.
5426 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
5428         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
5429         of "" includes.
5431 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
5433         [BZ #1075]
5434         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
5435         aio_write blocks.
5437 2005-04-27  Roland McGrath  <roland@redhat.com>
5439         * Makefile (tests): Remove tst-clock2.
5441         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
5442         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
5443         translating to the kernel clockid_t for our own process/thread clock.
5445         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
5447 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
5449         * old_pthread_cond_init.c: Include <errno.h>.
5450         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
5451         process shared or uses clock other than CLOCK_REALTIME.
5452         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
5454 2005-04-13  David S. Miller  <davem@davemloft.net>
5456         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
5457         * sysdeps/sparc/sparc64/clone.S: New file.
5459 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
5461         [BZ #1102]
5462         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
5463         __inline instead of inline.
5464         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
5466 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
5468         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
5469         functionally equivalent, but shorter instructions.
5470         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5471         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5472         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5473         Likewise.
5474         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
5475         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5476         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5477         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5478         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5479         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
5480         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5481         Likewise.
5482         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5483         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5484         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5485         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
5486         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
5488 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
5490         * sysdeps/mips/Makefile: New file.
5491         * sysdeps/mips/nptl-sysdep.S: New file.
5492         * sysdeps/mips/tcb-offsets.sym: New file.
5493         * sysdeps/mips/pthread_spin_lock.S: New file.
5494         * sysdeps/mips/pthread_spin_trylock.S: New file.
5495         * sysdeps/mips/pthreaddef.h: New file.
5496         * sysdeps/mips/tls.h: New file.
5497         * sysdeps/mips/jmpbuf-unwind.h: New file.
5498         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
5499         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
5500         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
5501         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
5502         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
5503         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
5504         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
5505         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
5506         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
5507         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
5509 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
5511         [BZ #1112]
5512         * pthread_create.c (__pthread_create_2_1): Rename syscall error
5513         variable to scerr.
5515 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
5517         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
5519 2005-02-25  Roland McGrath  <roland@redhat.com>
5521         * alloca_cutoff.c: Correct license text.
5522         * tst-unload.c: Likewise.
5523         * sysdeps/pthread/allocalim.h: Likewise.
5524         * sysdeps/pthread/pt-initfini.c: Likewise.
5525         * sysdeps/pthread/bits/libc-lock.h: Likewise.
5526         * sysdeps/pthread/bits/sigthread.h: Likewise.
5527         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
5528         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
5530 2005-02-16  Roland McGrath  <roland@redhat.com>
5532         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
5533         Use unsigned int * for ptr_nthreads.
5535 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
5537         [BZ #721]
5538         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
5539         gcc4.
5541 2005-02-07  Richard Henderson  <rth@redhat.com>
5543         [BZ #787]
5544         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
5545         argument.
5547 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
5549         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
5550         order of arguments in invocation of atomic_add_zero.
5552 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
5554         [BZ #737]
5555         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
5556         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
5557         at least gotntpoff relocation and addition.
5558         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
5559         Likewise.
5560         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
5561         Likewise.
5562         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5563         Likewise.
5565 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
5567         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
5568         entry for static tls deallocation fix.
5569         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
5570         also contains information whether the memory pointed to is static
5571         TLS or not.
5572         * sysdeps/i386/tls.h: Likewise.
5573         * sysdeps/ia64/tls.h: Likewise.
5574         * sysdeps/powerpc/tls.h: Likewise.
5575         * sysdeps/s390/tls.h: Likewise.
5576         * sysdeps/sh/tls.h: Likewise.
5577         * sysdeps/sparc/tls.h: Likewise.
5578         * sysdeps/x86_64/tls.h: Likewise.
5580 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
5582         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
5584 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
5586         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
5587         %esp.
5588         * Makefile (tests): Add tst-align2.
5589         * tst-align2.c: New test.
5590         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
5591         -mpreferred-stack-boundary=4.
5593 2004-12-18  Roland McGrath  <roland@redhat.com>
5595         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
5596         New file removed withdrawn for the moment.
5598 2004-12-17  Richard Henderson  <rth@redhat.com>
5600         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
5601         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
5603 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
5605         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
5606         Increased PTHREAD_STACK_MIN.
5608         * tst-context1.c (stacks): Use bigger stack size.
5610 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
5612         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
5613         * sysdeps/sparc/tcb-offsets.sym: Add TID.
5615 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
5617         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
5618         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
5619         * sysdeps/s390/tcb-offsets.sym (TID): Add.
5621 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
5623         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
5625 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
5627         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
5628         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
5630         * tst-getpid1.c: If child crashes, report this first.  Print which
5631         signal.
5633 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
5635         * init.c (__pthread_initialize_minimal_internal): Also unblock
5636         SIGSETXID.
5638 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
5640         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
5641         _POSIX_THREAD_CPUTIME): Define to 0.
5642         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
5643         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
5644         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
5645         __timer_signal_thread_tclk): Remove.
5646         (init_module): Remove their initialization.
5647         (thread_cleanup): Remove their cleanup assertions.
5648         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
5649         __timer_signal_thread_tclk): Remove.
5650         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
5651         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
5652         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
5654 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
5656         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
5657         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
5659         * Makefile (tests): Add tst-getpid2.
5660         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
5661         (do_test): Use it.  Use __clone2 instead of clone on ia64.
5662         * tst-getpid2.c: New test.
5664 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5666         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
5668 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
5670         * Makefile (tests): Add tst-getpid1.
5671         * tst-getpid1.c: New file.
5672         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
5673         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
5675 2004-12-02  Roland McGrath  <roland@redhat.com>
5677         * Makefile (libpthread-nonshared): Variable removed.
5678         ($(objpfx)libpthread_nonshared.a): Target removed.
5679         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
5680         These are now handled by generic magic from
5681         libpthread-static-only-routines being set.
5683 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
5685         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
5686         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
5687         _POSIX_THREAD_PRIO_PROTECT): Define.
5688         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5689         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5690         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5692 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
5694         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
5695         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
5696         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
5697         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
5698         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5699         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5700         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5702 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
5704         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
5706         * Makefile (libpthread-routines): Add pthread_setschedprio.
5707         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
5708         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
5709         * pthread_setschedprio.c: New file.
5711 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
5713         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
5714         * pthread_cancel.c (pthread_create): Likewise.
5716         * Makefile (libpthread-routines): Add vars.
5717         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
5718         * init.c (__default_stacksize, __is_smp): Remove.
5719         * vars.c: New file.
5720         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
5721         and define a wrapper macro.
5722         (PTHREAD_STATIC_FN_REQUIRE): Define.
5723         * allocatestack.c (__find_thread_by_id): Undefine.
5724         * pthread_create (__pthread_keys): Remove.
5725         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
5726         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
5727         PTHREAD_STATIC_FN_REQUIRE.
5729 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5731         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
5732         parameter to REGISTER macro.
5734 2004-11-17  Roland McGrath  <roland@redhat.com>
5736         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
5737         Make sure SIGCANCEL is blocked as well.
5739 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
5741         * sysdeps/pthread/setxid.h: New file.
5742         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
5743         (struct xid_command): Add forward decl.
5744         (struct pthread_functions): Change return type of __nptl_setxid hook
5745         to int.
5746         * pthreadP.h (__nptl_setxid): Change return type to int.
5747         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
5748         calling thread, return its return value and set errno on failure.
5749         * descr.h (struct xid_command): Change id type to long array.
5751         * Makefile: Add rules to build and test tst-setuid1 and
5752         tst-setuid1-static.
5753         * tst-setuid1.c: New test.
5754         * tst-setuid1-static.c: New test.
5756 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
5758         * Makefile (tests): Add tst-exit3.
5759         * tst-exit3.c: New test.
5761 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
5763         * Makefile (tests): Add tst-exit2.
5764         * tst-exit2.c: New file.
5766 2004-11-09  Roland McGrath  <roland@redhat.com>
5768         [BZ #530]
5769         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
5770         here, before calling clone.
5771         * pthread_create.c (start_thread): Don't do it here.
5773 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
5775         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
5777 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
5779         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
5780         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
5781         assembler warning.
5783 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
5785         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
5786         if sched_priority is not between minprio and maxprio.
5788 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5790         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
5791         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
5793         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
5794         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
5796 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
5798         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
5799         not-cancelable I/O functions.
5801 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5803         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
5804         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
5805         make sure 2 is stored in the futex and we looked at the old value.
5806         Fix a few other problems to return the correct value.
5808 2004-10-14  Richard Henderson  <rth@redhat.com>
5810         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
5811         make gcc4 happy.
5813 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
5815         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
5816         of pthread-functions.h and pthreaddef.h.
5817         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
5819         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
5820         Change __data.__nwaiters from int to unsigned int.
5822         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
5823         sysconf (_SC_THREAD_CPUTIME) returns negative value.
5825         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
5826         before return type.
5828         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
5829         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
5831 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
5833         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
5834         test fails, remove message queue.
5835         (tf_msgsnd): Likewise.
5837 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
5839         * tst-clock1.c: Change #ifdef to #if defined.
5840         * tst-clock2.c: Likewise.
5841         * tst-cond11.c: Likewise.
5843         * sysdeps/pthread/timer_create.c (timer_create): Use
5844         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
5845         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
5846         THREAD_CPUTIME.
5848 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
5850         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
5851         _POSIX_THREAD_CPUTIME): Define to 0.
5853 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
5855         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
5856         and _POSIX_THREAD_CPUTIME to zero.
5857         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5858         * tst-barrier2.c: Fix testing for POSIX feature.
5859         * tst-clock1.c: Likewise.
5860         * tst-clock2.c: Likewise.
5861         * tst-cond11.c: Likewise.
5862         * tst-cond4.c: Likewise.
5863         * tst-cond6.c: Likewise.
5864         * tst-flock2.c: Likewise.
5865         * tst-mutex4.c: Likewise.
5866         * tst-mutex9.c: Likewise.
5867         * tst-rwlock12.c: Likewise.
5868         * tst-rwlock4.c: Likewise.
5869         * tst-signal1.c: Likewise.
5870         * tst-spin2.c: Likewise.
5871         * sysdeps/pthread/posix-timer.h: Likewise.
5872         * sysdeps/pthread/timer_create.c: Likewise.
5873         * sysdeps/pthread/timer_routines.c: Likewise.
5875 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
5877         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5878         (__lll_mutex_timedlock_wait): Address futex correctly.
5880         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5881         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
5882         make sure 2 is stored in the futex and we looked at the old value.
5883         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5884         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
5885         which might very well made the code not working at all before.
5886         [BZ #417]
5888 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
5890         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
5891         allow SIGSETXID to be sent.
5892         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
5893         for SIGSETXID to be defined.
5894         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
5895         SIGSETXID cannot be blocked.
5897         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
5898         Add __extension__ to long long types.
5899         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5900         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5901         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5902         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5903         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5904         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5905         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5907 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
5909         * descr.h (struct pthread): Add stopped_start field.
5910         * sysdeps/pthread/createthread.c (create_thread): Set
5911         start_stopped flag in descriptor for new thread appropriately.
5912         * pthread_create.c (start_thread): Only take lock to be stopped on
5913         startup if stopped_start flag says so.
5915 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
5917         * pthread_create.c (__pthread_create_2_1): Remember whether thread
5918         is created detached and if yes, do not try to free the stack in case
5919         the thread creation failed.
5920         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
5921         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
5922         case there has been no error.  [BZ #405]
5924         * pthread_create.c (start_thread): Don't wait for scheduler data
5925         etc to be set at the beginning of the function.  The cancellation
5926         infrastructure must have been set up.  And enable async
5927         cancellation before potentially going to sleep.  [BZ #401]
5929 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
5931         * Versions: Remove exports for pthread_set*id_np functions.
5932         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
5933         for now.
5934         * Makefile: Don't build pthread_set*id code for now.
5936 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
5938         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
5939         internal use.
5940         * allocatestack.c (__nptl_setxid): New function.
5941         * descr.h (struct xid_command): Define type.
5942         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
5943         (sighandler_setxid): New function.
5944         (__pthread_initialize_minimal): Register sighandler_setxid for
5945         SIGCANCEL.
5946         * pt-allocrtsig.c: Update comment.
5947         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
5948         Declare __nptl_setxid.
5949         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
5950         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
5951         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
5952         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
5953         and pthread_setresuid_np.
5954         * pthread_setgid_np.c: New file.
5955         * pthread_setuid_np.c: New file.
5956         * pthread_setegid_np.c: New file.
5957         * pthread_seteuid_np.c: New file.
5958         * pthread_setregid_np.c: New file.
5959         * pthread_setreuid_np.c: New file.
5960         * pthread_setresgid_np.c: New file.
5961         * pthread_setresuid_np.c: New file.
5962         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
5963         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
5964         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
5965         and pthread_setresuid_np.
5966         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
5967         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
5968         pthread_setregid, and pthread_setresgid.
5970 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
5972         * allocatestack.c (allocate_stack): Return EAGAIN instead of
5973         ENOMEM when out of memory.
5975 2004-09-10  Roland McGrath  <roland@redhat.com>
5977         [BZ #379]
5978         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
5979         code, since we don't try to use the broken CLONE_STOPPED any more.
5980         * pthread_create.c (start_thread): Likewise.
5982 2004-09-15  Richard Henderson  <rth@redhat.com>
5984         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
5986 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
5988         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
5989         (__libc_unwind_longjmp): Delete macro and declare as function.
5990         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
5991         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
5992         nptl directory.
5993         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
5994         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
5995         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
5997 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
5999         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
6000         for __USE_XOPEN2K.
6001         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
6002         types also for __USE_XOPEN2K.
6003         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6004         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6005         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6006         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6007         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6008         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6009         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6010         [BZ #320]
6012 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
6014         * sysdeps/pthread/pthread.h
6015         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
6016         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
6017         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
6018         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
6019         [BZ #375]
6021 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
6023         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
6024         PSEUDO to be used with . prefix.
6026         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
6027         Use atomic_increment instead of atomic_exchange_and_add.
6028         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
6029         Likewise.
6030         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
6031         Likewise.
6032         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
6033         Likewise.
6035         * allocatestack.c (allocate_stack): Use atomic_increment_val
6036         instead of atomic_exchange_and_add.
6037         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
6038         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
6039         Likewise.
6040         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6041         Likewise.
6043         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
6044         the initialization function might throw.
6046 2005-09-05  Richard Henderson  <rth@redhat.com>
6048         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
6049         Move definition inside libpthread, libc, librt check.  Provide
6050         definition for rtld.
6052 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
6054         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
6055         * sysdeps/i386/jmpbuf-unwind.h: Likewise
6056         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
6057         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
6058         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
6059         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
6060         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
6061         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
6062         * unwind.c: Use it.
6064         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6065         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
6066         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6067         Likewise.
6068         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
6069         Decrement __nwaiters.  If pthread_cond_destroy has been called and
6070         this is the last waiter, signal pthread_cond_destroy caller and
6071         avoid using the pthread_cond_t structure after unlock.
6072         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6073         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6074         Read clock type from the least significant bits of __nwaiters instead
6075         of __clock.
6076         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6077         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
6079 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
6081         [BZ #342]
6082         * Makefile (tests): Add tst-cond20 and tst-cond21.
6083         * tst-cond20.c: New test.
6084         * tst-cond21.c: New test.
6085         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
6086         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
6087         it unsigned int.
6088         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6089         Likewise.
6090         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6091         (pthread_cond_t): Likewise.
6092         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6093         Likewise.
6094         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6095         Likewise.
6096         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6097         Likewise.
6098         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
6099         (cond_nwaiters): New.
6100         (clock_bits): New.
6101         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
6102         if there are waiters not signalled yet.
6103         Wait until all already signalled waiters wake up.
6104         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
6105         __nwaiters.  If pthread_cond_destroy has been called and this is the
6106         last waiter, signal pthread_cond_destroy caller and avoid using
6107         the pthread_cond_t structure after unlock.
6108         (__pthread_cond_wait): Increment __nwaiters in the beginning,
6109         decrement it when leaving.  If pthread_cond_destroy has been called
6110         and this is the last waiter, signal pthread_cond_destroy caller.
6111         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6112         Likewise.  Read clock type from the least significant bits of
6113         __nwaiters instead of __clock.
6114         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
6115         whether clock ID can be encoded in COND_CLOCK_BITS bits.
6116         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
6117         clock type just from the last COND_CLOCK_BITS bits of value.
6118         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
6119         instead of __clock, just from second bit of condattr's value.
6121 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
6123         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
6124         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
6125         != 64.
6126         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6128 2004-08-15  Roland McGrath  <roland@frob.com>
6130         * pthread_atfork.c: Update copyright terms including special exception
6131         for these trivial files, which are statically linked into executables
6132         that use dynamic linking for the significant library code.
6134 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
6136         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
6137         pthread_rwlock_rdlock.
6138         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
6139         Decrease __nr_readers_queued after reacquiring lock.
6140         * sysdeps/pthread/pthread_rwlock_timedrdlock
6141         (pthread_rwlock_timedrdlock): Likewise.
6142         Reported by Bob Cook <bobcook47@hotmail.com>.
6144 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
6146         * tst-rwlock14.c (tf): Read main thread handle from *ARG
6147         before pthread_barrier_wait.
6149 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
6151         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
6152         Remove unnecessary exception handling data.
6154 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
6156         [BZ #284]
6157         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
6158         instead of clockid_t.
6160 2004-07-21  Roland McGrath  <roland@redhat.com>
6162         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
6164 2004-07-19  Roland McGrath  <roland@redhat.com>
6166         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
6168 2004-07-02  Roland McGrath  <roland@redhat.com>
6170         * configure: Don't exit.
6172 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6174         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6175         (__pthread_cond_timedwait): Check for invalid nanosecond in
6176         timeout value.
6178 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
6180         * Makefile: Add rules to build and run tst-fini1.
6181         * tst-fini1.c: New file.
6182         * tst-fini1mod.c: New file.
6184 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
6186         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
6187         if no cancellation support is needed.
6188         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6189         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6190         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6191         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6192         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6193         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6194         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6195         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
6196         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
6198         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
6199         only if not already defined.
6201 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
6203         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
6204         constraint "m" instead of "0" for futex.
6206         * shlib-versions: Add powerpc64-.*-linux.*.
6208 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
6210         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
6211         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
6212         for valid tv_nsec.
6213         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
6214         1 billion and 64-bit tv_nsec which is valid when truncated to 32
6215         bits.
6217 2004-06-29  Roland McGrath  <roland@redhat.com>
6219         * Banner: NPTL no longer has its own version number.
6220         * Makefile (nptl-version): Variable removed.
6221         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
6222         using $(version), the glibc version number.
6224 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6226         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6227         Fix branch offset for a PLT entry.
6228         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
6229         Likewise.
6230         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
6231         Likewise.
6232         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
6233         Likewise.
6234         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
6235         Likewise.
6237 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
6239         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
6240         unconditionally.
6242 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
6244         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
6245         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
6246         instead of tv_sec.
6247         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
6248         (pthread_rwlock_timedrdlock): Likewise.
6250 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
6252         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6253         Set __r7 to val, not mutex.
6255 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
6257         * Makefile: Add rules to build tst-rwlock14.
6258         * tst-rwlock14.c: New file.
6260 2004-06-24  Boris Hu  <boris.hu@intel.com>
6262         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
6263         check.
6264         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6266 2004-06-19  Andreas Jaeger  <aj@suse.de>
6268         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
6269         assembler in last patch.
6271 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
6273         * sysdeps/pthread/pthread_cond_timedwait.c
6274         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
6275         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6276         (__pthread_cond_timedwait): Check for invalid nanosecond in
6277         timeout value.
6278         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6279         * tst-cond19.c: New file.
6280         * Makefile: Add rules to build and run tst-cond19.
6282 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
6284         * tst-context1.c (GUARD_PATTERN): Defined.
6285         (tst_context_t): Define struct containing ucontext_t & guard words.
6286         (ctx): Declare as an array of tst_context_t.
6287         (fct): Verify uc_link & guard words are still valid.
6288         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
6290 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6292         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6293         Add __data.__futex field, reshuffle __data.__clock.
6294         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
6295         (__pthread_cond_signal): Increment __futex at the same time as
6296         __wakeup_seq or __total_seq.  Pass address of __futex instead of
6297         address of low 32-bits of __wakeup_seq to futex syscall.
6298         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6299         (__pthread_cond_wait): Likewise.  Pass __futex value from before
6300         releasing internal lock to FUTEX_WAIT.
6301         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6302         (__pthread_cond_timedwait): Likewise.
6303         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6304         (FUTEX_CMP_REQUEUE): Define.
6305         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6306         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6307         Pass __futex value from before the unlock and __futex address instead
6308         of address of low 32-bits of __wakeup_seq to futex syscall.
6309         Fallback to FUTEX_WAKE all on any errors.
6311 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
6313         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
6314         comment typo.
6315         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
6316         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
6317         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
6318         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
6319         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
6321 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
6323         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
6324         Add memory clobber to inline assembly.
6325         (__lll_mutex_trylock): Likewise.
6326         (__lll_mutex_cond_trylock): Likewise.
6328 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
6330         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6331         Pass val argument as 6th system call argument in %r7.
6333 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
6335         * Makefile (tests): Add tst-cond16.
6336         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
6337         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
6338         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6339         Add __data.__futex field, reshuffle __data.__clock.
6340         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
6341         (__pthread_cond_signal): Increment __futex at the same time as
6342         __wakeup_seq or __total_seq.  Pass address of __futex instead of
6343         address of low 32-bits of __wakeup_seq to futex syscall.
6344         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
6345         (__pthread_cond_wait): Likewise.  Pass __futex value from before
6346         releasing internal lock to FUTEX_WAIT.
6347         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
6348         (__pthread_cond_timedwait): Likewise.
6349         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
6350         (FUTEX_CMP_REQUEUE): Define.
6351         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6352         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6353         Pass __futex value from before the unlock and __futex address instead
6354         of address of low 32-bits of __wakeup_seq to futex syscall.
6355         Fallback to FUTEX_WAKE all on any errors.
6356         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
6357         Define.
6358         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6359         internally.  Return non-zero if error, zero if success.
6360         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6361         Add __data.__futex field, reshuffle __data.__clock.
6362         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
6363         Define.
6364         (lll_futex_requeue): Add val argument, return 1 unconditionally
6365         for the time being.
6366         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6367         Add __data.__futex field, reshuffle __data.__clock.
6368         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6369         Define.
6370         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6371         internally.  Return non-zero if error, zero if success.
6372         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6373         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
6374         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6375         Define.
6376         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6377         internally.  Return non-zero if error, zero if success.
6378         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6379         Add __data.__futex field, reshuffle __data.__clock.
6380         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
6381         Define.
6382         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6383         internally.  Return non-zero if error, zero if success.
6384         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6385         Add __data.__futex field, reshuffle __data.__clock.
6386         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6387         Add __data.__futex field, reshuffle __data.__clock.
6388         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
6389         Increment __futex at the same time as __wakeup_seq or __total_seq.
6390         Pass address of __futex instead of address of low 32-bits of
6391         __wakeup_seq to futex syscall.
6392         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6393         Pass __futex value from before releasing internal lock
6394         to FUTEX_WAIT.
6395         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6396         Likewise.  Avoid unnecessary shadowing of variables.
6397         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
6398         Set __futex to 2 * __total_seq.  Pass __futex value from before the
6399         unlock and __futex address instead of address of low 32-bits of
6400         __wakeup_seq to futex_requeue macro, adjust for new return value
6401         meaning.
6402         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
6403         (__pthread_cond_signal): Increment __futex at the same time as
6404         __wakeup_seq or __total_seq.  Pass address of __futex instead of
6405         address of low 32-bits of __wakeup_seq to futex syscall.
6406         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
6407         (__pthread_cond_wait): Likewise.  Pass __futex value from before
6408         releasing internal lock to FUTEX_WAIT.
6409         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6410         (__pthread_cond_timedwait): Likewise.
6411         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6412         (FUTEX_CMP_REQUEUE): Define.
6413         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6414         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6415         Pass __futex value from before the unlock and __futex address instead
6416         of address of low 32-bits of __wakeup_seq to futex syscall.
6417         Fallback to FUTEX_WAKE all on any errors.
6419 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6421         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
6422         Add nop to align the end of critical section.
6423         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
6425 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6427         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6428         Add __broadcast_seq field.
6429         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
6430         all waiters as woken with woken_seq and bump broadcast counter.
6431         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
6432         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
6433         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6434         Comment typo fixes.  Avoid returning -ETIMEDOUT.
6436 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
6438         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6439         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
6440         Reported by Kaz Kojima.
6442 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
6444         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
6446 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
6448         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
6449         __broadcast_seq with bc_seq after acquiring internal lock instead of
6450         before it.
6452 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
6454         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
6455         compilation.
6456         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6457         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
6458         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6459         (pthread_cond_t): Add __data.__broadcast_seq field.
6460         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6461         (FRAME_SIZE): Define.
6462         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
6463         Comment typo fixes.
6464         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
6465         Define.
6466         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
6467         typo fixes.
6468         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6469         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
6470         fixes.
6472 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
6474         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
6475         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6476         Add __broadcast_seq field.
6477         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6478         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6479         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6480         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6481         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6482         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
6483         all waiters as woken with woken_seq and bump broadcast counter.
6484         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
6485         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
6486         __broadcast_seq field.
6487         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6488         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6489         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
6490         * pthread_cond_init.c: Initialize __broadcast_seq field.
6491         * Makefile (tests): Add tst-cond17 and tst-cond18.
6492         Add .NOTPARALLEL goal.
6493         * tst-cond16.c: New file.  From Jakub.
6494         * tst-cond17.c: New file.  From Jakub.
6495         * tst-cond18.c: New file.  From Jakub.
6497 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
6499         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
6500         unwind info.
6502         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
6503         Parametrize frame size.  Correct some unwind info.
6504         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6506 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
6508         * tst-stack3.c: Note testing functionality beyond POSIX.
6510 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
6512         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
6513         Change conditional from ifdef to if.
6515 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
6517         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
6518         SYSDEP_CANCEL_ERROR): Define.
6519         (PSEUDO): Use it.
6521 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
6523         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
6525 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
6527         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
6529 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6531         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
6532         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6533         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
6534         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6536 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
6538         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
6539         thread has all signals blocked.
6541 2004-04-18  Andreas Jaeger  <aj@suse.de>
6543         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
6544         (SEM_VALUE_MAX): Add missing brace.
6546 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
6548         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
6549         in rt subdir.
6550         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
6551         * sysdeps/pthread/tst-mqueue8x.c: New test.
6552         * tst-cancel4.c: Update comment about message queues.
6554         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
6555         return it_value { 0, 0 }.
6556         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
6557         like SIGEV_SIGNAL.
6558         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
6559         assertion for SIGEV_NONE.
6560         (thread_attr_compare): Compare all attributes, not just a partial
6561         subset.
6563 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
6565         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
6567 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
6569         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
6570         Just use a plain number.
6571         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
6572         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
6573         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
6574         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
6575         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
6576         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
6577         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6579 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6581         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
6582         frame info.
6583         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6585 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
6587         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
6588         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
6589         of calling sigwaitinfo.
6591 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
6593         * allocatestack.c (allocate_stack): Set reported_guardsize
6594         unconditionally.
6595         * pthread_getattr_np.c (pthread_getattr_np): Use
6596         reported_guardsize instead of guardsize.
6597         * descr.h (struct pthread): Add reported_guardsize field.
6599 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
6601         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
6603 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
6605         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
6607 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
6609         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
6610         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
6611         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
6612         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
6613         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
6614         Define.
6615         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
6616         (_POSIX_MESSAGE_PASSING): Define.
6617         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
6618         (_POSIX_MESSAGE_PASSING): Define.
6619         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
6620         (_POSIX_MESSAGE_PASSING): Define.
6622 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
6624         * tst-context1.c (fct): Check whether correct stack is used.
6626 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
6628         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
6629         matching constraints for asm mem parameters.
6631         * tst-clock2.c (tf): Don't define unless needed.
6633 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
6635         * Makefile (link-libc-static): Use $(static-gnulib) instead of
6636         $(gnulib).
6638 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
6640         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
6641         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
6642         * pthreadP.h: Declare __nptl_deallocate_tsd.
6643         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
6644         Adjust caller.
6646         * Makefile (tests): Add tst-tsd5.
6647         * tst-tsd5.c: New file.
6649 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
6651         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6652         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
6653         is SHLIB_COMPAT check.
6654         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
6655         (__pthread_attr_getaffinity_old): Likewise.
6656         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6657         (__pthread_getaffinity_old): Likewise.
6658         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6659         (__pthread_setaffinity_old): Likewise.
6661 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
6663         * allocatestack.c (_make_stacks_executable): Call
6664         _dl_make_stack_executable first.
6666 2004-03-24  Roland McGrath  <roland@redhat.com>
6668         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
6669         constraint instead of "0".
6671 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
6673         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6674         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
6676         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
6677         code to avoid warning.
6679 2004-03-24  Andreas Jaeger  <aj@suse.de>
6681         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6682         (__pthread_attr_setaffinity_old): Remove const.
6684 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
6686         * sysdeps/unix/sysv/linux/smp.h: New file.
6687         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
6688         * init.c: Define __is_smp.
6689         (__pthread_initialize_minimal_internal): Call is_smp_system to
6690         initialize __is_smp.
6691         * pthreadP.h: Declare __is_smp.
6692         Define MAX_ADAPTIVE_COUNT is necessary.
6693         * pthread_mutex_init.c: Add comment regarding __spins field.
6694         * pthread_mutex_lock.c: Implement adaptive mutex type.
6695         * pthread_mutex_timedlock.c: Likewise.
6696         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
6697         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
6698         Add __spins field.
6699         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6700         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6701         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6702         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6703         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6704         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6705         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6706         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
6707         lll_mutex_cond_trylock.
6708         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6709         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6710         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6711         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6712         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6713         Define BUSY_WAIT_NOP.
6714         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6715         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6717         * tst-mutex5.c: Add support for testing adaptive mutexes.
6718         * tst-mutex7.c: Likewise.
6719         * tst-mutex5a.c: New file.
6720         * tst-mutex7a.c: New file.
6721         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
6723         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6724         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
6725         vgettimeofday call might destroy the content.
6727         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
6728         @pause in the loop.
6730         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
6731         No need to restrict type of ret.  Make it int.  Add comment.
6733         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
6734         Remove unnecessary setne instruction.
6736 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
6738         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6739         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
6740         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
6741         If realloc fails, break out of the loop.
6743 2004-03-20  Andreas Jaeger  <aj@suse.de>
6745         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6746         (__pthread_setaffinity_old): Fix interface.
6747         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6748         (__pthread_getaffinity_old): Likewise.
6750         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6751         (__pthread_setaffinity_new): Remove duplicate declaration.
6753 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6755         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
6756         the return value to a safe register.
6757         (CDISABLE): Set the function argument correctly.
6759 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6761         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
6762         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
6763         Rewrite so that only one locked memory operation per round is needed.
6764         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
6765         (pthread_barrier_wait): After wakeup, release lock only when the
6766         last thread stopped using the barrier object.
6767         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6768         (__pthread_cond_wait): Don't store mutex address if the current
6769         value is ~0l.  Add correct cleanup support and unwind info.
6770         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6771         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6772         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
6773         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
6774         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6775         Add correct cleanup support and unwind info.
6776         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
6777         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
6778         information for syscall wrappers.
6780 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
6782         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6783         cpusetsize field, remove next.
6784         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
6785         parameter for size of the CPU set.
6786         (pthread_setaffinity_np): Likewise.
6787         (pthread_attr_getaffinity_np): Likewise.
6788         (pthread_attr_setaffinity_np): Likewise.
6789         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
6790         interface change, keep compatibility code.
6791         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
6792         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
6793         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
6794         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
6795         __pthread_getaffinity_np.
6796         * Versions: Add version for changed interfaces.
6797         * tst-attr3.c: Adjust test for interface change.
6798         * pthread_getattr_np.c: Query the kernel about the affinity mask with
6799         increasing buffer sizes.
6800         * pthread_attr_destroy.c: Remove unused list handling.
6801         * pthread_attr_init.c: Likewise.
6803 2004-03-17  Roland McGrath  <roland@redhat.com>
6805         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
6806         first argument to clock_getres so we ever enable kernel timers.
6808 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
6810         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
6812 2004-03-12  Richard Henderson  <rth@redhat.com>
6814         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
6815         oldvalue from CENABLE to CDISABLE.
6817 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
6819         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
6820         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
6821         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
6822         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
6824 2004-03-11  Richard Henderson  <rth@redhat.com>
6826         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
6827         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
6828         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
6830 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
6832         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
6833         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
6834         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
6836 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
6838         * forward.c (__pthread_cond_broadcast_2_0,
6839         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
6840         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
6841         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
6843 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6845         * sysdeps/sh/tcb-offsets.sym: Add PID.
6846         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
6847         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
6849 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
6851         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
6852         include <sysdep-cancel.h>, vfork is no cancellation point.
6853         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
6854         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
6855         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
6857 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
6859         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
6860         libc_hidden_def.
6861         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
6862         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
6863         Likewise.
6864         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
6865         Likewise.
6866         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
6867         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
6868         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
6869         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
6870         of DO_CALL_VIA_BREAK.  Work around a gas problem.
6872         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
6873         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
6874         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
6875         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
6876         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
6877         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
6879         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
6880         a local register for saving old PID.  Negate PID in parent upon exit.
6882         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
6883         tcb-offsets.h.
6884         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
6885         before syscall, set to the old value in the parent afterwards.
6886         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
6887         * sysdeps/unix/sysv/linux/s390/s390-64/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-64/vfork.S: New file.
6892         * sysdeps/s390/tcb-offsets.sym: Add PID.
6894         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
6895         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
6896         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
6897         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
6898         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
6899         * sysdeps/sparc/tcb-offsets.sym: Add PID.
6901 2004-03-10  Andreas Schwab  <schwab@suse.de>
6903         * sysdeps/ia64/tcb-offsets.sym: Add PID.
6904         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
6905         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
6907 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
6909         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
6910         * tst-cancel21.c (do_one_test): Likewise.
6911         Reported by Gordon Jin <gordon.jin@intel.com>.
6913 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
6915         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
6916         if non-zero and set to INT_MIN if zero.
6917         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
6918         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
6919         (SAVE_PID, RESTORE_PID): Define.
6920         (__vfork): Use it.
6921         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
6922         Use relative path to avoid including NPTL i386/vfork.S.
6923         (SAVE_PID, RESTORE_PID): Define.
6924         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
6925         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
6926         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
6927         tst-vfork2x.
6928         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
6929         * tst-vfork1.c: New test.
6930         * tst-vfork2.c: New test.
6931         * tst-vfork1x.c: New test.
6932         * tst-vfork2x.c: New test.
6934 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
6936         * sysdeps/i386/tcb-offsets.sym: Add PID.
6937         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6938         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
6939         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
6941 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
6943         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
6945 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
6947         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
6948         _rtld_global_ro.
6950 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
6952         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
6953         _rtld_global_ro.
6955         * tst-once4.c: Remove unnecessary macro definition.
6957         * tst-mutex7.c (do_test): Limit thread stack size.
6958         * tst-once2.c (do_test): Likewise.
6959         * tst-tls3.c (do_test): Likewise.
6960         * tst-tls1.c (do_test): Likewise.
6961         * tst-signal3.c (do_test): Likewise.
6962         * tst-kill6.c (do_test): Likewise.
6963         * tst-key4.c (do_test): Likewise.
6964         * tst-join4.c (do_test): Likewise.
6965         * tst-fork1.c (do_test): Likewise.
6966         * tst-context1.c (do_test): Likewise.
6967         * tst-cond2.c (do_test): Likewise.
6968         * tst-cond10.c (do_test): Likewise.
6969         * tst-clock2.c (do_test): Likewise.
6970         * tst-cancel10.c (do_test): Likewise.
6971         * tst-basic2.c (do_test): Likewise.
6972         * tst-barrier4.c (do_test): Likewise.
6974 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
6976         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
6978 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
6980         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6981         (__pthread_cond_timedwait): Optimize wakeup test.
6982         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
6983         (__pthread_cond_wait): Likewise.
6984         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6985         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6986         Likewise.
6988 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
6990         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6991         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
6992         the atomic instruction needed.
6993         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6994         (__lll_mutex_lock_wait): Likewise.
6996 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
6998         * Makefile (tests): Add tst-cond14 and tst-cond15.
6999         * tst-cond14.c: New file.
7000         * tst-cond15.c: New file.
7002 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
7004         * sysdeps/pthread/createthread.c (create_thread): Remove use of
7005         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
7006         needs to be implemented differently to be useful.
7008 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
7010         * pthread_attr_setschedparam.c: Don't test priority against limits
7011         here.  Set ATTR_FLAG_SCHED_SET flag.
7012         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
7013         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
7014         from parent thread to child.  If attribute is used and scheduling
7015         parameters are not inherited, copy parameters from attribute or
7016         compute them.  Check priority value.
7017         * pthread_getschedparam.c: If the parameters aren't known yet get
7018         them from the kernel.
7019         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
7020         ATTR_FLAG_POLICY_SET flag for thread.
7021         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
7022         and ATTR_FLAG_POLICY_SET.
7024         * sysdeps/pthread/createthread.c: Use tgkill if possible.
7026         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
7027         fail if stack address hasn't been set.  Just return 0.
7029 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
7031         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
7032         libpthread for the files in this list.
7033         (CFLAGS-tst-unload): Removed.
7034         * tst-unload.c (do_test): Don't use complete path for
7035         LIBPHREAD_SO.
7037         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
7038         tst-_res1mod2.
7040 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
7042         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7043         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
7044         operation per round is needed.
7045         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
7046         (__lll_mutex_lock_wait): Likewise.
7048 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
7050         * tst-cancel9.c (cleanup): Don't print to stderr.
7052 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7054         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
7056 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
7058         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
7059         (__syscall_error_handler2): Call CDISABLE.
7060         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
7061         (__syscall_error_handler2): Call CDISABLE.
7063         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7064         Release lock before the loop, don't reacquire it.
7066         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
7068 2004-02-19  Andreas Schwab  <schwab@suse.de>
7070         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7071         Fix last change.
7073 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
7075         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
7076         (pthread_barrier_wait): After wakeup, release lock only when the
7077         last thread stopped using the barrier object.
7078         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
7079         (pthread_barrier_wait): Likewise.
7080         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7081         Likewise.
7082         * Makefile (tests): Add tst-barrier4.
7083         * tst-barrier4.c: New file.
7085         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7086         (__pthread_cond_timedwait): Perform timeout test while holding
7087         internal lock to prevent wakeup race.
7088         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
7089         * sysdeps/pthread/pthread_cond_timedwait.c
7090         (__pthread_cond_timedwait): Likewise.
7091         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7092         (__pthread_cond_timedwait): Likewise.
7094 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
7096         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
7097         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
7098         * Makefile (tests): Add tst-rwlock13.
7099         * tst-rwlock13.c: New test.
7101 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
7103         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7104         (__condvar_tw_cleanup): Little optimization.
7105         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
7107 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
7109         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
7110         libpthread as "lib" parameter to SHLIB_COMPAT.
7111         (__novmx_siglongjmp): Fix typo in function name.
7112         (__novmx_longjmp): Fix typo in function name.
7114 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
7116         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
7117         __builtin_expect.
7119         * sysdeps/generic/pt-longjmp.c: Moved to...
7120         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
7122 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
7124         * Makefile (libpthread-routines): Add pt-cleanup.
7125         * pt-longjmp.c: Removed.
7126         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
7127         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
7128         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
7129         Version longjmp, siglongjmp for GLIBC_2.3.4.
7130         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
7132 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
7134         * sysdeps/pthread/pthread_cond_timedwait.c
7135         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
7136         Reuse code.  Add __builtin_expects.
7138         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7139         (__pthread_cond_timedwait): Get internal lock in case timeout has
7140         passed before the futex syscall.
7141         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7143 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
7145         * allocatestack.c: Pretty printing.
7147         * sysdeps/pthread/createthread.c (create_thread): Don't add
7148         CLONE_DETACHED bit if it is not necessary.
7150 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
7152         * pthread_getattr_np.c: Include ldsodefs.h.
7154 2004-01-16  Richard Henderson  <rth@redhat.com>
7156         * allocatestack.c: Don't declare __libc_stack_end.
7157         * init.c (__pthread_initialize_minimal_internal): Likewise.
7158         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
7160 2004-01-15  Richard Henderson  <rth@redhat.com>
7162         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
7163         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
7164         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
7165         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
7166         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
7167         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
7168         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
7169         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
7171 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
7173         * init.c (pthread_functions): Make array const.
7175 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
7177         * allocatestack.c (__make_stacks_executable): Change interface.
7178         Check parameters.  Pass parameter on to libc counterpart.
7179         * pthreadP.h: Change declaration.
7181 2004-01-13  Richard Henderson  <rth@redhat.com>
7183         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
7184         prototype form.
7185         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
7186         Likewise.
7188         * sysdeps/alpha/Makefile: New file.
7189         * sysdeps/alpha/tcb-offsets.sym: New file.
7190         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
7191         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
7193         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
7194         on powerpc version.
7196 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
7198         * Makefile (tests): Add tst-backtrace1.
7199         * tst-backtrace1.c: New test.
7201 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
7203         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
7204         register as second parameter to the REGISTER macro.
7205         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
7206         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
7207         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
7208         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
7209         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
7210         of thread register as second parameter to REGISTER macro in 64 case.
7212 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
7214         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
7215         (CFLAGS-getpid.o): Defined.
7216         (CFLAGS-getpid.os): Defined.
7218 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
7220         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
7221         returned for main thread does not overlap with any other VMA.
7222         Patch by Jakub Jelinek.
7224 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
7226         * tst-raise1.c: Include stdio.h.
7228 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
7230         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
7231         setting with __ASSUME_TGKILL || defined __NR_tgkill.
7232         If pid is 0, set it to selftid.
7233         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
7234         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
7235         != 0, return self->tid without doing a syscall.
7236         * descr.h (struct pthread): Move pid field after tid.
7238         * Makefile (tests): Add tst-raise1.
7239         * tst-raise1.c: New file.
7241 2003-12-23  Roland McGrath  <roland@redhat.com>
7243         * tst-oddstacklimit.c: New file.
7244         * Makefile (tests): Add it.
7245         (tst-oddstacklimit-ENV): New variable.
7247         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
7248         value up to page size for __default_stacksize.
7250 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
7252         * Makefile (tests): Add tst-eintr5.
7253         * tst-eintr5.c: New file.
7255         * eintr.c (eintr_source): Prevent sending signal to self.
7257         * tst-eintr2.c (tf1): Improve error message.
7259 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
7261         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
7262         * sysdeps/unix/sysv/linux/getpid.c: New file.
7263         * pthread_cancel.c: Add comment explaining use of PID field.
7264         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
7265         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
7266         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
7267         temporarily to signal the field must not be relied on and updated
7268         by getpid().
7269         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
7270         temporarily negative.
7271         * sysdeps/unix/sysv/linux/raise.c: Likewise.
7273 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
7275         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
7276         (eintr_source): If ARG != NULL, use pthread_kill.
7277         * tst-eintr1.c: Adjust for this change.
7278         * tst-eintr2.c: Likewise.
7279         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
7280         * tst-eintr3.c: New file.
7281         * tst-eintr4.c: New file.
7283 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
7285         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
7286         if CANCELSTATE_BITMASK is set.
7287         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
7288         Likewise.
7290         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
7291         (tests-reverse): Add tst-cancel23.
7292         * tst-cancel22.c: New test.
7293         * tst-cancel23.c: New test.
7295 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
7297         * tst-eintr1.c: Better error messages.
7299         * Makefile (tests): Add tst-eintr2.
7300         * tst-eintr2.c: New file.
7302 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
7304         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
7305         (CFLAGS-tst-cancelx21.c): Set.
7306         * tst-cancel21.c: New test.
7307         * tst-cancelx21.c: New test.
7309         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
7310         comparison operand.
7311         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
7312         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
7313         * pt-longjmp.c: Include jmpbuf-unwind.h.
7314         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
7315         _JMPBUF_UNWINDS.  Adjust compared pointers.
7316         * init.c (__pthread_initialize_minimal_internal): Initialize
7317         pd->stackblock_size.
7318         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
7319         * sysdeps/alpha/jmpbuf-unwind.h: New file.
7320         * sysdeps/i386/jmpbuf-unwind.h: New file.
7321         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
7322         * sysdeps/s390/jmpbuf-unwind.h: New file.
7323         * sysdeps/sh/jmpbuf-unwind.h: New file.
7324         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
7325         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
7326         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
7327         (_JMPBUF_CFA_UNWINDS): Remove.
7328         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
7330 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
7332         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
7333         (CFLAGS-tst-cancelx20.c): Set.
7334         * tst-cancel20.c: New test.
7335         * tst-cancelx20.c: New test.
7337 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
7339         * init.c (__pthread_initialize_minimal_internal): Don't treat
7340         architectures with separate register stack special here when
7341         computing default stack size.
7343 2003-12-17  Roland McGrath  <roland@redhat.com>
7345         * Makefile (tst-cancelx7-ARGS): New variable.
7346         Reportd by Greg Schafer <gschafer@zip.com.au>.
7348 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
7350         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
7351         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
7352         (tst-stack3-ENV): Set.
7353         ($(objpfx)tst-stack3-mem): New.
7354         * tst-stack3.c: New test.
7356 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
7358         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
7359         Add unwind directives.  Drop unused .regstk directive.
7360         (_fini_EPILOG_BEGINS): Add unwind directives.
7362 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
7364         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
7365         Assume parameter is a pointer.
7366         (lll_futex_wake): Likewise.
7367         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
7368         Likewise.
7369         (lll_futex_wake): Likewise.
7370         Reported by Boris Hu.
7371         * sysdeps/unix/sysv/linux/unregister-atfork.c
7372         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
7374         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
7376 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
7378         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
7379         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
7380         __rtld_lock_initialize for ld.so lock.
7381         Patch in part by Adam Li <adam.li@intel.com>.
7383 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
7385         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
7386         in $(gnulib).  Also, remove stale comment.
7388 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
7390         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
7391         advantage of new syscall stub and optimize accordingly.
7393         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
7394         from SYS_futex, to match expectations of
7395         sysdep.h:DO_INLINE_SYSCALL.
7396         (lll_futex_clobbers): Remove.
7397         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
7398         (lll_futex_wake): Likewise.
7399         (lll_futex_requeue): Likewise.
7400         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
7401         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
7402         Jelinek).
7403         (__lll_mutex_lock): Likewise.
7404         (__lll_mutex_cond_lock): Likewise.
7405         (__lll_mutex_timed_lock): Likewise.
7406         (__lll_mutex_unlock): Likewise.
7407         (__lll_mutex_unlock_force): Likewise.
7409         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
7410         comes before the include of <sysdep.h>.
7411         (THREAD_SELF_SYSINFO): New macro.
7412         (THREAD_SYSINFO): Likewise.
7413         (INIT_SYSINFO): New macro.
7414         (TLS_INIT_TP): Call INIT_SYSINFO.
7416         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
7418         * sysdeps/pthread/createthread.c (create_thread): Use
7419         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
7420         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
7421         THREAD_SELF_SYSINFO instead of open code.
7422         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
7423         (THREAD_SYSINFO): Likewise.
7425         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
7427         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
7429 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
7431         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
7432         instead of .init.  Patch by David Mosberger.
7434 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
7436         * sysdeps/pthread/configure.in: Remove broken declaration in C
7437         cleanup handling check.
7439 2003-11-30  Andreas Jaeger  <aj@suse.de>
7441         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
7442         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
7443         Likewise.
7445 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
7447         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
7448         * pthread_attr_destroy.c: Include shlib-compat.h.
7449         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
7450         is set in iattr->flags.
7451         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
7453 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
7455         * Makefile (distribute): Add tst-cleanup4aux.c.
7457         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
7458         include.
7460 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
7462         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
7463         pthread_cond_signal.
7465         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
7466         store mutex address if the current value is ~0l.
7467         * sysdeps/pthread/pthread_cond_timedwait.c
7468         (__pthread_cond_timedwait): Likewise.
7469         * sysdeps/pthread/pthread_cond_broadcast.c
7470         (__pthread_cond_broadcast): Don't use requeue for pshared
7471         condvars.
7473         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7474         (__pthread_cond_wait): Don't store mutex address if the current
7475         value is ~0l.
7476         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7477         (__pthread_cond_timedwait): Likewise.
7478         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
7479         (__pthread_cond_broadcast): Don't use requeue for pshared
7480         condvars.
7482         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
7483         element with ~0l for pshared condvars, with NULL otherwise.
7485         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7486         (__pthread_cond_wait): Don't store mutex address if the current
7487         value is ~0l.
7488         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7489         (__pthread_cond_timedwait): Likewise.
7490         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
7491         (__pthread_cond_broadcast): Don't use requeue for pshared
7492         condvars.
7494         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
7495         * tst-cond12.c: New file.
7496         * tst-cond13.c: New file.
7498 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
7500         * sysdeps/pthread/configure.in: Make missing forced unwind support
7501         fatal.
7503 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
7505         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
7507 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
7509         * Makefile: Add magic to clean up correctly.
7511 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
7513         * unwind.c (FRAME_LEFT): Define.
7514         (unwind_stop): Handle old style cleanups here.
7515         (__pthread_unwind): Handle old style cleanups only if
7516         !HAVE_FORCED_UNWIND.
7517         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
7518         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
7519         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
7520         ($(objpfx)tst-cleanupx4): Likewise.
7521         * tst-cleanup4.c: New test.
7522         * tst-cleanup4aux.c: New.
7523         * tst-cleanupx4.c: New test.
7525 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
7527         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
7528         lll_mutex_*lock macros to skip atomic operations on some archs.
7530 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
7532         * sysdeps/pthread/tst-timer.c (main): Initialize
7533         sigev2.sigev_value as well.
7535 2003-10-15  Roland McGrath  <roland@redhat.com>
7537         * sysdeps/pthread/configure.in: Barf if visibility attribute support
7538         is missing.
7539         * sysdeps/pthread/configure: Regenerated.
7541 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7543         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
7544         locking macros.  No distinction between normal and mutex locking
7545         anymore.
7546         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
7547         Merge bits from lowlevelmutex.S we still need.
7548         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
7549         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7550         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
7551         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
7552         new mutex implementation.
7553         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
7554         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7555         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7556         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7557         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7558         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7559         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7560         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7561         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7562         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
7563         symbol for entry point to avoid cancellation.
7565 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
7567         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
7568         changes.
7569         (SAVE_OLDTYPE_0): Fix a typo.
7571 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
7573         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
7574         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
7576 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
7578         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
7579         correct offset.
7581 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
7583         * Makefile (tests): Add tst-cancel19.
7584         * tst-cancel19.c: New test.
7586 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
7588         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
7589         restoring of the old cancellation type.
7591 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
7593         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
7595 2003-09-27  Wolfram Gloger  <wg@malloc.de>
7597         * sysdeps/pthread/malloc-machine.h: New file
7599 2003-09-24  Roland McGrath  <roland@redhat.com>
7601         * allocatestack.c (__make_stacks_executable): Don't ignore return
7602         value from _dl_make_stack_executable.
7604 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
7606         * allocatestack.c (__make_stacks_executable): Also change
7607         permission of the currently unused stacks.
7609         * allocatestack.c (change_stack_perm): Split out from
7610         __make_stacks_executable.
7611         (allocate_stack): If the required permission changed between the time
7612         we started preparing the stack and queueing it, change the permission.
7613         (__make_stacks_executable): Call change_stack_perm.
7615         * Makefile: Build tst-execstack-mod locally.
7616         * tst-execstack-mod.c: New file.
7618 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
7620         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
7622 2003-09-23  Roland McGrath  <roland@redhat.com>
7624         * tst-execstack.c: New file.
7625         * Makefile (tests): Add it.
7626         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
7627         (LDFLAGS-tst-execstack): New variable.
7629         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
7630         whether to use PROT_EXEC for stack mmap.
7631         (__make_stacks_executable): New function.
7632         * pthreadP.h: Declare it.
7633         * init.c (__pthread_initialize_minimal_internal): Set
7634         GL(dl_make_stack_executable_hook) to that.
7636 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
7638         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
7639         recommendation from AMD re avoidance of lock prefix.
7641 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
7643         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
7644         lll_futex_timed_wait instead of lll_futex_wait.
7645         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
7646         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
7647         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
7648         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
7649         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
7650         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
7651         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
7652         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
7653         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
7654         Completely revamp the locking macros.  No distinction between
7655         normal and mutex locking anymore.
7656         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
7657         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
7658         __lll_lock_timedwait): Fix prototypes.
7659         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
7660         __lll_lock_timedwait): Likewise.
7661         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
7662         macros, add __builtin_expect.
7663         (lll_mutex_timedlock): Likewise.  Fix return value.
7664         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
7665         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
7666         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
7667         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
7668         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
7669         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
7670         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
7671         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
7673 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
7675         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7676         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
7677         operation if possible.
7679         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
7680         like jumping over the lock prefix.
7682 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
7684         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
7685         locking macros.  No distinction between normal and mutex locking
7686         anymore.
7687         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7688         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
7689         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7690         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
7691         locking.  Merge bits from lowlevelmutex.S we still need.
7692         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
7693         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
7694         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
7695         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
7696         * Makefile (routines): Remove libc-lowlevelmutex.
7697         (libpthread-rountines): Remove lowlevelmutex.
7698         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
7699         for new mutex implementation.
7700         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7701         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7702         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7703         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7704         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7705         Likewise.
7706         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7707         Likewise.
7708         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
7709         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7710         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
7711         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
7712         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7713         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7714         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7715         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
7716         Likewise.
7717         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
7718         Likewise.
7719         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
7720         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7721         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7722         Don't use requeue.
7723         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7724         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
7726 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
7728         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
7729         in parameters of asm with output parameters.
7731         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
7732         type of DECR parameter to int.
7733         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
7735 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
7737         * tst-attr3.c (tf, do_test): Print stack start/end/size and
7738         guardsize for each thread.
7740 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
7742         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
7743         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
7744         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
7746         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
7747         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
7748         NULL.
7749         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
7750         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
7751         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7752         (pthread_getaffinity_np): Add hidden_def.
7754         * Makefile (tests): Add tst-attr3.
7755         * tst-attr3.c: New test.
7757         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
7759 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
7761         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
7762         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
7764 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
7766         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
7767         * tst-align.c: Include tst-stack-align.h.
7768         (tf, do_test): Use TEST_STACK_ALIGN macro.
7770 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
7772         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
7773         variable.
7775 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
7777         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
7778         stack-related values for the initial thread.
7780 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
7782         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
7784 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
7786         * pthread_mutex_lock.c: Minor code rearrangements.
7788 2003-09-05  Roland McGrath  <roland@redhat.com>
7790         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
7791         Instead, include ../nptl_db/db_info.c to do its magic.
7792         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
7793         (__pthread_pthread_key_2ndlevel_size): Likewise.
7794         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
7795         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
7796         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
7797         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
7798         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
7799         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
7800         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
7801         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
7802         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
7803         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
7804         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
7805         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
7806         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
7807         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
7808         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
7809         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
7810         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
7812 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
7814         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
7815         of pthread_t to be compatible with LT.
7816         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7817         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7818         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7819         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7820         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
7821         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7822         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7824 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
7826         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
7828 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
7830         * unwind-forcedunwind.c: Move to...
7831         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
7832         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
7833         * sysdeps/pthread/jmpbuf-unwind.h: New file.
7834         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
7835         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
7836         * unwind.c: Include jmpbuf-unwind.h.
7837         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
7839 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
7841         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
7842         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
7843         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
7844         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
7845         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
7846         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
7847         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
7848         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
7849         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
7850         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
7851         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
7852         function.
7853         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
7854         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
7855         * Makefile (tests): Add tst-stack2.
7856         * tst-stack2.c: New test.
7857         * tst-stack1.c: Include limits.h and sys/param.h.
7858         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
7860         * pthread_condattr_setpshared.c: Include errno.h.
7861         (pthread_condattr_setpshared): Return EINVAL if pshared
7862         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
7864         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
7865         defined symbol for entry point to avoid cancellation.
7866         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
7867         Likewise.
7868         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
7869         Likewise.
7870         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
7871         Likewise.
7872         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
7873         Likewise.
7874         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
7875         Likewise.
7876         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
7877         __close_nocancel, __read_nocancel, __write_nocancel,
7878         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
7879         libpthread.so or librt.so, define to corresponding function
7880         without _nocancel suffix.
7881         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
7882         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
7883         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
7885         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
7887 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
7889         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
7890         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
7892         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
7893         in subsections has a symbol associated with it.
7895         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
7896         defined symbol for entry point to avoid cancellation.
7897         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
7899 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
7901         * Makefile (tests): Add tst-tls5.
7902         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
7903         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
7904         ($(objpfx)tst-tls5): New.
7905         ($(objpfx)tst-tls6.out): Likewise.
7906         (tests): Depend on $(objpfx)tst-tls6.out.
7907         * tst-tls3.c: Include stdint.h and pthreaddef.h.
7908         (do_test): Check pthread_self () return value alignment.
7909         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
7910         (tf): Check pthread_self () return value alignment.
7911         * tst-tls5.c: New test.
7912         * tst-tls5.h: New.
7913         * tst-tls5mod.c: New.
7914         * tst-tls5moda.c: New.
7915         * tst-tls5modb.c: New.
7916         * tst-tls5modc.c: New.
7917         * tst-tls5modd.c: New.
7918         * tst-tls5mode.c: New.
7919         * tst-tls5modf.c: New.
7920         * tst-tls6.sh: New test.
7922         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
7923         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
7924         * init.c (pthread_functions): Initialize them.
7925         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
7926         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
7927         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
7928         pthread_cond_timedwait@@GLIBC_2.3.2.
7930 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
7932         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
7933         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
7934         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
7935         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
7936         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
7937         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
7939         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
7941         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
7942         _POSIX_THREAD_PRIORITY_SCHEDULING.
7943         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
7945 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
7947         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
7948         nested function, use static inline function from libio.h.
7949         Code by Richard Henderson.
7951         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
7952         weak.
7954 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
7956         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
7957         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
7958         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
7959         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
7960         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
7961         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
7962         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
7963         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
7964         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
7965         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
7966         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
7967         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
7968         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
7969         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
7970         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
7971         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
7972         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
7973         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
7974         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
7975         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
7976         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
7977         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
7978         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
7979         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
7980         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
7981         * sysdeps/sparc/tls.h: New file.
7982         * sysdeps/sparc/tcb-offsets.sym: New file.
7983         * sysdeps/sparc/Makefile: New file.
7984         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
7985         * init.c [__sparc__] (__NR_set_tid_address): Define.
7987 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
7989         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
7990         _IO_release_lock): Define.
7992 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
7994         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
7995         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
7997 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
7999         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
8000         (__pthread_cleanup_class): Add missing return types of member
8001         functions.
8003 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
8005         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8006         (lll_mutex_unlock_force): Add memory barrier between store and futex
8007         syscall.
8009 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
8011         * tst-cancel4.c (do_test): Also unlink tempfname and remove
8012         tempmsg in first loop.
8014 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
8016         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8017         _POSIX_THREAD_PRIORITY_SCHEDULING.
8018         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8020 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
8022         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
8023         (__rtld_lock_default_lock_recursive,
8024         __rtld_lock_default_unlock_recursive): Define.
8025         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
8026         __rtld_lock_unlock_recursive): Define using
8027         GL(_dl_rtld_*lock_recursive).
8028         * init.c (__pthread_initialize_minimal_internal): Initialize
8029         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
8030         Lock GL(_dl_load_lock) the same number of times as
8031         GL(_dl_load_lock) using non-mt implementation was nested.
8033         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
8034         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
8036 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
8038         * tst-cancel17.c (do_test): Make len2 maximum of page size and
8039         PIPE_BUF.
8041 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
8043         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
8045 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
8047         * sysdeps/pthread/createthread.c (do_clone): Move error handling
8048         to first syscall error check.  Move syscall error check for tkill
8049         into __ASSUME_CLONE_STOPPED #ifdef.
8051 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
8053         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
8054         is not defined, do explicit synchronization.
8055         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
8056         is not defined also unlock pd->lock for non-debugging case in case
8057         it is necessary.
8058         * pthread_create.c (start_thread): Always get and release pd->lock
8059         if __ASSUME_CLONE_STOPPED is not defined.
8060         (start_thread_debug): Removed.  Adjust users.
8061         * allocatestack.c (allocate_stack): Always initialize lock if
8062         __ASSUME_CLONE_STOPPED is not defined.
8063         * Makefile (tests): Add tst-sched1.
8064         * tst-sched1.c: New file.
8066         * sysdeps/pthread/createthread.c (do_clone): Only use
8067         sched_setschduler and pass correct parameters.
8069 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
8071         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
8072         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
8073         PTHREAD_STACK_MIN in comments.
8075 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
8077         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8078         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
8079         argument.
8080         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
8081         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
8082         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
8083         (__pthread_cleanup_upto): Fix prototype.
8084         (_longjmp_unwind): Adjust caller.
8085         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
8086         Change second argument to const struct pointer.
8087         * tst-sem8.c (main): Remove unused s2 and s3 variables.
8088         * tst-sem9.c (main): Likewise.
8089         * unwind.c: Include string.h for strlen prototype.
8091 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
8093         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8094         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
8095         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
8096         Define HAVE_CMOV.
8097         Patch by Nicholas Miell <nmiell@attbi.com>.
8099 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
8101         * init.c (__pthread_initialize_minimal_internal): Initialize
8102         GL(dl_init_static_tls).
8103         * pthreadP.h (__pthread_init_static_tls): New prototype.
8104         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
8105         New functions.
8106         * Makefile (tests): Add tst-tls4.
8107         (modules-names): Add tst-tls4moda and tst-tls4modb.
8108         ($(objpfx)tst-tls4): Link against libdl and libpthread.
8109         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
8110         tst-tls4modb.so.
8111         * tst-tls4.c: New file.
8112         * tst-tls4moda.c: New file.
8113         * tst-tls4modb.c: New file.
8115 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
8117         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
8118         before __timer_dealloc.
8119         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
8120         Don't call list_unlink.
8122 2003-07-29  Roland McGrath  <roland@redhat.com>
8124         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
8126 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
8128         * tst-cancel17.c (do_test): Check if aio_cancel failed.
8129         Don't reuse struct aiocb A if it failed.
8130         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
8131         not just one byte, as that does not block.
8133 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
8135         * sysdeps/pthread/unwind-resume.c: New file.
8136         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
8137         unwind-resume in csu subdir.
8138         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
8139         exceptions.
8140         (librt-sysdep_routines, librt-shared-only-routines): Add
8141         rt-unwind-resume.
8142         * sysdeps/pthread/rt-unwind-resume.c: New file.
8143         * unwind-forcedunwind.c: New file.
8144         * Makefile (libpthread-routines): Add unwind-forcedunwind.
8145         (libpthread-shared-only-routines): Likewise.
8146         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
8147         * pthreadP.h (pthread_cancel_init): New prototype.
8148         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
8150         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
8151         attr argument const struct pthread_attr *.
8153         * res.c (__res_state): Return __resp.
8154         * descr.h: Include resolv.h.
8155         (struct pthread): Add res field.
8156         * pthread_create.c: Include resolv.h.
8157         (start_thread): Initialize __resp.
8158         * Makefile (tests): Add tst-_res1.
8159         (module-names): Add tst-_res1mod1, tst-_res1mod2.
8160         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
8161         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
8162         libpthread.
8163         * tst-_res1.c: New file.
8164         * tst-_res1mod1.c: New file.
8165         * tst-_res1mod2.c: New file.
8167 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
8169         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
8171         * Makefile: Define various *-no-z-defs variables for test DSOs
8172         which has undefined symbols.
8174 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
8176         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
8177         Retry if the stwcx fails to store once_control.
8179 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
8181         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
8182         pthread_attr_setaffinity.
8183         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
8184         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
8185         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
8186         * pthread_attr_destroy.c: Free cpuset element if allocated.
8187         * pthread_create.c: Pass iattr as additional parameter to
8188         create_thread.
8189         * sysdeps/pthread/createthread.c: If attribute is provided and
8190         a new thread is created with affinity set or scheduling parameters,
8191         start thread with CLONE_STOPPED.
8192         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
8193         pthread_attr_setaffinity.
8194         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
8195         cpuset element.
8197 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
8199         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
8201 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
8203         * sysdeps/pthread/configure.in: Require CFI directives also for
8204         ppc and s390.
8206 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
8208         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
8209         Add cfi directives.
8211 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
8213         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
8214         CLEANUP_JMP_BUF.
8215         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
8216         registers as variables.  Call __pthread_mutex_unlock_usercnt.
8217         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8218         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
8219         not self pointer in __writer.  Compare with TID to determine
8220         deadlocks.
8221         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8222         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
8223         Likewise.
8224         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
8225         Likewise.
8226         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
8227         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8228         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
8229         macros also when compiling librt.
8231 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
8233         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
8234         -fasynchronous-unwind-tables.
8235         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
8236         (PSEUDO): Add cfi directives.
8237         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
8238         Likewise.
8239         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
8240         Likewise.
8242 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
8244         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
8245         __pthread_unregister_cancel): Add prototypes and hidden_proto.
8246         * unwind.c (__pthread_unwind_next): Add hidden_def.
8247         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
8248         Likewise.
8249         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
8250         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
8251         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
8252         Likewise.
8253         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
8254         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
8255         Likewise.
8256         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
8257         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
8258         __pthread_unregister_cancel and __pthread_unwind_next.
8260 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
8262         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
8263         different symbol for the cancellation syscall wrapper and
8264         non-cancellation syscall wrapper.
8265         (PSEUDO_END): Define.
8267 2003-07-05  Richard Henderson  <rth@redhat.com>
8269         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
8270         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
8271         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8272         return actual return value from the syscall, not 0.
8274 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
8276         * descr.h (struct pthread): Add pid field.
8277         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
8278         (__reclaim_stacks): Likewise.
8279         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
8280         also check for PID of the signal source.
8281         (__pthread_initialize_minimal_internal): Also initialize pid field
8282         of initial thread's descriptor.
8283         * pthread_cancel.c: Use tgkill instead of tkill if possible.
8284         * sysdeps/unix/sysv/linux/fork.c: Likewise.
8285         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
8286         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8287         * sysdeps/unix/sysv/linux/raise.c: Likewise.
8289 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
8291         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
8292         Fix use of parameter.
8293         (__libc_cleanup_pop): Likewise.
8295 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
8297         * init.c (sigcancel_handler): Change parameters to match handler
8298         for SA_SIGACTION.  Check signal number and code to recognize
8299         invalid invocations.
8301 2003-07-03  Roland McGrath  <roland@redhat.com>
8303         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
8304         Apply sizeof (struct pthread) bias to r13 value.
8306 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
8308         * sysdeps/pthread/configure.in: Require CFI directives.
8310         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
8311         definition.
8312         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
8313         libpthread compilation.
8314         * unwind.c (__pthread_unwind): Add hidden_def.
8315         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
8317 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
8319         * libc-cancellation.c (__libc_cleanup_routine): Define.
8320         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
8321         (__pthread_cleanup_pop): Define.
8323 2003-07-01  Richard Henderson  <rth@redhat.com>
8325         * sysdeps/alpha/elf/pt-initfini.c: New file.
8326         * sysdeps/alpha/pthread_spin_lock.S: New file.
8327         * sysdeps/alpha/pthread_spin_trylock.S: New file.
8328         * sysdeps/alpha/pthreaddef.h: New file.
8329         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
8330         * sysdeps/alpha/tls.h: New file.
8331         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
8332         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
8333         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
8334         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
8335         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
8336         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
8337         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
8338         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
8339         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
8340         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
8342 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
8344         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
8345         cleanup support and unwind info.
8347 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
8349         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
8350         Use correct cleanup handler registration.  Add unwind info.
8351         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
8352         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
8353         * tst-once3.c: Add cleanup handler and check it is called.
8354         * tst-once4.c: Likewise.
8355         * tst-oncex3.c: New file.
8356         * tst-oncex4.c: New file.
8357         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
8359 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
8361         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
8363 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
8365         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
8366         (tf_msgsnd): Likewise.
8368         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
8369         premature returns a bit more.
8371 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
8373         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
8374         definition to the front.
8376         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
8377         the cleanup functions to make the names unique.  Fix dwarf opcode
8378         un unwind table.
8379         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
8380         functions to make the names unique.  Fix CFA offset for two blocks.
8382 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
8384         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
8385         missing closing braces.
8386         Patch by Christophe Saout <christophe@saout.de>.
8388 2003-06-24  Roland McGrath  <roland@redhat.com>
8390         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
8392 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
8394         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
8395         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
8397         * pthreadP.h: Declare __find_thread_by_id.
8398         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
8399         * pthread_clock_gettime.c: Allow using other thread's clock.
8400         * pthread_clock_settime.c: Likewise.
8401         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8402         * Makefile: Add rules to build and run tst-clock2.
8403         * tst-clock2.c: New file.
8405 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
8407         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
8408         to use exception-based cleanup handler.
8409         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8411         * tst-cond8.c (ch): Announce that we are done.
8413         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
8415         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
8416         Also test aio_suspend with timeout value.
8418 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
8420         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
8421         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
8422         attribute_hidden.
8424         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
8425         (__pthread_mutex_lock_internal): Likewise.
8426         (__pthread_mutex_unlock_internal): Likewise.
8427         (__pthread_mutex_unlock_usercnt): Declare.
8428         * pthread_mutex_destroy.c: Always fail if used in any way.
8429         * pthread_mutex_init.c: Update comment.
8430         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
8431         * pthread_mutex_timedlock.c: Adjust __nusers.
8432         * pthread_mutex_trylock.c: Adjust __nusers.
8433         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
8434         and public interfaces are wrapper with pass additional parameter.
8435         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
8436         parameter zero.
8437         * tst-mutex8.c: New file.
8438         * Makefile (tests): Add tst-mutex8.
8439         * sysdeps/pthread/pthread_cond_timedwait.c: Call
8440         __pthread_mutex_unlock_usercnt.
8441         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8442         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8443         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8444         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8445         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8446         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
8447         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8448         Add __nusers.
8449         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8450         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8451         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8452         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8453         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8455         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
8456         * pthread_mutex_timedlock.c: Likewise.
8457         * pthread_mutex_trylock.c: Adjust __nusers.
8458         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
8459         * tst-mutex9.c: New file.
8460         * Makefile (tests): Add tst-mutex9.
8461         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
8462         * sysdeps/ia64/tls.h: Likewise.
8463         * sysdeps/powerpc/tls.h: Likewise.
8464         * sysdeps/s390/tls.h: Likewise.
8465         * sysdeps/sh/tls.h: Likewise.
8466         * sysdeps/x86_64/tls.h: Likewise.
8467         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8468         Change type of __owner.
8469         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8470         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8471         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8472         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8473         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8475 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
8477         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
8478         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
8480         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
8481         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
8482         instead of nr to lll_futex_wake.  Only set errno and return -1
8483         if err < 0.
8485         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
8486         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8487         return actual return value from the syscall, not 0.
8489 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
8491         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
8492         find a random value.
8493         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
8494         errno==EIDRM.
8496         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
8497         compat_timer_settime.
8498         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
8499         compat_timer_gettime.
8500         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
8501         compat_timer_getoverrun.
8502         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
8503         compat_timer_delete.
8505         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
8506         error-checking mutex detect busy mutexes.
8508 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
8510         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
8511         Add ax to clobber list.
8512         (lll_mutex_cond_lock): Likewise.
8513         (lll_mutex_unlock): Likewise.
8514         (lll_lock): Likewise.
8515         (lll_unlock): Likewise.
8517         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
8518         * tst-cancel18.c: New file.
8519         * tst-cancelx18.c: New file.
8521         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
8522         and tcdrain.
8524         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
8525         * tst-cancel17.c: New file.
8526         * tst-cancelx17.c: New file.
8528         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
8529         * sysdeps/unix/sysv/linux/sigwait.c: New file.
8530         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
8532         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
8534 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
8536         * sysdeps/pthread/createthread.c (create_thread): Set
8537         header.multiple_threads unconditionally.
8538         * allocatestack.c (allocate_stack): Likewise.
8539         * descr.h (struct pthread): Add header.multiple_threads
8540         unconditionally.
8541         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
8542         Define for librt.  #error if neither libpthread, libc nor librt.
8543         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
8544         Likewise.
8545         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
8546         CDISABLE): Likewise.
8547         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
8548         CDISABLE): Likewise.
8549         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
8550         CDISABLE): Likewise.
8551         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
8552         CDISABLE): Likewise.  Access header.multiple_threads outside of
8553         libc and libpthread.
8554         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
8555         Likewise.
8556         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
8557         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
8559 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
8561         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
8562         Also test early cancellation before the thread reaches the cancellation
8563         point.
8565         * Makefile: Compile forward.c with exceptions.
8567         * sysdeps/unix/sysv/linux/sleep.c: New file.
8569 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
8571         * Makefile: Add CFLAGS definition to compile function wrappers
8572         duplicated from libc with exceptions.
8573         * tst-cancel4.c: Also check cancellation handlers.
8575         * Makefile: Add rules to build and run tst-cancel16 and
8576         tst-cancelx16.  Add missing CFLAGS definitions.
8577         * tst-cancel16.c: New file.
8578         * tst-cancelx16.c: New file.
8580 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
8582         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8583         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
8584         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
8585         (DL_SYSINFO_IMPLEMENTATION): Likewise.
8587         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
8588         (LIBC_CANCEL_RESET): Likewise.
8589         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
8590         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
8591         librt-cancellation.
8592         (CFLAGS-libcrt-cancellation.c): Define.
8593         * sysdeps/pthread/librt-cancellation.c: New file.
8594         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
8595         macros also when compiling librt.
8596         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
8597         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
8598         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
8599         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
8600         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
8601         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
8602         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
8604         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
8605         compat_timer_create.
8607 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
8609         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
8611         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
8612         __register_atfork.
8613         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
8614         Add libc_hidden_def.
8616 2003-06-13  Roland McGrath  <roland@redhat.com>
8618         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
8619         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
8621 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
8623         * allocatestack.c (queue_stack): Always inline.
8624         * ptreadhP.h (__do_cancel): Likewise.
8626 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
8628         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
8629         a typo.
8631 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
8633         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8634         (__pthread_cond_signal): Remove incorrect second addition for
8635         cond_lock!=0.
8637 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
8639         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8640         (__pthread_cond_signal): Use correct futex pointer in
8641         __lll_mutex_lock_wait call.
8643         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8644         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
8646 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
8648         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
8649         cancelable.
8650         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
8651         Likewise.
8653         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
8654         hand-written CFI generation code.  Since ENTRY/END also initiated
8655         CFI frames this caused two CFI sets to be generated.
8657 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
8659         * cleanup_routine.c: New file.
8660         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
8661         * sysdeps/pthread/pthread.h: Add support for fully exception-based
8662         cleanup handling.
8663         * Makefile (libpthread-routines): Add cleanup_routine.
8664         Add more CFLAGS variables to compile with exceptions.  Add comments
8665         why which file needs unwind tables.
8666         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
8667         tests.
8668         * tst-cancelx1.c: New file.
8669         * tst-cancelx2.c: New file.
8670         * tst-cancelx3.c: New file.
8671         * tst-cancelx4.c: New file.
8672         * tst-cancelx5.c: New file.
8673         * tst-cancelx6.c: New file.
8674         * tst-cancelx7.c: New file.
8675         * tst-cancelx8.c: New file.
8676         * tst-cancelx9.c: New file.
8677         * tst-cancelx10.c: New file.
8678         * tst-cancelx11.c: New file.
8679         * tst-cancelx12.c: New file.
8680         * tst-cancelx13.c: New file.
8681         * tst-cancelx14.c: New file.
8682         * tst-cancelx15.c: New file.
8683         * tst-cleanupx0.c: New file.
8684         * tst-cleanupx0.expect: New file.
8685         * tst-cleanupx1.c: New file.
8686         * tst-cleanupx2.c: New file.
8687         * tst-cleanupx3.c: New file.
8689         * tst-cleanup0.c: Make standard compliant.
8690         * tst-cleanup1.c: Likewise.
8692         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
8693         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
8694         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8695         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8696         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8697         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8698         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
8699         CLEANUP_JMP_BUF.
8700         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8701         * tst-cancel12.c: New file.
8702         * tst-cancel13.c: New file.
8703         * tst-cancel14.c: New file.
8704         * tst-cancel15.c: New file.
8705         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
8706         and tst-cancel15.
8708         * tst-cancel1.c: Add some comments.
8710         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
8711         timeout correctly.
8713 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
8715         * Makefile (CFLAGS-pthread_cancel.c): Define.
8717 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
8719         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
8720         Change type of __writer element to int.
8721         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8722         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8723         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8724         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8725         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8726         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
8727         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8728         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
8729         Compare with TID to determine deadlocks.
8730         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8731         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8732         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
8733         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8734         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8735         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8736         Likewise.
8737         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8738         Likewise.
8739         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8740         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8741         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
8742         Likewise.
8743         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
8744         Likewise.
8745         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8746         * Makefile (tests): Add tst-rwlock12.
8747         * tst-rwlock12.c: New file.
8749 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
8751         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
8752         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
8753         Remove bogus hidden_proto.
8754         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8755         Likewise.
8756         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
8757         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
8758         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
8759         ___lll_mutex_timedlock): Likewise.
8761 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
8763         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8764         (__pthread_cond_signal): Add some code to eventually handle
8765         cond_lock!=0.
8767 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
8769         * Makefile (tests): Add tst-exec4.
8770         (tst-exec4-ARGS): Define.
8771         * tst-exec4.c: New file.
8773 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
8775         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
8776         Also fail if tv_nsec < 0.
8777         (__lll_timedwait_tid): Likewise.
8778         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
8779         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
8780         Likewise.
8781         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
8782         Likewise.
8783         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
8784         Likewise.
8785         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
8786         Likewise.
8787         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
8788         Likewise.
8789         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
8790         Likewise.
8792         * Makefile (tests): Add tst-sem8 and tst-sem9.
8793         * tst-sem8.c: New file.
8794         * tst-sem9.c: New file.
8795         * sem_open.c: Fix creation of in_use record if the file exists but
8796         no internal record.
8798         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
8799         definitions.
8801         * sysdeps/pthread/timer_create.c (timer_create): In case
8802         evp==NULL, assign timer ID to sival_ptr.
8804         * descr.h (struct pthread_unwind_buf): Change type of prev element to
8805         struct pthread_unwind_buf *.
8806         (struct pthread): Likewise for cleanup_jmp_buf element.
8808         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
8809         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
8810         * unwind.c (__pthread_unwind_next): Likewise.
8812 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
8814         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8815         (lll_futex_timed_wait): Use int for futex value parameter.
8816         (lll_futex_wake): Likewise.
8817         (lll_futex_requeue): Likewise.
8819         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
8820         Replace one memory operation with one register operation.
8822         * tst-join4.c (do_test): Fix error message.
8824         * tst-rwlock6.c (do_test): Use correct format specifier.
8826         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8827         (__lll_mutex_lock_wait): Replace one memory operation with one
8828         register operation.
8829         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
8830         (__lll_mutex_lock_wait): Likewise.
8832         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8833         (__lll_mutex_cond_lock): Add one to value parameter of
8834         __lll_lock_wait to reflect reality in the futex syscall.
8835         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8836         (lll_mutex_cond_lock): Likewise.
8838 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
8840         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
8841         New function.
8842         (lll_mutex_cond_lock): Define.
8844 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
8846         * Makefile (tests): Add tst-signal6.
8847         * tst-signal6.c: New file.
8849         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
8850         (__lll_mutex_unlock_force): New function
8851         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
8853         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8854         (__lll_mutex_unlock_force): New function.
8855         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
8857         * tst-rwlock7.c (do_test): Use correct format specifier.
8859         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
8860         Find break parameter in correct asm argument.
8862 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
8864         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
8865         Remove out4.
8866         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
8867         error occured.
8868         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
8869         Add __mutex.
8870         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
8871         lll_futex_requeue, lll_mutex_unlock_force): Define.
8873 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
8875         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
8876         (pthread_cond_t): Add __mutex.
8877         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
8878         lll_futex_requeue, lll_mutex_unlock_force): Define.
8880 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
8882         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
8883         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
8884         Add __mutex field.
8885         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
8886         Define.
8887         (lll_futex_wait, lll_futex_wake): Define.
8888         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
8889         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
8890         FUTEX_REQUEUE instead of FUTEX_WAIT.
8891         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
8892         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
8893         mutex which was used in condvar structure.  Call
8894         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
8895         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
8897         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
8898         include tcb-offsets.h.  Read wakeup value in locked region.
8899         Use the value of gbr register as THREAD_ID.
8900         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8901         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8902         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8904         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
8905         macros.
8907 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
8909         * sysdeps/pthread/pthread_cond_broadcast.c
8910         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
8912 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
8914         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
8915         typo in register name.
8916         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
8917         correctly.  Actually use requeue.  Little optimization.
8918         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
8919         mutex address early.  Handle cancellation state as 32-bit value.
8920         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8921         Remove unnecessary label.
8923 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
8925         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
8926         instead of FUTEX_WAIT.
8927         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
8928         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8929         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8930         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
8931         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8932         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
8933         used in condvar structure.  Call __pthread_mutex_cond_lock instead
8934         of __pthread_mutex_lock_internal.
8935         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8936         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8937         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8938         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
8939         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8940         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8941         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
8942         Add pthread_mutex_cond_lock.
8943         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
8944         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
8945         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
8946         lll_mutex_cond_lock.
8947         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
8948         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8949         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
8950         Add __mutex field.
8951         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8952         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8954         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
8955         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8957         * pthreadP.h: Declare __pthread_mutex_cond_lock.
8958         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
8959         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
8960         macro don't define aliases.
8962         * cancellation.c: Remove __pthread_enable_asynccancel_2.
8963         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
8964         * sysdeps/pthread/pthread_cond_timedwait.c: Use
8965         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
8966         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8967         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8968         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8969         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8970         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8972 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
8974         * sem_open.c: Fix one endless loop.  Implement correct semantics
8975         wrt opening the same semaphore more then once.
8976         * sem_close.c: Adjust for sem_open change.
8977         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
8978         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
8979         * Makefile (tests): Add tst-sem7.
8980         * tst-sem7.c: New file.
8982 2003-05-16  Roland McGrath  <roland@redhat.com>
8984         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
8985         uninitialized variable braino.
8987 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
8989         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
8990         test for syscall availability.
8992         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
8993         __no_posix_timers to -1 if the syscalls don't exist.
8995         * pthread_join.c (pthread_join): Set tid field of the joined
8996         thread to -1.  This isn't necessary but helps to recognize some
8997         error conditions with almost no cost.
8999         * allocatestack.c (FREE_P): Also negative values indicate an
9000         unused stack.
9002         * unwind.c: Include <unistd.h>.
9004 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
9006         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
9008 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
9010         * Makefile (crti-objs, crtn-objs): New variables.
9011         (omit-deps, extra-objs): Add crtn.
9012         ($(objpfx)libpthread.so): Depend on both crti and crtn
9013         and links to them in multidir.
9014         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
9016 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
9018         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
9019         (lll_mutex_unlock): Use atomic_exchange_rel.
9021 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
9023         * cond-perf.c (cons): Add missing locking around setting of alldone.
9025 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
9027         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
9028         related macros.
9029         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9031 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
9033         * tst-sem6.c: New file.
9034         * Makefile (tests): Add tst-sem6.
9036         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
9037         Use atomic_exchange_rel instead of atomic_exchange.
9038         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
9039         Likewise.
9041         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
9042         code for lll_futex_wait and lll_futex_wake in static apps.  Use
9043         vsyscall is possible.
9045         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
9046         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
9047         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
9048         pthread_setaffinity_np.
9049         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
9050         and pthread_setaffinity_np.
9051         * Makefile (libpthread-routines): Add pthread_getaffinity and
9052         pthread_setaffinity.
9054         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
9055         use it in case mmap to allocate the stack fails.
9056         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
9057         ARCH_MAP_FLAGS here.
9058         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
9059         ARCH_RETRY_MMAP.
9061 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
9063         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
9064         handler implementation.  It is now lockless in fork().
9065         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
9066         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
9067         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
9068         declare the __fork_*_lists.
9069         (struct fork_handler): Include pointers to all three functions.
9070         Add next, refcntr and need_signal elements.
9071         (__fork_handlers): New declaration.
9072         (__register_atfork_malloc): Remove declaration.
9073         (HAVE_register_atfork_malloc): Remove definition.
9074         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
9075         __pthread_child_handler variable.
9076         (__libc_pthread_init): Use __register_atfork instead of explicitly
9077         adding to the list.
9078         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
9079         and lll_futex_wake.
9080         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9082         * unwind.c (unwind_cleanup): Print error message and then abort.  This
9083         function must never be reached.
9085         * cond-perf.c: New file.
9087 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
9089         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
9091 2003-05-04  Roland McGrath  <roland@redhat.com>
9093         * Makefile ($(objpfx)../libc.so): New target.
9095 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
9097         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9098         (pthread_condattr_t): Size is only an int, don't use long for
9099         alignment.
9100         (pthread_mutexattr_t): Likewise.
9101         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9102         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9103         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9105 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
9107         * sysdeps/i386/tls.h: Define THREAD_ID.
9108         * sysdeps/ia64/tls.h: Likewise.
9109         * sysdeps/powerpc/tls.h: Likewise.
9110         * sysdeps/s390/tls.h: Likewise.
9111         * sysdeps/sh/tls.h: Likewise.
9112         * sysdeps/x86_64/tls.h: Likewise.
9113         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
9114         record ownership.
9115         * pthread_mutex_timedlock.c: Likewise.
9116         * pthread_mutex_trylock.c: Likewise.
9117         * pthread_mutex_unlock.c: Likewise.
9118         * pthread_rwlock_trywrlock.c: Likewise.
9119         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
9120         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9121         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
9122         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9124         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
9125         flag.
9127 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
9129         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9130         (__SIZEOF_PTHREAD_COND_T): Define to 48.
9131         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
9132         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
9133         Make __align long long instead of long.
9134         (pthread_rwlock_t): Formatting.
9135         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
9136         (pthread_rwlock_t): Formatting.
9137         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9138         (pthread_cond_t): Make __align long long instead of long.
9139         (pthread_rwlock_t): Move __flags field to the same position as in
9140         linuxthreads.
9142 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
9144         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
9145         * tst-rwlock7.c (do_test): Likewise.
9147 2003-04-26  Roland McGrath  <roland@redhat.com>
9149         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
9151 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
9153         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
9154         sizeof (struct pthread).
9155         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
9156         1 struct pthread.
9157         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
9158         to 0.
9159         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
9160         struct pthread.
9161         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
9162         to 32-bit bytes.
9163         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
9164         tcbp.
9165         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
9166         unneccessarily.
9167         (NO_TLS_OFFSET): Define.
9168         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
9169         add TLS_TCB_SIZE unnecessarily.
9171 2003-04-22  Roland McGrath  <roland@redhat.com>
9173         * Makeconfig (shared-thread-library): Reverse link order to work
9174         around linker bug.
9176 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
9178         * semaphore.h: Fix typo in comment.
9180 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
9182         * sysdeps/pthread/sigfillset.c: New file.
9184         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
9185         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
9186         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
9187         * sysdeps/pthread/sigaction.c: Likewise.
9188         * sysdeps/pthread/sigprocmask.c: New file.
9189         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
9190         __SIGRTMIN+1.
9191         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9192         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
9193         in this case.
9195 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
9197         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9198         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
9200         * sysdeps/unix/sysv/linux/unregister-atfork.c
9201         (__unregister_atfork): Don't free memory not allocated dynamically.
9203         * semaphore.h: Remove __THROW marker from cancellation points.
9204         * nptl/sysdeps/pthread/pthread.h: Likewise.
9206 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
9208         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
9209         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
9210         __THROW.
9212 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
9214         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
9216 2003-04-15  Roland McGrath  <roland@redhat.com>
9218         * forward.c (__pthread_unwind): Tweak to avoid warning.
9220 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
9222         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
9224 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
9226         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
9227         overflow CFA advance instructions.
9228         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9230 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
9232         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
9233         * sysdeps/i386/pthread_spin_lock.c: Likewise.
9234         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
9235         defined.
9237         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
9238         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
9239         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
9240         DW_CFA_advance_loc for .Laddl-.Lsubl.
9242 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
9244         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
9245         position-independent unwind data for static libraries.
9246         Add missing unwind info.  Add comments.
9248         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
9249         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9250         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9251         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9253 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
9255         * Makefile: Make sure all cancellation points are compiled with
9256         exception and asynchronous unwind tables.
9258         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
9259         which mishandles loading of global object addresses in PIC.
9260         (THREAD_SETMEM_NC): Likewise.
9262 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
9264         * pthread.h: Define new data structure for cleanup buffer.  Declare
9265         new cleanup handler interfaces.
9266         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
9267         (struct pthread): Add cleanup_jmp_buf pointer.  Define
9268         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
9269         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
9270         it.  Declare old cleanup handler installation functions.
9271         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
9272         handling.
9273         * cleanup_defer.c: Likewise.
9274         * cleanup_compat.c: New file.  Old cleanup code.
9275         * cleanup_def_compat.c: New file.  Old cleanup code.
9276         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
9277         if own thread descriptor.
9278         * unwind.c: New file.
9279         * forward.c: Add __pthread_unwind.
9280         * init.c (pthread_functions): Add __pthread_unwind.
9281         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
9282         Add ptr___pthread_unwind.
9283         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
9284         and unwind function.
9285         * Makefile (libpthread-routines): Add cleanup_compat,
9286         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
9287         table generation if necessary.
9288         * version.c: Record whether unwind support is compiled in.
9289         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
9290         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
9291         handler interfaces.
9292         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
9293         complication to generate unwind information for syscall wrappers.
9294         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
9295         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
9296         __cleanup_fct_attribute.
9298         * Makefile: Add rules to build and run tst-cleanup0.
9299         * tst-cleanup0.c: New file.
9300         * tst-cleanup0.expect: New file.
9302         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
9303         caller.  Optimize to avoid often unecessary local variable.
9305 2003-04-11  Roland McGrath  <roland@redhat.com>
9307         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
9308         sets variable `multidir'; include that.
9309         (generated): Add it.
9310         ($(objpfx)$(multidir)/crti.o): New target.
9311         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
9313 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
9315         * tst-attr2.c (do_test): Add cast to avoid warning.
9316         * tst-mutex4.c (do_test): Likewise.
9318 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
9320         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
9321         in child.
9323 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
9325         * Makefile (tests): Add tst-detach1.
9326         * tst-detach1.c: New file.
9328 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
9330         * sysdeps/pthread/pthread.h: Remove duplicate
9331         pthread_cleanup_{push,pop} definitions.
9333         * tst-barrier2.c: Eliminate warnings.
9334         * tst-cancel4.c: Likewise.
9335         * tst-cond4.c: Likewise.
9336         * tst-cond6.c: Likewise.
9337         * tst-detach1.c: Likewise.
9338         * tst-rwlock4.c: Likewise.
9339         * tst-rwlock6.c: Likewise.
9340         * tst-rwlock7.c: Likewise.
9341         * tst-sem3.c: Likewise.
9342         * tst-spin2.c: Likewise.
9343         * tst-umask1.c: Likewise.
9345 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
9347         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
9349 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
9351         * descr.h (struct pthread): Move cancelhandling member to the front.
9353 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
9355         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
9356         malloc_parent, and malloc_child statically.
9357         (__register_atfork_malloc): New function.
9358         (free_mem): Don't free any of the malloc_* variables on the list.
9359         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
9360         Define HAVE_register_atfork_malloc.
9362 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
9364         * sysdeps/pthread/createthread.c (create_thread): Add some more
9365         comments explaining when to set multiple_threads and when not.
9367         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9368         THREAD_ATOMIC_BIT_SET if not already defined.
9369         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9370         THREAD_ATOMIC_BIT_SET:
9371         * sysdeps/x86_64/tls.h: Likewise.
9372         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
9373         THREAD_ATOMIC_CMPXCHG_VAL.
9374         (_pthread_cleanup_pop_restore): Likewise.
9375         * cancellation.c (__pthread_enable_asynccancel): Likewise.
9376         (__pthread_enable_asynccancel_2): Likewise.
9377         (__pthread_disable_asynccancel): Likewise.
9378         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9379         (__libc_disable_asynccancel): Likewise.
9380         * init.c (sigcancel_handler): Likewise.
9381         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
9382         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
9384 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
9386         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
9387         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9388         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
9389         * Makefile (tests): Add tst-cancel11.
9390         * tst-cancel11.c: New file.
9392 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
9394         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
9395         round, not the first.  Use specific_used flag instead of local
9396         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
9397         (__free_tcb): Don't call deallocate_tsd here.
9398         (start_thread): Call deallocate_tsd here.
9399         * pthread_setspecific.c: Set specific_used flag really only when
9400         needed.
9401         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
9402         * tst-tsd3.c: New file.
9403         * tst-tsd4.c: New file.
9405 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
9407         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
9408         Use atomic_exchange_and_add instead of __lll_add.
9409         (__lll_mutex_timedlock): Likewise.
9410         Patch by Ian Wienand.
9412 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
9414         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9415         (SINGLE_THREAD_P): Fix typo.
9416         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
9418 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
9420         * Makefile (tests): Add tst-align.
9421         * tst-align.c: New file.
9422         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
9424         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
9425         function correctly.
9427         * tst-tsd2.c: Add casts to avoid warnings.
9429 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
9431         * descr.h (struct pthread): Move most often used elements to the front.
9433 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
9435         * Makefile (libpthread-routines): Add pthread_atfork.
9436         (libpthread-static-only-routines): Add pthread_atfork.
9438 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
9440         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
9441         of TLS_DTV_AT_TP.
9442         (INSTALL_DTV): Add parens.
9443         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
9444         Use passed descr instead of THREAD_SELF.
9445         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
9446         (__lll_mutex_timedlock_wait): Correct expected value after
9447         spurious wakeup.
9448         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
9449         Release lock before waking up the waiters.
9450         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
9451         criteria.  Reorderstruct passed to cleanup handler.  Fix
9452         handling of cancellation and failung pthread_mutex_unlock call.
9453         Use __pthread_enable_asynccancel_2 instead of
9454         __pthread_enable_asynccancel.
9455         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
9456         Return result of lock re-get if it fails.
9457         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
9458         for __pthread_cleanup_push.
9459         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
9460         completely broken rwlock implementation.
9461         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9462         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9463         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9464         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
9465         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9466         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
9467         versioned_symbol macro.
9468         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
9469         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
9471 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
9473         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
9474         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
9475         and __helper_tid.
9476         (struct timer): Remove th and bar field.
9477         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
9478         debugging code.  Create only one helper thread.
9479         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
9480         helper thread.
9481         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9482         Renamed.  Define statically.  Use thread info from siginfo.
9483         (__helper_once): New variable.
9484         (__helper_tid): New variable.
9485         (__reset_helper_control): New function.
9486         (__start_helper_thread): New function.
9488         * pthread_create.c (start_thread): Don't use setjmp inside
9489         __builtin_expect to work around gcc bug.
9491         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
9492         timer_delete syscall fails, but not with ENOSYS, set
9493         __no_posix_timers.
9495         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
9496         (timer_settime): Fix typo.
9497         * sysdeps/unix/sysv/linux/timer_getoverr.c
9498         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
9500 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
9502         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
9503         offset of cleanupbuf.__prev.
9505 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
9507         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
9508         of included file.
9510 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
9512         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
9513         NULL provide default definition to syscall.
9515 2003-03-25  Roland McGrath  <roland@redhat.com>
9517         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
9518         (timer_id2ptr): Fix typo.
9520 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
9522         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
9523         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
9524         * sysdeps/ia64/pthreaddef.h: Likewise.
9525         * sysdeps/powerpc/pthreaddef.h: Likewise.
9526         * sysdeps/s390/pthreaddef.h: Likewise.
9527         * sysdeps/sh/pthreaddef.h: Likewise.
9528         * sysdeps/x86_64/pthreaddef.h: Likewise.
9529         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
9530         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
9531         being changed.
9532         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
9533         SIGTIMER is not unblocked.
9534         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
9535         RT signal taken.
9536         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
9537         be send.
9538         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
9539         pass pointer through as ID.
9540         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
9541         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
9542         * sysdeps/unix/sysv/linux/timer_create.c: New file.
9543         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
9544         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
9545         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
9546         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
9547         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
9548         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
9549         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
9550         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
9551         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
9552         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
9553         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
9554         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
9555         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
9556         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
9557         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
9558         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
9559         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
9560         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
9561         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
9562         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
9563         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
9564         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
9565         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
9566         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
9567         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
9568         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
9569         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
9570         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
9571         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
9572         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
9574         * pthreadP.h: Remove FRAME_LEFT definition.
9575         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
9576         already left frame.  Programs which have this problem are not POSIX
9577         compliant.
9578         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
9580 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
9582         * sysdeps/pthread/tst-timer.c: Check return values of the
9583         functions we test.
9585 2003-03-23  Roland McGrath  <roland@redhat.com>
9587         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
9588         * tst-tls3mod.c: Likewise.
9589         * tst-tls1.c: Likewise.
9590         * tst-tls2.c: Likewise.
9592         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
9593         undefined behavior.
9595         * tst-join5.c (tf1, tf2): Add a cast.
9597         * Makeconfig (includes): Append -I$(..)nptl to this variable.
9599         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
9600         Don't test anything.
9601         * tst-cond4.c: Likewise.
9602         * tst-cond6.c: Likewise.
9603         * tst-flock2.c: Likewise.
9604         * tst-mutex4.c: Likewise.
9605         * tst-rwlock4.c: Likewise.
9606         * tst-signal1.c: Likewise.
9607         * tst-spin2.c: Likewise.
9608         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
9610         * tst-mutex4.c: Use test-skeleton.c.
9611         * tst-spin2.c: Likewise.
9612         * tst-sysconf.c: Likewise.
9613         * tst-barrier2.c: Likewise.
9614         * tst-cond4.c: Likewise.
9615         * tst-cond6.c: Likewise.
9616         * tst-rwlock4.c: Likewise.
9617         * tst-unload.c: Likewise.
9618         * tst-flock2.c (do_test): Use return instead of exit.
9620 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
9622         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
9624 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
9626         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9627         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
9628         instead of __lll_compare_and_swap.
9629         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
9630         Likewise.
9631         Removed definition if __lll_compare_and_swap.
9633         * cancellation.c: Adjust for new form of compare&exchange macros.
9634         * cleanup_defer.c: Likewise.
9635         * init.c: Likewise.
9636         * libc-cancellation.c: Likewise.
9637         * old_pthread_cond_broadcast.c: Likewise.
9638         * old_pthread_cond_signal.c: Likewise.
9639         * old_pthread_cond_timedwait.c: Likewise.
9640         * old_pthread_cond_wait.c: Likewise.
9641         * pthread_cancel.c: Likewise.
9642         * pthread_create.c: Likewise.
9643         * pthread_detach.c: Likewise.
9644         * pthread_join.c: Likewise.
9645         * pthread_key_delete.c: Likewise.
9646         * pthread_setcancelstate.c: Likewise.
9647         * pthread_setcanceltype.c: Likewise.
9648         * pthread_timedjoin.c: Likewise.
9649         * pthread_tryjoin.c: Likewise.
9650         * sysdeps/pthread/createthread.c: Likewise.
9652 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
9654         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
9655         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
9656         definitions.  Replace uses with calls to atomic_* functions.
9657         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
9658         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
9659         __lll_test_and_set calls with atomic_exchange_and_add and
9660         atomic_exchange calls respectively.
9661         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
9662         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
9663         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
9664         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
9665         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
9666         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
9667         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
9669         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
9670         returns the old value.
9672 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
9674         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
9675         int for variable OLDVAL and correct inline assembler contraint.
9676         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
9677         type int for variable OLD.
9679         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
9680         only for s390-32.
9681         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
9682         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
9683         instead of multiple_threads field in the TCB.
9685 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
9687         * sysdeps/i386/i686/bits/atomic.h: Removed.
9688         * sysdeps/i386/i586/bits/atomic.h: Removed.
9689         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
9690         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
9691         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
9692         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
9693         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
9694         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
9695         * atomic.h: Removed.  Moved to glibc.
9697         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
9698         support for clock selection.
9700         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
9701         signalling waiters.
9703 2003-03-18  Roland McGrath  <roland@redhat.com>
9705         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
9706         Add __lll_rel_instr first.  Add memory clobber.
9707         (lll_mutex_unlock): Use __lll_test_and_set.
9708         From Paul Mackerras <paulus@samba.org>.
9710         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
9711         unconditionally.
9712         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9713         (SINGLE_THREAD_P):  Add `header.' prefix.
9714         From Paul Mackerras <paulus@samba.org>.
9716         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
9717         pthread_timedjoin_np to ...
9718         (libpthread: GLIBC_2.3.3): ... here.
9719         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
9721         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
9722         Avoid shadowing VAL variable.
9724         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
9725         New macro.
9727 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
9729         * Makefile (tests): Add tst-cond11.
9730         * tst-cond11.c: New file.
9732         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
9733         struct passed to cleanup handler to eliminate one more
9734         instruction.
9735         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9737         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9738         (pthrad_cond_t): Replace __unused field with __clock.
9740         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
9741         waken all waiters in cleanup handler.
9742         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9743         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9745         * pthread_condattr_getclock.c: New file.
9746         * pthread_condattr_setclock.c: New file.
9747         * sysdeps/pthread/pthread.h: Declare these new functions.
9748         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
9749         * Makefile (libpthread-routines): Add the new functions.
9750         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
9751         Renamed field to value.  Document use of the bits.
9752         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
9753         change.
9754         * pthread_condattr_setpshared.c: Likewise.
9755         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
9756         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
9757         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9758         Add __clock field.
9759         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9760         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9761         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9762         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
9763         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
9764         Implement clock selection.
9765         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
9766         * pthread-errnos.sym: Add ENOSYS.
9767         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
9768         _POSIX_CLOCK_SELECTION.
9769         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
9771         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
9772         invalid .size directive.
9774 2003-03-17  Roland McGrath  <roland@redhat.com>
9776         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
9777         Formatting tweaks.
9779 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
9781         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
9782         Use __lll_add instead of spelling it out.  Use protected symbol names.
9783         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
9784         Use __lll_add.
9785         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
9786         Renamed from lll_compare_and_swap.  Use new name where necessary.
9787         (__lll_add): Defined.
9788         (__lll_dec_if_positive): Defined.
9789         (__lll_test_and_set): Defined.
9790         * sysdeps/ia64/pthread_spin_init.c: Removed.
9791         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
9792         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
9793         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
9794         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
9795         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
9796         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
9797         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
9798         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
9799         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
9800         __sync_lock_release_si.
9801         Patch by Jakub Jelinek.
9803         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
9804         Fix timeout handling.
9805         (__lll_timedwait_tid): Likewise.
9806         (lll_unlock_wake_cb): Wake up other waiters if necessary.
9807         Patch by Jakub Jelinek.
9809         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
9811 2003-03-17  Roland McGrath  <roland@redhat.com>
9813         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
9814         * sysdeps/pthread/pthread_spin_init.c: New file.
9815         * sysdeps/pthread/pthread_spin_unlock.c: New file.
9816         * sysdeps/powerpc/Makefile: New file.
9817         * sysdeps/powerpc/pthread_spin_lock.c: New file.
9818         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
9819         * sysdeps/powerpc/pthreaddef.h: New file.
9820         * sysdeps/powerpc/tcb-offsets.sym: New file.
9821         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
9822         * sysdeps/powerpc/tls.h: New file.
9823         * sysdeps/powerpc/bits/atomic.h: New file.
9824         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
9825         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
9826         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
9828         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
9829         * sysdeps/unix/sysv/linux/sem_post.c: New file.
9830         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
9831         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
9832         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
9833         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
9834         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
9835         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
9836         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
9837         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
9838         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
9839         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
9840         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
9841         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
9842         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
9844         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
9845         not gettimeofday.
9846         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
9847         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
9848         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
9849         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
9850         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
9852 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
9854         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
9855         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
9856         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9857         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9858         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
9860 2003-03-16  Roland McGrath  <roland@redhat.com>
9862         * tst-fork4.c: Include <string.h>.
9863         * tst-signal2.c: Likewise.
9864         * tst-mutex5.c (do_test): exit -> return.
9865         * tst-mutex2.c: Include <stdlib.h>.
9867 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
9869         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9870         (__lll_mutex_timedlock_wait): Correct expected value after
9871         spurious wakeup.  Otherwise we would never wait again.
9873         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
9874         zone versus inline asm stupidity.  Use correct instructions.
9876         * tst-rwlock6.c: Add some more status output.
9878 2003-03-15  Roland McGrath  <roland@redhat.com>
9880         * sysdeps/pthread/configure.in: New file.
9881         * sysdeps/pthread/configure: New file (generated).
9883 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
9885         * allocatestack.c (allocate_stack): Store the exact stack size of
9886         user allocated stacks.
9888 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
9890         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
9891         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
9892         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
9893         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
9894         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
9895         Use `header.' prefix.
9896         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
9898 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
9900         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
9901         __builtin_frame_address, use stack pointer.
9903         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
9904         instead of __builtin_frame_pointer.
9906 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
9908         * tst-basic1.c (do_test): Add cast to avoid warning.
9909         * tst-basic2.c (do_test): Likewise.
9911         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
9912         amount of stack correction.
9914         * tst-fork4.c: Use test-skeleton.c.
9916 2003-03-14  Roland McGrath  <roland@redhat.com>
9918         * init.c: Fix typo "#eli" for "#else".
9920 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
9922         * allocatestack.c (__stack_user): Use hidden_data_def.
9923         * pthread_create.c (__pthread_keys): Likewise.
9925         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
9927 2003-03-14  Roland McGrath  <roland@redhat.com>
9929         * tst-fork4.c: New file.
9930         * Makefile (tests): Add it.
9932         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
9933         we always define the padding space.
9934         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
9935         stopped supporting its own extensions fully.
9936         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
9937         struct also called `header', so `header.multiple_threads' is the field
9938         name to use on all machines.
9939         * allocatestack.c (allocate_stack): Use `header.' prefix.
9940         * sysdeps/pthread/createthread.c (create_thread): Likewise.
9941         * pthread_create.c (__pthread_create_2_1): Likewise.
9942         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
9943         (THREAD_SELF): Likewise.
9944         * sysdeps/x86_64/tls.h: Likewise.
9945         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
9946         (SINGLE_THREAD_P): Likewise.
9947         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
9948         (SINGLE_THREAD_P): Likewise.
9949         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
9950         (SINGLE_THREAD_P): Likewise.
9952         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
9953         value directly.
9955 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
9957         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
9958         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
9960         * pthread_create.c (start_thread): setjmp is expected to return 0.
9962         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
9963         (THREAD_GETMEM_NC): Likewise.
9965 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
9967         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
9968         and the size of the stack which must be allocated is a multiple,
9969         allocate one more page.
9970         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
9971         MULTI_PAGE_ALIASING.
9973 2003-03-13  Roland McGrath  <roland@redhat.com>
9975         * pthread_create.c (start_thread): Set EXITING_BIT after the
9976         event-reporting (and destructors), not before.
9978 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
9980         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
9981         lll_futex_wake): Declare register variables as long int instead of
9982         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
9983         Make syscall arguments clobbered by the syscall.
9984         (lll_futex_wait): Define using lll_futex_timed_wait.
9986         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
9987         to void *.
9989         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
9990         PPID if [! NDEBUG].
9992         * allocatestack.c (nptl_ncreated): Only declare if
9993         COLORING_INCREMENT != 0.
9995         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
9996         (__libc_enable_asynccancel_2): Remove prototype.
9998         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
9999         ctid to match kernel.
10001 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
10003         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
10004         libc_multiple_threads.
10005         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
10006         __libc_multiple_threads to...
10007         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
10009         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
10010         versioning.
10011         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10012         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10014         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
10015         (__pthread_once_internal): Define.
10017         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
10018         macros instead of .symver directly.
10019         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
10020         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
10022         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
10023         * sysdeps/x86_64/tcb-offsets.sym: New file.
10024         * sysdeps/x86_64/Makefile: New file.
10026         * sysdeps/i386/tcb-offsets.sym: Add SELF.
10027         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
10028         to access own pthread_t in TCB.
10029         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10030         Likewise.
10031         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10032         Likewise.
10033         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10035 2003-03-12  Roland McGrath  <roland@redhat.com>
10037         * pthread-errnos.sym: New file.
10038         * Makefile (gen-as-const-headers): New variable, list that file.
10039         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
10040         header <pthread-errnos.h> instead of defining errno values here.
10041         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
10042         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
10043         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
10044         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10045         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10046         Likewise.
10047         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10048         Likewise.
10049         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
10050         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10051         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10052         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10053         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10054         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10055         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
10056         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
10057         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
10058         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
10059         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
10060         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
10061         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
10062         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
10063         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
10064         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
10065         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
10066         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
10067         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
10068         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
10069         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10070         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
10071         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
10072         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
10073         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
10074         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
10075         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
10077         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
10078         CLONE_CHILD_SETTID worked.
10080 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
10082         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
10083         file.
10084         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
10085         file.
10087         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
10088         (pthread_cond_t): Add padding.
10090         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
10091         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
10092         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
10094         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
10095         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
10096         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
10097         (__pthread_rwlock_timedrdlock): Likewise.
10098         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
10099         (__pthread_rwlock_wrlock): Likewise.
10100         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
10101         (__pthread_rwlock_rdlock): Likewise.
10103         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
10105         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
10106         result of lock re-get if it fails.
10108 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
10110         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
10111         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
10112         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
10113         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
10114         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
10115         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
10116         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
10117         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
10118         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10119         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10121         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
10122         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
10124         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
10125         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
10126         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
10127         (create_thread): Likewise.
10128         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
10129         * init.c (__pthread_initialize_minimal_internal): Initialize
10130         __libc_multiple_threads_ptr if necessary.
10131         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
10132         __pthread_multiple_threads and __libc_multiple_threads_ptr.
10133         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
10134         __libc_multiple_threads.
10135         (__libc_pthread_init): Return pointer to __libc_pthread_init if
10136         necessary.
10138         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
10139         (THREAD_SETMEM_NC): Likewise.
10141         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
10142         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
10143         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
10144         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
10146         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
10147         Eliminate one entire instruction.
10149         * cancellation.c (__pthread_enable_asynccancel_2): New function.
10150         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
10151         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
10152         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
10153         instead of __pthread_enable_asynccancel.
10154         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10155         (__pthread_cond_wait): Likewise.
10156         * sysdeps/pthread/pthread_cond_timedwait.c
10157         (__pthread_cond_timedwait): Likewise.
10158         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
10160         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10161         (__condvar_cleanup): Wake up all waiters in case we got signaled
10162         after being woken up but before disabling asynchronous
10163         cancellation.
10164         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10165         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
10166         (__condvar_cleanup): Likewise.
10168         * init.c (__NR_set_tid_address): If already defined, don't redefine.
10169         Make it an error if architecture has no #if case.  Add x86-64.
10171         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
10172         pt-initfini.s generation.
10174         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
10175         (TLS_INIT_TP): Fix typo.
10177 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
10179         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
10180         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
10182         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
10183         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
10184         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
10185         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
10186         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
10187         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10188         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10189         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10191 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
10193         * sysdeps/pthread/pthread_cond_timedwait.c
10194         (__pthread_cond_timedwait): Return the result of the final
10195         locking.  If it succeeds, the regular function return value.
10197         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
10198         Return result of the final locking.
10199         * version.c (__nptl_main): Work around problems with the strange
10200         INTERNAL_SYSCALL macro on ppc32.
10201         * init.c (__pthread_initialize_minimal_internal): Unblock
10202         SIGCANCEL in case the parent blocked it.
10203         Reported by Paul Mackerras <paulus@samba.org>.
10205         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
10206         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
10207         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
10209 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
10211         * sysdeps/pthread/pthread_cond_timedwait.c
10212         (__pthread_cond_timedwait): Unlock and fail if
10213         __pthread_mutex_unlock_internal failed.
10215         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
10216         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
10217         Use ARCH_CLONE.
10218         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
10219         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
10220         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
10221         ALLOCATE_STACK): New macros.
10222         (TLS_TPADJ): New macro.
10223         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
10224         (allocate_stack): Handle TLS_DTV_AT_TP and
10225         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
10226         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
10227         Don't set PD->self.
10228         * init.c [__ia64__] (__NR_set_tid_address): Define.
10230         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
10231         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
10232         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
10233         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
10234         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
10235         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
10236         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
10237         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
10238         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
10239         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
10240         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
10241         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
10242         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
10243         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
10244         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
10245         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
10246         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
10247         * sysdeps/ia64/bits/atomic.h: New file.
10248         * sysdeps/ia64/Makefile: New file.
10249         * sysdeps/ia64/pthread_spin_init.c: New file.
10250         * sysdeps/ia64/pthread_spin_lock.c: New file.
10251         * sysdeps/ia64/pthread_spin_trylock.c: New file.
10252         * sysdeps/ia64/pthread_spin_unlock.c: New file.
10253         * sysdeps/ia64/pthreaddef.h: New file.
10254         * sysdeps/ia64/tcb-offsets.sym: New file.
10255         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
10256         * sysdeps/ia64/tls.h: New file.
10258         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
10259         to syscall instead of no arguments.
10261 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
10263         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
10264         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
10265         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
10266         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
10268         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
10269         unused code.
10271         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
10273         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10274         lowlevelbarrier.sym.
10275         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
10276         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
10277         Include lowlevelbarrier.h and don't define offsets locally.
10278         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
10280         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
10281         (__lll_mutex_lock_wait): Reverse order of first two parameters.
10282         (__lll_mutex_timedlock_wait): Likewise.
10283         (lll_mutex_lock): Adjust asm for that.
10284         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
10285         (lll_lock): Adjust asm for operand order change.
10286         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
10287         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
10289         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
10290         Reverse order of parameters.
10291         (__lll_timedwait_tid): Remove regparms attribute.
10292         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
10293         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
10295         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10296         (__lll_timedwait_tid): Remove one unnecessary instruction.
10298         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
10299         __lll_mutex_timedlock_wait only for NOT_IN_libc.
10300         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
10301         lowlevelmutex.S.
10303         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
10304         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
10305         for NOT_IN_libc.
10306         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
10307         lowlevellock.S.
10309         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
10310         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
10311         for libc.so.
10312         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
10313         define LOCK here (if UP is not defined).  The actual code is in
10314         lowlevelmutex.S.
10316         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
10317         LOCK is already defined.  Don't define lll_unlock_wake_cb and
10318         __lll_timedwait_tid for libc.so.
10319         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
10320         define LOCK here (if UP is not defined).  The actual code is in
10321         lowlevellock.S.
10323         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
10324         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
10325         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
10326         instead of lowlevelsem.h.
10327         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10328         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10329         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10331         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10332         lowlevelrwlock.sym.
10333         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
10334         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
10335         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
10337         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
10338         register loading.
10339         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
10340         last changed.  D'oh.
10342         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
10344         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
10345         of __libc_locking_needed.
10346         (lll_trylock): Initialize %eax to zero.
10348         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
10349         pthread_cond_t definition.
10351 2003-03-10  Roland McGrath  <roland@redhat.com>
10353         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
10354         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
10355         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
10356         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
10357         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
10359         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
10360         Instead of setting PD->multiple_threads, set globals
10361         __pthread_multiple_threads and __libc_multiple_threads.
10362         * sysdeps/pthread/createthread.c (create_thread): Likewise.
10363         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
10364         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
10366         * descr.h (struct pthread): Conditionalize first member on
10367         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
10368         containing an anonymous tcbhead_t.  Move `list' member out.
10369         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
10370         * allocatestack.c: Remove use of `header.data.' prefix.
10371         * pthread_create.c: Likewise.
10372         * init.c (__pthread_initialize_minimal_internal): Likewise.
10373         * sysdeps/pthread/createthread.c (create_thread): Likewise.
10374         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
10375         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
10376         * sysdeps/x86_64/tls.h: Likewise.
10377         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
10378         (SINGLE_THREAD_P): Likewise.
10379         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
10380         (SINGLE_THREAD_P): Likewise.
10381         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
10382         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
10384 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
10386         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
10388         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
10389         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10391         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
10392         leftovers from the ia32 code.
10394         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
10395         memory load.
10396         (clear_once_control): Don't load %esi.
10398         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
10399         handling.
10401         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10403         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
10404         * sysdeps/unix/sysv/linux/createthread.c: ...here.
10406         * Makefile (tests): Add tst-cond10.
10407         * tst-cond10.c: New file.
10409 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
10411         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
10412         * tst-signal3.c (do_test): Likewise.
10413         * tst-sem5.c (do_test): Likewise.
10414         * tst-kill6.c (do_test): Likewise.
10415         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
10417         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
10418         of inc/dec.
10419         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
10420         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
10421         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
10422         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
10423         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10424         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10425         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10426         Likewise.
10427         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10428         Likewise.
10429         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
10430         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10431         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10432         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10433         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10434         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
10435         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10436         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10438         * allocatestack.c (allocate_stack): If mprotect() fails free the
10439         TLS memory.
10441 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
10443         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
10445         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
10446         lll_wake_tid.  This was used only to work around kernel limits in
10447         the early days.
10448         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
10449         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
10450         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10451         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
10453         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
10454         (__pthread_initialize_minimal_internal): Change initialization of
10455         __static_tls_align_m1 appropriately.
10456         * pthreadP.h (__static_tls_align_m1): Renamed from
10457         __static_tls_align.
10458         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
10459         instead of __static_tls_align-1.
10461 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
10463         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
10465         * pthread_create.c: Define __pthread_keys using nocommon
10466         attribute, not by placing it explicitly in bss.
10467         Remove DEFINE_DEALLOC definition.  Not needed anymore.
10469         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
10470         Use it in mmap call to allocate stacks.
10472         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
10474         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
10475         result of the thread function.
10477 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
10479         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
10480         version is just fine.
10482         * sysdeps/unix/sysv/linux/libc_pthread_init.c
10483         (__pthread_child_handler): Renamed from pthread_child_handler,
10484         exported, and marked hidden.  Change all users.
10485         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
10486         free __pthread_child_handler from child list.
10488 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
10490         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
10492         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
10493         Fix handling of cancellation and failing pthread_mutex_unlock call.
10494         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10495         (__pthread_cond_wait): Likewise.
10497         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
10498         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
10499         lll_futex_timed_wait call.
10500         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
10501         (pthread_rwlock_timedwrlock): Likewise.
10503         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
10504         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
10505         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
10507         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
10508         check of lll_futex_wake return value.
10510 2003-03-03  Roland McGrath  <roland@redhat.com>
10512         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
10514         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10515         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
10516         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
10518 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
10520         * sysdeps/pthread/timer_create.c (timer_create): Return correct
10521         error for CPU clocks.
10523         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
10524         _POSIX_MONOTONIC_CLOCK.
10525         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
10527         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
10528         recent kernels.
10530 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
10532         * descr.h (struct pthread): Move cleanup field to the front.
10534 2003-03-01  Roland McGrath  <roland@redhat.com>
10536         * sem_open.c (sem_open): Braino fix.
10538 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
10540         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
10541         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
10542         __pthread_cleanup_pop functionality.
10543         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10545         * descr.h (struct pthread): Move tid field to the front now that
10546         it is often used.
10548         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
10549         (__lll_mutex_timedlock_wait): Remove.
10550         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10551         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
10552         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10553         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10554         (lll_unlock_wake_cb): Don't save and restore %esi.
10555         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
10556         %esi.
10557         (__lll_timedwait_tid): Add alignment.
10558         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
10559         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
10560         %esi.
10561         (__lll_timedwait_tid): Removed.
10562         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
10563         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
10564         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
10565         (pthread_barrier_wait): Don't save, load, and restore %esi for
10566         last thread.
10567         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
10568         (__pthread_cond_signal): Don't save, load, and restore %esi.
10569         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
10570         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
10571         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
10572         Don't save, load, and restore %esi.
10574 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
10576         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
10577         Release lock before waking up the waiters.
10579         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
10581         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
10582         (reader_thread): Likewise.
10584         * sysdeps/pthread/pthread_rwlock_unlock.c
10585         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
10586         to wake up readers if there are none.
10588         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
10589         Release internal lock before wake threads.
10591 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
10593         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
10594         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
10595         predefined.
10596         * tst-rwlock9.c: Likewise.
10597         * tst-rwlock10.c: New file.
10598         * tst-rwlock11.c: New file.
10600         * Makefile (tests): Add tst-dlsym1.
10601         * tst-dlsym1.c: New file.
10603         * init.c (__pthread_initialize_minimal_internal): Set
10604         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
10605         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
10607 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
10609         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
10611         * tst-cond2.c: Fix sychronization with child.
10613         * tst-rwlock8.c (reader_thread): Remove unused variable.
10615         * Makefile: Add rules to build and run tst-tls3.
10616         * tst-tls3.c: New file.
10617         * tst-tls3mod.c: New file.
10619         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
10620         * tst-rwlock8.c: New file.
10621         * tst-rwlock9.c: New file.
10622         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
10623         complete broken rwlock implementation.
10624         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10625         Likewise.
10626         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10627         Likewise.
10628         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10629         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10630         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
10631         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
10632         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
10633         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
10634         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
10636 2003-02-23  Roland McGrath  <roland@redhat.com>
10638         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
10640 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
10642         * Makefile (tests): Add tst-context1.
10643         * tst-context1.c: New file.
10645         * Makefile (tests): Add tst-tls1 and tst-tls2.
10646         * tst-tls1.c: New file.
10647         * tst-tls2.c: New file.
10649         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
10650         for failed cmpxchg.
10652         * pthread_create.c (start_thread): Set EXITING_BIT early.
10654         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
10655         (THREAD_GETMEM_NC): Likewise.
10657 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
10659         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
10660         off 3 more bytes by using offset-less instructions when possible.
10662         * Makefile: Add dependency for $(objpfx)version.d.
10664         * eintr.c (eintr_source): Add unnecessary return but the compiler
10665         insists.
10667         * tst-kill3.c: Include <unistd.h>.
10669 2003-02-21  Roland McGrath  <roland@redhat.com>
10671         * pthread_create.c (start_thread): Call __libc_thread_freeres.
10673 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
10675         * Makefile (tests): Add tst-eintr1.
10676         (distribute): Add eintr.c.
10677         * tst-eintr1.c: New file.
10678         * eintr.c: New file.
10680         * pthread_cancel.c (pthread_cancel): Use tkill directly.
10682         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
10683         Disallow sending SIGCANCEL.
10685         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
10686         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
10687         * tst-kill1.c: New file.
10688         * tst-kill2.c: New file.
10689         * tst-kill3.c: New file.
10690         * tst-kill5.c: New file.
10691         * tst-kill6.c: New file.
10692         * tst-basic7.c: Renamed to...
10693         * tst-kill4.c: ...this.
10695 2003-02-21  Roland McGrath  <roland@redhat.com>
10697         * Makefile (install-lib-ldscripts): New variable.
10699 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
10701         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
10702         * pthread_cancel.c: Use INVALID_TD_P.
10703         * pthread_detach.c: Likewise.
10704         * pthread_getschedparam.c: Likewise.
10705         * pthread_setschedparam.c: Likewise.
10706         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
10707         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
10708         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
10709         * pthread_timedjoin.c: Likewise.
10711         * tst-basic7.c: Include <signal.h>.
10713         * pthread_join.c (pthread_join): Limited checking for invalid
10714         descriptors.
10715         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
10717 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
10719         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
10720         beginning of the loop.  Clear the entire first block of TSD.
10721         * Makefile (tests): Add tst-key4.
10722         * tst-key4.c: New file.
10724 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
10726         * Makefile (tests): Add tst-basic7.
10727         * tst-basic7.c: New file.
10729         * pthread_create.c (deallocate_tsd): Mark as internal_function.
10730         Add some more __builtin_expect.
10732         * pthreadP.h: Define dummy version of DEBUGGING_P.
10734 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
10736         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
10737         _POSIX_THREAD_PRIORITY_SCHEDULING.
10738         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
10739         _XOPEN_REALTIME_THREADS.
10740         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
10742         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
10743         kernel returns EINVAL for PID <= 0, work around it.
10745         * Makefile (tests): Add tst-signal5.
10746         * tst-signal5.c: New file.
10748         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
10749         and LOGIN_NAME_MAX.
10751         * tst-cancel1.c (tf): Block all signals.
10753         * Makefile (tests): Add tst-basic6.
10754         * tst-basic6.c: New file.
10756         * tst-basic1.c: Add test for process ID.
10758         * Makefile (tests): Add tst-cancel10.
10759         * tst-cancel10.c: New file.
10761         * Makefile (tests): Add tst-signal4.
10762         * tst-signal4.c: New file.
10764         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
10765         __sigismember instead of sigismember.  Add __builtin_expect.
10767 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
10769         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
10770         pthread_setcancelstate, and pthread_rwlock_setpshared.
10772         * tst-cancel7.c (do_test): Make sure the pid file exists before
10773         canceling the thread.
10775         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
10776         pthread_rwlock_timedrdlock tests.
10777         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
10778         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10779         Check for invalid tv_nsec field.
10780         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10781         Likewise.
10783         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
10784         recursive mutex of overflow.
10786         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
10788         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
10789         going into an endless loop.
10790         * Makefile (tests): Add tst-cancel9.
10791         * tst-cancel9.c: New file.
10793         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
10795 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
10797         * tst-mutex5.c (do_test): Add more timedlock tests.
10799         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
10800         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
10802         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
10803         use INLINE_SYSCALL.  Error number is returned, not -1.
10805         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
10806         and __deallocate_stack with internal_function.
10807         * pthread_create.c: Adjust definitions appropriately.
10808         * allocatestack.c: Likewise.
10810         * pthread_join.c: Add one more __builtin_expect.
10811         * pthread_timedjoin.c: Likewise.
10813         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
10814         not data of sequence number does not match.
10815         Add one __builtin_expect.
10817         * Makefile (tests): Add tst-clock1.
10818         * tst-clock1.c: New file.
10820         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
10821         negative arguments.
10822         * Makefile (tests): Add tst-basic5.
10823         * tst-basic5.c: New file.
10825 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
10827         * Makefile (tests): Add tst-basic4.
10828         * tst-basic4.c: New file.
10830         * pthreadP.h: Add declaraction for __nptl_nthreads.
10831         * pthread_create.c: Define __nptl_nthreads
10832         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
10833         after thread is done.  If then zero, call exit(0).
10834         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10835         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
10836         * init.c (pthread_functions): Initialize ptr_nthreads.
10837         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
10838         (__reclaim_stacks): Decrement __nptl_nthreads.
10839         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
10840         Define.
10841         * Makefile (tests): Add tst-basic3.
10842         * tst-basic3.c: New file.
10844         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
10845         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
10846         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
10847         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
10848         if asynchronous canceling is enabled.
10849         * pthread_join.c (pthread_join): When recognizing circular joins,
10850         take into account the other thread might be already canceled.
10851         * Makefile (tests): Add tst-join5.
10852         * tst-join5.c: New file.
10854         * Makefile (tests): Add tst-join4.
10855         * tst-join4.c: New file.
10857 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
10859         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
10861 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
10863         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
10864         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
10865         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
10866         warning.
10867         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
10868         to avoid warning.
10869         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
10870         error if lll_futex_wake failed.
10872 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
10874         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
10875         handling of cancellation and failung pthread_mutex_unlock call.
10876         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10877         * Makefile (tests): Add tst-cond8 and tst-cond9.
10878         * tst-cond8.c: New file.
10879         * tst-cond9.c: New file.
10881         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
10883         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
10884         non-standard initializers with __USE_GNU.
10886         * Makefile (tests): Add tst-cleanup3.
10887         * tst-cleanup3.c: New file.
10889 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
10891         * Makefile (tests): Add tst-attr1 and tst-attr2.
10892         * tst-attr1.c: New file.
10893         * tst-attr2.c: New file.
10895         * Makefile: Add rules to build and run tst-atfork2 test.
10896         * tst-atfork2.c: New file.
10897         * tst-atfork2mod.c: New file.
10899         * sysdeps/unix/sysv/linux/unregister-atfork.c
10900         (__unregister_atfork): Free the memory allocated for the handlers
10901         after removing them from the lists.
10903         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
10904         cleanup function.
10906         * tst-atfork1.c (do_test): Wait for the child we forked.
10907         Report error in child.
10909         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
10911         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
10913 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
10915         * Makefile (tests): Add tst-cancel8.
10916         * tst-cancel8.c: New file.
10918         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
10919         clearing of control variable.
10920         * Makefile (tests): Add tst-once3 and tst-once4.
10921         * tst-once3.c: New file.
10922         * tst-once4.c: New file.
10924 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
10926         * sysdeps/sh/Makefile: New file.
10927         * sysdeps/sh/bits/atomic.h: New file.
10928         * sysdeps/sh/pthread_spin_init.c: New file.
10929         * sysdeps/sh/pthread_spin_lock.c: New file.
10930         * sysdeps/sh/pthread_spin_trylock.S: New file.
10931         * sysdeps/sh/pthread_spin_unlock.S: New file.
10932         * sysdeps/sh/pthreaddef.h: New file.
10933         * sysdeps/sh/tcb-offsets.sym: New file.
10934         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
10935         * sysdeps/sh/tls.h: New file.
10936         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
10937         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
10938         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
10939         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
10940         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
10941         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
10942         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
10943         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
10944         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
10945         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
10946         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
10947         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
10948         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
10949         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
10950         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
10951         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
10952         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
10953         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
10954         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
10955         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
10956         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
10957         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
10958         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
10959         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
10960         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
10961         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
10962         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
10963         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
10964         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
10965         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
10967 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
10969         * tst-cond2.c: Rearrange code to not rely on behavior undefined
10970         according to POSIX.
10972         * tst-basic2.c (do_test): Lock mutex before creating the thread.
10974 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
10976         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
10977         (TLS_GET_FS): New #define.
10978         (TLS_SET_FS): New #define.
10979         Correct value of __NR_set_thread_area.
10981         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
10983 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
10985         * Makefile (tests): Add tst-popen1.
10986         * tst-popen1.c: New file.
10988         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
10989         but inactive generalization.
10990         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10991         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10992         Minor optimization, remove one instruction.
10993         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10995 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
10997         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
10999 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
11001         * init.c (__NR_set_tid_address): Add #ifdef for s390.
11002         * sysdeps/pthread/pthread_barrier_wait.c: New file.
11003         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
11004         * sysdeps/pthread/pthread_cond_signal.c: New file.
11005         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
11006         * sysdeps/pthread/pthread_cond_wait.c: New file.
11007         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
11008         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
11009         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
11010         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
11011         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
11012         * sysdeps/s390/Makefile: New file.
11013         * sysdeps/s390/bits/atomic.h: New file.
11014         * sysdeps/s390/pthread_spin_init.c: New file.
11015         * sysdeps/s390/pthread_spin_lock.c: New file.
11016         * sysdeps/s390/pthread_spin_trylock.c: New file.
11017         * sysdeps/s390/pthread_spin_unlock.c: New file.
11018         * sysdeps/s390/pthreaddef.h: New file.
11019         * sysdeps/s390/tcb-offsets.sym: New file.
11020         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
11021         * sysdeps/s390/tls.h: New file.
11022         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
11023         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
11024         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
11025         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
11026         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
11027         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
11028         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
11029         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
11030         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
11031         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
11032         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
11033         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
11034         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
11035         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
11036         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
11037         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
11038         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
11039         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
11040         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
11041         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
11042         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
11043         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
11044         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
11046 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
11048         * atomic.h: Add a couple more default implementations.
11049         (atomic_compare_and_exchange_acq): Use
11050         __arch_compare_and_exchange_32_acq in return value definition.  It
11051         always exists.
11052         (atomic_bit_set): Renamed from atomic_set_bit.
11053         Add missing atomic_ prefixes.
11055         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
11056         thread library is available, use correct value to mark initialized
11057         once variable.
11059 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
11061         * allocatestack.c (allocate_stack): Use __getpagesize instead of
11062         __sysconf to determine pagesize.
11064         * pthread_create.c: Include <atomic.h>.
11065         * allocatestack.c (allocate_stack): Implement coloring of the
11066         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
11067         size minus one.  Adjust users.
11068         * sysdeps/i386/i686/Makefile: New file.
11070 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
11072         * allocatestack.c: Improve comment throughout the file.
11074         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
11075         (__lll_lock_wait): Add branch prediction.
11076         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
11077         (__lll_lock_wait): Likewise.
11078         (lll_unlock_wake_cb): Removed.
11080 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
11082         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
11083         _POSIX_THREAD_PRIORITY_SCHEDULING.
11085 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
11087         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
11088         Fix return type of ptr___pthread_getspecific.
11090 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
11092         * Makefile (tests): Add tst-umask1.
11093         (tst-umask1-ARGS): Define.
11094         * tst-umask1.c: New file.
11096 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
11098         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
11099         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
11100         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
11101         pthread_rwlock_unlock.
11102         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
11103         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
11104         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
11105         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
11106         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11107         New file.
11108         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
11109         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11110         New file.
11111         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
11112         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
11113         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
11114         New file.
11115         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
11116         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
11117         New file.
11118         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
11119         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
11120         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
11121         New file.
11122         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
11123         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
11124         New file.
11125         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
11127         * Makefile (libpthread-routines): Remove lowlevelcond and
11128         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
11129         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
11130         and pthread_cond_broadcast.
11131         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
11132         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
11133         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
11134         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
11135         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
11136         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
11137         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
11138         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
11139         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
11140         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
11141         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
11142         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
11143         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
11144         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
11145         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
11146         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
11147         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
11148         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
11149         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
11150         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
11151         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
11152         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
11153         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
11154         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
11155         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
11156         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
11157         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
11158         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
11159         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
11160         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
11161         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
11163         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
11164         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
11165         of the code is moved to ...
11166         * sysdeps/pthread/createthread.c: ...here.  New file.
11168 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
11170         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
11171         (__new_sem_post): Clear %eax before returning.
11172         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
11174         * Makefile (tests): Add tst-cleanup2.
11175         * tst-cleanup2.c: New file.
11177         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
11178         Interpret first parameter correctly.
11180 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
11182         * Makefile (headers): Add bits/semaphore.h.
11184 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
11186         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
11187         if not SHARED.
11189 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
11191         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
11192         must be used and mapping failed.
11193         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
11195         * Makefile (CFLAGS-pthread_self.os): Define this, not
11196         CFLAGS-pthread_self.c.
11198 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
11200         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
11201         lll_unlock_wake_cb.
11203         * Makefile (libpthread-routines): Add version.  Add rules to build
11204         version.os and banner.h.
11205         * version.c: New file.
11207 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
11209         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
11210         the alias unconditional.
11211         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
11213 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
11215         * Makefile (CFLAGS-pthread_self.c): New definition.
11217 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
11219         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
11220         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
11221         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
11222         * init.c (__pthread_initialize_minimal_internal): Likewise.
11224 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
11226         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
11228         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
11229         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11230         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11231         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
11232         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11233         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11235 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
11237         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
11238         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
11239         * tst-cancel-wrappers.sh: Remove all exceptions.
11241 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
11243         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
11244         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
11246         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
11247         Use __libc_pthread_functions array if SHARED.
11249         * pthreadP.h: Move pthread_cond_2_0_t definition to...
11250         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
11252         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
11253         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
11254         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
11255         __libc_ptf_call instead of __libc_maybe_call.
11256         (PTF): New #define.
11257         (__libc_cleanup_region_start): Wrap function name with PTF call.
11258         (__libc_cleanup_region_end): Likewise.
11259         (__libc_cleanup_end): Likewise.
11261         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
11262         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
11263         * pthread_key_create.c: Add __pthread_key_create_internal alias.
11264         * pthreadP.h: Add prototypes.
11266         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
11267         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
11268         __pthread_rwlock_unlock aliases.
11269         * pthreadP.h: Add prototypes for new aliases.
11271         * pthreadP.h (struct pthead_functions): Moved to...
11272         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
11273         * init.c (pthread_functions): Add initializers for new elements.
11275         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
11276         __pthread_cleanup_pop_restore aliases.
11277         * pthreadP.h: Add prototypes.
11279         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
11280         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
11281         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
11282         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
11283         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
11284         * pthreadP.h: Adjust prototypes and callers.
11286 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
11288         * Makefile (tests): Add tst-cancel7.
11289         (tst-cancel7-ARGS): New variable.
11290         * tst-cancel7.c: New file.
11292         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
11293         around gcc defficiencies.
11294         * old_pthread_cond_signal.c: Likewise.
11295         * old_pthread_cond_timedwait.c: Likewise.
11296         * old_pthread_cond_wait.c: Likewise.
11298         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
11300 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
11302         * Makefile (tests): Add tst-cond7.
11303         * tst-cond7.c: New file.
11305         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11306         (condvar_cleanup): Get condvar address from the right place.
11308         * atomic.h: Correct definitions of atomic_full_barrier,
11309         atomic_read_barrier, atomic_write_barrier.
11311         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
11312         race-free.
11313         * old_pthread_cond_signal.c: Likewise.
11314         * old_pthread_cond_timedwait.c: Likewise.
11315         * old_pthread_cond_wait.c: Likewise.
11317 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
11319         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
11321 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
11323         * pthreadP.h (pthread_cond_2_0_t): New type.
11324         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
11325         Use new type for the 2.0 condvar function prototypes.
11326         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
11327         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
11328         parameter.
11329         * old_pthread_cond_destroy.c: Likewise.
11330         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
11331         * old_pthread_cond_signal.c: Likewise.
11332         * old_pthread_cond_timedwait.c: Likewise.
11333         * old_pthread_cond_wait.c: Likewise.
11335         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11336         (__pthread_cond_wait): Don't save cancellation mode and seq value
11337         in same location.
11339         * herrno.c (__h_errno_location): Don't define as weak.
11341 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
11343         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
11344         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
11345         and pthread_cond_wait.
11346         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
11347         Renamed to...
11348         (__pthread_cond_broadcast_2_0): ... this.
11349         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
11350         Renamed to...
11351         (__pthread_cond_destroy_2_0): ... this.
11352         * old_pthread_cond_init.c (__old_pthread_cond_init):
11353         Renamed to...
11354         (__pthread_cond_init_2_0): ... this.
11355         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
11356         Renamed to...
11357         (__pthread_cond_signal_2_0): ... this.
11358         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
11359         Renamed to...
11360         (__pthread_cond_wait_2_0): ... this.
11361         * pthread_cond_destroy.c: Include shlib-compat.h.
11362         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
11363         * pthread_cond_init.c: Include shlib-compat.h.
11364         (pthread_cond_init): Change strong_alias into versioned_symbol.
11365         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
11366         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
11367         fields.
11368         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
11369         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
11370         __pthread_cond_wait_2_0): New prototypes.
11371         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
11372         __old_pthread_cond_init, __old_pthread_cond_signal,
11373         __old_pthread_cond_wait): Removed.
11374         * init.c: Include shlib-compat.h.
11375         (pthread_functions): Guard ptr___pthread_attr_init_2_0
11376         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
11377         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
11378         ptr___pthread_cond_*_2_0 fields.
11379         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
11380         pthread_cond_*@GLIBC_2.0 compatibility symbols.
11382         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
11383         LIBC_SIGACTION was not yet defined.
11384         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
11385         [!defined LIBC_SIGACTION] (__sigaction): New function and
11386         libc_hidden_weak.
11387         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
11388         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
11390 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
11392         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
11394 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
11396         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
11397         New, larger type definition.
11398         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
11399         implementation.
11400         * Versions [libpthread]: Add definitions for new pthread_cond_*
11401         interfaces for version GLIBC_2.3.2.
11402         * pthread_cond_init.c: Update initialization for new type definition.
11403         * Makefile (libpthread-routines): Remove pthread_cond_wait,
11404         pthread_cond_timedwait, pthread_cond_signal, and
11405         pthread_cond_broadcast.  Add old_pthread_cond_init,
11406         old_pthread_cond_destroy, old_pthread_cond_wait,
11407         old_pthread_cond_timedwait, old_pthread_cond_signal, and
11408         old_pthread_cond_broadcast.
11409         * old_pthread_cond_broadcast.c: New file.
11410         * old_pthread_cond_destroy.c: New file.
11411         * old_pthread_cond_init.c: New file.
11412         * old_pthread_cond_signal.c: New file.
11413         * old_pthread_cond_timedwait.c: New file.
11414         * old_pthread_cond_wait.c: New file.
11415         * pthreadP.h: Add prototypes for the compatibility interfaces.
11417         * pthread_cond_destroy.c: Don't include <errno.h>.
11419 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
11421         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
11422         unnecessary zero offset when addressing MUTEX.
11424 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
11426         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
11427         __register_atfork.
11428         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
11429         for __register_atfork.
11431 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
11433         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
11434         instead of ASSEMBLER test macro.
11436         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
11437         __libc_current_sigrtmax): Add libc_hidden_def.
11439         * sysdeps/pthread/list.h: Remove assert.h include.
11441 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
11443         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
11444         __pthread_initialize_minimal_internal not
11445         __pthread_initialize_minimal.
11447 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
11449         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
11450         __pthread_initialize_minimal as hidden.
11452         * init.c (__pthread_initialize_minimal_internal): Don't mark as
11453         constructor.
11455 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
11457         * Makefile ($(inst_libdir)/libpthread.so): Depend on
11458         $(common-objpfx)format.lds, include that into the output script.
11459         Fix comment.
11460         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
11462 2002-12-28  Andreas Jaeger  <aj@suse.de>
11464         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
11465         nsec resolution changes.
11466         (xstat64_conv): Likewise.
11467         (xstat32_conv): Likewise.
11468         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
11469         struct kernel_stat.
11470         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
11471         structs stat and stat64.
11472         * time/time.h (__timespec_defined): Define for __USE_MISC.
11473         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
11475 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
11477         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
11478         argument.
11479         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
11480         (pthread_exit): Use strong_alias to avoid warnings.
11481         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
11482         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
11483         ptr___pthread_attr_init_2_*.
11484         * init.c (pthread_functions): Adjust.
11486 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
11488         * forward.c: Make all functions available by default again.  It
11489         caused too much trouble.
11491         * pt-siglongjmp.c: Removed.
11493 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
11495         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
11496         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
11497         * sysdeps/i386/Makefile: New file.
11498         * sysdeps/i386/tcb-offsets.sym: New file.
11499         * sysdeps/pthread/tcb-offsets.h: New file.
11500         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11501         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
11503         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
11504         __register_atfork...
11505         (GLIBC_2.3.2): ...here.
11507 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
11509         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
11510         pthread_attr_setstackaddr with __attribute_deprecated__.
11512 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
11514         * pt-system.c (system): Remove cancellation handling.
11515         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
11516         cancellation routines.
11518 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
11520         * descr.h: Include <dl-sysdep.h>.
11521         (struct pthread): Move header.data.list to the back of the struct.
11522         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
11523         (MULTIPLE_THREADS_OFFSET): Adjust offset.
11524         (SYSINFO_OFFSEET): Likewise.
11526 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
11528         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
11529         Define.
11530         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
11531         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
11532         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
11533         (USE_DL_SYSINFO): Undef.
11535 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
11537         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
11538         $(common-objpfx)libc.so.
11539         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
11540         it is bigger than pipe buffer size even on arches with bigger
11541         page size.
11542         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
11544 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
11546         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
11547         correct errno access for case that USE___THREAD is not defined.
11549 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
11551         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
11552         Patch by Marijn Ros <marijn@mad.scientist.com>.
11554 2002-12-22  Roland McGrath  <roland@redhat.com>
11556         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
11558 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
11560         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
11562 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
11564         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
11565         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
11566         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
11568         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
11569         of int $0x80.
11570         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11571         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
11572         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
11573         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
11574         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
11575         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
11576         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
11577         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
11579         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
11580         sysenter.
11581         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
11583         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
11585         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
11586         in new TCB.
11587         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
11588         that sysinfo is properly initialized.
11589         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
11590         to 1 only for ld.so.
11592         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
11593         RTLD_CORRECT_DYNAMIC_WEAK.
11595 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
11597         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
11598         Use return 0 as 6th argument to FORWARD4.
11599         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
11601 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
11603         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
11604         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
11605         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
11606         (INIT_SYSINFO): New #define.
11607         (TLS_TP_INIT): Use INIT_SYSINFO.
11608         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11609         At test to make sure SYSINFO_OFFSET value is correct.
11610         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
11612 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
11614         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
11615         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
11616         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
11617         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
11618         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
11619         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
11620         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
11622 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
11624         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
11625         macro instead of using int $0x80 directly.
11627         * sysdeps/pthread/bits/stdio-lock.h: New file.
11628         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
11629         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
11630         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
11631         * Makefile (routines): Add libc-lowlevelmutex.
11633         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
11634         __i686.get_pc_thunk.dx.
11636 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
11638         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
11639         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
11640         ($(objpfx)tst-cancel-wrappers.out): New rule.
11641         * tst-cancel-wrappers.sh: New test.
11642         * tst-locale1.c: Include signal.h.
11643         (uselocale): Test static linking of __libc_current_sigrt*.
11645 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
11647         * Makefile (tests): Add tst-cancel6.
11648         * tst-cancel6.c: New file
11650 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
11652         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
11653         Define meaningfully for assembler as well.
11654         * pthreadP.h (struct pthread_functions): Remove
11655         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
11656         and ptr_pthread_attr_init_2_1 fields.
11657         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
11658         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
11659         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
11660         (FORWARD3): Define using FORWARD4.
11661         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
11662         versions.
11663         * pt-system.c: Remove duplicate stdlib.h include.
11665 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
11667         * sem_init.c: Define sem_init@GLIBC_2.0.
11668         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
11669         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
11671         * flockfile.c: Moved to...
11672         * sysdeps/pthread/flockfile.c: ...here.  New file.
11673         * funlockfile.c: Moved to...
11674         * sysdeps/pthread/funlockfile.c: ...here.  New file.
11675         * ftrylockfile.c: Moved to...
11676         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
11678 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
11680         * libc-cancellation.c: Guard both function with
11681         #if !defined NOT_IN_libc.
11682         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
11683         automatically provided pthread wrappers.
11684         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
11685         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
11686         nor in libpthread.
11687         * pt-open.c: Removed.
11688         * pt-fcntl.c: Removed.
11689         * pt-fsync.c: Removed.
11690         * pt-lseek.c: Removed.
11691         * pt-msgrcv.c: Removed.
11692         * pt-msgsnd.c: Removed.
11693         * pt-msync.c: Removed.
11694         * pt-nanosleep.c: Removed.
11695         * pt-open64.c: Removed.
11696         * pt-pause.c: Removed.
11697         * pt-pread.c: Removed.
11698         * pt-pread64.c: Removed.
11699         * pt-pwrite.c: Removed.
11700         * pt-pwrite64.c: Removed.
11701         * pt-read.c: Removed.
11702         * pt-recv.c: Removed.
11703         * pt-recvfrom.c: Removed.
11704         * pt-recvmsg.c: Removed.
11705         * pt-send.c: Removed.
11706         * pt-sendto.c: Removed.
11707         * pt-sigtimedwait.c: Removed.
11708         * pt-sigwait.c: Removed.
11709         * pt-wait.c: Removed.
11710         * pt-waitpid.c: Removed.
11711         * pt-write.c: Removed.
11712         * pt-accept.c: Removed.
11713         * pt-close.c: Removed.
11714         * pt-connect.c: Removed.
11715         * pt-lseek64.c: Removed.
11716         * pt-sendmsg.c: Removed.
11717         * pt-tcdrain.c: Removed.
11719 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
11721         * init.c (__pthread_initialize_minimal_internal): Renamed from
11722         __pthread_initialize_minimal.  Make old name an alias.  This
11723         converts a normal relocation into a relative relocation.
11725         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
11727         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
11728         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
11729         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
11730         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
11731         pt-sigwaitinfo, pt-waitid, and pt-writev.
11732         * pt-creat.c: Removed.
11733         * pt-poll.c: Removed.
11734         * pt-pselect.c: Removed.
11735         * pt-readv.c: Removed.
11736         * pt-select.c: Removed.
11737         * pt-sigpause.c: Removed.
11738         * pt-sigsuspend.c: Removed.
11739         * pt-sigwaitinfo.c: Removed.
11740         * pt-waitid.c: Removed.
11741         * pt-writev.c: Removed.
11743         * init.c (pthread_functions): New variable.
11744         (__pthread_initialize_minimal): Pass pointer to pthread_functions
11745         (or NULL) to __libc_pthread_init.
11746         * forward.c: Rewrite to use __libc:pthread_functions array to get
11747         function addresses.
11748         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
11749         prototype.
11750         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11751         Take new parameter.  Copy content of variable pointed to by it
11752         to __libc_pthread_init.
11754         * pthreadP.h (struct pthread_functions): New type.
11755         (__libc_pthread_init): Declare.
11757         * pthread_attr_destroy.c: Add namespace protected alias.
11758         * pthread_attr_getdetachstate.c: Likewise.
11759         * pthread_attr_getinheritsched.c: Likewise.
11760         * pthread_attr_getschedparam.c: Likewise.
11761         * pthread_attr_getschedpolicy.c: Likewise.
11762         * pthread_attr_getscope.c: Likewise.
11763         * pthread_attr_setdetachstate.c: Likewise.
11764         * pthread_attr_setinheritsched.c: Likewise.
11765         * pthread_attr_setschedparam.c: Likewise.
11766         * pthread_attr_setschedpolicy.c: Likewise.
11767         * pthread_attr_setscope.c: Likewise.
11768         * pthread_cond_broadcast.c: Likewise.
11769         * pthread_cond_destroy.c: Likewise.
11770         * pthread_cond_init.c: Likewise.
11771         * pthread_cond_signal.c: Likewise.
11772         * pthread_cond_wait.c: Likewise.
11773         * pthread_condattr_destroy.c: Likewise.
11774         * pthread_condattr_init.c: Likewise.
11775         * pthread_equal.c: Likewise.
11776         * pthread_exit.c: Likewise.
11777         * pthread_getschedparam.c: Likewise.
11778         * pthread_self.c: Likewise.
11779         * pthread_setcancelstate.c: Likewise.
11780         * pthread_setschedparam.c: Likewise.
11781         * pthread_mutex_destroy.c: Likewise.
11782         * pthread_mutex_init.c: Likewise.
11783         * pthreadP.h: Add prototypes for the aliases.
11785         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
11786         multiple_threads member in correct TCB to 1.
11788         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
11789         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
11790         member of thread decriptor, otherwise return unconditionally 1.
11792 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
11794         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
11795         regular Linux version.  Remove file.
11796         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
11797         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
11798         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
11799         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
11800         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
11801         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
11802         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
11803         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
11804         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
11805         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
11806         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
11807         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
11808         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
11809         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
11810         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
11811         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
11812         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
11813         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
11814         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
11815         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
11816         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
11817         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
11818         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
11819         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
11820         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
11821         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
11822         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
11823         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
11824         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
11825         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
11827 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
11829         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
11830         * sysdeps/unix/sysv/linux/open.c: Removed.
11831         * sysdeps/unix/sysv/linux/fsync.c: Removed.
11832         * sysdeps/unix/sysv/linux/lseek.c: Removed.
11833         * sysdeps/unix/sysv/linux/msync.c: Removed.
11834         * sysdeps/unix/sysv/linux/read.c: Removed.
11835         * sysdeps/unix/sysv/linux/close.c: Removed.
11836         * sysdeps/unix/sysv/linux/creat.c: Removed.
11837         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
11838         * sysdeps/unix/sysv/linux/pause.c: Removed.
11839         * sysdeps/unix/sysv/linux/select.c: Removed.
11840         * sysdeps/unix/sysv/linux/write.c: Removed.
11842 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
11844         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
11845         element in TCB to see whether locking is needed.
11847         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
11848         MULTIPLE_THREADS_OFFSET value is correct.
11850         * sysdeps/unix/sysv/linux/close.c: New file.
11851         * sysdeps/unix/sysv/linux/connect.S: New file.
11852         * sysdeps/unix/sysv/linux/creat.c: New file.
11853         * sysdeps/unix/sysv/linux/fsync.c: New file.
11854         * sysdeps/unix/sysv/linux/llseek.c: New file.
11855         * sysdeps/unix/sysv/linux/lseek.c: New file.
11856         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
11857         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
11858         * sysdeps/unix/sysv/linux/msync.c: New file.
11859         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
11860         * sysdeps/unix/sysv/linux/open.c: New file.
11861         * sysdeps/unix/sysv/linux/open64.c: New file.
11862         * sysdeps/unix/sysv/linux/pause.c: New file.
11863         * sysdeps/unix/sysv/linux/poll.c: New file.
11864         * sysdeps/unix/sysv/linux/pread.c: New file.
11865         * sysdeps/unix/sysv/linux/pread64.c: New file.
11866         * sysdeps/unix/sysv/linux/pselect.c: New file.
11867         * sysdeps/unix/sysv/linux/pwrite.c: New file.
11868         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
11869         * sysdeps/unix/sysv/linux/readv.c: New file.
11870         * sysdeps/unix/sysv/linux/recv.S: New file.
11871         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
11872         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
11873         * sysdeps/unix/sysv/linux/select.c: New file.
11874         * sysdeps/unix/sysv/linux/send.S: New file.
11875         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
11876         * sysdeps/unix/sysv/linux/sendto.S: New file.
11877         * sysdeps/unix/sysv/linux/sigpause.c: New file.
11878         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
11879         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
11880         * sysdeps/unix/sysv/linux/sigwait.c: New file.
11881         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
11882         * sysdeps/unix/sysv/linux/system.c: New file.
11883         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
11884         * sysdeps/unix/sysv/linux/wait.c: New file.
11885         * sysdeps/unix/sysv/linux/waitid.c: New file.
11886         * sysdeps/unix/sysv/linux/waitpid.c: New file.
11887         * sysdeps/unix/sysv/linux/writev.c: New file.
11888         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
11890         * pt-readv.c: Fix comment.
11892 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
11894         * tst-cleanup1.c: Include stdlib.h.
11896         * tst-cancel5.c: New test.
11897         * Makefile (tests): Add tst-cancel5.
11898         (tst-cancel5): Link against libc.so libpthread.so in that order.
11900 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
11902         * forward.c (test_loaded): Prevent recursive calls.
11904         * Makefile (routines): Add libc-cancellation.
11905         * libc-cancellation.c: New file.
11906         * descr.h (struct pthread): Add multiple_threads field.
11907         * allocatestack.c (allocate_stack): Initialize multiple_header field of
11908         new thread descriptor to 1.
11909         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
11910         Initialize multiple_thread field after successful thread creation.
11911         * cancellation.c (__do_cancel): Move to pthreadP.h.
11912         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
11913         (__pthread_disable_asynccancel): Add internal_function attribute.
11914         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
11915         * pthread_setcancelstate.c: Likewise.
11916         * pthread_setcanceltype.c: Likewise.
11917         * pthread_exit.c: Likewise.
11918         * pthreadP.h (CANCELLATION_P): Likewise.
11919         (__do_cancel): Define as static inline.
11920         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
11921         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
11922         declarations.
11923         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
11924         fields.  Define MULTIPLE_THREADS_OFFSET.
11925         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
11926         declaration.
11927         * sysdeps/unix/sysv/linux/accept.S: New file.
11928         * sysdeps/unix/sysv/linux/read.c: New file.
11929         * sysdeps/unix/sysv/linux/write.c: New file.
11930         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
11931         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
11932         initialization of __libc_locking_needed.
11933         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
11934         __libc_locking_needed, use multiple_threads field in TCB.
11935         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11937 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
11939         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
11940         version.
11941         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
11943         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
11944         access to __libc_locking_needed for PIC.
11946 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
11948         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
11949         declare for libc.so.
11950         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
11951         expression.
11952         (__libc_lock_lock): Put into statement expression.
11953         (__libc_lock_unlock): Remove trailing semicolon.
11954         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
11956 2002-12-12  Roland McGrath  <roland@redhat.com>
11958         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
11959         "m" constraint to refer to __libc_locking_needed.  Declare it here.
11961 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
11963         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
11964         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
11965         Initialize __libc_locking_needed.
11966         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
11967         instead of __register_pthread_fork_handler.
11968         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
11969         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
11970         fork-gen with libc_pthread_init.
11971         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
11972         of __register_pthread_fork_handler.
11973         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
11974         of __register_pthread_fork_handler.
11975         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
11976         __libc_locking_needed to determine whether lock prefix can be avoided.
11977         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11979 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
11981         * Makefile (tests): Add tst-cleanup1.
11982         * tst-cleanup1.c: New file.
11983         * cancellation.c (__cleanup_thread): Removed.
11984         (__do_cancel): Remove call to __cleanup_thread.
11985         * pthreadP.h: Remove __cleanup_thread prorotype.
11987         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
11988         Remember function and argument even if cancellation handler
11989         function is not available.
11990         (__libc_cleanup_region_end): Execute registered function directly if
11991         pthread functions are not available.
11992         (__libc_cleanup_end): Likewise.
11994         * init.c (__pthread_initialize_minimal): Fix initialization in
11995         static lib by preventing gcc from being too clever.
11997 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
11999         * init.c (__pthread_initialize_minimal): Remove unneccesary
12000         sigaddset call.
12002         * Makefile (tests): We can run tst-locale2 now.
12004 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
12006         * Versions: Remove duplicated sigwait entry.
12008 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
12010         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
12011         inside libpthread.
12013         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
12015         * pthreadP.h: Declare __pthread_enable_asynccancel and
12016         __pthread_disable_asynccancel.
12017         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
12018         (CANCEL_RESET): Use __pthread_disable_asynccancel.
12019         * cancellation.c (__pthread_enable_asynccancel): New function.
12020         (__pthread_disable_asynccancel): New function.
12021         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
12022         * pt-close.c: Likewise.
12023         * pt-connect.c: Likewise.
12024         * pt-creat.c: Likewise.
12025         * pt-fcntl.c: Likewise.
12026         * pt-fsync.c: Likewise.
12027         * pt-lseek.c: Likewise.
12028         * pt-lseek64.c: Likewise.
12029         * pt-msgrcv.c: Likewise.
12030         * pt-msgsnd.c: Likewise.
12031         * pt-msync.c: Likewise.
12032         * pt-nanosleep.c: Likewise.
12033         * pt-open.c: Likewise.
12034         * pt-open64.c: Likewise.
12035         * pt-pause.c: Likewise.
12036         * pt-poll.c: Likewise.
12037         * pt-pread.c: Likewise.
12038         * pt-pread64.c: Likewise.
12039         * pt-pselect.c: Likewise.
12040         * pt-pwrite.c: Likewise.
12041         * pt-pwrite64.c: Likewise.
12042         * pt-read.c: Likewise.
12043         * pt-readv.c: Likewise.
12044         * pt-recv.c: Likewise.
12045         * pt-recvfrom.c: Likewise.
12046         * pt-recvmsg.c: Likewise.
12047         * pt-select.c: Likewise.
12048         * pt-send.c: Likewise.
12049         * pt-sendmsg.c: Likewise.
12050         * pt-sendto.c: Likewise.
12051         * pt-sigpause.c: Likewise.
12052         * pt-sigsuspend.c: Likewise.
12053         * pt-sigtimedwait.c: Likewise.
12054         * pt-sigwait.c: Likewise.
12055         * pt-sigwaitinfo.c: Likewise.
12056         * pt-system.c: Likewise.
12057         * pt-tcdrain.c: Likewise.
12058         * pt-wait.c: Likewise.
12059         * pt-waitid.c: Likewise.
12060         * pt-waitpid.c: Likewise.
12061         * pt-write.c: Likewise.
12062         * pt-writev.c: Likewise.
12063         * pthread_join.c: Likewise.
12064         * pthread_timedjoin.c: Likewise.
12066         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
12067         (__xpg_sigpause): New function.
12068         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
12070 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
12072         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
12074         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
12075         _GI_pthread_cleanup_pop to pthreadP.h.
12077         * ftrylockfile.c: Use _IO_lock_trylock instead of
12078         pthread_mutex_trylock.
12080         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
12081         (CANCEL_RESET): Likewise.
12082         (__pthread_setcanceltype_): Declare.
12083         (__pthread_mutex_lock_internal): Declare.
12084         (__pthread_mutex_unlock_internal): Declare.
12085         (__pthread_once_internal): Declare.
12086         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
12087         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
12089         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
12090         and pthread_mutex_unlock.
12091         * pthread_cond_wait.c: Likewise.
12092         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
12093         * pthread_mutex_unlock.c: Likewise.
12095         * pthread_setcanceltype.c: Add additional alias
12096         __pthread_setcanceltype.
12098         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
12099         * sem_open.c (sem_open): Likewise.
12100         Use __libc_open, __libc_write, and __libc_close instead of
12101         open, write, and close respectively.
12103         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
12104         Rewrite as statement expression since it must return a value.
12106         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
12107         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
12108         __pthread_kill.
12110         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
12111         alias __pthread_once_internal.
12113         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
12115 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
12117         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
12118         * tst-stdio1.c: New file.
12119         * tst-stdio2.c: New file.
12121         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
12123         * Makefile (tests): Comment out tst-locale2 for now.
12124         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
12126         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
12127         -D_IO_MTSAFE_IO.
12128         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
12129         Use _IO_lock_init instead of explicit assignment.
12131         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
12132         Define __libc_lock_* and __libc_lock_recursive macros with
12133         lowlevellock macros, not pthread mutexes.
12135         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
12136         of pthread_mutex_lock.
12137         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
12138         instead of pthread_mutex_unlock.
12140 2002-12-06  Roland McGrath  <roland@redhat.com>
12142         * allocatestack.c (__stack_user): Use uninitialized defn.
12143         * init.c (__pthread_initialize_minimal): Initialize it here.
12145 2002-12-05  Roland McGrath  <roland@redhat.com>
12147         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
12148         string.
12149         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
12151         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
12152         missing & here too.
12154 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
12156         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12157         lowlevellock.
12158         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
12159         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
12160         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
12161         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
12162         for __libc_lock_* macros.
12163         * Makefile (routines): Add libc-lowlevellock.
12165 2002-10-09  Roland McGrath  <roland@redhat.com>
12167         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
12168         Under [__PIC__], call the function via the pointer fetched for
12169         comparison rather than a call by name that uses the PLT.
12170         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
12171         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
12172         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
12173         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
12174         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
12176 2002-12-04  Roland McGrath  <roland@redhat.com>
12178         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
12180         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
12181         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
12183         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
12185 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
12187         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
12188         a completely opaque, non-integer type.
12189         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
12191 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
12193         * sysdeps/i386/tls.h: Include stdlib.h.
12194         * sysdeps/x86_64/tls.h: Likewise.
12196 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
12198         * Makefile (tests): Add tst-locale2.
12199         (tests-static): Likewise.
12200         * tst-locale2.c: New file.
12202         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
12203         volatile and add memory clobbers to lock operations.
12205 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
12207         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
12208         * sysdeps/i386/i486/bits/atomic.h: New file.
12209         * sysdeps/i386/i586/bits/atomic.h: New file.
12210         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
12211         include i486 version.
12212         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
12213         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
12214         Patch by Marijn Ros <marijn@mad.scientist.com>.
12216         * allocatestack.c (get_cached_stack): Don't crash if we first
12217         found a stack with a larger size then needed.
12218         Reported by Hui Huang <hui.huang@sun.com>.
12220         * Makefile (tests): Add tst-sysconf.
12221         * tst-sysconf.c: New file.
12223         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
12224         PTHREAD_THREADS_MAX.
12226 2002-12-02  Roland McGrath  <roland@redhat.com>
12228         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
12229         Declare using hidden_proto instead of attribute_hidden, so there are
12230         non-.hidden static symbols for gdb to find.
12231         (__pthread_keys): Likewise.
12232         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
12233         * allocatestack.c (__stack_user): Likewise.
12234         * pthread_create.c (__pthread_keys): Likewise.
12235         (__nptl_threads_events, __nptl_last_event): Make these static instead
12236         of hidden.
12237         * pthread_key_create.c (__pthread_pthread_keys_max,
12238         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
12240 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
12242         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
12243         statically.
12244         * tst-locale1.c: New file.
12246         * pthread_cond_timedwait.c: Include <stdlib.h>.
12248         * Makefile (tests): Add tst-fork2 and tst-fork3.
12249         * tst-fork2.c: New file.
12250         * tst-fork3.c: New file.
12252 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
12254         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
12256         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
12257         require it to 200112L.
12259         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
12260         instruction only if HAVE_CMOV is defined.
12261         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
12263         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
12265         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
12267         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
12269         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
12271 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
12273         * sysdeps/x86_64/bits/atomic.h: New file.
12275         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
12276         16-bit operations.
12278         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
12279         possible since gettid cannot fail.
12281         * sysdeps/x86_64/pthreaddef.h: New file.
12283         * sysdeps/i386/pthreaddef.h (gettid): Removed.
12285         * sysdeps/x86_64/pthread_spin_init.c: New file.
12286         * sysdeps/x86_64/pthread_spin_lock.c: New file.
12287         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
12288         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
12290         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
12291         Add missing lock prefix.  Minute optimization.
12293         * tst-spin2.c (main): Also check successful trylock call.
12295         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
12296         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
12298         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
12299         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
12301         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
12302         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
12303         value in case of an error.  Add support for INTERNAL_SYSCALL.
12305         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
12306         value in case of an error.
12308         * sysdeps/x86_64/tls.h: New file.
12310 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
12312         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
12313         takes the array member name and the index as parameters.
12314         (THREAD_SETMEM_NC): Likewise.
12315         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
12316         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
12317         interfaces.
12319         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
12320         to decide which code to use.
12321         (THREAD_SETMEM_NC): Likewise.
12323         * allocatestack.c (queue_stack): Don't remove stack from list here.
12324         Do it in the caller.  Correct condition to prematurely terminate
12325         loop to free stacks.
12326         (__deallocate_stack): Remove stack from list here.
12328 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
12330         * Makefile (tests): Add tst-stack1.
12331         * tst-stack1.c: New file.
12333         * allocatestack.c (allocate_stack): Initialize the TCB on a user
12334         provided stack.
12336         * pthread_attr_getstack.c: Return bottom of the thread area.
12338 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
12340         * Makefile (libpthread-routines): Add pt-allocrtsig and
12341         pthread_kill_other_threads.
12342         * pt-allocrtsig.c: New file.
12343         * pthread_kill_other_threads.c: New file.
12344         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
12345         all three functions.
12346         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12347         allocrtsig.
12348         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
12349         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
12350         and __libc_allocate_rtsig_private.
12351         * Versions (libpthread): Export pthread_kill_other_threads_np,
12352         __libc_current_sigrtmin, and __libc_current_sigrtmax.
12354 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
12356         * allocatestack.c (allocate_stack): stackaddr in attribute points to
12357         the end of the stack.  Adjust computations.
12358         When mprotect call fails dequeue stack and free it.
12359         * pthread_attr_setstack.c: Store top of the stack in stackaddr
12360         attribute.
12361         * pthread_getattr_np.c: Likewise.
12363         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
12364         surprises.
12366 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
12368         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
12369         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
12371 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
12373         * pthread_getspecific.c: Optimize access to first 2nd-level array.
12374         * pthread_setspecific.c: Likewise.
12376 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
12378         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
12379         definitions.  Get them from the official place.
12380         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
12382         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
12383         Use new CLONE_ flags in clone() calls.
12385         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
12386         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
12388         * Versions: Add pthread_* functions for libc.
12389         * forward.c: New file.
12391         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
12392         errno-loc.
12393         * herrno.c: New file.
12394         * res.c: New file.
12396         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
12397         sem_trywait, and sem_timedwait.  Add herrno and res.
12398         * sem_init.c: Don't initialize lock and waiters members.
12399         * sem_open.c: Likewise.
12400         * sem_post.c: Removed.
12401         * sem_wait.c: Removed.
12402         * sem_trywait.c: Removed.
12403         * sem_timedwait.c: Removed.
12404         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
12405         Includes full implementations of sem_post, sem_wait, sem_trywait,
12406         and sem_timedwait.
12407         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
12408         for new implementation.
12409         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
12410         and waiters fields.
12412         * tst-sem3.c: Improve error message.
12413         * tst-signal3.c: Likewise.
12415         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
12416         to tell the kernel about the termination futex and to initialize tid
12417         member.  Don't initialize main_thread.
12418         * descr.h (struct pthread): Remove main_thread member.
12419         * cancelllation.c (__do_cancel): Remove code handling main thread.
12420         The main thread is not special anymore.
12422         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
12423         size of the stacks to stack_cache_actsize.
12425         * pt-readv.c: Add missing "defined".
12426         * pt-sigwait.c: Likewise.
12427         * pt-writev.c: Likewise.
12429 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
12431         * Versions: Export __connect from libpthread.
12432         Patch by Luca Barbieri <ldb@ldb.ods.org>.
12434         * Makefile (libpthread-routines): Add pt-raise.
12435         * sysdeps/unix/sysv/linux/raise.c: New file.
12436         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
12437         * sysdeps/generic/pt-raise.c: New file.
12439         * pthread_cond_init.c: Initialize all data elements of the condvar
12440         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
12442         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
12443         * pthread_create.c: Likewise.
12445         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
12446         * tst-key1.c: New file.
12447         * tst-key2.c: New file.
12448         * tst-key3.c: New file.
12450         * Versions: Export pthread_detach for version GLIBC_2.0.
12451         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
12453 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
12455         * pthread_key_create.c: Terminate search after an unused key was found.
12456         Patch by Luca Barbieri <ldb@ldb.ods.org>.
12458         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
12459         Patch by Luca Barbieri <ldb@ldb.ods.org>.
12461 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
12463         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
12464         dynamic lookup for errno in PIC.
12466         * allocatestack.c (get_cached_stack): Rearrange code slightly to
12467         release the stack lock as soon as possible.
12468         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
12469         the static TLS block.
12470         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
12472         * cancellation.c: Renamed from cancelation.c.
12473         * Makefile: Adjust accordingly.
12474         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
12475         * cleanup_defer.c: Use CANCELLATION_P.
12476         * pthread_testcancel.c: Likewise.
12477         * descr.h: Fix spelling in comments.
12478         * init.c: Likewise.
12479         * pthread_getattr_np.c: Likewise.
12480         * pthread_getschedparam.c: Likewise.
12481         * pthread_setschedparam.c: Likewise.
12482         * Versions: Likewise.
12484         * pt-pselect.c: New file.
12485         * Makefile (libpthread-routines): Add pt-pselect.
12486         * Versions: Add pselect.
12488         * tst-cancel4.c: New file.
12489         * Makefile (tests): Add tst-cancel4.
12491 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
12493         * pthread_mutex_lock.c: Always record lock ownership.
12494         * pthread_mutex_timedlock.c: Likewise.
12495         * pthread_mutex_trylock.c: Likewise.
12497         * pt-readv.c: New file.
12498         * pt-writev.c: New file.
12499         * pt-creat.c: New file.
12500         * pt-msgrcv.c: New file.
12501         * pt-msgsnd.c: New file.
12502         * pt-poll.c: New file.
12503         * pt-select.c: New file.
12504         * pt-sigpause.c: New file.
12505         * pt-sigsuspend.c: New file.
12506         * pt-sigwait.c: New file.
12507         * pt-sigwaitinfo.c: New file.
12508         * pt-waitid.c: New file.
12509         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
12510         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
12511         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
12512         * Versions: Add all the new functions.
12514         * tst-exit1.c: New file.
12515         * Makefile (tests): Add tst-exit1.
12517         * sem_timedwait.c: Minor optimization for more optimal fastpath.
12519 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
12521         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
12523         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
12524         call.  pthread_join is an official cancellation point.
12525         * pthread_timedjoin.c: Likewise.
12527         * pthread_cond_wait.c: Revert order in which internal lock are dropped
12528         and the condvar's mutex are retrieved.
12529         * pthread_cond_timedwait.c: Likewise.
12530         Reported by dice@saros.East.Sun.COM.
12532 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
12534         * pthreadP.h: Cut out all type definitions and move them...
12535         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
12536         * pthreadP.h: Include <internaltypes.h>.
12538         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
12539         performance tweaks.
12541         * sem_trywait.c: Shuffle #includes around to get right order.
12542         * sem_timedwait.c: Likewise.
12543         * sem_post.c: Likewise.
12544         * sem_wait.c: Likewise.
12546         * nptl 0.3 released.
12548         * Makefile (tests): Add tst-signal3.
12549         * tst-signal3.c: New file.
12551 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
12553         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
12554         the asms modify the sem object.
12555         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
12557         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
12558         the actual members.
12559         * pthreadP.h (struct sem): New type.  Actual semaphore type.
12560         * semaphoreP.h: Include pthreadP.h.
12561         * sem_getvalue.c: Adjust to sem_t change.
12562         * sem_init.c: Likewise.
12563         * sem_open.c: Likewise.
12564         * sem_post.c: Likewise.
12565         * sem_timedwait.c: Likewise.
12566         * sem_trywait.c: Likewise.
12567         * sem_wait.c: Likewise.
12569 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
12571         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
12572         * tst-basic2.c: New file.
12573         * tst-exec1.c: New file.
12574         * tst-exec2.c: New file.
12575         * tst-exec3.c: New file.
12577         * tst-fork1.c: Remove extra */.
12579         * nptl 0.2 released.  The API for IA-32 is complete.