Avoid access beyond memory bounds in pthread_attr_getaffinity_np
[glibc.git] / nptl / ChangeLog
blob64b674c678fd3b3cfe699df34bd4ea64fc3c15c4
1 2013-06-13  Siddhesh Poyarekar  <siddhesh@redhat.com>
2             Carlos O'Donell  <carlos@redhat.com>
4         [BZ #15618]
5         * tst-pthread-attr-affinity: New test case.
6         * Makefile (tests): Add it.
7         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
8         (__pthread_attr_getaffinity_new): Copy minimum of source and
9         destination sizes to avoid a buffer overrun.
11 2013-06-10  Carlos O'Donell  <carlos@redhat.com>
13         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
14         (lll_futex_wake): Return syscall error.
15         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
16         (lll_futex_wake): Return syscall error.
18 2013-08-06   Ondřej Bílka  <neleai@seznam.cz>
20         * sysdeps/pthread/allocalim.h: (__libc_use_alloca): Fix warning.
22 2013-06-06   Ondřej Bílka  <neleai@seznam.cz>
24         * tst-cond22.c: Fix leading whitespaces.
25         * tst-umask1.c: Likewise.
27 2013-06-06  Joseph Myers  <joseph@codesourcery.com>
29         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Remove
30         trailing whitespace.
31         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Likewise.
32         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
33         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
34         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
35         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
36         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
37         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
38         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
39         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
40         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
41         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
42         * tst-mutexpp10.c: Likewise.
43         * tst-stackguard1.c: Likewise.
45 2013-05-31  Joseph Myers  <joseph@codesourcery.com>
47         * Makefile ($(objpfx)libpthread.so): Remove dependencies on libc
48         and ld.so.
50 2013-05-16  Ryan S. Arnold  <rsa@linux.vnet.ibm.com>
52         * pthread_create.c: Add missing #include <stdint.h> due to uint64_t or
53         uint32_t usage.
54         * sysdeps/pthread/createthread.c: Likewise.
56 2013-05-14  Andreas Jaeger  <aj@suse.de>
58         [BZ #10686]
59         * sysdeps/x86_64/tls.h (struct tcbhead_t): Add __private_ss field.
60         * sysdeps/i386/tls.h (struct tcbhead_t): Likewise.
62 2013-05-09  Andi Kleen  <ak@linux.intel.com>
64         * tst-mutex8.c (do_test): Check for ENABLE_PI.
66 2013-04-22  Siddhesh Poyarekar  <siddhesh@redhat.com>
68         * pthreadP.h (check_sched_policy_attr): New inline function.
69         (check_sched_priority_attr): Likewise.
70         (check_stacksize_attr): Likewise.
71         (__kernel_cpumask_size, __determine_cpumask_size): Declare
72         extern.
73         (check_cpuset_attr): New inline function.
74         * pthread_attr_setschedparam (__pthread_attr_setschedparam):
75         Use check_sched_priority_attr.
76         * pthread_attr_setschedpolicy.c
77         (__pthread_attr_setschedpolicy): Use check_sched_policy_attr.
78         * pthread_attr_setstack.c (__pthread_attr_setstack): Use
79         check_stacksize_attr.
80         * pthread_attr_setstacksize.c (__pthread_attr_setstacksize):
81         Likewise.
82         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
83         (__pthread_attr_setaffinity_new): Use check_cpuset_attr.
85 2013-04-11  Andreas Schwab  <schwab@suse.de>
87         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
88         (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
89         directly use absolute timeout.
91 2013-04-07  Carlos O'Donell  <carlos@redhat.com>
93         * sysdeps/unix/sysv/linux/sem_post.c: Include atomic.h.
95 2013-04-04  Siddhesh Poyarekar  <siddhesh@redhat.com>
97         [BZ #15337]
98         * sysdeps/unix/sysv/linux/x86_64/cancellation.S
99         [IS_IN_libpthread]
100         [SHARED && defined DO_VERSIONING && !defined NO_HIDDEN]: Mark
101         __pthread_unwind hidden.
103 2013-03-28  Roland McGrath  <roland@hack.frob.com>
105         * pthread_create.c (start_thread) [!SHARED]:
106         Call __call_tls_dtors only if it's not NULL.
108 2013-03-19  Siddhesh Poyarekar  <siddhesh@redhat.com>
110         * allocatestack.c (allocate_stack): Use __default_pthread_attr
111         instead of __default_stacksize.
112         * nptl-init.c (__pthread_initialize_minimal_internal):
113         Likewise.  Initialize guardsize.
114         * pthreadP.h (__default_pthread_attr): Declare.
115         * pthread_attr_getstacksize.c (__pthread_attr_getstacksize):
116         Use __default_pthread_attr instead of __default_stacksize.
117         * pthread_create.c (default_attr): Remove.
118         (__pthread_create_2_1): Use __default_pthread_attr instead of
119         default_attr.
120         * vars.c (__default_stacksize): Remove.
121         (__default_pthread_attr): New static variable to store
122         default thread attributes.
124 2013-03-18  Siddhesh Poyarekar  <siddhesh@redhat.com>
126         * pthread_barrier_init.c (default_attr): Rename to
127         default_barrierattr.
128         (pthread_barrier_init): Adjust for the rename.
129         * pthread_mutex_init.c (default_attr): Rename to
130         default_mutexattr.
131         (__pthread_mutex_init): Adjust for the rename.
132         * pthread_rwlock_init.c (default_attr): Rebane to
133         default_rwlockattr.
134         (__pthread_rwlock_init): Adjust for the rename.
136 2013-03-12  Carlos O'Donell  <carlos@redhat.com>
138         * sysdeps/unix/sysv/linux/lowlevellock.c: Include <atomic.h>.
140 2013-03-04  Roland McGrath  <roland@hack.frob.com>
142         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h:
143         Change multiple inclusion guard to _LINUX_I686_DL_SYSDEP_H.
144         Use #include_next.
145         (HAVE_DL_DISCOVER_OSVERSION): Remove definition, now redundant.
146         (RTLD_PRIVATE_ERRNO): Likewise.
147         (NEED_DL_SYSINFO, DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION):
148         Move macros and associated declaration to ...
149         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: ... here.
150         Change multiple include guard to _LINUX_I386_DL_SYSDEP_H.
151         Use #include_next.
153 2013-03-01  Carlos O'Donell  <carlos@redhat.com>
155         * Makefile (tests): Revert last change.
156         (tst-pthread-stack-env-ENV): Likewise.
157         * nptl-init.c (set_default_stacksize): Likewise.
158         (__pthread_initialize_minimal_internal): Likewise.
159         * tst-pthread-stack-env.c: Likewise.
161 2013-03-01  Siddhesh Poyarekar  <siddhesh@redhat.com>
163         * tst-oddstacklimit.c: Include stdlib.h.
165         * Makefile (tests): Add tst-pthread-stack-env.
166         (tst-pthread-stack-env-ENV): Set environment for test.
167         * nptl-init.c (set_default_stacksize): New function.
168         (__pthread_initialize_minimal_internal): Accept ARGC, ARGV and
169         ENVP.  Initialize __ENVIRON and set __DEFAULT_STACKSIZE.
170         * tst-pthread-stack-env.c: New test case.
172 2013-02-21  David S. Miller  <davem@davemloft.net>
174         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
175         (FUTEX_WAIT_REQUEUE_PI): Define.
176         (FUTEX_CMP_REQUEUE_PI): Likewise.
177         (lll_futex_wait_requeue_pi): Likewise.
178         (lll_futex_timed_wait_requeue_pi): Likewise.
179         (lll_futex_cmp_requeue_pi): Likewise.
181 2013-02-21  Carlos O'Donell  <carlos@redhat.com>
183         * sysdeps/unix/sysv/linux/fork.c: Fix comment typo.
185 2013-02-18  Siddhesh Poyarekar  <siddhesh@redhat.com>
187         * sysdeps/pthread/tst-timer.c: Include stdlib.h for declaration
188         of exit.
189         * tst-barrier4.c: Likewise.
190         * tst-robust7.c: Likewise.
192         [BZ #14920]
193         * pthreadP.h (USE_REQUEUE_PI): New macro to check if mutex is
194         PI-aware.
195         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Use
196         PI-aware futex operations if available and mutex is PI-aware.
197         * pthread_cond_signal.c (__pthread_cond_signal): Likewise.
198         * nptl/pthread_cond_timedwait.c (__pthread_cond_timedwait):
199         Likewise.
200         * pthread_cond_wait.c (__condvar_cleanup): Adjust lock if
201         cancellation occurred just after futex returned successfully
202         from a PI operation with the mutex held.
203         (__pthread_cond_wait): Use PI-aware futex operations if
204         available and mutex is PI-aware.
205         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
206         (FUTEX_WAIT_REQUEUE_PI): Define.
207         (FUTEX_CMP_REQUEUE_PI): Likewise.
208         (lll_futex_wait_requeue_pi): Likewise.
209         (lll_futex_timed_wait_requeue_pi): Likewise.
210         (lll_futex_cmp_requeue_pi): Likewise.
211         * nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h
212         (FUTEX_WAIT_REQUEUE_PI): Define.
213         (FUTEX_CMP_REQUEUE_PI): Likewise.
214         (lll_futex_wait_requeue_pi): Likewise.
215         (lll_futex_timed_wait_requeue_pi): Likewise.
216         (lll_futex_cmp_requeue_pi): Likewise.
217         * sysdeps/unix/sysv/linux/kernel-features.h: Define
218         __ASSUME_REQUEUE_PI for Linux version higher than 2.6.31.
220 2013-02-04  Andreas Schwab  <schwab@suse.de>
222         [BZ #14142]
223         * tst-cancel14.c: Include <sys/time.h>.
224         * tst-cancel15.c: Likewise.
225         * tst-mutex9.c: Include <stdint.h>, <stdlib.h> and <sys/time.h>.
226         * tst-stackguard1.c: Include <tls.h>
228 2013-01-16  Andreas Schwab  <schwab@suse.de>
230         [BZ #14327]
231         * sem_open.c (sem_open): Use __mktemp instead of mktemp.
233 2013-01-11  Carlos O'Donell  <codonell@redhat.com>
235         * allocatestack.c (allocate_stack): Add comment. Remove assert
236         on attr.
238 2013-01-11  H.J. Lu  <hongjiu.lu@intel.com>
240         * Makefile (tst-cancel7-ARGS: Replace $(host-built-program-cmd)
241         with $(host-test-program-cmd).
242         (tst-exec4-ARGS): Likewise.
243         (tst-stackguard1-ARGS): Likewise.
244         ($(objpfx)tst-tls6.out): Don't pass $(elf-objpfx) to tst-tls6.sh.
245         Replace $(rtld-installed-name) with $(test-via-rtld-prefix).
246         * tst-tls6.sh (elf_objpfx): Removed.
247         (rtld_installed_name): Renamed to ...
248         (test_via_rtld_prefix): This.
249         (tst_tls5): Prepend ${test_via_rtld_prefix}.
251 2013-01-02  Joseph Myers  <joseph@codesourcery.com>
253         * All files with FSF copyright notices: Update copyright dates
254         using scripts/update-copyrights.
256 2013-01-01  Joseph Myers  <joseph@codesourcery.com>
258         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Reformat
259         copyright notice.
261 2012-12-28  Andi Kleen  <ak@linux.intel.com>
263         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Convert
264         to prototype.
265         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock):
266         Likewise.
268 2012-12-27  David S. Miller  <davem@davemloft.net>
270         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
271         (lll_futex_timed_wait_bitset): New macro.
273 2012-12-27  Siddhesh Poyarekar  <siddhesh@redhat.com>
275         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (SYS_futex):
276         Remove definition.
277         (lll_futex_timed_wait): Replace assembly code with
278         INTERNAL_SYSCALL.
279         (lll_futex_timed_wait_bitset): Likewise.
280         (lll_futex_wake): Likewise.
281         (lll_futex_requeue): Likewise.
282         (lll_futex_wake_unlock): Likewise.
284 2012-12-08  Siddhesh Poyarekar  <siddhesh@redhat.com>
286         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind):
287         Declare LOCAL_VAR as char.
289 2012-12-04  Joseph Myers  <joseph@codesourcery.com>
291         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__old_sem_post):
292         Cast result of atomic_increment_val to (void) instead of storing
293         in otherwise-unused variable.
295 2012-12-03  Allan McRae  <allan@archlinux.org>
297         * Makefile (LDFLAGS-tst-cond24, LDFLAGS-tst-cond25): Remove.
299 2012-11-26  H.J. Lu  <hongjiu.lu@intel.com>
301         * unwind.c (__pthread_unwind): Pass address of unwind_cleanup
302         to THREAD_SETMEM.
303         * sysdeps/i386/tls.h: Include <libc-internal.h>.
304         (THREAD_SETMEM): Use cast_to_integer before casting to uint64_t.
305         (THREAD_SETMEM_NC): Likewise.
306         * sysdeps/x86_64/tls.h: Include <libc-internal.h>.
307         (THREAD_SETMEM): Use cast_to_integer before casting to uint64_t.
308         (THREAD_SETMEM_NC): Likewise.
310 2012-11-21  Joseph Myers  <joseph@codesourcery.com>
312         * sysdeps/unix/sysv/linux/sem_post.c (__old_sem_post): Cast result
313         of atomic_increment_val to (void) instead of storing in
314         otherwise-unused variable.
316         * pthread_cond_timedwait.c (__pthread_cond_timedwait)
317         [__NR_clock_gettime]: Cast result of INTERNAL_VSYSCALL to void
318         instead of storing in otherwise-unused variable.
320 2012-11-14  Marcus Shawcroft  <marcus.shawcroft@linaro.org>
322         * Makefile (CFLAGS-open.c, CFLAGS-open64.c, CFLAGS-pause.c)
323           (CFLAGS-recv.c, CFLAGS-send.c): Define.
325 2012-11-06  Chris Metcalf  <cmetcalf@tilera.com>
327         * tst-sem14.c (TIMEOUT): Set timeout to 10 seconds.
328         * tst-cond24.c (TIMEOUT): Increase from 10 to 20 seconds.
330 2012-11-05  Siddhesh Poyarekar  <siddhesh@redhat.com>
332         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Time out
333         if absolute timeout is negative.
334         [__ASSUME_FUTEX_CLOCK_REALTIME &&
335         lll_futex_timed_wait_bitset]: Use lll_futex_timed_wait_bitset.
336         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
337         Likewise.
338         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
339         Likewise.
340         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
341         (__lll_robust_timedlock_wait): Likewise.
342         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
343         (lll_futex_timed_wait_bitset): New macro.
344         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
345         (lll_futex_timed_wait_bitset): Likewise.
347 2012-11-03  David S. Miller  <davem@davemloft.net>
349         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (BUSY_WAIT_NOP):
350         Add missing spaces.
351         (__cpu_relax): Likewise.
353 2012-11-02  H.J. Lu  <hongjiu.lu@intel.com>
355         * sysdeps/x86_64/tls.h: Don't include <xmmintrin.h>.
356         (__128bits): New struct typedef.
357         (tcbhead_t): Replace __m128 with __128bits.
359 2012-10-30  Aurelien Jarno  <aurelien@aurel32.net>
360             Joseph Myers  <joseph@codesourcery.com>
362         * Makefile (tst-cancel7-ARGS): Use exec in --command argument.
364 2012-10-28  David S. Miller  <davem@davemloft.net>
366         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (BUSY_WAIT_NOP):
367         Define when we have v9 instructions available.
368         * sysdeps/unix/sysv/linux/sparc/sparc64/cpu_relax.S: New file.
369         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/cpu_relax.S: New
370         file.
371         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/Makefile: New
372         file.
373         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Add cpu_relax
374         to libpthread-routines.
376 2012-10-25  Roland McGrath  <roland@hack.frob.com>
378         * tst-cond-except.c (TEST_FUNCTION): New macro.
380 2012-10-25  Joseph Myers  <joseph@codesourcery.com>
382         * Makefile ($(objpfx)tst-tls6.out): Use $(BASH) not $(SHELL) to
383         run tst-tls6.sh.
384         * tst-tls6.sh: Use /bin/bash not /bin/sh.
386 2012-10-25  Roland McGrath  <roland@hack.frob.com>
388         * tst-basic2.c (do_test): Return RESULT, not always zero.
390         * tst-cond25.c: Include <stdint.h>
391         (waiter): Add casts to uintptr_t between casting integer<->pointer.
392         (timed_waiter): Likewise.
393         (do_test_wait): Likewise.
394         * tst-cond-except.c (thr): Likewise.
395         (do_test): Use prototype definition.
397 2012-10-24  Joseph Myers  <joseph@codesourcery.com>
398             Jim Blandy  <jimb@codesourcery.com>
400         * Makefile ($(objpfx)tst-tls6.out): Pass $(test-wrapper-env) to
401         tst-tls6.sh.
402         * tst-tls6.sh (test_wrapper_env): New variable.  Use it to run
403         programs with LD_PRELOAD set.
405 2012-10-24  Roland McGrath  <roland@hack.frob.com>
407         * Makefile ($(objpfx)tst-cond11, $(objpfx)tst-cond19): Targets removed.
408         ($(objpfx)tst-sem5, $(objpfx)tst-cancel18): Likewise.
409         ((objpfx)tst-cancelx18, $(objpfx)tst-clock2): Likewise.
410         ($(objpfx)tst-rwlock14): Likewise.
412 2012-10-24  Joseph Myers  <joseph@codesourcery.com>
414         * Makefile (tests): Remove tst-oddstacklimit.
415         (test-srcs): New variable.
416         (tst-oddstacklimit-ENV): Remove.
417         [$(run-built-tests) = yes] (tests): Depend on
418         $(objpfx)tst-oddstacklimit.out.
419         [$(run-built-tests) = yes] ($(objpfx)tst-oddstacklimit.out): New
420         target.
421         * tst-oddstacklimit.c: Do not include "tst-basic1.c".  Use
422         setrlimit before executing tst-basic1 test passed to --command.
424 2012-10-23  Joseph Myers  <joseph@codesourcery.com>
426         * Makefile [$(cross-compiling) = no]: Change condition to
427         [$(run-built-tests) = yes].
429 2012-10-23  Jim Blandy  <jimb@codesourcery.com>
430             Joseph Myers  <joseph@codesourcery.com>
432         * Makefile (tst-cancel7-ARGS): Use $(host-built-program-cmd).
433         (tst-exec4-ARGS): Likewise.
434         (tst-stackguard1-ARGS): Likewise.
436 2012-10-21  Jim Blandy  <jimb@codesourcery.com>
437             Joseph Myers  <joseph@codesourcery.com>
439         * Makefile ($(objpfx)tst-cancel-wrappers.out): Pass $(NM) to
440         tst-cancel-wrappers.sh.
441         * tst-cancel-wrappers.sh: Use nm program given as first argument,
442         not hardcoded "nm".
444 2012-10-17  Siddhesh Poyarekar  <siddhesh@redhat.com>
446         * tst-cond25.c (do_test_wait): Don't check for return value from
447         pthread_cancel.
449 2012-10-16  Siddhesh Poyarekar  <siddhesh@redhat.com>
451         [BZ #14652]
452         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
453         (__condvar_tw_cleanup):  Adjust the mutex data structure if it
454         was locked by FUTEX_WAIT_REQUEUE_PI.
455         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait
456         (__condvar_w_cleanup): Likewise.
457         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
458         (__condvar_cleanup2): Likewise.
459         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
460         (__condvar_cleanup1): Likewise.
462 2012-10-10  Carlos O'Donell  <carlos@systemhalted.org>
464         * sysdeps/pthread/pthread.h [!(defined __GNUC__ &&
465         defined __EXCEPTIONS) && defined __USE_GNU]
466         (pthread_cleanup_push_defer_np): Fix formatting.
468 2012-10-10  Siddhesh Poyarekar  <siddhesh@redhat.com>
470         [BZ #14652]
471         * Makefile (tests): New test case tst-cond25.
472         (LDFLAGS-tst-cond25): Link tst-cond25 against librt.
473         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
474         (__condvar_tw_cleanup): Lock mutex only if we don't already
475         own it.
476         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
477         (__condvar_w_cleanup): Likewise.
478         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add TID_MASK.
479         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
480         (__condvar_cleanup2): Lock mutex only if we don't already
481         own it.
482         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
483         (__condvar_cleanup1): Likewise.
484         * tst-cond25.c: New test case.
486 2012-10-09  Roland McGrath  <roland@hack.frob.com>
488         * sysdeps/pthread/configure: Regenerated.
489         * sysdeps/x86_64/configure: Regenerated.
491 2012-10-05  David S. Miller  <davem@davemloft.net>
493         [BZ #14568]
494         * sysdeps/sparc/tls.h (DB_THREAD_SELF_INCLUDE): Delete.
495         (DB_THREAD_SELF): Use constants for the register offsets.  Correct
496         the case of a 64-bit debugger with a 32-bit inferior.
498 2012-10-05  H.J. Lu  <hongjiu.lu@intel.com>
500         [BZ #14557]
501         * Makefile (tests-static): Add tst-cancel24-static,
502         tst-cond8-static tst-mutex8-static, tst-mutexpi8-static,
503         tst-sem11-static and tst-sem12-static.
504         (tests): Likewise.
505         (LDLIBS-tst-cancel24-static): New macro.
506         * tst-cancel24-static.cc: New file.
507         * tst-cond8-static.c: Likewise.
508         * tst-mutex8-static.c: Likewise.
509         * tst-mutexpi8-static.c: Likewise.
510         * tst-sem11-static.c: Likewise.
511         * tst-sem12-static.c: Likewise.
513 2012-10-05  Siddhesh Poyarekar  <siddhesh@redhat.com>
515         [BZ #14417]
516         * Makefile (tests): New test case tst-cond24.
517         (LDFLAGS-tst-cond24): Link tst-cond24 against librt.
518         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
519         (__pthread_cond_timedwait): Unlock mutex before going back to
520         wait in PI case.
521         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
522         (__pthread_cond_wait): Likewise.  Revert handling of EAGAIN
523         return from futex_wait.
524         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
525         (__pthread_cond_timedwait): Unlock mutex before going back to
526         wait in PI case.  Set requeue_pi flag only if wait returned 0.
527         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
528         (__pthread_cond_wait): Likewise.  Revert handling of EAGAIN
529         return from futex_wait.
530         * tst-cond24.c: New test case.
532 2012-10-04  Roland McGrath  <roland@hack.frob.com>
534         * pthread_create.c (start_thread): Use __madvise, not madvise.
536 2012-10-02  H.J. Lu  <hongjiu.lu@intel.com>
538         * sysdeps/i386/tls.h: Update copyright years.
540 2012-10-02  Siddhesh Poyarekar  <siddhesh@redhat.com>
542         * pthread_create.c (start_thread): Fix clone flag name in
543         comment to CLONE_CHILD_CLEARTID.
544         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
545         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
546         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
547         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
548         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
549         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
551 2012-10-01  Siddhesh Poyarekar  <siddhesh@redhat.com>
553         [BZ #14477]
554         * Makefile (tests): Add tst-cond-except.
555         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
556         (__pthread_cond_timedwait): Mark instructions where %ebx is
557         incremented in PI case.
558         (.gcc_except_table): Add entry to jump to __condvar_tw_cleanup2
559         for the marked PI case instructions.
560         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
561         (__pthread_cond_wait): Mark instructions where %ebx is
562         incremented in PI case.
563         (.gcc_except_table): Add entry to jump to __condvar_w_cleanup2
564         for the marked PI case instructions.
565         * tst-cond-except.c: New test case.
567 2012-09-24  Dmitry V. Levin  <ldv@altlinux.org>
569         * tst-tls6.sh: Add "set -e".
570         * Makefile: Do not specify -e option when running testsuite
571         shell scripts.
573         * tst-tls6.sh: Add copyright header.
575 2012-09-24  H.J. Lu  <hongjiu.lu@intel.com>
577         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Add "()" when casting
578         to uint64_t for 64-bit store.
579         (THREAD_SETMEM_NC): Likewise.
581 2012-09-19  H.J. Lu  <hongjiu.lu@intel.com>
583         * sysdeps/i386/tls.h (THREAD_SETMEM): Cast to uint64_t for
584         64-bit store.
585         (THREAD_SETMEM_NC): Likewise.
587 2012-09-14  Jeff Law  <law@redhat.com>
589         [BZ #14583]
590         * sysdeps/pthread/pthread.h: Fix prototype of __sigsetjmp.
592 2012-09-13  H.J. Lu  <hongjiu.lu@intel.com>
594         [BZ #14576]
595         * sysdeps/pthread/bits/libc-lockP.h (__rtld_lock_init_recursive):
596         Removed.
598 2012-09-07  H.J. Lu  <hongjiu.lu@intel.com>
600         * Makefile (LDFLAGS-tst-cancel24): Renamed to ...
601         (LDLIBS-tst-cancel24): This.
603 2012-09-06  H.J. Lu  <hongjiu.lu@intel.com>
605         [BZ #14545]
606         * Makefile (tests-static): Add tst-cancel21-static.
607         (tests): Likewise.
608         * tst-cancel21-static.c: New file.
610 2012-09-01  Joseph Myers  <joseph@codesourcery.com>
612         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
613         [!__ASSUME_POSIX_CPU_TIMERS]: Remove conditional code.
614         [__NR_clock_getres]: Make code unconditional.
615         (pthread_getcpuclockid): Remove code left unreachable by removal
616         of conditionals.
618 2012-08-31  Joseph Myers  <joseph@codesourcery.com>
620         [BZ #14532]
621         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Use
622         atomic_compare_and_exchange_bool_rel.
623         * tst-sem14.c: New file.
624         * Makefile (tests): Add tst-sem14.
626 2012-08-15  Roland McGrath  <roland@hack.frob.com>
628         * Makefile (CFLAGS-flockfile.c): Use $(libio-mtsafe) instead
629         of -D_IO_MTSAFE_IO.
630         (CFLAGS-ftrylockfile.c, CFLAGS-funlockfile.c): Likewise.
631         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-fork.c): Likewise.
633 2012-08-16  Joseph Myers  <joseph@codesourcery.com>
635         * pthread_cond_timedwait.c (__pthread_cond_timedwait)
636         [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
637         * pthread_condattr_setclock.c (pthread_condattr_setclock)
638         [!__ASSUME_POSIX_TIMERS]: Likewise.
639         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
640         (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
641         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
642         [!__ASSUME_POSIX_TIMERS]: Likewise.
643         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
644         (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
645         * sysdeps/unix/sysv/linux/timer_create.c [__NR_timer_create]: Make
646         code unconditional.
647         [!__NR-timer_create]: Remove conditional code.
648         (timer_create) [!__ASSUME_POSIX_TIMERS]: Likewise.
649         * sysdeps/unix/sysv/linux/timer_delete.c [__NR_timer_delete]: Make
650         code unconditional.
651         [!__NR_timer_delete]: Remove conditional code.
652         (timer_delete) [!__ASSUME_POSIX_TIMERS]: Likewise.
653         * sysdeps/unix/sysv/linux/timer_getoverr.c
654         [__NR_timer_getoverrun]: Make code unconditional.
655         [!__NR_timer_getoverrun]: Remove conditional code.
656         (timer_getoverrun) [!__ASSUME_POSIX_TIMERS]: Likewise.
657         * sysdeps/unix/sysv/linux/timer_gettime.c [__NR_timer_gettime]:
658         Make code unconditional.
659         [!__NR_timer_gettime]: Remove conditional code.
660         (timer_gettime) [!__ASSUME_POSIX_TIMERS]: Likewise.
661         * sysdeps/unix/sysv/linux/timer_routines.c [__NR_timer_create]:
662         Make code unconditional.
663         [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
664         * sysdeps/unix/sysv/linux/timer_settime.c [__NR_timer_settime]:
665         Make code unconditional.
666         [!__NR_timer_settime]: Remove conditional code.
667         (timer_settime) [!__ASSUME_POSIX_TIMERS]: Likewise.
668         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
669         (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Remove
670         conditional code.
672 2012-08-15  Tom de Vries  <vries@codesourcery.com>
673             Maxim Kuvyrkov  <maxim@codesourcery.com>
675         * sysdeps/pthread/bits/libc-lockP.h (__libc_lock_lock)
676         (__libc_lock_trylock): Allow pre-existing definitions.
678 2012-08-15  Maxim Kuvyrkov  <maxim@codesourcery.com>
680         * pthread_spin_lock.c: New file.
681         * pthread_spin_trylock.c: New file.
683 2012-08-08  Joseph Myers  <joseph@codesourcery.com>
685         * allocatestack.c (setxid_signal_thread) [__ASSUME_TGKILL]: Make
686         code unconditional.
687         (setxid_signal_thread) [!__ASSUME_TGKILL]: Remove conditional code.
688         * pthread_cancel.c (pthread_cancel) [__ASSUME_TGKILL]: Make code
689         unconditional.
690         (pthread_cancel) [!__ASSUME_TGKILL]: Remove conditional code.
691         * sysdeps/pthread/createthread.c (do_clone) [__ASSUME_TGKILL]:
692         Make code unconditional.
693         (do_clone) [!__ASSUME_TGKILL]: Remove conditional code.
694         * sysdeps/unix/sysv/linux/pt-raise.c (raise) [__ASSUME_TGKILL ||
695         __NR_tgkill]: Make code unconditional.
696         (raise) [__ASSUME_TGKILL]: Likewise.
697         (raise) [!__ASSUME_TGKILL]: Remove conditional code.
698         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill)
699         [__ASSUME_TGKILL]: Make code unconditional.
700         (__pthread_kill) [!__ASSUME_TGKILL]: Remove conditional code.
701         * sysdeps/unix/sysv/linux/raise.c (raise) [__ASSUME_TGKILL ||
702         __NR_tgkill]: Make code unconditional.
703         (raise) [__ASSUME_TGKILL]: Likewise.
704         (raise) [!__ASSUME_TGKILL]: Remove conditional code.
706 2012-08-07  Joseph Myers  <joseph@codesourcery.com>
708         * sysdeps/pthread/createthread.c (create_thread)
709         [!__ASSUME_NO_CLONE_DETACHED]: Remove conditional code.
711 2012-08-03  Joseph Myers  <joseph@codesourcery.com>
713         * nptl-init.c (sigcancel_handler) [__ASSUME_CORRECT_SI_PID]: Make
714         code unconditional.
715         (sighandler_setxid) [__ASSUME_CORRECT_SI_PID]: Likewise.
717 2012-07-28  Siddhesh Poyarekar  <siddhesh@redhat.com>
719         * tst-pthread-getattr.c (MAX_STACK_SIZE): New macro.
720         (pagesize): New static variable.
721         (allocate_and_test): Return MEM.  Rename parameter to TARGET.
722         (check_stack_top): New local variables MEM and PAGEMASK.  Cap
723         stack size to MAX_STACK_SIZE.  Call allocate_and_test for
724         halfway up the stack top page.  Verify that the top page was
725         written into.
726         (do_test): Get pagesize using sysconf.
728 2012-07-25  Andreas Schwab  <schwab@linux-m68k.org>
730         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Remove pseudo_end
731         label.
732         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Likewise.
733         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO):
734         Likewise.
736 2012-07-25  Siddhesh Poyarekar  <siddhesh@redhat.com>
738         * tst-pthread-getattr.c: Revert last change.
740 2012-07-20  Siddhesh Poyarekar  <siddhesh@redhat.com>
742         * tst-pthread-getattr.c (MAX_STACK_SIZE): New max cap for stack
743         size.
744         (_MIN): New macro.
745         (allocate_and_test): Return STACKADDR.  Access STACKADDR instead
746         of MEM to test.
747         (check_stack_top): Read valued written into STACKADDR in
748         allocate_and_test.  Cap stack size to MAX_STACK_SIZE.
750 2012-07-19  Siddhesh Poyarekar  <siddhesh@redhat.com>
752         * nptl-init.c (sighandler_setxid): Fix the comment that
753         describes it.
755 2012-06-23  Thomas Schwinge  <thomas@codesourcery.com>
757         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
758         (__lll_robust_timedlock_wait): Simplify CFI directives.
760 2012-06-20  Siddhesh Poyarekar  <siddhesh@redhat.com>
762         [BZ #12416]
763         * Makefile (tests): Add test case.
764         * pthread_getattr_np.c (pthread_getattr_np): Deduct pages below
765         the __libc_stack_end page from stacksize.  Truncate stacksize to
766         make it page aligned when it is computed from RLIMIT_STACK.
767         * tst-pthread-getattr.c: New test case. Verify that stackaddr is
768         accessible.
770 2012-06-07  Carlos Sánchez de La Lama  <csanchezdll@gmail.com>
772         [BZ #14205]
773         * sysdeps/sparc/sparc32/pthread_spin_lock.S: Do not use v9
774         branches.
776 2012-06-04  Siddhesh Poyarekar  <siddhesh@redhat.com>
777             Jakub Jelinek  <jakub@redhat.com>
779         [BZ #14188]
780         * sysdeps/pthread/pthread.h
781         [!(defined __GNUC__ && defined __EXCEPTIONS)]
782         (pthread_cleanup_push, pthread_cleanup_push_defer_np): Use
783         __libc_unlikely instead of __builtin_expect.
785 2012-05-30  H.J. Lu  <hongjiu.lu@intel.com>
787         [BZ #14117]
788         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Removed.
789         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
790         * sysdeps/unix/sysv/linux/i386/Implies: New file.
791         * sysdeps/unix/sysv/linux/x86_64/Implies: Likewise.
792         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Renamed
793         to ...
794         * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: This.
795         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Renamed
796         to ...
797         * sysdeps/unix/sysv/linux/x86/bits/semaphore.h: This.
799 2012-05-30  Andreas Schwab  <schwab@linux-m68k.org>
801         [BZ #14132]
802         * nptl-init.c (pthread_functions): Remove use of INTUSE and
803         _internal aliases.
804         (__pthread_initialize_minimal_internal): Likewise.
805         * sem_open.c: Likewise.
806         * sem_unlink.c: Likewise.
807         * pthreadP.h: Replace _internal aliases by hidden_proto
808         declarations.
809         * pthread_getspecific.c: Replace _internal alias by hidden_def.
810         * pthread_key_create.c: Likewise.
811         * pthread_mutex_destroy.c: Likewise.
812         * pthread_mutex_init.c: Likewise.
813         * pthread_mutex_lock.c: Likewise.
814         * pthread_mutex_unlock.c: Likewise.
815         * pthread_once.c: Likewise.
816         * pthread_rwlock_rdlock.c: Likewise.
817         * pthread_rwlock_unlock.c: Likewise.
818         * pthread_rwlock_wrlock.c: Likewise.
819         * pthread_setspecific.c: Likewise.
820         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
821         Likewise.
822         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
823         Likewise.
824         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
825         Likewise.
826         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
827         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
828         * sysdeps/unix/sysv/linux/s390/pthread_once.c: Likewise.
829         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
830         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
831         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
832         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
833         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
834         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
835         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
836         Likewise.
837         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
838         Likewise.
839         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
840         Likewise.
842 2012-05-27  Chung-Lin Tang  <cltang@codesourcery.com>
844         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO, LOAD_ARGS_1)
845         (LOAD_ARGS_2 ,LOAD_ARGS_3 ,LOAD_ARGS_4): Add CFI restores.
847         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_lock_wait_private)
848         (__lll_lock_wait, __lll_timedlock_wait, __lll_timedwait_tid): Add CFI
849         directives.
850         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
851         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Likewise.
852         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
853         (pthread_barrier_wait): Likewise.
854         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
855         (__pthread_cond_broadcast): Likewise.
856         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
857         (__pthread_cond_signal): Likewise.
858         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
859         (__pthread_cond_timedwait): Likewise.
860         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S (__pthread_cond_wait):
861         Likewise.
862         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S
863         (__pthread_rwlock_rdlock): Likewise.
864         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
865         (pthread_rwlock_timedrdlock): Likewise.
866         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
867         (pthread_rwlock_timedwrlock): Likewise.
868         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
869         (__pthread_rwlock_unlock): Likewise.
870         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S
871         (__pthread_rwlock_wrlock): Likewise.
872         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post): Likewise.
873         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
874         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
875         Likewise.
876         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
878 2012-05-26  Siddhesh Poyarekar  <siddhesh@redhat.com>
880         [BZ #12416]
881         * nptl/pthread_getattr_np.c (pthread_getattr_np): Use
882         __libc_stack_end rounded to the end of containing page as the
883         real stack end.
885 2012-05-25  Rayson Ho  <rho@redhat.com>
887         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Low-level SystemTap
888         probes for i386.
889         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
890         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
891         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
892         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
893         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
894         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
895         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
896         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
898 2012-05-25  Rayson Ho  <rho@redhat.com>
899             Roland McGrath  <roland@hack.frob.com>
901         * DESIGN-systemtap-probes.txt: New file.
902         * pthread_cond_broadcast.c: SystemTap probes.
903         * pthread_cond_init.c: Likewise.
904         * pthread_cond_signal.c: Likewise.
905         * pthread_cond_wait.c: Likewise.
906         * pthread_cond_destroy.c: Likewise.
907         * pthread_create.c: Likewise.
908         * pthread_join.c: Likewise.
909         * pthread_mutex_destroy.c: Likewise.
910         * pthread_mutex_init.c: Likewise.
911         * pthread_mutex_lock.c: Likewise.
912         * pthread_mutex_timedlock.c: Likewise.
913         * pthread_mutex_unlock.c: Likewise.
914         * pthread_rwlock_destroy.c: Likewise.
915         * pthread_rwlock_rdlock.c: Likewise.
916         * pthread_rwlock_unlock.c: Likewise.
917         * pthread_rwlock_wrlock.c: Likewise.
918         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
919         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
920         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
921         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
922         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
923         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
924         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
925         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
927 2012-05-24  Roland McGrath  <roland@hack.frob.com>
929         * pthread_create.c (start_thread): Define pthread_start LIBC_PROBE.
931 2012-05-17  Andreas Jaeger  <aj@suse.de>
933         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
934         (HAVE_DL_DISCOVER_OSVERSION): Don't declare _dl_discover_osversion
935         only for older kernels.
937 2012-05-15  Joseph Myers  <joseph@codesourcery.com>
939         * pthreadP.h [!__NR_set_robust_list] (__NR_set_robust_list): Do
940         not define.
942 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
944         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_lock): Load
945         futex pointer into RDI_LP.  Use RSP_LP to operate on stack.
946         (lll_robust_lock): Likewise.
947         (lll_cond_lock): Likewise.
948         (lll_robust_cond_lock): Likewise.
949         (lll_timedlock): Likewise.
950         (lll_robust_timedlock): Likewise.
951         (lll_unlock): Likewise.
952         (lll_robust_unlock): Likewise.
954 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
956         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use
957         LP_OP(cmp) and RCX_LP on dep_mutex pointer.
959 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
961         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Use LP_OP(op)
962         on NWAITERS.
963         (__gcc_personality_v0): Replace 8-byte data alignment with
964         LP_SIZE alignment and .quad with ASM_ADDR.
966 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
968         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Use LP_OP(op)
969         on NWAITERS.
970         (__gcc_personality_v0): Replace 8-byte data alignment with
971         LP_SIZE alignment and .quad with ASM_ADDR.
973 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
975         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Use LP_OP(cmp) on
976         NWAITERS, which is unsigned long int.
978 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
980         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
981         (__gcc_personality_v0): Replace 8-byte data alignment with
982         LP_SIZE alignment and .quad with ASM_ADDR.
984 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
986         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Use
987         LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer.  Load
988         __vdso_clock_gettime pointer into RAX_LP.
989         (__gcc_personality_v0): Replace 8-byte data alignment with
990         LP_SIZE alignment and .quad with ASM_ADDR.
992 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
994         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Use
995         LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer.  Load
996         __vdso_clock_gettime pointer into RAX_LP.
997         (__gcc_personality_v0): Replace 8-byte data alignment with
998         LP_SIZE alignment and .quad with ASM_ADDR.
1000 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1002         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Use
1003         LP_OP(cmp) and R8_LP on dep_mutex pointer.
1005 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1007         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Use LP_OP(mov)
1008         to update pointer in memory.  Load pointer into RDI_LP.
1010 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1012         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1013         (LLL_STUB_UNWIND_INFO_START): Align label to LP_SIZE instead
1014         of 8.
1015         (LLL_STUB_UNWIND_INFO_END): Likewise.
1016         (lll_timedlock): Load timeout pointer into RDX_LP.
1017         (lll_robust_timedlock): Likewise.
1019 2012-05-15  Siddhesh Poyarekar  <siddhesh@redhat.com>
1020             Jakub Jelinek  <jakub@redhat.com>
1022         [BZ #13613]
1023         * Makefile (tests): Add test cases.
1024         * descr.h (struct pthread): Add a comment describing multiple_threads.
1025         * pthreadP.h (__pthread_multiple_threads): Expand comment to include
1026         single-process case.
1027         * pthread_cancel.c (pthread_cancel): Enable multiple_threads
1028         before setting cancelstate of the thread.
1029         * sysdeps/unix/sysv/linux/libc_multiple_threads.c
1030         (__libc_multiple_threads): Add explanatory comment.
1031         * tst-cancel-self-cancelstate.c: New test case.
1032         * tst-cancel-self-canceltype.c: Likewise.
1033         * tst-cancel-self-cleanup.c: Supporting file for test cases.
1034         * tst-cancel-self-testcancel.c: New test case.
1035         * tst-cancel-self.c: Likewise.
1036         * vars.c: Expand comment to include single-process case.
1038 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
1040         * sysdeps/x86_64/tls.h: Don't include <bits/wordsize.h>.
1041         (tcbhead_t): Remove __x86_64__ check.  Align rtld_savespace_sse
1042         to 32 bytes.
1044 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
1046         * sysdeps/pthread/pthread.h (__PTHREAD_RWLOCK_INT_FLAGS_SHARED):
1047         New.
1048         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Check
1049         __PTHREAD_RWLOCK_INT_FLAGS_SHARED instead of __WORDSIZE.
1051 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
1053         * shlib-versions: Move x86_64-.*-linux.* entry to ...
1054         * sysdeps/x86_64/64/shlib-versions: Here.  New file.
1055         * sysdeps/x86_64/x32/shlib-versions: New file.
1057 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
1059         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Define x32
1060         __SIZEOF_PTHREAD_XXX_T.
1061         (__pthread_internal_list): Check __x86_64__ instead of __WORDSIZE.
1062         (pthread_mutex_t): Likewise.
1063         (pthread_rwlock_t): Likewise.
1064         (__PTHREAD_RWLOCK_INT_FLAGS_SHARED): New.  Defined if __x86_64__
1065         is defined.
1067 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
1069         * sysdeps/x86_64/x32/tls.h: New file.
1071 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
1073         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Use uint64_t on 64-bit
1074         integer.
1075         (THREAD_SETMEM_NC): Likewise.
1077 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
1079         * sysdeps/x86_64/tls.h (THREAD_SELF): Replace movq/%q0 with
1080         mov/%0.
1082 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
1084         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
1085         (__cleanup_fct_attribute): Check __x86_64__ instead of
1086         __WORDSIZE.
1088 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
1090         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER): Check
1091         __PTHREAD_MUTEX_HAVE_PREV instead of __WORDSIZE.
1092         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Likewise.
1093         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
1094         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
1096 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
1098         * pthread_create.c (start_thread): Check __PTHREAD_MUTEX_HAVE_PREV
1099         instead of __WORDSIZE.
1101 2012-05-10  Thomas Schwinge  <thomas@schwinge.name>
1103         [BZ #3748]
1104         * sysdeps/pthread/bits/libc-lockP.h (__libc_once_get): New macro.
1106 2012-05-09  Chung-Lin Tang  <cltang@codesourcery.com>
1108         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1109         (__pthread_cond_timedwait): Use CFI directives.
1110         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
1111         (__pthread_cond_wait): Likewise.
1112         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
1113         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
1115 2012-05-03  David S. Miller  <davem@davemloft.net>
1117         * sysdeps/sparc/sparc64/pthread_spin_unlock.S: Fix thinko, we
1118         always have to return 0, especially for the pthread_spin_init
1119         alias.
1120         * sysdeps/sparc/sparc32/pthread_spin_lock.S: Add missing trailing
1121         newline.
1122         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: Likewise.
1123         * sysdeps/sparc/sparc64/pthread_spin_lock.S: Likewise.
1125 2012-05-02  David S. Miller  <davem@davemloft.net>
1127         * sysdeps/sparc/sparc64/pthread_spin_lock.S: New.
1128         * sysdeps/sparc/sparc64/pthread_spin_lock.c: Delete.
1129         * sysdeps/sparc/sparc64/pthread_spin_unlock.S: New.
1130         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: Delete.
1131         * sysdeps/sparc/sparc64/pthread_spin_trylock.S: New.
1132         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: Delete.
1133         * sysdeps/sparc/sparc64/pthread_spin_init.c: New.
1134         * sysdeps/sparc/sparc32/pthread_spin_lock.S: New.
1135         * sysdeps/sparc/sparc32/pthread_spin_lock.c: Delete.
1136         * sysdeps/sparc/sparc32/pthread_spin_trylock.S: New.
1137         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: Delete.
1138         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: New.
1139         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: Delete.
1140         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.S: New.
1141         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: Delete.
1142         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.S: New.
1143         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: Delete.
1144         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_init.c: New.
1146 2012-05-02  Allan McRae  <allan@archlinux.org>
1148         * Makefile: (LDFLAGS-tst-tls5): Use $(no-as-needed).
1149         (LDFLAGS-tst-cancel24): Likewise.
1151 2012-05-02  Paul Pluzhnikov  <ppluzhnikov@google.com>
1153         * sysdeps/i386/pthread_spin_lock.S: New.
1154         * sysdeps/i386/pthread_spin_lock.c: Delete.
1155         * sysdeps/x86_64/pthread_spin_lock.S: New.
1156         * sysdeps/x86_64/pthread_spin_lock.c: Delete.
1158 2012-04-28  Andreas Schwab  <schwab@linux-m68k.org>
1160         * Makefile ($(objpfx)tst-stack3-mem, $(objpfx)tst-tls6.out): Don't
1161         run when cross-compiling.
1163 2012-04-26  Siddhesh Poyarekar  <siddhesh@redhat.com>
1165         * sysdeps/pthread/unwind-forcedunwind.c: Include gnu/lib-names.h
1166         instead of libgcc_s.h.
1168 2012-04-20  Paul Pluzhnikov  <ppluzhnikov@google.com>
1170         * sysdeps/x86_64/tls.h (TLS_GET_FS, TLS_SET_FS): Delete.
1172 2012-03-27  David S. Miller  <davem@davemloft.net>
1174         * tst-cond16.c (do_test): Use a thread stack size which is either
1175         PTHREAD_STACK_MIN or the page size, whichever is larger.
1176         * tst-cond18.c (do_test): Likewise.
1178 2012-03-19  H.J. Lu  <hongjiu.lu@intel.com>
1180         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Use
1181         register char * __asm__("rsp") to get stack frame.
1183 2012-03-19  H.J. Lu  <hongjiu.lu@intel.com>
1185         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (SYS_futex): Use
1186         __NR_futex directly.
1188 2012-03-19  H.J. Lu  <hongjiu.lu@intel.com>
1190         * unwind.c (unwind_stop): Cast _Unwind_GetCFA return to
1191         _Unwind_Ptr first.
1193 2012-03-16  David S. Miller  <davem@davemloft.net>
1195         [BZ #13844]
1196         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: Include using <..>
1197         instead of "...".
1198         * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c:
1199         Delete, not needed.
1201 2012-03-15  David S. Miller  <davem@davemloft.net>
1203         [BZ #13844]
1204         * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c: New file.
1206 2012-03-09  Paul Eggert  <eggert@cs.ucla.edu>
1208         [BZ #13673]
1209         * pt-crti.S: Replace FSF snail mail address with URL.
1211 2012-03-09  Joseph Myers  <joseph@codesourcery.com>
1213         * sysdeps/pthread/pthread.h (__need_clockid_t, __need_timespec):
1214         Do not define before including <time.h>.
1216 2012-03-08  David S. Miller  <davem@davemloft.net>
1218         * sysdeps/unix/sysv/linux/sparc/sem_post.c: Update copyright year.
1220 2012-03-08  Thomas Schwinge  <thomas@codesourcery.com>
1222         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1223         Check for timestamp before the Epoch.
1225         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Fix
1226         updating nwaiters.
1228         * tst-sem13.c (do_test): Add another test case.
1229         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1230         Fix updating nwaiters.
1232 2012-03-07  Joseph Myers  <joseph@codesourcery.com>
1234         [BZ #10545]
1235         * sysdeps/pthread/configure.in (libc_cv_forced_unwind): Change
1236         link test to a compile test.
1237         (libc_cv_c_cleanup): Likewise.  Declare puts rather than including
1238         <stdio.h>.
1239         * sysdeps/pthread/configure: Regenerated.
1241 2012-03-07  Ulrich Drepper  <drepper@gmail.com>
1243         * Makefile (distribute): Remove variable.
1245 2012-01-23  Thomas Schwinge  <thomas@codesourcery.com>
1247         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Get rid of
1248         superfluous assignment.
1249         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c (sem_timedwait):
1250         Likewise.
1251         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
1252         (sem_timedwait): Likewise.
1254 2012-03-06  Ulrich Drepper  <drepper@gmail.com>
1256         * sysdeps/pthread/bits/libc-lock.h: Move information not needed in
1257         installed headers to...
1258         * sysdeps/pthread/bits/libc-lockP.h: ...here.  New file.
1260 2012-03-06  David S. Miller  <davem@davemloft.net>
1262         * sysdeps/unix/sysv/linux/sparc/sem_post.c (__new_sem_post): Use
1263         atomic_increment and remove unused local variable.
1264         (__old_sem_post): Likewise.
1266 2012-02-27  David S. Miller  <davem@davemloft.net>
1268         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Don't refer to
1269         non-existing __pthread_attr.
1270         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1271         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1272         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1273         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1274         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1276 2012-02-26  Ulrich Drepper  <drepper@gmail.com>
1278         * sysdeps/pthread/pthread.h: Define __need_clockid_t for __USE_XOPEN2K.
1280         * sysdeps/pthread/pthread.h: Define __need_timespec before including
1281         <time.h>.
1282         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Name pthread_attr_t
1283         union.
1284         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1285         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1286         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1287         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1288         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1290 2012-02-21  Joseph Myers  <joseph@codesourcery.com>
1292         [BZ #13695]
1293         * Makefile (generated): Remove crti.S, crtn.S, defs.h and
1294         pt-initfini.s.
1295         [crti.S not in sysdirs] (omit-deps): Do not append.
1296         [crti.S not in sysdirs] (CFLAGS-pt-initfini.s): Remove variable.
1297         [crti.S not in sysdirs] (pt-initfini.c): Remove vpath directive.
1298         [crti.S not in sysdirs] ($(objpfx)crti.S): Remove rule.
1299         [crti.S not in sysdirs] ($(objpfx)crtn.S): Likewise.
1300         [crti.S not in sysdirs] ($(objpfx)defs.h): Likewise.
1301         [crti.S not in sysdirs] ($(objpfx)crti.o): Likewise.
1302         [crti.S not in sysdirs] ($(objpfx)crtn.o): Likewise.
1303         [crti.S in sysdirs] (extra-objs): Append unconditionally.
1304         [crti.S in sysdirs] ($(objpfx)crti.o): Define rule
1305         unconditionally.
1306         * sysdeps/pthread/pt-initfini.c: Remove file.
1308 2012-02-16  Richard Henderson  <rth@twiddle.net>
1310         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Remove file.
1311         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Remove file.
1313 2012-02-15  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1315         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Remove file.
1317 2012-02-16  David S. Miller  <davem@davemloft.net>
1319         * sysdeps/sparc/Makefile: Add -fPIC when building pt-crti.S and crtn.S
1321 2012-02-15  Marek Polacek  <polacek@redhat.com>
1323         * sysdeps/unix/sysv/linux/x86_64/Makefile: Remove file.
1325 2012-02-09  Paul Eggert  <eggert@cs.ucla.edu>
1327         Replace FSF snail mail address with URLs, as per GNU coding standards.
1329 2012-02-08  Andreas Schwab  <schwab@linux-m68k.org>
1331         * Makefile (extra-objs) [crti.S in sysdirs]: Add pt-crti.o.
1333 2012-02-08  Joseph Myers  <joseph@codesourcery.com>
1335         Support crti.S and crtn.S provided directly by architectures.
1336         * Makefile [crti.S in sysdirs] (omit-deps): Do not append.
1337         [crti.S in sysdirs] (CFLAGS-pt-initfini.s): Do not define variable.
1338         [crti.S in sysdirs] ($(objpfx)pt-initfini.s): Disable rule.
1339         [crti.S in sysdirs] ($(objpfx)crti.S): Likewise.
1340         [crti.S in sysdirs] ($(objpfx)crtn.S): Likewise.
1341         [crti.S in sysdirs] ($(objpfx)defs.h): Likewise.
1342         [crti.S in sysdirs] ($(objpfx)crti.o): Likewise.
1343         [crti.S in sysdirs] ($(objpfx)crtn.o): Likewise.
1344         [crti.S in sysdirs] (pt-initfini.c): Remove vpath directive.
1345         [crti.S in sysdirs] ($(objpfx)crti.o): New rule.
1346         * pt-crti.S: New file.
1347         * sysdeps/unix/sysv/linux/i386/Makefile: Remove file.
1349 2012-02-03  Joseph Myers  <joseph@codesourcery.com>
1351         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
1352         macros for PIC register setup.
1353         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1354         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1355         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1356         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1357         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1359 2012-01-11  Marek Polacek  <polacek@redhat.com>
1361         * forward.c (FORWARD_NORETURN): Define macro.
1362         (__pthread_unwind): Use FORWARD_NORETURN macro to avoid warning.
1363         (__pthread_exit): Likewise.
1365 2012-01-10  Ulrich Drepper  <drepper@gmail.com>
1367         * sysdeps/pthread/pthread.h: Add const attribute to pthread_equal.
1369         * pthreadP.h: Add noreturn to __pthread_exit.
1370         * sysdeps/pthread/pthread-functions.h: Likewise for ptr___pthread_exit.
1372 2011-12-30  Adhemerval Zanella  <azanella@linux.vnet.ibm.com>
1374         * sysdeps/unix/sysv/linux/aio_misc.h (__aio_create_helper_thread):
1375         Call pthread_attr_setstacksize() with result of
1376         __pthread_get_minstack() to account for application TLS usage.
1378 2012-01-08  Marek Polacek  <polacek@redhat.com>
1380         * sysdeps/unix/sysv/linux/mq_notify.c: Include <nptl/pthreadP.h>.
1382 2012-01-07  Ulrich Drepper  <drepper@gmail.com>
1384         [BZ #13553]
1385         * pthreadP.h: Use const instead of __const.
1386         * semaphore.h: Likewise.
1387         * sysdeps/pthread/bits/libc-lock.h: Likewise.
1388         * sysdeps/pthread/bits/sigthread.h: Likewise.
1389         * sysdeps/pthread/pthread.h: Likewise.
1391         * Makefile: Remove elf=yes test, only ELF is supported.
1393         * shlib-versions: Remove entries for ports architectures.
1395         In case anyone cares, the IA-64 architecture could move to ports.
1396         * sysdeps/ia64/*: Removed.
1397         * sysdeps/unix/sysv/linux/ia64/*: Removed.
1399 2011-12-22  Ulrich Drepper  <drepper@gmail.com>
1401         * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread): Use
1402         __pthread_get_minstack.
1403         * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Likewise.
1405         [BZ #13088]
1406         * sysdeps/unix/sysv/linux/timer_routines.c: Get minimum stack size
1407         through __pthread_get_minstack.
1408         * nptl-init.c (__pthread_initialize_minimal_internal): Get page size
1409         directly from _rtld_global_ro.
1410         (__pthread_get_minstack): New function.
1411         * pthreadP.h: Declare __pthread_get_minstack.
1412         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_get_minstack.
1414 2011-12-21  Ulrich Drepper  <drepper@gmail.com>
1416         [BZ #13515]
1417         * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1418         Correct reading name from file.
1420 2011-12-14  Carlos O'Donell  <carlos@systemhalted.org>
1422         * allocatestack.c (allocate_stack): Return errno on failure.
1424 2011-12-14  Jeff Law  <law@redhat.com>
1426         [BZ #5245]
1427         * pthread_create.c (__pthread_create_2_1): Translate ENOMEM to EAGAIN.
1429 2011-11-28  Andreas Schwab  <schwab@redhat.com>
1431         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Handle
1432         EAGAIN from FUTEX_WAIT_REQUEUE_PI.
1433         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1435 2011-11-15  Ulrich Drepper  <drepper@gmail.com>
1437         * pthread_getattr_np.c (pthread_getattr_np): Set FD_CLOEXEC for
1438         /proc/self/maps.
1440 2011-10-29  Ulrich Drepper  <drepper@gmail.com>
1442         [BZ #13358]
1443         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1444         (__pthread_cond_timedwait): Initialize %r15 correctly also for code
1445         path for kernels with FUTEX_CLOCK_REALTIME.
1446         Debugged by H.J. Lu <hjl.tools@gmail.com>.
1448 2011-10-27  Andreas Schwab  <schwab@redhat.com>
1450         [BZ #13344]
1451         * sysdeps/pthread/pthread.h: Use __THREADNL instead of __THREAD
1452         for memory synchronization functions.
1453         * semaphore.h: Likewise.
1455 2011-10-24  Ulrich Drepper  <drepper@gmail.com>
1457         * tst-cancel7.c: Avoid warning.
1458         * tst-mutex6.c: Likewise.
1459         * tst-mutex9.c: Likewise.
1460         * tst-mutexpi6.c: Likewise.
1462 2011-10-23  Ulrich Drepper  <drepper@gmail.com>
1464         * sysdeps/i386/tls.h: Remove #include <list.h>.
1466 2011-10-15  Ulrich Drepper  <drepper@gmail.com>
1468         * pthread_create.c (start_thread): Call __ctype_init.
1470 2011-09-15  Andreas Schwab  <schwab@redhat.com>
1472         * sysdeps/pthread/list.h: Define only list_t if __need_list_t is
1473         defined.
1474         (list_add): Add atomic_write_barrier.
1475         * descr.h: Define __need_list_t before including <list.h>.
1476         * nptl-init.c: Include <list.h>
1477         * allocatestack.c: Likewise.
1479 2011-09-11  Ulrich Drepper  <drepper@gmail.com>
1481         * sysdeps/i386/tls.h: Remove HAVE_TLS_SUPPORT test.
1482         * sysdeps/ia64/tls.h: Likewise.
1483         * sysdeps/powerpc/tls.h: Likewise.
1484         * sysdeps/s390/tls.h: Likewise.
1485         * sysdeps/sh/tls.h: Likewise.
1486         * sysdeps/sparc/tls.h: Likewise.
1487         * sysdeps/x86_64/tls.h: Likewise.
1489 2011-09-10  Ulrich Drepper  <drepper@gmail.com>
1491         * sysdeps/pthread/malloc-machine.h: Define MUTEX_INITIALIZER.
1493         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Don't handle
1494         !USE___THREAD.
1495         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1496         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1497         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1498         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1499         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
1500         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
1501         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
1502         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
1503         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1504         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1505         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
1506         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1508         * tst-tls1.c: Support for __thread is now mandatory.
1509         * tst-tls2.c: Likewise.
1510         * tst-tls3.c: Likewise.
1511         * tst-tls3mod.c: Likewise.
1512         * tst-tls4.c: Likewise.
1513         * tst-tls4moda.c: Likewise.
1514         * tst-tls4modb.c: Likewise.
1515         * tst-tls5.h: Likewise.
1517 2011-09-08  Ulrich Drepper  <drepper@gmail.com>
1519         [BZ #12403]
1520         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1521         (pthread_rwlock_timedwrlock): Use correct macro in test.
1522         Patch by H.J. Lu <hongjiu.lu@intel.com>.
1524 2011-09-06  Ulrich Drepper  <drepper@gmail.com>
1526         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): Don't
1527         use gettimeofday vsyscall, just call gettimeofday.
1528         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1529         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
1530         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1531         Likewise.
1532         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1533         Likewise.
1534         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1535         Simplify __vdso_clock_gettime use.
1537 2011-09-05  David S. Miller  <davem@davemloft.net>
1539         * sysdeps/unix/sysv/linux/sem_timedwait.c (do_futex_timed_wait):
1540         New function.
1541         (sem_timedwait): Call it to force an exception region around
1542         the async cancel enable and the futex operation.
1543         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: Likewise.
1544         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: Likewise.
1545         * sysdeps/unix/sysv/linux/sem_wait.c (do_futex_wait): New function.
1546         (__new_sem_wait): Call it to force an exception region around
1547         the async cancel enable and the futex operation.
1548         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: Likewise.
1549         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: Likewise.
1551 2011-08-31  Andreas Schwab  <schwab@redhat.com>
1553         * allocatestack.c (setxid_mark_thread): Ensure that the exiting
1554         thread is woken up.
1556 2011-08-20  David S. Miller  <davem@davemloft.net>
1558         * Makefile (tst-cleanup0.out): Fix typo in output redirection.
1560 2011-08-14  Roland McGrath  <roland@hack.frob.com>
1562         * sysdeps/i386/pthreaddef.h (TCB_ALIGNMENT): Set to 64, optimal on Atom.
1563         * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Likewise.
1565 2011-08-08  Andreas Schwab  <schwab@redhat.com>
1567         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned
1568         stack.
1569         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1570         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1572 2011-07-22  Ulrich Drepper  <drepper@gmail.com>
1574         * sysdeps/pthread/unwind-forcedunwind.c (_Unwind_Resume): Add read
1575         barrier.
1576         (__gcc_personality_v0): Likewise.
1577         (_Unwind_ForcedUnwind): Likewise.
1578         (_Unwind_GetCFA): Likewise.
1580 2011-07-14  Roland McGrath  <roland@hack.frob.com>
1582         * allocatestack.c (__reclaim_stacks): Use uintptr_t cast rather than
1583         UINTMAX_C.
1585 2011-06-30  Ulrich Drepper  <drepper@gmail.com>
1587         * nptl-init.c (__nptl_set_robust): New function.
1588         (pthread_functions): Add reference.
1589         * npthreadP.h: Declare __nptl_set_robust.
1590         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
1591         ptr_set_robust member.
1592         * sysdeps/unix/sysv/linux/fork.c: Call set_robust_list syscall in
1593         child if threads are used.
1595 2011-06-14  Andreas Jaeger  <aj@suse.de>
1597         * pthread_rwlock_init.c: Include <string.h> for memset declaration.
1599 2011-05-11  Ulrich Drepper  <drepper@gmail.com>
1601         [BZ #386]
1602         * allocatestack.c (allocate_stack): Convert ENOMEM error to EAGAIN.
1604 2011-04-10  Ulrich Drepper  <drepper@gmail.com>
1606         [BZ #12650]
1607         * allocatestack.c (get_cached_stack): Deallocate DTV entries before
1608         clearing memory.
1609         Patch partly by Robert Rex <robert.rex@exasol.com>.
1611 2011-01-19  Roland McGrath  <roland@redhat.com>
1613         * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
1614         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1615         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
1616         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1617         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
1618         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
1620 2011-01-16  Andreas Schwab  <schwab@linux-m68k.org>
1622         * Makefile (test-extras): Add tst-cleanup4aux.
1624 2011-01-14  Ulrich Drepper  <drepper@gmail.com>
1626         [BZ #10563]
1627         * sysdeps/pthread/setxid.h (__SETXID_1): Add cast to assignment.
1628         (__SETXID_2): Likewise.
1629         (__SETXID_3): Likewise.
1631 2011-01-13  Ulrich Drepper  <drepper@gmail.com>
1633         [BZ #10484]
1634         * Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
1635         * alloca_cutoff.c: Add libc_hidden_def.
1637 2010-10-13  H.J. Lu  <hongjiu.lu@intel.com>
1639         [BZ #12113]
1640         * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
1641         * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
1642         of "struct pthread".
1644 2010-09-21  Andreas Schwab  <schwab@redhat.com>
1646         * sysdeps/pthread/pthread.h (pthread_cleanup_push)
1647         [!__EXCEPTIONS]: Mangle local variable not_first_call.
1648         (pthread_cleanup_push_defer_np): Likewise.
1650 2010-09-03  Ulrich Drepper  <drepper@redhat.com>
1652         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are
1653         small.
1655 2010-08-10  Dinakar Guniguntala  <dino@in.ibm.com>
1656             Stefan Hajnoczi  <stefanha@linux.vnet.ibm.com>
1658         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
1659         FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
1661 2010-08-12  H.J. Lu  <hongjiu.lu@intel.com>
1663         * sysdeps/unix/sysv/linux/i386/Makefile: New file.
1665 2010-05-01  Alan Modra  <amodra@gmail.com>
1667         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1668         (PSEUDO): Use correct cr save.  Don't use wrong parm save area
1669         to save temps.  Correct cfi for possible later frame manipulation.
1670         (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
1671         (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
1672         (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
1673         (DOCARGS_6, UNDOCARGS_6): Likewise.
1674         (CENABLE, CDISABLE): Add nops for non-shared calls.
1676 2010-07-06  Andreas Schwab  <schwab@redhat.com>
1678         * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1679         Fix type mismatch.
1681 2010-07-03  Ulrich Drepper  <drepper@redhat.com>
1683         * tst-abstime.c (do_test): Some more cleanups
1685 2010-07-02  Ulrich Drepper  <drepper@redhat.com>
1687         * tst-abstime.c: Correct testing and add test for sem_timedwait.
1689 2010-07-01  Andreas Schwab  <schwab@redhat.com>
1690             Ulrich Drepper  <drepper@redhat.com>
1692         * Makefile (tests): Add tst-abstime.
1693         * tst-abstime.c: New file.
1694         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1695         (__lll_timedlock_wait): Check for timestamp before the Epoch.
1696         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1697         (__lll_timedlock_wait): Likewise.
1698         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1699         (__lll_robust_timedlock_wait): Likewise.
1700         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1701         (__pthread_cond_timedwait): Likewise.
1702         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1703         (pthread_rwlock_timedrdlock): Likewise.
1704         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1705         (pthread_rwlock_timedwrlock): Likewise.
1706         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1707         Likewise.
1709 2010-07-01  Ulrich Drepper  <drepper@redhat.com>
1711         * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
1713 2010-06-01  Takashi Yoshii  <takashi.yoshii.zj@renesas.com>
1715         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
1716         location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
1718 2010-04-09  Ulrich Drepper  <drepper@redhat.com>
1720         [BZ #11390]
1721         * sysdeps/unix/sysv/linux/pthread_getname.c: New file.
1722         * sysdeps/unix/sysv/linux/pthread_setname.c: New file.
1723         * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and
1724         pthread_setname.
1725         * Makefile (libpthread-routines): Add pthread_getname and
1726         pthread_setname.
1727         * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12.
1729 2010-04-05  Thomas Schwinge  <thomas@schwinge.name>
1731         * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/.
1732         * sysdeps/pthread/rt-unwind-resume.c: Likewise.
1733         * sysdeps/pthread/Makefile: Remove csu section and rt section's
1734         unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead.
1736 2010-03-23  Luis Machado  <luisgpm@br.ibm.com>
1738         * pthread_cond_timedwait.c: Add check for
1739         HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
1740         (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
1741         INTERNAL_SYSCALL.
1743 2010-03-09  Ulrich Drepper  <drepper@redhat.com>
1745         * pthread_create.c (__pthread_create_2_1): If priorities are incorrect
1746         and the call fails wake eventually waiting setxid threads.  Don't free
1747         stack here if we try starting a thread.
1748         * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter
1749         if the clone call failed.
1751 2010-03-08  Andreas Schwab  <schwab@redhat.com>
1753         * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
1754         * allocatestack.c (get_cached_stack): Set setxid_futex.
1755         (allocate_stack): Likewise.
1757 2010-03-05  Andreas Schwab  <schwab@redhat.com>
1758             Ulrich Drepper  <drepper@redhat.com>
1760         * allocatestack.c (setxid_mark_thread): Delay handling of thread if
1761         it is creating a thread or it is just being created.
1762         * pthread_create.c (start_thread): Wake setxid thread if it is
1763         waiting.
1764         (__pthread_create_2_1): Initialize setxid_futex.
1765         * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it
1766         is waiting.
1768 2010-01-15  Ulrich Drepper  <drepper@redhat.com>
1770         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1771         Fix unwind info.
1772         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1774 2010-01-15  Michal Schmidt  <mschmidt@redhat.com>
1776         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1777         Fix pthread_cond_timedwait with requeue-PI.
1778         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1779         Fix pthread_cond_wait with requeue-PI.
1781 2010-01-14  Ulrich Drepper  <drepper@redhat.com>
1783         * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
1784         and pthread_mutexattr_setrobust for GLIBC_2.12.
1785         * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
1786         * pthread_mutexattr_getrobust.c: Define alias
1787         pthread_mutexattr_getrobust.
1788         * pthread_mutexattr_setrobust.c: Define alias
1789         pthread_mutexattr_setrobust.
1791 2010-01-12  Ulrich Drepper  <drepper@redhat.com>
1793         * sysdeps/pthread/pthread.h: Cleanup.  Fix up for XPG7.
1795 2010-01-08  Ulrich Drepper  <drepper@redhat.com>
1797         * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
1799 2009-12-18  Thomas Schwinge  <thomas@codesourcery.com>
1801         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
1802         call __gmon_start__.
1803         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
1805 2009-12-17  Ulrich Drepper  <drepper@redhat.com>
1807         * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
1808         using memset.
1810 2009-12-01  Dinakar Guniguntala  <dino@in.ibm.com>
1812         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
1813         FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1814         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
1815         is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1816         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1817         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
1818         is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1819         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1821 2009-12-12  Ulrich Drepper  <drepper@redhat.com>
1823         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1824         Don't update nwaiters after invalid timeout is recognized.
1826 2009-11-27  Thomas Schwinge  <thomas@codesourcery.com>
1828         * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
1829         __gmon_start__.
1831 2009-11-27  Andreas Schwab  <schwab@redhat.com>
1833         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
1834         THREAD_SELF->cancelhandling after returning from futex call.
1836 2009-11-24  Ulrich Drepper  <drepper@redhat.com>
1838         * tst-sem13.c: New file.
1839         * Makefile (tests): Add tst-sem13.
1841 2009-11-22  Roland McGrath  <roland@redhat.com>
1843         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
1844         instead of recapitulating its contents.
1846 2009-11-18  Ulrich Drepper  <drepper@redhat.com>
1848         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
1849         optimizations and cleanups.
1851 2009-11-18  Dinakar Guniguntala  <dino@in.ibm.com>
1853         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1854         Remove redundant code. Fix cfi offsets.
1855         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1856         Fix cfi offsets.
1858 2009-11-17  Ulrich Drepper  <drepper@redhat.com>
1860         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
1861         reduce size of unwind info.
1863         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
1864         cfi directives.
1865         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1866         Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
1868 2009-11-03  Andreas Schwab  <schwab@linux-m68k.org>
1870         [BZ #4457]
1871         * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
1872         LIBGCC_S_SO.
1873         * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
1875 2009-10-30  Ulrich Drepper  <drepper@redhat.com>
1877         * tst-sem11.c (main): Rewrite to avoid aliasing problems.
1879         [BZ #3270]
1880         * allocatestack.c (__nptl_setxid): Perform the operation in multiple
1881         steps to avoid races with creation and terminations.
1882         * nptl-init.c (sighandler_setxid): Adjust.
1883         Patch by Daniel Jacobowitz.
1885 2009-09-07  Andreas Schwab  <schwab@redhat.com>
1887         * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
1889 2009-09-02  Suzuki K P  <suzuki@in.ibm.com>
1890             Joseph Myers  <joseph@codesourcery.com>
1892         [BZ #7094]
1893         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1894         Initialize the sigev_notify field for newly created timer to make sure
1895         the timer gets deleted from the active timer's list upon timer_delete.
1897 2009-08-27  Andrew Stubbs  <ams@codesourcery.com>
1899         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1900         Correct a logic error.
1902 2009-08-25  Ulrich Drepper  <drepper@redhat.com>
1904         * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
1905         of the field in local variables.
1906         (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
1907         variable and don't unconditionally clear it.
1909 2009-08-24  Ulrich Drepper  <drepper@redhat.com>
1911         * pthread_create.c (start_thread): Hint to the kernel that memory for
1912         the stack can be reused.  We do not mark all the memory.  The part
1913         still in use and some reserve are kept.
1915 2009-08-23  Ulrich Drepper  <drepper@redhat.com>
1917         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
1919 2009-08-11  Ulrich Drepper  <drepper@redhat.com>
1921         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
1922         directives.
1924 2009-08-10  Ulrich Drepper  <drepper@redhat.com>
1926         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
1927         directives.
1928         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1930 2009-08-10  Andreas Schwab  <schwab@redhat.com>
1932         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1933         (__pthread_cond_signal): Don't clobber register used for syscall
1934         number.
1936 2009-08-08  Ulrich Drepper  <drepper@redhat.com>
1938         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1939         Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
1941         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
1942         (__pthread_cond_wait): Optimize by avoiding use of callee-safe
1943         register.
1945 2009-08-07  Ulrich Drepper  <drepper@redhat.com>
1947         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
1948         enabled by the special *_asynccancel functions.
1949         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1950         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1952         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
1954 2009-08-04  Ulrich Drepper  <drepper@redhat.com>
1956         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
1957         * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
1958         * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
1959         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
1960         since we can assume the special __*_{en,dis}able_asynccancel
1961         functions.
1962         (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
1963         * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
1964         and PTHREAD_CANCELED.
1966 2009-07-31  Ulrich Drepper  <drepper@redhat.com>
1968         * descr.h: Better definition of *_BITMASK macros for cancellation.
1970 2009-07-29  Ulrich Drepper  <drepper@redhat.com>
1972         * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
1974         * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
1975         dynamic linker might have to save.
1976         Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
1977         RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL.  Pretty
1978         printing.
1980         * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
1982 2009-07-28  Ulrich Drepper  <drepper@redhat.com>
1984         * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
1985         New function.
1986         * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
1987         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
1988         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
1989         requeue_pi for robust mutexes.
1990         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1991         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1992         Don't only skip __pthread_mutex_cond_lock.  Call instead
1993         __pthread_mutex_cond_lock_adjust.
1994         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1996         * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
1997         optimization of PI mutex handling.
1999 2009-07-27  Ulrich Drepper  <drepper@redhat.com>
2001         [BZ #10418]
2002         * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
2003         instead of of _acq variants of cmpxchg.
2005 2009-07-23  Ulrich Drepper  <drepper@redhat.com>
2007         * sysdeps/x86_64/configure.in: New file.
2009         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
2010         path when not using absolute timeout futex.
2012 2009-07-20  Ulrich Drepper  <drepper@redhat.com>
2014         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
2015         optimizations of last changes.
2016         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2018 2009-07-19  Ulrich Drepper  <drepper@redhat.com>
2020         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
2021         FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
2022         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
2023         is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
2024         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
2025         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
2026         is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
2027         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2029         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2030         (__pthread_cond_timedwait): Make more robust.
2032 2009-07-18  Ulrich Drepper  <drepper@redhat.com>
2034         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2035         (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
2036         directly use absolute timeout.
2038         * tst-sem5.c (do_test): Add test for premature timeout.
2039         * Makefile: Linu tst-sem5 with librt.
2041         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
2042         (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
2043         directly use absolute timeout.
2044         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
2045         (pthread_rwlock_timedrdlock): Likewise.
2047         * tst-cond11.c (run_test): Add test to check that the timeout is
2048         long enough.
2050         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2051         (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
2052         directly use absolute timeout.
2054         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2055         (__pthread_cond_wait): Convert to using exception handler instead of
2056         registered unwind buffer.
2057         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2058         (__pthread_cond_timedwait): Likewise.
2060 2009-07-17  Ulrich Drepper  <drepper@redhat.com>
2062         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2063         If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
2064         use absolute timeout.
2066         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
2067         handling of uncontested semaphore.
2069         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2070         (__condvar_cleanup): Rewrite to use cfi directives instead of
2071         hand-coded unwind tables.
2072         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
2073         Likewise.
2074         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
2075         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2076         Likewise.
2078 2009-06-12  Ulrich Drepper  <drepper@redhat.com>
2080         * Makefile (libpthread-routines): Add pthread_sigqueue.
2081         * Versions: Add pthread_sigqueue for GLIBC_2.11.
2082         * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
2083         * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
2085 2009-06-11  Ulrich Drepper  <drepper@redhat.com>
2087         [BZ #10262]
2088         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2089         (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
2090         cannot be assumed.
2091         Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
2093 2009-05-16  Ulrich Drepper  <drepper@redhat.com>
2095         * libc-cancellation.c: Move __libc_cleanup_routine to...
2096         * libc-cleanup.c: ...here.  New file.
2097         * Makefile (routines): Add libc-cleanup.
2099         * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
2100         test.
2101         * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
2102         * sysdeps/pthread/librt-cancellation.c: Likewise.
2104         [BZ #9924]
2105         * nptl-init.c: Renamed from init.c.
2106         * Makefile: Change all occurences of init.c to nptl-init.c.
2108 2009-05-15  Ulrich Drepper  <drepper@redhat.com>
2110         * cancellation.c (__pthread_disable_asynccancel): Correct the bits
2111         to test when deciding on the delay.
2112         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
2113         * pthread_cancel.c: Close race between deciding on sending a signal
2114         and setting the CANCELING_BIT bit.
2116         * cancellation.c (__pthread_disable_asynccancel): Don't return if
2117         thread is canceled.
2118         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
2120 2009-04-27  Ulrich Drepper  <drepper@redhat.com>
2122         * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
2123         is available.
2124         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
2125         * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
2126         * sysdeps/i386/tls.h: Likewise.
2127         (tcbhead_t): Add __private_tm member.
2129 2009-04-26  Ulrich Drepper  <drepper@redhat.com>
2131         * sem_open.c (sem_open): Rewrite initialization of initsem to
2132         avoid warnings.
2134         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2135         Avoid warning by using may_alias attribute on ptrhack.
2137 2009-04-22  Ulrich Drepper  <drepper@redhat.com>
2139         [BZ #10090]
2140         * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
2141         Check policy and priority for validity.
2142         Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
2144 2009-03-15  Ulrich Drepper  <drepper@redhat.com>
2146         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2147         (__pthread_cond_timedwait): Change to use cfi directives instead of
2148         hand-coded unwind sections.
2150 2009-03-10  Ulrich Drepper  <drepper@redhat.com>
2152         * init.c (nptl_freeres): Compile only for SHARED.
2154 2009-03-09  Jakub Jelinek  <jakub@redhat.com>
2156         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
2157         FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
2158         FUTEX_BITSET_MATCH_ANY.
2160 2009-02-27  Roland McGrath  <roland@redhat.com>
2162         * init.c (__nptl_initial_report_events): Mark __attribute_used__.
2163         * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
2165 2009-02-26  Ulrich Drepper  <drepper@redhat.com>
2167         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2168         _POSIX_THREAD_ROBUST_PRIO_INHERIT and
2169         _POSIX_THREAD_ROBUST_PRIO_PROTECT.  Reset value of macros from
2170         200112L to 200809L.
2172 2009-02-25  Ulrich Drepper  <drepper@redhat.com>
2174         * sysdeps/pthread/pthread.h: The robust mutex functions are in
2175         POSIX 2008.
2177 2009-02-24  Ulrich Drepper  <drepper@redhat.com>
2179         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
2180         Unify name of include protector macro.
2182 2009-02-14  SUGIOKA Toshinobu  <sugioka@itonet.co.jp>
2184         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
2185         LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
2187 2009-01-29  Ulrich Drepper  <drepper@redhat.com>
2189         * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
2190         pointer variables.
2192         * allocatestack.c (__free_stacks): Renamed from free_stacks.
2193         (__free_stack_cache): Removed.  Change callers to call __free_stacks.
2194         * init.c (nptl_freeres): New function.
2195         (pthread_functions): Initialize ptr_freeres to nptl_freeres.
2196         * pthreadP.h: Don't declare __free_stack_cache.  Declare __free_stacks.
2197         * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
2198         variable.
2199         (pthread_cancel_init): Depend in libgcc_s_handle for decision to
2200         load DSO.  Assign last.
2201         (__unwind_freeres): New function.
2203         * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
2204         for better debugging.  No need to use stack_list_add here.
2206 2009-01-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2208         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
2209         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
2210         instead of computing relative timeout.
2211         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
2212         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
2214 2009-01-25  Ulrich Drepper  <drepper@redhat.com>
2216         * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
2218 2009-01-08  Ulrich Drepper  <drepper@redhat.com>
2220         * sysdeps/pthread/list.h (list_add): Initialize new element first.
2221         (list_add_tail): Removed.
2223 2009-01-07  Ulrich Drepper  <drepper@redhat.com>
2225         * (in_flight_stack): New variable.
2226         (stack_list_del): New function.  Use instead of list_del.
2227         (stack_list_add): New function.  Use instead of list_add when adding to
2228         stack_cache and stack_used lists.
2229         (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
2230         when the fork call interrupted another thread.
2232 2009-01-04  Ulrich Drepper  <drepper@redhat.com>
2234         * init.c (__pthread_initialize_minimal_internal): Optimize test
2235         FUTEX_CLOCK_REALTIME a bit.
2237 2009-01-03  Ulrich Drepper  <drepper@redhat.com>
2239         * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
2240         only passing five parameters to FUTEX_WAIT_BITSET call.
2242         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2243         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
2244         instead of computing relative timeout.
2246 2009-01-02  Ulrich Drepper  <drepper@redhat.com>
2248         * init.c (__pthread_initialize_minimal_internal): Check for
2249         FUTEX_CLOCK_REALTIME flag.
2250         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
2251         Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
2252         relative timeout.
2254         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
2255         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
2256         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2257         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2258         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2259         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2261 2008-12-09  Ulrich Drepper  <drepper@redhat.com>
2263         * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
2264         loop body instead of ; to avoid gcc warnings.
2265         (pthread_cleanup_pop_restore_np): Likewise.
2266         Patch by Caolán McNamara <caolanm@redhat.com>.
2268 2008-12-09  Jakub Jelinek  <jakub@redhat.com>
2270         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
2271         fast path here, for robust/PI/PP mutexes call
2272         __pthread_mutex_lock_full.  Don't use switch, instead use a series
2273         of ifs according to their probability.
2274         (__pthread_mutex_lock_full): New function.
2275         * pthread_mutex_unlock.c: Include assert.h.
2276         (__pthread_mutex_unlock_usercnt): Handle only the
2277         fast path here, for robust/PI/PP mutexes call
2278         __pthread_mutex_unlock_full.  Don't use switch, instead use a series
2279         of ifs according to their probability.
2280         (__pthread_mutex_unlock_full): New function.
2281         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
2282         (__pthread_mutex_lock_full): Define.
2284 2008-12-08  Ulrich Drepper  <drepper@redhat.com>
2286         * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
2287         implementation.  Add necessary padding and.
2288         * descr.h (struct pthread): Increase padding for tcbhead_t to 24
2289         words.
2291 2008-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2293         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
2294         and FUTEX_WAKE_BITSET.
2296 2008-12-02  Ulrich Drepper  <drepper@redhat.com>
2298         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
2299         and FUTEX_WAKE_BITSET.
2300         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2301         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2302         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2303         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2305 2008-11-25  Roland McGrath  <roland@redhat.com>
2307         * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
2308         Subdirectories moved to ports repository as
2309         sysdeps/.../nptl subdirectories.
2311 2008-11-12  Jakub Jelinek  <jakub@redhat.com>
2313         [BZ #7008]
2314         * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
2315         of old value.
2316         * pthread_cond_init.c (__pthread_cond_init): Fix
2317         cond->__data.__nwaiters initialization.
2318         * Makefile (tests): Add tst-cond23.
2319         * tst-cond23.c: New test.
2321 2008-11-07  Jakub Jelinek  <jakub@redhat.com>
2323         * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
2324         arguments.
2325         (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
2326         arguments.
2328 2008-11-01  Ulrich Drepper  <drepper@redhat.com>
2330         [BZ #6955]
2331         * pthread_mutex_lock.c: Add support for private PI mutexes.
2332         * pthread_mutex_timedlock.c: Likewise.
2333         * pthread_mutex_trylock.c: Likewise.
2334         * pthread_mutex_unlock.c: Likewise.
2335         Patch mostly by Ben Jackson <ben@ben.com>.
2337 2008-10-31  Ulrich Drepper  <drepper@redhat.com>
2339         [BZ #6843]
2340         * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
2341         Increase stack size for helper thread.
2343 2008-10-06  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2345         * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
2346         assembly with a clobber list for access registers a0 and a1.
2348 2008-09-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2350         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
2351         to force runp->refcntr to be read from memory.
2353 2008-09-08  Richard Guenther  <rguenther@suse.de>
2355         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
2356         lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2357         lll_timedlock, lll_robust_timedlock, lll_unlock,
2358         lll_robust_unlock): Promote private to int.
2360 2008-08-15  Ulrich Drepper  <drepper@redhat.com>
2362         * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
2363         ARCH_RETRY_MMAP definitions.
2364         * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
2365         Define MAP_STACK when not defined.
2366         (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS.  Remove
2367         handling of ARCH_RETRY_MMAP.
2369 2008-07-30  Ulrich Drepper  <drepper@redhat.com>
2371         * tst-align2.c (f): Print message that f is reached.
2373 2008-04-28  Hiroki Kaminaga  <kaminaga@sm.sony.co.jp>
2375         [BZ #6740]
2376         * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
2377         definition with #ifndef __ASSUME_PRIVATE_FUTEX.
2379 2008-07-25  Ulrich Drepper  <drepper@redhat.com>
2381         * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
2382         SOCK_CLOEXEC if possible.
2384 2008-05-29  Ulrich Drepper  <drepper@redhat.com>
2386         * Makefile (tests): Add tst-rwlock2a.
2387         * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
2388         * tst-rwlock2a.c: New file.
2390 2008-06-12  Ulrich Drepper  <drepper@redhat.com>
2392         * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
2394 2008-05-17  Samuel Thibault  <samuel.thibault@ens-lyon.org>
2396         * sysdeps/pthread/pthread.h: Fix typo in comment.
2398 2008-05-28  Ulrich Drepper  <drepper@redhat.com>
2400         * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
2401         of CPU set to the kernel.
2403 2008-05-23  Paul Pluzhnikov  <ppluzhnikov@google.com>
2405         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
2406         cfi directives.
2407         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
2408         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
2409         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2410         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2411         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2412         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2414 2008-05-22  Paul Pluzhnikov  <ppluzhnikov@google.com>
2416         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
2417         cfi directives.
2418         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2419         Likewise.
2420         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2421         Likewise.
2422         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2423         Likewise.
2425 2008-05-26  Ulrich Drepper  <drepper@redhat.com>
2427         * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
2429 2008-05-20  Jakub Jelinek  <jakub@redhat.com>
2431         David S. Miller  <davem@davemloft.net>
2433         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
2435 2008-05-10  Ulrich Drepper  <drepper@redhat.com>
2437         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
2438         __pshared correctly.
2439         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2440         Likewise.
2441         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2442         Likewise.
2443         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
2444         Likewise.
2445         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
2446         Likewise.
2447         Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
2449 2008-04-14  David S. Miller  <davem@davemloft.net>
2451         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2452         (__old_sem_wait): Fix argument to lll_futex_wait().
2454 2007-11-26  Daniel Jacobowitz  <dan@codesourcery.com>
2456         * pthread_create.c: Require pthread_mutex_trylock and
2457         pthread_key_delete for libgcc.
2459 2008-04-08  Jakub Jelinek  <jakub@redhat.com>
2461         [BZ #6020]
2462         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
2463         (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
2464         Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
2466 2008-03-27  Ulrich Drepper  <drepper@redhat.com>
2468         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
2469         <linux/limits.h> has defined it.
2470         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2471         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2472         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2473         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2475 2008-03-18  Jakub Jelinek  <jakub@redhat.com>
2477         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
2478         of ASSEMBLER.
2479         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2480         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
2482 2008-03-14  Ulrich Drepper  <drepper@redhat.com>
2484         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
2485         HAVE_DL_DISCOVER_OSVERSION.
2486         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2487         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
2489 2008-03-07  Ulrich Drepper  <drepper@redhat.com>
2491         [BZ #5778]
2492         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
2493         _POSIX_CHOWN_RESTRICTED value to zero.
2495 2008-01-31  Roland McGrath  <roland@redhat.com>
2497         * Makefile (omit-deps): Variable removed.
2499 2008-01-30  Ulrich Drepper  <drepper@redhat.com>
2501         * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
2502         unnecessary addr32 prefix.
2504 2008-01-29  Roland McGrath  <roland@redhat.com>
2506         * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
2508 2008-01-22  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2510         * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
2512 2008-01-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2514         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
2515         a scratch register.
2516         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
2517         (__lll_lock_wait_private): Fix typo.
2518         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
2519         (pthread_barrier_wait): Likewise.  Adjust XADD use.
2520         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
2521         Adjust XADD use.
2522         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
2523         (pthread_rwlock_timedrdlock): Return correct return value.
2524         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
2525         (pthread_rwlock_timedwrlock): Likewise.
2527 2008-01-15  Ulrich Drepper  <drepper@redhat.com>
2529         * tst-eintr2.c (do_test): make sure that if mutex_lock in main
2530         thread returns the program exits with an error code.
2532 2008-01-10  Ulrich Drepper  <drepper@redhat.com>
2534         * pthread-errnos.sym: Add EOVERFLOW.
2535         * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
2536         * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
2537         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2538         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2540 2007-12-14  Ulrich Drepper  <drepper@redhat.com>
2542         * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
2543         parameter.  Passed it as permission to mmap.
2544         * allocatestack.c (allocate_stack): Pass prot as second parameter
2545         to ARCH_RETRY_MMAP.
2547 2007-12-12  Ulrich Drepper  <drepper@redhat.com>
2549         * tst-basic7.c: Allocate memory for the stack.
2551         [BZ #5465]
2552         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
2553         (__pthread_cond_timedwait): Don't use VDSO.
2554         Patch by Michal Januszewski.
2556 2007-12-07  Ulrich Drepper  <drepper@redhat.com>
2558         [BZ #5455]
2559         * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
2560         Allow label before pthread_cleanup_pop.
2561         (pthread_cleanup_pop_restore_np): Likewise.
2563 2007-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2565         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
2566         Store 2 before returning ETIMEDOUT.
2568 2007-11-23  Ulrich Drepper  <drepper@redhat.com>
2570         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
2571         Store 2 before returning ETIMEDOUT.
2572         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
2573         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
2574         (__lll_lock_wait_private): Optimize.
2575         (__lll_lock_wait): Likewise.
2577 2007-11-20  Jakub Jelinek  <jakub@redhat.com>
2579         * sysdeps/pthread/pthread.h (pthread_cleanup_push,
2580         pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
2581         g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
2583 2007-11-08  Ulrich Drepper  <drepper@redhat.com>
2585         [BZ #5240]
2586         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
2587         If we time out, try one last time to lock the futex to avoid
2588         losing a wakeup signal.
2589         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2590         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2592         [BZ #5245]
2593         * sysdeps/pthread/createthread.c (do_clone): Translate clone error
2594         if necessary.
2596 2007-11-07  Ulrich Drepper  <drepper@redhat.com>
2598         [BZ #5245]
2599         * allocatestack.c (allocate_stack): Change ENOMEM error in case
2600         mmap failed to EAGAIN.
2601         * Makefile (tests): Add tst-basic7.
2602         * tst-basic7.c: New file.
2604 2007-11-05  Ulrich Drepper  <drepper@redhat.com>
2606         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
2607         Use __linkin_atfork.
2609 2007-11-03  Mike Frysinger  <vapier@gentoo.org>
2611         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
2612         missing line continuations.
2613         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
2614         LOAD_FUTEX_WAKE): Likewise.  Also add missing 3rd parameter.
2616 2007-10-28  Ulrich Drepper  <drepper@redhat.com>
2618         [BZ #5220]
2619         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
2620         __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
2621         (struct timer): Add next element.
2622         * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
2623         enqueue timer structure into __active_timer_sigev_thread list.
2624         * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
2625         remove timer struct from __active_timer_sigev_thread.
2626         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2627         Before using timer structure make sure it is still on the
2628         __active_timer_sigev_thread list.  Keep lock until done.
2629         Define __active_timer_sigev_thread and
2630         __active_timer_sigev_thread_lock.
2632 2007-10-27  Ulrich Drepper  <drepper@redhat.com>
2634         * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
2635         Redefine thread_atfork for use of ATFORK_MEM.
2636         * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
2637         * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
2638         function.
2639         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2640         Use atomic operation when removing first element of list.
2642 2007-10-17  Jakub Jelinek  <jakub@redhat.com>
2644         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
2645         routine instead of an alias to __new_sem_post.
2647 2007-10-15  Jakub Jelinek  <jakub@redhat.com>
2649         * init.c (__pthread_initialize_minimal): Initialize word to appease
2650         valgrind.
2652 2007-10-10  Jakub Jelinek  <jakub@redhat.com>
2654         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
2655         libc.so just clear NAME.
2656         (__libc_rwlock_fini): Nop inside of libc.so.
2657         * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
2658         all zeros.
2660 2007-09-02  Ulrich Drepper  <drepper@redhat.com>
2662         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2663         (__pthread_cond_wait): Fix unlocking of internal lock after mutex
2664         unlocking failed.
2665         Patch by Luca Barbieri <luca.barbieri@gmail.com>.
2667 2007-08-21  Ulrich Drepper  <drepper@redhat.com>
2669         [BZ #4938]
2670         * allocatestack.c (__reclaim_stacks): Clear the TSD in the
2671         reclaimed stack if necessary.
2672         * Makefile (tests): Add tst-tsd6.
2673         * tst-tsd6.c: New file.
2675 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
2677         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
2678         Add private argument.
2680 2007-08-20  Ulrich Drepper  <drepper@redhat.com>
2682         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2683         (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
2685 2007-08-16  Jakub Jelinek  <jakub@redhat.com>
2687         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
2688         (__lll_robust_timedlock): Pass private as last argument to
2689         __lll_robust_timedlock_wait.
2690         (__lll_unlock): Fix a pasto.
2692 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
2694         * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
2695         sparc_old_sem): New structs.
2696         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2697         (__sem_wait_cleanup): New function.
2698         (__new_sem_wait): Use sparc_new_sem structure.  Bump and afterwards
2699         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
2700         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2701         lll_futex_wait.
2702         (__old_sem_wait): New function.
2703         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
2704         nptl/sysdeps/unix/sysv/linux/sparc version.
2705         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
2706         Likewise.
2707         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
2708         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
2709         (__new_sem_trywait): Use sparc_old_sem structure.
2710         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
2711         (sem_timedwait): Use sparc_new_sem structure.  Bump and afterwards
2712         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
2713         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2714         lll_futex_timed_wait.
2715         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
2716         Use sparc_new_sem structure.  Only wake if nwaiters > 0.  Pass
2717         isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2718         lll_futex_wake.
2719         (__old_sem_post): New function.
2720         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
2721         * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
2722         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
2723         * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
2724         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
2725         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
2727 2007-08-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2729         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2730         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2731         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2732         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2733         * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
2734         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2735         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2736         Use FUTEX_WAKE_OP.
2737         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2738         kernel-features.h and tcb-offsets.h.
2739         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2740         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2741         process private.
2742         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2743         tcb-offsets.h.
2744         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
2745         to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2746         process private.
2747         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
2748         __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2749         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
2750         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2751         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2752         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2753         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2755 2007-08-14  Jakub Jelinek  <jakub@redhat.com>
2757         * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
2758         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
2759         (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
2760         lll_futex_timed_wait.
2762         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
2763         __lll_robust_unlock): Rewrite as macros instead of inline functions.
2764         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
2765         __lll_robust_unlock, __lll_wait_tid): Likewise.
2767 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
2769         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
2770         Fix a pasto.
2771         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
2772         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2773         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2774         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2775         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2776         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2777         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2778         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
2779         kernel-features.h.
2780         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2781         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2782         process private.  Switch DW_CFA_advance_loc1 and some
2783         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2784         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2785         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
2786         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2787         process private.  Switch DW_CFA_advance_loc{1,2} and some
2788         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2789         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
2790         #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2791         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2792         Likewise.
2793         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2794         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2795         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2796         Likewise.
2797         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2798         (__pthread_cond_broadcast): Compare %r8 instead of
2799         dep_mutex-cond_*(%rdi) with $-1.
2800         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2801         (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
2802         of oring.
2804 2007-08-13  Ulrich Drepper  <drepper@redhat.com>
2806         * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
2808 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
2810         * allocatestack.c: Include kernel-features.h.
2811         * pthread_create.c: Likewise.
2812         * pthread_mutex_init.c: Likewise.
2813         * init.c: Likewise.
2814         * pthread_cond_timedwait.c: Likewise.
2815         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2816         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2817         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2818         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2819         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2820         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2821         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2822         Likewise.
2823         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2824         Likewise.
2825         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2826         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2827         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2828         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2830 2007-08-12  Jakub Jelinek  <jakub@redhat.com>
2832         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2833         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2834         byte elements.  One of them is the new __shared element.
2835         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2836         adjust names of other padding elements.
2837         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2838         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
2839         byte elements.  One of them is the new __shared element.
2840         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
2841         adjust names of other padding elements.
2842         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
2843         Renamed __pad1 element to __shared, adjust names of other padding
2844         elements.
2845         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2846         (pthread_rwlock_t): Likewise.
2847         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
2848         typo.
2850 2007-08-09  Anton Blanchard  <anton@samba.org>
2852         * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
2854 2007-08-12  Ulrich Drepper  <drepper@redhat.com>
2856         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
2857         <kernel-features.h>.
2858         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2860 2007-08-11  Ulrich Drepper  <drepper@redhat.com>
2862         * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
2863         * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
2864         dealing with robust mutexes.
2865         * pthread_mutex_timedlock.c: Likewise.
2866         * pthread_mutex_trylock.c: Likewise.
2867         * pthread_mutex_unlock.c: Likewise.
2868         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2870 2007-08-06  Jakub Jelinek  <jakub@redhat.com>
2872         * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
2873         (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
2874         (PTHREAD_MUTEX_PSHARED): Define.
2875         * pthread_mutex_init.c (__pthread_mutex_init): Set
2876         PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
2877         mutexes.
2878         * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
2879         instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
2880         as second argument to lll_lock.
2881         (LLL_MUTEX_TRYLOCK): Take mutex as argument
2882         instead of its __data.__lock field.
2883         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
2884         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
2885         to lll_robust_lock.
2886         (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
2887         LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
2888         instead of mutex->__data.__kind directly, pass
2889         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
2890         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
2891         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
2892         directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
2893         (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
2894         to lll_timedlock, lll_robust_timedlock, lll_unlock and
2895         lll_futex_timed_wait.  Use PTHREAD_MUTEX_TYPE (mutex) instead
2896         of mutex->__data.__kind directly.
2897         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
2898         PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
2899         lll_robust_timedlock, lll_unlock and lll_futex_timed_wait.  Use
2900         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
2901         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
2902         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
2903         and lll_futex_wake.
2904         * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
2905         PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
2906         Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
2907         directly.
2908         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
2909         Take mutex as argument instead of its __data.__lock field, pass
2910         PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
2911         (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
2912         __data.__lock field.
2913         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
2914         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
2915         to lll_robust_cond_lock.
2916         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
2917         variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
2918         lll_futex_wake.  Don't use lll_futex_requeue if dependent mutex
2919         has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
2920         * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
2921         variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
2922         lll_futex_wait.
2923         * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
2924         variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
2925         lll_futex_wake.
2926         * pthread_cond_timedwait.c (__pthread_cond_wait): Add
2927         pshared variable, pass it to lll_lock, lll_unlock,
2928         lll_futex_timedwait and lll_futex_wake.
2929         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
2930         pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
2931         and lll_futex_wake.
2932         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
2933         lll_futex_wake_unlock): Add private argument, use __lll_private_flag
2934         macro.
2935         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
2936         lll_futex_wake_unlock): Likewise.
2937         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
2938         Likewise.
2939         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
2940         lll_futex_wake_unlock): Likewise.
2941         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
2942         Likewise.
2943         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
2944         lll_futex_wake_unlock): Likewise.
2945         (lll_futex_wake): Fix a typo.
2946         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
2947         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2948         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2949         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2950         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2951         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2952         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2953         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2954         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2955         (__pthread_cond_timedwait): Likewise.
2956         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
2957         (__condvar_cleanup, __pthread_cond_wait): Likewise.
2959 2007-08-05  Jakub Jelinek  <jakub@redhat.com>
2961         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
2962         Don't use CGOTSETUP and CGOTRESTORE macros.
2963         (CGOTSETUP, CGOTRESTORE): Remove.
2964         <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
2965         @local symbol.
2967 2007-08-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2969         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
2970         definitions for private futexes.
2971         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
2972         kernel-features.h and lowlevellock.h.  Use private futexes if
2973         they are available.
2974         (__lll_lock_wait_private, __lll_unlock_wake_private): New.
2975         (__lll_mutex_lock_wait): Rename to
2976         (__lll_lock_wait): ... this.  Don't compile in for libc.so.
2977         (__lll_mutex_timedlock_wait): Rename to ...
2978         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.
2979         Don't compile in for libc.so.
2980         (__lll_mutex_unlock_wake): Rename to ...
2981         (__lll_unlock_wake): ... this.  Don't compile in for libc.so.
2982         (__lll_timedwait_tid): Use __NR_gettimeofday.
2983         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
2984         the header from assembler.  Renamed all lll_mutex_* resp.
2985         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
2986         Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
2987         (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
2988         Define.
2989         (__lll_lock_wait_private): Add prototype.
2990         (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
2991         __lll_robust_timedlock_wait, __lll_unlock_wake_private,
2992         __lll_unlock_wake): Likewise.
2993         (lll_lock): Add private argument.  Call __lll_lock_wait_private
2994         if private is constant LLL_PRIVATE.
2995         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2996         lll_timedlock, lll_robust_timedlock): Add private argument.
2997         (lll_unlock): Add private argument.  Call __lll_unlock_wake_private
2998         if private is constant LLL_PRIVATE.
2999         (lll_robust_unlock, lll_robust_dead): Add private argument.
3000         (lll_lock_t): Remove.
3001         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
3002         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
3003         lll_cond_wake, lll_cond_broadcast): Remove.
3004         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
3005         kernel-features.h and lowlevellock.h.
3006         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
3007         (LOAD_FUTEX_WAIT): Define.
3008         (__lll_robust_mutex_lock_wait): Rename to ...
3009         (__lll_robust_lock_wait): ... this.  Add private argument.
3010         Use LOAD_FUTEX_WAIT macro.
3011         (__lll_robust_mutex_timedlock_wait): Rename to ...
3012         (__lll_robust_timedlock_wait): ... this.    Add private argument.
3013         Use __NR_gettimeofday.  Use LOAD_FUTEX_WAIT macro.
3014         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
3015         lowlevellock.h.
3016         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
3017         (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
3018         __lll_mutex_{lock,unlock}_*.
3019         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
3020         lowlevellock.h and pthread-errnos.h.
3021         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3022         FUTEX_CMP_REQUEUE, EINVAL): Remove.
3023         (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
3024         __lll_mutex_{lock,unlock}_*.
3025         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
3026         lowlevellock.h and pthread-errnos.h.
3027         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
3028         (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
3029         __lll_mutex_{lock,unlock}_*.
3030         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
3031         lowlevellock.h.
3032         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
3033         (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
3034         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
3035         (__condvar_tw_cleanup): Likewise.
3036         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
3037         lowlevellock.h.
3038         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
3039         (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
3040         __lll_mutex_{lock,unlock}_*.
3041         ( __condvar_w_cleanup): Likewise.
3042         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
3043         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3044         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
3045         lowlevellock.h.
3046         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3047         (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
3048         __lll_mutex_{lock,unlock}_*.
3049         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
3050         lowlevellock.h.
3051         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
3052         FUTEX_PRIVATE_FLAG): Remove.
3053         (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
3054         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
3055         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
3056         lowlevellock.h.
3057         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
3058         FUTEX_PRIVATE_FLAG): Remove.
3059         (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
3060         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
3061         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
3062         lowlevellock.h.
3063         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3064         (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
3065         __lll_mutex_{lock,unlock}_*.
3066         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
3067         lowlevellock.h.
3068         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3069         (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
3070         __lll_mutex_{lock,unlock}_*.
3071         * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
3072         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3073         (__new_sem_post): Use standard initial exec code sequences.
3074         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
3075         lowlevellock.h.
3076         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
3077         FUTEX_PRIVATE_FLAG): Remove.
3078         (sem_timedwait): Use __NR_gettimeofday.  Use standard initial
3079         exec code sequences.
3080         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
3081         (__new_sem_trywait): Use standard initial exec code sequences.
3082         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
3083         (__new_sem_wait): Use standard initial exec code sequences.
3085 2007-07-31  Anton Blanchard  <anton@samba.org>
3087         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3088         Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
3089         atomic_full_barrier.
3091 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
3093         * allocatestack.c (stack_cache_lock): Change type to int.
3094         (get_cached_stack, allocate_stack, __deallocate_stack,
3095         __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
3096         __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
3097         as second argument to lll_lock and lll_unlock macros on
3098         stack_cache_lock.
3099         * pthread_create.c (__find_in_stack_list): Likewise.
3100         (start_thread): Similarly with pd->lock.  Use lll_robust_dead
3101         macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
3102         as second argument.
3103         * descr.h (struct pthread): Change lock and setxid_futex field
3104         type to int.
3105         * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
3106         LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
3107         * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
3108         * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
3109         Likewise.
3110         * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
3111         * pthread_cond_init.c (__pthread_cond_init): Likewise.
3112         * pthreadP.h (__attr_list_lock): Change type to int.
3113         * pthread_attr_init.c (__attr_list_lock): Likewise.
3114         * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
3115         ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
3116         lll_{,un}lock.
3117         * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
3118         also for lll_futex_{wake,wait}.
3119         * pthread_barrier_init.c (pthread_barrier_init): Make iattr
3120         a pointer to const.
3121         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
3122         LLL_SHARED as second argument to lll_{,un}lock.
3123         * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
3124         * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
3125         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
3126         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
3127         Likewise.
3128         * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
3129         as second argument to lll_{,un}lock macros on pd->lock.
3130         * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
3131         * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
3132         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
3133         * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
3134         Likewise.
3135         * sysdeps/pthread/createthread.c (do_clone, create_thread):
3136         Likewise.
3137         * pthread_once.c (once_lock): Change type to int.
3138         (__pthread_once): Pass LLL_PRIVATE as second argument to
3139         lll_{,un}lock macros on once_lock.
3140         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
3141         lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
3142         rwlock->__data.__shared as second argument to them and similarly
3143         for lll_futex_w*.
3144         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
3145         Likewise.
3146         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
3147         Likewise.
3148         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
3149         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
3150         * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
3151         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
3152         * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
3153         to lll_{,un}lock macros on __sem_mappings_lock.
3154         * sem_open.c (check_add_mapping): Likewise.
3155         (__sem_mappings_lock): Change type to int.
3156         * semaphoreP.h (__sem_mappings_lock): Likewise.
3157         * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
3158         LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
3159         instead of lll_*mutex_*, pass LLL_SHARED as last
3160         argument.
3161         (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
3162         pass LLL_SHARED as last argument.
3163         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
3164         LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
3165         lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
3166         pass LLL_SHARED as last argument.
3167         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
3168         lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
3169         LLL_SHARED as last argument.
3170         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
3171         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
3172         Similarly.
3173         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
3174         __libc_lock_lock_recursive, __libc_lock_unlock,
3175         __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
3176         argument to lll_{,un}lock.
3177         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
3178         _IO_lock_unlock): Likewise.
3179         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
3180         compound literal.
3181         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
3182         Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
3183         __fork_lock.
3184         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
3185         free_mem): Likewise.
3186         (__fork_lock): Change type to int.
3187         * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
3188         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
3189         isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
3190         lll_futex_wake.
3191         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
3192         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
3193         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
3194         New function.
3195         (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
3196         pass it through to lll_futex_*wait, only compile in when
3197         IS_IN_libpthread.
3198         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3199         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
3200         argument and pass it through to lll_futex_*wait.
3201         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
3202         lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
3203         lll_robust_*.  Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
3204         inline functions to __lll_* resp. __lll_robust_*.
3205         (LLL_MUTEX_LOCK_INITIALIZER): Remove.
3206         (lll_mutex_dead): Add private argument.
3207         (__lll_lock_wait_private): New prototype.
3208         (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
3209         __lll_robust_lock_timedwait): Add private argument to prototypes.
3210         (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
3211         call __lll_lock_wait_private, otherwise pass private to
3212         __lll_lock_wait.
3213         (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
3214         __lll_robust_timedlock): Add private argument, pass it to
3215         __lll_*wait functions.
3216         (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
3217         call __lll_unlock_wake_private, otherwise pass private to
3218         __lll_unlock_wake.
3219         (__lll_robust_unlock): Add private argument, pass it to
3220         __lll_robust_unlock_wake.
3221         (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
3222         lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
3223         argument, pass it through to __lll_* inline function.
3224         (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
3225         (lll_lock_t): Remove.
3226         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
3227         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
3228         lll_cond_wake, lll_cond_broadcast): Remove.
3229         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3230         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3231         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3232         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3233         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
3234         the header from assembler.  Renamed all lll_mutex_* resp.
3235         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
3236         (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
3237         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3238         (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
3239         LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
3240         (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
3241         __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
3242         Remove prototype.
3243         (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
3244         (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
3245         rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
3246         (lll_trylock): Likewise, use __lll_trylock_asm, pass
3247         MULTIPLE_THREADS_OFFSET as another asm operand.
3248         (lll_lock): Add private argument, use __lll_lock_asm_start, pass
3249         MULTIPLE_THREADS_OFFSET as last asm operand, call
3250         __lll_lock_wait_private if private is constant LLL_PRIVATE,
3251         otherwise pass private as another argument to __lll_lock_wait.
3252         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
3253         lll_timedlock, lll_robust_timedlock): Add private argument, pass
3254         private as another argument to __lll_*lock_wait call.
3255         (lll_unlock): Add private argument, use __lll_unlock_asm, pass
3256         MULTIPLE_THREADS_OFFSET as another asm operand, call
3257         __lll_unlock_wake_private if private is constant LLL_PRIVATE,
3258         otherwise pass private as another argument to __lll_unlock_wake.
3259         (lll_robust_unlock): Add private argument, pass private as another
3260         argument to __lll_unlock_wake.
3261         (lll_robust_dead): Add private argument, use __lll_private_flag
3262         macro.
3263         (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
3264         LLL_MUTEX_LOCK_INITIALIZER.
3265         (lll_lock_t): Remove.
3266         (LLL_LOCK_INITIALIZER_WAITERS): Define.
3267         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
3268         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
3269         lll_cond_wake, lll_cond_broadcast): Remove.
3270         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3271         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
3272         2007-05-2{3,9} changes.
3273         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
3274         kernel-features.h and lowlevellock.h.
3275         (LOAD_PRIVATE_FUTEX_WAIT): Define.
3276         (LOAD_FUTEX_WAIT): Rewritten.
3277         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
3278         define.
3279         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
3280         (__lll_mutex_lock_wait): Rename to ...
3281         (__lll_lock_wait): ... this.  Take futex addr from %edx instead of
3282         %ecx, %ecx is now private argument.  Don't compile in for libc.so.
3283         (__lll_mutex_timedlock_wait): Rename to ...
3284         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.  %esi
3285         contains private argument.  Don't compile in for libc.so.
3286         (__lll_mutex_unlock_wake): Rename to ...
3287         (__lll_unlock_wake): ... this.  %ecx contains private argument.
3288         Don't compile in for libc.so.
3289         (__lll_timedwait_tid): Use __NR_gettimeofday.
3290         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
3291         kernel-features.h and lowlevellock.h.
3292         (LOAD_FUTEX_WAIT): Define.
3293         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
3294         define.
3295         (__lll_robust_mutex_lock_wait): Rename to ...
3296         (__lll_robust_lock_wait): ... this.  Futex addr is now in %edx
3297         argument, %ecx argument contains private.  Use LOAD_FUTEX_WAIT
3298         macro.
3299         (__lll_robust_mutex_timedlock_wait): Rename to ...
3300         (__lll_robust_timedlock_wait): ... this.  Use __NR_gettimeofday.
3301         %esi argument contains private, use LOAD_FUTEX_WAIT macro.
3302         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
3303         lowlevellock.h.
3304         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3305         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
3306         PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
3307         __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
3308         to __lll_lock_wait in %edx.
3309         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
3310         Include lowlevellock.h and pthread-errnos.h.
3311         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3312         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
3313         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
3314         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3315         pass LLL_SHARED in %ecx to both __lll_lock_wait and
3316         __lll_unlock_wake.
3317         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
3318         Include lowlevellock.h and pthread-errnos.h.
3319         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
3320         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
3321         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
3322         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3323         pass LLL_SHARED in %ecx to both __lll_lock_wait and
3324         __lll_unlock_wake.
3325         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
3326         Include lowlevellock.h.
3327         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3328         Don't define.
3329         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
3330         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3331         pass LLL_SHARED in %ecx to both __lll_lock_wait and
3332         __lll_unlock_wake.  Use __NR_gettimeofday.
3333         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
3334         Include lowlevellock.h.
3335         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3336         (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
3337         to __lll_*, pass cond_lock address in %edx rather than %ecx to
3338         __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
3339         and __lll_unlock_wake.
3340         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
3341         Include lowlevellock.h.
3342         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3343         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
3344         MUTEX(%ebx) address in %edx rather than %ecx to
3345         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
3346         and __lll_unlock_wake.  Move return value from %ecx to %edx
3347         register.
3348         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3349         Include lowlevellock.h.
3350         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3351         Don't define.
3352         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3353         MUTEX(%ebp) address in %edx rather than %ecx to
3354         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
3355         and __lll_unlock_wake.  Move return value from %ecx to %edx
3356         register.  Use __NR_gettimeofday.
3357         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3358         Include lowlevellock.h.
3359         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3360         Don't define.
3361         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3362         MUTEX(%ebp) address in %edx rather than %ecx to
3363         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
3364         and __lll_unlock_wake.  Move return value from %ecx to %edx
3365         register.  Use __NR_gettimeofday.
3366         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
3367         Include lowlevellock.h.
3368         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3369         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
3370         MUTEX(%edi) address in %edx rather than %ecx to
3371         __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
3372         and __lll_unlock_wake.
3373         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
3374         Include lowlevellock.h.
3375         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3376         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3377         MUTEX(%ebx) address in %edx rather than %ecx to
3378         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
3379         and __lll_unlock_wake.  Move return value from %ecx to %edx
3380         register.
3381         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
3382         lowlevellock.h.
3383         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
3384         define.
3385         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
3386         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
3387         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
3388         lowlevellock.h.
3389         (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
3390         (sem_timedwait): Use __NR_gettimeofday.
3391         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
3392         lowlevellock.h.
3393         (LOCK): Don't define.
3394         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
3395         lowlevellock.h.
3396         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3397         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
3398         are waiters.
3399         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
3400         2007-05-2{3,9} changes.
3401         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
3402         kernel-features.h and lowlevellock.h.
3403         (LOAD_PRIVATE_FUTEX_WAIT): Define.
3404         (LOAD_FUTEX_WAIT): Rewritten.
3405         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
3406         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
3407         (__lll_mutex_lock_wait): Rename to ...
3408         (__lll_lock_wait): ... this.  %esi is now private argument.
3409         Don't compile in for libc.so.
3410         (__lll_mutex_timedlock_wait): Rename to ...
3411         (__lll_timedlock_wait): ... this.  %esi contains private argument.
3412         Don't compile in for libc.so.
3413         (__lll_mutex_unlock_wake): Rename to ...
3414         (__lll_unlock_wake): ... this.  %esi contains private argument.
3415         Don't compile in for libc.so.
3416         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
3417         kernel-features.h and lowlevellock.h.
3418         (LOAD_FUTEX_WAIT): Define.
3419         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
3420         (__lll_robust_mutex_lock_wait): Rename to ...
3421         (__lll_robust_lock_wait): ... this.  %esi argument contains private.
3422         Use LOAD_FUTEX_WAIT macro.
3423         (__lll_robust_mutex_timedlock_wait): Rename to ...
3424         (__lll_robust_timedlock_wait): ... this. %esi argument contains
3425         private, use LOAD_FUTEX_WAIT macro.
3426         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
3427         lowlevellock.h.
3428         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3429         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
3430         PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
3431         __lll_lock_wait and __lll_unlock_wake.
3432         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
3433         Include lowlevellock.h and pthread-errnos.h.
3434         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3435         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
3436         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
3437         pass LLL_SHARED in %esi to both __lll_lock_wait and
3438         __lll_unlock_wake.
3439         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
3440         Include lowlevellock.h and pthread-errnos.h.
3441         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
3442         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
3443         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
3444         pass LLL_SHARED in %esi to both __lll_lock_wait and
3445         __lll_unlock_wake.
3446         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
3447         Include lowlevellock.h.
3448         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3449         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
3450         pass LLL_SHARED in %esi to both __lll_lock_wait and
3451         __lll_unlock_wake.
3452         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
3453         Include lowlevellock.h.
3454         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3455         (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
3456         to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
3457         and __lll_unlock_wake.
3458         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
3459         Include lowlevellock.h.
3460         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3461         Don't define.
3462         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
3463         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3464         and __lll_unlock_wake.
3465         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3466         Include lowlevellock.h.
3467         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3468         Don't define.
3469         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3470         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3471         and __lll_unlock_wake.
3472         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3473         Include lowlevellock.h.
3474         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3475         Don't define.
3476         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3477         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3478         and __lll_unlock_wake.
3479         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
3480         Include lowlevellock.h.
3481         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3482         Don't define.
3483         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
3484         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3485         and __lll_unlock_wake.
3486         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
3487         Include lowlevellock.h.
3488         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3489         Don't define.
3490         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3491         pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
3492         and __lll_unlock_wake.
3493         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
3494         lowlevellock.h.
3495         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
3496         define.
3497         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
3498         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
3499         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
3500         lowlevellock.h.
3501         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3502         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
3503         lowlevellock.h.
3504         (LOCK): Don't define.
3505         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
3506         lowlevellock.h.
3507         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3508         * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
3509         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
3510         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
3511         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
3512         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
3513         (__lll_lock_wait_private): New function.
3514         (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
3515         it to lll_futex_*wait.  Don't compile in for libc.so.
3516         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
3517         Remove.
3518         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
3519         (struct sparc_pthread_barrier): Remove.
3520         (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
3521         struct sparc_pthread_barrier.  Pass
3522         ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
3523         and lll_futex_wait macros.
3524         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3525         Remove.
3526         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3527         Include sparc pthread_barrier_wait.c instead of generic one.
3529 2007-07-30  Jakub Jelinek  <jakub@redhat.com>
3531         * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
3533         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
3534         (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
3535         %ecx.
3536         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
3537         (pthread_rwlock_timedwrlock): Likewise.
3538         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
3539         (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
3541 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
3543         * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
3545 2007-07-26  Jakub Jelinek  <jakub@redhat.com>
3547         * tst-locale2.c (useless): Add return statement.
3549 2007-07-24  Jakub Jelinek  <jakub@redhat.com>
3551         * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
3552         lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
3553         * pthread_create.c (start_thread): Likewise.
3554         * init.c (sighandler_setxid): Likewise.
3555         * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3556         * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3557         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3558         * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3559         * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3560         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3561         * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3562         * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3563         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
3564         Likewise.
3565         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
3566         Likewise.
3567         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
3568         Likewise.
3569         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
3570         __rtld_notify): Likewise.
3571         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
3572         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
3573         __pthread_once): Likewise.
3574         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
3575         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3576         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3577         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3578         (lll_futex_wait): Add private argument, define as wrapper around
3579         lll_futex_timed_wait.
3580         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3581         use __lll_private_flag macro.
3582         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3583         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3584         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
3585         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3586         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3587         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3588         (lll_futex_wait): Add private argument, define as wrapper around
3589         lll_futex_timed_wait.
3590         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3591         use __lll_private_flag macro.
3592         (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
3593         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3594         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
3595         Define.
3596         (lll_futex_timed_wait, lll_futex_wake): Use it.
3597         (lll_private_futex_wait, lll_private_futex_timed_wait,
3598         lll_private_futex_wake): Removed.
3599         * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
3600         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3601         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3602         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3603         (lll_futex_wait): Add private argument, define as wrapper around
3604         lll_futex_timed_wait.
3605         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3606         use __lll_private_flag macro.
3607         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3608         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3609         to lll_futex_*.
3610         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3611         (lll_private_futex_wait, lll_private_futex_timed_wait,
3612         lll_private_futex_wake): Removed.
3613         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
3614         Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
3615         (lll_private_futex_wait, lll_private_futex_timed_wait,
3616         lll_private_futex_wake): Removed.
3617         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
3618         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3619         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3620         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3621         (lll_futex_wait): Add private argument, define as wrapper around
3622         lll_futex_timed_wait.
3623         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3624         use __lll_private_flag macro.
3625         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3626         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3627         to lll_futex_*.
3628         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
3629         Define.
3630         (lll_futex_timed_wait, lll_futex_wake): Use it.
3631         (lll_private_futex_wait, lll_private_futex_timed_wait,
3632         lll_private_futex_wake): Removed.
3634 2007-07-27  Jakub Jelinek  <jakub@redhat.com>
3636         * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
3637         of the structure for sparc32.
3639 2007-07-26  Aurelien Jarno  <aurelien@aurel32.net>
3641         * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
3643 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
3645         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3646         code used when private futexes are assumed.
3647         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3648         Likewise.
3650 2007-07-23  Jakub Jelinek  <jakub@redhat.com>
3652         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3653         (__lll_private_flag): Define.
3654         (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
3655         (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
3656         __lll_private_flag.
3657         (lll_private_futex_wait, lll_private_futex_timedwait,
3658         lll_private_futex_wake): Define as wrapper around non-_private
3659         macros.
3660         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3661         (__lll_private_flag): Define.
3662         (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
3663         (lll_private_futex_wait, lll_private_futex_timedwait,
3664         lll_private_futex_wake): Define as wrapper around non-_private
3665         macros.
3667 2007-07-10  Steven Munroe  <sjmunroe@us.ibm.com>
3669         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
3670         parameter to lll_futex_wait call.
3671         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
3673         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3674         Replace lll_futex_wait with lll_private_futex_wait.
3675         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3676         Add LLL_SHARED parameter to lll_futex_wake().
3678         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
3679         LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
3680         lll_private_futex_wake.
3681         (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
3682         bit from private parm before syscall.
3683         (lll_futex_timed_wait): Likewise.
3684         (lll_futex_wake): Likewise.
3685         (lll_futex_wake_unlock): Likewise.
3686         (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
3687         (lll_robust_mutex_unlock): Likewise.
3688         (lll_mutex_unlock_force): Likewise.
3689         (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
3691 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
3693         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3694         compilation when unconditionally using private futexes.
3695         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3696         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3697         Likewise.
3698         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3699         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3701 2007-07-17  Jakub Jelinek  <jakub@redhat.com>
3703         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
3704         Define.
3706 2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3708         * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
3709         kernel-features.h.
3711 2007-05-16  Roland McGrath  <roland@redhat.com>
3713         * init.c (__nptl_initial_report_events): New variable.
3714         (__pthread_initialize_minimal_internal): Initialize pd->report_events
3715         to that.
3717 2007-06-22  Jakub Jelinek  <jakub@redhat.com>
3719         * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
3720         cpusetsize if pthread_getaffinity_np failed with ENOSYS.
3722 2007-06-19  Ulrich Drepper  <drepper@redhat.com>
3724         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
3725         implementation.
3727 2007-06-18  Ulrich Drepper  <drepper@redhat.com>
3729         * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
3730         * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
3731         * pthread_mutex_timedlock.c: Likewise.
3732         * pthread_mutex_trylock.c: Likewise.
3733         * pthread_mutex_unlock.c: Likewise.
3735 2007-06-17  Andreas Schwab  <schwab@suse.de>
3737         * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
3738         sections.
3740 2007-06-17  Ulrich Drepper  <drepper@redhat.com>
3742         * allocatestack.c (allocate_stack): Make code compile if
3743         __ASSUME_PRIVATE_FUTEX is set.
3745 2007-06-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3747         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
3748         (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
3749         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
3750         (__pthread_rwlock_wrlock): Likewise.
3751         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
3752         (pthread_rwlock_timedrdlock): Likewise.
3753         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
3754         (pthread_rwlock_timedwrlock): Likewise.
3755         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
3756         (__pthread_rwlock_unlock): Likewise.
3758 2007-06-10  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3760         * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
3761         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
3762         Split __flags into __flags, __shared, __pad1 and __pad2.
3763         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
3764         futexes if they are available.
3765         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
3766         in libc-lowlevellock.S allow using private futexes.
3767         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
3768         FUTEX_PRIVATE_FLAG.  Add additional parameter to lll_futex_wait,
3769         lll_futex_timed_wait and lll_futex_wake.  Change lll_futex_wait
3770         to call lll_futex_timed_wait.  Add lll_private_futex_wait,
3771         lll_private_futex_timed_wait and lll_private_futex_wake.
3772         (lll_robust_mutex_unlock): Fix typo.
3773         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
3774         field in futex command setup.
3775         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
3776         COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
3777         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
3778         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
3779         if they are available.  Remove clear_once_control.
3780         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
3781         futexes if they are available.
3782         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3783         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3784         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
3785         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3786         * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
3787         Wake only when there are waiters.
3788         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
3789         support.  Indicate that there are waiters.  Remove unnecessary
3790         extra cancellation test.
3791         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.  Removed
3792         left-over duplication of __sem_wait_cleanup.
3794 2007-06-07  Ulrich Drepper  <drepper@redhat.com>
3796         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
3797         parameter to lll_futex_wait, lll_futex_timed_wait, and
3798         lll_futex_wake.  Change lll_futex_wait to call lll_futex_timed_wait.
3799         Add lll_private_futex_wait, lll_private_futex_timed_wait, and
3800         lll_private_futex_wake.
3801         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3802         * allocatestack.c: Adjust use of lll_futex_* macros.
3803         * init.c: Likewise.
3804         * lowlevellock.h: Likewise.
3805         * pthread_barrier_wait.c: Likewise.
3806         * pthread_cond_broadcast.c: Likewise.
3807         * pthread_cond_destroy.c: Likewise.
3808         * pthread_cond_signal.c: Likewise.
3809         * pthread_cond_timedwait.c: Likewise.
3810         * pthread_cond_wait.c: Likewise.
3811         * pthread_create.c: Likewise.
3812         * pthread_mutex_lock.c: Likewise.
3813         * pthread_mutex_setprioceiling.c: Likewise.
3814         * pthread_mutex_timedlock.c: Likewise.
3815         * pthread_mutex_unlock.c: Likewise.
3816         * pthread_rwlock_timedrdlock.c: Likewise.
3817         * pthread_rwlock_timedwrlock.c: Likewise.
3818         * pthread_rwlock_unlock.c: Likewise.
3819         * sysdeps/alpha/tls.h: Likewise.
3820         * sysdeps/i386/tls.h: Likewise.
3821         * sysdeps/ia64/tls.h: Likewise.
3822         * sysdeps/powerpc/tls.h: Likewise.
3823         * sysdeps/pthread/aio_misc.h: Likewise.
3824         * sysdeps/pthread/gai_misc.h: Likewise.
3825         * sysdeps/s390/tls.h: Likewise.
3826         * sysdeps/sh/tls.h: Likewise.
3827         * sysdeps/sparc/tls.h: Likewise.
3828         * sysdeps/unix/sysv/linux/fork.c: Likewise.
3829         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
3830         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
3831         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
3832         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
3833         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
3834         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
3835         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3836         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
3837         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
3838         Likewise.
3839         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
3840         * sysdeps/x86_64/tls.h: Likewise.
3842 2007-05-29  Ulrich Drepper  <drepper@redhat.com>
3844         * pthread_getattr_np.c: No need to install a cancellation handler,
3845         this is no cancellation point.
3846         * pthread_getschedparam.c: Likewise.
3847         * pthread_setschedparam.c: Likewise.
3848         * pthread_setschedprio.c: Likewise.
3849         * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
3850         lll_unlock_wake_cb.
3851         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3852         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3853         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
3854         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3855         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3856         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3857         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
3858         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
3859         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3860         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
3861         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3862         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3864         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
3865         whether there are more than one thread makes no sense here since
3866         we only call the slow path if the locks are taken.
3867         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
3869         * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
3870         COND_NWAITERS_SHIFT.
3871         * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
3872         COND_CLOCK_BITS.
3873         * pthread_cond_init.c: Likewise.
3874         * pthread_cond_timedwait.c: Likewise.
3875         * pthread_cond_wait.c: Likewise.
3876         * pthread_condattr_getclock.c: Likewise.
3877         * pthread_condattr_setclock.c: Likewise.
3878         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
3879         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3880         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
3881         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3882         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3884 2007-05-28  Jakub Jelinek  <jakub@redhat.com>
3886         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
3887         unistd.h.
3889         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
3890         insn suffix.
3891         (THREAD_GSCOPE_GET_FLAG): Remove.
3892         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
3893         * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
3894         changes.
3895         * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
3896         (THREAD_GSCOPE_GET_FLAG): Remove.
3897         (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
3898         instead of THREAD_GSCOPE_GET_FLAG.
3899         (THREAD_GSCOPE_SET_FLAG): Likewise.  Add atomic_write_barrier after
3900         it.
3901         * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3902         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3903         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3904         THREAD_GSCOPE_WAIT): Define.
3905         * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3906         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3907         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3908         THREAD_GSCOPE_WAIT): Define.
3909         * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3910         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3911         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3912         THREAD_GSCOPE_WAIT): Define.
3913         * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3914         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3915         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3916         THREAD_GSCOPE_WAIT): Define.
3918 2007-05-24  Richard Henderson  <rth@redhat.com>
3920         * descr.h (struct pthread): Add header.gscope_flag.
3921         * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
3922         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
3923         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
3924         THREAD_GSCOPE_WAIT): Define.
3926 2007-05-27  Ulrich Drepper  <drepper@redhat.com>
3928         * init.c: Make it compile with older kernel headers.
3930         * tst-initializers1.c: Show through exit code which test failed.
3932         * pthread_rwlock_init.c: Also initialize __shared field.
3933         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
3934         element in rwlock structure into four byte elements.  One of them is
3935         the new __shared element.
3936         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
3937         Likewise.
3938         [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
3939         __shared, adjust names of other padding elements.
3940         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3941         * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
3942         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
3943         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
3944         FUTEX_PRIVATE_FLAG.
3945         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
3946         futex to use private operations if possible.
3947         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3948         Likewise.
3949         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3950         Likewise.
3951         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3952         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3953         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3954         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3955         Likewise.
3956         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3957         Likewise.
3958         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3959         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3961 2007-05-26  Ulrich Drepper  <drepper@redhat.com>
3963         * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
3964         * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
3965         * pthread_rwlock_timedrdlock.c: Likewise.
3966         * pthread_rwlock_tryrdlock.c: Likewise.
3968         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
3969         optimization.
3971         * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
3972         * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
3973         duplication of __sem_wait_cleanup.
3975         * allocatestack.c: Revert last change.
3976         * init.c: Likewise.
3977         * sysdeps/i386/tls.h: Likewise.
3978         * sysdeps/x86_64/tls.h: Likewise.
3979         * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
3980         header structure.
3981         * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
3983         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
3984         Add private field.
3985         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
3986         * pthread_barrier_init.c: Set private flag if pshared and private
3987         futexes are supported.
3988         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
3989         private field in futex command setup.
3990         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3992 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
3994         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
3995         support.
3996         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
3997         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
3998         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3999         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4000         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4002         * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
4003         * sem_init.c (__new_sem_init): Rewrite to initialize all three
4004         fields in the structure.
4005         (__old_sem_init): New function.
4006         * sem_open.c: Initialize all fields of the structure.
4007         * sem_getvalue.c: Adjust for renamed element.
4008         * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
4009         (gen-as-const-headers): Add structsem.sym.
4010         * sysdeps/unix/sysv/linux/structsem.sym: New file.
4011         * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
4012         struct new_sem.  Add struct old_sem.
4013         * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
4014         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
4015         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
4016         * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
4017         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4018         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4019         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
4020         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4021         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4022         * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
4023         * tst-sem10.c: New file.
4024         * tst-sem11.c: New file.
4025         * tst-sem12.c: New file.
4026         * tst-typesizes.c: Test struct new_sem and struct old_sem instead
4027         of struct sem.
4029 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
4030             Jakub Jelinek  <jakub@redhat.com>
4032         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
4033         Move __pthread_enable_asynccancel right before futex syscall.
4034         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
4035         Likewise.
4037 2007-05-24  Jakub Jelinek  <jakub@redhat.com>
4039         * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
4040         THREAD_COPY_PRIVATE_FUTEX): Define.
4041         * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
4042         THREAD_COPY_PRIVATE_FUTEX): Define.
4043         * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
4044         * init.c (__pthread_initialize_minimal_internal): Use
4045         THREAD_SET_PRIVATE_FUTEX.
4047         * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
4048         (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
4049         THREAD_GSCOPE_FLAG_WAIT): Define.
4050         (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
4051         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
4052         * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
4053         PTR_DEMANGLE.
4054         (THREAD_GSCOPE_GET_FLAG): Define.
4055         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
4056         * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
4057         instead of ->header.gscope_flag directly.
4059 2007-05-23  Ulrich Drepper  <drepper@redhat.com>
4061         * init.c (__pthread_initialize_minimal_internal): Check whether
4062         private futexes are available.
4063         * allocatestack.c (allocate_stack): Copy private_futex field from
4064         current thread into the new stack.
4065         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
4066         futexes if they are available.
4067         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
4068         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
4069         in libc-lowlevellock.S allow using private futexes.
4070         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4071         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
4072         FUTEX_PRIVATE_FLAG.
4073         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
4074         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
4075         if they are available.
4076         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
4077         * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
4078         * sysdeps/i386/tcb-offsets.sym: Likewise.
4079         * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
4080         * sysdeps/i386/tls.h (tcbhead_t): Likewise.
4082 2007-05-21  Ulrich Drepper  <drepper@redhat.com>
4084         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
4085         Remove ptr_wait_lookup_done again.
4086         * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
4087         (__pthread_initialize_minimal_internal): Initialize
4088         _dl_wait_lookup_done pointer in _rtld_global directly.
4089         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
4090         Remove code to code _dl_wait_lookup_done.
4091         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
4092         encrypted for now.
4094 2007-05-21  Jakub Jelinek  <jakub@redhat.com>
4096         * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
4097         pthread_mutex_init failed with ENOTSUP.
4099 2007-05-19  Ulrich Drepper  <drepper@redhat.com>
4101         * allocatestack.c (__wait_lookup_done): New function.
4102         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
4103         Add ptr_wait_lookup_done.
4104         * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
4105         * pthreadP.h: Declare __wait_lookup_done.
4106         * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
4107         Define macros to implement reference handling of global scope.
4108         * sysdeps/x86_64/tls.h: Likewise.
4109         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
4110         Initialize GL(dl_wait_lookup_done).
4112 2007-05-17  Ulrich Drepper  <drepper@redhat.com>
4114         [BZ #4512]
4115         * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
4116         is detected.
4117         * pthread_mutex_timedlock.c: Likewise.
4118         * pthread_mutex_trylock.c: Likewise.
4119         Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
4121         * Makefile (tests): Add tst-robust9 and tst-robustpi9.
4122         * tst-robust9.c: New file.
4123         * tst-robustpi9.c: New file.
4125         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
4126         unnecessary extra cancellation test.
4128 2007-05-14  Ulrich Drepper  <drepper@redhat.com>
4130         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
4131         extra cancellation test.
4132         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4134 2007-05-10  Ulrich Drepper  <drepper@redhat.com>
4136         * descr.h (struct pthread): Rearrange members to fill hole in
4137         64-bit layout.
4139         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4140         (__pthread_setaffinity_new): If syscall was successful and
4141         RESET_VGETCPU_CACHE is defined, use it before returning.
4142         * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
4144 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
4146         [BZ #4455]
4147         * tst-align2.c: Include stackinfo.h.
4148         * tst-getpid1.c: Likewise.
4150 2007-05-02  Carlos O'Donell  <carlos@systemhalted.org>
4152         [BZ #4455]
4153         * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
4154         * tst-getpid1.c (do_test): Likewise.
4156         [BZ #4456]
4157         * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
4158         (allocate_stack): Likewise.
4160 2007-05-07  Ulrich Drepper  <drepper@redhat.com>
4162         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
4163         (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
4164         (__lll_robust_timedlock_wait): Likewise.
4165         Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
4167 2007-05-06  Mike Frysinger  <vapier@gentoo.org>
4169         [BZ #4465]
4170         * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
4171         * tst-cancel4.c (tf_fdatasync): New test.
4173 2007-04-27  Ulrich Drepper  <drepper@redhat.com>
4175         [BZ #4392]
4176         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
4177         check mutexes like normal mutexes.
4179         [BZ #4306]
4180         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
4181         Initialize the whole sigevent structure to appease valgrind.
4183 2007-04-25  Ulrich Drepper  <drepper@redhat.com>
4185         * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
4186         * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
4188 2007-04-06  Ulrich Drepper  <drepper@redhat.com>
4190         * tst-locale1.c: Avoid warnings.
4191         * tst-locale2.c: Likewise.
4193 2007-03-19  Steven Munroe  <sjmunroe@us.ibm.com>
4195         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4196         (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
4198 2007-03-16  Jakub Jelinek  <jakub@redhat.com>
4200         * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
4201         __extern_always_inline where appropriate.
4202         * sysdeps/pthread/pthread.h: Likewise.
4204 2007-03-13  Richard Henderson  <rth@redhat.com>
4206         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
4207         separate cfi regions for the two subsections.
4209 2007-02-25  Ulrich Drepper  <drepper@redhat.com>
4211         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
4212         new thread, don't just decrement it.
4213         Patch by Suzuki K P <suzuki@in.ibm.com>.
4215 2007-02-21  Ulrich Drepper  <drepper@redhat.com>
4217         * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
4218         PTHFCT_CALL definition.
4220 2007-02-18  Ulrich Drepper  <drepper@redhat.com>
4222         * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
4223         available, don't use it.
4225 2007-02-09  Jakub Jelinek  <jakub@redhat.com>
4227         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4228         (__lll_mutex_timedlock_wait): Use correct pointer when we don't
4229         call into the kernel to delay.
4231 2007-01-18  Ulrich Drepper  <drepper@redhat.com>
4233         * tst-initializers1.c: We want to test the initializers as seen
4234         outside of libc, so undefined _LIBC.
4236         * pthread_join.c (cleanup): Avoid warning.
4238 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
4240         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4241         (__lll_timedwait_tid): Add unwind info.
4243         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
4244         function table, mangle the pointers.
4245         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
4246         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
4247         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
4248         demangle pointers before use.
4249         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
4250         demangle pointer.
4251         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
4252         * sysdeps/pthread/setxid.h: Likewise.
4254 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
4256         * tst-rwlock7.c: Show some more information in case of correct
4257         behavior.
4259 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
4261         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4262         (lll_futex_timed_wait): Undo part of last change, don't negate
4263         return value.
4265 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
4267         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
4268         FUTEX_CMP_REQUEUE and lll_futex_requeue.
4270 2006-12-28  David S. Miller  <davem@davemloft.net>
4272         * shlib-versions: Fix sparc64 linux target specification.
4274 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
4276         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
4277         Adjust include path for pthread_barrier_wait.c move.
4279 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
4281         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
4282         tid isn't reread from pd->tid in between ESRCH test and the syscall.
4284 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
4286         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
4287         6 argument cancellable syscalls.
4288         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
4289         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
4290         6 argument cancellable syscalls.
4291         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
4293 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
4295         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
4296         (__rtld_mrlock_initialize): Add missing closing parenthesis.
4298 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
4300         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
4301         __sync_lock_release instead of __sync_lock_release_si.
4303 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
4305         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
4306         Define.
4307         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
4308         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
4309         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4310         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4311         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4312         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4313         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4314         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4315         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4316         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4317         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4319 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
4321         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
4322         * pthread_barrier_wait.c: ...here.
4323         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
4324         * pthread_cond_broadcast.c: ...here.
4325         * sysdeps/pthread/pthread_cond_signal.c: Move to...
4326         * pthread_cond_signal.c: ...here.
4327         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
4328         * pthread_cond_timedwait.c: ...here.
4329         * sysdeps/pthread/pthread_cond_wait.c: Move to...
4330         * pthread_cond_wait.c: ...here.
4331         * sysdeps/pthread/pthread_once.c: Move to...
4332         * pthread_once.c: ...here.
4333         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
4334         * pthread_rwlock_rdlock.c: ...here.
4335         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
4336         * pthread_rwlock_timedrdlock.c: ...here.
4337         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
4338         * pthread_rwlock_timedwrlock.c: ...here.
4339         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
4340         * pthread_rwlock_unlock.c: ...here.
4341         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
4342         * pthread_rwlock_wrlock.c: ...here.
4343         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
4344         * pthread_spin_destroy.c: ...here.
4345         * sysdeps/pthread/pthread_spin_init.c: Move to...
4346         * pthread_spin_init.c: ...here.
4347         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
4348         * pthread_spin_unlock.c: ...here.
4349         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
4350         * pthread_getcpuclockid.c: ...here.
4352         * init.c: USE_TLS support is now always enabled.
4353         * tst-tls5.h: Likewise.
4354         * sysdeps/alpha/tls.h: Likewise.
4355         * sysdeps/i386/tls.h: Likewise.
4356         * sysdeps/ia64/tls.h: Likewise.
4357         * sysdeps/powerpc/tls.h: Likewise.
4358         * sysdeps/s390/tls.h: Likewise.
4359         * sysdeps/sh/tls.h: Likewise.
4360         * sysdeps/sparc/tls.h: Likewise.
4361         * sysdeps/x86_64/tls.h: Likewise.
4363 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
4365         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
4366         __rtld_mrlock_change): Update oldval if atomic compare and exchange
4367         failed.
4369         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4370         Define to THREAD_SELF->header.multiple_threads.
4371         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
4372         Likewise.
4373         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
4374         Likewise.
4375         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
4376         (SINGLE_THREAD_P): Likewise.
4377         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
4378         (SINGLE_THREAD_P): Likewise.
4379         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4380         (SINGLE_THREAD_P): Likewise.
4381         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
4382         (SINGLE_THREAD_P): Likewise.
4383         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
4384         Likewise.
4385         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
4386         (SINGLE_THREAD_P): Likewise.
4387         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
4388         (SINGLE_THREAD_P): Likewise.
4389         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
4390         Likewise.
4392 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
4394         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
4395         by default rather than 2_3_3.
4397 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
4399         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
4400         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
4401         atomic_* instead of catomic_* macros.
4403 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
4405         [BZ #3285]
4406         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
4407         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
4408         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4409         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4410         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4411         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
4412         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4413         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4414         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4415         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
4416         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4417         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4418         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4420 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
4422         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
4423         cancelable syscalls with six parameters.
4425         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
4426         operations instead of atomic_*.
4428 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
4430         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
4432 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
4434         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
4435         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
4436         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
4437         New file.
4438         * pthread_attr_setstack.c: Allow overwriting the version number of the
4439         new symbol.
4440         * pthread_attr_setstacksize.c: Likewise.
4441         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
4442         it.
4443         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
4444         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
4446 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
4448         [BZ #3251]
4449         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
4450         Patch by Petr Baudis.
4452 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
4454         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
4456         * tst-cancel2.c (tf): Loop as long as something was written.
4458 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4460         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
4461         mutexes wake all mutexes.
4462         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
4463         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
4464         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4466 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
4468         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
4469         to guarantee the thread is always canceled.
4471 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
4473         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
4474         Include stdlib.h.
4475         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
4476         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
4477         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4478         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4479         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4481 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
4483         [BZ #3123]
4484         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
4485         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
4486         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4487         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4488         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4489         * Makefile (tests): Add tst-cond22.
4490         * tst-cond22.c: New file.
4492 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
4494         [BZ #3124]
4495         * descr.h (struct pthread): Add parent_cancelhandling.
4496         * sysdeps/pthread/createthread.c (create_thread): Pass parent
4497         cancelhandling value to child.
4498         * pthread_create.c (start_thread): If parent thread was canceled
4499         reset the SIGCANCEL mask.
4500         * Makefile (tests): Add tst-cancel25.
4501         * tst-cancel25.c: New file.
4503 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
4504             Ulrich Drepper  <drepper@redhat.com>
4506         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
4507         counterp if it is already zero.
4508         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
4510 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
4511             Roland McGrath  <roland@redhat.com>
4513         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4514         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4515         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
4516         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4517         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4518         lll_robust_mutex_timedlock, lll_mutex_unlock,
4519         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4520         Add _L_*_ symbols around the subsection.
4521         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
4522         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
4524 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
4525             Roland McGrath  <roland@redhat.com>
4527         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4528         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4529         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
4530         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4531         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4532         lll_robust_mutex_timedlock, lll_mutex_unlock,
4533         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4534         Add _L_*_ symbols around the subsection.
4535         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
4536         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
4538 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
4540         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
4541         change because it can disturb too much existing code.  If real hard
4542         reader preference is needed we'll introduce another type.
4543         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4544         (pthread_rwlock_timedwrlock): Likewise.
4545         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4546         Likewise.
4548 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
4550         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
4551         reader preference.
4552         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4553         (pthread_rwlock_timedwrlock): Likewise.
4554         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4555         Likewise.
4557 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
4559         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
4560         Only define ifdef SHARED.
4562 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
4564         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
4565         (free_stacks): ...here.
4566         (__free_stack_cache): New function.
4567         * pthreadP.h: Declare __free_stack_cache.
4568         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
4569         ptr_freeres.
4570         * init.c (pthread_functions): Initialize ptr_freeres.
4571         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
4572         New freeres function.
4574 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
4576         [BZ #3018]
4577         * Makefile (extra-objs): Add modules to extra-test-objs instead.
4579 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
4581         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4582         _XOPEN_REALTIME_THREADS.
4584 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
4586         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
4587         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
4588         HAVE_CLOCK_GETTIME_VSYSCALL.
4589         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
4591 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
4593         * sysdeps/unix/sysv/linux/bits/posix_opt.h
4594         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
4595         * descr.h (struct priority_protection_data): New type.
4596         (struct pthread): Add tpp field.
4597         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
4598         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
4599         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
4600         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
4601         TPP mutexes.
4602         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
4603         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
4604         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
4605         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
4606         * tpp.c: New file.
4607         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
4608         boosted by TPP.
4609         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
4610         * pthread_mutexattr_getprioceiling.c
4611         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
4612         in the SCHED_FIFO priority range.
4613         * pthread_mutexattr_setprioceiling.c
4614         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
4615         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
4616         if mutex is not TPP.  Ceiling is now in __data.__lock.
4617         * pthread_mutex_setprioceiling.c: Include stdbool.h.
4618         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
4619         is now in __data.__lock.  Add locking.
4620         * pthread_create.c (__free_tcb): Free pd->tpp structure.
4621         * Makefile (libpthread-routines): Add tpp.
4622         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
4623         * tst-tpp.h: New file.
4624         * tst-mutexpp1.c: New file.
4625         * tst-mutexpp6.c: New file.
4626         * tst-mutexpp10.c: New file.
4627         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
4628         * tst-mutex6.c (TEST_FUNCTION): Likewise.
4630 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
4632         [BZ #2843]
4633         * pthread_join.c (pthread_join): Account for self being canceled
4634         when checking for deadlocks.
4635         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
4636         (tf1): Don't print anything after pthread_join returns, this would be
4637         another cancellation point.
4638         (tf2): Likewise.
4639         * tst-join6.c: New file.
4640         * Makefile (tests): Add tst-join6.
4642 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
4644         [BZ #2892]
4645         * pthread_setspecific.c (__pthread_setspecific): Check
4646         out-of-range index before checking for unused key.
4648         * sysdeps/pthread/gai_misc.h: New file.
4650 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
4652         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
4653         file.  Don't use sysctl.
4654         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
4655         overwrite the file if this is likely not true.
4657 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
4659         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
4660         * Makefile (tests): Add tst-getpid3.
4661         * tst-getpid3.c: New file.
4663 2006-07-30  Roland McGrath  <roland@redhat.com>
4665         * Makefile (libpthread-routines): Add ptw-sigsuspend.
4667         * sysdeps/unix/sysv/linux/i386/not-cancel.h
4668         (pause_not_cancel): New macro.
4669         (nanosleep_not_cancel): New macro.
4670         (sigsuspend_not_cancel): New macro.
4671         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
4672         nanosleep_not_cancel macro from <not-cancel.h>.
4673         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
4674         macro from <not-cancel.h>.
4676 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
4677             Jakub Jelinek  <jakub@redhat.com>
4679         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
4680         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
4681         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
4682         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
4683         * pthread_mutex_init.c: Add support for priority inheritance mutex.
4684         * pthread_mutex_lock.c: Likewise.
4685         * pthread_mutex_timedlock.c: Likewise.
4686         * pthread_mutex_trylock.c: Likewise.
4687         * pthread_mutex_unlock.c: Likewise.
4688         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
4689         all mutexes.
4690         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
4691         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
4692         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
4693         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
4694         pthread-pi-defines.sym.
4695         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
4696         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
4697         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4698         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
4699         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4700         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4701         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4702         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
4703         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
4704         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4705         _POSIX_THREAD_PRIO_INHERIT to 200112L.
4706         * tst-mutex1.c: Adjust to allow use in PI mutex test.
4707         * tst-mutex2.c: Likewise.
4708         * tst-mutex3.c: Likewise.
4709         * tst-mutex4.c: Likewise.
4710         * tst-mutex5.c: Likewise.
4711         * tst-mutex6.c: Likewise.
4712         * tst-mutex7.c: Likewise.
4713         * tst-mutex7a.c: Likewise.
4714         * tst-mutex8.c: Likewise.
4715         * tst-mutex9.c: Likewise.
4716         * tst-robust1.c: Likewise.
4717         * tst-robust7.c: Likewise.
4718         * tst-robust8.c: Likewise.
4719         * tst-mutexpi1.c: New file.
4720         * tst-mutexpi2.c: New file.
4721         * tst-mutexpi3.c: New file.
4722         * tst-mutexpi4.c: New file.
4723         * tst-mutexpi5.c: New file.
4724         * tst-mutexpi6.c: New file.
4725         * tst-mutexpi7.c: New file.
4726         * tst-mutexpi7a.c: New file.
4727         * tst-mutexpi8.c: New file.
4728         * tst-mutexpi9.c: New file.
4729         * tst-robust1.c: New file.
4730         * tst-robust2.c: New file.
4731         * tst-robust3.c: New file.
4732         * tst-robust4.c: New file.
4733         * tst-robust5.c: New file.
4734         * tst-robust6.c: New file.
4735         * tst-robust7.c: New file.
4736         * tst-robust8.c: New file.
4737         * Makefile (tests): Add the new tests.
4739         * pthread_create.c (start_thread): Add some casts to avoid warnings.
4740         * pthread_mutex_destroy.c: Remove unneeded label.
4742 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
4744         * pthread_mutex_init.c (__pthread_mutex_init): Move some
4745         computations to compile time.
4747 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
4749         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
4751 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
4753         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
4755 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
4757         * pthread_key_create.c (__pthread_key_create): Do away with
4758         __pthread_keys_lock.
4760         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4761         (__kernel_cpumask_size): Mark as hidden.
4762         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4764         * sem_open.c (__sem_mappings_lock): Mark as hidden.
4765         * semaphoreP.h (__sem_mappings_lock): Likewise.
4767 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
4769         * pthread_atfork.c: Mark __dso_handle as hidden.
4771 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
4773         [BZ #2644]
4774         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
4775         the reload problem.  Change the one path in pthread_cancel_init
4776         which causes the problem.  Force gcc to reload.  Simplify callers.
4777         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
4778         (_Unwind_GetBSP): Undo last patch.
4780 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
4782         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
4783         function pointer is reloaded after pthread_cancel_init calls.
4785         [BZ #2644]
4786         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
4787         pointers are reloaded after pthread_cancel_init calls.
4789 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
4791         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
4792         __always_inline.
4794 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
4796         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4797         Allocate new object which is passed to timer_sigev_thread so that
4798         the timer can be deleted before the new thread is scheduled.
4800 2006-04-26  Roland McGrath  <roland@redhat.com>
4802         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
4804 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
4806         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
4807         suffix for conditional jumps.
4808         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
4809         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4810         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
4811         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
4812         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4813         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4815         * init.c (sigcancel_handler): Compare with correct PID even if the
4816         thread is in the middle of a fork call.
4817         (sighandler_setxid): Likewise.
4818         Reported by Suzuki K P <suzuki@in.ibm.com> .
4820 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
4822         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
4824 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
4826         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
4827         fails [Coverity CID 105].
4829 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
4831         * sysdeps/pthread/pthread.h: Add nonnull attributes.
4833 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
4835         [BZ #2505]
4836         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
4837         Define __lll_rel_instr using lwsync.
4839 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
4841         * allocatestack.c (allocate_stack): Always initialize robust_head.
4842         * descr.h: Define struct robust_list_head.
4843         (struct pthread): Use robust_list_head in robust mutex list definition.
4844         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
4845         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
4846         (__pthread_initialize_minimal_internal): Register robust_list with
4847         the kernel.
4848         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
4849         Declare __set_robust_list_avail.
4850         * pthread_create.c (start_thread): Register robust_list of new thread.
4851         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
4852         waiters.
4853         * pthread_mutex_destroy.c: For robust mutexes don't look at the
4854         number of users, it's unreliable.
4855         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
4856         set_robust_list syscall is available.
4857         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
4858         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
4859         Set robust_head.list_op_pending before trying to lock a robust mutex.
4860         * pthread_mutex_timedlock.c: Likewise.
4861         * pthread_mutex_trylock.c: Likewise.
4862         * pthread_mutex_unlock.c: Likewise for unlocking.
4863         * Makefile (tests): Add tst-robust8.
4864         * tst-robust8.c: New file.
4866 2006-03-08  Andreas Schwab  <schwab@suse.de>
4868         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
4869         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
4871 2006-03-05  Roland McGrath  <roland@redhat.com>
4873         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
4874         and $config_os doesn't match *linux*.
4876 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
4878         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
4879         Use __syscall_error.
4880         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4881         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
4882         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
4883         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4884         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
4885         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
4887 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
4889         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
4891 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
4893         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
4894         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
4895         mutex.
4896         (__lll_robust_timedlock_wait): Likewise.
4897         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
4898         (__lll_robust_lock_wait): Likewise.
4899         (__lll_robust_timedlock_wait): Likewise.
4900         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
4901         (__lll_robust_lock_wait): Likewise.
4902         (__lll_robust_timedlock_wait): Likewise.
4904 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
4906         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
4907         lll_robust_mutex_trylock, lll_robust_mutex_lock,
4908         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
4909         lll_robust_mutex_unlock): Define.
4910         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
4912 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
4914         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
4915         instead of <clone.S>.
4917 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
4919         * Makefile (libpthread-routines): Add
4920         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
4921         and pthread_mutex_[sg]etprioceiling.
4922         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
4923         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
4924         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
4925         pthread_mutex_setprioceiling.
4926         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
4927         PTHREAD_PRIO_PROTECT): New enum values.
4928         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
4929         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
4930         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
4931         prototypes.
4932         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
4933         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
4934         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
4935         Define.
4936         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
4937         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
4938         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
4939         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
4940         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
4941         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
4942         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
4943         protocol mutexes.
4944         * pthread_mutex_getprioceiling.c: New file.
4945         * pthread_mutex_setprioceiling.c: New file.
4946         * pthread_mutexattr_getprioceiling.c: New file.
4947         * pthread_mutexattr_setprioceiling.c: New file.
4948         * pthread_mutexattr_getprotocol.c: New file.
4949         * pthread_mutexattr_setprotocol.c: New file.
4951 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
4953         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
4955 2006-02-27  Roland McGrath  <roland@redhat.com>
4957         * sysdeps/pthread/Subdirs: List nptl here too.
4958         * configure (libc_add_on_canonical): New variable.
4960         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
4962         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
4963         self to get main source tree's file.
4964         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
4965         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
4966         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
4967         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
4968         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
4969         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
4970         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
4971         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
4972         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
4973         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
4974         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
4975         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
4976         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
4978         * Makefile: Use $(sysdirs) in vpath directive.
4980         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
4981         (CPPFLAGS-timer_routines.c): Likewise.
4983         * Makeconfig (includes): Variable removed.
4985 2006-02-26  Roland McGrath  <roland@redhat.com>
4987         * sysdeps/generic/pt-raise.c: Moved to ...
4988         * pt-raise.c: ... here.
4989         * sysdeps/generic/lowlevellock.h: Moved to ...
4990         * lowlevellock.h: ... here.
4992 2006-02-23  Roland McGrath  <roland@redhat.com>
4994         * descr.h (struct pthread): Add final member `end_padding'.
4995         (PTHREAD_STRUCT_END_PADDING): Use it.
4997 2006-02-20  Roland McGrath  <roland@redhat.com>
4999         * sysdeps/mips: Directory removed, saved in ports repository.
5000         * sysdeps/unix/sysv/linux/mips: Likewise.
5002 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
5004         * tst-robust1.c: Add second mutex to check that the mutex list is
5005         handled correctly.
5007 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
5009         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
5010         lll_robust_mutex_trylock, lll_robust_mutex_lock,
5011         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
5012         lll_robust_mutex_unlock): New macros.
5013         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
5014         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
5015         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5016         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5017         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
5019 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5021         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
5022         definitions.
5023         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
5025 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
5027         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
5028         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
5029         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
5030         (lll_robust_mutex_unlock): Likewise.
5032 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
5034         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
5035         Set robust_list.__next rather than robust_list.
5036         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
5037         (__pthread_list_t): New typedef.
5038         (pthread_mutex_t): Replace __next and __prev fields with __list.
5039         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
5040         (__pthread_list_t): New typedef.
5041         (pthread_mutex_t): Replace __next and __prev fields with __list.
5042         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5043         (__pthread_list_t, __pthread_slist_t): New typedefs.
5044         (pthread_mutex_t): Replace __next and __prev fields with __list.
5045         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
5046         (__pthread_list_t, __pthread_slist_t): New typedefs.
5047         (pthread_mutex_t): Replace __next and __prev fields with __list.
5048         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
5049         (__pthread_list_t, __pthread_slist_t): New typedefs.
5050         (pthread_mutex_t): Replace __next and __prev fields with __list.
5051         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
5052         (__pthread_slist_t): New typedef.
5053         (pthread_mutex_t): Replace __next field with __list.
5055 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
5057         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
5058         PTHREAD_MUTEX_OWNERDEAD.
5059         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
5060         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
5061         * Makefile (libpthread-routines): Add lowlevelrobustlock.
5062         * pthread_create.c (start_thread): Very much simplify robust_list loop.
5063         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
5064         to PTHREAD_MUTEX_INCONSISTENT.
5065         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
5066         * pthread_mutex_lock.c: Reimplement robust mutex handling.
5067         * pthread_mutex_trylock.c: Likewise.
5068         * pthread_mutex_timedlock.c: Likewise.
5069         * pthread_mutex_unlock.c: Likewise.
5070         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
5071         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
5072         lowlevelrobustlock.sym.
5073         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
5074         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
5075         definitions.
5076         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5077         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
5078         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
5079         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
5080         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
5082 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
5084         * allocatestack.c (allocate_stack): Initialize robust_list.
5085         * init.c (__pthread_initialize_minimal_internal): Likewise.
5086         * descr.h (struct xid_command): Pretty printing.
5087         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
5088         robust_list.  Adjust macros.
5089         * pthread_create.c (start_thread): Adjust robust_list handling.
5090         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
5091         but the owner for all robust mutex types.
5092         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
5093         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
5094         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5095         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
5097         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
5098         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
5100 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
5102         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
5103         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
5105 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5107         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
5108         Return status.
5109         (lll_futex_timed_wait): Define.
5111 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
5113         * tst-cancel4.c: Test ppoll.
5115 2006-01-18  Andreas Jaeger  <aj@suse.de>
5117         [BZ #2167]
5118         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
5119         (pthread_mutex_t): Follow changes for other archs.  Based on patch
5120         by Jim Gifford <patches@jg555.com>.
5122 2006-01-13  Richard Henderson  <rth@redhat.com>
5124         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
5126 2006-01-10  Roland McGrath  <roland@redhat.com>
5128         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
5129         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
5130         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
5131         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
5132         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
5133         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
5134         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
5135         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
5136         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
5137         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
5139 2006-01-09  Roland McGrath  <roland@redhat.com>
5141         * tst-initializers1-c89.c: New file.
5142         * tst-initializers1-c99.c: New file.
5143         * tst-initializers1-gnu89.c: New file.
5144         * tst-initializers1-gnu99.c: New file.
5145         * Makefile (tests): Add them.
5146         (CFLAGS-tst-initializers1-c89.c): New variable.
5147         (CFLAGS-tst-initializers1-c99.c): New variable.
5148         (CFLAGS-tst-initializers1-gnu89.c): New variable.
5149         (CFLAGS-tst-initializers1-gnu99.c): New variable.
5151         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
5152         Use __extension__ on anonymous union definition.
5153         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5154         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5155         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5156         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5157         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5159 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
5161         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
5162         Don't give the union a name because it changes the mangled name.
5163         Instead name the struct for __data.
5164         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
5165         Likewise.
5166         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
5167         Likewise.
5169 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
5171         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
5172         stack bias to mc_ftp field.
5174 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
5176         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
5177         being too clever and reloading the futex value where it shouldn't.
5179 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
5181         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
5182         correct type.
5184 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
5186         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
5187         Add cfi directives.
5189 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
5191         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
5192         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
5193         rename in tcbhead_t.
5195         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
5196         Don't give the union a name because it changes the mangled name.
5197         Instead name the struct for __data.
5198         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5199         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5200         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5201         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5202         * pthread_create.c (start_thread): Adjust robust mutex free loop.
5203         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
5205 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
5207         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5208         Return status.
5209         (lll_futex_timed_wait): Define.
5210         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5211         * sysdeps/pthread/aio_misc.h: New file.
5213 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
5215         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
5217 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
5219         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5220         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
5221         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
5223 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
5225         * tst-cancel24.cc: Use C headers instead of C++ headers.
5227 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
5229         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
5230         sparc-linux configured glibc.
5231         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
5232         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
5233         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
5234         atomic_compare_and_exchange_val_24_acq instead of
5235         atomic_compare_and_exchange_val_acq.
5236         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
5237         instead of atomic_exchange_rel.
5238         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
5239         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
5240         file.
5241         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
5242         file.
5243         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
5244         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
5245         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
5246         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
5247         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
5248         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
5249         New file.
5250         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
5251         New file.
5252         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
5253         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
5254         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
5255         file.
5256         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
5257         file.
5258         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
5260 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
5262         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
5263         mutex initializers.
5265 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
5267         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
5268         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5269         THREAD_COPY_POINTER_GUARD): Define.
5270         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
5271         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
5273 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
5275         * version.c: Update copyright year.
5277 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5279         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
5280         .eh_frame section, use cfi_* directives.
5281         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
5283 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
5285         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
5286         now.
5288 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
5290         * sysdeps/pthread/sigaction.c: Removed.
5291         * sigaction.c: New file.
5292         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
5294 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
5296         * Makefile (tests): Add tst-signal7.
5297         * tst-signal7.c: New file.
5299 2005-12-27  Roland McGrath  <roland@redhat.com>
5301         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
5302         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
5303         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
5304         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
5305         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
5306         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
5307         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
5308         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
5309         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
5310         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
5311         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
5313 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
5315         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
5316         and __prev field to pthread_mutex_t.
5317         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5318         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5319         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5320         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5321         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
5322         to pthread_mutex_t.
5324 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
5326         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
5327         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
5328         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
5329         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
5330         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
5331         and PTHREAD_MUTEXATTR_FLAG_BITS.
5332         * descr.h (struct pthread): Add robust_list field and define
5333         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
5334         * pthread_mutexattr_getrobust.c: New file.
5335         * pthread_mutexattr_setrobust.c: New file.
5336         * pthread_mutex_consistent.c: New file.
5337         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
5338         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
5339         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
5340         Adjust pthread_mutex_t initializers.
5341         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
5342         field to pthread_mutex_t.
5343         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
5344         and __prev field to pthread_mutex_t.
5345         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
5346         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
5347         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
5348         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
5349         * pthread_mutexattr_gettype.c: Likewise.
5350         * pthread_mutexattr_setpshared.c: Likewise.
5351         * pthread_mutexattr_settype.c: Likewise.
5352         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
5353         Initialize mutex kind according to robust flag.
5354         * pthread_mutex_lock.c: Implement local robust mutex.
5355         * pthread_mutex_timedlock.c: Likewise.
5356         * pthread_mutex_trylock.c: Likewise.
5357         * pthread_mutex_unlock.c: Likewise.
5358         * pthread_create.c (start_thread): Mark robust mutexes which remained
5359         locked as dead.
5360         * tst-robust1.c: New file.
5361         * tst-robust2.c: New file.
5362         * tst-robust3.c: New file.
5363         * tst-robust4.c: New file.
5364         * tst-robust5.c: New file.
5365         * tst-robust6.c: New file.
5366         * tst-robust7.c: New file.
5367         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
5368         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
5369         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
5370         tst-robust5, tst-robust6, and tst-robust7.
5372         * tst-typesizes.c: New file.
5373         * Makefile (tests): Add tst-typesizes.
5375         * tst-once3.c: More debug output.
5377 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
5379         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
5380         missing after last change.
5382         * version.c: Update copyright year.
5384 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
5386         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
5387         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
5388         * pthread_mutex_trylock.c: Likewise.
5389         * pthread_mutex_timedlock.c: Likewise.
5390         * pthread_mutex_unlock.c: Likewise.
5392 2005-12-22  Roland McGrath  <roland@redhat.com>
5394         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
5395         so that #include_next's search location is not reset to the -I..
5396         directory where <nptl/...> can be found.
5398 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
5400         [BZ #1913]
5401         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5402         Fix unwind info.  Remove useless branch prediction prefix.
5403         * tst-cancel24.cc: New file.
5404         * Makefile: Add rules to build and run tst-cancel24.
5406 2005-12-21  Roland McGrath  <roland@redhat.com>
5408         * libc-cancellation.c: Use <> rather than "" #includes.
5409         * pt-cleanup.c: Likewise.
5410         * pthread_create.c: Likewise.
5411         * pthread_join.c: Likewise.
5412         * pthread_timedjoin.c: Likewise.
5413         * pthread_tryjoin.c: Likewise.
5414         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
5415         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
5416         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
5417         * unwind.c: Likewise.
5419 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5421         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
5422         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
5423         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5424         THREAD_COPY_POINTER_GUARD): Define.
5426 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
5428         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
5429         rather than one.
5430         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5431         THREAD_COPY_POINTER_GUARD): Define.
5432         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
5433         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
5434         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5435         THREAD_COPY_POINTER_GUARD): Define.
5436         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
5437         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
5438         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
5439         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
5440         Use PTR_DEMANGLE for B0 if defined.
5442 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
5444         * pthread_create.c (__pthread_create_2_1): Use
5445         THREAD_COPY_POINTER_GUARD if available.
5446         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
5447         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
5448         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
5449         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
5450         * sysdeps/x86_64/tls.h: Likewise.
5452 2005-12-15  Roland McGrath  <roland@redhat.com>
5454         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
5456 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
5458         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
5459         sysdeps/generic.
5460         * errno-loc.c: New file.
5462 2005-12-12  Roland McGrath  <roland@redhat.com>
5464         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
5465         adjustments before choosing stack size.  Update minimum stack size
5466         calculation to match allocate_stack change.
5468 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
5470         * allocatestack.c (allocate_stack): Don't demand that there is an
5471         additional full page available on the stack beside guard, TLS, the
5472         minimum stack.
5474 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
5476         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5477         (__cleanup_fct_attribute): Use __regparm__ not regparm.
5479         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
5480         compiling 32-bit code we must define __cleanup_fct_attribute.
5482 005-11-24  Jakub Jelinek  <jakub@redhat.com>
5484         [BZ #1920]
5485         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
5486         __attribute__ instead of __attribute.
5487         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5488         (__cleanup_fct_attribute): Likewise.
5490 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
5492         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
5493         a write barrier before writing libgcc_s_getcfa.
5495 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
5497         * sysdeps/unix/sysv/linux/configure: Removed.
5499 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
5501         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
5502         optional init_array/fini_array support.
5504 2005-10-24  Roland McGrath  <roland@redhat.com>
5506         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
5507         versioned_symbol use.
5509 2005-10-16  Roland McGrath  <roland@redhat.com>
5511         * init.c (__pthread_initialize_minimal_internal): Even when using a
5512         compile-time default stack size, apply the minimum that allocate_stack
5513         will require, and round up to page size.
5515 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
5517         * Makefile ($(test-modules)): Remove static pattern rule.
5519 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
5520             Ulrich Drepper  <drepper@redhat.com>
5522         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
5523         alignment in callback function.
5524         * Makefile: Add rules to build and run tst-align3.
5525         * tst-align3.c: New file.
5527 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
5529         * allocatestack.c (setxid_signal_thread): Add
5530         INTERNAL_SYSCALL_DECL (err).
5532 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
5534         * allocatestack.c (setxid_signal_thread): Need to use
5535         atomic_compare_and_exchange_bool_acq.
5537 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
5538             Jakub Jelinek  <jakub@redhat.com>
5540         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
5541         CANCEL_RESTMASK.
5542         (struct pthread): Move specific_used field to avoid padding.
5543         Add setxid_futex field.
5544         * init.c (sighandler_setxid): Reset setxid flag and release the
5545         setxid futex.
5546         * allocatestack.c (setxid_signal_thread): New function.  Broken
5547         out of the bodies of the two loops in __nptl_setxid.  For undetached
5548         threads check whether they are exiting and if yes, don't send a signal.
5549         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
5550         * pthread_create.c (start_thread): For undetached threads, check
5551         whether setxid bit is set.  If yes, wait until signal has been
5552         processed.
5554         * allocatestack.c (STACK_VARIABLES): Initialize them.
5555         * pthread_create.c (__pthread_create_2_1): Initialize pd.
5557 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
5559         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
5560         waiters, awake all waiters on the associated mutex.
5562 2005-09-22  Roland McGrath  <roland@redhat.com>
5564         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
5565         ../sysdeps/x86_64/hp-timing.h).
5567 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
5569         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
5570         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5571         (lll_futex_wake_unlock): Define.
5572         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
5573         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5574         (lll_futex_wake_unlock): Define.
5575         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
5576         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5577         (lll_futex_wake_unlock): Define.
5578         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
5579         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5580         (lll_futex_wake_unlock): Define.
5581         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
5582         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5583         (lll_futex_wake_unlock): Define.
5584         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
5585         lll_futex_wake_unlock.
5586         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
5587         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5588         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5589         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
5590         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5591         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5593 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5595         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5596         Fix typo in register name.
5598 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
5600         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5601         Use __sigfillset.  Document that sigfillset does the right thing wrt
5602         to SIGSETXID.
5604 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
5606         [BZ #1102]
5607         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
5608         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
5609         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
5610         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
5611         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
5612         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
5613         in the structure.
5614         * Makefile (tests): Add tst-initializers1.
5615         (CFLAGS-tst-initializers1.c): Set.
5616         * tst-initializers1.c: New test.
5618 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
5620         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
5621         Make sure __flags are located at offset 48 from the start of the
5622         structure.
5624 2005-07-02  Roland McGrath  <roland@redhat.com>
5626         * Makeconfig: Comment fix.
5628 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
5630         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
5631         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
5632         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
5633         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
5634         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5635         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5636         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
5637         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
5638         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
5639         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5641 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
5643         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
5644         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5645         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
5646         fields.
5647         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5648         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
5649         field.  Put in sysinfo field unconditionally.
5650         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5651         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
5652         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5653         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
5654         fields.
5655         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5656         * pthread_create.c (__pthread_create_2_1): Use
5657         THREAD_COPY_STACK_GUARD macro.
5658         * Makefile: Add rules to build and run tst-stackguard1{,-static}
5659         tests.
5660         * tst-stackguard1.c: New file.
5661         * tst-stackguard1-static.c: New file.
5663 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
5665         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5666         Invoke CGOTSETUP and CGOTRESTORE.
5667         (CGOTSETUP, CGOTRESTORE): Define.
5669 2005-05-29  Richard Henderson  <rth@redhat.com>
5671         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
5672         (tf_write, tf_writev): Use it.
5673         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
5674         the system minimum.
5676 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
5678         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5679         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
5680         __librt_*_asynccancel@local.
5682 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
5684         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
5685         all occurrences of JUMPTARGET.  Instead append @local to labels.
5687 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
5689         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
5690         size/alignment of struct pthread rather than tcbhead_t.
5691         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5692         Likewise.
5693         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5694         Likewise.
5695         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5696         Likewise.
5698 2005-05-19  Richard Henderson  <rth@redhat.com>
5700         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
5701         __sync_val_compare_and_swap, not explicit _si variant.
5702         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
5704 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
5706         [BZ #915]
5707         * sysdeps/pthread/pthread.h: Avoid empty initializers.
5709 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
5711         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
5712         .eh_frame section, use cfi_* directives.
5714 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
5716         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
5717         of "" includes.
5719 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
5721         [BZ #1075]
5722         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
5723         aio_write blocks.
5725 2005-04-27  Roland McGrath  <roland@redhat.com>
5727         * Makefile (tests): Remove tst-clock2.
5729         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
5730         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
5731         translating to the kernel clockid_t for our own process/thread clock.
5733         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
5735 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
5737         * old_pthread_cond_init.c: Include <errno.h>.
5738         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
5739         process shared or uses clock other than CLOCK_REALTIME.
5740         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
5742 2005-04-13  David S. Miller  <davem@davemloft.net>
5744         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
5745         * sysdeps/sparc/sparc64/clone.S: New file.
5747 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
5749         [BZ #1102]
5750         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
5751         __inline instead of inline.
5752         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
5754 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
5756         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
5757         functionally equivalent, but shorter instructions.
5758         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5759         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5760         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5761         Likewise.
5762         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
5763         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5764         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5765         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5766         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5767         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
5768         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5769         Likewise.
5770         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5771         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5772         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5773         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
5774         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
5776 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
5778         * sysdeps/mips/Makefile: New file.
5779         * sysdeps/mips/nptl-sysdep.S: New file.
5780         * sysdeps/mips/tcb-offsets.sym: New file.
5781         * sysdeps/mips/pthread_spin_lock.S: New file.
5782         * sysdeps/mips/pthread_spin_trylock.S: New file.
5783         * sysdeps/mips/pthreaddef.h: New file.
5784         * sysdeps/mips/tls.h: New file.
5785         * sysdeps/mips/jmpbuf-unwind.h: New file.
5786         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
5787         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
5788         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
5789         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
5790         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
5791         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
5792         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
5793         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
5794         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
5795         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
5797 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
5799         [BZ #1112]
5800         * pthread_create.c (__pthread_create_2_1): Rename syscall error
5801         variable to scerr.
5803 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
5805         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
5807 2005-02-25  Roland McGrath  <roland@redhat.com>
5809         * alloca_cutoff.c: Correct license text.
5810         * tst-unload.c: Likewise.
5811         * sysdeps/pthread/allocalim.h: Likewise.
5812         * sysdeps/pthread/pt-initfini.c: Likewise.
5813         * sysdeps/pthread/bits/libc-lock.h: Likewise.
5814         * sysdeps/pthread/bits/sigthread.h: Likewise.
5815         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
5816         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
5818 2005-02-16  Roland McGrath  <roland@redhat.com>
5820         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
5821         Use unsigned int * for ptr_nthreads.
5823 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
5825         [BZ #721]
5826         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
5827         gcc4.
5829 2005-02-07  Richard Henderson  <rth@redhat.com>
5831         [BZ #787]
5832         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
5833         argument.
5835 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
5837         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
5838         order of arguments in invocation of atomic_add_zero.
5840 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
5842         [BZ #737]
5843         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
5844         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
5845         at least gotntpoff relocation and addition.
5846         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
5847         Likewise.
5848         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
5849         Likewise.
5850         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5851         Likewise.
5853 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
5855         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
5856         entry for static tls deallocation fix.
5857         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
5858         also contains information whether the memory pointed to is static
5859         TLS or not.
5860         * sysdeps/i386/tls.h: Likewise.
5861         * sysdeps/ia64/tls.h: Likewise.
5862         * sysdeps/powerpc/tls.h: Likewise.
5863         * sysdeps/s390/tls.h: Likewise.
5864         * sysdeps/sh/tls.h: Likewise.
5865         * sysdeps/sparc/tls.h: Likewise.
5866         * sysdeps/x86_64/tls.h: Likewise.
5868 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
5870         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
5872 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
5874         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
5875         %esp.
5876         * Makefile (tests): Add tst-align2.
5877         * tst-align2.c: New test.
5878         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
5879         -mpreferred-stack-boundary=4.
5881 2004-12-18  Roland McGrath  <roland@redhat.com>
5883         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
5884         New file removed withdrawn for the moment.
5886 2004-12-17  Richard Henderson  <rth@redhat.com>
5888         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
5889         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
5891 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
5893         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
5894         Increased PTHREAD_STACK_MIN.
5896         * tst-context1.c (stacks): Use bigger stack size.
5898 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
5900         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
5901         * sysdeps/sparc/tcb-offsets.sym: Add TID.
5903 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
5905         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
5906         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
5907         * sysdeps/s390/tcb-offsets.sym (TID): Add.
5909 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
5911         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
5913 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
5915         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
5916         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
5918         * tst-getpid1.c: If child crashes, report this first.  Print which
5919         signal.
5921 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
5923         * init.c (__pthread_initialize_minimal_internal): Also unblock
5924         SIGSETXID.
5926 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
5928         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
5929         _POSIX_THREAD_CPUTIME): Define to 0.
5930         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
5931         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
5932         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
5933         __timer_signal_thread_tclk): Remove.
5934         (init_module): Remove their initialization.
5935         (thread_cleanup): Remove their cleanup assertions.
5936         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
5937         __timer_signal_thread_tclk): Remove.
5938         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
5939         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
5940         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
5942 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
5944         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
5945         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
5947         * Makefile (tests): Add tst-getpid2.
5948         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
5949         (do_test): Use it.  Use __clone2 instead of clone on ia64.
5950         * tst-getpid2.c: New test.
5952 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5954         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
5956 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
5958         * Makefile (tests): Add tst-getpid1.
5959         * tst-getpid1.c: New file.
5960         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
5961         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
5963 2004-12-02  Roland McGrath  <roland@redhat.com>
5965         * Makefile (libpthread-nonshared): Variable removed.
5966         ($(objpfx)libpthread_nonshared.a): Target removed.
5967         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
5968         These are now handled by generic magic from
5969         libpthread-static-only-routines being set.
5971 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
5973         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
5974         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
5975         _POSIX_THREAD_PRIO_PROTECT): Define.
5976         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5977         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5978         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5980 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
5982         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
5983         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
5984         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
5985         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
5986         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5987         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
5988         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5990 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
5992         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
5994         * Makefile (libpthread-routines): Add pthread_setschedprio.
5995         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
5996         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
5997         * pthread_setschedprio.c: New file.
5999 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
6001         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
6002         * pthread_cancel.c (pthread_create): Likewise.
6004         * Makefile (libpthread-routines): Add vars.
6005         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
6006         * init.c (__default_stacksize, __is_smp): Remove.
6007         * vars.c: New file.
6008         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
6009         and define a wrapper macro.
6010         (PTHREAD_STATIC_FN_REQUIRE): Define.
6011         * allocatestack.c (__find_thread_by_id): Undefine.
6012         * pthread_create (__pthread_keys): Remove.
6013         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
6014         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
6015         PTHREAD_STATIC_FN_REQUIRE.
6017 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6019         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
6020         parameter to REGISTER macro.
6022 2004-11-17  Roland McGrath  <roland@redhat.com>
6024         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
6025         Make sure SIGCANCEL is blocked as well.
6027 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
6029         * sysdeps/pthread/setxid.h: New file.
6030         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
6031         (struct xid_command): Add forward decl.
6032         (struct pthread_functions): Change return type of __nptl_setxid hook
6033         to int.
6034         * pthreadP.h (__nptl_setxid): Change return type to int.
6035         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
6036         calling thread, return its return value and set errno on failure.
6037         * descr.h (struct xid_command): Change id type to long array.
6039         * Makefile: Add rules to build and test tst-setuid1 and
6040         tst-setuid1-static.
6041         * tst-setuid1.c: New test.
6042         * tst-setuid1-static.c: New test.
6044 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
6046         * Makefile (tests): Add tst-exit3.
6047         * tst-exit3.c: New test.
6049 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
6051         * Makefile (tests): Add tst-exit2.
6052         * tst-exit2.c: New file.
6054 2004-11-09  Roland McGrath  <roland@redhat.com>
6056         [BZ #530]
6057         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
6058         here, before calling clone.
6059         * pthread_create.c (start_thread): Don't do it here.
6061 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
6063         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
6065 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
6067         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
6068         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
6069         assembler warning.
6071 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
6073         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
6074         if sched_priority is not between minprio and maxprio.
6076 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6078         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6079         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
6081         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
6082         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
6084 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
6086         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
6087         not-cancelable I/O functions.
6089 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6091         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
6092         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
6093         make sure 2 is stored in the futex and we looked at the old value.
6094         Fix a few other problems to return the correct value.
6096 2004-10-14  Richard Henderson  <rth@redhat.com>
6098         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
6099         make gcc4 happy.
6101 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
6103         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
6104         of pthread-functions.h and pthreaddef.h.
6105         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
6107         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6108         Change __data.__nwaiters from int to unsigned int.
6110         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
6111         sysconf (_SC_THREAD_CPUTIME) returns negative value.
6113         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
6114         before return type.
6116         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
6117         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
6119 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
6121         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
6122         test fails, remove message queue.
6123         (tf_msgsnd): Likewise.
6125 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
6127         * tst-clock1.c: Change #ifdef to #if defined.
6128         * tst-clock2.c: Likewise.
6129         * tst-cond11.c: Likewise.
6131         * sysdeps/pthread/timer_create.c (timer_create): Use
6132         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
6133         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
6134         THREAD_CPUTIME.
6136 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
6138         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
6139         _POSIX_THREAD_CPUTIME): Define to 0.
6141 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
6143         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
6144         and _POSIX_THREAD_CPUTIME to zero.
6145         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
6146         * tst-barrier2.c: Fix testing for POSIX feature.
6147         * tst-clock1.c: Likewise.
6148         * tst-clock2.c: Likewise.
6149         * tst-cond11.c: Likewise.
6150         * tst-cond4.c: Likewise.
6151         * tst-cond6.c: Likewise.
6152         * tst-flock2.c: Likewise.
6153         * tst-mutex4.c: Likewise.
6154         * tst-mutex9.c: Likewise.
6155         * tst-rwlock12.c: Likewise.
6156         * tst-rwlock4.c: Likewise.
6157         * tst-signal1.c: Likewise.
6158         * tst-spin2.c: Likewise.
6159         * sysdeps/pthread/posix-timer.h: Likewise.
6160         * sysdeps/pthread/timer_create.c: Likewise.
6161         * sysdeps/pthread/timer_routines.c: Likewise.
6163 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
6165         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6166         (__lll_mutex_timedlock_wait): Address futex correctly.
6168         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6169         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
6170         make sure 2 is stored in the futex and we looked at the old value.
6171         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6172         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
6173         which might very well made the code not working at all before.
6174         [BZ #417]
6176 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
6178         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
6179         allow SIGSETXID to be sent.
6180         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
6181         for SIGSETXID to be defined.
6182         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
6183         SIGSETXID cannot be blocked.
6185         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6186         Add __extension__ to long long types.
6187         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6188         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6189         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6190         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6191         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
6192         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6193         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6195 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
6197         * descr.h (struct pthread): Add stopped_start field.
6198         * sysdeps/pthread/createthread.c (create_thread): Set
6199         start_stopped flag in descriptor for new thread appropriately.
6200         * pthread_create.c (start_thread): Only take lock to be stopped on
6201         startup if stopped_start flag says so.
6203 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
6205         * pthread_create.c (__pthread_create_2_1): Remember whether thread
6206         is created detached and if yes, do not try to free the stack in case
6207         the thread creation failed.
6208         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
6209         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
6210         case there has been no error.  [BZ #405]
6212         * pthread_create.c (start_thread): Don't wait for scheduler data
6213         etc to be set at the beginning of the function.  The cancellation
6214         infrastructure must have been set up.  And enable async
6215         cancellation before potentially going to sleep.  [BZ #401]
6217 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
6219         * Versions: Remove exports for pthread_set*id_np functions.
6220         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
6221         for now.
6222         * Makefile: Don't build pthread_set*id code for now.
6224 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
6226         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
6227         internal use.
6228         * allocatestack.c (__nptl_setxid): New function.
6229         * descr.h (struct xid_command): Define type.
6230         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
6231         (sighandler_setxid): New function.
6232         (__pthread_initialize_minimal): Register sighandler_setxid for
6233         SIGCANCEL.
6234         * pt-allocrtsig.c: Update comment.
6235         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
6236         Declare __nptl_setxid.
6237         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
6238         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
6239         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
6240         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
6241         and pthread_setresuid_np.
6242         * pthread_setgid_np.c: New file.
6243         * pthread_setuid_np.c: New file.
6244         * pthread_setegid_np.c: New file.
6245         * pthread_seteuid_np.c: New file.
6246         * pthread_setregid_np.c: New file.
6247         * pthread_setreuid_np.c: New file.
6248         * pthread_setresgid_np.c: New file.
6249         * pthread_setresuid_np.c: New file.
6250         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
6251         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
6252         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
6253         and pthread_setresuid_np.
6254         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
6255         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
6256         pthread_setregid, and pthread_setresgid.
6258 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
6260         * allocatestack.c (allocate_stack): Return EAGAIN instead of
6261         ENOMEM when out of memory.
6263 2004-09-10  Roland McGrath  <roland@redhat.com>
6265         [BZ #379]
6266         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
6267         code, since we don't try to use the broken CLONE_STOPPED any more.
6268         * pthread_create.c (start_thread): Likewise.
6270 2004-09-15  Richard Henderson  <rth@redhat.com>
6272         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
6274 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
6276         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
6277         (__libc_unwind_longjmp): Delete macro and declare as function.
6278         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
6279         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
6280         nptl directory.
6281         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
6282         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
6283         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
6285 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
6287         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
6288         for __USE_XOPEN2K.
6289         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
6290         types also for __USE_XOPEN2K.
6291         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6292         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6293         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6294         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6295         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6296         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6297         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6298         [BZ #320]
6300 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
6302         * sysdeps/pthread/pthread.h
6303         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
6304         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
6305         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
6306         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
6307         [BZ #375]
6309 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
6311         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
6312         PSEUDO to be used with . prefix.
6314         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
6315         Use atomic_increment instead of atomic_exchange_and_add.
6316         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
6317         Likewise.
6318         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
6319         Likewise.
6320         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
6321         Likewise.
6323         * allocatestack.c (allocate_stack): Use atomic_increment_val
6324         instead of atomic_exchange_and_add.
6325         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
6326         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
6327         Likewise.
6328         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6329         Likewise.
6331         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
6332         the initialization function might throw.
6334 2005-09-05  Richard Henderson  <rth@redhat.com>
6336         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
6337         Move definition inside libpthread, libc, librt check.  Provide
6338         definition for rtld.
6340 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
6342         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
6343         * sysdeps/i386/jmpbuf-unwind.h: Likewise
6344         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
6345         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
6346         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
6347         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
6348         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
6349         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
6350         * unwind.c: Use it.
6352         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6353         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
6354         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6355         Likewise.
6356         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
6357         Decrement __nwaiters.  If pthread_cond_destroy has been called and
6358         this is the last waiter, signal pthread_cond_destroy caller and
6359         avoid using the pthread_cond_t structure after unlock.
6360         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6361         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6362         Read clock type from the least significant bits of __nwaiters instead
6363         of __clock.
6364         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6365         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
6367 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
6369         [BZ #342]
6370         * Makefile (tests): Add tst-cond20 and tst-cond21.
6371         * tst-cond20.c: New test.
6372         * tst-cond21.c: New test.
6373         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
6374         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
6375         it unsigned int.
6376         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6377         Likewise.
6378         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6379         (pthread_cond_t): Likewise.
6380         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6381         Likewise.
6382         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6383         Likewise.
6384         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6385         Likewise.
6386         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
6387         (cond_nwaiters): New.
6388         (clock_bits): New.
6389         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
6390         if there are waiters not signalled yet.
6391         Wait until all already signalled waiters wake up.
6392         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
6393         __nwaiters.  If pthread_cond_destroy has been called and this is the
6394         last waiter, signal pthread_cond_destroy caller and avoid using
6395         the pthread_cond_t structure after unlock.
6396         (__pthread_cond_wait): Increment __nwaiters in the beginning,
6397         decrement it when leaving.  If pthread_cond_destroy has been called
6398         and this is the last waiter, signal pthread_cond_destroy caller.
6399         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6400         Likewise.  Read clock type from the least significant bits of
6401         __nwaiters instead of __clock.
6402         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
6403         whether clock ID can be encoded in COND_CLOCK_BITS bits.
6404         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
6405         clock type just from the last COND_CLOCK_BITS bits of value.
6406         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
6407         instead of __clock, just from second bit of condattr's value.
6409 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
6411         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
6412         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
6413         != 64.
6414         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6416 2004-08-15  Roland McGrath  <roland@frob.com>
6418         * pthread_atfork.c: Update copyright terms including special exception
6419         for these trivial files, which are statically linked into executables
6420         that use dynamic linking for the significant library code.
6422 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
6424         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
6425         pthread_rwlock_rdlock.
6426         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
6427         Decrease __nr_readers_queued after reacquiring lock.
6428         * sysdeps/pthread/pthread_rwlock_timedrdlock
6429         (pthread_rwlock_timedrdlock): Likewise.
6430         Reported by Bob Cook <bobcook47@hotmail.com>.
6432 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
6434         * tst-rwlock14.c (tf): Read main thread handle from *ARG
6435         before pthread_barrier_wait.
6437 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
6439         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
6440         Remove unnecessary exception handling data.
6442 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
6444         [BZ #284]
6445         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
6446         instead of clockid_t.
6448 2004-07-21  Roland McGrath  <roland@redhat.com>
6450         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
6452 2004-07-19  Roland McGrath  <roland@redhat.com>
6454         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
6456 2004-07-02  Roland McGrath  <roland@redhat.com>
6458         * configure: Don't exit.
6460 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6462         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6463         (__pthread_cond_timedwait): Check for invalid nanosecond in
6464         timeout value.
6466 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
6468         * Makefile: Add rules to build and run tst-fini1.
6469         * tst-fini1.c: New file.
6470         * tst-fini1mod.c: New file.
6472 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
6474         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
6475         if no cancellation support is needed.
6476         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6477         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6478         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6479         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6480         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6481         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6482         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6483         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
6484         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
6486         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
6487         only if not already defined.
6489 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
6491         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
6492         constraint "m" instead of "0" for futex.
6494         * shlib-versions: Add powerpc64-.*-linux.*.
6496 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
6498         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
6499         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
6500         for valid tv_nsec.
6501         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
6502         1 billion and 64-bit tv_nsec which is valid when truncated to 32
6503         bits.
6505 2004-06-29  Roland McGrath  <roland@redhat.com>
6507         * Banner: NPTL no longer has its own version number.
6508         * Makefile (nptl-version): Variable removed.
6509         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
6510         using $(version), the glibc version number.
6512 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6514         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6515         Fix branch offset for a PLT entry.
6516         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
6517         Likewise.
6518         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
6519         Likewise.
6520         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
6521         Likewise.
6522         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
6523         Likewise.
6525 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
6527         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
6528         unconditionally.
6530 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
6532         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
6533         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
6534         instead of tv_sec.
6535         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
6536         (pthread_rwlock_timedrdlock): Likewise.
6538 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
6540         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6541         Set __r7 to val, not mutex.
6543 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
6545         * Makefile: Add rules to build tst-rwlock14.
6546         * tst-rwlock14.c: New file.
6548 2004-06-24  Boris Hu  <boris.hu@intel.com>
6550         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
6551         check.
6552         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6554 2004-06-19  Andreas Jaeger  <aj@suse.de>
6556         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
6557         assembler in last patch.
6559 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
6561         * sysdeps/pthread/pthread_cond_timedwait.c
6562         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
6563         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6564         (__pthread_cond_timedwait): Check for invalid nanosecond in
6565         timeout value.
6566         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6567         * tst-cond19.c: New file.
6568         * Makefile: Add rules to build and run tst-cond19.
6570 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
6572         * tst-context1.c (GUARD_PATTERN): Defined.
6573         (tst_context_t): Define struct containing ucontext_t & guard words.
6574         (ctx): Declare as an array of tst_context_t.
6575         (fct): Verify uc_link & guard words are still valid.
6576         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
6578 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6580         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6581         Add __data.__futex field, reshuffle __data.__clock.
6582         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
6583         (__pthread_cond_signal): Increment __futex at the same time as
6584         __wakeup_seq or __total_seq.  Pass address of __futex instead of
6585         address of low 32-bits of __wakeup_seq to futex syscall.
6586         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6587         (__pthread_cond_wait): Likewise.  Pass __futex value from before
6588         releasing internal lock to FUTEX_WAIT.
6589         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6590         (__pthread_cond_timedwait): Likewise.
6591         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6592         (FUTEX_CMP_REQUEUE): Define.
6593         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6594         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6595         Pass __futex value from before the unlock and __futex address instead
6596         of address of low 32-bits of __wakeup_seq to futex syscall.
6597         Fallback to FUTEX_WAKE all on any errors.
6599 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
6601         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
6602         comment typo.
6603         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
6604         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
6605         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
6606         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
6607         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
6609 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
6611         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
6612         Add memory clobber to inline assembly.
6613         (__lll_mutex_trylock): Likewise.
6614         (__lll_mutex_cond_trylock): Likewise.
6616 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
6618         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6619         Pass val argument as 6th system call argument in %r7.
6621 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
6623         * Makefile (tests): Add tst-cond16.
6624         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
6625         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
6626         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6627         Add __data.__futex field, reshuffle __data.__clock.
6628         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
6629         (__pthread_cond_signal): Increment __futex at the same time as
6630         __wakeup_seq or __total_seq.  Pass address of __futex instead of
6631         address of low 32-bits of __wakeup_seq to futex syscall.
6632         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
6633         (__pthread_cond_wait): Likewise.  Pass __futex value from before
6634         releasing internal lock to FUTEX_WAIT.
6635         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
6636         (__pthread_cond_timedwait): Likewise.
6637         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
6638         (FUTEX_CMP_REQUEUE): Define.
6639         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6640         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6641         Pass __futex value from before the unlock and __futex address instead
6642         of address of low 32-bits of __wakeup_seq to futex syscall.
6643         Fallback to FUTEX_WAKE all on any errors.
6644         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
6645         Define.
6646         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6647         internally.  Return non-zero if error, zero if success.
6648         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6649         Add __data.__futex field, reshuffle __data.__clock.
6650         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
6651         Define.
6652         (lll_futex_requeue): Add val argument, return 1 unconditionally
6653         for the time being.
6654         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6655         Add __data.__futex field, reshuffle __data.__clock.
6656         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6657         Define.
6658         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6659         internally.  Return non-zero if error, zero if success.
6660         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6661         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
6662         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6663         Define.
6664         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6665         internally.  Return non-zero if error, zero if success.
6666         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6667         Add __data.__futex field, reshuffle __data.__clock.
6668         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
6669         Define.
6670         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6671         internally.  Return non-zero if error, zero if success.
6672         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6673         Add __data.__futex field, reshuffle __data.__clock.
6674         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6675         Add __data.__futex field, reshuffle __data.__clock.
6676         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
6677         Increment __futex at the same time as __wakeup_seq or __total_seq.
6678         Pass address of __futex instead of address of low 32-bits of
6679         __wakeup_seq to futex syscall.
6680         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6681         Pass __futex value from before releasing internal lock
6682         to FUTEX_WAIT.
6683         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6684         Likewise.  Avoid unnecessary shadowing of variables.
6685         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
6686         Set __futex to 2 * __total_seq.  Pass __futex value from before the
6687         unlock and __futex address instead of address of low 32-bits of
6688         __wakeup_seq to futex_requeue macro, adjust for new return value
6689         meaning.
6690         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
6691         (__pthread_cond_signal): Increment __futex at the same time as
6692         __wakeup_seq or __total_seq.  Pass address of __futex instead of
6693         address of low 32-bits of __wakeup_seq to futex syscall.
6694         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
6695         (__pthread_cond_wait): Likewise.  Pass __futex value from before
6696         releasing internal lock to FUTEX_WAIT.
6697         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6698         (__pthread_cond_timedwait): Likewise.
6699         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6700         (FUTEX_CMP_REQUEUE): Define.
6701         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6702         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6703         Pass __futex value from before the unlock and __futex address instead
6704         of address of low 32-bits of __wakeup_seq to futex syscall.
6705         Fallback to FUTEX_WAKE all on any errors.
6707 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6709         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
6710         Add nop to align the end of critical section.
6711         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
6713 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6715         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6716         Add __broadcast_seq field.
6717         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
6718         all waiters as woken with woken_seq and bump broadcast counter.
6719         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
6720         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
6721         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6722         Comment typo fixes.  Avoid returning -ETIMEDOUT.
6724 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
6726         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6727         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
6728         Reported by Kaz Kojima.
6730 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
6732         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
6734 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
6736         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
6737         __broadcast_seq with bc_seq after acquiring internal lock instead of
6738         before it.
6740 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
6742         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
6743         compilation.
6744         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6745         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
6746         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6747         (pthread_cond_t): Add __data.__broadcast_seq field.
6748         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6749         (FRAME_SIZE): Define.
6750         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
6751         Comment typo fixes.
6752         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
6753         Define.
6754         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
6755         typo fixes.
6756         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6757         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
6758         fixes.
6760 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
6762         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
6763         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6764         Add __broadcast_seq field.
6765         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6766         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6767         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6768         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6769         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6770         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
6771         all waiters as woken with woken_seq and bump broadcast counter.
6772         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
6773         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
6774         __broadcast_seq field.
6775         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6776         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6777         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
6778         * pthread_cond_init.c: Initialize __broadcast_seq field.
6779         * Makefile (tests): Add tst-cond17 and tst-cond18.
6780         Add .NOTPARALLEL goal.
6781         * tst-cond16.c: New file.  From Jakub.
6782         * tst-cond17.c: New file.  From Jakub.
6783         * tst-cond18.c: New file.  From Jakub.
6785 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
6787         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
6788         unwind info.
6790         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
6791         Parametrize frame size.  Correct some unwind info.
6792         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6794 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
6796         * tst-stack3.c: Note testing functionality beyond POSIX.
6798 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
6800         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
6801         Change conditional from ifdef to if.
6803 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
6805         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
6806         SYSDEP_CANCEL_ERROR): Define.
6807         (PSEUDO): Use it.
6809 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
6811         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
6813 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
6815         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
6817 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6819         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
6820         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6821         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
6822         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6824 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
6826         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
6827         thread has all signals blocked.
6829 2004-04-18  Andreas Jaeger  <aj@suse.de>
6831         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
6832         (SEM_VALUE_MAX): Add missing brace.
6834 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
6836         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
6837         in rt subdir.
6838         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
6839         * sysdeps/pthread/tst-mqueue8x.c: New test.
6840         * tst-cancel4.c: Update comment about message queues.
6842         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
6843         return it_value { 0, 0 }.
6844         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
6845         like SIGEV_SIGNAL.
6846         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
6847         assertion for SIGEV_NONE.
6848         (thread_attr_compare): Compare all attributes, not just a partial
6849         subset.
6851 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
6853         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
6855 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
6857         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
6858         Just use a plain number.
6859         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
6860         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
6861         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
6862         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
6863         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
6864         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
6865         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6867 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6869         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
6870         frame info.
6871         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6873 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
6875         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
6876         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
6877         of calling sigwaitinfo.
6879 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
6881         * allocatestack.c (allocate_stack): Set reported_guardsize
6882         unconditionally.
6883         * pthread_getattr_np.c (pthread_getattr_np): Use
6884         reported_guardsize instead of guardsize.
6885         * descr.h (struct pthread): Add reported_guardsize field.
6887 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
6889         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
6891 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
6893         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
6895 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
6897         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
6898         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
6899         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
6900         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
6901         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
6902         Define.
6903         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
6904         (_POSIX_MESSAGE_PASSING): Define.
6905         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
6906         (_POSIX_MESSAGE_PASSING): Define.
6907         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
6908         (_POSIX_MESSAGE_PASSING): Define.
6910 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
6912         * tst-context1.c (fct): Check whether correct stack is used.
6914 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
6916         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
6917         matching constraints for asm mem parameters.
6919         * tst-clock2.c (tf): Don't define unless needed.
6921 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
6923         * Makefile (link-libc-static): Use $(static-gnulib) instead of
6924         $(gnulib).
6926 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
6928         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
6929         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
6930         * pthreadP.h: Declare __nptl_deallocate_tsd.
6931         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
6932         Adjust caller.
6934         * Makefile (tests): Add tst-tsd5.
6935         * tst-tsd5.c: New file.
6937 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
6939         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6940         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
6941         is SHLIB_COMPAT check.
6942         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
6943         (__pthread_attr_getaffinity_old): Likewise.
6944         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6945         (__pthread_getaffinity_old): Likewise.
6946         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
6947         (__pthread_setaffinity_old): Likewise.
6949 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
6951         * allocatestack.c (_make_stacks_executable): Call
6952         _dl_make_stack_executable first.
6954 2004-03-24  Roland McGrath  <roland@redhat.com>
6956         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
6957         constraint instead of "0".
6959 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
6961         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6962         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
6964         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
6965         code to avoid warning.
6967 2004-03-24  Andreas Jaeger  <aj@suse.de>
6969         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6970         (__pthread_attr_setaffinity_old): Remove const.
6972 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
6974         * sysdeps/unix/sysv/linux/smp.h: New file.
6975         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
6976         * init.c: Define __is_smp.
6977         (__pthread_initialize_minimal_internal): Call is_smp_system to
6978         initialize __is_smp.
6979         * pthreadP.h: Declare __is_smp.
6980         Define MAX_ADAPTIVE_COUNT is necessary.
6981         * pthread_mutex_init.c: Add comment regarding __spins field.
6982         * pthread_mutex_lock.c: Implement adaptive mutex type.
6983         * pthread_mutex_timedlock.c: Likewise.
6984         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
6985         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
6986         Add __spins field.
6987         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6988         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6989         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6990         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6991         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6992         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6993         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6994         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
6995         lll_mutex_cond_trylock.
6996         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6997         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6998         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6999         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7000         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7001         Define BUSY_WAIT_NOP.
7002         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7003         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7005         * tst-mutex5.c: Add support for testing adaptive mutexes.
7006         * tst-mutex7.c: Likewise.
7007         * tst-mutex5a.c: New file.
7008         * tst-mutex7a.c: New file.
7009         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
7011         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
7012         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
7013         vgettimeofday call might destroy the content.
7015         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
7016         @pause in the loop.
7018         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
7019         No need to restrict type of ret.  Make it int.  Add comment.
7021         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
7022         Remove unnecessary setne instruction.
7024 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
7026         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7027         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
7028         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
7029         If realloc fails, break out of the loop.
7031 2004-03-20  Andreas Jaeger  <aj@suse.de>
7033         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
7034         (__pthread_setaffinity_old): Fix interface.
7035         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7036         (__pthread_getaffinity_old): Likewise.
7038         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
7039         (__pthread_setaffinity_new): Remove duplicate declaration.
7041 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7043         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
7044         the return value to a safe register.
7045         (CDISABLE): Set the function argument correctly.
7047 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7049         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
7050         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
7051         Rewrite so that only one locked memory operation per round is needed.
7052         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
7053         (pthread_barrier_wait): After wakeup, release lock only when the
7054         last thread stopped using the barrier object.
7055         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
7056         (__pthread_cond_wait): Don't store mutex address if the current
7057         value is ~0l.  Add correct cleanup support and unwind info.
7058         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7059         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
7060         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
7061         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
7062         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
7063         Add correct cleanup support and unwind info.
7064         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
7065         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
7066         information for syscall wrappers.
7068 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
7070         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
7071         cpusetsize field, remove next.
7072         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
7073         parameter for size of the CPU set.
7074         (pthread_setaffinity_np): Likewise.
7075         (pthread_attr_getaffinity_np): Likewise.
7076         (pthread_attr_setaffinity_np): Likewise.
7077         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
7078         interface change, keep compatibility code.
7079         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
7080         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
7081         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
7082         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
7083         __pthread_getaffinity_np.
7084         * Versions: Add version for changed interfaces.
7085         * tst-attr3.c: Adjust test for interface change.
7086         * pthread_getattr_np.c: Query the kernel about the affinity mask with
7087         increasing buffer sizes.
7088         * pthread_attr_destroy.c: Remove unused list handling.
7089         * pthread_attr_init.c: Likewise.
7091 2004-03-17  Roland McGrath  <roland@redhat.com>
7093         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
7094         first argument to clock_getres so we ever enable kernel timers.
7096 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
7098         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
7100 2004-03-12  Richard Henderson  <rth@redhat.com>
7102         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
7103         oldvalue from CENABLE to CDISABLE.
7105 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
7107         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
7108         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
7109         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
7110         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
7112 2004-03-11  Richard Henderson  <rth@redhat.com>
7114         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
7115         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
7116         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
7118 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
7120         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
7121         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
7122         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
7124 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
7126         * forward.c (__pthread_cond_broadcast_2_0,
7127         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
7128         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
7129         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
7131 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7133         * sysdeps/sh/tcb-offsets.sym: Add PID.
7134         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
7135         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
7137 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
7139         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
7140         include <sysdep-cancel.h>, vfork is no cancellation point.
7141         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
7142         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
7143         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
7145 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
7147         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
7148         libc_hidden_def.
7149         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
7150         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
7151         Likewise.
7152         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
7153         Likewise.
7154         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
7155         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
7156         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
7157         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
7158         of DO_CALL_VIA_BREAK.  Work around a gas problem.
7160         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
7161         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
7162         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
7163         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
7164         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
7165         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
7167         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
7168         a local register for saving old PID.  Negate PID in parent upon exit.
7170         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
7171         tcb-offsets.h.
7172         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
7173         before syscall, set to the old value in the parent afterwards.
7174         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
7175         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
7176         tcb-offsets.h.
7177         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
7178         before syscall, set to the old value in the parent afterwards.
7179         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
7180         * sysdeps/s390/tcb-offsets.sym: Add PID.
7182         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
7183         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
7184         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
7185         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
7186         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
7187         * sysdeps/sparc/tcb-offsets.sym: Add PID.
7189 2004-03-10  Andreas Schwab  <schwab@suse.de>
7191         * sysdeps/ia64/tcb-offsets.sym: Add PID.
7192         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
7193         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
7195 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
7197         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
7198         * tst-cancel21.c (do_one_test): Likewise.
7199         Reported by Gordon Jin <gordon.jin@intel.com>.
7201 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
7203         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
7204         if non-zero and set to INT_MIN if zero.
7205         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
7206         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
7207         (SAVE_PID, RESTORE_PID): Define.
7208         (__vfork): Use it.
7209         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
7210         Use relative path to avoid including NPTL i386/vfork.S.
7211         (SAVE_PID, RESTORE_PID): Define.
7212         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
7213         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
7214         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
7215         tst-vfork2x.
7216         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
7217         * tst-vfork1.c: New test.
7218         * tst-vfork2.c: New test.
7219         * tst-vfork1x.c: New test.
7220         * tst-vfork2x.c: New test.
7222 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
7224         * sysdeps/i386/tcb-offsets.sym: Add PID.
7225         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7226         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
7227         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
7229 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
7231         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
7233 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
7235         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
7236         _rtld_global_ro.
7238 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
7240         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
7241         _rtld_global_ro.
7243         * tst-once4.c: Remove unnecessary macro definition.
7245         * tst-mutex7.c (do_test): Limit thread stack size.
7246         * tst-once2.c (do_test): Likewise.
7247         * tst-tls3.c (do_test): Likewise.
7248         * tst-tls1.c (do_test): Likewise.
7249         * tst-signal3.c (do_test): Likewise.
7250         * tst-kill6.c (do_test): Likewise.
7251         * tst-key4.c (do_test): Likewise.
7252         * tst-join4.c (do_test): Likewise.
7253         * tst-fork1.c (do_test): Likewise.
7254         * tst-context1.c (do_test): Likewise.
7255         * tst-cond2.c (do_test): Likewise.
7256         * tst-cond10.c (do_test): Likewise.
7257         * tst-clock2.c (do_test): Likewise.
7258         * tst-cancel10.c (do_test): Likewise.
7259         * tst-basic2.c (do_test): Likewise.
7260         * tst-barrier4.c (do_test): Likewise.
7262 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
7264         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
7266 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
7268         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7269         (__pthread_cond_timedwait): Optimize wakeup test.
7270         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7271         (__pthread_cond_wait): Likewise.
7272         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
7273         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7274         Likewise.
7276 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
7278         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7279         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
7280         the atomic instruction needed.
7281         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
7282         (__lll_mutex_lock_wait): Likewise.
7284 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
7286         * Makefile (tests): Add tst-cond14 and tst-cond15.
7287         * tst-cond14.c: New file.
7288         * tst-cond15.c: New file.
7290 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
7292         * sysdeps/pthread/createthread.c (create_thread): Remove use of
7293         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
7294         needs to be implemented differently to be useful.
7296 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
7298         * pthread_attr_setschedparam.c: Don't test priority against limits
7299         here.  Set ATTR_FLAG_SCHED_SET flag.
7300         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
7301         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
7302         from parent thread to child.  If attribute is used and scheduling
7303         parameters are not inherited, copy parameters from attribute or
7304         compute them.  Check priority value.
7305         * pthread_getschedparam.c: If the parameters aren't known yet get
7306         them from the kernel.
7307         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
7308         ATTR_FLAG_POLICY_SET flag for thread.
7309         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
7310         and ATTR_FLAG_POLICY_SET.
7312         * sysdeps/pthread/createthread.c: Use tgkill if possible.
7314         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
7315         fail if stack address hasn't been set.  Just return 0.
7317 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
7319         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
7320         libpthread for the files in this list.
7321         (CFLAGS-tst-unload): Removed.
7322         * tst-unload.c (do_test): Don't use complete path for
7323         LIBPHREAD_SO.
7325         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
7326         tst-_res1mod2.
7328 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
7330         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7331         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
7332         operation per round is needed.
7333         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
7334         (__lll_mutex_lock_wait): Likewise.
7336 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
7338         * tst-cancel9.c (cleanup): Don't print to stderr.
7340 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7342         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
7344 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
7346         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
7347         (__syscall_error_handler2): Call CDISABLE.
7348         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
7349         (__syscall_error_handler2): Call CDISABLE.
7351         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7352         Release lock before the loop, don't reacquire it.
7354         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
7356 2004-02-19  Andreas Schwab  <schwab@suse.de>
7358         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7359         Fix last change.
7361 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
7363         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
7364         (pthread_barrier_wait): After wakeup, release lock only when the
7365         last thread stopped using the barrier object.
7366         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
7367         (pthread_barrier_wait): Likewise.
7368         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7369         Likewise.
7370         * Makefile (tests): Add tst-barrier4.
7371         * tst-barrier4.c: New file.
7373         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7374         (__pthread_cond_timedwait): Perform timeout test while holding
7375         internal lock to prevent wakeup race.
7376         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
7377         * sysdeps/pthread/pthread_cond_timedwait.c
7378         (__pthread_cond_timedwait): Likewise.
7379         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7380         (__pthread_cond_timedwait): Likewise.
7382 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
7384         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
7385         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
7386         * Makefile (tests): Add tst-rwlock13.
7387         * tst-rwlock13.c: New test.
7389 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
7391         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7392         (__condvar_tw_cleanup): Little optimization.
7393         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
7395 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
7397         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
7398         libpthread as "lib" parameter to SHLIB_COMPAT.
7399         (__novmx_siglongjmp): Fix typo in function name.
7400         (__novmx_longjmp): Fix typo in function name.
7402 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
7404         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
7405         __builtin_expect.
7407         * sysdeps/generic/pt-longjmp.c: Moved to...
7408         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
7410 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
7412         * Makefile (libpthread-routines): Add pt-cleanup.
7413         * pt-longjmp.c: Removed.
7414         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
7415         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
7416         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
7417         Version longjmp, siglongjmp for GLIBC_2.3.4.
7418         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
7420 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
7422         * sysdeps/pthread/pthread_cond_timedwait.c
7423         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
7424         Reuse code.  Add __builtin_expects.
7426         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7427         (__pthread_cond_timedwait): Get internal lock in case timeout has
7428         passed before the futex syscall.
7429         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7431 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
7433         * allocatestack.c: Pretty printing.
7435         * sysdeps/pthread/createthread.c (create_thread): Don't add
7436         CLONE_DETACHED bit if it is not necessary.
7438 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
7440         * pthread_getattr_np.c: Include ldsodefs.h.
7442 2004-01-16  Richard Henderson  <rth@redhat.com>
7444         * allocatestack.c: Don't declare __libc_stack_end.
7445         * init.c (__pthread_initialize_minimal_internal): Likewise.
7446         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
7448 2004-01-15  Richard Henderson  <rth@redhat.com>
7450         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
7451         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
7452         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
7453         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
7454         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
7455         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
7456         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
7457         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
7459 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
7461         * init.c (pthread_functions): Make array const.
7463 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
7465         * allocatestack.c (__make_stacks_executable): Change interface.
7466         Check parameters.  Pass parameter on to libc counterpart.
7467         * pthreadP.h: Change declaration.
7469 2004-01-13  Richard Henderson  <rth@redhat.com>
7471         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
7472         prototype form.
7473         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
7474         Likewise.
7476         * sysdeps/alpha/Makefile: New file.
7477         * sysdeps/alpha/tcb-offsets.sym: New file.
7478         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
7479         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
7481         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
7482         on powerpc version.
7484 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
7486         * Makefile (tests): Add tst-backtrace1.
7487         * tst-backtrace1.c: New test.
7489 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
7491         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
7492         register as second parameter to the REGISTER macro.
7493         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
7494         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
7495         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
7496         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
7497         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
7498         of thread register as second parameter to REGISTER macro in 64 case.
7500 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
7502         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
7503         (CFLAGS-getpid.o): Defined.
7504         (CFLAGS-getpid.os): Defined.
7506 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
7508         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
7509         returned for main thread does not overlap with any other VMA.
7510         Patch by Jakub Jelinek.
7512 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
7514         * tst-raise1.c: Include stdio.h.
7516 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
7518         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
7519         setting with __ASSUME_TGKILL || defined __NR_tgkill.
7520         If pid is 0, set it to selftid.
7521         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
7522         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
7523         != 0, return self->tid without doing a syscall.
7524         * descr.h (struct pthread): Move pid field after tid.
7526         * Makefile (tests): Add tst-raise1.
7527         * tst-raise1.c: New file.
7529 2003-12-23  Roland McGrath  <roland@redhat.com>
7531         * tst-oddstacklimit.c: New file.
7532         * Makefile (tests): Add it.
7533         (tst-oddstacklimit-ENV): New variable.
7535         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
7536         value up to page size for __default_stacksize.
7538 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
7540         * Makefile (tests): Add tst-eintr5.
7541         * tst-eintr5.c: New file.
7543         * eintr.c (eintr_source): Prevent sending signal to self.
7545         * tst-eintr2.c (tf1): Improve error message.
7547 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
7549         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
7550         * sysdeps/unix/sysv/linux/getpid.c: New file.
7551         * pthread_cancel.c: Add comment explaining use of PID field.
7552         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
7553         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
7554         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
7555         temporarily to signal the field must not be relied on and updated
7556         by getpid().
7557         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
7558         temporarily negative.
7559         * sysdeps/unix/sysv/linux/raise.c: Likewise.
7561 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
7563         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
7564         (eintr_source): If ARG != NULL, use pthread_kill.
7565         * tst-eintr1.c: Adjust for this change.
7566         * tst-eintr2.c: Likewise.
7567         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
7568         * tst-eintr3.c: New file.
7569         * tst-eintr4.c: New file.
7571 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
7573         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
7574         if CANCELSTATE_BITMASK is set.
7575         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
7576         Likewise.
7578         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
7579         (tests-reverse): Add tst-cancel23.
7580         * tst-cancel22.c: New test.
7581         * tst-cancel23.c: New test.
7583 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
7585         * tst-eintr1.c: Better error messages.
7587         * Makefile (tests): Add tst-eintr2.
7588         * tst-eintr2.c: New file.
7590 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
7592         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
7593         (CFLAGS-tst-cancelx21.c): Set.
7594         * tst-cancel21.c: New test.
7595         * tst-cancelx21.c: New test.
7597         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
7598         comparison operand.
7599         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
7600         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
7601         * pt-longjmp.c: Include jmpbuf-unwind.h.
7602         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
7603         _JMPBUF_UNWINDS.  Adjust compared pointers.
7604         * init.c (__pthread_initialize_minimal_internal): Initialize
7605         pd->stackblock_size.
7606         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
7607         * sysdeps/alpha/jmpbuf-unwind.h: New file.
7608         * sysdeps/i386/jmpbuf-unwind.h: New file.
7609         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
7610         * sysdeps/s390/jmpbuf-unwind.h: New file.
7611         * sysdeps/sh/jmpbuf-unwind.h: New file.
7612         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
7613         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
7614         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
7615         (_JMPBUF_CFA_UNWINDS): Remove.
7616         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
7618 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
7620         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
7621         (CFLAGS-tst-cancelx20.c): Set.
7622         * tst-cancel20.c: New test.
7623         * tst-cancelx20.c: New test.
7625 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
7627         * init.c (__pthread_initialize_minimal_internal): Don't treat
7628         architectures with separate register stack special here when
7629         computing default stack size.
7631 2003-12-17  Roland McGrath  <roland@redhat.com>
7633         * Makefile (tst-cancelx7-ARGS): New variable.
7634         Reportd by Greg Schafer <gschafer@zip.com.au>.
7636 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
7638         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
7639         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
7640         (tst-stack3-ENV): Set.
7641         ($(objpfx)tst-stack3-mem): New.
7642         * tst-stack3.c: New test.
7644 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
7646         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
7647         Add unwind directives.  Drop unused .regstk directive.
7648         (_fini_EPILOG_BEGINS): Add unwind directives.
7650 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
7652         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
7653         Assume parameter is a pointer.
7654         (lll_futex_wake): Likewise.
7655         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
7656         Likewise.
7657         (lll_futex_wake): Likewise.
7658         Reported by Boris Hu.
7659         * sysdeps/unix/sysv/linux/unregister-atfork.c
7660         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
7662         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
7664 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
7666         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
7667         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
7668         __rtld_lock_initialize for ld.so lock.
7669         Patch in part by Adam Li <adam.li@intel.com>.
7671 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
7673         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
7674         in $(gnulib).  Also, remove stale comment.
7676 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
7678         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
7679         advantage of new syscall stub and optimize accordingly.
7681         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
7682         from SYS_futex, to match expectations of
7683         sysdep.h:DO_INLINE_SYSCALL.
7684         (lll_futex_clobbers): Remove.
7685         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
7686         (lll_futex_wake): Likewise.
7687         (lll_futex_requeue): Likewise.
7688         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
7689         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
7690         Jelinek).
7691         (__lll_mutex_lock): Likewise.
7692         (__lll_mutex_cond_lock): Likewise.
7693         (__lll_mutex_timed_lock): Likewise.
7694         (__lll_mutex_unlock): Likewise.
7695         (__lll_mutex_unlock_force): Likewise.
7697         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
7698         comes before the include of <sysdep.h>.
7699         (THREAD_SELF_SYSINFO): New macro.
7700         (THREAD_SYSINFO): Likewise.
7701         (INIT_SYSINFO): New macro.
7702         (TLS_INIT_TP): Call INIT_SYSINFO.
7704         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
7706         * sysdeps/pthread/createthread.c (create_thread): Use
7707         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
7708         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
7709         THREAD_SELF_SYSINFO instead of open code.
7710         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
7711         (THREAD_SYSINFO): Likewise.
7713         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
7715         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
7717 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
7719         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
7720         instead of .init.  Patch by David Mosberger.
7722 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
7724         * sysdeps/pthread/configure.in: Remove broken declaration in C
7725         cleanup handling check.
7727 2003-11-30  Andreas Jaeger  <aj@suse.de>
7729         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
7730         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
7731         Likewise.
7733 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
7735         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
7736         * pthread_attr_destroy.c: Include shlib-compat.h.
7737         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
7738         is set in iattr->flags.
7739         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
7741 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
7743         * Makefile (distribute): Add tst-cleanup4aux.c.
7745         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
7746         include.
7748 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
7750         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
7751         pthread_cond_signal.
7753         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
7754         store mutex address if the current value is ~0l.
7755         * sysdeps/pthread/pthread_cond_timedwait.c
7756         (__pthread_cond_timedwait): Likewise.
7757         * sysdeps/pthread/pthread_cond_broadcast.c
7758         (__pthread_cond_broadcast): Don't use requeue for pshared
7759         condvars.
7761         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7762         (__pthread_cond_wait): Don't store mutex address if the current
7763         value is ~0l.
7764         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7765         (__pthread_cond_timedwait): Likewise.
7766         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
7767         (__pthread_cond_broadcast): Don't use requeue for pshared
7768         condvars.
7770         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
7771         element with ~0l for pshared condvars, with NULL otherwise.
7773         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7774         (__pthread_cond_wait): Don't store mutex address if the current
7775         value is ~0l.
7776         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7777         (__pthread_cond_timedwait): Likewise.
7778         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
7779         (__pthread_cond_broadcast): Don't use requeue for pshared
7780         condvars.
7782         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
7783         * tst-cond12.c: New file.
7784         * tst-cond13.c: New file.
7786 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
7788         * sysdeps/pthread/configure.in: Make missing forced unwind support
7789         fatal.
7791 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
7793         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
7795 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
7797         * Makefile: Add magic to clean up correctly.
7799 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
7801         * unwind.c (FRAME_LEFT): Define.
7802         (unwind_stop): Handle old style cleanups here.
7803         (__pthread_unwind): Handle old style cleanups only if
7804         !HAVE_FORCED_UNWIND.
7805         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
7806         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
7807         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
7808         ($(objpfx)tst-cleanupx4): Likewise.
7809         * tst-cleanup4.c: New test.
7810         * tst-cleanup4aux.c: New.
7811         * tst-cleanupx4.c: New test.
7813 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
7815         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
7816         lll_mutex_*lock macros to skip atomic operations on some archs.
7818 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
7820         * sysdeps/pthread/tst-timer.c (main): Initialize
7821         sigev2.sigev_value as well.
7823 2003-10-15  Roland McGrath  <roland@redhat.com>
7825         * sysdeps/pthread/configure.in: Barf if visibility attribute support
7826         is missing.
7827         * sysdeps/pthread/configure: Regenerated.
7829 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7831         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
7832         locking macros.  No distinction between normal and mutex locking
7833         anymore.
7834         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
7835         Merge bits from lowlevelmutex.S we still need.
7836         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
7837         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7838         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
7839         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
7840         new mutex implementation.
7841         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
7842         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7843         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7844         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7845         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7846         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7847         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7848         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7849         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7850         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
7851         symbol for entry point to avoid cancellation.
7853 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
7855         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
7856         changes.
7857         (SAVE_OLDTYPE_0): Fix a typo.
7859 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
7861         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
7862         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
7864 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
7866         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
7867         correct offset.
7869 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
7871         * Makefile (tests): Add tst-cancel19.
7872         * tst-cancel19.c: New test.
7874 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
7876         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
7877         restoring of the old cancellation type.
7879 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
7881         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
7883 2003-09-27  Wolfram Gloger  <wg@malloc.de>
7885         * sysdeps/pthread/malloc-machine.h: New file
7887 2003-09-24  Roland McGrath  <roland@redhat.com>
7889         * allocatestack.c (__make_stacks_executable): Don't ignore return
7890         value from _dl_make_stack_executable.
7892 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
7894         * allocatestack.c (__make_stacks_executable): Also change
7895         permission of the currently unused stacks.
7897         * allocatestack.c (change_stack_perm): Split out from
7898         __make_stacks_executable.
7899         (allocate_stack): If the required permission changed between the time
7900         we started preparing the stack and queueing it, change the permission.
7901         (__make_stacks_executable): Call change_stack_perm.
7903         * Makefile: Build tst-execstack-mod locally.
7904         * tst-execstack-mod.c: New file.
7906 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
7908         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
7910 2003-09-23  Roland McGrath  <roland@redhat.com>
7912         * tst-execstack.c: New file.
7913         * Makefile (tests): Add it.
7914         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
7915         (LDFLAGS-tst-execstack): New variable.
7917         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
7918         whether to use PROT_EXEC for stack mmap.
7919         (__make_stacks_executable): New function.
7920         * pthreadP.h: Declare it.
7921         * init.c (__pthread_initialize_minimal_internal): Set
7922         GL(dl_make_stack_executable_hook) to that.
7924 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
7926         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
7927         recommendation from AMD re avoidance of lock prefix.
7929 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
7931         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
7932         lll_futex_timed_wait instead of lll_futex_wait.
7933         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
7934         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
7935         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
7936         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
7937         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
7938         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
7939         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
7940         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
7941         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
7942         Completely revamp the locking macros.  No distinction between
7943         normal and mutex locking anymore.
7944         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
7945         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
7946         __lll_lock_timedwait): Fix prototypes.
7947         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
7948         __lll_lock_timedwait): Likewise.
7949         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
7950         macros, add __builtin_expect.
7951         (lll_mutex_timedlock): Likewise.  Fix return value.
7952         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
7953         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
7954         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
7955         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
7956         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
7957         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
7958         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
7959         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
7961 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
7963         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7964         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
7965         operation if possible.
7967         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
7968         like jumping over the lock prefix.
7970 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
7972         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
7973         locking macros.  No distinction between normal and mutex locking
7974         anymore.
7975         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7976         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
7977         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7978         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
7979         locking.  Merge bits from lowlevelmutex.S we still need.
7980         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
7981         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
7982         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
7983         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
7984         * Makefile (routines): Remove libc-lowlevelmutex.
7985         (libpthread-rountines): Remove lowlevelmutex.
7986         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
7987         for new mutex implementation.
7988         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7989         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7990         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7991         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7992         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7993         Likewise.
7994         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7995         Likewise.
7996         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
7997         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7998         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
7999         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
8000         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8001         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8002         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8003         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
8004         Likewise.
8005         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
8006         Likewise.
8007         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
8008         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8009         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8010         Don't use requeue.
8011         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8012         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
8014 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
8016         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
8017         in parameters of asm with output parameters.
8019         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
8020         type of DECR parameter to int.
8021         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
8023 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
8025         * tst-attr3.c (tf, do_test): Print stack start/end/size and
8026         guardsize for each thread.
8028 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
8030         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
8031         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
8032         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
8034         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
8035         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
8036         NULL.
8037         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
8038         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
8039         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
8040         (pthread_getaffinity_np): Add hidden_def.
8042         * Makefile (tests): Add tst-attr3.
8043         * tst-attr3.c: New test.
8045         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
8047 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
8049         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
8050         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
8052 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
8054         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
8055         * tst-align.c: Include tst-stack-align.h.
8056         (tf, do_test): Use TEST_STACK_ALIGN macro.
8058 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
8060         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
8061         variable.
8063 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
8065         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
8066         stack-related values for the initial thread.
8068 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
8070         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
8072 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
8074         * pthread_mutex_lock.c: Minor code rearrangements.
8076 2003-09-05  Roland McGrath  <roland@redhat.com>
8078         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
8079         Instead, include ../nptl_db/db_info.c to do its magic.
8080         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
8081         (__pthread_pthread_key_2ndlevel_size): Likewise.
8082         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
8083         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
8084         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
8085         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
8086         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
8087         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
8088         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
8089         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
8090         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
8091         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
8092         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
8093         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
8094         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
8095         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
8096         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
8097         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
8098         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
8100 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
8102         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
8103         of pthread_t to be compatible with LT.
8104         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
8105         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8106         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8107         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8108         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
8109         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8110         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
8112 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
8114         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
8116 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
8118         * unwind-forcedunwind.c: Move to...
8119         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
8120         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
8121         * sysdeps/pthread/jmpbuf-unwind.h: New file.
8122         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
8123         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
8124         * unwind.c: Include jmpbuf-unwind.h.
8125         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
8127 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
8129         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
8130         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
8131         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
8132         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
8133         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
8134         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
8135         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
8136         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
8137         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
8138         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
8139         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
8140         function.
8141         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
8142         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
8143         * Makefile (tests): Add tst-stack2.
8144         * tst-stack2.c: New test.
8145         * tst-stack1.c: Include limits.h and sys/param.h.
8146         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
8148         * pthread_condattr_setpshared.c: Include errno.h.
8149         (pthread_condattr_setpshared): Return EINVAL if pshared
8150         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
8152         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
8153         defined symbol for entry point to avoid cancellation.
8154         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
8155         Likewise.
8156         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
8157         Likewise.
8158         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
8159         Likewise.
8160         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
8161         Likewise.
8162         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
8163         Likewise.
8164         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
8165         __close_nocancel, __read_nocancel, __write_nocancel,
8166         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
8167         libpthread.so or librt.so, define to corresponding function
8168         without _nocancel suffix.
8169         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
8170         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
8171         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
8173         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
8175 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
8177         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
8178         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
8180         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
8181         in subsections has a symbol associated with it.
8183         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
8184         defined symbol for entry point to avoid cancellation.
8185         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
8187 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
8189         * Makefile (tests): Add tst-tls5.
8190         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
8191         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
8192         ($(objpfx)tst-tls5): New.
8193         ($(objpfx)tst-tls6.out): Likewise.
8194         (tests): Depend on $(objpfx)tst-tls6.out.
8195         * tst-tls3.c: Include stdint.h and pthreaddef.h.
8196         (do_test): Check pthread_self () return value alignment.
8197         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
8198         (tf): Check pthread_self () return value alignment.
8199         * tst-tls5.c: New test.
8200         * tst-tls5.h: New.
8201         * tst-tls5mod.c: New.
8202         * tst-tls5moda.c: New.
8203         * tst-tls5modb.c: New.
8204         * tst-tls5modc.c: New.
8205         * tst-tls5modd.c: New.
8206         * tst-tls5mode.c: New.
8207         * tst-tls5modf.c: New.
8208         * tst-tls6.sh: New test.
8210         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
8211         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
8212         * init.c (pthread_functions): Initialize them.
8213         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
8214         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
8215         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
8216         pthread_cond_timedwait@@GLIBC_2.3.2.
8218 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
8220         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
8221         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
8222         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
8223         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
8224         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
8225         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
8227         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
8229         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
8230         _POSIX_THREAD_PRIORITY_SCHEDULING.
8231         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
8233 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
8235         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
8236         nested function, use static inline function from libio.h.
8237         Code by Richard Henderson.
8239         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
8240         weak.
8242 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
8244         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
8245         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
8246         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
8247         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
8248         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
8249         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
8250         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
8251         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
8252         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
8253         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
8254         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
8255         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
8256         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
8257         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
8258         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
8259         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
8260         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
8261         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
8262         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
8263         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
8264         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
8265         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
8266         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
8267         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
8268         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
8269         * sysdeps/sparc/tls.h: New file.
8270         * sysdeps/sparc/tcb-offsets.sym: New file.
8271         * sysdeps/sparc/Makefile: New file.
8272         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
8273         * init.c [__sparc__] (__NR_set_tid_address): Define.
8275 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
8277         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
8278         _IO_release_lock): Define.
8280 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
8282         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
8283         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
8285 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
8287         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
8288         (__pthread_cleanup_class): Add missing return types of member
8289         functions.
8291 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
8293         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8294         (lll_mutex_unlock_force): Add memory barrier between store and futex
8295         syscall.
8297 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
8299         * tst-cancel4.c (do_test): Also unlink tempfname and remove
8300         tempmsg in first loop.
8302 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
8304         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8305         _POSIX_THREAD_PRIORITY_SCHEDULING.
8306         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8308 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
8310         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
8311         (__rtld_lock_default_lock_recursive,
8312         __rtld_lock_default_unlock_recursive): Define.
8313         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
8314         __rtld_lock_unlock_recursive): Define using
8315         GL(_dl_rtld_*lock_recursive).
8316         * init.c (__pthread_initialize_minimal_internal): Initialize
8317         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
8318         Lock GL(_dl_load_lock) the same number of times as
8319         GL(_dl_load_lock) using non-mt implementation was nested.
8321         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
8322         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
8324 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
8326         * tst-cancel17.c (do_test): Make len2 maximum of page size and
8327         PIPE_BUF.
8329 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
8331         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
8333 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
8335         * sysdeps/pthread/createthread.c (do_clone): Move error handling
8336         to first syscall error check.  Move syscall error check for tkill
8337         into __ASSUME_CLONE_STOPPED #ifdef.
8339 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
8341         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
8342         is not defined, do explicit synchronization.
8343         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
8344         is not defined also unlock pd->lock for non-debugging case in case
8345         it is necessary.
8346         * pthread_create.c (start_thread): Always get and release pd->lock
8347         if __ASSUME_CLONE_STOPPED is not defined.
8348         (start_thread_debug): Removed.  Adjust users.
8349         * allocatestack.c (allocate_stack): Always initialize lock if
8350         __ASSUME_CLONE_STOPPED is not defined.
8351         * Makefile (tests): Add tst-sched1.
8352         * tst-sched1.c: New file.
8354         * sysdeps/pthread/createthread.c (do_clone): Only use
8355         sched_setschduler and pass correct parameters.
8357 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
8359         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
8360         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
8361         PTHREAD_STACK_MIN in comments.
8363 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
8365         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8366         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
8367         argument.
8368         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
8369         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
8370         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
8371         (__pthread_cleanup_upto): Fix prototype.
8372         (_longjmp_unwind): Adjust caller.
8373         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
8374         Change second argument to const struct pointer.
8375         * tst-sem8.c (main): Remove unused s2 and s3 variables.
8376         * tst-sem9.c (main): Likewise.
8377         * unwind.c: Include string.h for strlen prototype.
8379 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
8381         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8382         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
8383         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
8384         Define HAVE_CMOV.
8385         Patch by Nicholas Miell <nmiell@attbi.com>.
8387 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
8389         * init.c (__pthread_initialize_minimal_internal): Initialize
8390         GL(dl_init_static_tls).
8391         * pthreadP.h (__pthread_init_static_tls): New prototype.
8392         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
8393         New functions.
8394         * Makefile (tests): Add tst-tls4.
8395         (modules-names): Add tst-tls4moda and tst-tls4modb.
8396         ($(objpfx)tst-tls4): Link against libdl and libpthread.
8397         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
8398         tst-tls4modb.so.
8399         * tst-tls4.c: New file.
8400         * tst-tls4moda.c: New file.
8401         * tst-tls4modb.c: New file.
8403 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
8405         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
8406         before __timer_dealloc.
8407         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
8408         Don't call list_unlink.
8410 2003-07-29  Roland McGrath  <roland@redhat.com>
8412         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
8414 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
8416         * tst-cancel17.c (do_test): Check if aio_cancel failed.
8417         Don't reuse struct aiocb A if it failed.
8418         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
8419         not just one byte, as that does not block.
8421 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
8423         * sysdeps/pthread/unwind-resume.c: New file.
8424         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
8425         unwind-resume in csu subdir.
8426         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
8427         exceptions.
8428         (librt-sysdep_routines, librt-shared-only-routines): Add
8429         rt-unwind-resume.
8430         * sysdeps/pthread/rt-unwind-resume.c: New file.
8431         * unwind-forcedunwind.c: New file.
8432         * Makefile (libpthread-routines): Add unwind-forcedunwind.
8433         (libpthread-shared-only-routines): Likewise.
8434         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
8435         * pthreadP.h (pthread_cancel_init): New prototype.
8436         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
8438         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
8439         attr argument const struct pthread_attr *.
8441         * res.c (__res_state): Return __resp.
8442         * descr.h: Include resolv.h.
8443         (struct pthread): Add res field.
8444         * pthread_create.c: Include resolv.h.
8445         (start_thread): Initialize __resp.
8446         * Makefile (tests): Add tst-_res1.
8447         (module-names): Add tst-_res1mod1, tst-_res1mod2.
8448         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
8449         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
8450         libpthread.
8451         * tst-_res1.c: New file.
8452         * tst-_res1mod1.c: New file.
8453         * tst-_res1mod2.c: New file.
8455 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
8457         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
8459         * Makefile: Define various *-no-z-defs variables for test DSOs
8460         which has undefined symbols.
8462 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
8464         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
8465         Retry if the stwcx fails to store once_control.
8467 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
8469         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
8470         pthread_attr_setaffinity.
8471         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
8472         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
8473         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
8474         * pthread_attr_destroy.c: Free cpuset element if allocated.
8475         * pthread_create.c: Pass iattr as additional parameter to
8476         create_thread.
8477         * sysdeps/pthread/createthread.c: If attribute is provided and
8478         a new thread is created with affinity set or scheduling parameters,
8479         start thread with CLONE_STOPPED.
8480         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
8481         pthread_attr_setaffinity.
8482         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
8483         cpuset element.
8485 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
8487         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
8489 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
8491         * sysdeps/pthread/configure.in: Require CFI directives also for
8492         ppc and s390.
8494 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
8496         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
8497         Add cfi directives.
8499 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
8501         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
8502         CLEANUP_JMP_BUF.
8503         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
8504         registers as variables.  Call __pthread_mutex_unlock_usercnt.
8505         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8506         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
8507         not self pointer in __writer.  Compare with TID to determine
8508         deadlocks.
8509         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8510         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
8511         Likewise.
8512         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
8513         Likewise.
8514         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
8515         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8516         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
8517         macros also when compiling librt.
8519 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
8521         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
8522         -fasynchronous-unwind-tables.
8523         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
8524         (PSEUDO): Add cfi directives.
8525         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
8526         Likewise.
8527         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
8528         Likewise.
8530 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
8532         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
8533         __pthread_unregister_cancel): Add prototypes and hidden_proto.
8534         * unwind.c (__pthread_unwind_next): Add hidden_def.
8535         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
8536         Likewise.
8537         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
8538         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
8539         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
8540         Likewise.
8541         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
8542         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
8543         Likewise.
8544         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
8545         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
8546         __pthread_unregister_cancel and __pthread_unwind_next.
8548 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
8550         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
8551         different symbol for the cancellation syscall wrapper and
8552         non-cancellation syscall wrapper.
8553         (PSEUDO_END): Define.
8555 2003-07-05  Richard Henderson  <rth@redhat.com>
8557         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
8558         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
8559         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8560         return actual return value from the syscall, not 0.
8562 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
8564         * descr.h (struct pthread): Add pid field.
8565         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
8566         (__reclaim_stacks): Likewise.
8567         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
8568         also check for PID of the signal source.
8569         (__pthread_initialize_minimal_internal): Also initialize pid field
8570         of initial thread's descriptor.
8571         * pthread_cancel.c: Use tgkill instead of tkill if possible.
8572         * sysdeps/unix/sysv/linux/fork.c: Likewise.
8573         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
8574         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8575         * sysdeps/unix/sysv/linux/raise.c: Likewise.
8577 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
8579         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
8580         Fix use of parameter.
8581         (__libc_cleanup_pop): Likewise.
8583 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
8585         * init.c (sigcancel_handler): Change parameters to match handler
8586         for SA_SIGACTION.  Check signal number and code to recognize
8587         invalid invocations.
8589 2003-07-03  Roland McGrath  <roland@redhat.com>
8591         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
8592         Apply sizeof (struct pthread) bias to r13 value.
8594 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
8596         * sysdeps/pthread/configure.in: Require CFI directives.
8598         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
8599         definition.
8600         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
8601         libpthread compilation.
8602         * unwind.c (__pthread_unwind): Add hidden_def.
8603         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
8605 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
8607         * libc-cancellation.c (__libc_cleanup_routine): Define.
8608         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
8609         (__pthread_cleanup_pop): Define.
8611 2003-07-01  Richard Henderson  <rth@redhat.com>
8613         * sysdeps/alpha/elf/pt-initfini.c: New file.
8614         * sysdeps/alpha/pthread_spin_lock.S: New file.
8615         * sysdeps/alpha/pthread_spin_trylock.S: New file.
8616         * sysdeps/alpha/pthreaddef.h: New file.
8617         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
8618         * sysdeps/alpha/tls.h: New file.
8619         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
8620         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
8621         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
8622         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
8623         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
8624         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
8625         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
8626         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
8627         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
8628         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
8630 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
8632         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
8633         cleanup support and unwind info.
8635 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
8637         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
8638         Use correct cleanup handler registration.  Add unwind info.
8639         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
8640         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
8641         * tst-once3.c: Add cleanup handler and check it is called.
8642         * tst-once4.c: Likewise.
8643         * tst-oncex3.c: New file.
8644         * tst-oncex4.c: New file.
8645         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
8647 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
8649         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
8651 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
8653         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
8654         (tf_msgsnd): Likewise.
8656         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
8657         premature returns a bit more.
8659 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
8661         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
8662         definition to the front.
8664         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
8665         the cleanup functions to make the names unique.  Fix dwarf opcode
8666         un unwind table.
8667         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
8668         functions to make the names unique.  Fix CFA offset for two blocks.
8670 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
8672         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
8673         missing closing braces.
8674         Patch by Christophe Saout <christophe@saout.de>.
8676 2003-06-24  Roland McGrath  <roland@redhat.com>
8678         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
8680 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
8682         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
8683         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
8685         * pthreadP.h: Declare __find_thread_by_id.
8686         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
8687         * pthread_clock_gettime.c: Allow using other thread's clock.
8688         * pthread_clock_settime.c: Likewise.
8689         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8690         * Makefile: Add rules to build and run tst-clock2.
8691         * tst-clock2.c: New file.
8693 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
8695         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
8696         to use exception-based cleanup handler.
8697         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8699         * tst-cond8.c (ch): Announce that we are done.
8701         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
8703         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
8704         Also test aio_suspend with timeout value.
8706 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
8708         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
8709         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
8710         attribute_hidden.
8712         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
8713         (__pthread_mutex_lock_internal): Likewise.
8714         (__pthread_mutex_unlock_internal): Likewise.
8715         (__pthread_mutex_unlock_usercnt): Declare.
8716         * pthread_mutex_destroy.c: Always fail if used in any way.
8717         * pthread_mutex_init.c: Update comment.
8718         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
8719         * pthread_mutex_timedlock.c: Adjust __nusers.
8720         * pthread_mutex_trylock.c: Adjust __nusers.
8721         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
8722         and public interfaces are wrapper with pass additional parameter.
8723         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
8724         parameter zero.
8725         * tst-mutex8.c: New file.
8726         * Makefile (tests): Add tst-mutex8.
8727         * sysdeps/pthread/pthread_cond_timedwait.c: Call
8728         __pthread_mutex_unlock_usercnt.
8729         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8730         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8731         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8732         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8733         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8734         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
8735         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8736         Add __nusers.
8737         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8738         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8739         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8740         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8741         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8743         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
8744         * pthread_mutex_timedlock.c: Likewise.
8745         * pthread_mutex_trylock.c: Adjust __nusers.
8746         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
8747         * tst-mutex9.c: New file.
8748         * Makefile (tests): Add tst-mutex9.
8749         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
8750         * sysdeps/ia64/tls.h: Likewise.
8751         * sysdeps/powerpc/tls.h: Likewise.
8752         * sysdeps/s390/tls.h: Likewise.
8753         * sysdeps/sh/tls.h: Likewise.
8754         * sysdeps/x86_64/tls.h: Likewise.
8755         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8756         Change type of __owner.
8757         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8758         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8759         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8760         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8761         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8763 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
8765         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
8766         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
8768         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
8769         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
8770         instead of nr to lll_futex_wake.  Only set errno and return -1
8771         if err < 0.
8773         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
8774         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8775         return actual return value from the syscall, not 0.
8777 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
8779         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
8780         find a random value.
8781         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
8782         errno==EIDRM.
8784         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
8785         compat_timer_settime.
8786         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
8787         compat_timer_gettime.
8788         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
8789         compat_timer_getoverrun.
8790         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
8791         compat_timer_delete.
8793         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
8794         error-checking mutex detect busy mutexes.
8796 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
8798         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
8799         Add ax to clobber list.
8800         (lll_mutex_cond_lock): Likewise.
8801         (lll_mutex_unlock): Likewise.
8802         (lll_lock): Likewise.
8803         (lll_unlock): Likewise.
8805         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
8806         * tst-cancel18.c: New file.
8807         * tst-cancelx18.c: New file.
8809         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
8810         and tcdrain.
8812         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
8813         * tst-cancel17.c: New file.
8814         * tst-cancelx17.c: New file.
8816         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
8817         * sysdeps/unix/sysv/linux/sigwait.c: New file.
8818         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
8820         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
8822 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
8824         * sysdeps/pthread/createthread.c (create_thread): Set
8825         header.multiple_threads unconditionally.
8826         * allocatestack.c (allocate_stack): Likewise.
8827         * descr.h (struct pthread): Add header.multiple_threads
8828         unconditionally.
8829         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
8830         Define for librt.  #error if neither libpthread, libc nor librt.
8831         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
8832         Likewise.
8833         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
8834         CDISABLE): Likewise.
8835         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
8836         CDISABLE): Likewise.
8837         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
8838         CDISABLE): Likewise.
8839         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
8840         CDISABLE): Likewise.  Access header.multiple_threads outside of
8841         libc and libpthread.
8842         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
8843         Likewise.
8844         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
8845         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
8847 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
8849         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
8850         Also test early cancellation before the thread reaches the cancellation
8851         point.
8853         * Makefile: Compile forward.c with exceptions.
8855         * sysdeps/unix/sysv/linux/sleep.c: New file.
8857 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
8859         * Makefile: Add CFLAGS definition to compile function wrappers
8860         duplicated from libc with exceptions.
8861         * tst-cancel4.c: Also check cancellation handlers.
8863         * Makefile: Add rules to build and run tst-cancel16 and
8864         tst-cancelx16.  Add missing CFLAGS definitions.
8865         * tst-cancel16.c: New file.
8866         * tst-cancelx16.c: New file.
8868 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
8870         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
8871         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
8872         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
8873         (DL_SYSINFO_IMPLEMENTATION): Likewise.
8875         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
8876         (LIBC_CANCEL_RESET): Likewise.
8877         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
8878         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
8879         librt-cancellation.
8880         (CFLAGS-libcrt-cancellation.c): Define.
8881         * sysdeps/pthread/librt-cancellation.c: New file.
8882         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
8883         macros also when compiling librt.
8884         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
8885         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
8886         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
8887         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
8888         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
8889         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
8890         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
8892         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
8893         compat_timer_create.
8895 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
8897         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
8899         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
8900         __register_atfork.
8901         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
8902         Add libc_hidden_def.
8904 2003-06-13  Roland McGrath  <roland@redhat.com>
8906         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
8907         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
8909 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
8911         * allocatestack.c (queue_stack): Always inline.
8912         * ptreadhP.h (__do_cancel): Likewise.
8914 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
8916         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
8917         a typo.
8919 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
8921         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8922         (__pthread_cond_signal): Remove incorrect second addition for
8923         cond_lock!=0.
8925 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
8927         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8928         (__pthread_cond_signal): Use correct futex pointer in
8929         __lll_mutex_lock_wait call.
8931         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8932         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
8934 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
8936         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
8937         cancelable.
8938         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
8939         Likewise.
8941         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
8942         hand-written CFI generation code.  Since ENTRY/END also initiated
8943         CFI frames this caused two CFI sets to be generated.
8945 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
8947         * cleanup_routine.c: New file.
8948         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
8949         * sysdeps/pthread/pthread.h: Add support for fully exception-based
8950         cleanup handling.
8951         * Makefile (libpthread-routines): Add cleanup_routine.
8952         Add more CFLAGS variables to compile with exceptions.  Add comments
8953         why which file needs unwind tables.
8954         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
8955         tests.
8956         * tst-cancelx1.c: New file.
8957         * tst-cancelx2.c: New file.
8958         * tst-cancelx3.c: New file.
8959         * tst-cancelx4.c: New file.
8960         * tst-cancelx5.c: New file.
8961         * tst-cancelx6.c: New file.
8962         * tst-cancelx7.c: New file.
8963         * tst-cancelx8.c: New file.
8964         * tst-cancelx9.c: New file.
8965         * tst-cancelx10.c: New file.
8966         * tst-cancelx11.c: New file.
8967         * tst-cancelx12.c: New file.
8968         * tst-cancelx13.c: New file.
8969         * tst-cancelx14.c: New file.
8970         * tst-cancelx15.c: New file.
8971         * tst-cleanupx0.c: New file.
8972         * tst-cleanupx0.expect: New file.
8973         * tst-cleanupx1.c: New file.
8974         * tst-cleanupx2.c: New file.
8975         * tst-cleanupx3.c: New file.
8977         * tst-cleanup0.c: Make standard compliant.
8978         * tst-cleanup1.c: Likewise.
8980         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
8981         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
8982         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8983         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8984         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8985         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8986         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
8987         CLEANUP_JMP_BUF.
8988         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
8989         * tst-cancel12.c: New file.
8990         * tst-cancel13.c: New file.
8991         * tst-cancel14.c: New file.
8992         * tst-cancel15.c: New file.
8993         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
8994         and tst-cancel15.
8996         * tst-cancel1.c: Add some comments.
8998         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
8999         timeout correctly.
9001 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
9003         * Makefile (CFLAGS-pthread_cancel.c): Define.
9005 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
9007         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
9008         Change type of __writer element to int.
9009         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9010         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9011         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9012         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9013         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9014         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
9015         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
9016         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
9017         Compare with TID to determine deadlocks.
9018         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
9019         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9020         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
9021         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9022         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
9023         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9024         Likewise.
9025         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9026         Likewise.
9027         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9028         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
9029         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
9030         Likewise.
9031         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
9032         Likewise.
9033         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
9034         * Makefile (tests): Add tst-rwlock12.
9035         * tst-rwlock12.c: New file.
9037 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
9039         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
9040         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
9041         Remove bogus hidden_proto.
9042         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
9043         Likewise.
9044         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
9045         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
9046         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
9047         ___lll_mutex_timedlock): Likewise.
9049 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
9051         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9052         (__pthread_cond_signal): Add some code to eventually handle
9053         cond_lock!=0.
9055 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
9057         * Makefile (tests): Add tst-exec4.
9058         (tst-exec4-ARGS): Define.
9059         * tst-exec4.c: New file.
9061 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
9063         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
9064         Also fail if tv_nsec < 0.
9065         (__lll_timedwait_tid): Likewise.
9066         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
9067         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
9068         Likewise.
9069         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
9070         Likewise.
9071         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
9072         Likewise.
9073         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
9074         Likewise.
9075         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
9076         Likewise.
9077         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
9078         Likewise.
9080         * Makefile (tests): Add tst-sem8 and tst-sem9.
9081         * tst-sem8.c: New file.
9082         * tst-sem9.c: New file.
9083         * sem_open.c: Fix creation of in_use record if the file exists but
9084         no internal record.
9086         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
9087         definitions.
9089         * sysdeps/pthread/timer_create.c (timer_create): In case
9090         evp==NULL, assign timer ID to sival_ptr.
9092         * descr.h (struct pthread_unwind_buf): Change type of prev element to
9093         struct pthread_unwind_buf *.
9094         (struct pthread): Likewise for cleanup_jmp_buf element.
9096         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
9097         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
9098         * unwind.c (__pthread_unwind_next): Likewise.
9100 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
9102         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9103         (lll_futex_timed_wait): Use int for futex value parameter.
9104         (lll_futex_wake): Likewise.
9105         (lll_futex_requeue): Likewise.
9107         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
9108         Replace one memory operation with one register operation.
9110         * tst-join4.c (do_test): Fix error message.
9112         * tst-rwlock6.c (do_test): Use correct format specifier.
9114         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9115         (__lll_mutex_lock_wait): Replace one memory operation with one
9116         register operation.
9117         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
9118         (__lll_mutex_lock_wait): Likewise.
9120         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9121         (__lll_mutex_cond_lock): Add one to value parameter of
9122         __lll_lock_wait to reflect reality in the futex syscall.
9123         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
9124         (lll_mutex_cond_lock): Likewise.
9126 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
9128         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
9129         New function.
9130         (lll_mutex_cond_lock): Define.
9132 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
9134         * Makefile (tests): Add tst-signal6.
9135         * tst-signal6.c: New file.
9137         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
9138         (__lll_mutex_unlock_force): New function
9139         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
9141         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9142         (__lll_mutex_unlock_force): New function.
9143         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
9145         * tst-rwlock7.c (do_test): Use correct format specifier.
9147         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
9148         Find break parameter in correct asm argument.
9150 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
9152         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
9153         Remove out4.
9154         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
9155         error occured.
9156         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
9157         Add __mutex.
9158         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
9159         lll_futex_requeue, lll_mutex_unlock_force): Define.
9161 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
9163         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9164         (pthread_cond_t): Add __mutex.
9165         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
9166         lll_futex_requeue, lll_mutex_unlock_force): Define.
9168 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
9170         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
9171         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
9172         Add __mutex field.
9173         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
9174         Define.
9175         (lll_futex_wait, lll_futex_wake): Define.
9176         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
9177         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
9178         FUTEX_REQUEUE instead of FUTEX_WAIT.
9179         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
9180         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
9181         mutex which was used in condvar structure.  Call
9182         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
9183         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
9185         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
9186         include tcb-offsets.h.  Read wakeup value in locked region.
9187         Use the value of gbr register as THREAD_ID.
9188         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9189         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9190         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9192         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
9193         macros.
9195 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
9197         * sysdeps/pthread/pthread_cond_broadcast.c
9198         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
9200 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
9202         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
9203         typo in register name.
9204         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
9205         correctly.  Actually use requeue.  Little optimization.
9206         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
9207         mutex address early.  Handle cancellation state as 32-bit value.
9208         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9209         Remove unnecessary label.
9211 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
9213         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
9214         instead of FUTEX_WAIT.
9215         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
9216         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9217         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9218         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
9219         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
9220         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
9221         used in condvar structure.  Call __pthread_mutex_cond_lock instead
9222         of __pthread_mutex_lock_internal.
9223         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9224         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9225         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
9226         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
9227         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9228         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9229         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
9230         Add pthread_mutex_cond_lock.
9231         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
9232         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
9233         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
9234         lll_mutex_cond_lock.
9235         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
9236         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9237         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9238         Add __mutex field.
9239         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9240         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9242         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
9243         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
9245         * pthreadP.h: Declare __pthread_mutex_cond_lock.
9246         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
9247         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
9248         macro don't define aliases.
9250         * cancellation.c: Remove __pthread_enable_asynccancel_2.
9251         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
9252         * sysdeps/pthread/pthread_cond_timedwait.c: Use
9253         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
9254         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9255         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9256         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
9257         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9258         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9260 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
9262         * sem_open.c: Fix one endless loop.  Implement correct semantics
9263         wrt opening the same semaphore more then once.
9264         * sem_close.c: Adjust for sem_open change.
9265         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
9266         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
9267         * Makefile (tests): Add tst-sem7.
9268         * tst-sem7.c: New file.
9270 2003-05-16  Roland McGrath  <roland@redhat.com>
9272         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
9273         uninitialized variable braino.
9275 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
9277         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
9278         test for syscall availability.
9280         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
9281         __no_posix_timers to -1 if the syscalls don't exist.
9283         * pthread_join.c (pthread_join): Set tid field of the joined
9284         thread to -1.  This isn't necessary but helps to recognize some
9285         error conditions with almost no cost.
9287         * allocatestack.c (FREE_P): Also negative values indicate an
9288         unused stack.
9290         * unwind.c: Include <unistd.h>.
9292 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
9294         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
9296 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
9298         * Makefile (crti-objs, crtn-objs): New variables.
9299         (omit-deps, extra-objs): Add crtn.
9300         ($(objpfx)libpthread.so): Depend on both crti and crtn
9301         and links to them in multidir.
9302         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
9304 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
9306         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
9307         (lll_mutex_unlock): Use atomic_exchange_rel.
9309 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
9311         * cond-perf.c (cons): Add missing locking around setting of alldone.
9313 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
9315         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
9316         related macros.
9317         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9319 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
9321         * tst-sem6.c: New file.
9322         * Makefile (tests): Add tst-sem6.
9324         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
9325         Use atomic_exchange_rel instead of atomic_exchange.
9326         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
9327         Likewise.
9329         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
9330         code for lll_futex_wait and lll_futex_wake in static apps.  Use
9331         vsyscall is possible.
9333         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
9334         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
9335         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
9336         pthread_setaffinity_np.
9337         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
9338         and pthread_setaffinity_np.
9339         * Makefile (libpthread-routines): Add pthread_getaffinity and
9340         pthread_setaffinity.
9342         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
9343         use it in case mmap to allocate the stack fails.
9344         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
9345         ARCH_MAP_FLAGS here.
9346         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
9347         ARCH_RETRY_MMAP.
9349 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
9351         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
9352         handler implementation.  It is now lockless in fork().
9353         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
9354         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
9355         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
9356         declare the __fork_*_lists.
9357         (struct fork_handler): Include pointers to all three functions.
9358         Add next, refcntr and need_signal elements.
9359         (__fork_handlers): New declaration.
9360         (__register_atfork_malloc): Remove declaration.
9361         (HAVE_register_atfork_malloc): Remove definition.
9362         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
9363         __pthread_child_handler variable.
9364         (__libc_pthread_init): Use __register_atfork instead of explicitly
9365         adding to the list.
9366         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
9367         and lll_futex_wake.
9368         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9370         * unwind.c (unwind_cleanup): Print error message and then abort.  This
9371         function must never be reached.
9373         * cond-perf.c: New file.
9375 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
9377         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
9379 2003-05-04  Roland McGrath  <roland@redhat.com>
9381         * Makefile ($(objpfx)../libc.so): New target.
9383 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
9385         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9386         (pthread_condattr_t): Size is only an int, don't use long for
9387         alignment.
9388         (pthread_mutexattr_t): Likewise.
9389         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9390         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9391         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9393 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
9395         * sysdeps/i386/tls.h: Define THREAD_ID.
9396         * sysdeps/ia64/tls.h: Likewise.
9397         * sysdeps/powerpc/tls.h: Likewise.
9398         * sysdeps/s390/tls.h: Likewise.
9399         * sysdeps/sh/tls.h: Likewise.
9400         * sysdeps/x86_64/tls.h: Likewise.
9401         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
9402         record ownership.
9403         * pthread_mutex_timedlock.c: Likewise.
9404         * pthread_mutex_trylock.c: Likewise.
9405         * pthread_mutex_unlock.c: Likewise.
9406         * pthread_rwlock_trywrlock.c: Likewise.
9407         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
9408         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9409         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
9410         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9412         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
9413         flag.
9415 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
9417         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9418         (__SIZEOF_PTHREAD_COND_T): Define to 48.
9419         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
9420         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
9421         Make __align long long instead of long.
9422         (pthread_rwlock_t): Formatting.
9423         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
9424         (pthread_rwlock_t): Formatting.
9425         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9426         (pthread_cond_t): Make __align long long instead of long.
9427         (pthread_rwlock_t): Move __flags field to the same position as in
9428         linuxthreads.
9430 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
9432         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
9433         * tst-rwlock7.c (do_test): Likewise.
9435 2003-04-26  Roland McGrath  <roland@redhat.com>
9437         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
9439 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
9441         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
9442         sizeof (struct pthread).
9443         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
9444         1 struct pthread.
9445         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
9446         to 0.
9447         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
9448         struct pthread.
9449         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
9450         to 32-bit bytes.
9451         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
9452         tcbp.
9453         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
9454         unneccessarily.
9455         (NO_TLS_OFFSET): Define.
9456         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
9457         add TLS_TCB_SIZE unnecessarily.
9459 2003-04-22  Roland McGrath  <roland@redhat.com>
9461         * Makeconfig (shared-thread-library): Reverse link order to work
9462         around linker bug.
9464 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
9466         * semaphore.h: Fix typo in comment.
9468 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
9470         * sysdeps/pthread/sigfillset.c: New file.
9472         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
9473         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
9474         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
9475         * sysdeps/pthread/sigaction.c: Likewise.
9476         * sysdeps/pthread/sigprocmask.c: New file.
9477         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
9478         __SIGRTMIN+1.
9479         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9480         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
9481         in this case.
9483 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
9485         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9486         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
9488         * sysdeps/unix/sysv/linux/unregister-atfork.c
9489         (__unregister_atfork): Don't free memory not allocated dynamically.
9491         * semaphore.h: Remove __THROW marker from cancellation points.
9492         * nptl/sysdeps/pthread/pthread.h: Likewise.
9494 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
9496         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
9497         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
9498         __THROW.
9500 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
9502         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
9504 2003-04-15  Roland McGrath  <roland@redhat.com>
9506         * forward.c (__pthread_unwind): Tweak to avoid warning.
9508 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
9510         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
9512 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
9514         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
9515         overflow CFA advance instructions.
9516         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9518 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
9520         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
9521         * sysdeps/i386/pthread_spin_lock.c: Likewise.
9522         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
9523         defined.
9525         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
9526         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
9527         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
9528         DW_CFA_advance_loc for .Laddl-.Lsubl.
9530 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
9532         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
9533         position-independent unwind data for static libraries.
9534         Add missing unwind info.  Add comments.
9536         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
9537         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9538         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9539         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9541 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
9543         * Makefile: Make sure all cancellation points are compiled with
9544         exception and asynchronous unwind tables.
9546         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
9547         which mishandles loading of global object addresses in PIC.
9548         (THREAD_SETMEM_NC): Likewise.
9550 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
9552         * pthread.h: Define new data structure for cleanup buffer.  Declare
9553         new cleanup handler interfaces.
9554         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
9555         (struct pthread): Add cleanup_jmp_buf pointer.  Define
9556         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
9557         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
9558         it.  Declare old cleanup handler installation functions.
9559         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
9560         handling.
9561         * cleanup_defer.c: Likewise.
9562         * cleanup_compat.c: New file.  Old cleanup code.
9563         * cleanup_def_compat.c: New file.  Old cleanup code.
9564         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
9565         if own thread descriptor.
9566         * unwind.c: New file.
9567         * forward.c: Add __pthread_unwind.
9568         * init.c (pthread_functions): Add __pthread_unwind.
9569         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
9570         Add ptr___pthread_unwind.
9571         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
9572         and unwind function.
9573         * Makefile (libpthread-routines): Add cleanup_compat,
9574         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
9575         table generation if necessary.
9576         * version.c: Record whether unwind support is compiled in.
9577         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
9578         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
9579         handler interfaces.
9580         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
9581         complication to generate unwind information for syscall wrappers.
9582         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
9583         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
9584         __cleanup_fct_attribute.
9586         * Makefile: Add rules to build and run tst-cleanup0.
9587         * tst-cleanup0.c: New file.
9588         * tst-cleanup0.expect: New file.
9590         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
9591         caller.  Optimize to avoid often unecessary local variable.
9593 2003-04-11  Roland McGrath  <roland@redhat.com>
9595         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
9596         sets variable `multidir'; include that.
9597         (generated): Add it.
9598         ($(objpfx)$(multidir)/crti.o): New target.
9599         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
9601 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
9603         * tst-attr2.c (do_test): Add cast to avoid warning.
9604         * tst-mutex4.c (do_test): Likewise.
9606 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
9608         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
9609         in child.
9611 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
9613         * Makefile (tests): Add tst-detach1.
9614         * tst-detach1.c: New file.
9616 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
9618         * sysdeps/pthread/pthread.h: Remove duplicate
9619         pthread_cleanup_{push,pop} definitions.
9621         * tst-barrier2.c: Eliminate warnings.
9622         * tst-cancel4.c: Likewise.
9623         * tst-cond4.c: Likewise.
9624         * tst-cond6.c: Likewise.
9625         * tst-detach1.c: Likewise.
9626         * tst-rwlock4.c: Likewise.
9627         * tst-rwlock6.c: Likewise.
9628         * tst-rwlock7.c: Likewise.
9629         * tst-sem3.c: Likewise.
9630         * tst-spin2.c: Likewise.
9631         * tst-umask1.c: Likewise.
9633 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
9635         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
9637 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
9639         * descr.h (struct pthread): Move cancelhandling member to the front.
9641 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
9643         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
9644         malloc_parent, and malloc_child statically.
9645         (__register_atfork_malloc): New function.
9646         (free_mem): Don't free any of the malloc_* variables on the list.
9647         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
9648         Define HAVE_register_atfork_malloc.
9650 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
9652         * sysdeps/pthread/createthread.c (create_thread): Add some more
9653         comments explaining when to set multiple_threads and when not.
9655         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9656         THREAD_ATOMIC_BIT_SET if not already defined.
9657         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9658         THREAD_ATOMIC_BIT_SET:
9659         * sysdeps/x86_64/tls.h: Likewise.
9660         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
9661         THREAD_ATOMIC_CMPXCHG_VAL.
9662         (_pthread_cleanup_pop_restore): Likewise.
9663         * cancellation.c (__pthread_enable_asynccancel): Likewise.
9664         (__pthread_enable_asynccancel_2): Likewise.
9665         (__pthread_disable_asynccancel): Likewise.
9666         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9667         (__libc_disable_asynccancel): Likewise.
9668         * init.c (sigcancel_handler): Likewise.
9669         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
9670         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
9672 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
9674         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
9675         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9676         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
9677         * Makefile (tests): Add tst-cancel11.
9678         * tst-cancel11.c: New file.
9680 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
9682         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
9683         round, not the first.  Use specific_used flag instead of local
9684         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
9685         (__free_tcb): Don't call deallocate_tsd here.
9686         (start_thread): Call deallocate_tsd here.
9687         * pthread_setspecific.c: Set specific_used flag really only when
9688         needed.
9689         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
9690         * tst-tsd3.c: New file.
9691         * tst-tsd4.c: New file.
9693 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
9695         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
9696         Use atomic_exchange_and_add instead of __lll_add.
9697         (__lll_mutex_timedlock): Likewise.
9698         Patch by Ian Wienand.
9700 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
9702         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9703         (SINGLE_THREAD_P): Fix typo.
9704         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
9706 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
9708         * Makefile (tests): Add tst-align.
9709         * tst-align.c: New file.
9710         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
9712         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
9713         function correctly.
9715         * tst-tsd2.c: Add casts to avoid warnings.
9717 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
9719         * descr.h (struct pthread): Move most often used elements to the front.
9721 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
9723         * Makefile (libpthread-routines): Add pthread_atfork.
9724         (libpthread-static-only-routines): Add pthread_atfork.
9726 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
9728         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
9729         of TLS_DTV_AT_TP.
9730         (INSTALL_DTV): Add parens.
9731         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
9732         Use passed descr instead of THREAD_SELF.
9733         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
9734         (__lll_mutex_timedlock_wait): Correct expected value after
9735         spurious wakeup.
9736         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
9737         Release lock before waking up the waiters.
9738         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
9739         criteria.  Reorderstruct passed to cleanup handler.  Fix
9740         handling of cancellation and failung pthread_mutex_unlock call.
9741         Use __pthread_enable_asynccancel_2 instead of
9742         __pthread_enable_asynccancel.
9743         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
9744         Return result of lock re-get if it fails.
9745         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
9746         for __pthread_cleanup_push.
9747         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
9748         completely broken rwlock implementation.
9749         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9750         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9751         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9752         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
9753         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9754         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
9755         versioned_symbol macro.
9756         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
9757         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
9759 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
9761         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
9762         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
9763         and __helper_tid.
9764         (struct timer): Remove th and bar field.
9765         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
9766         debugging code.  Create only one helper thread.
9767         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
9768         helper thread.
9769         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9770         Renamed.  Define statically.  Use thread info from siginfo.
9771         (__helper_once): New variable.
9772         (__helper_tid): New variable.
9773         (__reset_helper_control): New function.
9774         (__start_helper_thread): New function.
9776         * pthread_create.c (start_thread): Don't use setjmp inside
9777         __builtin_expect to work around gcc bug.
9779         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
9780         timer_delete syscall fails, but not with ENOSYS, set
9781         __no_posix_timers.
9783         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
9784         (timer_settime): Fix typo.
9785         * sysdeps/unix/sysv/linux/timer_getoverr.c
9786         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
9788 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
9790         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
9791         offset of cleanupbuf.__prev.
9793 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
9795         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
9796         of included file.
9798 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
9800         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
9801         NULL provide default definition to syscall.
9803 2003-03-25  Roland McGrath  <roland@redhat.com>
9805         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
9806         (timer_id2ptr): Fix typo.
9808 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
9810         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
9811         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
9812         * sysdeps/ia64/pthreaddef.h: Likewise.
9813         * sysdeps/powerpc/pthreaddef.h: Likewise.
9814         * sysdeps/s390/pthreaddef.h: Likewise.
9815         * sysdeps/sh/pthreaddef.h: Likewise.
9816         * sysdeps/x86_64/pthreaddef.h: Likewise.
9817         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
9818         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
9819         being changed.
9820         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
9821         SIGTIMER is not unblocked.
9822         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
9823         RT signal taken.
9824         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
9825         be send.
9826         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
9827         pass pointer through as ID.
9828         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
9829         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
9830         * sysdeps/unix/sysv/linux/timer_create.c: New file.
9831         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
9832         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
9833         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
9834         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
9835         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
9836         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
9837         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
9838         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
9839         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
9840         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
9841         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
9842         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
9843         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
9844         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
9845         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
9846         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
9847         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
9848         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
9849         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
9850         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
9851         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
9852         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
9853         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
9854         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
9855         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
9856         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
9857         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
9858         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
9859         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
9860         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
9862         * pthreadP.h: Remove FRAME_LEFT definition.
9863         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
9864         already left frame.  Programs which have this problem are not POSIX
9865         compliant.
9866         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
9868 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
9870         * sysdeps/pthread/tst-timer.c: Check return values of the
9871         functions we test.
9873 2003-03-23  Roland McGrath  <roland@redhat.com>
9875         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
9876         * tst-tls3mod.c: Likewise.
9877         * tst-tls1.c: Likewise.
9878         * tst-tls2.c: Likewise.
9880         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
9881         undefined behavior.
9883         * tst-join5.c (tf1, tf2): Add a cast.
9885         * Makeconfig (includes): Append -I$(..)nptl to this variable.
9887         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
9888         Don't test anything.
9889         * tst-cond4.c: Likewise.
9890         * tst-cond6.c: Likewise.
9891         * tst-flock2.c: Likewise.
9892         * tst-mutex4.c: Likewise.
9893         * tst-rwlock4.c: Likewise.
9894         * tst-signal1.c: Likewise.
9895         * tst-spin2.c: Likewise.
9896         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
9898         * tst-mutex4.c: Use test-skeleton.c.
9899         * tst-spin2.c: Likewise.
9900         * tst-sysconf.c: Likewise.
9901         * tst-barrier2.c: Likewise.
9902         * tst-cond4.c: Likewise.
9903         * tst-cond6.c: Likewise.
9904         * tst-rwlock4.c: Likewise.
9905         * tst-unload.c: Likewise.
9906         * tst-flock2.c (do_test): Use return instead of exit.
9908 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
9910         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
9912 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
9914         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9915         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
9916         instead of __lll_compare_and_swap.
9917         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
9918         Likewise.
9919         Removed definition if __lll_compare_and_swap.
9921         * cancellation.c: Adjust for new form of compare&exchange macros.
9922         * cleanup_defer.c: Likewise.
9923         * init.c: Likewise.
9924         * libc-cancellation.c: Likewise.
9925         * old_pthread_cond_broadcast.c: Likewise.
9926         * old_pthread_cond_signal.c: Likewise.
9927         * old_pthread_cond_timedwait.c: Likewise.
9928         * old_pthread_cond_wait.c: Likewise.
9929         * pthread_cancel.c: Likewise.
9930         * pthread_create.c: Likewise.
9931         * pthread_detach.c: Likewise.
9932         * pthread_join.c: Likewise.
9933         * pthread_key_delete.c: Likewise.
9934         * pthread_setcancelstate.c: Likewise.
9935         * pthread_setcanceltype.c: Likewise.
9936         * pthread_timedjoin.c: Likewise.
9937         * pthread_tryjoin.c: Likewise.
9938         * sysdeps/pthread/createthread.c: Likewise.
9940 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
9942         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
9943         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
9944         definitions.  Replace uses with calls to atomic_* functions.
9945         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
9946         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
9947         __lll_test_and_set calls with atomic_exchange_and_add and
9948         atomic_exchange calls respectively.
9949         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
9950         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
9951         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
9952         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
9953         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
9954         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
9955         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
9957         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
9958         returns the old value.
9960 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
9962         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
9963         int for variable OLDVAL and correct inline assembler contraint.
9964         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
9965         type int for variable OLD.
9967         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
9968         only for s390-32.
9969         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
9970         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
9971         instead of multiple_threads field in the TCB.
9973 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
9975         * sysdeps/i386/i686/bits/atomic.h: Removed.
9976         * sysdeps/i386/i586/bits/atomic.h: Removed.
9977         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
9978         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
9979         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
9980         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
9981         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
9982         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
9983         * atomic.h: Removed.  Moved to glibc.
9985         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
9986         support for clock selection.
9988         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
9989         signalling waiters.
9991 2003-03-18  Roland McGrath  <roland@redhat.com>
9993         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
9994         Add __lll_rel_instr first.  Add memory clobber.
9995         (lll_mutex_unlock): Use __lll_test_and_set.
9996         From Paul Mackerras <paulus@samba.org>.
9998         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
9999         unconditionally.
10000         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
10001         (SINGLE_THREAD_P):  Add `header.' prefix.
10002         From Paul Mackerras <paulus@samba.org>.
10004         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
10005         pthread_timedjoin_np to ...
10006         (libpthread: GLIBC_2.3.3): ... here.
10007         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
10009         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
10010         Avoid shadowing VAL variable.
10012         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
10013         New macro.
10015 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
10017         * Makefile (tests): Add tst-cond11.
10018         * tst-cond11.c: New file.
10020         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
10021         struct passed to cleanup handler to eliminate one more
10022         instruction.
10023         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10025         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
10026         (pthrad_cond_t): Replace __unused field with __clock.
10028         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
10029         waken all waiters in cleanup handler.
10030         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
10031         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10033         * pthread_condattr_getclock.c: New file.
10034         * pthread_condattr_setclock.c: New file.
10035         * sysdeps/pthread/pthread.h: Declare these new functions.
10036         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
10037         * Makefile (libpthread-routines): Add the new functions.
10038         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
10039         Renamed field to value.  Document use of the bits.
10040         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
10041         change.
10042         * pthread_condattr_setpshared.c: Likewise.
10043         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
10044         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
10045         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
10046         Add __clock field.
10047         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
10048         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
10049         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
10050         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
10051         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
10052         Implement clock selection.
10053         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
10054         * pthread-errnos.sym: Add ENOSYS.
10055         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
10056         _POSIX_CLOCK_SELECTION.
10057         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
10059         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
10060         invalid .size directive.
10062 2003-03-17  Roland McGrath  <roland@redhat.com>
10064         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
10065         Formatting tweaks.
10067 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
10069         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
10070         Use __lll_add instead of spelling it out.  Use protected symbol names.
10071         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
10072         Use __lll_add.
10073         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
10074         Renamed from lll_compare_and_swap.  Use new name where necessary.
10075         (__lll_add): Defined.
10076         (__lll_dec_if_positive): Defined.
10077         (__lll_test_and_set): Defined.
10078         * sysdeps/ia64/pthread_spin_init.c: Removed.
10079         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
10080         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
10081         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
10082         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
10083         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
10084         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
10085         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
10086         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
10087         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
10088         __sync_lock_release_si.
10089         Patch by Jakub Jelinek.
10091         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
10092         Fix timeout handling.
10093         (__lll_timedwait_tid): Likewise.
10094         (lll_unlock_wake_cb): Wake up other waiters if necessary.
10095         Patch by Jakub Jelinek.
10097         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
10099 2003-03-17  Roland McGrath  <roland@redhat.com>
10101         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
10102         * sysdeps/pthread/pthread_spin_init.c: New file.
10103         * sysdeps/pthread/pthread_spin_unlock.c: New file.
10104         * sysdeps/powerpc/Makefile: New file.
10105         * sysdeps/powerpc/pthread_spin_lock.c: New file.
10106         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
10107         * sysdeps/powerpc/pthreaddef.h: New file.
10108         * sysdeps/powerpc/tcb-offsets.sym: New file.
10109         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
10110         * sysdeps/powerpc/tls.h: New file.
10111         * sysdeps/powerpc/bits/atomic.h: New file.
10112         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
10113         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
10114         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
10116         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
10117         * sysdeps/unix/sysv/linux/sem_post.c: New file.
10118         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
10119         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
10120         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
10121         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
10122         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
10123         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
10124         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
10125         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
10126         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
10127         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
10128         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
10129         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
10130         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
10132         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
10133         not gettimeofday.
10134         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
10135         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
10136         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
10137         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
10138         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10140 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
10142         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
10143         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
10144         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10145         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10146         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
10148 2003-03-16  Roland McGrath  <roland@redhat.com>
10150         * tst-fork4.c: Include <string.h>.
10151         * tst-signal2.c: Likewise.
10152         * tst-mutex5.c (do_test): exit -> return.
10153         * tst-mutex2.c: Include <stdlib.h>.
10155 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
10157         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
10158         (__lll_mutex_timedlock_wait): Correct expected value after
10159         spurious wakeup.  Otherwise we would never wait again.
10161         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
10162         zone versus inline asm stupidity.  Use correct instructions.
10164         * tst-rwlock6.c: Add some more status output.
10166 2003-03-15  Roland McGrath  <roland@redhat.com>
10168         * sysdeps/pthread/configure.in: New file.
10169         * sysdeps/pthread/configure: New file (generated).
10171 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
10173         * allocatestack.c (allocate_stack): Store the exact stack size of
10174         user allocated stacks.
10176 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
10178         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
10179         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
10180         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
10181         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
10182         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
10183         Use `header.' prefix.
10184         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
10186 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
10188         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
10189         __builtin_frame_address, use stack pointer.
10191         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
10192         instead of __builtin_frame_pointer.
10194 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
10196         * tst-basic1.c (do_test): Add cast to avoid warning.
10197         * tst-basic2.c (do_test): Likewise.
10199         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
10200         amount of stack correction.
10202         * tst-fork4.c: Use test-skeleton.c.
10204 2003-03-14  Roland McGrath  <roland@redhat.com>
10206         * init.c: Fix typo "#eli" for "#else".
10208 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
10210         * allocatestack.c (__stack_user): Use hidden_data_def.
10211         * pthread_create.c (__pthread_keys): Likewise.
10213         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
10215 2003-03-14  Roland McGrath  <roland@redhat.com>
10217         * tst-fork4.c: New file.
10218         * Makefile (tests): Add it.
10220         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
10221         we always define the padding space.
10222         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
10223         stopped supporting its own extensions fully.
10224         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
10225         struct also called `header', so `header.multiple_threads' is the field
10226         name to use on all machines.
10227         * allocatestack.c (allocate_stack): Use `header.' prefix.
10228         * sysdeps/pthread/createthread.c (create_thread): Likewise.
10229         * pthread_create.c (__pthread_create_2_1): Likewise.
10230         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
10231         (THREAD_SELF): Likewise.
10232         * sysdeps/x86_64/tls.h: Likewise.
10233         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
10234         (SINGLE_THREAD_P): Likewise.
10235         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
10236         (SINGLE_THREAD_P): Likewise.
10237         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
10238         (SINGLE_THREAD_P): Likewise.
10240         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
10241         value directly.
10243 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
10245         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
10246         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
10248         * pthread_create.c (start_thread): setjmp is expected to return 0.
10250         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
10251         (THREAD_GETMEM_NC): Likewise.
10253 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
10255         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
10256         and the size of the stack which must be allocated is a multiple,
10257         allocate one more page.
10258         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
10259         MULTI_PAGE_ALIASING.
10261 2003-03-13  Roland McGrath  <roland@redhat.com>
10263         * pthread_create.c (start_thread): Set EXITING_BIT after the
10264         event-reporting (and destructors), not before.
10266 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
10268         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
10269         lll_futex_wake): Declare register variables as long int instead of
10270         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
10271         Make syscall arguments clobbered by the syscall.
10272         (lll_futex_wait): Define using lll_futex_timed_wait.
10274         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
10275         to void *.
10277         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
10278         PPID if [! NDEBUG].
10280         * allocatestack.c (nptl_ncreated): Only declare if
10281         COLORING_INCREMENT != 0.
10283         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
10284         (__libc_enable_asynccancel_2): Remove prototype.
10286         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
10287         ctid to match kernel.
10289 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
10291         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
10292         libc_multiple_threads.
10293         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
10294         __libc_multiple_threads to...
10295         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
10297         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
10298         versioning.
10299         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10300         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10302         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
10303         (__pthread_once_internal): Define.
10305         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
10306         macros instead of .symver directly.
10307         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
10308         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
10310         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
10311         * sysdeps/x86_64/tcb-offsets.sym: New file.
10312         * sysdeps/x86_64/Makefile: New file.
10314         * sysdeps/i386/tcb-offsets.sym: Add SELF.
10315         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
10316         to access own pthread_t in TCB.
10317         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10318         Likewise.
10319         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10320         Likewise.
10321         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10323 2003-03-12  Roland McGrath  <roland@redhat.com>
10325         * pthread-errnos.sym: New file.
10326         * Makefile (gen-as-const-headers): New variable, list that file.
10327         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
10328         header <pthread-errnos.h> instead of defining errno values here.
10329         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
10330         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
10331         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
10332         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10333         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10334         Likewise.
10335         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10336         Likewise.
10337         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
10338         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10339         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10340         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10341         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10342         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10343         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
10344         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
10345         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
10346         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
10347         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
10348         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
10349         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
10350         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
10351         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
10352         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
10353         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
10354         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
10355         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
10356         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
10357         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10358         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
10359         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
10360         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
10361         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
10362         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
10363         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
10365         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
10366         CLONE_CHILD_SETTID worked.
10368 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
10370         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
10371         file.
10372         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
10373         file.
10375         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
10376         (pthread_cond_t): Add padding.
10378         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
10379         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
10380         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
10382         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
10383         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
10384         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
10385         (__pthread_rwlock_timedrdlock): Likewise.
10386         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
10387         (__pthread_rwlock_wrlock): Likewise.
10388         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
10389         (__pthread_rwlock_rdlock): Likewise.
10391         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
10393         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
10394         result of lock re-get if it fails.
10396 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
10398         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
10399         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
10400         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
10401         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
10402         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
10403         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
10404         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
10405         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
10406         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10407         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10409         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
10410         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
10412         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
10413         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
10414         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
10415         (create_thread): Likewise.
10416         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
10417         * init.c (__pthread_initialize_minimal_internal): Initialize
10418         __libc_multiple_threads_ptr if necessary.
10419         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
10420         __pthread_multiple_threads and __libc_multiple_threads_ptr.
10421         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
10422         __libc_multiple_threads.
10423         (__libc_pthread_init): Return pointer to __libc_pthread_init if
10424         necessary.
10426         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
10427         (THREAD_SETMEM_NC): Likewise.
10429         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
10430         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
10431         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
10432         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
10434         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
10435         Eliminate one entire instruction.
10437         * cancellation.c (__pthread_enable_asynccancel_2): New function.
10438         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
10439         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
10440         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
10441         instead of __pthread_enable_asynccancel.
10442         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10443         (__pthread_cond_wait): Likewise.
10444         * sysdeps/pthread/pthread_cond_timedwait.c
10445         (__pthread_cond_timedwait): Likewise.
10446         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
10448         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10449         (__condvar_cleanup): Wake up all waiters in case we got signaled
10450         after being woken up but before disabling asynchronous
10451         cancellation.
10452         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10453         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
10454         (__condvar_cleanup): Likewise.
10456         * init.c (__NR_set_tid_address): If already defined, don't redefine.
10457         Make it an error if architecture has no #if case.  Add x86-64.
10459         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
10460         pt-initfini.s generation.
10462         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
10463         (TLS_INIT_TP): Fix typo.
10465 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
10467         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
10468         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
10470         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
10471         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
10472         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
10473         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
10474         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
10475         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10476         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10477         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10479 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
10481         * sysdeps/pthread/pthread_cond_timedwait.c
10482         (__pthread_cond_timedwait): Return the result of the final
10483         locking.  If it succeeds, the regular function return value.
10485         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
10486         Return result of the final locking.
10487         * version.c (__nptl_main): Work around problems with the strange
10488         INTERNAL_SYSCALL macro on ppc32.
10489         * init.c (__pthread_initialize_minimal_internal): Unblock
10490         SIGCANCEL in case the parent blocked it.
10491         Reported by Paul Mackerras <paulus@samba.org>.
10493         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
10494         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
10495         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
10497 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
10499         * sysdeps/pthread/pthread_cond_timedwait.c
10500         (__pthread_cond_timedwait): Unlock and fail if
10501         __pthread_mutex_unlock_internal failed.
10503         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
10504         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
10505         Use ARCH_CLONE.
10506         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
10507         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
10508         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
10509         ALLOCATE_STACK): New macros.
10510         (TLS_TPADJ): New macro.
10511         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
10512         (allocate_stack): Handle TLS_DTV_AT_TP and
10513         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
10514         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
10515         Don't set PD->self.
10516         * init.c [__ia64__] (__NR_set_tid_address): Define.
10518         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
10519         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
10520         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
10521         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
10522         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
10523         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
10524         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
10525         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
10526         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
10527         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
10528         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
10529         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
10530         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
10531         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
10532         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
10533         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
10534         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
10535         * sysdeps/ia64/bits/atomic.h: New file.
10536         * sysdeps/ia64/Makefile: New file.
10537         * sysdeps/ia64/pthread_spin_init.c: New file.
10538         * sysdeps/ia64/pthread_spin_lock.c: New file.
10539         * sysdeps/ia64/pthread_spin_trylock.c: New file.
10540         * sysdeps/ia64/pthread_spin_unlock.c: New file.
10541         * sysdeps/ia64/pthreaddef.h: New file.
10542         * sysdeps/ia64/tcb-offsets.sym: New file.
10543         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
10544         * sysdeps/ia64/tls.h: New file.
10546         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
10547         to syscall instead of no arguments.
10549 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
10551         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
10552         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
10553         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
10554         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
10556         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
10557         unused code.
10559         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
10561         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10562         lowlevelbarrier.sym.
10563         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
10564         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
10565         Include lowlevelbarrier.h and don't define offsets locally.
10566         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
10568         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
10569         (__lll_mutex_lock_wait): Reverse order of first two parameters.
10570         (__lll_mutex_timedlock_wait): Likewise.
10571         (lll_mutex_lock): Adjust asm for that.
10572         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
10573         (lll_lock): Adjust asm for operand order change.
10574         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
10575         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
10577         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
10578         Reverse order of parameters.
10579         (__lll_timedwait_tid): Remove regparms attribute.
10580         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
10581         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
10583         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10584         (__lll_timedwait_tid): Remove one unnecessary instruction.
10586         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
10587         __lll_mutex_timedlock_wait only for NOT_IN_libc.
10588         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
10589         lowlevelmutex.S.
10591         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
10592         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
10593         for NOT_IN_libc.
10594         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
10595         lowlevellock.S.
10597         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
10598         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
10599         for libc.so.
10600         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
10601         define LOCK here (if UP is not defined).  The actual code is in
10602         lowlevelmutex.S.
10604         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
10605         LOCK is already defined.  Don't define lll_unlock_wake_cb and
10606         __lll_timedwait_tid for libc.so.
10607         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
10608         define LOCK here (if UP is not defined).  The actual code is in
10609         lowlevellock.S.
10611         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
10612         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
10613         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
10614         instead of lowlevelsem.h.
10615         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10616         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10617         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10619         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10620         lowlevelrwlock.sym.
10621         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
10622         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
10623         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
10625         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
10626         register loading.
10627         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
10628         last changed.  D'oh.
10630         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
10632         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
10633         of __libc_locking_needed.
10634         (lll_trylock): Initialize %eax to zero.
10636         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
10637         pthread_cond_t definition.
10639 2003-03-10  Roland McGrath  <roland@redhat.com>
10641         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
10642         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
10643         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
10644         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
10645         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
10647         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
10648         Instead of setting PD->multiple_threads, set globals
10649         __pthread_multiple_threads and __libc_multiple_threads.
10650         * sysdeps/pthread/createthread.c (create_thread): Likewise.
10651         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
10652         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
10654         * descr.h (struct pthread): Conditionalize first member on
10655         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
10656         containing an anonymous tcbhead_t.  Move `list' member out.
10657         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
10658         * allocatestack.c: Remove use of `header.data.' prefix.
10659         * pthread_create.c: Likewise.
10660         * init.c (__pthread_initialize_minimal_internal): Likewise.
10661         * sysdeps/pthread/createthread.c (create_thread): Likewise.
10662         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
10663         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
10664         * sysdeps/x86_64/tls.h: Likewise.
10665         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
10666         (SINGLE_THREAD_P): Likewise.
10667         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
10668         (SINGLE_THREAD_P): Likewise.
10669         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
10670         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
10672 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
10674         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
10676         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
10677         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10679         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
10680         leftovers from the ia32 code.
10682         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
10683         memory load.
10684         (clear_once_control): Don't load %esi.
10686         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
10687         handling.
10689         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10691         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
10692         * sysdeps/unix/sysv/linux/createthread.c: ...here.
10694         * Makefile (tests): Add tst-cond10.
10695         * tst-cond10.c: New file.
10697 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
10699         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
10700         * tst-signal3.c (do_test): Likewise.
10701         * tst-sem5.c (do_test): Likewise.
10702         * tst-kill6.c (do_test): Likewise.
10703         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
10705         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
10706         of inc/dec.
10707         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
10708         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
10709         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
10710         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
10711         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10712         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10713         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10714         Likewise.
10715         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10716         Likewise.
10717         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
10718         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10719         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10720         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10721         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10722         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
10723         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10724         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10726         * allocatestack.c (allocate_stack): If mprotect() fails free the
10727         TLS memory.
10729 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
10731         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
10733         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
10734         lll_wake_tid.  This was used only to work around kernel limits in
10735         the early days.
10736         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
10737         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
10738         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10739         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
10741         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
10742         (__pthread_initialize_minimal_internal): Change initialization of
10743         __static_tls_align_m1 appropriately.
10744         * pthreadP.h (__static_tls_align_m1): Renamed from
10745         __static_tls_align.
10746         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
10747         instead of __static_tls_align-1.
10749 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
10751         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
10753         * pthread_create.c: Define __pthread_keys using nocommon
10754         attribute, not by placing it explicitly in bss.
10755         Remove DEFINE_DEALLOC definition.  Not needed anymore.
10757         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
10758         Use it in mmap call to allocate stacks.
10760         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
10762         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
10763         result of the thread function.
10765 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
10767         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
10768         version is just fine.
10770         * sysdeps/unix/sysv/linux/libc_pthread_init.c
10771         (__pthread_child_handler): Renamed from pthread_child_handler,
10772         exported, and marked hidden.  Change all users.
10773         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
10774         free __pthread_child_handler from child list.
10776 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
10778         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
10780         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
10781         Fix handling of cancellation and failing pthread_mutex_unlock call.
10782         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10783         (__pthread_cond_wait): Likewise.
10785         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
10786         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
10787         lll_futex_timed_wait call.
10788         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
10789         (pthread_rwlock_timedwrlock): Likewise.
10791         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
10792         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
10793         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
10795         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
10796         check of lll_futex_wake return value.
10798 2003-03-03  Roland McGrath  <roland@redhat.com>
10800         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
10802         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10803         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
10804         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
10806 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
10808         * sysdeps/pthread/timer_create.c (timer_create): Return correct
10809         error for CPU clocks.
10811         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
10812         _POSIX_MONOTONIC_CLOCK.
10813         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
10815         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
10816         recent kernels.
10818 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
10820         * descr.h (struct pthread): Move cleanup field to the front.
10822 2003-03-01  Roland McGrath  <roland@redhat.com>
10824         * sem_open.c (sem_open): Braino fix.
10826 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
10828         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
10829         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
10830         __pthread_cleanup_pop functionality.
10831         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10833         * descr.h (struct pthread): Move tid field to the front now that
10834         it is often used.
10836         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
10837         (__lll_mutex_timedlock_wait): Remove.
10838         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10839         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
10840         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
10841         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10842         (lll_unlock_wake_cb): Don't save and restore %esi.
10843         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
10844         %esi.
10845         (__lll_timedwait_tid): Add alignment.
10846         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
10847         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
10848         %esi.
10849         (__lll_timedwait_tid): Removed.
10850         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
10851         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
10852         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
10853         (pthread_barrier_wait): Don't save, load, and restore %esi for
10854         last thread.
10855         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
10856         (__pthread_cond_signal): Don't save, load, and restore %esi.
10857         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
10858         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
10859         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
10860         Don't save, load, and restore %esi.
10862 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
10864         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
10865         Release lock before waking up the waiters.
10867         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
10869         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
10870         (reader_thread): Likewise.
10872         * sysdeps/pthread/pthread_rwlock_unlock.c
10873         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
10874         to wake up readers if there are none.
10876         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
10877         Release internal lock before wake threads.
10879 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
10881         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
10882         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
10883         predefined.
10884         * tst-rwlock9.c: Likewise.
10885         * tst-rwlock10.c: New file.
10886         * tst-rwlock11.c: New file.
10888         * Makefile (tests): Add tst-dlsym1.
10889         * tst-dlsym1.c: New file.
10891         * init.c (__pthread_initialize_minimal_internal): Set
10892         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
10893         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
10895 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
10897         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
10899         * tst-cond2.c: Fix sychronization with child.
10901         * tst-rwlock8.c (reader_thread): Remove unused variable.
10903         * Makefile: Add rules to build and run tst-tls3.
10904         * tst-tls3.c: New file.
10905         * tst-tls3mod.c: New file.
10907         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
10908         * tst-rwlock8.c: New file.
10909         * tst-rwlock9.c: New file.
10910         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
10911         complete broken rwlock implementation.
10912         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10913         Likewise.
10914         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10915         Likewise.
10916         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10917         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10918         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
10919         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
10920         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
10921         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
10922         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
10924 2003-02-23  Roland McGrath  <roland@redhat.com>
10926         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
10928 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
10930         * Makefile (tests): Add tst-context1.
10931         * tst-context1.c: New file.
10933         * Makefile (tests): Add tst-tls1 and tst-tls2.
10934         * tst-tls1.c: New file.
10935         * tst-tls2.c: New file.
10937         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
10938         for failed cmpxchg.
10940         * pthread_create.c (start_thread): Set EXITING_BIT early.
10942         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
10943         (THREAD_GETMEM_NC): Likewise.
10945 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
10947         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
10948         off 3 more bytes by using offset-less instructions when possible.
10950         * Makefile: Add dependency for $(objpfx)version.d.
10952         * eintr.c (eintr_source): Add unnecessary return but the compiler
10953         insists.
10955         * tst-kill3.c: Include <unistd.h>.
10957 2003-02-21  Roland McGrath  <roland@redhat.com>
10959         * pthread_create.c (start_thread): Call __libc_thread_freeres.
10961 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
10963         * Makefile (tests): Add tst-eintr1.
10964         (distribute): Add eintr.c.
10965         * tst-eintr1.c: New file.
10966         * eintr.c: New file.
10968         * pthread_cancel.c (pthread_cancel): Use tkill directly.
10970         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
10971         Disallow sending SIGCANCEL.
10973         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
10974         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
10975         * tst-kill1.c: New file.
10976         * tst-kill2.c: New file.
10977         * tst-kill3.c: New file.
10978         * tst-kill5.c: New file.
10979         * tst-kill6.c: New file.
10980         * tst-basic7.c: Renamed to...
10981         * tst-kill4.c: ...this.
10983 2003-02-21  Roland McGrath  <roland@redhat.com>
10985         * Makefile (install-lib-ldscripts): New variable.
10987 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
10989         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
10990         * pthread_cancel.c: Use INVALID_TD_P.
10991         * pthread_detach.c: Likewise.
10992         * pthread_getschedparam.c: Likewise.
10993         * pthread_setschedparam.c: Likewise.
10994         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
10995         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
10996         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
10997         * pthread_timedjoin.c: Likewise.
10999         * tst-basic7.c: Include <signal.h>.
11001         * pthread_join.c (pthread_join): Limited checking for invalid
11002         descriptors.
11003         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
11005 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
11007         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
11008         beginning of the loop.  Clear the entire first block of TSD.
11009         * Makefile (tests): Add tst-key4.
11010         * tst-key4.c: New file.
11012 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
11014         * Makefile (tests): Add tst-basic7.
11015         * tst-basic7.c: New file.
11017         * pthread_create.c (deallocate_tsd): Mark as internal_function.
11018         Add some more __builtin_expect.
11020         * pthreadP.h: Define dummy version of DEBUGGING_P.
11022 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
11024         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
11025         _POSIX_THREAD_PRIORITY_SCHEDULING.
11026         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
11027         _XOPEN_REALTIME_THREADS.
11028         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
11030         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
11031         kernel returns EINVAL for PID <= 0, work around it.
11033         * Makefile (tests): Add tst-signal5.
11034         * tst-signal5.c: New file.
11036         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
11037         and LOGIN_NAME_MAX.
11039         * tst-cancel1.c (tf): Block all signals.
11041         * Makefile (tests): Add tst-basic6.
11042         * tst-basic6.c: New file.
11044         * tst-basic1.c: Add test for process ID.
11046         * Makefile (tests): Add tst-cancel10.
11047         * tst-cancel10.c: New file.
11049         * Makefile (tests): Add tst-signal4.
11050         * tst-signal4.c: New file.
11052         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
11053         __sigismember instead of sigismember.  Add __builtin_expect.
11055 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
11057         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
11058         pthread_setcancelstate, and pthread_rwlock_setpshared.
11060         * tst-cancel7.c (do_test): Make sure the pid file exists before
11061         canceling the thread.
11063         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
11064         pthread_rwlock_timedrdlock tests.
11065         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
11066         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11067         Check for invalid tv_nsec field.
11068         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11069         Likewise.
11071         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
11072         recursive mutex of overflow.
11074         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
11076         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
11077         going into an endless loop.
11078         * Makefile (tests): Add tst-cancel9.
11079         * tst-cancel9.c: New file.
11081         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
11083 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
11085         * tst-mutex5.c (do_test): Add more timedlock tests.
11087         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
11088         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
11090         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
11091         use INLINE_SYSCALL.  Error number is returned, not -1.
11093         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
11094         and __deallocate_stack with internal_function.
11095         * pthread_create.c: Adjust definitions appropriately.
11096         * allocatestack.c: Likewise.
11098         * pthread_join.c: Add one more __builtin_expect.
11099         * pthread_timedjoin.c: Likewise.
11101         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
11102         not data of sequence number does not match.
11103         Add one __builtin_expect.
11105         * Makefile (tests): Add tst-clock1.
11106         * tst-clock1.c: New file.
11108         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
11109         negative arguments.
11110         * Makefile (tests): Add tst-basic5.
11111         * tst-basic5.c: New file.
11113 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
11115         * Makefile (tests): Add tst-basic4.
11116         * tst-basic4.c: New file.
11118         * pthreadP.h: Add declaraction for __nptl_nthreads.
11119         * pthread_create.c: Define __nptl_nthreads
11120         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
11121         after thread is done.  If then zero, call exit(0).
11122         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
11123         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
11124         * init.c (pthread_functions): Initialize ptr_nthreads.
11125         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
11126         (__reclaim_stacks): Decrement __nptl_nthreads.
11127         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
11128         Define.
11129         * Makefile (tests): Add tst-basic3.
11130         * tst-basic3.c: New file.
11132         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
11133         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
11134         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
11135         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
11136         if asynchronous canceling is enabled.
11137         * pthread_join.c (pthread_join): When recognizing circular joins,
11138         take into account the other thread might be already canceled.
11139         * Makefile (tests): Add tst-join5.
11140         * tst-join5.c: New file.
11142         * Makefile (tests): Add tst-join4.
11143         * tst-join4.c: New file.
11145 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
11147         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
11149 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
11151         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
11152         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
11153         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
11154         warning.
11155         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
11156         to avoid warning.
11157         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
11158         error if lll_futex_wake failed.
11160 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
11162         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
11163         handling of cancellation and failung pthread_mutex_unlock call.
11164         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
11165         * Makefile (tests): Add tst-cond8 and tst-cond9.
11166         * tst-cond8.c: New file.
11167         * tst-cond9.c: New file.
11169         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
11171         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
11172         non-standard initializers with __USE_GNU.
11174         * Makefile (tests): Add tst-cleanup3.
11175         * tst-cleanup3.c: New file.
11177 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
11179         * Makefile (tests): Add tst-attr1 and tst-attr2.
11180         * tst-attr1.c: New file.
11181         * tst-attr2.c: New file.
11183         * Makefile: Add rules to build and run tst-atfork2 test.
11184         * tst-atfork2.c: New file.
11185         * tst-atfork2mod.c: New file.
11187         * sysdeps/unix/sysv/linux/unregister-atfork.c
11188         (__unregister_atfork): Free the memory allocated for the handlers
11189         after removing them from the lists.
11191         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
11192         cleanup function.
11194         * tst-atfork1.c (do_test): Wait for the child we forked.
11195         Report error in child.
11197         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
11199         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
11201 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
11203         * Makefile (tests): Add tst-cancel8.
11204         * tst-cancel8.c: New file.
11206         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
11207         clearing of control variable.
11208         * Makefile (tests): Add tst-once3 and tst-once4.
11209         * tst-once3.c: New file.
11210         * tst-once4.c: New file.
11212 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
11214         * sysdeps/sh/Makefile: New file.
11215         * sysdeps/sh/bits/atomic.h: New file.
11216         * sysdeps/sh/pthread_spin_init.c: New file.
11217         * sysdeps/sh/pthread_spin_lock.c: New file.
11218         * sysdeps/sh/pthread_spin_trylock.S: New file.
11219         * sysdeps/sh/pthread_spin_unlock.S: New file.
11220         * sysdeps/sh/pthreaddef.h: New file.
11221         * sysdeps/sh/tcb-offsets.sym: New file.
11222         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
11223         * sysdeps/sh/tls.h: New file.
11224         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
11225         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
11226         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
11227         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
11228         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
11229         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
11230         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
11231         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
11232         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
11233         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
11234         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
11235         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
11236         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
11237         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
11238         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
11239         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
11240         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
11241         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
11242         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
11243         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
11244         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
11245         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
11246         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
11247         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
11248         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
11249         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
11250         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
11251         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
11252         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
11253         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
11255 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
11257         * tst-cond2.c: Rearrange code to not rely on behavior undefined
11258         according to POSIX.
11260         * tst-basic2.c (do_test): Lock mutex before creating the thread.
11262 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
11264         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
11265         (TLS_GET_FS): New #define.
11266         (TLS_SET_FS): New #define.
11267         Correct value of __NR_set_thread_area.
11269         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
11271 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
11273         * Makefile (tests): Add tst-popen1.
11274         * tst-popen1.c: New file.
11276         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
11277         but inactive generalization.
11278         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
11279         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
11280         Minor optimization, remove one instruction.
11281         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
11283 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
11285         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
11287 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
11289         * init.c (__NR_set_tid_address): Add #ifdef for s390.
11290         * sysdeps/pthread/pthread_barrier_wait.c: New file.
11291         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
11292         * sysdeps/pthread/pthread_cond_signal.c: New file.
11293         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
11294         * sysdeps/pthread/pthread_cond_wait.c: New file.
11295         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
11296         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
11297         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
11298         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
11299         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
11300         * sysdeps/s390/Makefile: New file.
11301         * sysdeps/s390/bits/atomic.h: New file.
11302         * sysdeps/s390/pthread_spin_init.c: New file.
11303         * sysdeps/s390/pthread_spin_lock.c: New file.
11304         * sysdeps/s390/pthread_spin_trylock.c: New file.
11305         * sysdeps/s390/pthread_spin_unlock.c: New file.
11306         * sysdeps/s390/pthreaddef.h: New file.
11307         * sysdeps/s390/tcb-offsets.sym: New file.
11308         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
11309         * sysdeps/s390/tls.h: New file.
11310         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
11311         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
11312         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
11313         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
11314         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
11315         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
11316         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
11317         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
11318         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
11319         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
11320         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
11321         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
11322         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
11323         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
11324         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
11325         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
11326         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
11327         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
11328         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
11329         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
11330         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
11331         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
11332         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
11334 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
11336         * atomic.h: Add a couple more default implementations.
11337         (atomic_compare_and_exchange_acq): Use
11338         __arch_compare_and_exchange_32_acq in return value definition.  It
11339         always exists.
11340         (atomic_bit_set): Renamed from atomic_set_bit.
11341         Add missing atomic_ prefixes.
11343         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
11344         thread library is available, use correct value to mark initialized
11345         once variable.
11347 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
11349         * allocatestack.c (allocate_stack): Use __getpagesize instead of
11350         __sysconf to determine pagesize.
11352         * pthread_create.c: Include <atomic.h>.
11353         * allocatestack.c (allocate_stack): Implement coloring of the
11354         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
11355         size minus one.  Adjust users.
11356         * sysdeps/i386/i686/Makefile: New file.
11358 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
11360         * allocatestack.c: Improve comment throughout the file.
11362         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
11363         (__lll_lock_wait): Add branch prediction.
11364         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
11365         (__lll_lock_wait): Likewise.
11366         (lll_unlock_wake_cb): Removed.
11368 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
11370         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
11371         _POSIX_THREAD_PRIORITY_SCHEDULING.
11373 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
11375         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
11376         Fix return type of ptr___pthread_getspecific.
11378 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
11380         * Makefile (tests): Add tst-umask1.
11381         (tst-umask1-ARGS): Define.
11382         * tst-umask1.c: New file.
11384 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
11386         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
11387         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
11388         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
11389         pthread_rwlock_unlock.
11390         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
11391         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
11392         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
11393         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
11394         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11395         New file.
11396         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
11397         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11398         New file.
11399         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
11400         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
11401         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
11402         New file.
11403         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
11404         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
11405         New file.
11406         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
11407         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
11408         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
11409         New file.
11410         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
11411         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
11412         New file.
11413         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
11415         * Makefile (libpthread-routines): Remove lowlevelcond and
11416         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
11417         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
11418         and pthread_cond_broadcast.
11419         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
11420         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
11421         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
11422         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
11423         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
11424         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
11425         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
11426         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
11427         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
11428         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
11429         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
11430         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
11431         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
11432         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
11433         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
11434         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
11435         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
11436         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
11437         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
11438         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
11439         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
11440         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
11441         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
11442         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
11443         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
11444         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
11445         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
11446         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
11447         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
11448         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
11449         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
11451         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
11452         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
11453         of the code is moved to ...
11454         * sysdeps/pthread/createthread.c: ...here.  New file.
11456 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
11458         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
11459         (__new_sem_post): Clear %eax before returning.
11460         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
11462         * Makefile (tests): Add tst-cleanup2.
11463         * tst-cleanup2.c: New file.
11465         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
11466         Interpret first parameter correctly.
11468 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
11470         * Makefile (headers): Add bits/semaphore.h.
11472 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
11474         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
11475         if not SHARED.
11477 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
11479         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
11480         must be used and mapping failed.
11481         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
11483         * Makefile (CFLAGS-pthread_self.os): Define this, not
11484         CFLAGS-pthread_self.c.
11486 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
11488         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
11489         lll_unlock_wake_cb.
11491         * Makefile (libpthread-routines): Add version.  Add rules to build
11492         version.os and banner.h.
11493         * version.c: New file.
11495 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
11497         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
11498         the alias unconditional.
11499         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
11501 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
11503         * Makefile (CFLAGS-pthread_self.c): New definition.
11505 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
11507         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
11508         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
11509         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
11510         * init.c (__pthread_initialize_minimal_internal): Likewise.
11512 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
11514         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
11516         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
11517         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11518         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11519         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
11520         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11521         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11523 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
11525         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
11526         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
11527         * tst-cancel-wrappers.sh: Remove all exceptions.
11529 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
11531         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
11532         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
11534         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
11535         Use __libc_pthread_functions array if SHARED.
11537         * pthreadP.h: Move pthread_cond_2_0_t definition to...
11538         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
11540         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
11541         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
11542         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
11543         __libc_ptf_call instead of __libc_maybe_call.
11544         (PTF): New #define.
11545         (__libc_cleanup_region_start): Wrap function name with PTF call.
11546         (__libc_cleanup_region_end): Likewise.
11547         (__libc_cleanup_end): Likewise.
11549         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
11550         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
11551         * pthread_key_create.c: Add __pthread_key_create_internal alias.
11552         * pthreadP.h: Add prototypes.
11554         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
11555         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
11556         __pthread_rwlock_unlock aliases.
11557         * pthreadP.h: Add prototypes for new aliases.
11559         * pthreadP.h (struct pthead_functions): Moved to...
11560         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
11561         * init.c (pthread_functions): Add initializers for new elements.
11563         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
11564         __pthread_cleanup_pop_restore aliases.
11565         * pthreadP.h: Add prototypes.
11567         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
11568         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
11569         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
11570         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
11571         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
11572         * pthreadP.h: Adjust prototypes and callers.
11574 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
11576         * Makefile (tests): Add tst-cancel7.
11577         (tst-cancel7-ARGS): New variable.
11578         * tst-cancel7.c: New file.
11580         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
11581         around gcc defficiencies.
11582         * old_pthread_cond_signal.c: Likewise.
11583         * old_pthread_cond_timedwait.c: Likewise.
11584         * old_pthread_cond_wait.c: Likewise.
11586         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
11588 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
11590         * Makefile (tests): Add tst-cond7.
11591         * tst-cond7.c: New file.
11593         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11594         (condvar_cleanup): Get condvar address from the right place.
11596         * atomic.h: Correct definitions of atomic_full_barrier,
11597         atomic_read_barrier, atomic_write_barrier.
11599         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
11600         race-free.
11601         * old_pthread_cond_signal.c: Likewise.
11602         * old_pthread_cond_timedwait.c: Likewise.
11603         * old_pthread_cond_wait.c: Likewise.
11605 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
11607         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
11609 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
11611         * pthreadP.h (pthread_cond_2_0_t): New type.
11612         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
11613         Use new type for the 2.0 condvar function prototypes.
11614         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
11615         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
11616         parameter.
11617         * old_pthread_cond_destroy.c: Likewise.
11618         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
11619         * old_pthread_cond_signal.c: Likewise.
11620         * old_pthread_cond_timedwait.c: Likewise.
11621         * old_pthread_cond_wait.c: Likewise.
11623         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11624         (__pthread_cond_wait): Don't save cancellation mode and seq value
11625         in same location.
11627         * herrno.c (__h_errno_location): Don't define as weak.
11629 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
11631         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
11632         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
11633         and pthread_cond_wait.
11634         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
11635         Renamed to...
11636         (__pthread_cond_broadcast_2_0): ... this.
11637         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
11638         Renamed to...
11639         (__pthread_cond_destroy_2_0): ... this.
11640         * old_pthread_cond_init.c (__old_pthread_cond_init):
11641         Renamed to...
11642         (__pthread_cond_init_2_0): ... this.
11643         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
11644         Renamed to...
11645         (__pthread_cond_signal_2_0): ... this.
11646         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
11647         Renamed to...
11648         (__pthread_cond_wait_2_0): ... this.
11649         * pthread_cond_destroy.c: Include shlib-compat.h.
11650         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
11651         * pthread_cond_init.c: Include shlib-compat.h.
11652         (pthread_cond_init): Change strong_alias into versioned_symbol.
11653         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
11654         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
11655         fields.
11656         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
11657         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
11658         __pthread_cond_wait_2_0): New prototypes.
11659         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
11660         __old_pthread_cond_init, __old_pthread_cond_signal,
11661         __old_pthread_cond_wait): Removed.
11662         * init.c: Include shlib-compat.h.
11663         (pthread_functions): Guard ptr___pthread_attr_init_2_0
11664         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
11665         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
11666         ptr___pthread_cond_*_2_0 fields.
11667         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
11668         pthread_cond_*@GLIBC_2.0 compatibility symbols.
11670         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
11671         LIBC_SIGACTION was not yet defined.
11672         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
11673         [!defined LIBC_SIGACTION] (__sigaction): New function and
11674         libc_hidden_weak.
11675         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
11676         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
11678 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
11680         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
11682 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
11684         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
11685         New, larger type definition.
11686         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
11687         implementation.
11688         * Versions [libpthread]: Add definitions for new pthread_cond_*
11689         interfaces for version GLIBC_2.3.2.
11690         * pthread_cond_init.c: Update initialization for new type definition.
11691         * Makefile (libpthread-routines): Remove pthread_cond_wait,
11692         pthread_cond_timedwait, pthread_cond_signal, and
11693         pthread_cond_broadcast.  Add old_pthread_cond_init,
11694         old_pthread_cond_destroy, old_pthread_cond_wait,
11695         old_pthread_cond_timedwait, old_pthread_cond_signal, and
11696         old_pthread_cond_broadcast.
11697         * old_pthread_cond_broadcast.c: New file.
11698         * old_pthread_cond_destroy.c: New file.
11699         * old_pthread_cond_init.c: New file.
11700         * old_pthread_cond_signal.c: New file.
11701         * old_pthread_cond_timedwait.c: New file.
11702         * old_pthread_cond_wait.c: New file.
11703         * pthreadP.h: Add prototypes for the compatibility interfaces.
11705         * pthread_cond_destroy.c: Don't include <errno.h>.
11707 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
11709         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
11710         unnecessary zero offset when addressing MUTEX.
11712 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
11714         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
11715         __register_atfork.
11716         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
11717         for __register_atfork.
11719 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
11721         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
11722         instead of ASSEMBLER test macro.
11724         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
11725         __libc_current_sigrtmax): Add libc_hidden_def.
11727         * sysdeps/pthread/list.h: Remove assert.h include.
11729 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
11731         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
11732         __pthread_initialize_minimal_internal not
11733         __pthread_initialize_minimal.
11735 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
11737         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
11738         __pthread_initialize_minimal as hidden.
11740         * init.c (__pthread_initialize_minimal_internal): Don't mark as
11741         constructor.
11743 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
11745         * Makefile ($(inst_libdir)/libpthread.so): Depend on
11746         $(common-objpfx)format.lds, include that into the output script.
11747         Fix comment.
11748         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
11750 2002-12-28  Andreas Jaeger  <aj@suse.de>
11752         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
11753         nsec resolution changes.
11754         (xstat64_conv): Likewise.
11755         (xstat32_conv): Likewise.
11756         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
11757         struct kernel_stat.
11758         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
11759         structs stat and stat64.
11760         * time/time.h (__timespec_defined): Define for __USE_MISC.
11761         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
11763 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
11765         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
11766         argument.
11767         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
11768         (pthread_exit): Use strong_alias to avoid warnings.
11769         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
11770         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
11771         ptr___pthread_attr_init_2_*.
11772         * init.c (pthread_functions): Adjust.
11774 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
11776         * forward.c: Make all functions available by default again.  It
11777         caused too much trouble.
11779         * pt-siglongjmp.c: Removed.
11781 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
11783         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
11784         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
11785         * sysdeps/i386/Makefile: New file.
11786         * sysdeps/i386/tcb-offsets.sym: New file.
11787         * sysdeps/pthread/tcb-offsets.h: New file.
11788         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11789         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
11791         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
11792         __register_atfork...
11793         (GLIBC_2.3.2): ...here.
11795 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
11797         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
11798         pthread_attr_setstackaddr with __attribute_deprecated__.
11800 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
11802         * pt-system.c (system): Remove cancellation handling.
11803         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
11804         cancellation routines.
11806 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
11808         * descr.h: Include <dl-sysdep.h>.
11809         (struct pthread): Move header.data.list to the back of the struct.
11810         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
11811         (MULTIPLE_THREADS_OFFSET): Adjust offset.
11812         (SYSINFO_OFFSEET): Likewise.
11814 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
11816         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
11817         Define.
11818         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
11819         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
11820         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
11821         (USE_DL_SYSINFO): Undef.
11823 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
11825         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
11826         $(common-objpfx)libc.so.
11827         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
11828         it is bigger than pipe buffer size even on arches with bigger
11829         page size.
11830         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
11832 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
11834         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
11835         correct errno access for case that USE___THREAD is not defined.
11837 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
11839         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
11840         Patch by Marijn Ros <marijn@mad.scientist.com>.
11842 2002-12-22  Roland McGrath  <roland@redhat.com>
11844         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
11846 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
11848         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
11850 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
11852         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
11853         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
11854         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
11856         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
11857         of int $0x80.
11858         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
11859         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
11860         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
11861         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
11862         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
11863         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
11864         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
11865         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
11867         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
11868         sysenter.
11869         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
11871         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
11873         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
11874         in new TCB.
11875         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
11876         that sysinfo is properly initialized.
11877         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
11878         to 1 only for ld.so.
11880         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
11881         RTLD_CORRECT_DYNAMIC_WEAK.
11883 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
11885         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
11886         Use return 0 as 6th argument to FORWARD4.
11887         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
11889 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
11891         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
11892         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
11893         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
11894         (INIT_SYSINFO): New #define.
11895         (TLS_TP_INIT): Use INIT_SYSINFO.
11896         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11897         At test to make sure SYSINFO_OFFSET value is correct.
11898         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
11900 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
11902         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
11903         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
11904         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
11905         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
11906         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
11907         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
11908         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
11910 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
11912         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
11913         macro instead of using int $0x80 directly.
11915         * sysdeps/pthread/bits/stdio-lock.h: New file.
11916         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
11917         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
11918         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
11919         * Makefile (routines): Add libc-lowlevelmutex.
11921         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
11922         __i686.get_pc_thunk.dx.
11924 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
11926         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
11927         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
11928         ($(objpfx)tst-cancel-wrappers.out): New rule.
11929         * tst-cancel-wrappers.sh: New test.
11930         * tst-locale1.c: Include signal.h.
11931         (uselocale): Test static linking of __libc_current_sigrt*.
11933 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
11935         * Makefile (tests): Add tst-cancel6.
11936         * tst-cancel6.c: New file
11938 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
11940         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
11941         Define meaningfully for assembler as well.
11942         * pthreadP.h (struct pthread_functions): Remove
11943         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
11944         and ptr_pthread_attr_init_2_1 fields.
11945         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
11946         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
11947         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
11948         (FORWARD3): Define using FORWARD4.
11949         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
11950         versions.
11951         * pt-system.c: Remove duplicate stdlib.h include.
11953 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
11955         * sem_init.c: Define sem_init@GLIBC_2.0.
11956         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
11957         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
11959         * flockfile.c: Moved to...
11960         * sysdeps/pthread/flockfile.c: ...here.  New file.
11961         * funlockfile.c: Moved to...
11962         * sysdeps/pthread/funlockfile.c: ...here.  New file.
11963         * ftrylockfile.c: Moved to...
11964         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
11966 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
11968         * libc-cancellation.c: Guard both function with
11969         #if !defined NOT_IN_libc.
11970         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
11971         automatically provided pthread wrappers.
11972         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
11973         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
11974         nor in libpthread.
11975         * pt-open.c: Removed.
11976         * pt-fcntl.c: Removed.
11977         * pt-fsync.c: Removed.
11978         * pt-lseek.c: Removed.
11979         * pt-msgrcv.c: Removed.
11980         * pt-msgsnd.c: Removed.
11981         * pt-msync.c: Removed.
11982         * pt-nanosleep.c: Removed.
11983         * pt-open64.c: Removed.
11984         * pt-pause.c: Removed.
11985         * pt-pread.c: Removed.
11986         * pt-pread64.c: Removed.
11987         * pt-pwrite.c: Removed.
11988         * pt-pwrite64.c: Removed.
11989         * pt-read.c: Removed.
11990         * pt-recv.c: Removed.
11991         * pt-recvfrom.c: Removed.
11992         * pt-recvmsg.c: Removed.
11993         * pt-send.c: Removed.
11994         * pt-sendto.c: Removed.
11995         * pt-sigtimedwait.c: Removed.
11996         * pt-sigwait.c: Removed.
11997         * pt-wait.c: Removed.
11998         * pt-waitpid.c: Removed.
11999         * pt-write.c: Removed.
12000         * pt-accept.c: Removed.
12001         * pt-close.c: Removed.
12002         * pt-connect.c: Removed.
12003         * pt-lseek64.c: Removed.
12004         * pt-sendmsg.c: Removed.
12005         * pt-tcdrain.c: Removed.
12007 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
12009         * init.c (__pthread_initialize_minimal_internal): Renamed from
12010         __pthread_initialize_minimal.  Make old name an alias.  This
12011         converts a normal relocation into a relative relocation.
12013         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
12015         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
12016         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
12017         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
12018         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
12019         pt-sigwaitinfo, pt-waitid, and pt-writev.
12020         * pt-creat.c: Removed.
12021         * pt-poll.c: Removed.
12022         * pt-pselect.c: Removed.
12023         * pt-readv.c: Removed.
12024         * pt-select.c: Removed.
12025         * pt-sigpause.c: Removed.
12026         * pt-sigsuspend.c: Removed.
12027         * pt-sigwaitinfo.c: Removed.
12028         * pt-waitid.c: Removed.
12029         * pt-writev.c: Removed.
12031         * init.c (pthread_functions): New variable.
12032         (__pthread_initialize_minimal): Pass pointer to pthread_functions
12033         (or NULL) to __libc_pthread_init.
12034         * forward.c: Rewrite to use __libc:pthread_functions array to get
12035         function addresses.
12036         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
12037         prototype.
12038         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
12039         Take new parameter.  Copy content of variable pointed to by it
12040         to __libc_pthread_init.
12042         * pthreadP.h (struct pthread_functions): New type.
12043         (__libc_pthread_init): Declare.
12045         * pthread_attr_destroy.c: Add namespace protected alias.
12046         * pthread_attr_getdetachstate.c: Likewise.
12047         * pthread_attr_getinheritsched.c: Likewise.
12048         * pthread_attr_getschedparam.c: Likewise.
12049         * pthread_attr_getschedpolicy.c: Likewise.
12050         * pthread_attr_getscope.c: Likewise.
12051         * pthread_attr_setdetachstate.c: Likewise.
12052         * pthread_attr_setinheritsched.c: Likewise.
12053         * pthread_attr_setschedparam.c: Likewise.
12054         * pthread_attr_setschedpolicy.c: Likewise.
12055         * pthread_attr_setscope.c: Likewise.
12056         * pthread_cond_broadcast.c: Likewise.
12057         * pthread_cond_destroy.c: Likewise.
12058         * pthread_cond_init.c: Likewise.
12059         * pthread_cond_signal.c: Likewise.
12060         * pthread_cond_wait.c: Likewise.
12061         * pthread_condattr_destroy.c: Likewise.
12062         * pthread_condattr_init.c: Likewise.
12063         * pthread_equal.c: Likewise.
12064         * pthread_exit.c: Likewise.
12065         * pthread_getschedparam.c: Likewise.
12066         * pthread_self.c: Likewise.
12067         * pthread_setcancelstate.c: Likewise.
12068         * pthread_setschedparam.c: Likewise.
12069         * pthread_mutex_destroy.c: Likewise.
12070         * pthread_mutex_init.c: Likewise.
12071         * pthreadP.h: Add prototypes for the aliases.
12073         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
12074         multiple_threads member in correct TCB to 1.
12076         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
12077         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
12078         member of thread decriptor, otherwise return unconditionally 1.
12080 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
12082         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
12083         regular Linux version.  Remove file.
12084         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
12085         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
12086         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
12087         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
12088         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
12089         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
12090         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
12091         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
12092         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
12093         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
12094         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
12095         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
12096         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
12097         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
12098         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
12099         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
12100         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
12101         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
12102         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
12103         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
12104         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
12105         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
12106         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
12107         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
12108         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
12109         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
12110         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
12111         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
12112         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
12113         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
12115 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
12117         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
12118         * sysdeps/unix/sysv/linux/open.c: Removed.
12119         * sysdeps/unix/sysv/linux/fsync.c: Removed.
12120         * sysdeps/unix/sysv/linux/lseek.c: Removed.
12121         * sysdeps/unix/sysv/linux/msync.c: Removed.
12122         * sysdeps/unix/sysv/linux/read.c: Removed.
12123         * sysdeps/unix/sysv/linux/close.c: Removed.
12124         * sysdeps/unix/sysv/linux/creat.c: Removed.
12125         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
12126         * sysdeps/unix/sysv/linux/pause.c: Removed.
12127         * sysdeps/unix/sysv/linux/select.c: Removed.
12128         * sysdeps/unix/sysv/linux/write.c: Removed.
12130 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
12132         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
12133         element in TCB to see whether locking is needed.
12135         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
12136         MULTIPLE_THREADS_OFFSET value is correct.
12138         * sysdeps/unix/sysv/linux/close.c: New file.
12139         * sysdeps/unix/sysv/linux/connect.S: New file.
12140         * sysdeps/unix/sysv/linux/creat.c: New file.
12141         * sysdeps/unix/sysv/linux/fsync.c: New file.
12142         * sysdeps/unix/sysv/linux/llseek.c: New file.
12143         * sysdeps/unix/sysv/linux/lseek.c: New file.
12144         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
12145         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
12146         * sysdeps/unix/sysv/linux/msync.c: New file.
12147         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
12148         * sysdeps/unix/sysv/linux/open.c: New file.
12149         * sysdeps/unix/sysv/linux/open64.c: New file.
12150         * sysdeps/unix/sysv/linux/pause.c: New file.
12151         * sysdeps/unix/sysv/linux/poll.c: New file.
12152         * sysdeps/unix/sysv/linux/pread.c: New file.
12153         * sysdeps/unix/sysv/linux/pread64.c: New file.
12154         * sysdeps/unix/sysv/linux/pselect.c: New file.
12155         * sysdeps/unix/sysv/linux/pwrite.c: New file.
12156         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
12157         * sysdeps/unix/sysv/linux/readv.c: New file.
12158         * sysdeps/unix/sysv/linux/recv.S: New file.
12159         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
12160         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
12161         * sysdeps/unix/sysv/linux/select.c: New file.
12162         * sysdeps/unix/sysv/linux/send.S: New file.
12163         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
12164         * sysdeps/unix/sysv/linux/sendto.S: New file.
12165         * sysdeps/unix/sysv/linux/sigpause.c: New file.
12166         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
12167         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
12168         * sysdeps/unix/sysv/linux/sigwait.c: New file.
12169         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
12170         * sysdeps/unix/sysv/linux/system.c: New file.
12171         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
12172         * sysdeps/unix/sysv/linux/wait.c: New file.
12173         * sysdeps/unix/sysv/linux/waitid.c: New file.
12174         * sysdeps/unix/sysv/linux/waitpid.c: New file.
12175         * sysdeps/unix/sysv/linux/writev.c: New file.
12176         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
12178         * pt-readv.c: Fix comment.
12180 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
12182         * tst-cleanup1.c: Include stdlib.h.
12184         * tst-cancel5.c: New test.
12185         * Makefile (tests): Add tst-cancel5.
12186         (tst-cancel5): Link against libc.so libpthread.so in that order.
12188 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
12190         * forward.c (test_loaded): Prevent recursive calls.
12192         * Makefile (routines): Add libc-cancellation.
12193         * libc-cancellation.c: New file.
12194         * descr.h (struct pthread): Add multiple_threads field.
12195         * allocatestack.c (allocate_stack): Initialize multiple_header field of
12196         new thread descriptor to 1.
12197         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
12198         Initialize multiple_thread field after successful thread creation.
12199         * cancellation.c (__do_cancel): Move to pthreadP.h.
12200         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
12201         (__pthread_disable_asynccancel): Add internal_function attribute.
12202         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
12203         * pthread_setcancelstate.c: Likewise.
12204         * pthread_setcanceltype.c: Likewise.
12205         * pthread_exit.c: Likewise.
12206         * pthreadP.h (CANCELLATION_P): Likewise.
12207         (__do_cancel): Define as static inline.
12208         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
12209         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
12210         declarations.
12211         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
12212         fields.  Define MULTIPLE_THREADS_OFFSET.
12213         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
12214         declaration.
12215         * sysdeps/unix/sysv/linux/accept.S: New file.
12216         * sysdeps/unix/sysv/linux/read.c: New file.
12217         * sysdeps/unix/sysv/linux/write.c: New file.
12218         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
12219         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
12220         initialization of __libc_locking_needed.
12221         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
12222         __libc_locking_needed, use multiple_threads field in TCB.
12223         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
12225 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
12227         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
12228         version.
12229         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
12231         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
12232         access to __libc_locking_needed for PIC.
12234 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
12236         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
12237         declare for libc.so.
12238         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
12239         expression.
12240         (__libc_lock_lock): Put into statement expression.
12241         (__libc_lock_unlock): Remove trailing semicolon.
12242         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
12244 2002-12-12  Roland McGrath  <roland@redhat.com>
12246         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
12247         "m" constraint to refer to __libc_locking_needed.  Declare it here.
12249 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
12251         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
12252         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
12253         Initialize __libc_locking_needed.
12254         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
12255         instead of __register_pthread_fork_handler.
12256         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
12257         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
12258         fork-gen with libc_pthread_init.
12259         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
12260         of __register_pthread_fork_handler.
12261         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
12262         of __register_pthread_fork_handler.
12263         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
12264         __libc_locking_needed to determine whether lock prefix can be avoided.
12265         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
12267 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
12269         * Makefile (tests): Add tst-cleanup1.
12270         * tst-cleanup1.c: New file.
12271         * cancellation.c (__cleanup_thread): Removed.
12272         (__do_cancel): Remove call to __cleanup_thread.
12273         * pthreadP.h: Remove __cleanup_thread prorotype.
12275         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
12276         Remember function and argument even if cancellation handler
12277         function is not available.
12278         (__libc_cleanup_region_end): Execute registered function directly if
12279         pthread functions are not available.
12280         (__libc_cleanup_end): Likewise.
12282         * init.c (__pthread_initialize_minimal): Fix initialization in
12283         static lib by preventing gcc from being too clever.
12285 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
12287         * init.c (__pthread_initialize_minimal): Remove unneccesary
12288         sigaddset call.
12290         * Makefile (tests): We can run tst-locale2 now.
12292 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
12294         * Versions: Remove duplicated sigwait entry.
12296 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
12298         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
12299         inside libpthread.
12301         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
12303         * pthreadP.h: Declare __pthread_enable_asynccancel and
12304         __pthread_disable_asynccancel.
12305         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
12306         (CANCEL_RESET): Use __pthread_disable_asynccancel.
12307         * cancellation.c (__pthread_enable_asynccancel): New function.
12308         (__pthread_disable_asynccancel): New function.
12309         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
12310         * pt-close.c: Likewise.
12311         * pt-connect.c: Likewise.
12312         * pt-creat.c: Likewise.
12313         * pt-fcntl.c: Likewise.
12314         * pt-fsync.c: Likewise.
12315         * pt-lseek.c: Likewise.
12316         * pt-lseek64.c: Likewise.
12317         * pt-msgrcv.c: Likewise.
12318         * pt-msgsnd.c: Likewise.
12319         * pt-msync.c: Likewise.
12320         * pt-nanosleep.c: Likewise.
12321         * pt-open.c: Likewise.
12322         * pt-open64.c: Likewise.
12323         * pt-pause.c: Likewise.
12324         * pt-poll.c: Likewise.
12325         * pt-pread.c: Likewise.
12326         * pt-pread64.c: Likewise.
12327         * pt-pselect.c: Likewise.
12328         * pt-pwrite.c: Likewise.
12329         * pt-pwrite64.c: Likewise.
12330         * pt-read.c: Likewise.
12331         * pt-readv.c: Likewise.
12332         * pt-recv.c: Likewise.
12333         * pt-recvfrom.c: Likewise.
12334         * pt-recvmsg.c: Likewise.
12335         * pt-select.c: Likewise.
12336         * pt-send.c: Likewise.
12337         * pt-sendmsg.c: Likewise.
12338         * pt-sendto.c: Likewise.
12339         * pt-sigpause.c: Likewise.
12340         * pt-sigsuspend.c: Likewise.
12341         * pt-sigtimedwait.c: Likewise.
12342         * pt-sigwait.c: Likewise.
12343         * pt-sigwaitinfo.c: Likewise.
12344         * pt-system.c: Likewise.
12345         * pt-tcdrain.c: Likewise.
12346         * pt-wait.c: Likewise.
12347         * pt-waitid.c: Likewise.
12348         * pt-waitpid.c: Likewise.
12349         * pt-write.c: Likewise.
12350         * pt-writev.c: Likewise.
12351         * pthread_join.c: Likewise.
12352         * pthread_timedjoin.c: Likewise.
12354         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
12355         (__xpg_sigpause): New function.
12356         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
12358 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
12360         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
12362         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
12363         _GI_pthread_cleanup_pop to pthreadP.h.
12365         * ftrylockfile.c: Use _IO_lock_trylock instead of
12366         pthread_mutex_trylock.
12368         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
12369         (CANCEL_RESET): Likewise.
12370         (__pthread_setcanceltype_): Declare.
12371         (__pthread_mutex_lock_internal): Declare.
12372         (__pthread_mutex_unlock_internal): Declare.
12373         (__pthread_once_internal): Declare.
12374         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
12375         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
12377         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
12378         and pthread_mutex_unlock.
12379         * pthread_cond_wait.c: Likewise.
12380         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
12381         * pthread_mutex_unlock.c: Likewise.
12383         * pthread_setcanceltype.c: Add additional alias
12384         __pthread_setcanceltype.
12386         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
12387         * sem_open.c (sem_open): Likewise.
12388         Use __libc_open, __libc_write, and __libc_close instead of
12389         open, write, and close respectively.
12391         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
12392         Rewrite as statement expression since it must return a value.
12394         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
12395         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
12396         __pthread_kill.
12398         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
12399         alias __pthread_once_internal.
12401         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
12403 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
12405         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
12406         * tst-stdio1.c: New file.
12407         * tst-stdio2.c: New file.
12409         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
12411         * Makefile (tests): Comment out tst-locale2 for now.
12412         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
12414         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
12415         -D_IO_MTSAFE_IO.
12416         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
12417         Use _IO_lock_init instead of explicit assignment.
12419         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
12420         Define __libc_lock_* and __libc_lock_recursive macros with
12421         lowlevellock macros, not pthread mutexes.
12423         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
12424         of pthread_mutex_lock.
12425         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
12426         instead of pthread_mutex_unlock.
12428 2002-12-06  Roland McGrath  <roland@redhat.com>
12430         * allocatestack.c (__stack_user): Use uninitialized defn.
12431         * init.c (__pthread_initialize_minimal): Initialize it here.
12433 2002-12-05  Roland McGrath  <roland@redhat.com>
12435         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
12436         string.
12437         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
12439         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
12440         missing & here too.
12442 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
12444         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12445         lowlevellock.
12446         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
12447         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
12448         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
12449         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
12450         for __libc_lock_* macros.
12451         * Makefile (routines): Add libc-lowlevellock.
12453 2002-10-09  Roland McGrath  <roland@redhat.com>
12455         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
12456         Under [__PIC__], call the function via the pointer fetched for
12457         comparison rather than a call by name that uses the PLT.
12458         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
12459         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
12460         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
12461         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
12462         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
12464 2002-12-04  Roland McGrath  <roland@redhat.com>
12466         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
12468         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
12469         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
12471         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
12473 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
12475         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
12476         a completely opaque, non-integer type.
12477         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
12479 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
12481         * sysdeps/i386/tls.h: Include stdlib.h.
12482         * sysdeps/x86_64/tls.h: Likewise.
12484 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
12486         * Makefile (tests): Add tst-locale2.
12487         (tests-static): Likewise.
12488         * tst-locale2.c: New file.
12490         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
12491         volatile and add memory clobbers to lock operations.
12493 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
12495         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
12496         * sysdeps/i386/i486/bits/atomic.h: New file.
12497         * sysdeps/i386/i586/bits/atomic.h: New file.
12498         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
12499         include i486 version.
12500         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
12501         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
12502         Patch by Marijn Ros <marijn@mad.scientist.com>.
12504         * allocatestack.c (get_cached_stack): Don't crash if we first
12505         found a stack with a larger size then needed.
12506         Reported by Hui Huang <hui.huang@sun.com>.
12508         * Makefile (tests): Add tst-sysconf.
12509         * tst-sysconf.c: New file.
12511         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
12512         PTHREAD_THREADS_MAX.
12514 2002-12-02  Roland McGrath  <roland@redhat.com>
12516         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
12517         Declare using hidden_proto instead of attribute_hidden, so there are
12518         non-.hidden static symbols for gdb to find.
12519         (__pthread_keys): Likewise.
12520         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
12521         * allocatestack.c (__stack_user): Likewise.
12522         * pthread_create.c (__pthread_keys): Likewise.
12523         (__nptl_threads_events, __nptl_last_event): Make these static instead
12524         of hidden.
12525         * pthread_key_create.c (__pthread_pthread_keys_max,
12526         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
12528 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
12530         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
12531         statically.
12532         * tst-locale1.c: New file.
12534         * pthread_cond_timedwait.c: Include <stdlib.h>.
12536         * Makefile (tests): Add tst-fork2 and tst-fork3.
12537         * tst-fork2.c: New file.
12538         * tst-fork3.c: New file.
12540 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
12542         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
12544         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
12545         require it to 200112L.
12547         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
12548         instruction only if HAVE_CMOV is defined.
12549         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
12551         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
12553         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
12555         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
12557         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
12559 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
12561         * sysdeps/x86_64/bits/atomic.h: New file.
12563         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
12564         16-bit operations.
12566         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
12567         possible since gettid cannot fail.
12569         * sysdeps/x86_64/pthreaddef.h: New file.
12571         * sysdeps/i386/pthreaddef.h (gettid): Removed.
12573         * sysdeps/x86_64/pthread_spin_init.c: New file.
12574         * sysdeps/x86_64/pthread_spin_lock.c: New file.
12575         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
12576         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
12578         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
12579         Add missing lock prefix.  Minute optimization.
12581         * tst-spin2.c (main): Also check successful trylock call.
12583         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
12584         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
12586         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
12587         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
12589         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
12590         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
12591         value in case of an error.  Add support for INTERNAL_SYSCALL.
12593         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
12594         value in case of an error.
12596         * sysdeps/x86_64/tls.h: New file.
12598 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
12600         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
12601         takes the array member name and the index as parameters.
12602         (THREAD_SETMEM_NC): Likewise.
12603         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
12604         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
12605         interfaces.
12607         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
12608         to decide which code to use.
12609         (THREAD_SETMEM_NC): Likewise.
12611         * allocatestack.c (queue_stack): Don't remove stack from list here.
12612         Do it in the caller.  Correct condition to prematurely terminate
12613         loop to free stacks.
12614         (__deallocate_stack): Remove stack from list here.
12616 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
12618         * Makefile (tests): Add tst-stack1.
12619         * tst-stack1.c: New file.
12621         * allocatestack.c (allocate_stack): Initialize the TCB on a user
12622         provided stack.
12624         * pthread_attr_getstack.c: Return bottom of the thread area.
12626 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
12628         * Makefile (libpthread-routines): Add pt-allocrtsig and
12629         pthread_kill_other_threads.
12630         * pt-allocrtsig.c: New file.
12631         * pthread_kill_other_threads.c: New file.
12632         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
12633         all three functions.
12634         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12635         allocrtsig.
12636         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
12637         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
12638         and __libc_allocate_rtsig_private.
12639         * Versions (libpthread): Export pthread_kill_other_threads_np,
12640         __libc_current_sigrtmin, and __libc_current_sigrtmax.
12642 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
12644         * allocatestack.c (allocate_stack): stackaddr in attribute points to
12645         the end of the stack.  Adjust computations.
12646         When mprotect call fails dequeue stack and free it.
12647         * pthread_attr_setstack.c: Store top of the stack in stackaddr
12648         attribute.
12649         * pthread_getattr_np.c: Likewise.
12651         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
12652         surprises.
12654 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
12656         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
12657         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
12659 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
12661         * pthread_getspecific.c: Optimize access to first 2nd-level array.
12662         * pthread_setspecific.c: Likewise.
12664 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
12666         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
12667         definitions.  Get them from the official place.
12668         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
12670         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
12671         Use new CLONE_ flags in clone() calls.
12673         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
12674         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
12676         * Versions: Add pthread_* functions for libc.
12677         * forward.c: New file.
12679         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
12680         errno-loc.
12681         * herrno.c: New file.
12682         * res.c: New file.
12684         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
12685         sem_trywait, and sem_timedwait.  Add herrno and res.
12686         * sem_init.c: Don't initialize lock and waiters members.
12687         * sem_open.c: Likewise.
12688         * sem_post.c: Removed.
12689         * sem_wait.c: Removed.
12690         * sem_trywait.c: Removed.
12691         * sem_timedwait.c: Removed.
12692         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
12693         Includes full implementations of sem_post, sem_wait, sem_trywait,
12694         and sem_timedwait.
12695         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
12696         for new implementation.
12697         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
12698         and waiters fields.
12700         * tst-sem3.c: Improve error message.
12701         * tst-signal3.c: Likewise.
12703         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
12704         to tell the kernel about the termination futex and to initialize tid
12705         member.  Don't initialize main_thread.
12706         * descr.h (struct pthread): Remove main_thread member.
12707         * cancelllation.c (__do_cancel): Remove code handling main thread.
12708         The main thread is not special anymore.
12710         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
12711         size of the stacks to stack_cache_actsize.
12713         * pt-readv.c: Add missing "defined".
12714         * pt-sigwait.c: Likewise.
12715         * pt-writev.c: Likewise.
12717 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
12719         * Versions: Export __connect from libpthread.
12720         Patch by Luca Barbieri <ldb@ldb.ods.org>.
12722         * Makefile (libpthread-routines): Add pt-raise.
12723         * sysdeps/unix/sysv/linux/raise.c: New file.
12724         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
12725         * sysdeps/generic/pt-raise.c: New file.
12727         * pthread_cond_init.c: Initialize all data elements of the condvar
12728         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
12730         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
12731         * pthread_create.c: Likewise.
12733         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
12734         * tst-key1.c: New file.
12735         * tst-key2.c: New file.
12736         * tst-key3.c: New file.
12738         * Versions: Export pthread_detach for version GLIBC_2.0.
12739         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
12741 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
12743         * pthread_key_create.c: Terminate search after an unused key was found.
12744         Patch by Luca Barbieri <ldb@ldb.ods.org>.
12746         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
12747         Patch by Luca Barbieri <ldb@ldb.ods.org>.
12749 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
12751         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
12752         dynamic lookup for errno in PIC.
12754         * allocatestack.c (get_cached_stack): Rearrange code slightly to
12755         release the stack lock as soon as possible.
12756         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
12757         the static TLS block.
12758         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
12760         * cancellation.c: Renamed from cancelation.c.
12761         * Makefile: Adjust accordingly.
12762         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
12763         * cleanup_defer.c: Use CANCELLATION_P.
12764         * pthread_testcancel.c: Likewise.
12765         * descr.h: Fix spelling in comments.
12766         * init.c: Likewise.
12767         * pthread_getattr_np.c: Likewise.
12768         * pthread_getschedparam.c: Likewise.
12769         * pthread_setschedparam.c: Likewise.
12770         * Versions: Likewise.
12772         * pt-pselect.c: New file.
12773         * Makefile (libpthread-routines): Add pt-pselect.
12774         * Versions: Add pselect.
12776         * tst-cancel4.c: New file.
12777         * Makefile (tests): Add tst-cancel4.
12779 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
12781         * pthread_mutex_lock.c: Always record lock ownership.
12782         * pthread_mutex_timedlock.c: Likewise.
12783         * pthread_mutex_trylock.c: Likewise.
12785         * pt-readv.c: New file.
12786         * pt-writev.c: New file.
12787         * pt-creat.c: New file.
12788         * pt-msgrcv.c: New file.
12789         * pt-msgsnd.c: New file.
12790         * pt-poll.c: New file.
12791         * pt-select.c: New file.
12792         * pt-sigpause.c: New file.
12793         * pt-sigsuspend.c: New file.
12794         * pt-sigwait.c: New file.
12795         * pt-sigwaitinfo.c: New file.
12796         * pt-waitid.c: New file.
12797         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
12798         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
12799         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
12800         * Versions: Add all the new functions.
12802         * tst-exit1.c: New file.
12803         * Makefile (tests): Add tst-exit1.
12805         * sem_timedwait.c: Minor optimization for more optimal fastpath.
12807 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
12809         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
12811         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
12812         call.  pthread_join is an official cancellation point.
12813         * pthread_timedjoin.c: Likewise.
12815         * pthread_cond_wait.c: Revert order in which internal lock are dropped
12816         and the condvar's mutex are retrieved.
12817         * pthread_cond_timedwait.c: Likewise.
12818         Reported by dice@saros.East.Sun.COM.
12820 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
12822         * pthreadP.h: Cut out all type definitions and move them...
12823         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
12824         * pthreadP.h: Include <internaltypes.h>.
12826         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
12827         performance tweaks.
12829         * sem_trywait.c: Shuffle #includes around to get right order.
12830         * sem_timedwait.c: Likewise.
12831         * sem_post.c: Likewise.
12832         * sem_wait.c: Likewise.
12834         * nptl 0.3 released.
12836         * Makefile (tests): Add tst-signal3.
12837         * tst-signal3.c: New file.
12839 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
12841         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
12842         the asms modify the sem object.
12843         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
12845         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
12846         the actual members.
12847         * pthreadP.h (struct sem): New type.  Actual semaphore type.
12848         * semaphoreP.h: Include pthreadP.h.
12849         * sem_getvalue.c: Adjust to sem_t change.
12850         * sem_init.c: Likewise.
12851         * sem_open.c: Likewise.
12852         * sem_post.c: Likewise.
12853         * sem_timedwait.c: Likewise.
12854         * sem_trywait.c: Likewise.
12855         * sem_wait.c: Likewise.
12857 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
12859         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
12860         * tst-basic2.c: New file.
12861         * tst-exec1.c: New file.
12862         * tst-exec2.c: New file.
12863         * tst-exec3.c: New file.
12865         * tst-fork1.c: Remove extra */.
12867         * nptl 0.2 released.  The API for IA-32 is complete.