PowerPC floating point little-endian [15 of 15]
[glibc.git] / nptl / ChangeLog
blob29469fcd911f9fab0ee2f3b608ff5679be2298c7
1 2013-10-01  Siddhesh Poyarekar  <siddhesh@redhat.com>
3         [BZ #15988]
4         * pthread_cond_broadcast.c (__pthread_cond_broadcast)
5         [lll_futex_cmp_requeue_pi && __ASSUME_REQUEUE_PI]: Use
6         USE_REQUEUE_PI.
7         * pthread_cond_signal.c (__pthread_cond_signal)
8         [lll_futex_cmd_requeue_pi && __ASSUME_REQUEUE_PI]: Likewise.
10 2013-09-27  Siddhesh Poyarekar  <siddhesh@redhat.com>
12         * sysdeps/pthread/bits/libc-lock.h [_LIBC && (!NOT_IN_libc ||
13         IS_IN_libpthread)] (__libc_lock_fini_recursive): Use the mutex
14         member of the argument.
15         (__libc_lock_trylock_recursive): Likewise.
16         (__libc_lock_unlock_recursive): Likewise.
18 2013-09-04  Joseph Myers  <joseph@codesourcery.com>
20         * sysdeps/unix/sysv/linux/x86_64/cancellation.S
21         [SHARED && DO_VERSIONING && !NO_HIDDEN]: Change conditional to
22         [SHARED && !NO_HIDDEN].
24 2013-09-03  Siddhesh Poyarekar  <siddhesh@redhat.com>
26         [BZ #15921]
27         * tst-cleanup2.c (do_test): New volatile variable RET to
28         return success.
30 2013-08-30   Ondřej Bílka  <neleai@seznam.cz>
32         * sysdeps/pthread/pthread.h: Fix typos.
33         * sysdeps/unix/sysv/linux/internaltypes.h: Likewise.
34         * tst-cancel4.c: Likewise.
36 2013-08-21   Ondřej Bílka  <neleai@seznam.cz>
38         * pthread_getschedparam.c: Fix typos.
39         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
41 2013-07-23  David S. Miller  <davem@davemloft.net>
43         * tst-cancel4.c (WRITE_BUFFER_SIZE): Adjust comment.
45 2013-07-22  David S. Miller  <davem@davemloft.net>
47         * tst-cancel4.c (WRITE_BUFFER_SIZE): Increase to 16384.
49 2013-07-19  Dominik Vogt  <vogt@de.ibm.com>
51         * pthread_mutex_lock.c: Fix whitespace.
52         * pthread_mutex_trylock.c: Likewise.
53         * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: Likewise.
54         * sysdeps/unix/sysv/linux/x86/elision-conf.c: Likewise.
55         * sysdeps/unix/sysv/linux/x86/elision-conf.h: Likewise.
56         * sysdeps/unix/sysv/linux/x86/elision-lock.c: Likewise.
57         * sysdeps/unix/sysv/linux/x86/elision-timed.c: Likewise.
58         * sysdeps/unix/sysv/linux/x86/elision-trylock.c: Likewise.
59         * sysdeps/unix/sysv/linux/x86/force-elision.h: Likewise.
60         * sysdeps/unix/sysv/linux/x86/hle.h: Likewise.
61         * sysdeps/unix/sysv/linux/x86/pthread_mutex_cond_lock.c: Likewise.
62         * sysdeps/unix/sysv/linux/x86/pthread_mutex_lock.c: Likewise.
63         * sysdeps/unix/sysv/linux/x86/pthread_mutex_timedlock.c: Likewise.
64         * sysdeps/unix/sysv/linux/x86/pthread_mutex_trylock.c: Likewise.
66         * sysdeps/unix/sysv/linux/x86/elision-conf.c:
67         Remove __rwlock_rtm_enabled and __rwlock_rtm_read_retries.
68         (elision_init): Don't set __rwlock_rtm_enabled.
69         * sysdeps/unix/sysv/linux/x86/elision-conf.h:
70         Remove __rwlock_rtm_enabled.
72 2013-07-03  H.J. Lu  <hongjiu.lu@intel.com>
74         * sysdeps/unix/sysv/linux/x86/init-arch.c: New file.
75         * sysdeps/unix/sysv/linux/x86/init-arch.h: Likewise.
77 2013-07-02  Andi Kleen <ak@linux.intel.com>
79         * sysdeps/unix/sysv/linux/x86/elision-conf.c (elision_init):
80           Check ENABLE_LOCK_ELISION.
82 2013-07-02  Andi Kleen  <ak@linux.intel.com>
84         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype):
85           Disable elision for PTHREAD_MUTEX_DEFAULT.
87 2013-07-02  Andi Kleen  <ak@linux.intel.com>
88             Hongjiu Lu  <hongjiu.lu@intel.com>
90         * pthread_mutex_lock.c
91         (__pthread_mutex_lock): Add lock elision support.
92         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
93         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
94         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
95         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
96         * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: Likewise.
97         * sysdeps/unix/sysv/linux/x86/Makefile: New file.
98         * sysdeps/unix/sysv/linux/x86/force-elision.h: New file
99         * sysdeps/unix/sysv/linux/x86/pthread_mutex_cond_lock.c: Likewise.
100         * sysdeps/unix/sysv/linux/x86/pthread_mutex_lock.c: Likewise.
101         * sysdeps/unix/sysv/linux/x86/pthread_mutex_timedlock.c: Likewise.
102         * sysdeps/unix/sysv/linux/x86/pthread_mutex_trylock.c: Likewise.
103         * sysdeps/unix/sysv/linux/x86/pthread_mutex_unlock.c: Likewise.
105 2013-07-02  Andi Kleen  <ak@linux.intel.com>
107         * tst-mutex5.c: Include config.h.
108           (do_test): Add checks for ENABLE_LOCK_ELISION.
109         * tst-mutex8.c: Include config.h
110           (tf): Add checks for ENABLE_LOCK_ELISION.
111           (check_type): Likewise.
113 2013-07-02  Andi Kleen  <ak@linux.intel.com>
115         * pthreadP.h: Add elision types.
116           (PTHREAD_MUTEX_TYPE_ELISION): Add.
117         * sysdeps/pthread/pthread.h: Add elision initializers.
118           (PTHREAD_MUTEX_ELISION_NP, PTHREAD_MUTEX_NO_ELISION_NP,
119            PTHREAD_MUTEX_PSHARED_NP): Add new flags.
120           (__PTHREAD_SPINS): Add.
122 2013-07-02  Andi Kleen  <ak@linux.intel.com>
123             Hongjiu Lu  <hongjiu.lu@intel.com>
125         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_timedwait_tid,
126           lll_timedlock_elision, __lll_lock_elision, __lll_unlock_elision,
127           __lll_trylock_elision, lll_lock_elision, lll_unlock_elision,
128           lll_trylock_elision): Add.
129         * sysdeps/unix/sysv/linux/x86/Makefile: Imply x86.
130         * sysdeps/unix/sysv/linux/x86/elision-conf.c: New file.
131         * sysdeps/unix/sysv/linux/x86/elision-conf.h: New file.
132         * sysdeps/unix/sysv/linux/x86/elision-lock.c: New file.
133         * sysdeps/unix/sysv/linux/x86/elision-timed.c: New file.
134         * sysdeps/unix/sysv/linux/x86/elision-trylock.c: New file.
135         * sysdeps/unix/sysv/linux/x86/elision-unlock.c: New file.
136         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_timedwait_tid,
137           lll_timedlock_elision, __lll_lock_elision, __lll_unlock_elision,
138           __lll_trylock_elision, lll_lock_elision, lll_unlock_elision,
139           lll_trylock_elision): Add.
140         * nptl/sysdeps/unix/sysv/linux/x86/hle.h: New file.
141         * elision-conf.h: New file.
143 2013-06-24  Vladimir Nikulichev  <v.nikulichev@gmail.com>
145         [BZ #12310]
146         * pthread_exit.c: Add reference to pthread_create.
148 2013-06-22  Joseph Myers  <joseph@codesourcery.com>
150         * pthread_getattr_default_np.c: Include <string.h>.
152 2013-06-15  Siddhesh Poyarekar  <siddhesh@redhat.com>
154         * Versions (libpthread): Add GLIBC_2.18.
155         (GLIBC_2.18): Add pthread_setattr_default_np and
156         pthread_getattr_default_np.
157         * allocatestack.c (allocate_stack): Synchronize read from
158         __default_pthread_attr.
159         (__reclaim_stacks): Initialize __default_pthread_attr_lock.
160         * nptl-init.c (__pthread_initialize_minimal_internal):
161         Synchronize write to __default_pthread_attr.
162         * pthreadP.h (__default_pthread_attr_lock): Declare.
163         * pthread_attr_getstacksize (__pthread_attr_getstacksize):
164         Synchronize read from __default_pthread_attr.
165         * pthread_create.c (__pthread_create_2_1): Make a local copy of
166         __default_pthread_attr.  Check value of flags in IATTR even if
167         input ATTR is NULL.
168         * pthread_getattr_default_np.c: New file.
169         * pthread_setattr_default_np.c: New file.
170         * sysdeps/pthread/pthread.h [__USE_GNU]
171         (pthread_getattr_default_np, pthread_setattr_default_np):
172         Declare.
173         * tst-default-attr.c: New test case.
174         * Makefile (libpthread-routines): Add
175         pthread_setattr_default_np and pthread_getattr_default_np.
176         (tests): Add tst-default-attr.
177         * vars.c (__default_pthread_attr_lock): Declare and initialize.
179 2013-06-13  Siddhesh Poyarekar  <siddhesh@redhat.com>
180             Carlos O'Donell  <carlos@redhat.com>
182         [BZ #15618]
183         * tst-pthread-attr-affinity: New test case.
184         * Makefile (tests): Add it.
185         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
186         (__pthread_attr_getaffinity_new): Copy minimum of source and
187         destination sizes to avoid a buffer overrun.
189 2013-06-10  Carlos O'Donell  <carlos@redhat.com>
191         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
192         (lll_futex_wake): Return syscall error.
193         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
194         (lll_futex_wake): Return syscall error.
196 2013-08-06   Ondřej Bílka  <neleai@seznam.cz>
198         * sysdeps/pthread/allocalim.h: (__libc_use_alloca): Fix warning.
200 2013-06-06   Ondřej Bílka  <neleai@seznam.cz>
202         * tst-cond22.c: Fix leading whitespaces.
203         * tst-umask1.c: Likewise.
205 2013-06-06  Joseph Myers  <joseph@codesourcery.com>
207         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Remove
208         trailing whitespace.
209         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Likewise.
210         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
211         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
212         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
213         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
214         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
215         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
216         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
217         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
218         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
219         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
220         * tst-mutexpp10.c: Likewise.
221         * tst-stackguard1.c: Likewise.
223 2013-05-31  Joseph Myers  <joseph@codesourcery.com>
225         * Makefile ($(objpfx)libpthread.so): Remove dependencies on libc
226         and ld.so.
228 2013-05-16  Ryan S. Arnold  <rsa@linux.vnet.ibm.com>
230         * pthread_create.c: Add missing #include <stdint.h> due to uint64_t or
231         uint32_t usage.
232         * sysdeps/pthread/createthread.c: Likewise.
234 2013-05-14  Andreas Jaeger  <aj@suse.de>
236         [BZ #10686]
237         * sysdeps/x86_64/tls.h (struct tcbhead_t): Add __private_ss field.
238         * sysdeps/i386/tls.h (struct tcbhead_t): Likewise.
240 2013-05-09  Andi Kleen  <ak@linux.intel.com>
242         * tst-mutex8.c (do_test): Check for ENABLE_PI.
244 2013-04-22  Siddhesh Poyarekar  <siddhesh@redhat.com>
246         * pthreadP.h (check_sched_policy_attr): New inline function.
247         (check_sched_priority_attr): Likewise.
248         (check_stacksize_attr): Likewise.
249         (__kernel_cpumask_size, __determine_cpumask_size): Declare
250         extern.
251         (check_cpuset_attr): New inline function.
252         * pthread_attr_setschedparam (__pthread_attr_setschedparam):
253         Use check_sched_priority_attr.
254         * pthread_attr_setschedpolicy.c
255         (__pthread_attr_setschedpolicy): Use check_sched_policy_attr.
256         * pthread_attr_setstack.c (__pthread_attr_setstack): Use
257         check_stacksize_attr.
258         * pthread_attr_setstacksize.c (__pthread_attr_setstacksize):
259         Likewise.
260         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
261         (__pthread_attr_setaffinity_new): Use check_cpuset_attr.
263 2013-04-11  Andreas Schwab  <schwab@suse.de>
265         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
266         (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
267         directly use absolute timeout.
269 2013-04-07  Carlos O'Donell  <carlos@redhat.com>
271         * sysdeps/unix/sysv/linux/sem_post.c: Include atomic.h.
273 2013-04-04  Siddhesh Poyarekar  <siddhesh@redhat.com>
275         [BZ #15337]
276         * sysdeps/unix/sysv/linux/x86_64/cancellation.S
277         [IS_IN_libpthread]
278         [SHARED && defined DO_VERSIONING && !defined NO_HIDDEN]: Mark
279         __pthread_unwind hidden.
281 2013-03-28  Roland McGrath  <roland@hack.frob.com>
283         * pthread_create.c (start_thread) [!SHARED]:
284         Call __call_tls_dtors only if it's not NULL.
286 2013-03-19  Siddhesh Poyarekar  <siddhesh@redhat.com>
288         * allocatestack.c (allocate_stack): Use __default_pthread_attr
289         instead of __default_stacksize.
290         * nptl-init.c (__pthread_initialize_minimal_internal):
291         Likewise.  Initialize guardsize.
292         * pthreadP.h (__default_pthread_attr): Declare.
293         * pthread_attr_getstacksize.c (__pthread_attr_getstacksize):
294         Use __default_pthread_attr instead of __default_stacksize.
295         * pthread_create.c (default_attr): Remove.
296         (__pthread_create_2_1): Use __default_pthread_attr instead of
297         default_attr.
298         * vars.c (__default_stacksize): Remove.
299         (__default_pthread_attr): New static variable to store
300         default thread attributes.
302 2013-03-18  Siddhesh Poyarekar  <siddhesh@redhat.com>
304         * pthread_barrier_init.c (default_attr): Rename to
305         default_barrierattr.
306         (pthread_barrier_init): Adjust for the rename.
307         * pthread_mutex_init.c (default_attr): Rename to
308         default_mutexattr.
309         (__pthread_mutex_init): Adjust for the rename.
310         * pthread_rwlock_init.c (default_attr): Rebane to
311         default_rwlockattr.
312         (__pthread_rwlock_init): Adjust for the rename.
314 2013-03-12  Carlos O'Donell  <carlos@redhat.com>
316         * sysdeps/unix/sysv/linux/lowlevellock.c: Include <atomic.h>.
318 2013-03-04  Roland McGrath  <roland@hack.frob.com>
320         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h:
321         Change multiple inclusion guard to _LINUX_I686_DL_SYSDEP_H.
322         Use #include_next.
323         (HAVE_DL_DISCOVER_OSVERSION): Remove definition, now redundant.
324         (RTLD_PRIVATE_ERRNO): Likewise.
325         (NEED_DL_SYSINFO, DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION):
326         Move macros and associated declaration to ...
327         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: ... here.
328         Change multiple include guard to _LINUX_I386_DL_SYSDEP_H.
329         Use #include_next.
331 2013-03-01  Carlos O'Donell  <carlos@redhat.com>
333         * Makefile (tests): Revert last change.
334         (tst-pthread-stack-env-ENV): Likewise.
335         * nptl-init.c (set_default_stacksize): Likewise.
336         (__pthread_initialize_minimal_internal): Likewise.
337         * tst-pthread-stack-env.c: Likewise.
339 2013-03-01  Siddhesh Poyarekar  <siddhesh@redhat.com>
341         * tst-oddstacklimit.c: Include stdlib.h.
343         * Makefile (tests): Add tst-pthread-stack-env.
344         (tst-pthread-stack-env-ENV): Set environment for test.
345         * nptl-init.c (set_default_stacksize): New function.
346         (__pthread_initialize_minimal_internal): Accept ARGC, ARGV and
347         ENVP.  Initialize __ENVIRON and set __DEFAULT_STACKSIZE.
348         * tst-pthread-stack-env.c: New test case.
350 2013-02-21  David S. Miller  <davem@davemloft.net>
352         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
353         (FUTEX_WAIT_REQUEUE_PI): Define.
354         (FUTEX_CMP_REQUEUE_PI): Likewise.
355         (lll_futex_wait_requeue_pi): Likewise.
356         (lll_futex_timed_wait_requeue_pi): Likewise.
357         (lll_futex_cmp_requeue_pi): Likewise.
359 2013-02-21  Carlos O'Donell  <carlos@redhat.com>
361         * sysdeps/unix/sysv/linux/fork.c: Fix comment typo.
363 2013-02-18  Siddhesh Poyarekar  <siddhesh@redhat.com>
365         * sysdeps/pthread/tst-timer.c: Include stdlib.h for declaration
366         of exit.
367         * tst-barrier4.c: Likewise.
368         * tst-robust7.c: Likewise.
370         [BZ #14920]
371         * pthreadP.h (USE_REQUEUE_PI): New macro to check if mutex is
372         PI-aware.
373         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Use
374         PI-aware futex operations if available and mutex is PI-aware.
375         * pthread_cond_signal.c (__pthread_cond_signal): Likewise.
376         * nptl/pthread_cond_timedwait.c (__pthread_cond_timedwait):
377         Likewise.
378         * pthread_cond_wait.c (__condvar_cleanup): Adjust lock if
379         cancellation occurred just after futex returned successfully
380         from a PI operation with the mutex held.
381         (__pthread_cond_wait): Use PI-aware futex operations if
382         available and mutex is PI-aware.
383         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
384         (FUTEX_WAIT_REQUEUE_PI): Define.
385         (FUTEX_CMP_REQUEUE_PI): Likewise.
386         (lll_futex_wait_requeue_pi): Likewise.
387         (lll_futex_timed_wait_requeue_pi): Likewise.
388         (lll_futex_cmp_requeue_pi): Likewise.
389         * nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h
390         (FUTEX_WAIT_REQUEUE_PI): Define.
391         (FUTEX_CMP_REQUEUE_PI): Likewise.
392         (lll_futex_wait_requeue_pi): Likewise.
393         (lll_futex_timed_wait_requeue_pi): Likewise.
394         (lll_futex_cmp_requeue_pi): Likewise.
395         * sysdeps/unix/sysv/linux/kernel-features.h: Define
396         __ASSUME_REQUEUE_PI for Linux version higher than 2.6.31.
398 2013-02-04  Andreas Schwab  <schwab@suse.de>
400         [BZ #14142]
401         * tst-cancel14.c: Include <sys/time.h>.
402         * tst-cancel15.c: Likewise.
403         * tst-mutex9.c: Include <stdint.h>, <stdlib.h> and <sys/time.h>.
404         * tst-stackguard1.c: Include <tls.h>
406 2013-01-16  Andreas Schwab  <schwab@suse.de>
408         [BZ #14327]
409         * sem_open.c (sem_open): Use __mktemp instead of mktemp.
411 2013-01-11  Carlos O'Donell  <codonell@redhat.com>
413         * allocatestack.c (allocate_stack): Add comment. Remove assert
414         on attr.
416 2013-01-11  H.J. Lu  <hongjiu.lu@intel.com>
418         * Makefile (tst-cancel7-ARGS: Replace $(host-built-program-cmd)
419         with $(host-test-program-cmd).
420         (tst-exec4-ARGS): Likewise.
421         (tst-stackguard1-ARGS): Likewise.
422         ($(objpfx)tst-tls6.out): Don't pass $(elf-objpfx) to tst-tls6.sh.
423         Replace $(rtld-installed-name) with $(test-via-rtld-prefix).
424         * tst-tls6.sh (elf_objpfx): Removed.
425         (rtld_installed_name): Renamed to ...
426         (test_via_rtld_prefix): This.
427         (tst_tls5): Prepend ${test_via_rtld_prefix}.
429 2013-01-02  Joseph Myers  <joseph@codesourcery.com>
431         * All files with FSF copyright notices: Update copyright dates
432         using scripts/update-copyrights.
434 2013-01-01  Joseph Myers  <joseph@codesourcery.com>
436         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Reformat
437         copyright notice.
439 2012-12-28  Andi Kleen  <ak@linux.intel.com>
441         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Convert
442         to prototype.
443         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock):
444         Likewise.
446 2012-12-27  David S. Miller  <davem@davemloft.net>
448         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
449         (lll_futex_timed_wait_bitset): New macro.
451 2012-12-27  Siddhesh Poyarekar  <siddhesh@redhat.com>
453         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (SYS_futex):
454         Remove definition.
455         (lll_futex_timed_wait): Replace assembly code with
456         INTERNAL_SYSCALL.
457         (lll_futex_timed_wait_bitset): Likewise.
458         (lll_futex_wake): Likewise.
459         (lll_futex_requeue): Likewise.
460         (lll_futex_wake_unlock): Likewise.
462 2012-12-08  Siddhesh Poyarekar  <siddhesh@redhat.com>
464         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind):
465         Declare LOCAL_VAR as char.
467 2012-12-04  Joseph Myers  <joseph@codesourcery.com>
469         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__old_sem_post):
470         Cast result of atomic_increment_val to (void) instead of storing
471         in otherwise-unused variable.
473 2012-12-03  Allan McRae  <allan@archlinux.org>
475         * Makefile (LDFLAGS-tst-cond24, LDFLAGS-tst-cond25): Remove.
477 2012-11-26  H.J. Lu  <hongjiu.lu@intel.com>
479         * unwind.c (__pthread_unwind): Pass address of unwind_cleanup
480         to THREAD_SETMEM.
481         * sysdeps/i386/tls.h: Include <libc-internal.h>.
482         (THREAD_SETMEM): Use cast_to_integer before casting to uint64_t.
483         (THREAD_SETMEM_NC): Likewise.
484         * sysdeps/x86_64/tls.h: Include <libc-internal.h>.
485         (THREAD_SETMEM): Use cast_to_integer before casting to uint64_t.
486         (THREAD_SETMEM_NC): Likewise.
488 2012-11-21  Joseph Myers  <joseph@codesourcery.com>
490         * sysdeps/unix/sysv/linux/sem_post.c (__old_sem_post): Cast result
491         of atomic_increment_val to (void) instead of storing in
492         otherwise-unused variable.
494         * pthread_cond_timedwait.c (__pthread_cond_timedwait)
495         [__NR_clock_gettime]: Cast result of INTERNAL_VSYSCALL to void
496         instead of storing in otherwise-unused variable.
498 2012-11-14  Marcus Shawcroft  <marcus.shawcroft@linaro.org>
500         * Makefile (CFLAGS-open.c, CFLAGS-open64.c, CFLAGS-pause.c)
501           (CFLAGS-recv.c, CFLAGS-send.c): Define.
503 2012-11-06  Chris Metcalf  <cmetcalf@tilera.com>
505         * tst-sem14.c (TIMEOUT): Set timeout to 10 seconds.
506         * tst-cond24.c (TIMEOUT): Increase from 10 to 20 seconds.
508 2012-11-05  Siddhesh Poyarekar  <siddhesh@redhat.com>
510         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Time out
511         if absolute timeout is negative.
512         [__ASSUME_FUTEX_CLOCK_REALTIME &&
513         lll_futex_timed_wait_bitset]: Use lll_futex_timed_wait_bitset.
514         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
515         Likewise.
516         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
517         Likewise.
518         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
519         (__lll_robust_timedlock_wait): Likewise.
520         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
521         (lll_futex_timed_wait_bitset): New macro.
522         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
523         (lll_futex_timed_wait_bitset): Likewise.
525 2012-11-03  David S. Miller  <davem@davemloft.net>
527         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (BUSY_WAIT_NOP):
528         Add missing spaces.
529         (__cpu_relax): Likewise.
531 2012-11-02  H.J. Lu  <hongjiu.lu@intel.com>
533         * sysdeps/x86_64/tls.h: Don't include <xmmintrin.h>.
534         (__128bits): New struct typedef.
535         (tcbhead_t): Replace __m128 with __128bits.
537 2012-10-30  Aurelien Jarno  <aurelien@aurel32.net>
538             Joseph Myers  <joseph@codesourcery.com>
540         * Makefile (tst-cancel7-ARGS): Use exec in --command argument.
542 2012-10-28  David S. Miller  <davem@davemloft.net>
544         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (BUSY_WAIT_NOP):
545         Define when we have v9 instructions available.
546         * sysdeps/unix/sysv/linux/sparc/sparc64/cpu_relax.S: New file.
547         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/cpu_relax.S: New
548         file.
549         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/Makefile: New
550         file.
551         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Add cpu_relax
552         to libpthread-routines.
554 2012-10-25  Roland McGrath  <roland@hack.frob.com>
556         * tst-cond-except.c (TEST_FUNCTION): New macro.
558 2012-10-25  Joseph Myers  <joseph@codesourcery.com>
560         * Makefile ($(objpfx)tst-tls6.out): Use $(BASH) not $(SHELL) to
561         run tst-tls6.sh.
562         * tst-tls6.sh: Use /bin/bash not /bin/sh.
564 2012-10-25  Roland McGrath  <roland@hack.frob.com>
566         * tst-basic2.c (do_test): Return RESULT, not always zero.
568         * tst-cond25.c: Include <stdint.h>
569         (waiter): Add casts to uintptr_t between casting integer<->pointer.
570         (timed_waiter): Likewise.
571         (do_test_wait): Likewise.
572         * tst-cond-except.c (thr): Likewise.
573         (do_test): Use prototype definition.
575 2012-10-24  Joseph Myers  <joseph@codesourcery.com>
576             Jim Blandy  <jimb@codesourcery.com>
578         * Makefile ($(objpfx)tst-tls6.out): Pass $(test-wrapper-env) to
579         tst-tls6.sh.
580         * tst-tls6.sh (test_wrapper_env): New variable.  Use it to run
581         programs with LD_PRELOAD set.
583 2012-10-24  Roland McGrath  <roland@hack.frob.com>
585         * Makefile ($(objpfx)tst-cond11, $(objpfx)tst-cond19): Targets removed.
586         ($(objpfx)tst-sem5, $(objpfx)tst-cancel18): Likewise.
587         ((objpfx)tst-cancelx18, $(objpfx)tst-clock2): Likewise.
588         ($(objpfx)tst-rwlock14): Likewise.
590 2012-10-24  Joseph Myers  <joseph@codesourcery.com>
592         * Makefile (tests): Remove tst-oddstacklimit.
593         (test-srcs): New variable.
594         (tst-oddstacklimit-ENV): Remove.
595         [$(run-built-tests) = yes] (tests): Depend on
596         $(objpfx)tst-oddstacklimit.out.
597         [$(run-built-tests) = yes] ($(objpfx)tst-oddstacklimit.out): New
598         target.
599         * tst-oddstacklimit.c: Do not include "tst-basic1.c".  Use
600         setrlimit before executing tst-basic1 test passed to --command.
602 2012-10-23  Joseph Myers  <joseph@codesourcery.com>
604         * Makefile [$(cross-compiling) = no]: Change condition to
605         [$(run-built-tests) = yes].
607 2012-10-23  Jim Blandy  <jimb@codesourcery.com>
608             Joseph Myers  <joseph@codesourcery.com>
610         * Makefile (tst-cancel7-ARGS): Use $(host-built-program-cmd).
611         (tst-exec4-ARGS): Likewise.
612         (tst-stackguard1-ARGS): Likewise.
614 2012-10-21  Jim Blandy  <jimb@codesourcery.com>
615             Joseph Myers  <joseph@codesourcery.com>
617         * Makefile ($(objpfx)tst-cancel-wrappers.out): Pass $(NM) to
618         tst-cancel-wrappers.sh.
619         * tst-cancel-wrappers.sh: Use nm program given as first argument,
620         not hardcoded "nm".
622 2012-10-17  Siddhesh Poyarekar  <siddhesh@redhat.com>
624         * tst-cond25.c (do_test_wait): Don't check for return value from
625         pthread_cancel.
627 2012-10-16  Siddhesh Poyarekar  <siddhesh@redhat.com>
629         [BZ #14652]
630         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
631         (__condvar_tw_cleanup):  Adjust the mutex data structure if it
632         was locked by FUTEX_WAIT_REQUEUE_PI.
633         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait
634         (__condvar_w_cleanup): Likewise.
635         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
636         (__condvar_cleanup2): Likewise.
637         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
638         (__condvar_cleanup1): Likewise.
640 2012-10-10  Carlos O'Donell  <carlos@systemhalted.org>
642         * sysdeps/pthread/pthread.h [!(defined __GNUC__ &&
643         defined __EXCEPTIONS) && defined __USE_GNU]
644         (pthread_cleanup_push_defer_np): Fix formatting.
646 2012-10-10  Siddhesh Poyarekar  <siddhesh@redhat.com>
648         [BZ #14652]
649         * Makefile (tests): New test case tst-cond25.
650         (LDFLAGS-tst-cond25): Link tst-cond25 against librt.
651         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
652         (__condvar_tw_cleanup): Lock mutex only if we don't already
653         own it.
654         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
655         (__condvar_w_cleanup): Likewise.
656         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add TID_MASK.
657         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
658         (__condvar_cleanup2): Lock mutex only if we don't already
659         own it.
660         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
661         (__condvar_cleanup1): Likewise.
662         * tst-cond25.c: New test case.
664 2012-10-09  Roland McGrath  <roland@hack.frob.com>
666         * sysdeps/pthread/configure: Regenerated.
667         * sysdeps/x86_64/configure: Regenerated.
669 2012-10-05  David S. Miller  <davem@davemloft.net>
671         [BZ #14568]
672         * sysdeps/sparc/tls.h (DB_THREAD_SELF_INCLUDE): Delete.
673         (DB_THREAD_SELF): Use constants for the register offsets.  Correct
674         the case of a 64-bit debugger with a 32-bit inferior.
676 2012-10-05  H.J. Lu  <hongjiu.lu@intel.com>
678         [BZ #14557]
679         * Makefile (tests-static): Add tst-cancel24-static,
680         tst-cond8-static tst-mutex8-static, tst-mutexpi8-static,
681         tst-sem11-static and tst-sem12-static.
682         (tests): Likewise.
683         (LDLIBS-tst-cancel24-static): New macro.
684         * tst-cancel24-static.cc: New file.
685         * tst-cond8-static.c: Likewise.
686         * tst-mutex8-static.c: Likewise.
687         * tst-mutexpi8-static.c: Likewise.
688         * tst-sem11-static.c: Likewise.
689         * tst-sem12-static.c: Likewise.
691 2012-10-05  Siddhesh Poyarekar  <siddhesh@redhat.com>
693         [BZ #14417]
694         * Makefile (tests): New test case tst-cond24.
695         (LDFLAGS-tst-cond24): Link tst-cond24 against librt.
696         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
697         (__pthread_cond_timedwait): Unlock mutex before going back to
698         wait in PI case.
699         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
700         (__pthread_cond_wait): Likewise.  Revert handling of EAGAIN
701         return from futex_wait.
702         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
703         (__pthread_cond_timedwait): Unlock mutex before going back to
704         wait in PI case.  Set requeue_pi flag only if wait returned 0.
705         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
706         (__pthread_cond_wait): Likewise.  Revert handling of EAGAIN
707         return from futex_wait.
708         * tst-cond24.c: New test case.
710 2012-10-04  Roland McGrath  <roland@hack.frob.com>
712         * pthread_create.c (start_thread): Use __madvise, not madvise.
714 2012-10-02  H.J. Lu  <hongjiu.lu@intel.com>
716         * sysdeps/i386/tls.h: Update copyright years.
718 2012-10-02  Siddhesh Poyarekar  <siddhesh@redhat.com>
720         * pthread_create.c (start_thread): Fix clone flag name in
721         comment to CLONE_CHILD_CLEARTID.
722         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
723         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
724         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
725         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
726         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
727         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
729 2012-10-01  Siddhesh Poyarekar  <siddhesh@redhat.com>
731         [BZ #14477]
732         * Makefile (tests): Add tst-cond-except.
733         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
734         (__pthread_cond_timedwait): Mark instructions where %ebx is
735         incremented in PI case.
736         (.gcc_except_table): Add entry to jump to __condvar_tw_cleanup2
737         for the marked PI case instructions.
738         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
739         (__pthread_cond_wait): Mark instructions where %ebx is
740         incremented in PI case.
741         (.gcc_except_table): Add entry to jump to __condvar_w_cleanup2
742         for the marked PI case instructions.
743         * tst-cond-except.c: New test case.
745 2012-09-24  Dmitry V. Levin  <ldv@altlinux.org>
747         * tst-tls6.sh: Add "set -e".
748         * Makefile: Do not specify -e option when running testsuite
749         shell scripts.
751         * tst-tls6.sh: Add copyright header.
753 2012-09-24  H.J. Lu  <hongjiu.lu@intel.com>
755         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Add "()" when casting
756         to uint64_t for 64-bit store.
757         (THREAD_SETMEM_NC): Likewise.
759 2012-09-19  H.J. Lu  <hongjiu.lu@intel.com>
761         * sysdeps/i386/tls.h (THREAD_SETMEM): Cast to uint64_t for
762         64-bit store.
763         (THREAD_SETMEM_NC): Likewise.
765 2012-09-14  Jeff Law  <law@redhat.com>
767         [BZ #14583]
768         * sysdeps/pthread/pthread.h: Fix prototype of __sigsetjmp.
770 2012-09-13  H.J. Lu  <hongjiu.lu@intel.com>
772         [BZ #14576]
773         * sysdeps/pthread/bits/libc-lockP.h (__rtld_lock_init_recursive):
774         Removed.
776 2012-09-07  H.J. Lu  <hongjiu.lu@intel.com>
778         * Makefile (LDFLAGS-tst-cancel24): Renamed to ...
779         (LDLIBS-tst-cancel24): This.
781 2012-09-06  H.J. Lu  <hongjiu.lu@intel.com>
783         [BZ #14545]
784         * Makefile (tests-static): Add tst-cancel21-static.
785         (tests): Likewise.
786         * tst-cancel21-static.c: New file.
788 2012-09-01  Joseph Myers  <joseph@codesourcery.com>
790         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
791         [!__ASSUME_POSIX_CPU_TIMERS]: Remove conditional code.
792         [__NR_clock_getres]: Make code unconditional.
793         (pthread_getcpuclockid): Remove code left unreachable by removal
794         of conditionals.
796 2012-08-31  Joseph Myers  <joseph@codesourcery.com>
798         [BZ #14532]
799         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Use
800         atomic_compare_and_exchange_bool_rel.
801         * tst-sem14.c: New file.
802         * Makefile (tests): Add tst-sem14.
804 2012-08-15  Roland McGrath  <roland@hack.frob.com>
806         * Makefile (CFLAGS-flockfile.c): Use $(libio-mtsafe) instead
807         of -D_IO_MTSAFE_IO.
808         (CFLAGS-ftrylockfile.c, CFLAGS-funlockfile.c): Likewise.
809         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-fork.c): Likewise.
811 2012-08-16  Joseph Myers  <joseph@codesourcery.com>
813         * pthread_cond_timedwait.c (__pthread_cond_timedwait)
814         [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
815         * pthread_condattr_setclock.c (pthread_condattr_setclock)
816         [!__ASSUME_POSIX_TIMERS]: Likewise.
817         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
818         (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
819         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
820         [!__ASSUME_POSIX_TIMERS]: Likewise.
821         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
822         (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
823         * sysdeps/unix/sysv/linux/timer_create.c [__NR_timer_create]: Make
824         code unconditional.
825         [!__NR-timer_create]: Remove conditional code.
826         (timer_create) [!__ASSUME_POSIX_TIMERS]: Likewise.
827         * sysdeps/unix/sysv/linux/timer_delete.c [__NR_timer_delete]: Make
828         code unconditional.
829         [!__NR_timer_delete]: Remove conditional code.
830         (timer_delete) [!__ASSUME_POSIX_TIMERS]: Likewise.
831         * sysdeps/unix/sysv/linux/timer_getoverr.c
832         [__NR_timer_getoverrun]: Make code unconditional.
833         [!__NR_timer_getoverrun]: Remove conditional code.
834         (timer_getoverrun) [!__ASSUME_POSIX_TIMERS]: Likewise.
835         * sysdeps/unix/sysv/linux/timer_gettime.c [__NR_timer_gettime]:
836         Make code unconditional.
837         [!__NR_timer_gettime]: Remove conditional code.
838         (timer_gettime) [!__ASSUME_POSIX_TIMERS]: Likewise.
839         * sysdeps/unix/sysv/linux/timer_routines.c [__NR_timer_create]:
840         Make code unconditional.
841         [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
842         * sysdeps/unix/sysv/linux/timer_settime.c [__NR_timer_settime]:
843         Make code unconditional.
844         [!__NR_timer_settime]: Remove conditional code.
845         (timer_settime) [!__ASSUME_POSIX_TIMERS]: Likewise.
846         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
847         (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Remove
848         conditional code.
850 2012-08-15  Tom de Vries  <vries@codesourcery.com>
851             Maxim Kuvyrkov  <maxim@codesourcery.com>
853         * sysdeps/pthread/bits/libc-lockP.h (__libc_lock_lock)
854         (__libc_lock_trylock): Allow pre-existing definitions.
856 2012-08-15  Maxim Kuvyrkov  <maxim@codesourcery.com>
858         * pthread_spin_lock.c: New file.
859         * pthread_spin_trylock.c: New file.
861 2012-08-08  Joseph Myers  <joseph@codesourcery.com>
863         * allocatestack.c (setxid_signal_thread) [__ASSUME_TGKILL]: Make
864         code unconditional.
865         (setxid_signal_thread) [!__ASSUME_TGKILL]: Remove conditional code.
866         * pthread_cancel.c (pthread_cancel) [__ASSUME_TGKILL]: Make code
867         unconditional.
868         (pthread_cancel) [!__ASSUME_TGKILL]: Remove conditional code.
869         * sysdeps/pthread/createthread.c (do_clone) [__ASSUME_TGKILL]:
870         Make code unconditional.
871         (do_clone) [!__ASSUME_TGKILL]: Remove conditional code.
872         * sysdeps/unix/sysv/linux/pt-raise.c (raise) [__ASSUME_TGKILL ||
873         __NR_tgkill]: Make code unconditional.
874         (raise) [__ASSUME_TGKILL]: Likewise.
875         (raise) [!__ASSUME_TGKILL]: Remove conditional code.
876         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill)
877         [__ASSUME_TGKILL]: Make code unconditional.
878         (__pthread_kill) [!__ASSUME_TGKILL]: Remove conditional code.
879         * sysdeps/unix/sysv/linux/raise.c (raise) [__ASSUME_TGKILL ||
880         __NR_tgkill]: Make code unconditional.
881         (raise) [__ASSUME_TGKILL]: Likewise.
882         (raise) [!__ASSUME_TGKILL]: Remove conditional code.
884 2012-08-07  Joseph Myers  <joseph@codesourcery.com>
886         * sysdeps/pthread/createthread.c (create_thread)
887         [!__ASSUME_NO_CLONE_DETACHED]: Remove conditional code.
889 2012-08-03  Joseph Myers  <joseph@codesourcery.com>
891         * nptl-init.c (sigcancel_handler) [__ASSUME_CORRECT_SI_PID]: Make
892         code unconditional.
893         (sighandler_setxid) [__ASSUME_CORRECT_SI_PID]: Likewise.
895 2012-07-28  Siddhesh Poyarekar  <siddhesh@redhat.com>
897         * tst-pthread-getattr.c (MAX_STACK_SIZE): New macro.
898         (pagesize): New static variable.
899         (allocate_and_test): Return MEM.  Rename parameter to TARGET.
900         (check_stack_top): New local variables MEM and PAGEMASK.  Cap
901         stack size to MAX_STACK_SIZE.  Call allocate_and_test for
902         halfway up the stack top page.  Verify that the top page was
903         written into.
904         (do_test): Get pagesize using sysconf.
906 2012-07-25  Andreas Schwab  <schwab@linux-m68k.org>
908         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Remove pseudo_end
909         label.
910         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Likewise.
911         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO):
912         Likewise.
914 2012-07-25  Siddhesh Poyarekar  <siddhesh@redhat.com>
916         * tst-pthread-getattr.c: Revert last change.
918 2012-07-20  Siddhesh Poyarekar  <siddhesh@redhat.com>
920         * tst-pthread-getattr.c (MAX_STACK_SIZE): New max cap for stack
921         size.
922         (_MIN): New macro.
923         (allocate_and_test): Return STACKADDR.  Access STACKADDR instead
924         of MEM to test.
925         (check_stack_top): Read valued written into STACKADDR in
926         allocate_and_test.  Cap stack size to MAX_STACK_SIZE.
928 2012-07-19  Siddhesh Poyarekar  <siddhesh@redhat.com>
930         * nptl-init.c (sighandler_setxid): Fix the comment that
931         describes it.
933 2012-06-23  Thomas Schwinge  <thomas@codesourcery.com>
935         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
936         (__lll_robust_timedlock_wait): Simplify CFI directives.
938 2012-06-20  Siddhesh Poyarekar  <siddhesh@redhat.com>
940         [BZ #12416]
941         * Makefile (tests): Add test case.
942         * pthread_getattr_np.c (pthread_getattr_np): Deduct pages below
943         the __libc_stack_end page from stacksize.  Truncate stacksize to
944         make it page aligned when it is computed from RLIMIT_STACK.
945         * tst-pthread-getattr.c: New test case. Verify that stackaddr is
946         accessible.
948 2012-06-07  Carlos Sánchez de La Lama  <csanchezdll@gmail.com>
950         [BZ #14205]
951         * sysdeps/sparc/sparc32/pthread_spin_lock.S: Do not use v9
952         branches.
954 2012-06-04  Siddhesh Poyarekar  <siddhesh@redhat.com>
955             Jakub Jelinek  <jakub@redhat.com>
957         [BZ #14188]
958         * sysdeps/pthread/pthread.h
959         [!(defined __GNUC__ && defined __EXCEPTIONS)]
960         (pthread_cleanup_push, pthread_cleanup_push_defer_np): Use
961         __libc_unlikely instead of __builtin_expect.
963 2012-05-30  H.J. Lu  <hongjiu.lu@intel.com>
965         [BZ #14117]
966         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Removed.
967         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
968         * sysdeps/unix/sysv/linux/i386/Implies: New file.
969         * sysdeps/unix/sysv/linux/x86_64/Implies: Likewise.
970         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Renamed
971         to ...
972         * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: This.
973         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Renamed
974         to ...
975         * sysdeps/unix/sysv/linux/x86/bits/semaphore.h: This.
977 2012-05-30  Andreas Schwab  <schwab@linux-m68k.org>
979         [BZ #14132]
980         * nptl-init.c (pthread_functions): Remove use of INTUSE and
981         _internal aliases.
982         (__pthread_initialize_minimal_internal): Likewise.
983         * sem_open.c: Likewise.
984         * sem_unlink.c: Likewise.
985         * pthreadP.h: Replace _internal aliases by hidden_proto
986         declarations.
987         * pthread_getspecific.c: Replace _internal alias by hidden_def.
988         * pthread_key_create.c: Likewise.
989         * pthread_mutex_destroy.c: Likewise.
990         * pthread_mutex_init.c: Likewise.
991         * pthread_mutex_lock.c: Likewise.
992         * pthread_mutex_unlock.c: Likewise.
993         * pthread_once.c: Likewise.
994         * pthread_rwlock_rdlock.c: Likewise.
995         * pthread_rwlock_unlock.c: Likewise.
996         * pthread_rwlock_wrlock.c: Likewise.
997         * pthread_setspecific.c: Likewise.
998         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
999         Likewise.
1000         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1001         Likewise.
1002         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1003         Likewise.
1004         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1005         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
1006         * sysdeps/unix/sysv/linux/s390/pthread_once.c: Likewise.
1007         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
1008         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
1009         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1010         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1011         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
1012         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
1013         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
1014         Likewise.
1015         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
1016         Likewise.
1017         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
1018         Likewise.
1020 2012-05-27  Chung-Lin Tang  <cltang@codesourcery.com>
1022         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO, LOAD_ARGS_1)
1023         (LOAD_ARGS_2 ,LOAD_ARGS_3 ,LOAD_ARGS_4): Add CFI restores.
1025         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_lock_wait_private)
1026         (__lll_lock_wait, __lll_timedlock_wait, __lll_timedwait_tid): Add CFI
1027         directives.
1028         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
1029         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Likewise.
1030         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
1031         (pthread_barrier_wait): Likewise.
1032         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
1033         (__pthread_cond_broadcast): Likewise.
1034         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
1035         (__pthread_cond_signal): Likewise.
1036         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1037         (__pthread_cond_timedwait): Likewise.
1038         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S (__pthread_cond_wait):
1039         Likewise.
1040         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S
1041         (__pthread_rwlock_rdlock): Likewise.
1042         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
1043         (pthread_rwlock_timedrdlock): Likewise.
1044         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
1045         (pthread_rwlock_timedwrlock): Likewise.
1046         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
1047         (__pthread_rwlock_unlock): Likewise.
1048         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S
1049         (__pthread_rwlock_wrlock): Likewise.
1050         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post): Likewise.
1051         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
1052         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
1053         Likewise.
1054         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
1056 2012-05-26  Siddhesh Poyarekar  <siddhesh@redhat.com>
1058         [BZ #12416]
1059         * nptl/pthread_getattr_np.c (pthread_getattr_np): Use
1060         __libc_stack_end rounded to the end of containing page as the
1061         real stack end.
1063 2012-05-25  Rayson Ho  <rho@redhat.com>
1065         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Low-level SystemTap
1066         probes for i386.
1067         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1068         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1069         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
1070         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1071         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1072         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1073         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1074         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1076 2012-05-25  Rayson Ho  <rho@redhat.com>
1077             Roland McGrath  <roland@hack.frob.com>
1079         * DESIGN-systemtap-probes.txt: New file.
1080         * pthread_cond_broadcast.c: SystemTap probes.
1081         * pthread_cond_init.c: Likewise.
1082         * pthread_cond_signal.c: Likewise.
1083         * pthread_cond_wait.c: Likewise.
1084         * pthread_cond_destroy.c: Likewise.
1085         * pthread_create.c: Likewise.
1086         * pthread_join.c: Likewise.
1087         * pthread_mutex_destroy.c: Likewise.
1088         * pthread_mutex_init.c: Likewise.
1089         * pthread_mutex_lock.c: Likewise.
1090         * pthread_mutex_timedlock.c: Likewise.
1091         * pthread_mutex_unlock.c: Likewise.
1092         * pthread_rwlock_destroy.c: Likewise.
1093         * pthread_rwlock_rdlock.c: Likewise.
1094         * pthread_rwlock_unlock.c: Likewise.
1095         * pthread_rwlock_wrlock.c: Likewise.
1096         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1097         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1098         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
1099         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1100         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1101         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1102         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1103         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1105 2012-05-24  Roland McGrath  <roland@hack.frob.com>
1107         * pthread_create.c (start_thread): Define pthread_start LIBC_PROBE.
1109 2012-05-17  Andreas Jaeger  <aj@suse.de>
1111         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
1112         (HAVE_DL_DISCOVER_OSVERSION): Don't declare _dl_discover_osversion
1113         only for older kernels.
1115 2012-05-15  Joseph Myers  <joseph@codesourcery.com>
1117         * pthreadP.h [!__NR_set_robust_list] (__NR_set_robust_list): Do
1118         not define.
1120 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1122         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_lock): Load
1123         futex pointer into RDI_LP.  Use RSP_LP to operate on stack.
1124         (lll_robust_lock): Likewise.
1125         (lll_cond_lock): Likewise.
1126         (lll_robust_cond_lock): Likewise.
1127         (lll_timedlock): Likewise.
1128         (lll_robust_timedlock): Likewise.
1129         (lll_unlock): Likewise.
1130         (lll_robust_unlock): Likewise.
1132 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1134         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use
1135         LP_OP(cmp) and RCX_LP on dep_mutex pointer.
1137 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1139         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Use LP_OP(op)
1140         on NWAITERS.
1141         (__gcc_personality_v0): Replace 8-byte data alignment with
1142         LP_SIZE alignment and .quad with ASM_ADDR.
1144 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1146         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Use LP_OP(op)
1147         on NWAITERS.
1148         (__gcc_personality_v0): Replace 8-byte data alignment with
1149         LP_SIZE alignment and .quad with ASM_ADDR.
1151 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1153         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Use LP_OP(cmp) on
1154         NWAITERS, which is unsigned long int.
1156 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1158         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
1159         (__gcc_personality_v0): Replace 8-byte data alignment with
1160         LP_SIZE alignment and .quad with ASM_ADDR.
1162 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1164         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Use
1165         LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer.  Load
1166         __vdso_clock_gettime pointer into RAX_LP.
1167         (__gcc_personality_v0): Replace 8-byte data alignment with
1168         LP_SIZE alignment and .quad with ASM_ADDR.
1170 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1172         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Use
1173         LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer.  Load
1174         __vdso_clock_gettime pointer into RAX_LP.
1175         (__gcc_personality_v0): Replace 8-byte data alignment with
1176         LP_SIZE alignment and .quad with ASM_ADDR.
1178 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1180         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Use
1181         LP_OP(cmp) and R8_LP on dep_mutex pointer.
1183 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1185         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Use LP_OP(mov)
1186         to update pointer in memory.  Load pointer into RDI_LP.
1188 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1190         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1191         (LLL_STUB_UNWIND_INFO_START): Align label to LP_SIZE instead
1192         of 8.
1193         (LLL_STUB_UNWIND_INFO_END): Likewise.
1194         (lll_timedlock): Load timeout pointer into RDX_LP.
1195         (lll_robust_timedlock): Likewise.
1197 2012-05-15  Siddhesh Poyarekar  <siddhesh@redhat.com>
1198             Jakub Jelinek  <jakub@redhat.com>
1200         [BZ #13613]
1201         * Makefile (tests): Add test cases.
1202         * descr.h (struct pthread): Add a comment describing multiple_threads.
1203         * pthreadP.h (__pthread_multiple_threads): Expand comment to include
1204         single-process case.
1205         * pthread_cancel.c (pthread_cancel): Enable multiple_threads
1206         before setting cancelstate of the thread.
1207         * sysdeps/unix/sysv/linux/libc_multiple_threads.c
1208         (__libc_multiple_threads): Add explanatory comment.
1209         * tst-cancel-self-cancelstate.c: New test case.
1210         * tst-cancel-self-canceltype.c: Likewise.
1211         * tst-cancel-self-cleanup.c: Supporting file for test cases.
1212         * tst-cancel-self-testcancel.c: New test case.
1213         * tst-cancel-self.c: Likewise.
1214         * vars.c: Expand comment to include single-process case.
1216 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
1218         * sysdeps/x86_64/tls.h: Don't include <bits/wordsize.h>.
1219         (tcbhead_t): Remove __x86_64__ check.  Align rtld_savespace_sse
1220         to 32 bytes.
1222 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
1224         * sysdeps/pthread/pthread.h (__PTHREAD_RWLOCK_INT_FLAGS_SHARED):
1225         New.
1226         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Check
1227         __PTHREAD_RWLOCK_INT_FLAGS_SHARED instead of __WORDSIZE.
1229 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
1231         * shlib-versions: Move x86_64-.*-linux.* entry to ...
1232         * sysdeps/x86_64/64/shlib-versions: Here.  New file.
1233         * sysdeps/x86_64/x32/shlib-versions: New file.
1235 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
1237         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Define x32
1238         __SIZEOF_PTHREAD_XXX_T.
1239         (__pthread_internal_list): Check __x86_64__ instead of __WORDSIZE.
1240         (pthread_mutex_t): Likewise.
1241         (pthread_rwlock_t): Likewise.
1242         (__PTHREAD_RWLOCK_INT_FLAGS_SHARED): New.  Defined if __x86_64__
1243         is defined.
1245 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
1247         * sysdeps/x86_64/x32/tls.h: New file.
1249 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
1251         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Use uint64_t on 64-bit
1252         integer.
1253         (THREAD_SETMEM_NC): Likewise.
1255 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
1257         * sysdeps/x86_64/tls.h (THREAD_SELF): Replace movq/%q0 with
1258         mov/%0.
1260 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
1262         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
1263         (__cleanup_fct_attribute): Check __x86_64__ instead of
1264         __WORDSIZE.
1266 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
1268         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER): Check
1269         __PTHREAD_MUTEX_HAVE_PREV instead of __WORDSIZE.
1270         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Likewise.
1271         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
1272         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
1274 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
1276         * pthread_create.c (start_thread): Check __PTHREAD_MUTEX_HAVE_PREV
1277         instead of __WORDSIZE.
1279 2012-05-10  Thomas Schwinge  <thomas@schwinge.name>
1281         [BZ #3748]
1282         * sysdeps/pthread/bits/libc-lockP.h (__libc_once_get): New macro.
1284 2012-05-09  Chung-Lin Tang  <cltang@codesourcery.com>
1286         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1287         (__pthread_cond_timedwait): Use CFI directives.
1288         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
1289         (__pthread_cond_wait): Likewise.
1290         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
1291         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
1293 2012-05-03  David S. Miller  <davem@davemloft.net>
1295         * sysdeps/sparc/sparc64/pthread_spin_unlock.S: Fix thinko, we
1296         always have to return 0, especially for the pthread_spin_init
1297         alias.
1298         * sysdeps/sparc/sparc32/pthread_spin_lock.S: Add missing trailing
1299         newline.
1300         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: Likewise.
1301         * sysdeps/sparc/sparc64/pthread_spin_lock.S: Likewise.
1303 2012-05-02  David S. Miller  <davem@davemloft.net>
1305         * sysdeps/sparc/sparc64/pthread_spin_lock.S: New.
1306         * sysdeps/sparc/sparc64/pthread_spin_lock.c: Delete.
1307         * sysdeps/sparc/sparc64/pthread_spin_unlock.S: New.
1308         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: Delete.
1309         * sysdeps/sparc/sparc64/pthread_spin_trylock.S: New.
1310         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: Delete.
1311         * sysdeps/sparc/sparc64/pthread_spin_init.c: New.
1312         * sysdeps/sparc/sparc32/pthread_spin_lock.S: New.
1313         * sysdeps/sparc/sparc32/pthread_spin_lock.c: Delete.
1314         * sysdeps/sparc/sparc32/pthread_spin_trylock.S: New.
1315         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: Delete.
1316         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: New.
1317         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: Delete.
1318         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.S: New.
1319         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: Delete.
1320         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.S: New.
1321         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: Delete.
1322         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_init.c: New.
1324 2012-05-02  Allan McRae  <allan@archlinux.org>
1326         * Makefile: (LDFLAGS-tst-tls5): Use $(no-as-needed).
1327         (LDFLAGS-tst-cancel24): Likewise.
1329 2012-05-02  Paul Pluzhnikov  <ppluzhnikov@google.com>
1331         * sysdeps/i386/pthread_spin_lock.S: New.
1332         * sysdeps/i386/pthread_spin_lock.c: Delete.
1333         * sysdeps/x86_64/pthread_spin_lock.S: New.
1334         * sysdeps/x86_64/pthread_spin_lock.c: Delete.
1336 2012-04-28  Andreas Schwab  <schwab@linux-m68k.org>
1338         * Makefile ($(objpfx)tst-stack3-mem, $(objpfx)tst-tls6.out): Don't
1339         run when cross-compiling.
1341 2012-04-26  Siddhesh Poyarekar  <siddhesh@redhat.com>
1343         * sysdeps/pthread/unwind-forcedunwind.c: Include gnu/lib-names.h
1344         instead of libgcc_s.h.
1346 2012-04-20  Paul Pluzhnikov  <ppluzhnikov@google.com>
1348         * sysdeps/x86_64/tls.h (TLS_GET_FS, TLS_SET_FS): Delete.
1350 2012-03-27  David S. Miller  <davem@davemloft.net>
1352         * tst-cond16.c (do_test): Use a thread stack size which is either
1353         PTHREAD_STACK_MIN or the page size, whichever is larger.
1354         * tst-cond18.c (do_test): Likewise.
1356 2012-03-19  H.J. Lu  <hongjiu.lu@intel.com>
1358         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Use
1359         register char * __asm__("rsp") to get stack frame.
1361 2012-03-19  H.J. Lu  <hongjiu.lu@intel.com>
1363         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (SYS_futex): Use
1364         __NR_futex directly.
1366 2012-03-19  H.J. Lu  <hongjiu.lu@intel.com>
1368         * unwind.c (unwind_stop): Cast _Unwind_GetCFA return to
1369         _Unwind_Ptr first.
1371 2012-03-16  David S. Miller  <davem@davemloft.net>
1373         [BZ #13844]
1374         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: Include using <..>
1375         instead of "...".
1376         * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c:
1377         Delete, not needed.
1379 2012-03-15  David S. Miller  <davem@davemloft.net>
1381         [BZ #13844]
1382         * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c: New file.
1384 2012-03-09  Paul Eggert  <eggert@cs.ucla.edu>
1386         [BZ #13673]
1387         * pt-crti.S: Replace FSF snail mail address with URL.
1389 2012-03-09  Joseph Myers  <joseph@codesourcery.com>
1391         * sysdeps/pthread/pthread.h (__need_clockid_t, __need_timespec):
1392         Do not define before including <time.h>.
1394 2012-03-08  David S. Miller  <davem@davemloft.net>
1396         * sysdeps/unix/sysv/linux/sparc/sem_post.c: Update copyright year.
1398 2012-03-08  Thomas Schwinge  <thomas@codesourcery.com>
1400         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1401         Check for timestamp before the Epoch.
1403         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Fix
1404         updating nwaiters.
1406         * tst-sem13.c (do_test): Add another test case.
1407         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1408         Fix updating nwaiters.
1410 2012-03-07  Joseph Myers  <joseph@codesourcery.com>
1412         [BZ #10545]
1413         * sysdeps/pthread/configure.in (libc_cv_forced_unwind): Change
1414         link test to a compile test.
1415         (libc_cv_c_cleanup): Likewise.  Declare puts rather than including
1416         <stdio.h>.
1417         * sysdeps/pthread/configure: Regenerated.
1419 2012-03-07  Ulrich Drepper  <drepper@gmail.com>
1421         * Makefile (distribute): Remove variable.
1423 2012-01-23  Thomas Schwinge  <thomas@codesourcery.com>
1425         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Get rid of
1426         superfluous assignment.
1427         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c (sem_timedwait):
1428         Likewise.
1429         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
1430         (sem_timedwait): Likewise.
1432 2012-03-06  Ulrich Drepper  <drepper@gmail.com>
1434         * sysdeps/pthread/bits/libc-lock.h: Move information not needed in
1435         installed headers to...
1436         * sysdeps/pthread/bits/libc-lockP.h: ...here.  New file.
1438 2012-03-06  David S. Miller  <davem@davemloft.net>
1440         * sysdeps/unix/sysv/linux/sparc/sem_post.c (__new_sem_post): Use
1441         atomic_increment and remove unused local variable.
1442         (__old_sem_post): Likewise.
1444 2012-02-27  David S. Miller  <davem@davemloft.net>
1446         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Don't refer to
1447         non-existing __pthread_attr.
1448         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1449         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1450         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1451         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1452         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1454 2012-02-26  Ulrich Drepper  <drepper@gmail.com>
1456         * sysdeps/pthread/pthread.h: Define __need_clockid_t for __USE_XOPEN2K.
1458         * sysdeps/pthread/pthread.h: Define __need_timespec before including
1459         <time.h>.
1460         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Name pthread_attr_t
1461         union.
1462         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1463         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1464         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1465         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1466         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1468 2012-02-21  Joseph Myers  <joseph@codesourcery.com>
1470         [BZ #13695]
1471         * Makefile (generated): Remove crti.S, crtn.S, defs.h and
1472         pt-initfini.s.
1473         [crti.S not in sysdirs] (omit-deps): Do not append.
1474         [crti.S not in sysdirs] (CFLAGS-pt-initfini.s): Remove variable.
1475         [crti.S not in sysdirs] (pt-initfini.c): Remove vpath directive.
1476         [crti.S not in sysdirs] ($(objpfx)crti.S): Remove rule.
1477         [crti.S not in sysdirs] ($(objpfx)crtn.S): Likewise.
1478         [crti.S not in sysdirs] ($(objpfx)defs.h): Likewise.
1479         [crti.S not in sysdirs] ($(objpfx)crti.o): Likewise.
1480         [crti.S not in sysdirs] ($(objpfx)crtn.o): Likewise.
1481         [crti.S in sysdirs] (extra-objs): Append unconditionally.
1482         [crti.S in sysdirs] ($(objpfx)crti.o): Define rule
1483         unconditionally.
1484         * sysdeps/pthread/pt-initfini.c: Remove file.
1486 2012-02-16  Richard Henderson  <rth@twiddle.net>
1488         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Remove file.
1489         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Remove file.
1491 2012-02-15  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1493         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Remove file.
1495 2012-02-16  David S. Miller  <davem@davemloft.net>
1497         * sysdeps/sparc/Makefile: Add -fPIC when building pt-crti.S and crtn.S
1499 2012-02-15  Marek Polacek  <polacek@redhat.com>
1501         * sysdeps/unix/sysv/linux/x86_64/Makefile: Remove file.
1503 2012-02-09  Paul Eggert  <eggert@cs.ucla.edu>
1505         Replace FSF snail mail address with URLs, as per GNU coding standards.
1507 2012-02-08  Andreas Schwab  <schwab@linux-m68k.org>
1509         * Makefile (extra-objs) [crti.S in sysdirs]: Add pt-crti.o.
1511 2012-02-08  Joseph Myers  <joseph@codesourcery.com>
1513         Support crti.S and crtn.S provided directly by architectures.
1514         * Makefile [crti.S in sysdirs] (omit-deps): Do not append.
1515         [crti.S in sysdirs] (CFLAGS-pt-initfini.s): Do not define variable.
1516         [crti.S in sysdirs] ($(objpfx)pt-initfini.s): Disable rule.
1517         [crti.S in sysdirs] ($(objpfx)crti.S): Likewise.
1518         [crti.S in sysdirs] ($(objpfx)crtn.S): Likewise.
1519         [crti.S in sysdirs] ($(objpfx)defs.h): Likewise.
1520         [crti.S in sysdirs] ($(objpfx)crti.o): Likewise.
1521         [crti.S in sysdirs] ($(objpfx)crtn.o): Likewise.
1522         [crti.S in sysdirs] (pt-initfini.c): Remove vpath directive.
1523         [crti.S in sysdirs] ($(objpfx)crti.o): New rule.
1524         * pt-crti.S: New file.
1525         * sysdeps/unix/sysv/linux/i386/Makefile: Remove file.
1527 2012-02-03  Joseph Myers  <joseph@codesourcery.com>
1529         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
1530         macros for PIC register setup.
1531         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1532         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1533         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1534         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1535         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1537 2012-01-11  Marek Polacek  <polacek@redhat.com>
1539         * forward.c (FORWARD_NORETURN): Define macro.
1540         (__pthread_unwind): Use FORWARD_NORETURN macro to avoid warning.
1541         (__pthread_exit): Likewise.
1543 2012-01-10  Ulrich Drepper  <drepper@gmail.com>
1545         * sysdeps/pthread/pthread.h: Add const attribute to pthread_equal.
1547         * pthreadP.h: Add noreturn to __pthread_exit.
1548         * sysdeps/pthread/pthread-functions.h: Likewise for ptr___pthread_exit.
1550 2011-12-30  Adhemerval Zanella  <azanella@linux.vnet.ibm.com>
1552         * sysdeps/unix/sysv/linux/aio_misc.h (__aio_create_helper_thread):
1553         Call pthread_attr_setstacksize() with result of
1554         __pthread_get_minstack() to account for application TLS usage.
1556 2012-01-08  Marek Polacek  <polacek@redhat.com>
1558         * sysdeps/unix/sysv/linux/mq_notify.c: Include <nptl/pthreadP.h>.
1560 2012-01-07  Ulrich Drepper  <drepper@gmail.com>
1562         [BZ #13553]
1563         * pthreadP.h: Use const instead of __const.
1564         * semaphore.h: Likewise.
1565         * sysdeps/pthread/bits/libc-lock.h: Likewise.
1566         * sysdeps/pthread/bits/sigthread.h: Likewise.
1567         * sysdeps/pthread/pthread.h: Likewise.
1569         * Makefile: Remove elf=yes test, only ELF is supported.
1571         * shlib-versions: Remove entries for ports architectures.
1573         In case anyone cares, the IA-64 architecture could move to ports.
1574         * sysdeps/ia64/*: Removed.
1575         * sysdeps/unix/sysv/linux/ia64/*: Removed.
1577 2011-12-22  Ulrich Drepper  <drepper@gmail.com>
1579         * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread): Use
1580         __pthread_get_minstack.
1581         * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Likewise.
1583         [BZ #13088]
1584         * sysdeps/unix/sysv/linux/timer_routines.c: Get minimum stack size
1585         through __pthread_get_minstack.
1586         * nptl-init.c (__pthread_initialize_minimal_internal): Get page size
1587         directly from _rtld_global_ro.
1588         (__pthread_get_minstack): New function.
1589         * pthreadP.h: Declare __pthread_get_minstack.
1590         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_get_minstack.
1592 2011-12-21  Ulrich Drepper  <drepper@gmail.com>
1594         [BZ #13515]
1595         * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1596         Correct reading name from file.
1598 2011-12-14  Carlos O'Donell  <carlos@systemhalted.org>
1600         * allocatestack.c (allocate_stack): Return errno on failure.
1602 2011-12-14  Jeff Law  <law@redhat.com>
1604         [BZ #5245]
1605         * pthread_create.c (__pthread_create_2_1): Translate ENOMEM to EAGAIN.
1607 2011-11-28  Andreas Schwab  <schwab@redhat.com>
1609         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Handle
1610         EAGAIN from FUTEX_WAIT_REQUEUE_PI.
1611         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1613 2011-11-15  Ulrich Drepper  <drepper@gmail.com>
1615         * pthread_getattr_np.c (pthread_getattr_np): Set FD_CLOEXEC for
1616         /proc/self/maps.
1618 2011-10-29  Ulrich Drepper  <drepper@gmail.com>
1620         [BZ #13358]
1621         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1622         (__pthread_cond_timedwait): Initialize %r15 correctly also for code
1623         path for kernels with FUTEX_CLOCK_REALTIME.
1624         Debugged by H.J. Lu <hjl.tools@gmail.com>.
1626 2011-10-27  Andreas Schwab  <schwab@redhat.com>
1628         [BZ #13344]
1629         * sysdeps/pthread/pthread.h: Use __THREADNL instead of __THREAD
1630         for memory synchronization functions.
1631         * semaphore.h: Likewise.
1633 2011-10-24  Ulrich Drepper  <drepper@gmail.com>
1635         * tst-cancel7.c: Avoid warning.
1636         * tst-mutex6.c: Likewise.
1637         * tst-mutex9.c: Likewise.
1638         * tst-mutexpi6.c: Likewise.
1640 2011-10-23  Ulrich Drepper  <drepper@gmail.com>
1642         * sysdeps/i386/tls.h: Remove #include <list.h>.
1644 2011-10-15  Ulrich Drepper  <drepper@gmail.com>
1646         * pthread_create.c (start_thread): Call __ctype_init.
1648 2011-09-15  Andreas Schwab  <schwab@redhat.com>
1650         * sysdeps/pthread/list.h: Define only list_t if __need_list_t is
1651         defined.
1652         (list_add): Add atomic_write_barrier.
1653         * descr.h: Define __need_list_t before including <list.h>.
1654         * nptl-init.c: Include <list.h>
1655         * allocatestack.c: Likewise.
1657 2011-09-11  Ulrich Drepper  <drepper@gmail.com>
1659         * sysdeps/i386/tls.h: Remove HAVE_TLS_SUPPORT test.
1660         * sysdeps/ia64/tls.h: Likewise.
1661         * sysdeps/powerpc/tls.h: Likewise.
1662         * sysdeps/s390/tls.h: Likewise.
1663         * sysdeps/sh/tls.h: Likewise.
1664         * sysdeps/sparc/tls.h: Likewise.
1665         * sysdeps/x86_64/tls.h: Likewise.
1667 2011-09-10  Ulrich Drepper  <drepper@gmail.com>
1669         * sysdeps/pthread/malloc-machine.h: Define MUTEX_INITIALIZER.
1671         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Don't handle
1672         !USE___THREAD.
1673         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1674         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1675         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1676         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1677         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
1678         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
1679         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
1680         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
1681         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1682         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1683         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
1684         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1686         * tst-tls1.c: Support for __thread is now mandatory.
1687         * tst-tls2.c: Likewise.
1688         * tst-tls3.c: Likewise.
1689         * tst-tls3mod.c: Likewise.
1690         * tst-tls4.c: Likewise.
1691         * tst-tls4moda.c: Likewise.
1692         * tst-tls4modb.c: Likewise.
1693         * tst-tls5.h: Likewise.
1695 2011-09-08  Ulrich Drepper  <drepper@gmail.com>
1697         [BZ #12403]
1698         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1699         (pthread_rwlock_timedwrlock): Use correct macro in test.
1700         Patch by H.J. Lu <hongjiu.lu@intel.com>.
1702 2011-09-06  Ulrich Drepper  <drepper@gmail.com>
1704         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): Don't
1705         use gettimeofday vsyscall, just call gettimeofday.
1706         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1707         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
1708         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1709         Likewise.
1710         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1711         Likewise.
1712         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1713         Simplify __vdso_clock_gettime use.
1715 2011-09-05  David S. Miller  <davem@davemloft.net>
1717         * sysdeps/unix/sysv/linux/sem_timedwait.c (do_futex_timed_wait):
1718         New function.
1719         (sem_timedwait): Call it to force an exception region around
1720         the async cancel enable and the futex operation.
1721         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: Likewise.
1722         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: Likewise.
1723         * sysdeps/unix/sysv/linux/sem_wait.c (do_futex_wait): New function.
1724         (__new_sem_wait): Call it to force an exception region around
1725         the async cancel enable and the futex operation.
1726         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: Likewise.
1727         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: Likewise.
1729 2011-08-31  Andreas Schwab  <schwab@redhat.com>
1731         * allocatestack.c (setxid_mark_thread): Ensure that the exiting
1732         thread is woken up.
1734 2011-08-20  David S. Miller  <davem@davemloft.net>
1736         * Makefile (tst-cleanup0.out): Fix typo in output redirection.
1738 2011-08-14  Roland McGrath  <roland@hack.frob.com>
1740         * sysdeps/i386/pthreaddef.h (TCB_ALIGNMENT): Set to 64, optimal on Atom.
1741         * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Likewise.
1743 2011-08-08  Andreas Schwab  <schwab@redhat.com>
1745         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned
1746         stack.
1747         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1748         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1750 2011-07-22  Ulrich Drepper  <drepper@gmail.com>
1752         * sysdeps/pthread/unwind-forcedunwind.c (_Unwind_Resume): Add read
1753         barrier.
1754         (__gcc_personality_v0): Likewise.
1755         (_Unwind_ForcedUnwind): Likewise.
1756         (_Unwind_GetCFA): Likewise.
1758 2011-07-14  Roland McGrath  <roland@hack.frob.com>
1760         * allocatestack.c (__reclaim_stacks): Use uintptr_t cast rather than
1761         UINTMAX_C.
1763 2011-06-30  Ulrich Drepper  <drepper@gmail.com>
1765         * nptl-init.c (__nptl_set_robust): New function.
1766         (pthread_functions): Add reference.
1767         * npthreadP.h: Declare __nptl_set_robust.
1768         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
1769         ptr_set_robust member.
1770         * sysdeps/unix/sysv/linux/fork.c: Call set_robust_list syscall in
1771         child if threads are used.
1773 2011-06-14  Andreas Jaeger  <aj@suse.de>
1775         * pthread_rwlock_init.c: Include <string.h> for memset declaration.
1777 2011-05-11  Ulrich Drepper  <drepper@gmail.com>
1779         [BZ #386]
1780         * allocatestack.c (allocate_stack): Convert ENOMEM error to EAGAIN.
1782 2011-04-10  Ulrich Drepper  <drepper@gmail.com>
1784         [BZ #12650]
1785         * allocatestack.c (get_cached_stack): Deallocate DTV entries before
1786         clearing memory.
1787         Patch partly by Robert Rex <robert.rex@exasol.com>.
1789 2011-01-19  Roland McGrath  <roland@redhat.com>
1791         * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
1792         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1793         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
1794         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1795         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
1796         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
1798 2011-01-16  Andreas Schwab  <schwab@linux-m68k.org>
1800         * Makefile (test-extras): Add tst-cleanup4aux.
1802 2011-01-14  Ulrich Drepper  <drepper@gmail.com>
1804         [BZ #10563]
1805         * sysdeps/pthread/setxid.h (__SETXID_1): Add cast to assignment.
1806         (__SETXID_2): Likewise.
1807         (__SETXID_3): Likewise.
1809 2011-01-13  Ulrich Drepper  <drepper@gmail.com>
1811         [BZ #10484]
1812         * Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
1813         * alloca_cutoff.c: Add libc_hidden_def.
1815 2010-10-13  H.J. Lu  <hongjiu.lu@intel.com>
1817         [BZ #12113]
1818         * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
1819         * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
1820         of "struct pthread".
1822 2010-09-21  Andreas Schwab  <schwab@redhat.com>
1824         * sysdeps/pthread/pthread.h (pthread_cleanup_push)
1825         [!__EXCEPTIONS]: Mangle local variable not_first_call.
1826         (pthread_cleanup_push_defer_np): Likewise.
1828 2010-09-03  Ulrich Drepper  <drepper@redhat.com>
1830         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are
1831         small.
1833 2010-08-10  Dinakar Guniguntala  <dino@in.ibm.com>
1834             Stefan Hajnoczi  <stefanha@linux.vnet.ibm.com>
1836         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
1837         FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
1839 2010-08-12  H.J. Lu  <hongjiu.lu@intel.com>
1841         * sysdeps/unix/sysv/linux/i386/Makefile: New file.
1843 2010-05-01  Alan Modra  <amodra@gmail.com>
1845         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1846         (PSEUDO): Use correct cr save.  Don't use wrong parm save area
1847         to save temps.  Correct cfi for possible later frame manipulation.
1848         (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
1849         (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
1850         (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
1851         (DOCARGS_6, UNDOCARGS_6): Likewise.
1852         (CENABLE, CDISABLE): Add nops for non-shared calls.
1854 2010-07-06  Andreas Schwab  <schwab@redhat.com>
1856         * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1857         Fix type mismatch.
1859 2010-07-03  Ulrich Drepper  <drepper@redhat.com>
1861         * tst-abstime.c (do_test): Some more cleanups
1863 2010-07-02  Ulrich Drepper  <drepper@redhat.com>
1865         * tst-abstime.c: Correct testing and add test for sem_timedwait.
1867 2010-07-01  Andreas Schwab  <schwab@redhat.com>
1868             Ulrich Drepper  <drepper@redhat.com>
1870         * Makefile (tests): Add tst-abstime.
1871         * tst-abstime.c: New file.
1872         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1873         (__lll_timedlock_wait): Check for timestamp before the Epoch.
1874         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1875         (__lll_timedlock_wait): Likewise.
1876         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1877         (__lll_robust_timedlock_wait): Likewise.
1878         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1879         (__pthread_cond_timedwait): Likewise.
1880         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1881         (pthread_rwlock_timedrdlock): Likewise.
1882         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1883         (pthread_rwlock_timedwrlock): Likewise.
1884         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1885         Likewise.
1887 2010-07-01  Ulrich Drepper  <drepper@redhat.com>
1889         * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
1891 2010-06-01  Takashi Yoshii  <takashi.yoshii.zj@renesas.com>
1893         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
1894         location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
1896 2010-04-09  Ulrich Drepper  <drepper@redhat.com>
1898         [BZ #11390]
1899         * sysdeps/unix/sysv/linux/pthread_getname.c: New file.
1900         * sysdeps/unix/sysv/linux/pthread_setname.c: New file.
1901         * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and
1902         pthread_setname.
1903         * Makefile (libpthread-routines): Add pthread_getname and
1904         pthread_setname.
1905         * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12.
1907 2010-04-05  Thomas Schwinge  <thomas@schwinge.name>
1909         * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/.
1910         * sysdeps/pthread/rt-unwind-resume.c: Likewise.
1911         * sysdeps/pthread/Makefile: Remove csu section and rt section's
1912         unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead.
1914 2010-03-23  Luis Machado  <luisgpm@br.ibm.com>
1916         * pthread_cond_timedwait.c: Add check for
1917         HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
1918         (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
1919         INTERNAL_SYSCALL.
1921 2010-03-09  Ulrich Drepper  <drepper@redhat.com>
1923         * pthread_create.c (__pthread_create_2_1): If priorities are incorrect
1924         and the call fails wake eventually waiting setxid threads.  Don't free
1925         stack here if we try starting a thread.
1926         * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter
1927         if the clone call failed.
1929 2010-03-08  Andreas Schwab  <schwab@redhat.com>
1931         * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
1932         * allocatestack.c (get_cached_stack): Set setxid_futex.
1933         (allocate_stack): Likewise.
1935 2010-03-05  Andreas Schwab  <schwab@redhat.com>
1936             Ulrich Drepper  <drepper@redhat.com>
1938         * allocatestack.c (setxid_mark_thread): Delay handling of thread if
1939         it is creating a thread or it is just being created.
1940         * pthread_create.c (start_thread): Wake setxid thread if it is
1941         waiting.
1942         (__pthread_create_2_1): Initialize setxid_futex.
1943         * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it
1944         is waiting.
1946 2010-01-15  Ulrich Drepper  <drepper@redhat.com>
1948         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1949         Fix unwind info.
1950         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1952 2010-01-15  Michal Schmidt  <mschmidt@redhat.com>
1954         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1955         Fix pthread_cond_timedwait with requeue-PI.
1956         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1957         Fix pthread_cond_wait with requeue-PI.
1959 2010-01-14  Ulrich Drepper  <drepper@redhat.com>
1961         * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
1962         and pthread_mutexattr_setrobust for GLIBC_2.12.
1963         * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
1964         * pthread_mutexattr_getrobust.c: Define alias
1965         pthread_mutexattr_getrobust.
1966         * pthread_mutexattr_setrobust.c: Define alias
1967         pthread_mutexattr_setrobust.
1969 2010-01-12  Ulrich Drepper  <drepper@redhat.com>
1971         * sysdeps/pthread/pthread.h: Cleanup.  Fix up for XPG7.
1973 2010-01-08  Ulrich Drepper  <drepper@redhat.com>
1975         * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
1977 2009-12-18  Thomas Schwinge  <thomas@codesourcery.com>
1979         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
1980         call __gmon_start__.
1981         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
1983 2009-12-17  Ulrich Drepper  <drepper@redhat.com>
1985         * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
1986         using memset.
1988 2009-12-01  Dinakar Guniguntala  <dino@in.ibm.com>
1990         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
1991         FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
1992         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
1993         is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
1994         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1995         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
1996         is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
1997         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1999 2009-12-12  Ulrich Drepper  <drepper@redhat.com>
2001         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
2002         Don't update nwaiters after invalid timeout is recognized.
2004 2009-11-27  Thomas Schwinge  <thomas@codesourcery.com>
2006         * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
2007         __gmon_start__.
2009 2009-11-27  Andreas Schwab  <schwab@redhat.com>
2011         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
2012         THREAD_SELF->cancelhandling after returning from futex call.
2014 2009-11-24  Ulrich Drepper  <drepper@redhat.com>
2016         * tst-sem13.c: New file.
2017         * Makefile (tests): Add tst-sem13.
2019 2009-11-22  Roland McGrath  <roland@redhat.com>
2021         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
2022         instead of recapitulating its contents.
2024 2009-11-18  Ulrich Drepper  <drepper@redhat.com>
2026         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
2027         optimizations and cleanups.
2029 2009-11-18  Dinakar Guniguntala  <dino@in.ibm.com>
2031         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
2032         Remove redundant code. Fix cfi offsets.
2033         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
2034         Fix cfi offsets.
2036 2009-11-17  Ulrich Drepper  <drepper@redhat.com>
2038         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
2039         reduce size of unwind info.
2041         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
2042         cfi directives.
2043         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2044         Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
2046 2009-11-03  Andreas Schwab  <schwab@linux-m68k.org>
2048         [BZ #4457]
2049         * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
2050         LIBGCC_S_SO.
2051         * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
2053 2009-10-30  Ulrich Drepper  <drepper@redhat.com>
2055         * tst-sem11.c (main): Rewrite to avoid aliasing problems.
2057         [BZ #3270]
2058         * allocatestack.c (__nptl_setxid): Perform the operation in multiple
2059         steps to avoid races with creation and terminations.
2060         * nptl-init.c (sighandler_setxid): Adjust.
2061         Patch by Daniel Jacobowitz.
2063 2009-09-07  Andreas Schwab  <schwab@redhat.com>
2065         * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
2067 2009-09-02  Suzuki K P  <suzuki@in.ibm.com>
2068             Joseph Myers  <joseph@codesourcery.com>
2070         [BZ #7094]
2071         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
2072         Initialize the sigev_notify field for newly created timer to make sure
2073         the timer gets deleted from the active timer's list upon timer_delete.
2075 2009-08-27  Andrew Stubbs  <ams@codesourcery.com>
2077         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
2078         Correct a logic error.
2080 2009-08-25  Ulrich Drepper  <drepper@redhat.com>
2082         * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
2083         of the field in local variables.
2084         (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
2085         variable and don't unconditionally clear it.
2087 2009-08-24  Ulrich Drepper  <drepper@redhat.com>
2089         * pthread_create.c (start_thread): Hint to the kernel that memory for
2090         the stack can be reused.  We do not mark all the memory.  The part
2091         still in use and some reserve are kept.
2093 2009-08-23  Ulrich Drepper  <drepper@redhat.com>
2095         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
2097 2009-08-11  Ulrich Drepper  <drepper@redhat.com>
2099         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
2100         directives.
2102 2009-08-10  Ulrich Drepper  <drepper@redhat.com>
2104         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
2105         directives.
2106         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2108 2009-08-10  Andreas Schwab  <schwab@redhat.com>
2110         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2111         (__pthread_cond_signal): Don't clobber register used for syscall
2112         number.
2114 2009-08-08  Ulrich Drepper  <drepper@redhat.com>
2116         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2117         Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
2119         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2120         (__pthread_cond_wait): Optimize by avoiding use of callee-safe
2121         register.
2123 2009-08-07  Ulrich Drepper  <drepper@redhat.com>
2125         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
2126         enabled by the special *_asynccancel functions.
2127         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2128         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2130         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
2132 2009-08-04  Ulrich Drepper  <drepper@redhat.com>
2134         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
2135         * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
2136         * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
2137         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
2138         since we can assume the special __*_{en,dis}able_asynccancel
2139         functions.
2140         (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
2141         * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
2142         and PTHREAD_CANCELED.
2144 2009-07-31  Ulrich Drepper  <drepper@redhat.com>
2146         * descr.h: Better definition of *_BITMASK macros for cancellation.
2148 2009-07-29  Ulrich Drepper  <drepper@redhat.com>
2150         * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
2152         * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
2153         dynamic linker might have to save.
2154         Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
2155         RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL.  Pretty
2156         printing.
2158         * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
2160 2009-07-28  Ulrich Drepper  <drepper@redhat.com>
2162         * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
2163         New function.
2164         * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
2165         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
2166         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
2167         requeue_pi for robust mutexes.
2168         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
2169         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2170         Don't only skip __pthread_mutex_cond_lock.  Call instead
2171         __pthread_mutex_cond_lock_adjust.
2172         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2174         * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
2175         optimization of PI mutex handling.
2177 2009-07-27  Ulrich Drepper  <drepper@redhat.com>
2179         [BZ #10418]
2180         * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
2181         instead of of _acq variants of cmpxchg.
2183 2009-07-23  Ulrich Drepper  <drepper@redhat.com>
2185         * sysdeps/x86_64/configure.in: New file.
2187         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
2188         path when not using absolute timeout futex.
2190 2009-07-20  Ulrich Drepper  <drepper@redhat.com>
2192         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
2193         optimizations of last changes.
2194         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2196 2009-07-19  Ulrich Drepper  <drepper@redhat.com>
2198         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
2199         FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
2200         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
2201         is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
2202         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
2203         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
2204         is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
2205         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2207         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2208         (__pthread_cond_timedwait): Make more robust.
2210 2009-07-18  Ulrich Drepper  <drepper@redhat.com>
2212         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2213         (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
2214         directly use absolute timeout.
2216         * tst-sem5.c (do_test): Add test for premature timeout.
2217         * Makefile: Linu tst-sem5 with librt.
2219         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
2220         (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
2221         directly use absolute timeout.
2222         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
2223         (pthread_rwlock_timedrdlock): Likewise.
2225         * tst-cond11.c (run_test): Add test to check that the timeout is
2226         long enough.
2228         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2229         (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
2230         directly use absolute timeout.
2232         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2233         (__pthread_cond_wait): Convert to using exception handler instead of
2234         registered unwind buffer.
2235         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2236         (__pthread_cond_timedwait): Likewise.
2238 2009-07-17  Ulrich Drepper  <drepper@redhat.com>
2240         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2241         If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
2242         use absolute timeout.
2244         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
2245         handling of uncontested semaphore.
2247         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2248         (__condvar_cleanup): Rewrite to use cfi directives instead of
2249         hand-coded unwind tables.
2250         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
2251         Likewise.
2252         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
2253         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2254         Likewise.
2256 2009-06-12  Ulrich Drepper  <drepper@redhat.com>
2258         * Makefile (libpthread-routines): Add pthread_sigqueue.
2259         * Versions: Add pthread_sigqueue for GLIBC_2.11.
2260         * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
2261         * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
2263 2009-06-11  Ulrich Drepper  <drepper@redhat.com>
2265         [BZ #10262]
2266         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2267         (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
2268         cannot be assumed.
2269         Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
2271 2009-05-16  Ulrich Drepper  <drepper@redhat.com>
2273         * libc-cancellation.c: Move __libc_cleanup_routine to...
2274         * libc-cleanup.c: ...here.  New file.
2275         * Makefile (routines): Add libc-cleanup.
2277         * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
2278         test.
2279         * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
2280         * sysdeps/pthread/librt-cancellation.c: Likewise.
2282         [BZ #9924]
2283         * nptl-init.c: Renamed from init.c.
2284         * Makefile: Change all occurences of init.c to nptl-init.c.
2286 2009-05-15  Ulrich Drepper  <drepper@redhat.com>
2288         * cancellation.c (__pthread_disable_asynccancel): Correct the bits
2289         to test when deciding on the delay.
2290         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
2291         * pthread_cancel.c: Close race between deciding on sending a signal
2292         and setting the CANCELING_BIT bit.
2294         * cancellation.c (__pthread_disable_asynccancel): Don't return if
2295         thread is canceled.
2296         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
2298 2009-04-27  Ulrich Drepper  <drepper@redhat.com>
2300         * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
2301         is available.
2302         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
2303         * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
2304         * sysdeps/i386/tls.h: Likewise.
2305         (tcbhead_t): Add __private_tm member.
2307 2009-04-26  Ulrich Drepper  <drepper@redhat.com>
2309         * sem_open.c (sem_open): Rewrite initialization of initsem to
2310         avoid warnings.
2312         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2313         Avoid warning by using may_alias attribute on ptrhack.
2315 2009-04-22  Ulrich Drepper  <drepper@redhat.com>
2317         [BZ #10090]
2318         * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
2319         Check policy and priority for validity.
2320         Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
2322 2009-03-15  Ulrich Drepper  <drepper@redhat.com>
2324         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2325         (__pthread_cond_timedwait): Change to use cfi directives instead of
2326         hand-coded unwind sections.
2328 2009-03-10  Ulrich Drepper  <drepper@redhat.com>
2330         * init.c (nptl_freeres): Compile only for SHARED.
2332 2009-03-09  Jakub Jelinek  <jakub@redhat.com>
2334         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
2335         FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
2336         FUTEX_BITSET_MATCH_ANY.
2338 2009-02-27  Roland McGrath  <roland@redhat.com>
2340         * init.c (__nptl_initial_report_events): Mark __attribute_used__.
2341         * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
2343 2009-02-26  Ulrich Drepper  <drepper@redhat.com>
2345         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2346         _POSIX_THREAD_ROBUST_PRIO_INHERIT and
2347         _POSIX_THREAD_ROBUST_PRIO_PROTECT.  Reset value of macros from
2348         200112L to 200809L.
2350 2009-02-25  Ulrich Drepper  <drepper@redhat.com>
2352         * sysdeps/pthread/pthread.h: The robust mutex functions are in
2353         POSIX 2008.
2355 2009-02-24  Ulrich Drepper  <drepper@redhat.com>
2357         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
2358         Unify name of include protector macro.
2360 2009-02-14  SUGIOKA Toshinobu  <sugioka@itonet.co.jp>
2362         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
2363         LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
2365 2009-01-29  Ulrich Drepper  <drepper@redhat.com>
2367         * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
2368         pointer variables.
2370         * allocatestack.c (__free_stacks): Renamed from free_stacks.
2371         (__free_stack_cache): Removed.  Change callers to call __free_stacks.
2372         * init.c (nptl_freeres): New function.
2373         (pthread_functions): Initialize ptr_freeres to nptl_freeres.
2374         * pthreadP.h: Don't declare __free_stack_cache.  Declare __free_stacks.
2375         * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
2376         variable.
2377         (pthread_cancel_init): Depend in libgcc_s_handle for decision to
2378         load DSO.  Assign last.
2379         (__unwind_freeres): New function.
2381         * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
2382         for better debugging.  No need to use stack_list_add here.
2384 2009-01-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2386         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
2387         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
2388         instead of computing relative timeout.
2389         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
2390         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
2392 2009-01-25  Ulrich Drepper  <drepper@redhat.com>
2394         * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
2396 2009-01-08  Ulrich Drepper  <drepper@redhat.com>
2398         * sysdeps/pthread/list.h (list_add): Initialize new element first.
2399         (list_add_tail): Removed.
2401 2009-01-07  Ulrich Drepper  <drepper@redhat.com>
2403         * (in_flight_stack): New variable.
2404         (stack_list_del): New function.  Use instead of list_del.
2405         (stack_list_add): New function.  Use instead of list_add when adding to
2406         stack_cache and stack_used lists.
2407         (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
2408         when the fork call interrupted another thread.
2410 2009-01-04  Ulrich Drepper  <drepper@redhat.com>
2412         * init.c (__pthread_initialize_minimal_internal): Optimize test
2413         FUTEX_CLOCK_REALTIME a bit.
2415 2009-01-03  Ulrich Drepper  <drepper@redhat.com>
2417         * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
2418         only passing five parameters to FUTEX_WAIT_BITSET call.
2420         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2421         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
2422         instead of computing relative timeout.
2424 2009-01-02  Ulrich Drepper  <drepper@redhat.com>
2426         * init.c (__pthread_initialize_minimal_internal): Check for
2427         FUTEX_CLOCK_REALTIME flag.
2428         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
2429         Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
2430         relative timeout.
2432         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
2433         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
2434         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2435         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2436         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2437         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2439 2008-12-09  Ulrich Drepper  <drepper@redhat.com>
2441         * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
2442         loop body instead of ; to avoid gcc warnings.
2443         (pthread_cleanup_pop_restore_np): Likewise.
2444         Patch by Caolán McNamara <caolanm@redhat.com>.
2446 2008-12-09  Jakub Jelinek  <jakub@redhat.com>
2448         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
2449         fast path here, for robust/PI/PP mutexes call
2450         __pthread_mutex_lock_full.  Don't use switch, instead use a series
2451         of ifs according to their probability.
2452         (__pthread_mutex_lock_full): New function.
2453         * pthread_mutex_unlock.c: Include assert.h.
2454         (__pthread_mutex_unlock_usercnt): Handle only the
2455         fast path here, for robust/PI/PP mutexes call
2456         __pthread_mutex_unlock_full.  Don't use switch, instead use a series
2457         of ifs according to their probability.
2458         (__pthread_mutex_unlock_full): New function.
2459         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
2460         (__pthread_mutex_lock_full): Define.
2462 2008-12-08  Ulrich Drepper  <drepper@redhat.com>
2464         * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
2465         implementation.  Add necessary padding and.
2466         * descr.h (struct pthread): Increase padding for tcbhead_t to 24
2467         words.
2469 2008-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2471         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
2472         and FUTEX_WAKE_BITSET.
2474 2008-12-02  Ulrich Drepper  <drepper@redhat.com>
2476         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
2477         and FUTEX_WAKE_BITSET.
2478         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2479         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2480         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2481         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2483 2008-11-25  Roland McGrath  <roland@redhat.com>
2485         * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
2486         Subdirectories moved to ports repository as
2487         sysdeps/.../nptl subdirectories.
2489 2008-11-12  Jakub Jelinek  <jakub@redhat.com>
2491         [BZ #7008]
2492         * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
2493         of old value.
2494         * pthread_cond_init.c (__pthread_cond_init): Fix
2495         cond->__data.__nwaiters initialization.
2496         * Makefile (tests): Add tst-cond23.
2497         * tst-cond23.c: New test.
2499 2008-11-07  Jakub Jelinek  <jakub@redhat.com>
2501         * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
2502         arguments.
2503         (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
2504         arguments.
2506 2008-11-01  Ulrich Drepper  <drepper@redhat.com>
2508         [BZ #6955]
2509         * pthread_mutex_lock.c: Add support for private PI mutexes.
2510         * pthread_mutex_timedlock.c: Likewise.
2511         * pthread_mutex_trylock.c: Likewise.
2512         * pthread_mutex_unlock.c: Likewise.
2513         Patch mostly by Ben Jackson <ben@ben.com>.
2515 2008-10-31  Ulrich Drepper  <drepper@redhat.com>
2517         [BZ #6843]
2518         * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
2519         Increase stack size for helper thread.
2521 2008-10-06  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2523         * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
2524         assembly with a clobber list for access registers a0 and a1.
2526 2008-09-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2528         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
2529         to force runp->refcntr to be read from memory.
2531 2008-09-08  Richard Guenther  <rguenther@suse.de>
2533         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
2534         lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2535         lll_timedlock, lll_robust_timedlock, lll_unlock,
2536         lll_robust_unlock): Promote private to int.
2538 2008-08-15  Ulrich Drepper  <drepper@redhat.com>
2540         * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
2541         ARCH_RETRY_MMAP definitions.
2542         * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
2543         Define MAP_STACK when not defined.
2544         (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS.  Remove
2545         handling of ARCH_RETRY_MMAP.
2547 2008-07-30  Ulrich Drepper  <drepper@redhat.com>
2549         * tst-align2.c (f): Print message that f is reached.
2551 2008-04-28  Hiroki Kaminaga  <kaminaga@sm.sony.co.jp>
2553         [BZ #6740]
2554         * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
2555         definition with #ifndef __ASSUME_PRIVATE_FUTEX.
2557 2008-07-25  Ulrich Drepper  <drepper@redhat.com>
2559         * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
2560         SOCK_CLOEXEC if possible.
2562 2008-05-29  Ulrich Drepper  <drepper@redhat.com>
2564         * Makefile (tests): Add tst-rwlock2a.
2565         * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
2566         * tst-rwlock2a.c: New file.
2568 2008-06-12  Ulrich Drepper  <drepper@redhat.com>
2570         * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
2572 2008-05-17  Samuel Thibault  <samuel.thibault@ens-lyon.org>
2574         * sysdeps/pthread/pthread.h: Fix typo in comment.
2576 2008-05-28  Ulrich Drepper  <drepper@redhat.com>
2578         * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
2579         of CPU set to the kernel.
2581 2008-05-23  Paul Pluzhnikov  <ppluzhnikov@google.com>
2583         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
2584         cfi directives.
2585         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
2586         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
2587         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2588         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2589         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2590         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2592 2008-05-22  Paul Pluzhnikov  <ppluzhnikov@google.com>
2594         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
2595         cfi directives.
2596         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2597         Likewise.
2598         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2599         Likewise.
2600         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2601         Likewise.
2603 2008-05-26  Ulrich Drepper  <drepper@redhat.com>
2605         * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
2607 2008-05-20  Jakub Jelinek  <jakub@redhat.com>
2609         David S. Miller  <davem@davemloft.net>
2611         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
2613 2008-05-10  Ulrich Drepper  <drepper@redhat.com>
2615         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
2616         __pshared correctly.
2617         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2618         Likewise.
2619         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2620         Likewise.
2621         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
2622         Likewise.
2623         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
2624         Likewise.
2625         Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
2627 2008-04-14  David S. Miller  <davem@davemloft.net>
2629         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2630         (__old_sem_wait): Fix argument to lll_futex_wait().
2632 2007-11-26  Daniel Jacobowitz  <dan@codesourcery.com>
2634         * pthread_create.c: Require pthread_mutex_trylock and
2635         pthread_key_delete for libgcc.
2637 2008-04-08  Jakub Jelinek  <jakub@redhat.com>
2639         [BZ #6020]
2640         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
2641         (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
2642         Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
2644 2008-03-27  Ulrich Drepper  <drepper@redhat.com>
2646         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
2647         <linux/limits.h> has defined it.
2648         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2649         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2650         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2651         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2653 2008-03-18  Jakub Jelinek  <jakub@redhat.com>
2655         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
2656         of ASSEMBLER.
2657         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2658         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
2660 2008-03-14  Ulrich Drepper  <drepper@redhat.com>
2662         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
2663         HAVE_DL_DISCOVER_OSVERSION.
2664         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2665         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
2667 2008-03-07  Ulrich Drepper  <drepper@redhat.com>
2669         [BZ #5778]
2670         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
2671         _POSIX_CHOWN_RESTRICTED value to zero.
2673 2008-01-31  Roland McGrath  <roland@redhat.com>
2675         * Makefile (omit-deps): Variable removed.
2677 2008-01-30  Ulrich Drepper  <drepper@redhat.com>
2679         * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
2680         unnecessary addr32 prefix.
2682 2008-01-29  Roland McGrath  <roland@redhat.com>
2684         * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
2686 2008-01-22  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2688         * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
2690 2008-01-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2692         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
2693         a scratch register.
2694         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
2695         (__lll_lock_wait_private): Fix typo.
2696         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
2697         (pthread_barrier_wait): Likewise.  Adjust XADD use.
2698         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
2699         Adjust XADD use.
2700         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
2701         (pthread_rwlock_timedrdlock): Return correct return value.
2702         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
2703         (pthread_rwlock_timedwrlock): Likewise.
2705 2008-01-15  Ulrich Drepper  <drepper@redhat.com>
2707         * tst-eintr2.c (do_test): make sure that if mutex_lock in main
2708         thread returns the program exits with an error code.
2710 2008-01-10  Ulrich Drepper  <drepper@redhat.com>
2712         * pthread-errnos.sym: Add EOVERFLOW.
2713         * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
2714         * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
2715         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2716         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2718 2007-12-14  Ulrich Drepper  <drepper@redhat.com>
2720         * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
2721         parameter.  Passed it as permission to mmap.
2722         * allocatestack.c (allocate_stack): Pass prot as second parameter
2723         to ARCH_RETRY_MMAP.
2725 2007-12-12  Ulrich Drepper  <drepper@redhat.com>
2727         * tst-basic7.c: Allocate memory for the stack.
2729         [BZ #5465]
2730         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
2731         (__pthread_cond_timedwait): Don't use VDSO.
2732         Patch by Michal Januszewski.
2734 2007-12-07  Ulrich Drepper  <drepper@redhat.com>
2736         [BZ #5455]
2737         * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
2738         Allow label before pthread_cleanup_pop.
2739         (pthread_cleanup_pop_restore_np): Likewise.
2741 2007-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2743         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
2744         Store 2 before returning ETIMEDOUT.
2746 2007-11-23  Ulrich Drepper  <drepper@redhat.com>
2748         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
2749         Store 2 before returning ETIMEDOUT.
2750         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
2751         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
2752         (__lll_lock_wait_private): Optimize.
2753         (__lll_lock_wait): Likewise.
2755 2007-11-20  Jakub Jelinek  <jakub@redhat.com>
2757         * sysdeps/pthread/pthread.h (pthread_cleanup_push,
2758         pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
2759         g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
2761 2007-11-08  Ulrich Drepper  <drepper@redhat.com>
2763         [BZ #5240]
2764         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
2765         If we time out, try one last time to lock the futex to avoid
2766         losing a wakeup signal.
2767         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2768         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2770         [BZ #5245]
2771         * sysdeps/pthread/createthread.c (do_clone): Translate clone error
2772         if necessary.
2774 2007-11-07  Ulrich Drepper  <drepper@redhat.com>
2776         [BZ #5245]
2777         * allocatestack.c (allocate_stack): Change ENOMEM error in case
2778         mmap failed to EAGAIN.
2779         * Makefile (tests): Add tst-basic7.
2780         * tst-basic7.c: New file.
2782 2007-11-05  Ulrich Drepper  <drepper@redhat.com>
2784         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
2785         Use __linkin_atfork.
2787 2007-11-03  Mike Frysinger  <vapier@gentoo.org>
2789         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
2790         missing line continuations.
2791         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
2792         LOAD_FUTEX_WAKE): Likewise.  Also add missing 3rd parameter.
2794 2007-10-28  Ulrich Drepper  <drepper@redhat.com>
2796         [BZ #5220]
2797         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
2798         __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
2799         (struct timer): Add next element.
2800         * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
2801         enqueue timer structure into __active_timer_sigev_thread list.
2802         * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
2803         remove timer struct from __active_timer_sigev_thread.
2804         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2805         Before using timer structure make sure it is still on the
2806         __active_timer_sigev_thread list.  Keep lock until done.
2807         Define __active_timer_sigev_thread and
2808         __active_timer_sigev_thread_lock.
2810 2007-10-27  Ulrich Drepper  <drepper@redhat.com>
2812         * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
2813         Redefine thread_atfork for use of ATFORK_MEM.
2814         * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
2815         * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
2816         function.
2817         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2818         Use atomic operation when removing first element of list.
2820 2007-10-17  Jakub Jelinek  <jakub@redhat.com>
2822         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
2823         routine instead of an alias to __new_sem_post.
2825 2007-10-15  Jakub Jelinek  <jakub@redhat.com>
2827         * init.c (__pthread_initialize_minimal): Initialize word to appease
2828         valgrind.
2830 2007-10-10  Jakub Jelinek  <jakub@redhat.com>
2832         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
2833         libc.so just clear NAME.
2834         (__libc_rwlock_fini): Nop inside of libc.so.
2835         * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
2836         all zeros.
2838 2007-09-02  Ulrich Drepper  <drepper@redhat.com>
2840         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2841         (__pthread_cond_wait): Fix unlocking of internal lock after mutex
2842         unlocking failed.
2843         Patch by Luca Barbieri <luca.barbieri@gmail.com>.
2845 2007-08-21  Ulrich Drepper  <drepper@redhat.com>
2847         [BZ #4938]
2848         * allocatestack.c (__reclaim_stacks): Clear the TSD in the
2849         reclaimed stack if necessary.
2850         * Makefile (tests): Add tst-tsd6.
2851         * tst-tsd6.c: New file.
2853 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
2855         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
2856         Add private argument.
2858 2007-08-20  Ulrich Drepper  <drepper@redhat.com>
2860         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2861         (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
2863 2007-08-16  Jakub Jelinek  <jakub@redhat.com>
2865         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
2866         (__lll_robust_timedlock): Pass private as last argument to
2867         __lll_robust_timedlock_wait.
2868         (__lll_unlock): Fix a pasto.
2870 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
2872         * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
2873         sparc_old_sem): New structs.
2874         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2875         (__sem_wait_cleanup): New function.
2876         (__new_sem_wait): Use sparc_new_sem structure.  Bump and afterwards
2877         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
2878         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2879         lll_futex_wait.
2880         (__old_sem_wait): New function.
2881         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
2882         nptl/sysdeps/unix/sysv/linux/sparc version.
2883         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
2884         Likewise.
2885         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
2886         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
2887         (__new_sem_trywait): Use sparc_old_sem structure.
2888         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
2889         (sem_timedwait): Use sparc_new_sem structure.  Bump and afterwards
2890         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
2891         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2892         lll_futex_timed_wait.
2893         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
2894         Use sparc_new_sem structure.  Only wake if nwaiters > 0.  Pass
2895         isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2896         lll_futex_wake.
2897         (__old_sem_post): New function.
2898         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
2899         * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
2900         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
2901         * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
2902         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
2903         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
2905 2007-08-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2907         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2908         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2909         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2910         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2911         * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
2912         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2913         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2914         Use FUTEX_WAKE_OP.
2915         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2916         kernel-features.h and tcb-offsets.h.
2917         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2918         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2919         process private.
2920         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2921         tcb-offsets.h.
2922         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
2923         to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2924         process private.
2925         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
2926         __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2927         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
2928         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2929         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2930         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2931         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2933 2007-08-14  Jakub Jelinek  <jakub@redhat.com>
2935         * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
2936         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
2937         (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
2938         lll_futex_timed_wait.
2940         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
2941         __lll_robust_unlock): Rewrite as macros instead of inline functions.
2942         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
2943         __lll_robust_unlock, __lll_wait_tid): Likewise.
2945 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
2947         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
2948         Fix a pasto.
2949         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
2950         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2951         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2952         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2953         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2954         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2955         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2956         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
2957         kernel-features.h.
2958         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2959         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2960         process private.  Switch DW_CFA_advance_loc1 and some
2961         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2962         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2963         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
2964         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2965         process private.  Switch DW_CFA_advance_loc{1,2} and some
2966         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2967         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
2968         #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2969         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2970         Likewise.
2971         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2972         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2973         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2974         Likewise.
2975         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
2976         (__pthread_cond_broadcast): Compare %r8 instead of
2977         dep_mutex-cond_*(%rdi) with $-1.
2978         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2979         (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
2980         of oring.
2982 2007-08-13  Ulrich Drepper  <drepper@redhat.com>
2984         * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
2986 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
2988         * allocatestack.c: Include kernel-features.h.
2989         * pthread_create.c: Likewise.
2990         * pthread_mutex_init.c: Likewise.
2991         * init.c: Likewise.
2992         * pthread_cond_timedwait.c: Likewise.
2993         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2994         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2995         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2996         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2997         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2998         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2999         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3000         Likewise.
3001         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3002         Likewise.
3003         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3004         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3005         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3006         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3008 2007-08-12  Jakub Jelinek  <jakub@redhat.com>
3010         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
3011         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
3012         byte elements.  One of them is the new __shared element.
3013         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
3014         adjust names of other padding elements.
3015         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
3016         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
3017         byte elements.  One of them is the new __shared element.
3018         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
3019         adjust names of other padding elements.
3020         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
3021         Renamed __pad1 element to __shared, adjust names of other padding
3022         elements.
3023         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3024         (pthread_rwlock_t): Likewise.
3025         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
3026         typo.
3028 2007-08-09  Anton Blanchard  <anton@samba.org>
3030         * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
3032 2007-08-12  Ulrich Drepper  <drepper@redhat.com>
3034         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
3035         <kernel-features.h>.
3036         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3038 2007-08-11  Ulrich Drepper  <drepper@redhat.com>
3040         * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
3041         * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
3042         dealing with robust mutexes.
3043         * pthread_mutex_timedlock.c: Likewise.
3044         * pthread_mutex_trylock.c: Likewise.
3045         * pthread_mutex_unlock.c: Likewise.
3046         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
3048 2007-08-06  Jakub Jelinek  <jakub@redhat.com>
3050         * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
3051         (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
3052         (PTHREAD_MUTEX_PSHARED): Define.
3053         * pthread_mutex_init.c (__pthread_mutex_init): Set
3054         PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
3055         mutexes.
3056         * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
3057         instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
3058         as second argument to lll_lock.
3059         (LLL_MUTEX_TRYLOCK): Take mutex as argument
3060         instead of its __data.__lock field.
3061         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
3062         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
3063         to lll_robust_lock.
3064         (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
3065         LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
3066         instead of mutex->__data.__kind directly, pass
3067         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
3068         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
3069         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
3070         directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
3071         (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
3072         to lll_timedlock, lll_robust_timedlock, lll_unlock and
3073         lll_futex_timed_wait.  Use PTHREAD_MUTEX_TYPE (mutex) instead
3074         of mutex->__data.__kind directly.
3075         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
3076         PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
3077         lll_robust_timedlock, lll_unlock and lll_futex_timed_wait.  Use
3078         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
3079         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
3080         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
3081         and lll_futex_wake.
3082         * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
3083         PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
3084         Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
3085         directly.
3086         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
3087         Take mutex as argument instead of its __data.__lock field, pass
3088         PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
3089         (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
3090         __data.__lock field.
3091         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
3092         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
3093         to lll_robust_cond_lock.
3094         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
3095         variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
3096         lll_futex_wake.  Don't use lll_futex_requeue if dependent mutex
3097         has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
3098         * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
3099         variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
3100         lll_futex_wait.
3101         * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
3102         variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
3103         lll_futex_wake.
3104         * pthread_cond_timedwait.c (__pthread_cond_wait): Add
3105         pshared variable, pass it to lll_lock, lll_unlock,
3106         lll_futex_timedwait and lll_futex_wake.
3107         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
3108         pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
3109         and lll_futex_wake.
3110         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
3111         lll_futex_wake_unlock): Add private argument, use __lll_private_flag
3112         macro.
3113         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
3114         lll_futex_wake_unlock): Likewise.
3115         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
3116         Likewise.
3117         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
3118         lll_futex_wake_unlock): Likewise.
3119         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
3120         Likewise.
3121         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
3122         lll_futex_wake_unlock): Likewise.
3123         (lll_futex_wake): Fix a typo.
3124         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
3125         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
3126         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
3127         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
3128         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
3129         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3130         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
3131         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
3132         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
3133         (__pthread_cond_timedwait): Likewise.
3134         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
3135         (__condvar_cleanup, __pthread_cond_wait): Likewise.
3137 2007-08-05  Jakub Jelinek  <jakub@redhat.com>
3139         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3140         Don't use CGOTSETUP and CGOTRESTORE macros.
3141         (CGOTSETUP, CGOTRESTORE): Remove.
3142         <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
3143         @local symbol.
3145 2007-08-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3147         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
3148         definitions for private futexes.
3149         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
3150         kernel-features.h and lowlevellock.h.  Use private futexes if
3151         they are available.
3152         (__lll_lock_wait_private, __lll_unlock_wake_private): New.
3153         (__lll_mutex_lock_wait): Rename to
3154         (__lll_lock_wait): ... this.  Don't compile in for libc.so.
3155         (__lll_mutex_timedlock_wait): Rename to ...
3156         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.
3157         Don't compile in for libc.so.
3158         (__lll_mutex_unlock_wake): Rename to ...
3159         (__lll_unlock_wake): ... this.  Don't compile in for libc.so.
3160         (__lll_timedwait_tid): Use __NR_gettimeofday.
3161         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
3162         the header from assembler.  Renamed all lll_mutex_* resp.
3163         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
3164         Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
3165         (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
3166         Define.
3167         (__lll_lock_wait_private): Add prototype.
3168         (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
3169         __lll_robust_timedlock_wait, __lll_unlock_wake_private,
3170         __lll_unlock_wake): Likewise.
3171         (lll_lock): Add private argument.  Call __lll_lock_wait_private
3172         if private is constant LLL_PRIVATE.
3173         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
3174         lll_timedlock, lll_robust_timedlock): Add private argument.
3175         (lll_unlock): Add private argument.  Call __lll_unlock_wake_private
3176         if private is constant LLL_PRIVATE.
3177         (lll_robust_unlock, lll_robust_dead): Add private argument.
3178         (lll_lock_t): Remove.
3179         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
3180         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
3181         lll_cond_wake, lll_cond_broadcast): Remove.
3182         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
3183         kernel-features.h and lowlevellock.h.
3184         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
3185         (LOAD_FUTEX_WAIT): Define.
3186         (__lll_robust_mutex_lock_wait): Rename to ...
3187         (__lll_robust_lock_wait): ... this.  Add private argument.
3188         Use LOAD_FUTEX_WAIT macro.
3189         (__lll_robust_mutex_timedlock_wait): Rename to ...
3190         (__lll_robust_timedlock_wait): ... this.    Add private argument.
3191         Use __NR_gettimeofday.  Use LOAD_FUTEX_WAIT macro.
3192         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
3193         lowlevellock.h.
3194         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
3195         (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
3196         __lll_mutex_{lock,unlock}_*.
3197         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
3198         lowlevellock.h and pthread-errnos.h.
3199         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3200         FUTEX_CMP_REQUEUE, EINVAL): Remove.
3201         (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
3202         __lll_mutex_{lock,unlock}_*.
3203         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
3204         lowlevellock.h and pthread-errnos.h.
3205         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
3206         (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
3207         __lll_mutex_{lock,unlock}_*.
3208         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
3209         lowlevellock.h.
3210         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
3211         (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
3212         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
3213         (__condvar_tw_cleanup): Likewise.
3214         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
3215         lowlevellock.h.
3216         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
3217         (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
3218         __lll_mutex_{lock,unlock}_*.
3219         ( __condvar_w_cleanup): Likewise.
3220         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
3221         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3222         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
3223         lowlevellock.h.
3224         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3225         (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
3226         __lll_mutex_{lock,unlock}_*.
3227         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
3228         lowlevellock.h.
3229         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
3230         FUTEX_PRIVATE_FLAG): Remove.
3231         (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
3232         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
3233         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
3234         lowlevellock.h.
3235         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
3236         FUTEX_PRIVATE_FLAG): Remove.
3237         (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
3238         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
3239         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
3240         lowlevellock.h.
3241         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3242         (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
3243         __lll_mutex_{lock,unlock}_*.
3244         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
3245         lowlevellock.h.
3246         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3247         (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
3248         __lll_mutex_{lock,unlock}_*.
3249         * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
3250         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3251         (__new_sem_post): Use standard initial exec code sequences.
3252         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
3253         lowlevellock.h.
3254         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
3255         FUTEX_PRIVATE_FLAG): Remove.
3256         (sem_timedwait): Use __NR_gettimeofday.  Use standard initial
3257         exec code sequences.
3258         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
3259         (__new_sem_trywait): Use standard initial exec code sequences.
3260         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
3261         (__new_sem_wait): Use standard initial exec code sequences.
3263 2007-07-31  Anton Blanchard  <anton@samba.org>
3265         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3266         Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
3267         atomic_full_barrier.
3269 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
3271         * allocatestack.c (stack_cache_lock): Change type to int.
3272         (get_cached_stack, allocate_stack, __deallocate_stack,
3273         __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
3274         __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
3275         as second argument to lll_lock and lll_unlock macros on
3276         stack_cache_lock.
3277         * pthread_create.c (__find_in_stack_list): Likewise.
3278         (start_thread): Similarly with pd->lock.  Use lll_robust_dead
3279         macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
3280         as second argument.
3281         * descr.h (struct pthread): Change lock and setxid_futex field
3282         type to int.
3283         * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
3284         LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
3285         * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
3286         * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
3287         Likewise.
3288         * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
3289         * pthread_cond_init.c (__pthread_cond_init): Likewise.
3290         * pthreadP.h (__attr_list_lock): Change type to int.
3291         * pthread_attr_init.c (__attr_list_lock): Likewise.
3292         * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
3293         ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
3294         lll_{,un}lock.
3295         * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
3296         also for lll_futex_{wake,wait}.
3297         * pthread_barrier_init.c (pthread_barrier_init): Make iattr
3298         a pointer to const.
3299         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
3300         LLL_SHARED as second argument to lll_{,un}lock.
3301         * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
3302         * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
3303         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
3304         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
3305         Likewise.
3306         * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
3307         as second argument to lll_{,un}lock macros on pd->lock.
3308         * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
3309         * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
3310         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
3311         * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
3312         Likewise.
3313         * sysdeps/pthread/createthread.c (do_clone, create_thread):
3314         Likewise.
3315         * pthread_once.c (once_lock): Change type to int.
3316         (__pthread_once): Pass LLL_PRIVATE as second argument to
3317         lll_{,un}lock macros on once_lock.
3318         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
3319         lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
3320         rwlock->__data.__shared as second argument to them and similarly
3321         for lll_futex_w*.
3322         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
3323         Likewise.
3324         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
3325         Likewise.
3326         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
3327         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
3328         * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
3329         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
3330         * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
3331         to lll_{,un}lock macros on __sem_mappings_lock.
3332         * sem_open.c (check_add_mapping): Likewise.
3333         (__sem_mappings_lock): Change type to int.
3334         * semaphoreP.h (__sem_mappings_lock): Likewise.
3335         * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
3336         LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
3337         instead of lll_*mutex_*, pass LLL_SHARED as last
3338         argument.
3339         (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
3340         pass LLL_SHARED as last argument.
3341         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
3342         LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
3343         lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
3344         pass LLL_SHARED as last argument.
3345         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
3346         lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
3347         LLL_SHARED as last argument.
3348         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
3349         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
3350         Similarly.
3351         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
3352         __libc_lock_lock_recursive, __libc_lock_unlock,
3353         __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
3354         argument to lll_{,un}lock.
3355         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
3356         _IO_lock_unlock): Likewise.
3357         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
3358         compound literal.
3359         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
3360         Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
3361         __fork_lock.
3362         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
3363         free_mem): Likewise.
3364         (__fork_lock): Change type to int.
3365         * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
3366         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
3367         isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
3368         lll_futex_wake.
3369         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
3370         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
3371         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
3372         New function.
3373         (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
3374         pass it through to lll_futex_*wait, only compile in when
3375         IS_IN_libpthread.
3376         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3377         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
3378         argument and pass it through to lll_futex_*wait.
3379         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
3380         lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
3381         lll_robust_*.  Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
3382         inline functions to __lll_* resp. __lll_robust_*.
3383         (LLL_MUTEX_LOCK_INITIALIZER): Remove.
3384         (lll_mutex_dead): Add private argument.
3385         (__lll_lock_wait_private): New prototype.
3386         (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
3387         __lll_robust_lock_timedwait): Add private argument to prototypes.
3388         (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
3389         call __lll_lock_wait_private, otherwise pass private to
3390         __lll_lock_wait.
3391         (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
3392         __lll_robust_timedlock): Add private argument, pass it to
3393         __lll_*wait functions.
3394         (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
3395         call __lll_unlock_wake_private, otherwise pass private to
3396         __lll_unlock_wake.
3397         (__lll_robust_unlock): Add private argument, pass it to
3398         __lll_robust_unlock_wake.
3399         (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
3400         lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
3401         argument, pass it through to __lll_* inline function.
3402         (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
3403         (lll_lock_t): Remove.
3404         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
3405         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
3406         lll_cond_wake, lll_cond_broadcast): Remove.
3407         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3408         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3409         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3410         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3411         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
3412         the header from assembler.  Renamed all lll_mutex_* resp.
3413         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
3414         (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
3415         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3416         (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
3417         LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
3418         (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
3419         __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
3420         Remove prototype.
3421         (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
3422         (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
3423         rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
3424         (lll_trylock): Likewise, use __lll_trylock_asm, pass
3425         MULTIPLE_THREADS_OFFSET as another asm operand.
3426         (lll_lock): Add private argument, use __lll_lock_asm_start, pass
3427         MULTIPLE_THREADS_OFFSET as last asm operand, call
3428         __lll_lock_wait_private if private is constant LLL_PRIVATE,
3429         otherwise pass private as another argument to __lll_lock_wait.
3430         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
3431         lll_timedlock, lll_robust_timedlock): Add private argument, pass
3432         private as another argument to __lll_*lock_wait call.
3433         (lll_unlock): Add private argument, use __lll_unlock_asm, pass
3434         MULTIPLE_THREADS_OFFSET as another asm operand, call
3435         __lll_unlock_wake_private if private is constant LLL_PRIVATE,
3436         otherwise pass private as another argument to __lll_unlock_wake.
3437         (lll_robust_unlock): Add private argument, pass private as another
3438         argument to __lll_unlock_wake.
3439         (lll_robust_dead): Add private argument, use __lll_private_flag
3440         macro.
3441         (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
3442         LLL_MUTEX_LOCK_INITIALIZER.
3443         (lll_lock_t): Remove.
3444         (LLL_LOCK_INITIALIZER_WAITERS): Define.
3445         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
3446         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
3447         lll_cond_wake, lll_cond_broadcast): Remove.
3448         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3449         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
3450         2007-05-2{3,9} changes.
3451         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
3452         kernel-features.h and lowlevellock.h.
3453         (LOAD_PRIVATE_FUTEX_WAIT): Define.
3454         (LOAD_FUTEX_WAIT): Rewritten.
3455         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
3456         define.
3457         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
3458         (__lll_mutex_lock_wait): Rename to ...
3459         (__lll_lock_wait): ... this.  Take futex addr from %edx instead of
3460         %ecx, %ecx is now private argument.  Don't compile in for libc.so.
3461         (__lll_mutex_timedlock_wait): Rename to ...
3462         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.  %esi
3463         contains private argument.  Don't compile in for libc.so.
3464         (__lll_mutex_unlock_wake): Rename to ...
3465         (__lll_unlock_wake): ... this.  %ecx contains private argument.
3466         Don't compile in for libc.so.
3467         (__lll_timedwait_tid): Use __NR_gettimeofday.
3468         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
3469         kernel-features.h and lowlevellock.h.
3470         (LOAD_FUTEX_WAIT): Define.
3471         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
3472         define.
3473         (__lll_robust_mutex_lock_wait): Rename to ...
3474         (__lll_robust_lock_wait): ... this.  Futex addr is now in %edx
3475         argument, %ecx argument contains private.  Use LOAD_FUTEX_WAIT
3476         macro.
3477         (__lll_robust_mutex_timedlock_wait): Rename to ...
3478         (__lll_robust_timedlock_wait): ... this.  Use __NR_gettimeofday.
3479         %esi argument contains private, use LOAD_FUTEX_WAIT macro.
3480         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
3481         lowlevellock.h.
3482         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3483         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
3484         PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
3485         __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
3486         to __lll_lock_wait in %edx.
3487         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
3488         Include lowlevellock.h and pthread-errnos.h.
3489         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3490         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
3491         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
3492         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3493         pass LLL_SHARED in %ecx to both __lll_lock_wait and
3494         __lll_unlock_wake.
3495         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
3496         Include lowlevellock.h and pthread-errnos.h.
3497         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
3498         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
3499         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
3500         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3501         pass LLL_SHARED in %ecx to both __lll_lock_wait and
3502         __lll_unlock_wake.
3503         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
3504         Include lowlevellock.h.
3505         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3506         Don't define.
3507         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
3508         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3509         pass LLL_SHARED in %ecx to both __lll_lock_wait and
3510         __lll_unlock_wake.  Use __NR_gettimeofday.
3511         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
3512         Include lowlevellock.h.
3513         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3514         (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
3515         to __lll_*, pass cond_lock address in %edx rather than %ecx to
3516         __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
3517         and __lll_unlock_wake.
3518         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
3519         Include lowlevellock.h.
3520         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3521         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
3522         MUTEX(%ebx) address in %edx rather than %ecx to
3523         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
3524         and __lll_unlock_wake.  Move return value from %ecx to %edx
3525         register.
3526         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3527         Include lowlevellock.h.
3528         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3529         Don't define.
3530         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3531         MUTEX(%ebp) address in %edx rather than %ecx to
3532         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
3533         and __lll_unlock_wake.  Move return value from %ecx to %edx
3534         register.  Use __NR_gettimeofday.
3535         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3536         Include lowlevellock.h.
3537         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3538         Don't define.
3539         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3540         MUTEX(%ebp) address in %edx rather than %ecx to
3541         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
3542         and __lll_unlock_wake.  Move return value from %ecx to %edx
3543         register.  Use __NR_gettimeofday.
3544         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
3545         Include lowlevellock.h.
3546         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3547         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
3548         MUTEX(%edi) address in %edx rather than %ecx to
3549         __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
3550         and __lll_unlock_wake.
3551         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
3552         Include lowlevellock.h.
3553         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3554         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3555         MUTEX(%ebx) address in %edx rather than %ecx to
3556         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
3557         and __lll_unlock_wake.  Move return value from %ecx to %edx
3558         register.
3559         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
3560         lowlevellock.h.
3561         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
3562         define.
3563         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
3564         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
3565         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
3566         lowlevellock.h.
3567         (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
3568         (sem_timedwait): Use __NR_gettimeofday.
3569         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
3570         lowlevellock.h.
3571         (LOCK): Don't define.
3572         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
3573         lowlevellock.h.
3574         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3575         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
3576         are waiters.
3577         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
3578         2007-05-2{3,9} changes.
3579         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
3580         kernel-features.h and lowlevellock.h.
3581         (LOAD_PRIVATE_FUTEX_WAIT): Define.
3582         (LOAD_FUTEX_WAIT): Rewritten.
3583         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
3584         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
3585         (__lll_mutex_lock_wait): Rename to ...
3586         (__lll_lock_wait): ... this.  %esi is now private argument.
3587         Don't compile in for libc.so.
3588         (__lll_mutex_timedlock_wait): Rename to ...
3589         (__lll_timedlock_wait): ... this.  %esi contains private argument.
3590         Don't compile in for libc.so.
3591         (__lll_mutex_unlock_wake): Rename to ...
3592         (__lll_unlock_wake): ... this.  %esi contains private argument.
3593         Don't compile in for libc.so.
3594         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
3595         kernel-features.h and lowlevellock.h.
3596         (LOAD_FUTEX_WAIT): Define.
3597         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
3598         (__lll_robust_mutex_lock_wait): Rename to ...
3599         (__lll_robust_lock_wait): ... this.  %esi argument contains private.
3600         Use LOAD_FUTEX_WAIT macro.
3601         (__lll_robust_mutex_timedlock_wait): Rename to ...
3602         (__lll_robust_timedlock_wait): ... this. %esi argument contains
3603         private, use LOAD_FUTEX_WAIT macro.
3604         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
3605         lowlevellock.h.
3606         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3607         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
3608         PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
3609         __lll_lock_wait and __lll_unlock_wake.
3610         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
3611         Include lowlevellock.h and pthread-errnos.h.
3612         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3613         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
3614         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
3615         pass LLL_SHARED in %esi to both __lll_lock_wait and
3616         __lll_unlock_wake.
3617         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
3618         Include lowlevellock.h and pthread-errnos.h.
3619         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
3620         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
3621         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
3622         pass LLL_SHARED in %esi to both __lll_lock_wait and
3623         __lll_unlock_wake.
3624         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
3625         Include lowlevellock.h.
3626         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3627         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
3628         pass LLL_SHARED in %esi to both __lll_lock_wait and
3629         __lll_unlock_wake.
3630         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
3631         Include lowlevellock.h.
3632         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3633         (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
3634         to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
3635         and __lll_unlock_wake.
3636         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
3637         Include lowlevellock.h.
3638         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3639         Don't define.
3640         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
3641         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3642         and __lll_unlock_wake.
3643         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3644         Include lowlevellock.h.
3645         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3646         Don't define.
3647         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3648         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3649         and __lll_unlock_wake.
3650         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3651         Include lowlevellock.h.
3652         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3653         Don't define.
3654         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3655         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3656         and __lll_unlock_wake.
3657         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
3658         Include lowlevellock.h.
3659         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3660         Don't define.
3661         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
3662         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3663         and __lll_unlock_wake.
3664         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
3665         Include lowlevellock.h.
3666         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3667         Don't define.
3668         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3669         pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
3670         and __lll_unlock_wake.
3671         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
3672         lowlevellock.h.
3673         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
3674         define.
3675         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
3676         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
3677         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
3678         lowlevellock.h.
3679         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3680         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
3681         lowlevellock.h.
3682         (LOCK): Don't define.
3683         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
3684         lowlevellock.h.
3685         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3686         * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
3687         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
3688         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
3689         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
3690         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
3691         (__lll_lock_wait_private): New function.
3692         (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
3693         it to lll_futex_*wait.  Don't compile in for libc.so.
3694         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
3695         Remove.
3696         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
3697         (struct sparc_pthread_barrier): Remove.
3698         (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
3699         struct sparc_pthread_barrier.  Pass
3700         ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
3701         and lll_futex_wait macros.
3702         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3703         Remove.
3704         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3705         Include sparc pthread_barrier_wait.c instead of generic one.
3707 2007-07-30  Jakub Jelinek  <jakub@redhat.com>
3709         * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
3711         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
3712         (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
3713         %ecx.
3714         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
3715         (pthread_rwlock_timedwrlock): Likewise.
3716         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
3717         (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
3719 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
3721         * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
3723 2007-07-26  Jakub Jelinek  <jakub@redhat.com>
3725         * tst-locale2.c (useless): Add return statement.
3727 2007-07-24  Jakub Jelinek  <jakub@redhat.com>
3729         * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
3730         lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
3731         * pthread_create.c (start_thread): Likewise.
3732         * init.c (sighandler_setxid): Likewise.
3733         * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3734         * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3735         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3736         * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3737         * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3738         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3739         * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3740         * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3741         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
3742         Likewise.
3743         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
3744         Likewise.
3745         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
3746         Likewise.
3747         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
3748         __rtld_notify): Likewise.
3749         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
3750         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
3751         __pthread_once): Likewise.
3752         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
3753         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3754         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3755         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3756         (lll_futex_wait): Add private argument, define as wrapper around
3757         lll_futex_timed_wait.
3758         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3759         use __lll_private_flag macro.
3760         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3761         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3762         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
3763         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3764         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3765         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3766         (lll_futex_wait): Add private argument, define as wrapper around
3767         lll_futex_timed_wait.
3768         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3769         use __lll_private_flag macro.
3770         (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
3771         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3772         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
3773         Define.
3774         (lll_futex_timed_wait, lll_futex_wake): Use it.
3775         (lll_private_futex_wait, lll_private_futex_timed_wait,
3776         lll_private_futex_wake): Removed.
3777         * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
3778         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3779         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3780         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3781         (lll_futex_wait): Add private argument, define as wrapper around
3782         lll_futex_timed_wait.
3783         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3784         use __lll_private_flag macro.
3785         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3786         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3787         to lll_futex_*.
3788         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3789         (lll_private_futex_wait, lll_private_futex_timed_wait,
3790         lll_private_futex_wake): Removed.
3791         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
3792         Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
3793         (lll_private_futex_wait, lll_private_futex_timed_wait,
3794         lll_private_futex_wake): Removed.
3795         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
3796         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3797         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3798         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3799         (lll_futex_wait): Add private argument, define as wrapper around
3800         lll_futex_timed_wait.
3801         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3802         use __lll_private_flag macro.
3803         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3804         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3805         to lll_futex_*.
3806         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
3807         Define.
3808         (lll_futex_timed_wait, lll_futex_wake): Use it.
3809         (lll_private_futex_wait, lll_private_futex_timed_wait,
3810         lll_private_futex_wake): Removed.
3812 2007-07-27  Jakub Jelinek  <jakub@redhat.com>
3814         * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
3815         of the structure for sparc32.
3817 2007-07-26  Aurelien Jarno  <aurelien@aurel32.net>
3819         * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
3821 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
3823         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3824         code used when private futexes are assumed.
3825         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3826         Likewise.
3828 2007-07-23  Jakub Jelinek  <jakub@redhat.com>
3830         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3831         (__lll_private_flag): Define.
3832         (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
3833         (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
3834         __lll_private_flag.
3835         (lll_private_futex_wait, lll_private_futex_timedwait,
3836         lll_private_futex_wake): Define as wrapper around non-_private
3837         macros.
3838         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3839         (__lll_private_flag): Define.
3840         (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
3841         (lll_private_futex_wait, lll_private_futex_timedwait,
3842         lll_private_futex_wake): Define as wrapper around non-_private
3843         macros.
3845 2007-07-10  Steven Munroe  <sjmunroe@us.ibm.com>
3847         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
3848         parameter to lll_futex_wait call.
3849         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
3851         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3852         Replace lll_futex_wait with lll_private_futex_wait.
3853         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3854         Add LLL_SHARED parameter to lll_futex_wake().
3856         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
3857         LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
3858         lll_private_futex_wake.
3859         (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
3860         bit from private parm before syscall.
3861         (lll_futex_timed_wait): Likewise.
3862         (lll_futex_wake): Likewise.
3863         (lll_futex_wake_unlock): Likewise.
3864         (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
3865         (lll_robust_mutex_unlock): Likewise.
3866         (lll_mutex_unlock_force): Likewise.
3867         (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
3869 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
3871         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3872         compilation when unconditionally using private futexes.
3873         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3874         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3875         Likewise.
3876         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3877         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3879 2007-07-17  Jakub Jelinek  <jakub@redhat.com>
3881         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
3882         Define.
3884 2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3886         * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
3887         kernel-features.h.
3889 2007-05-16  Roland McGrath  <roland@redhat.com>
3891         * init.c (__nptl_initial_report_events): New variable.
3892         (__pthread_initialize_minimal_internal): Initialize pd->report_events
3893         to that.
3895 2007-06-22  Jakub Jelinek  <jakub@redhat.com>
3897         * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
3898         cpusetsize if pthread_getaffinity_np failed with ENOSYS.
3900 2007-06-19  Ulrich Drepper  <drepper@redhat.com>
3902         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
3903         implementation.
3905 2007-06-18  Ulrich Drepper  <drepper@redhat.com>
3907         * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
3908         * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
3909         * pthread_mutex_timedlock.c: Likewise.
3910         * pthread_mutex_trylock.c: Likewise.
3911         * pthread_mutex_unlock.c: Likewise.
3913 2007-06-17  Andreas Schwab  <schwab@suse.de>
3915         * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
3916         sections.
3918 2007-06-17  Ulrich Drepper  <drepper@redhat.com>
3920         * allocatestack.c (allocate_stack): Make code compile if
3921         __ASSUME_PRIVATE_FUTEX is set.
3923 2007-06-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3925         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
3926         (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
3927         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
3928         (__pthread_rwlock_wrlock): Likewise.
3929         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
3930         (pthread_rwlock_timedrdlock): Likewise.
3931         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
3932         (pthread_rwlock_timedwrlock): Likewise.
3933         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
3934         (__pthread_rwlock_unlock): Likewise.
3936 2007-06-10  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3938         * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
3939         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
3940         Split __flags into __flags, __shared, __pad1 and __pad2.
3941         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
3942         futexes if they are available.
3943         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
3944         in libc-lowlevellock.S allow using private futexes.
3945         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
3946         FUTEX_PRIVATE_FLAG.  Add additional parameter to lll_futex_wait,
3947         lll_futex_timed_wait and lll_futex_wake.  Change lll_futex_wait
3948         to call lll_futex_timed_wait.  Add lll_private_futex_wait,
3949         lll_private_futex_timed_wait and lll_private_futex_wake.
3950         (lll_robust_mutex_unlock): Fix typo.
3951         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
3952         field in futex command setup.
3953         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
3954         COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
3955         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
3956         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
3957         if they are available.  Remove clear_once_control.
3958         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
3959         futexes if they are available.
3960         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3961         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3962         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
3963         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3964         * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
3965         Wake only when there are waiters.
3966         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
3967         support.  Indicate that there are waiters.  Remove unnecessary
3968         extra cancellation test.
3969         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.  Removed
3970         left-over duplication of __sem_wait_cleanup.
3972 2007-06-07  Ulrich Drepper  <drepper@redhat.com>
3974         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
3975         parameter to lll_futex_wait, lll_futex_timed_wait, and
3976         lll_futex_wake.  Change lll_futex_wait to call lll_futex_timed_wait.
3977         Add lll_private_futex_wait, lll_private_futex_timed_wait, and
3978         lll_private_futex_wake.
3979         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
3980         * allocatestack.c: Adjust use of lll_futex_* macros.
3981         * init.c: Likewise.
3982         * lowlevellock.h: Likewise.
3983         * pthread_barrier_wait.c: Likewise.
3984         * pthread_cond_broadcast.c: Likewise.
3985         * pthread_cond_destroy.c: Likewise.
3986         * pthread_cond_signal.c: Likewise.
3987         * pthread_cond_timedwait.c: Likewise.
3988         * pthread_cond_wait.c: Likewise.
3989         * pthread_create.c: Likewise.
3990         * pthread_mutex_lock.c: Likewise.
3991         * pthread_mutex_setprioceiling.c: Likewise.
3992         * pthread_mutex_timedlock.c: Likewise.
3993         * pthread_mutex_unlock.c: Likewise.
3994         * pthread_rwlock_timedrdlock.c: Likewise.
3995         * pthread_rwlock_timedwrlock.c: Likewise.
3996         * pthread_rwlock_unlock.c: Likewise.
3997         * sysdeps/alpha/tls.h: Likewise.
3998         * sysdeps/i386/tls.h: Likewise.
3999         * sysdeps/ia64/tls.h: Likewise.
4000         * sysdeps/powerpc/tls.h: Likewise.
4001         * sysdeps/pthread/aio_misc.h: Likewise.
4002         * sysdeps/pthread/gai_misc.h: Likewise.
4003         * sysdeps/s390/tls.h: Likewise.
4004         * sysdeps/sh/tls.h: Likewise.
4005         * sysdeps/sparc/tls.h: Likewise.
4006         * sysdeps/unix/sysv/linux/fork.c: Likewise.
4007         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
4008         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
4009         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
4010         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
4011         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
4012         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
4013         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
4014         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
4015         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
4016         Likewise.
4017         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
4018         * sysdeps/x86_64/tls.h: Likewise.
4020 2007-05-29  Ulrich Drepper  <drepper@redhat.com>
4022         * pthread_getattr_np.c: No need to install a cancellation handler,
4023         this is no cancellation point.
4024         * pthread_getschedparam.c: Likewise.
4025         * pthread_setschedparam.c: Likewise.
4026         * pthread_setschedprio.c: Likewise.
4027         * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
4028         lll_unlock_wake_cb.
4029         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
4030         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
4031         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4032         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4033         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4034         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4035         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
4036         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
4037         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
4038         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
4039         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
4040         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4042         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
4043         whether there are more than one thread makes no sense here since
4044         we only call the slow path if the locks are taken.
4045         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
4047         * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
4048         COND_NWAITERS_SHIFT.
4049         * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
4050         COND_CLOCK_BITS.
4051         * pthread_cond_init.c: Likewise.
4052         * pthread_cond_timedwait.c: Likewise.
4053         * pthread_cond_wait.c: Likewise.
4054         * pthread_condattr_getclock.c: Likewise.
4055         * pthread_condattr_setclock.c: Likewise.
4056         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
4057         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4058         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4059         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4060         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4062 2007-05-28  Jakub Jelinek  <jakub@redhat.com>
4064         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
4065         unistd.h.
4067         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
4068         insn suffix.
4069         (THREAD_GSCOPE_GET_FLAG): Remove.
4070         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
4071         * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
4072         changes.
4073         * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
4074         (THREAD_GSCOPE_GET_FLAG): Remove.
4075         (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
4076         instead of THREAD_GSCOPE_GET_FLAG.
4077         (THREAD_GSCOPE_SET_FLAG): Likewise.  Add atomic_write_barrier after
4078         it.
4079         * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4080         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4081         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4082         THREAD_GSCOPE_WAIT): Define.
4083         * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4084         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4085         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4086         THREAD_GSCOPE_WAIT): Define.
4087         * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4088         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4089         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4090         THREAD_GSCOPE_WAIT): Define.
4091         * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4092         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4093         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4094         THREAD_GSCOPE_WAIT): Define.
4096 2007-05-24  Richard Henderson  <rth@redhat.com>
4098         * descr.h (struct pthread): Add header.gscope_flag.
4099         * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4100         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4101         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4102         THREAD_GSCOPE_WAIT): Define.
4104 2007-05-27  Ulrich Drepper  <drepper@redhat.com>
4106         * init.c: Make it compile with older kernel headers.
4108         * tst-initializers1.c: Show through exit code which test failed.
4110         * pthread_rwlock_init.c: Also initialize __shared field.
4111         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
4112         element in rwlock structure into four byte elements.  One of them is
4113         the new __shared element.
4114         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
4115         Likewise.
4116         [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
4117         __shared, adjust names of other padding elements.
4118         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4119         * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
4120         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
4121         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
4122         FUTEX_PRIVATE_FLAG.
4123         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
4124         futex to use private operations if possible.
4125         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
4126         Likewise.
4127         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
4128         Likewise.
4129         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
4130         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
4131         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
4132         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
4133         Likewise.
4134         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
4135         Likewise.
4136         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
4137         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
4139 2007-05-26  Ulrich Drepper  <drepper@redhat.com>
4141         * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
4142         * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
4143         * pthread_rwlock_timedrdlock.c: Likewise.
4144         * pthread_rwlock_tryrdlock.c: Likewise.
4146         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
4147         optimization.
4149         * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
4150         * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
4151         duplication of __sem_wait_cleanup.
4153         * allocatestack.c: Revert last change.
4154         * init.c: Likewise.
4155         * sysdeps/i386/tls.h: Likewise.
4156         * sysdeps/x86_64/tls.h: Likewise.
4157         * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
4158         header structure.
4159         * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
4161         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
4162         Add private field.
4163         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
4164         * pthread_barrier_init.c: Set private flag if pshared and private
4165         futexes are supported.
4166         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
4167         private field in futex command setup.
4168         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
4170 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
4172         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
4173         support.
4174         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4175         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4176         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
4177         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4178         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4180         * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
4181         * sem_init.c (__new_sem_init): Rewrite to initialize all three
4182         fields in the structure.
4183         (__old_sem_init): New function.
4184         * sem_open.c: Initialize all fields of the structure.
4185         * sem_getvalue.c: Adjust for renamed element.
4186         * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
4187         (gen-as-const-headers): Add structsem.sym.
4188         * sysdeps/unix/sysv/linux/structsem.sym: New file.
4189         * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
4190         struct new_sem.  Add struct old_sem.
4191         * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
4192         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
4193         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
4194         * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
4195         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4196         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4197         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
4198         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4199         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4200         * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
4201         * tst-sem10.c: New file.
4202         * tst-sem11.c: New file.
4203         * tst-sem12.c: New file.
4204         * tst-typesizes.c: Test struct new_sem and struct old_sem instead
4205         of struct sem.
4207 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
4208             Jakub Jelinek  <jakub@redhat.com>
4210         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
4211         Move __pthread_enable_asynccancel right before futex syscall.
4212         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
4213         Likewise.
4215 2007-05-24  Jakub Jelinek  <jakub@redhat.com>
4217         * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
4218         THREAD_COPY_PRIVATE_FUTEX): Define.
4219         * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
4220         THREAD_COPY_PRIVATE_FUTEX): Define.
4221         * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
4222         * init.c (__pthread_initialize_minimal_internal): Use
4223         THREAD_SET_PRIVATE_FUTEX.
4225         * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
4226         (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
4227         THREAD_GSCOPE_FLAG_WAIT): Define.
4228         (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
4229         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
4230         * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
4231         PTR_DEMANGLE.
4232         (THREAD_GSCOPE_GET_FLAG): Define.
4233         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
4234         * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
4235         instead of ->header.gscope_flag directly.
4237 2007-05-23  Ulrich Drepper  <drepper@redhat.com>
4239         * init.c (__pthread_initialize_minimal_internal): Check whether
4240         private futexes are available.
4241         * allocatestack.c (allocate_stack): Copy private_futex field from
4242         current thread into the new stack.
4243         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
4244         futexes if they are available.
4245         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
4246         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
4247         in libc-lowlevellock.S allow using private futexes.
4248         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4249         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
4250         FUTEX_PRIVATE_FLAG.
4251         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
4252         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
4253         if they are available.
4254         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
4255         * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
4256         * sysdeps/i386/tcb-offsets.sym: Likewise.
4257         * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
4258         * sysdeps/i386/tls.h (tcbhead_t): Likewise.
4260 2007-05-21  Ulrich Drepper  <drepper@redhat.com>
4262         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
4263         Remove ptr_wait_lookup_done again.
4264         * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
4265         (__pthread_initialize_minimal_internal): Initialize
4266         _dl_wait_lookup_done pointer in _rtld_global directly.
4267         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
4268         Remove code to code _dl_wait_lookup_done.
4269         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
4270         encrypted for now.
4272 2007-05-21  Jakub Jelinek  <jakub@redhat.com>
4274         * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
4275         pthread_mutex_init failed with ENOTSUP.
4277 2007-05-19  Ulrich Drepper  <drepper@redhat.com>
4279         * allocatestack.c (__wait_lookup_done): New function.
4280         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
4281         Add ptr_wait_lookup_done.
4282         * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
4283         * pthreadP.h: Declare __wait_lookup_done.
4284         * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
4285         Define macros to implement reference handling of global scope.
4286         * sysdeps/x86_64/tls.h: Likewise.
4287         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
4288         Initialize GL(dl_wait_lookup_done).
4290 2007-05-17  Ulrich Drepper  <drepper@redhat.com>
4292         [BZ #4512]
4293         * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
4294         is detected.
4295         * pthread_mutex_timedlock.c: Likewise.
4296         * pthread_mutex_trylock.c: Likewise.
4297         Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
4299         * Makefile (tests): Add tst-robust9 and tst-robustpi9.
4300         * tst-robust9.c: New file.
4301         * tst-robustpi9.c: New file.
4303         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
4304         unnecessary extra cancellation test.
4306 2007-05-14  Ulrich Drepper  <drepper@redhat.com>
4308         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
4309         extra cancellation test.
4310         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4312 2007-05-10  Ulrich Drepper  <drepper@redhat.com>
4314         * descr.h (struct pthread): Rearrange members to fill hole in
4315         64-bit layout.
4317         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4318         (__pthread_setaffinity_new): If syscall was successful and
4319         RESET_VGETCPU_CACHE is defined, use it before returning.
4320         * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
4322 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
4324         [BZ #4455]
4325         * tst-align2.c: Include stackinfo.h.
4326         * tst-getpid1.c: Likewise.
4328 2007-05-02  Carlos O'Donell  <carlos@systemhalted.org>
4330         [BZ #4455]
4331         * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
4332         * tst-getpid1.c (do_test): Likewise.
4334         [BZ #4456]
4335         * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
4336         (allocate_stack): Likewise.
4338 2007-05-07  Ulrich Drepper  <drepper@redhat.com>
4340         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
4341         (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
4342         (__lll_robust_timedlock_wait): Likewise.
4343         Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
4345 2007-05-06  Mike Frysinger  <vapier@gentoo.org>
4347         [BZ #4465]
4348         * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
4349         * tst-cancel4.c (tf_fdatasync): New test.
4351 2007-04-27  Ulrich Drepper  <drepper@redhat.com>
4353         [BZ #4392]
4354         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
4355         check mutexes like normal mutexes.
4357         [BZ #4306]
4358         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
4359         Initialize the whole sigevent structure to appease valgrind.
4361 2007-04-25  Ulrich Drepper  <drepper@redhat.com>
4363         * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
4364         * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
4366 2007-04-06  Ulrich Drepper  <drepper@redhat.com>
4368         * tst-locale1.c: Avoid warnings.
4369         * tst-locale2.c: Likewise.
4371 2007-03-19  Steven Munroe  <sjmunroe@us.ibm.com>
4373         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4374         (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
4376 2007-03-16  Jakub Jelinek  <jakub@redhat.com>
4378         * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
4379         __extern_always_inline where appropriate.
4380         * sysdeps/pthread/pthread.h: Likewise.
4382 2007-03-13  Richard Henderson  <rth@redhat.com>
4384         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
4385         separate cfi regions for the two subsections.
4387 2007-02-25  Ulrich Drepper  <drepper@redhat.com>
4389         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
4390         new thread, don't just decrement it.
4391         Patch by Suzuki K P <suzuki@in.ibm.com>.
4393 2007-02-21  Ulrich Drepper  <drepper@redhat.com>
4395         * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
4396         PTHFCT_CALL definition.
4398 2007-02-18  Ulrich Drepper  <drepper@redhat.com>
4400         * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
4401         available, don't use it.
4403 2007-02-09  Jakub Jelinek  <jakub@redhat.com>
4405         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4406         (__lll_mutex_timedlock_wait): Use correct pointer when we don't
4407         call into the kernel to delay.
4409 2007-01-18  Ulrich Drepper  <drepper@redhat.com>
4411         * tst-initializers1.c: We want to test the initializers as seen
4412         outside of libc, so undefined _LIBC.
4414         * pthread_join.c (cleanup): Avoid warning.
4416 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
4418         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4419         (__lll_timedwait_tid): Add unwind info.
4421         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
4422         function table, mangle the pointers.
4423         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
4424         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
4425         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
4426         demangle pointers before use.
4427         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
4428         demangle pointer.
4429         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
4430         * sysdeps/pthread/setxid.h: Likewise.
4432 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
4434         * tst-rwlock7.c: Show some more information in case of correct
4435         behavior.
4437 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
4439         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4440         (lll_futex_timed_wait): Undo part of last change, don't negate
4441         return value.
4443 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
4445         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
4446         FUTEX_CMP_REQUEUE and lll_futex_requeue.
4448 2006-12-28  David S. Miller  <davem@davemloft.net>
4450         * shlib-versions: Fix sparc64 linux target specification.
4452 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
4454         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
4455         Adjust include path for pthread_barrier_wait.c move.
4457 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
4459         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
4460         tid isn't reread from pd->tid in between ESRCH test and the syscall.
4462 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
4464         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
4465         6 argument cancellable syscalls.
4466         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
4467         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
4468         6 argument cancellable syscalls.
4469         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
4471 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
4473         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
4474         (__rtld_mrlock_initialize): Add missing closing parenthesis.
4476 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
4478         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
4479         __sync_lock_release instead of __sync_lock_release_si.
4481 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
4483         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
4484         Define.
4485         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
4486         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
4487         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4488         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4489         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4490         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4491         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4492         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4493         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4494         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4495         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4497 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
4499         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
4500         * pthread_barrier_wait.c: ...here.
4501         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
4502         * pthread_cond_broadcast.c: ...here.
4503         * sysdeps/pthread/pthread_cond_signal.c: Move to...
4504         * pthread_cond_signal.c: ...here.
4505         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
4506         * pthread_cond_timedwait.c: ...here.
4507         * sysdeps/pthread/pthread_cond_wait.c: Move to...
4508         * pthread_cond_wait.c: ...here.
4509         * sysdeps/pthread/pthread_once.c: Move to...
4510         * pthread_once.c: ...here.
4511         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
4512         * pthread_rwlock_rdlock.c: ...here.
4513         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
4514         * pthread_rwlock_timedrdlock.c: ...here.
4515         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
4516         * pthread_rwlock_timedwrlock.c: ...here.
4517         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
4518         * pthread_rwlock_unlock.c: ...here.
4519         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
4520         * pthread_rwlock_wrlock.c: ...here.
4521         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
4522         * pthread_spin_destroy.c: ...here.
4523         * sysdeps/pthread/pthread_spin_init.c: Move to...
4524         * pthread_spin_init.c: ...here.
4525         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
4526         * pthread_spin_unlock.c: ...here.
4527         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
4528         * pthread_getcpuclockid.c: ...here.
4530         * init.c: USE_TLS support is now always enabled.
4531         * tst-tls5.h: Likewise.
4532         * sysdeps/alpha/tls.h: Likewise.
4533         * sysdeps/i386/tls.h: Likewise.
4534         * sysdeps/ia64/tls.h: Likewise.
4535         * sysdeps/powerpc/tls.h: Likewise.
4536         * sysdeps/s390/tls.h: Likewise.
4537         * sysdeps/sh/tls.h: Likewise.
4538         * sysdeps/sparc/tls.h: Likewise.
4539         * sysdeps/x86_64/tls.h: Likewise.
4541 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
4543         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
4544         __rtld_mrlock_change): Update oldval if atomic compare and exchange
4545         failed.
4547         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4548         Define to THREAD_SELF->header.multiple_threads.
4549         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
4550         Likewise.
4551         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
4552         Likewise.
4553         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
4554         (SINGLE_THREAD_P): Likewise.
4555         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
4556         (SINGLE_THREAD_P): Likewise.
4557         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4558         (SINGLE_THREAD_P): Likewise.
4559         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
4560         (SINGLE_THREAD_P): Likewise.
4561         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
4562         Likewise.
4563         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
4564         (SINGLE_THREAD_P): Likewise.
4565         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
4566         (SINGLE_THREAD_P): Likewise.
4567         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
4568         Likewise.
4570 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
4572         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
4573         by default rather than 2_3_3.
4575 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
4577         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
4578         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
4579         atomic_* instead of catomic_* macros.
4581 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
4583         [BZ #3285]
4584         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
4585         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
4586         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4587         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4588         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4589         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
4590         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4591         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4592         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4593         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
4594         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4595         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4596         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4598 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
4600         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
4601         cancelable syscalls with six parameters.
4603         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
4604         operations instead of atomic_*.
4606 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
4608         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
4610 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
4612         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
4613         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
4614         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
4615         New file.
4616         * pthread_attr_setstack.c: Allow overwriting the version number of the
4617         new symbol.
4618         * pthread_attr_setstacksize.c: Likewise.
4619         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
4620         it.
4621         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
4622         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
4624 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
4626         [BZ #3251]
4627         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
4628         Patch by Petr Baudis.
4630 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
4632         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
4634         * tst-cancel2.c (tf): Loop as long as something was written.
4636 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4638         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
4639         mutexes wake all mutexes.
4640         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
4641         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
4642         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4644 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
4646         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
4647         to guarantee the thread is always canceled.
4649 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
4651         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
4652         Include stdlib.h.
4653         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
4654         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
4655         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4656         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4657         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4659 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
4661         [BZ #3123]
4662         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
4663         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
4664         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4665         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4666         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4667         * Makefile (tests): Add tst-cond22.
4668         * tst-cond22.c: New file.
4670 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
4672         [BZ #3124]
4673         * descr.h (struct pthread): Add parent_cancelhandling.
4674         * sysdeps/pthread/createthread.c (create_thread): Pass parent
4675         cancelhandling value to child.
4676         * pthread_create.c (start_thread): If parent thread was canceled
4677         reset the SIGCANCEL mask.
4678         * Makefile (tests): Add tst-cancel25.
4679         * tst-cancel25.c: New file.
4681 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
4682             Ulrich Drepper  <drepper@redhat.com>
4684         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
4685         counterp if it is already zero.
4686         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
4688 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
4689             Roland McGrath  <roland@redhat.com>
4691         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4692         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4693         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
4694         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4695         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4696         lll_robust_mutex_timedlock, lll_mutex_unlock,
4697         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4698         Add _L_*_ symbols around the subsection.
4699         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
4700         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
4702 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
4703             Roland McGrath  <roland@redhat.com>
4705         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4706         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4707         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
4708         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4709         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4710         lll_robust_mutex_timedlock, lll_mutex_unlock,
4711         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4712         Add _L_*_ symbols around the subsection.
4713         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
4714         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
4716 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
4718         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
4719         change because it can disturb too much existing code.  If real hard
4720         reader preference is needed we'll introduce another type.
4721         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4722         (pthread_rwlock_timedwrlock): Likewise.
4723         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4724         Likewise.
4726 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
4728         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
4729         reader preference.
4730         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4731         (pthread_rwlock_timedwrlock): Likewise.
4732         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4733         Likewise.
4735 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
4737         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
4738         Only define ifdef SHARED.
4740 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
4742         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
4743         (free_stacks): ...here.
4744         (__free_stack_cache): New function.
4745         * pthreadP.h: Declare __free_stack_cache.
4746         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
4747         ptr_freeres.
4748         * init.c (pthread_functions): Initialize ptr_freeres.
4749         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
4750         New freeres function.
4752 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
4754         [BZ #3018]
4755         * Makefile (extra-objs): Add modules to extra-test-objs instead.
4757 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
4759         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4760         _XOPEN_REALTIME_THREADS.
4762 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
4764         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
4765         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
4766         HAVE_CLOCK_GETTIME_VSYSCALL.
4767         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
4769 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
4771         * sysdeps/unix/sysv/linux/bits/posix_opt.h
4772         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
4773         * descr.h (struct priority_protection_data): New type.
4774         (struct pthread): Add tpp field.
4775         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
4776         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
4777         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
4778         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
4779         TPP mutexes.
4780         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
4781         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
4782         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
4783         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
4784         * tpp.c: New file.
4785         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
4786         boosted by TPP.
4787         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
4788         * pthread_mutexattr_getprioceiling.c
4789         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
4790         in the SCHED_FIFO priority range.
4791         * pthread_mutexattr_setprioceiling.c
4792         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
4793         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
4794         if mutex is not TPP.  Ceiling is now in __data.__lock.
4795         * pthread_mutex_setprioceiling.c: Include stdbool.h.
4796         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
4797         is now in __data.__lock.  Add locking.
4798         * pthread_create.c (__free_tcb): Free pd->tpp structure.
4799         * Makefile (libpthread-routines): Add tpp.
4800         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
4801         * tst-tpp.h: New file.
4802         * tst-mutexpp1.c: New file.
4803         * tst-mutexpp6.c: New file.
4804         * tst-mutexpp10.c: New file.
4805         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
4806         * tst-mutex6.c (TEST_FUNCTION): Likewise.
4808 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
4810         [BZ #2843]
4811         * pthread_join.c (pthread_join): Account for self being canceled
4812         when checking for deadlocks.
4813         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
4814         (tf1): Don't print anything after pthread_join returns, this would be
4815         another cancellation point.
4816         (tf2): Likewise.
4817         * tst-join6.c: New file.
4818         * Makefile (tests): Add tst-join6.
4820 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
4822         [BZ #2892]
4823         * pthread_setspecific.c (__pthread_setspecific): Check
4824         out-of-range index before checking for unused key.
4826         * sysdeps/pthread/gai_misc.h: New file.
4828 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
4830         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
4831         file.  Don't use sysctl.
4832         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
4833         overwrite the file if this is likely not true.
4835 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
4837         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
4838         * Makefile (tests): Add tst-getpid3.
4839         * tst-getpid3.c: New file.
4841 2006-07-30  Roland McGrath  <roland@redhat.com>
4843         * Makefile (libpthread-routines): Add ptw-sigsuspend.
4845         * sysdeps/unix/sysv/linux/i386/not-cancel.h
4846         (pause_not_cancel): New macro.
4847         (nanosleep_not_cancel): New macro.
4848         (sigsuspend_not_cancel): New macro.
4849         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
4850         nanosleep_not_cancel macro from <not-cancel.h>.
4851         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
4852         macro from <not-cancel.h>.
4854 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
4855             Jakub Jelinek  <jakub@redhat.com>
4857         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
4858         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
4859         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
4860         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
4861         * pthread_mutex_init.c: Add support for priority inheritance mutex.
4862         * pthread_mutex_lock.c: Likewise.
4863         * pthread_mutex_timedlock.c: Likewise.
4864         * pthread_mutex_trylock.c: Likewise.
4865         * pthread_mutex_unlock.c: Likewise.
4866         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
4867         all mutexes.
4868         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
4869         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
4870         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
4871         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
4872         pthread-pi-defines.sym.
4873         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
4874         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
4875         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4876         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
4877         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4878         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4879         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4880         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
4881         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
4882         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4883         _POSIX_THREAD_PRIO_INHERIT to 200112L.
4884         * tst-mutex1.c: Adjust to allow use in PI mutex test.
4885         * tst-mutex2.c: Likewise.
4886         * tst-mutex3.c: Likewise.
4887         * tst-mutex4.c: Likewise.
4888         * tst-mutex5.c: Likewise.
4889         * tst-mutex6.c: Likewise.
4890         * tst-mutex7.c: Likewise.
4891         * tst-mutex7a.c: Likewise.
4892         * tst-mutex8.c: Likewise.
4893         * tst-mutex9.c: Likewise.
4894         * tst-robust1.c: Likewise.
4895         * tst-robust7.c: Likewise.
4896         * tst-robust8.c: Likewise.
4897         * tst-mutexpi1.c: New file.
4898         * tst-mutexpi2.c: New file.
4899         * tst-mutexpi3.c: New file.
4900         * tst-mutexpi4.c: New file.
4901         * tst-mutexpi5.c: New file.
4902         * tst-mutexpi6.c: New file.
4903         * tst-mutexpi7.c: New file.
4904         * tst-mutexpi7a.c: New file.
4905         * tst-mutexpi8.c: New file.
4906         * tst-mutexpi9.c: New file.
4907         * tst-robust1.c: New file.
4908         * tst-robust2.c: New file.
4909         * tst-robust3.c: New file.
4910         * tst-robust4.c: New file.
4911         * tst-robust5.c: New file.
4912         * tst-robust6.c: New file.
4913         * tst-robust7.c: New file.
4914         * tst-robust8.c: New file.
4915         * Makefile (tests): Add the new tests.
4917         * pthread_create.c (start_thread): Add some casts to avoid warnings.
4918         * pthread_mutex_destroy.c: Remove unneeded label.
4920 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
4922         * pthread_mutex_init.c (__pthread_mutex_init): Move some
4923         computations to compile time.
4925 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
4927         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
4929 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
4931         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
4933 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
4935         * pthread_key_create.c (__pthread_key_create): Do away with
4936         __pthread_keys_lock.
4938         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4939         (__kernel_cpumask_size): Mark as hidden.
4940         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4942         * sem_open.c (__sem_mappings_lock): Mark as hidden.
4943         * semaphoreP.h (__sem_mappings_lock): Likewise.
4945 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
4947         * pthread_atfork.c: Mark __dso_handle as hidden.
4949 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
4951         [BZ #2644]
4952         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
4953         the reload problem.  Change the one path in pthread_cancel_init
4954         which causes the problem.  Force gcc to reload.  Simplify callers.
4955         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
4956         (_Unwind_GetBSP): Undo last patch.
4958 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
4960         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
4961         function pointer is reloaded after pthread_cancel_init calls.
4963         [BZ #2644]
4964         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
4965         pointers are reloaded after pthread_cancel_init calls.
4967 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
4969         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
4970         __always_inline.
4972 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
4974         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
4975         Allocate new object which is passed to timer_sigev_thread so that
4976         the timer can be deleted before the new thread is scheduled.
4978 2006-04-26  Roland McGrath  <roland@redhat.com>
4980         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
4982 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
4984         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
4985         suffix for conditional jumps.
4986         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
4987         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4988         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
4989         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
4990         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4991         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4993         * init.c (sigcancel_handler): Compare with correct PID even if the
4994         thread is in the middle of a fork call.
4995         (sighandler_setxid): Likewise.
4996         Reported by Suzuki K P <suzuki@in.ibm.com> .
4998 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
5000         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
5002 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
5004         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
5005         fails [Coverity CID 105].
5007 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
5009         * sysdeps/pthread/pthread.h: Add nonnull attributes.
5011 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
5013         [BZ #2505]
5014         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
5015         Define __lll_rel_instr using lwsync.
5017 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
5019         * allocatestack.c (allocate_stack): Always initialize robust_head.
5020         * descr.h: Define struct robust_list_head.
5021         (struct pthread): Use robust_list_head in robust mutex list definition.
5022         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
5023         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
5024         (__pthread_initialize_minimal_internal): Register robust_list with
5025         the kernel.
5026         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
5027         Declare __set_robust_list_avail.
5028         * pthread_create.c (start_thread): Register robust_list of new thread.
5029         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
5030         waiters.
5031         * pthread_mutex_destroy.c: For robust mutexes don't look at the
5032         number of users, it's unreliable.
5033         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
5034         set_robust_list syscall is available.
5035         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
5036         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
5037         Set robust_head.list_op_pending before trying to lock a robust mutex.
5038         * pthread_mutex_timedlock.c: Likewise.
5039         * pthread_mutex_trylock.c: Likewise.
5040         * pthread_mutex_unlock.c: Likewise for unlocking.
5041         * Makefile (tests): Add tst-robust8.
5042         * tst-robust8.c: New file.
5044 2006-03-08  Andreas Schwab  <schwab@suse.de>
5046         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
5047         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
5049 2006-03-05  Roland McGrath  <roland@redhat.com>
5051         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
5052         and $config_os doesn't match *linux*.
5054 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
5056         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
5057         Use __syscall_error.
5058         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
5059         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
5060         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
5061         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
5062         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
5063         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
5065 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
5067         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
5069 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
5071         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
5072         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
5073         mutex.
5074         (__lll_robust_timedlock_wait): Likewise.
5075         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
5076         (__lll_robust_lock_wait): Likewise.
5077         (__lll_robust_timedlock_wait): Likewise.
5078         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
5079         (__lll_robust_lock_wait): Likewise.
5080         (__lll_robust_timedlock_wait): Likewise.
5082 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
5084         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
5085         lll_robust_mutex_trylock, lll_robust_mutex_lock,
5086         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
5087         lll_robust_mutex_unlock): Define.
5088         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
5090 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
5092         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
5093         instead of <clone.S>.
5095 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
5097         * Makefile (libpthread-routines): Add
5098         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
5099         and pthread_mutex_[sg]etprioceiling.
5100         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
5101         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
5102         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
5103         pthread_mutex_setprioceiling.
5104         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
5105         PTHREAD_PRIO_PROTECT): New enum values.
5106         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
5107         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
5108         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
5109         prototypes.
5110         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
5111         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
5112         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
5113         Define.
5114         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
5115         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
5116         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
5117         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
5118         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
5119         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
5120         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
5121         protocol mutexes.
5122         * pthread_mutex_getprioceiling.c: New file.
5123         * pthread_mutex_setprioceiling.c: New file.
5124         * pthread_mutexattr_getprioceiling.c: New file.
5125         * pthread_mutexattr_setprioceiling.c: New file.
5126         * pthread_mutexattr_getprotocol.c: New file.
5127         * pthread_mutexattr_setprotocol.c: New file.
5129 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
5131         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
5133 2006-02-27  Roland McGrath  <roland@redhat.com>
5135         * sysdeps/pthread/Subdirs: List nptl here too.
5136         * configure (libc_add_on_canonical): New variable.
5138         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
5140         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
5141         self to get main source tree's file.
5142         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
5143         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
5144         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
5145         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
5146         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
5147         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
5148         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
5149         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
5150         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
5151         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
5152         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
5153         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
5154         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
5156         * Makefile: Use $(sysdirs) in vpath directive.
5158         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
5159         (CPPFLAGS-timer_routines.c): Likewise.
5161         * Makeconfig (includes): Variable removed.
5163 2006-02-26  Roland McGrath  <roland@redhat.com>
5165         * sysdeps/generic/pt-raise.c: Moved to ...
5166         * pt-raise.c: ... here.
5167         * sysdeps/generic/lowlevellock.h: Moved to ...
5168         * lowlevellock.h: ... here.
5170 2006-02-23  Roland McGrath  <roland@redhat.com>
5172         * descr.h (struct pthread): Add final member `end_padding'.
5173         (PTHREAD_STRUCT_END_PADDING): Use it.
5175 2006-02-20  Roland McGrath  <roland@redhat.com>
5177         * sysdeps/mips: Directory removed, saved in ports repository.
5178         * sysdeps/unix/sysv/linux/mips: Likewise.
5180 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
5182         * tst-robust1.c: Add second mutex to check that the mutex list is
5183         handled correctly.
5185 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
5187         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
5188         lll_robust_mutex_trylock, lll_robust_mutex_lock,
5189         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
5190         lll_robust_mutex_unlock): New macros.
5191         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
5192         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
5193         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5194         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5195         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
5197 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5199         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
5200         definitions.
5201         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
5203 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
5205         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
5206         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
5207         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
5208         (lll_robust_mutex_unlock): Likewise.
5210 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
5212         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
5213         Set robust_list.__next rather than robust_list.
5214         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
5215         (__pthread_list_t): New typedef.
5216         (pthread_mutex_t): Replace __next and __prev fields with __list.
5217         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
5218         (__pthread_list_t): New typedef.
5219         (pthread_mutex_t): Replace __next and __prev fields with __list.
5220         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5221         (__pthread_list_t, __pthread_slist_t): New typedefs.
5222         (pthread_mutex_t): Replace __next and __prev fields with __list.
5223         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
5224         (__pthread_list_t, __pthread_slist_t): New typedefs.
5225         (pthread_mutex_t): Replace __next and __prev fields with __list.
5226         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
5227         (__pthread_list_t, __pthread_slist_t): New typedefs.
5228         (pthread_mutex_t): Replace __next and __prev fields with __list.
5229         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
5230         (__pthread_slist_t): New typedef.
5231         (pthread_mutex_t): Replace __next field with __list.
5233 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
5235         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
5236         PTHREAD_MUTEX_OWNERDEAD.
5237         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
5238         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
5239         * Makefile (libpthread-routines): Add lowlevelrobustlock.
5240         * pthread_create.c (start_thread): Very much simplify robust_list loop.
5241         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
5242         to PTHREAD_MUTEX_INCONSISTENT.
5243         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
5244         * pthread_mutex_lock.c: Reimplement robust mutex handling.
5245         * pthread_mutex_trylock.c: Likewise.
5246         * pthread_mutex_timedlock.c: Likewise.
5247         * pthread_mutex_unlock.c: Likewise.
5248         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
5249         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
5250         lowlevelrobustlock.sym.
5251         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
5252         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
5253         definitions.
5254         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5255         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
5256         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
5257         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
5258         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
5260 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
5262         * allocatestack.c (allocate_stack): Initialize robust_list.
5263         * init.c (__pthread_initialize_minimal_internal): Likewise.
5264         * descr.h (struct xid_command): Pretty printing.
5265         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
5266         robust_list.  Adjust macros.
5267         * pthread_create.c (start_thread): Adjust robust_list handling.
5268         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
5269         but the owner for all robust mutex types.
5270         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
5271         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
5272         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5273         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
5275         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
5276         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
5278 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
5280         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
5281         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
5283 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5285         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
5286         Return status.
5287         (lll_futex_timed_wait): Define.
5289 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
5291         * tst-cancel4.c: Test ppoll.
5293 2006-01-18  Andreas Jaeger  <aj@suse.de>
5295         [BZ #2167]
5296         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
5297         (pthread_mutex_t): Follow changes for other archs.  Based on patch
5298         by Jim Gifford <patches@jg555.com>.
5300 2006-01-13  Richard Henderson  <rth@redhat.com>
5302         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
5304 2006-01-10  Roland McGrath  <roland@redhat.com>
5306         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
5307         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
5308         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
5309         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
5310         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
5311         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
5312         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
5313         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
5314         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
5315         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
5317 2006-01-09  Roland McGrath  <roland@redhat.com>
5319         * tst-initializers1-c89.c: New file.
5320         * tst-initializers1-c99.c: New file.
5321         * tst-initializers1-gnu89.c: New file.
5322         * tst-initializers1-gnu99.c: New file.
5323         * Makefile (tests): Add them.
5324         (CFLAGS-tst-initializers1-c89.c): New variable.
5325         (CFLAGS-tst-initializers1-c99.c): New variable.
5326         (CFLAGS-tst-initializers1-gnu89.c): New variable.
5327         (CFLAGS-tst-initializers1-gnu99.c): New variable.
5329         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
5330         Use __extension__ on anonymous union definition.
5331         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5332         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5333         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5334         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5335         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5337 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
5339         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
5340         Don't give the union a name because it changes the mangled name.
5341         Instead name the struct for __data.
5342         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
5343         Likewise.
5344         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
5345         Likewise.
5347 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
5349         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
5350         stack bias to mc_ftp field.
5352 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
5354         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
5355         being too clever and reloading the futex value where it shouldn't.
5357 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
5359         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
5360         correct type.
5362 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
5364         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
5365         Add cfi directives.
5367 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
5369         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
5370         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
5371         rename in tcbhead_t.
5373         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
5374         Don't give the union a name because it changes the mangled name.
5375         Instead name the struct for __data.
5376         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5377         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5378         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5379         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5380         * pthread_create.c (start_thread): Adjust robust mutex free loop.
5381         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
5383 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
5385         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5386         Return status.
5387         (lll_futex_timed_wait): Define.
5388         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5389         * sysdeps/pthread/aio_misc.h: New file.
5391 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
5393         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
5395 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
5397         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5398         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
5399         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
5401 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
5403         * tst-cancel24.cc: Use C headers instead of C++ headers.
5405 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
5407         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
5408         sparc-linux configured glibc.
5409         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
5410         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
5411         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
5412         atomic_compare_and_exchange_val_24_acq instead of
5413         atomic_compare_and_exchange_val_acq.
5414         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
5415         instead of atomic_exchange_rel.
5416         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
5417         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
5418         file.
5419         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
5420         file.
5421         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
5422         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
5423         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
5424         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
5425         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
5426         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
5427         New file.
5428         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
5429         New file.
5430         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
5431         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
5432         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
5433         file.
5434         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
5435         file.
5436         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
5438 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
5440         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
5441         mutex initializers.
5443 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
5445         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
5446         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5447         THREAD_COPY_POINTER_GUARD): Define.
5448         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
5449         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
5451 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
5453         * version.c: Update copyright year.
5455 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5457         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
5458         .eh_frame section, use cfi_* directives.
5459         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
5461 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
5463         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
5464         now.
5466 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
5468         * sysdeps/pthread/sigaction.c: Removed.
5469         * sigaction.c: New file.
5470         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
5472 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
5474         * Makefile (tests): Add tst-signal7.
5475         * tst-signal7.c: New file.
5477 2005-12-27  Roland McGrath  <roland@redhat.com>
5479         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
5480         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
5481         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
5482         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
5483         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
5484         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
5485         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
5486         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
5487         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
5488         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
5489         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
5491 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
5493         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
5494         and __prev field to pthread_mutex_t.
5495         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5496         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5497         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5498         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5499         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
5500         to pthread_mutex_t.
5502 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
5504         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
5505         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
5506         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
5507         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
5508         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
5509         and PTHREAD_MUTEXATTR_FLAG_BITS.
5510         * descr.h (struct pthread): Add robust_list field and define
5511         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
5512         * pthread_mutexattr_getrobust.c: New file.
5513         * pthread_mutexattr_setrobust.c: New file.
5514         * pthread_mutex_consistent.c: New file.
5515         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
5516         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
5517         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
5518         Adjust pthread_mutex_t initializers.
5519         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
5520         field to pthread_mutex_t.
5521         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
5522         and __prev field to pthread_mutex_t.
5523         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
5524         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
5525         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
5526         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
5527         * pthread_mutexattr_gettype.c: Likewise.
5528         * pthread_mutexattr_setpshared.c: Likewise.
5529         * pthread_mutexattr_settype.c: Likewise.
5530         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
5531         Initialize mutex kind according to robust flag.
5532         * pthread_mutex_lock.c: Implement local robust mutex.
5533         * pthread_mutex_timedlock.c: Likewise.
5534         * pthread_mutex_trylock.c: Likewise.
5535         * pthread_mutex_unlock.c: Likewise.
5536         * pthread_create.c (start_thread): Mark robust mutexes which remained
5537         locked as dead.
5538         * tst-robust1.c: New file.
5539         * tst-robust2.c: New file.
5540         * tst-robust3.c: New file.
5541         * tst-robust4.c: New file.
5542         * tst-robust5.c: New file.
5543         * tst-robust6.c: New file.
5544         * tst-robust7.c: New file.
5545         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
5546         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
5547         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
5548         tst-robust5, tst-robust6, and tst-robust7.
5550         * tst-typesizes.c: New file.
5551         * Makefile (tests): Add tst-typesizes.
5553         * tst-once3.c: More debug output.
5555 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
5557         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
5558         missing after last change.
5560         * version.c: Update copyright year.
5562 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
5564         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
5565         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
5566         * pthread_mutex_trylock.c: Likewise.
5567         * pthread_mutex_timedlock.c: Likewise.
5568         * pthread_mutex_unlock.c: Likewise.
5570 2005-12-22  Roland McGrath  <roland@redhat.com>
5572         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
5573         so that #include_next's search location is not reset to the -I..
5574         directory where <nptl/...> can be found.
5576 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
5578         [BZ #1913]
5579         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5580         Fix unwind info.  Remove useless branch prediction prefix.
5581         * tst-cancel24.cc: New file.
5582         * Makefile: Add rules to build and run tst-cancel24.
5584 2005-12-21  Roland McGrath  <roland@redhat.com>
5586         * libc-cancellation.c: Use <> rather than "" #includes.
5587         * pt-cleanup.c: Likewise.
5588         * pthread_create.c: Likewise.
5589         * pthread_join.c: Likewise.
5590         * pthread_timedjoin.c: Likewise.
5591         * pthread_tryjoin.c: Likewise.
5592         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
5593         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
5594         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
5595         * unwind.c: Likewise.
5597 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5599         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
5600         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
5601         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5602         THREAD_COPY_POINTER_GUARD): Define.
5604 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
5606         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
5607         rather than one.
5608         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5609         THREAD_COPY_POINTER_GUARD): Define.
5610         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
5611         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
5612         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5613         THREAD_COPY_POINTER_GUARD): Define.
5614         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
5615         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
5616         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
5617         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
5618         Use PTR_DEMANGLE for B0 if defined.
5620 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
5622         * pthread_create.c (__pthread_create_2_1): Use
5623         THREAD_COPY_POINTER_GUARD if available.
5624         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
5625         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
5626         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
5627         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
5628         * sysdeps/x86_64/tls.h: Likewise.
5630 2005-12-15  Roland McGrath  <roland@redhat.com>
5632         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
5634 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
5636         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
5637         sysdeps/generic.
5638         * errno-loc.c: New file.
5640 2005-12-12  Roland McGrath  <roland@redhat.com>
5642         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
5643         adjustments before choosing stack size.  Update minimum stack size
5644         calculation to match allocate_stack change.
5646 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
5648         * allocatestack.c (allocate_stack): Don't demand that there is an
5649         additional full page available on the stack beside guard, TLS, the
5650         minimum stack.
5652 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
5654         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5655         (__cleanup_fct_attribute): Use __regparm__ not regparm.
5657         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
5658         compiling 32-bit code we must define __cleanup_fct_attribute.
5660 005-11-24  Jakub Jelinek  <jakub@redhat.com>
5662         [BZ #1920]
5663         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
5664         __attribute__ instead of __attribute.
5665         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5666         (__cleanup_fct_attribute): Likewise.
5668 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
5670         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
5671         a write barrier before writing libgcc_s_getcfa.
5673 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
5675         * sysdeps/unix/sysv/linux/configure: Removed.
5677 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
5679         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
5680         optional init_array/fini_array support.
5682 2005-10-24  Roland McGrath  <roland@redhat.com>
5684         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
5685         versioned_symbol use.
5687 2005-10-16  Roland McGrath  <roland@redhat.com>
5689         * init.c (__pthread_initialize_minimal_internal): Even when using a
5690         compile-time default stack size, apply the minimum that allocate_stack
5691         will require, and round up to page size.
5693 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
5695         * Makefile ($(test-modules)): Remove static pattern rule.
5697 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
5698             Ulrich Drepper  <drepper@redhat.com>
5700         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
5701         alignment in callback function.
5702         * Makefile: Add rules to build and run tst-align3.
5703         * tst-align3.c: New file.
5705 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
5707         * allocatestack.c (setxid_signal_thread): Add
5708         INTERNAL_SYSCALL_DECL (err).
5710 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
5712         * allocatestack.c (setxid_signal_thread): Need to use
5713         atomic_compare_and_exchange_bool_acq.
5715 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
5716             Jakub Jelinek  <jakub@redhat.com>
5718         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
5719         CANCEL_RESTMASK.
5720         (struct pthread): Move specific_used field to avoid padding.
5721         Add setxid_futex field.
5722         * init.c (sighandler_setxid): Reset setxid flag and release the
5723         setxid futex.
5724         * allocatestack.c (setxid_signal_thread): New function.  Broken
5725         out of the bodies of the two loops in __nptl_setxid.  For undetached
5726         threads check whether they are exiting and if yes, don't send a signal.
5727         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
5728         * pthread_create.c (start_thread): For undetached threads, check
5729         whether setxid bit is set.  If yes, wait until signal has been
5730         processed.
5732         * allocatestack.c (STACK_VARIABLES): Initialize them.
5733         * pthread_create.c (__pthread_create_2_1): Initialize pd.
5735 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
5737         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
5738         waiters, awake all waiters on the associated mutex.
5740 2005-09-22  Roland McGrath  <roland@redhat.com>
5742         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
5743         ../sysdeps/x86_64/hp-timing.h).
5745 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
5747         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
5748         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5749         (lll_futex_wake_unlock): Define.
5750         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
5751         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5752         (lll_futex_wake_unlock): Define.
5753         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
5754         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5755         (lll_futex_wake_unlock): Define.
5756         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
5757         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5758         (lll_futex_wake_unlock): Define.
5759         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
5760         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5761         (lll_futex_wake_unlock): Define.
5762         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
5763         lll_futex_wake_unlock.
5764         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
5765         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5766         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5767         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
5768         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5769         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5771 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5773         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5774         Fix typo in register name.
5776 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
5778         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5779         Use __sigfillset.  Document that sigfillset does the right thing wrt
5780         to SIGSETXID.
5782 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
5784         [BZ #1102]
5785         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
5786         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
5787         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
5788         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
5789         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
5790         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
5791         in the structure.
5792         * Makefile (tests): Add tst-initializers1.
5793         (CFLAGS-tst-initializers1.c): Set.
5794         * tst-initializers1.c: New test.
5796 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
5798         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
5799         Make sure __flags are located at offset 48 from the start of the
5800         structure.
5802 2005-07-02  Roland McGrath  <roland@redhat.com>
5804         * Makeconfig: Comment fix.
5806 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
5808         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
5809         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
5810         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
5811         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
5812         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5813         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5814         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
5815         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
5816         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
5817         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5819 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
5821         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
5822         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5823         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
5824         fields.
5825         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5826         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
5827         field.  Put in sysinfo field unconditionally.
5828         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5829         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
5830         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5831         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
5832         fields.
5833         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5834         * pthread_create.c (__pthread_create_2_1): Use
5835         THREAD_COPY_STACK_GUARD macro.
5836         * Makefile: Add rules to build and run tst-stackguard1{,-static}
5837         tests.
5838         * tst-stackguard1.c: New file.
5839         * tst-stackguard1-static.c: New file.
5841 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
5843         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5844         Invoke CGOTSETUP and CGOTRESTORE.
5845         (CGOTSETUP, CGOTRESTORE): Define.
5847 2005-05-29  Richard Henderson  <rth@redhat.com>
5849         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
5850         (tf_write, tf_writev): Use it.
5851         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
5852         the system minimum.
5854 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
5856         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5857         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
5858         __librt_*_asynccancel@local.
5860 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
5862         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
5863         all occurrences of JUMPTARGET.  Instead append @local to labels.
5865 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
5867         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
5868         size/alignment of struct pthread rather than tcbhead_t.
5869         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5870         Likewise.
5871         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5872         Likewise.
5873         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5874         Likewise.
5876 2005-05-19  Richard Henderson  <rth@redhat.com>
5878         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
5879         __sync_val_compare_and_swap, not explicit _si variant.
5880         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
5882 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
5884         [BZ #915]
5885         * sysdeps/pthread/pthread.h: Avoid empty initializers.
5887 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
5889         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
5890         .eh_frame section, use cfi_* directives.
5892 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
5894         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
5895         of "" includes.
5897 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
5899         [BZ #1075]
5900         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
5901         aio_write blocks.
5903 2005-04-27  Roland McGrath  <roland@redhat.com>
5905         * Makefile (tests): Remove tst-clock2.
5907         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
5908         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
5909         translating to the kernel clockid_t for our own process/thread clock.
5911         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
5913 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
5915         * old_pthread_cond_init.c: Include <errno.h>.
5916         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
5917         process shared or uses clock other than CLOCK_REALTIME.
5918         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
5920 2005-04-13  David S. Miller  <davem@davemloft.net>
5922         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
5923         * sysdeps/sparc/sparc64/clone.S: New file.
5925 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
5927         [BZ #1102]
5928         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
5929         __inline instead of inline.
5930         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
5932 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
5934         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
5935         functionally equivalent, but shorter instructions.
5936         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5937         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5938         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5939         Likewise.
5940         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
5941         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5942         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5943         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5944         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5945         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
5946         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5947         Likewise.
5948         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5949         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5950         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5951         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
5952         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
5954 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
5956         * sysdeps/mips/Makefile: New file.
5957         * sysdeps/mips/nptl-sysdep.S: New file.
5958         * sysdeps/mips/tcb-offsets.sym: New file.
5959         * sysdeps/mips/pthread_spin_lock.S: New file.
5960         * sysdeps/mips/pthread_spin_trylock.S: New file.
5961         * sysdeps/mips/pthreaddef.h: New file.
5962         * sysdeps/mips/tls.h: New file.
5963         * sysdeps/mips/jmpbuf-unwind.h: New file.
5964         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
5965         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
5966         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
5967         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
5968         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
5969         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
5970         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
5971         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
5972         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
5973         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
5975 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
5977         [BZ #1112]
5978         * pthread_create.c (__pthread_create_2_1): Rename syscall error
5979         variable to scerr.
5981 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
5983         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
5985 2005-02-25  Roland McGrath  <roland@redhat.com>
5987         * alloca_cutoff.c: Correct license text.
5988         * tst-unload.c: Likewise.
5989         * sysdeps/pthread/allocalim.h: Likewise.
5990         * sysdeps/pthread/pt-initfini.c: Likewise.
5991         * sysdeps/pthread/bits/libc-lock.h: Likewise.
5992         * sysdeps/pthread/bits/sigthread.h: Likewise.
5993         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
5994         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
5996 2005-02-16  Roland McGrath  <roland@redhat.com>
5998         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
5999         Use unsigned int * for ptr_nthreads.
6001 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
6003         [BZ #721]
6004         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
6005         gcc4.
6007 2005-02-07  Richard Henderson  <rth@redhat.com>
6009         [BZ #787]
6010         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
6011         argument.
6013 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
6015         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
6016         order of arguments in invocation of atomic_add_zero.
6018 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
6020         [BZ #737]
6021         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
6022         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
6023         at least gotntpoff relocation and addition.
6024         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
6025         Likewise.
6026         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
6027         Likewise.
6028         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
6029         Likewise.
6031 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
6033         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
6034         entry for static tls deallocation fix.
6035         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
6036         also contains information whether the memory pointed to is static
6037         TLS or not.
6038         * sysdeps/i386/tls.h: Likewise.
6039         * sysdeps/ia64/tls.h: Likewise.
6040         * sysdeps/powerpc/tls.h: Likewise.
6041         * sysdeps/s390/tls.h: Likewise.
6042         * sysdeps/sh/tls.h: Likewise.
6043         * sysdeps/sparc/tls.h: Likewise.
6044         * sysdeps/x86_64/tls.h: Likewise.
6046 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
6048         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
6050 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
6052         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
6053         %esp.
6054         * Makefile (tests): Add tst-align2.
6055         * tst-align2.c: New test.
6056         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
6057         -mpreferred-stack-boundary=4.
6059 2004-12-18  Roland McGrath  <roland@redhat.com>
6061         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
6062         New file removed withdrawn for the moment.
6064 2004-12-17  Richard Henderson  <rth@redhat.com>
6066         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
6067         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
6069 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
6071         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
6072         Increased PTHREAD_STACK_MIN.
6074         * tst-context1.c (stacks): Use bigger stack size.
6076 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
6078         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
6079         * sysdeps/sparc/tcb-offsets.sym: Add TID.
6081 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
6083         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
6084         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
6085         * sysdeps/s390/tcb-offsets.sym (TID): Add.
6087 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
6089         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
6091 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
6093         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
6094         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
6096         * tst-getpid1.c: If child crashes, report this first.  Print which
6097         signal.
6099 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
6101         * init.c (__pthread_initialize_minimal_internal): Also unblock
6102         SIGSETXID.
6104 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
6106         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
6107         _POSIX_THREAD_CPUTIME): Define to 0.
6108         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
6109         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
6110         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
6111         __timer_signal_thread_tclk): Remove.
6112         (init_module): Remove their initialization.
6113         (thread_cleanup): Remove their cleanup assertions.
6114         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
6115         __timer_signal_thread_tclk): Remove.
6116         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
6117         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
6118         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
6120 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
6122         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
6123         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
6125         * Makefile (tests): Add tst-getpid2.
6126         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
6127         (do_test): Use it.  Use __clone2 instead of clone on ia64.
6128         * tst-getpid2.c: New test.
6130 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6132         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
6134 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
6136         * Makefile (tests): Add tst-getpid1.
6137         * tst-getpid1.c: New file.
6138         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
6139         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
6141 2004-12-02  Roland McGrath  <roland@redhat.com>
6143         * Makefile (libpthread-nonshared): Variable removed.
6144         ($(objpfx)libpthread_nonshared.a): Target removed.
6145         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
6146         These are now handled by generic magic from
6147         libpthread-static-only-routines being set.
6149 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
6151         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
6152         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
6153         _POSIX_THREAD_PRIO_PROTECT): Define.
6154         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6155         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
6156         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
6158 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
6160         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
6161         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
6162         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
6163         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
6164         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6165         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
6166         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
6168 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
6170         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
6172         * Makefile (libpthread-routines): Add pthread_setschedprio.
6173         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
6174         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
6175         * pthread_setschedprio.c: New file.
6177 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
6179         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
6180         * pthread_cancel.c (pthread_create): Likewise.
6182         * Makefile (libpthread-routines): Add vars.
6183         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
6184         * init.c (__default_stacksize, __is_smp): Remove.
6185         * vars.c: New file.
6186         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
6187         and define a wrapper macro.
6188         (PTHREAD_STATIC_FN_REQUIRE): Define.
6189         * allocatestack.c (__find_thread_by_id): Undefine.
6190         * pthread_create (__pthread_keys): Remove.
6191         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
6192         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
6193         PTHREAD_STATIC_FN_REQUIRE.
6195 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6197         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
6198         parameter to REGISTER macro.
6200 2004-11-17  Roland McGrath  <roland@redhat.com>
6202         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
6203         Make sure SIGCANCEL is blocked as well.
6205 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
6207         * sysdeps/pthread/setxid.h: New file.
6208         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
6209         (struct xid_command): Add forward decl.
6210         (struct pthread_functions): Change return type of __nptl_setxid hook
6211         to int.
6212         * pthreadP.h (__nptl_setxid): Change return type to int.
6213         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
6214         calling thread, return its return value and set errno on failure.
6215         * descr.h (struct xid_command): Change id type to long array.
6217         * Makefile: Add rules to build and test tst-setuid1 and
6218         tst-setuid1-static.
6219         * tst-setuid1.c: New test.
6220         * tst-setuid1-static.c: New test.
6222 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
6224         * Makefile (tests): Add tst-exit3.
6225         * tst-exit3.c: New test.
6227 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
6229         * Makefile (tests): Add tst-exit2.
6230         * tst-exit2.c: New file.
6232 2004-11-09  Roland McGrath  <roland@redhat.com>
6234         [BZ #530]
6235         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
6236         here, before calling clone.
6237         * pthread_create.c (start_thread): Don't do it here.
6239 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
6241         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
6243 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
6245         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
6246         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
6247         assembler warning.
6249 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
6251         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
6252         if sched_priority is not between minprio and maxprio.
6254 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6256         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6257         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
6259         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
6260         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
6262 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
6264         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
6265         not-cancelable I/O functions.
6267 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6269         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
6270         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
6271         make sure 2 is stored in the futex and we looked at the old value.
6272         Fix a few other problems to return the correct value.
6274 2004-10-14  Richard Henderson  <rth@redhat.com>
6276         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
6277         make gcc4 happy.
6279 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
6281         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
6282         of pthread-functions.h and pthreaddef.h.
6283         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
6285         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6286         Change __data.__nwaiters from int to unsigned int.
6288         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
6289         sysconf (_SC_THREAD_CPUTIME) returns negative value.
6291         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
6292         before return type.
6294         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
6295         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
6297 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
6299         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
6300         test fails, remove message queue.
6301         (tf_msgsnd): Likewise.
6303 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
6305         * tst-clock1.c: Change #ifdef to #if defined.
6306         * tst-clock2.c: Likewise.
6307         * tst-cond11.c: Likewise.
6309         * sysdeps/pthread/timer_create.c (timer_create): Use
6310         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
6311         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
6312         THREAD_CPUTIME.
6314 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
6316         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
6317         _POSIX_THREAD_CPUTIME): Define to 0.
6319 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
6321         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
6322         and _POSIX_THREAD_CPUTIME to zero.
6323         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
6324         * tst-barrier2.c: Fix testing for POSIX feature.
6325         * tst-clock1.c: Likewise.
6326         * tst-clock2.c: Likewise.
6327         * tst-cond11.c: Likewise.
6328         * tst-cond4.c: Likewise.
6329         * tst-cond6.c: Likewise.
6330         * tst-flock2.c: Likewise.
6331         * tst-mutex4.c: Likewise.
6332         * tst-mutex9.c: Likewise.
6333         * tst-rwlock12.c: Likewise.
6334         * tst-rwlock4.c: Likewise.
6335         * tst-signal1.c: Likewise.
6336         * tst-spin2.c: Likewise.
6337         * sysdeps/pthread/posix-timer.h: Likewise.
6338         * sysdeps/pthread/timer_create.c: Likewise.
6339         * sysdeps/pthread/timer_routines.c: Likewise.
6341 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
6343         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6344         (__lll_mutex_timedlock_wait): Address futex correctly.
6346         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6347         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
6348         make sure 2 is stored in the futex and we looked at the old value.
6349         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6350         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
6351         which might very well made the code not working at all before.
6352         [BZ #417]
6354 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
6356         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
6357         allow SIGSETXID to be sent.
6358         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
6359         for SIGSETXID to be defined.
6360         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
6361         SIGSETXID cannot be blocked.
6363         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6364         Add __extension__ to long long types.
6365         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6366         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6367         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6368         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6369         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
6370         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6371         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6373 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
6375         * descr.h (struct pthread): Add stopped_start field.
6376         * sysdeps/pthread/createthread.c (create_thread): Set
6377         start_stopped flag in descriptor for new thread appropriately.
6378         * pthread_create.c (start_thread): Only take lock to be stopped on
6379         startup if stopped_start flag says so.
6381 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
6383         * pthread_create.c (__pthread_create_2_1): Remember whether thread
6384         is created detached and if yes, do not try to free the stack in case
6385         the thread creation failed.
6386         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
6387         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
6388         case there has been no error.  [BZ #405]
6390         * pthread_create.c (start_thread): Don't wait for scheduler data
6391         etc to be set at the beginning of the function.  The cancellation
6392         infrastructure must have been set up.  And enable async
6393         cancellation before potentially going to sleep.  [BZ #401]
6395 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
6397         * Versions: Remove exports for pthread_set*id_np functions.
6398         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
6399         for now.
6400         * Makefile: Don't build pthread_set*id code for now.
6402 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
6404         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
6405         internal use.
6406         * allocatestack.c (__nptl_setxid): New function.
6407         * descr.h (struct xid_command): Define type.
6408         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
6409         (sighandler_setxid): New function.
6410         (__pthread_initialize_minimal): Register sighandler_setxid for
6411         SIGCANCEL.
6412         * pt-allocrtsig.c: Update comment.
6413         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
6414         Declare __nptl_setxid.
6415         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
6416         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
6417         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
6418         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
6419         and pthread_setresuid_np.
6420         * pthread_setgid_np.c: New file.
6421         * pthread_setuid_np.c: New file.
6422         * pthread_setegid_np.c: New file.
6423         * pthread_seteuid_np.c: New file.
6424         * pthread_setregid_np.c: New file.
6425         * pthread_setreuid_np.c: New file.
6426         * pthread_setresgid_np.c: New file.
6427         * pthread_setresuid_np.c: New file.
6428         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
6429         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
6430         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
6431         and pthread_setresuid_np.
6432         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
6433         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
6434         pthread_setregid, and pthread_setresgid.
6436 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
6438         * allocatestack.c (allocate_stack): Return EAGAIN instead of
6439         ENOMEM when out of memory.
6441 2004-09-10  Roland McGrath  <roland@redhat.com>
6443         [BZ #379]
6444         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
6445         code, since we don't try to use the broken CLONE_STOPPED any more.
6446         * pthread_create.c (start_thread): Likewise.
6448 2004-09-15  Richard Henderson  <rth@redhat.com>
6450         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
6452 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
6454         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
6455         (__libc_unwind_longjmp): Delete macro and declare as function.
6456         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
6457         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
6458         nptl directory.
6459         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
6460         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
6461         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
6463 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
6465         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
6466         for __USE_XOPEN2K.
6467         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
6468         types also for __USE_XOPEN2K.
6469         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6470         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6471         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6472         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6473         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6474         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6475         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6476         [BZ #320]
6478 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
6480         * sysdeps/pthread/pthread.h
6481         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
6482         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
6483         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
6484         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
6485         [BZ #375]
6487 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
6489         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
6490         PSEUDO to be used with . prefix.
6492         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
6493         Use atomic_increment instead of atomic_exchange_and_add.
6494         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
6495         Likewise.
6496         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
6497         Likewise.
6498         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
6499         Likewise.
6501         * allocatestack.c (allocate_stack): Use atomic_increment_val
6502         instead of atomic_exchange_and_add.
6503         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
6504         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
6505         Likewise.
6506         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6507         Likewise.
6509         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
6510         the initialization function might throw.
6512 2005-09-05  Richard Henderson  <rth@redhat.com>
6514         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
6515         Move definition inside libpthread, libc, librt check.  Provide
6516         definition for rtld.
6518 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
6520         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
6521         * sysdeps/i386/jmpbuf-unwind.h: Likewise
6522         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
6523         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
6524         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
6525         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
6526         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
6527         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
6528         * unwind.c: Use it.
6530         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6531         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
6532         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6533         Likewise.
6534         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
6535         Decrement __nwaiters.  If pthread_cond_destroy has been called and
6536         this is the last waiter, signal pthread_cond_destroy caller and
6537         avoid using the pthread_cond_t structure after unlock.
6538         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6539         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6540         Read clock type from the least significant bits of __nwaiters instead
6541         of __clock.
6542         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6543         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
6545 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
6547         [BZ #342]
6548         * Makefile (tests): Add tst-cond20 and tst-cond21.
6549         * tst-cond20.c: New test.
6550         * tst-cond21.c: New test.
6551         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
6552         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
6553         it unsigned int.
6554         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6555         Likewise.
6556         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6557         (pthread_cond_t): Likewise.
6558         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6559         Likewise.
6560         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6561         Likewise.
6562         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6563         Likewise.
6564         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
6565         (cond_nwaiters): New.
6566         (clock_bits): New.
6567         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
6568         if there are waiters not signalled yet.
6569         Wait until all already signalled waiters wake up.
6570         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
6571         __nwaiters.  If pthread_cond_destroy has been called and this is the
6572         last waiter, signal pthread_cond_destroy caller and avoid using
6573         the pthread_cond_t structure after unlock.
6574         (__pthread_cond_wait): Increment __nwaiters in the beginning,
6575         decrement it when leaving.  If pthread_cond_destroy has been called
6576         and this is the last waiter, signal pthread_cond_destroy caller.
6577         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6578         Likewise.  Read clock type from the least significant bits of
6579         __nwaiters instead of __clock.
6580         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
6581         whether clock ID can be encoded in COND_CLOCK_BITS bits.
6582         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
6583         clock type just from the last COND_CLOCK_BITS bits of value.
6584         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
6585         instead of __clock, just from second bit of condattr's value.
6587 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
6589         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
6590         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
6591         != 64.
6592         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6594 2004-08-15  Roland McGrath  <roland@frob.com>
6596         * pthread_atfork.c: Update copyright terms including special exception
6597         for these trivial files, which are statically linked into executables
6598         that use dynamic linking for the significant library code.
6600 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
6602         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
6603         pthread_rwlock_rdlock.
6604         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
6605         Decrease __nr_readers_queued after reacquiring lock.
6606         * sysdeps/pthread/pthread_rwlock_timedrdlock
6607         (pthread_rwlock_timedrdlock): Likewise.
6608         Reported by Bob Cook <bobcook47@hotmail.com>.
6610 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
6612         * tst-rwlock14.c (tf): Read main thread handle from *ARG
6613         before pthread_barrier_wait.
6615 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
6617         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
6618         Remove unnecessary exception handling data.
6620 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
6622         [BZ #284]
6623         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
6624         instead of clockid_t.
6626 2004-07-21  Roland McGrath  <roland@redhat.com>
6628         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
6630 2004-07-19  Roland McGrath  <roland@redhat.com>
6632         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
6634 2004-07-02  Roland McGrath  <roland@redhat.com>
6636         * configure: Don't exit.
6638 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6640         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6641         (__pthread_cond_timedwait): Check for invalid nanosecond in
6642         timeout value.
6644 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
6646         * Makefile: Add rules to build and run tst-fini1.
6647         * tst-fini1.c: New file.
6648         * tst-fini1mod.c: New file.
6650 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
6652         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
6653         if no cancellation support is needed.
6654         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6655         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6656         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6657         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6658         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6659         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6660         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6661         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
6662         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
6664         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
6665         only if not already defined.
6667 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
6669         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
6670         constraint "m" instead of "0" for futex.
6672         * shlib-versions: Add powerpc64-.*-linux.*.
6674 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
6676         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
6677         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
6678         for valid tv_nsec.
6679         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
6680         1 billion and 64-bit tv_nsec which is valid when truncated to 32
6681         bits.
6683 2004-06-29  Roland McGrath  <roland@redhat.com>
6685         * Banner: NPTL no longer has its own version number.
6686         * Makefile (nptl-version): Variable removed.
6687         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
6688         using $(version), the glibc version number.
6690 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6692         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6693         Fix branch offset for a PLT entry.
6694         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
6695         Likewise.
6696         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
6697         Likewise.
6698         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
6699         Likewise.
6700         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
6701         Likewise.
6703 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
6705         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
6706         unconditionally.
6708 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
6710         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
6711         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
6712         instead of tv_sec.
6713         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
6714         (pthread_rwlock_timedrdlock): Likewise.
6716 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
6718         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6719         Set __r7 to val, not mutex.
6721 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
6723         * Makefile: Add rules to build tst-rwlock14.
6724         * tst-rwlock14.c: New file.
6726 2004-06-24  Boris Hu  <boris.hu@intel.com>
6728         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
6729         check.
6730         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6732 2004-06-19  Andreas Jaeger  <aj@suse.de>
6734         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
6735         assembler in last patch.
6737 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
6739         * sysdeps/pthread/pthread_cond_timedwait.c
6740         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
6741         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6742         (__pthread_cond_timedwait): Check for invalid nanosecond in
6743         timeout value.
6744         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6745         * tst-cond19.c: New file.
6746         * Makefile: Add rules to build and run tst-cond19.
6748 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
6750         * tst-context1.c (GUARD_PATTERN): Defined.
6751         (tst_context_t): Define struct containing ucontext_t & guard words.
6752         (ctx): Declare as an array of tst_context_t.
6753         (fct): Verify uc_link & guard words are still valid.
6754         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
6756 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6758         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6759         Add __data.__futex field, reshuffle __data.__clock.
6760         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
6761         (__pthread_cond_signal): Increment __futex at the same time as
6762         __wakeup_seq or __total_seq.  Pass address of __futex instead of
6763         address of low 32-bits of __wakeup_seq to futex syscall.
6764         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6765         (__pthread_cond_wait): Likewise.  Pass __futex value from before
6766         releasing internal lock to FUTEX_WAIT.
6767         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6768         (__pthread_cond_timedwait): Likewise.
6769         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6770         (FUTEX_CMP_REQUEUE): Define.
6771         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6772         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6773         Pass __futex value from before the unlock and __futex address instead
6774         of address of low 32-bits of __wakeup_seq to futex syscall.
6775         Fallback to FUTEX_WAKE all on any errors.
6777 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
6779         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
6780         comment typo.
6781         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
6782         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
6783         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
6784         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
6785         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
6787 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
6789         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
6790         Add memory clobber to inline assembly.
6791         (__lll_mutex_trylock): Likewise.
6792         (__lll_mutex_cond_trylock): Likewise.
6794 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
6796         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6797         Pass val argument as 6th system call argument in %r7.
6799 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
6801         * Makefile (tests): Add tst-cond16.
6802         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
6803         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
6804         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6805         Add __data.__futex field, reshuffle __data.__clock.
6806         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
6807         (__pthread_cond_signal): Increment __futex at the same time as
6808         __wakeup_seq or __total_seq.  Pass address of __futex instead of
6809         address of low 32-bits of __wakeup_seq to futex syscall.
6810         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
6811         (__pthread_cond_wait): Likewise.  Pass __futex value from before
6812         releasing internal lock to FUTEX_WAIT.
6813         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
6814         (__pthread_cond_timedwait): Likewise.
6815         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
6816         (FUTEX_CMP_REQUEUE): Define.
6817         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6818         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6819         Pass __futex value from before the unlock and __futex address instead
6820         of address of low 32-bits of __wakeup_seq to futex syscall.
6821         Fallback to FUTEX_WAKE all on any errors.
6822         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
6823         Define.
6824         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6825         internally.  Return non-zero if error, zero if success.
6826         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6827         Add __data.__futex field, reshuffle __data.__clock.
6828         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
6829         Define.
6830         (lll_futex_requeue): Add val argument, return 1 unconditionally
6831         for the time being.
6832         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6833         Add __data.__futex field, reshuffle __data.__clock.
6834         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6835         Define.
6836         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6837         internally.  Return non-zero if error, zero if success.
6838         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6839         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
6840         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6841         Define.
6842         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6843         internally.  Return non-zero if error, zero if success.
6844         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6845         Add __data.__futex field, reshuffle __data.__clock.
6846         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
6847         Define.
6848         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6849         internally.  Return non-zero if error, zero if success.
6850         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6851         Add __data.__futex field, reshuffle __data.__clock.
6852         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6853         Add __data.__futex field, reshuffle __data.__clock.
6854         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
6855         Increment __futex at the same time as __wakeup_seq or __total_seq.
6856         Pass address of __futex instead of address of low 32-bits of
6857         __wakeup_seq to futex syscall.
6858         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6859         Pass __futex value from before releasing internal lock
6860         to FUTEX_WAIT.
6861         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6862         Likewise.  Avoid unnecessary shadowing of variables.
6863         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
6864         Set __futex to 2 * __total_seq.  Pass __futex value from before the
6865         unlock and __futex address instead of address of low 32-bits of
6866         __wakeup_seq to futex_requeue macro, adjust for new return value
6867         meaning.
6868         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
6869         (__pthread_cond_signal): Increment __futex at the same time as
6870         __wakeup_seq or __total_seq.  Pass address of __futex instead of
6871         address of low 32-bits of __wakeup_seq to futex syscall.
6872         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
6873         (__pthread_cond_wait): Likewise.  Pass __futex value from before
6874         releasing internal lock to FUTEX_WAIT.
6875         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6876         (__pthread_cond_timedwait): Likewise.
6877         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6878         (FUTEX_CMP_REQUEUE): Define.
6879         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6880         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6881         Pass __futex value from before the unlock and __futex address instead
6882         of address of low 32-bits of __wakeup_seq to futex syscall.
6883         Fallback to FUTEX_WAKE all on any errors.
6885 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6887         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
6888         Add nop to align the end of critical section.
6889         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
6891 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6893         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6894         Add __broadcast_seq field.
6895         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
6896         all waiters as woken with woken_seq and bump broadcast counter.
6897         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
6898         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
6899         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6900         Comment typo fixes.  Avoid returning -ETIMEDOUT.
6902 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
6904         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6905         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
6906         Reported by Kaz Kojima.
6908 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
6910         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
6912 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
6914         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
6915         __broadcast_seq with bc_seq after acquiring internal lock instead of
6916         before it.
6918 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
6920         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
6921         compilation.
6922         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6923         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
6924         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6925         (pthread_cond_t): Add __data.__broadcast_seq field.
6926         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6927         (FRAME_SIZE): Define.
6928         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
6929         Comment typo fixes.
6930         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
6931         Define.
6932         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
6933         typo fixes.
6934         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6935         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
6936         fixes.
6938 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
6940         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
6941         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6942         Add __broadcast_seq field.
6943         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6944         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6945         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6946         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6947         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6948         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
6949         all waiters as woken with woken_seq and bump broadcast counter.
6950         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
6951         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
6952         __broadcast_seq field.
6953         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6954         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6955         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
6956         * pthread_cond_init.c: Initialize __broadcast_seq field.
6957         * Makefile (tests): Add tst-cond17 and tst-cond18.
6958         Add .NOTPARALLEL goal.
6959         * tst-cond16.c: New file.  From Jakub.
6960         * tst-cond17.c: New file.  From Jakub.
6961         * tst-cond18.c: New file.  From Jakub.
6963 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
6965         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
6966         unwind info.
6968         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
6969         Parametrize frame size.  Correct some unwind info.
6970         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6972 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
6974         * tst-stack3.c: Note testing functionality beyond POSIX.
6976 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
6978         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
6979         Change conditional from ifdef to if.
6981 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
6983         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
6984         SYSDEP_CANCEL_ERROR): Define.
6985         (PSEUDO): Use it.
6987 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
6989         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
6991 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
6993         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
6995 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6997         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
6998         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6999         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
7000         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
7002 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
7004         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
7005         thread has all signals blocked.
7007 2004-04-18  Andreas Jaeger  <aj@suse.de>
7009         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
7010         (SEM_VALUE_MAX): Add missing brace.
7012 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
7014         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
7015         in rt subdir.
7016         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
7017         * sysdeps/pthread/tst-mqueue8x.c: New test.
7018         * tst-cancel4.c: Update comment about message queues.
7020         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
7021         return it_value { 0, 0 }.
7022         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
7023         like SIGEV_SIGNAL.
7024         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
7025         assertion for SIGEV_NONE.
7026         (thread_attr_compare): Compare all attributes, not just a partial
7027         subset.
7029 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
7031         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
7033 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
7035         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
7036         Just use a plain number.
7037         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
7038         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
7039         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
7040         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
7041         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
7042         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
7043         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
7045 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7047         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
7048         frame info.
7049         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7051 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
7053         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
7054         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
7055         of calling sigwaitinfo.
7057 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
7059         * allocatestack.c (allocate_stack): Set reported_guardsize
7060         unconditionally.
7061         * pthread_getattr_np.c (pthread_getattr_np): Use
7062         reported_guardsize instead of guardsize.
7063         * descr.h (struct pthread): Add reported_guardsize field.
7065 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
7067         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
7069 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
7071         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
7073 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
7075         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
7076         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
7077         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
7078         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
7079         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
7080         Define.
7081         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
7082         (_POSIX_MESSAGE_PASSING): Define.
7083         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
7084         (_POSIX_MESSAGE_PASSING): Define.
7085         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
7086         (_POSIX_MESSAGE_PASSING): Define.
7088 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
7090         * tst-context1.c (fct): Check whether correct stack is used.
7092 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
7094         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
7095         matching constraints for asm mem parameters.
7097         * tst-clock2.c (tf): Don't define unless needed.
7099 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
7101         * Makefile (link-libc-static): Use $(static-gnulib) instead of
7102         $(gnulib).
7104 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
7106         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
7107         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
7108         * pthreadP.h: Declare __nptl_deallocate_tsd.
7109         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
7110         Adjust caller.
7112         * Makefile (tests): Add tst-tsd5.
7113         * tst-tsd5.c: New file.
7115 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
7117         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
7118         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
7119         is SHLIB_COMPAT check.
7120         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
7121         (__pthread_attr_getaffinity_old): Likewise.
7122         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7123         (__pthread_getaffinity_old): Likewise.
7124         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
7125         (__pthread_setaffinity_old): Likewise.
7127 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
7129         * allocatestack.c (_make_stacks_executable): Call
7130         _dl_make_stack_executable first.
7132 2004-03-24  Roland McGrath  <roland@redhat.com>
7134         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
7135         constraint instead of "0".
7137 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
7139         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7140         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
7142         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
7143         code to avoid warning.
7145 2004-03-24  Andreas Jaeger  <aj@suse.de>
7147         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
7148         (__pthread_attr_setaffinity_old): Remove const.
7150 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
7152         * sysdeps/unix/sysv/linux/smp.h: New file.
7153         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
7154         * init.c: Define __is_smp.
7155         (__pthread_initialize_minimal_internal): Call is_smp_system to
7156         initialize __is_smp.
7157         * pthreadP.h: Declare __is_smp.
7158         Define MAX_ADAPTIVE_COUNT is necessary.
7159         * pthread_mutex_init.c: Add comment regarding __spins field.
7160         * pthread_mutex_lock.c: Implement adaptive mutex type.
7161         * pthread_mutex_timedlock.c: Likewise.
7162         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
7163         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
7164         Add __spins field.
7165         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7166         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7167         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7168         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7169         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7170         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7171         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7172         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
7173         lll_mutex_cond_trylock.
7174         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7175         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7176         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7177         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7178         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7179         Define BUSY_WAIT_NOP.
7180         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7181         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7183         * tst-mutex5.c: Add support for testing adaptive mutexes.
7184         * tst-mutex7.c: Likewise.
7185         * tst-mutex5a.c: New file.
7186         * tst-mutex7a.c: New file.
7187         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
7189         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
7190         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
7191         vgettimeofday call might destroy the content.
7193         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
7194         @pause in the loop.
7196         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
7197         No need to restrict type of ret.  Make it int.  Add comment.
7199         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
7200         Remove unnecessary setne instruction.
7202 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
7204         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7205         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
7206         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
7207         If realloc fails, break out of the loop.
7209 2004-03-20  Andreas Jaeger  <aj@suse.de>
7211         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
7212         (__pthread_setaffinity_old): Fix interface.
7213         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7214         (__pthread_getaffinity_old): Likewise.
7216         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
7217         (__pthread_setaffinity_new): Remove duplicate declaration.
7219 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7221         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
7222         the return value to a safe register.
7223         (CDISABLE): Set the function argument correctly.
7225 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7227         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
7228         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
7229         Rewrite so that only one locked memory operation per round is needed.
7230         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
7231         (pthread_barrier_wait): After wakeup, release lock only when the
7232         last thread stopped using the barrier object.
7233         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
7234         (__pthread_cond_wait): Don't store mutex address if the current
7235         value is ~0l.  Add correct cleanup support and unwind info.
7236         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7237         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
7238         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
7239         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
7240         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
7241         Add correct cleanup support and unwind info.
7242         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
7243         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
7244         information for syscall wrappers.
7246 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
7248         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
7249         cpusetsize field, remove next.
7250         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
7251         parameter for size of the CPU set.
7252         (pthread_setaffinity_np): Likewise.
7253         (pthread_attr_getaffinity_np): Likewise.
7254         (pthread_attr_setaffinity_np): Likewise.
7255         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
7256         interface change, keep compatibility code.
7257         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
7258         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
7259         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
7260         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
7261         __pthread_getaffinity_np.
7262         * Versions: Add version for changed interfaces.
7263         * tst-attr3.c: Adjust test for interface change.
7264         * pthread_getattr_np.c: Query the kernel about the affinity mask with
7265         increasing buffer sizes.
7266         * pthread_attr_destroy.c: Remove unused list handling.
7267         * pthread_attr_init.c: Likewise.
7269 2004-03-17  Roland McGrath  <roland@redhat.com>
7271         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
7272         first argument to clock_getres so we ever enable kernel timers.
7274 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
7276         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
7278 2004-03-12  Richard Henderson  <rth@redhat.com>
7280         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
7281         oldvalue from CENABLE to CDISABLE.
7283 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
7285         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
7286         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
7287         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
7288         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
7290 2004-03-11  Richard Henderson  <rth@redhat.com>
7292         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
7293         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
7294         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
7296 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
7298         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
7299         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
7300         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
7302 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
7304         * forward.c (__pthread_cond_broadcast_2_0,
7305         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
7306         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
7307         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
7309 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7311         * sysdeps/sh/tcb-offsets.sym: Add PID.
7312         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
7313         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
7315 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
7317         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
7318         include <sysdep-cancel.h>, vfork is no cancellation point.
7319         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
7320         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
7321         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
7323 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
7325         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
7326         libc_hidden_def.
7327         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
7328         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
7329         Likewise.
7330         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
7331         Likewise.
7332         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
7333         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
7334         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
7335         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
7336         of DO_CALL_VIA_BREAK.  Work around a gas problem.
7338         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
7339         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
7340         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
7341         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
7342         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
7343         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
7345         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
7346         a local register for saving old PID.  Negate PID in parent upon exit.
7348         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
7349         tcb-offsets.h.
7350         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
7351         before syscall, set to the old value in the parent afterwards.
7352         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
7353         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
7354         tcb-offsets.h.
7355         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
7356         before syscall, set to the old value in the parent afterwards.
7357         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
7358         * sysdeps/s390/tcb-offsets.sym: Add PID.
7360         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
7361         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
7362         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
7363         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
7364         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
7365         * sysdeps/sparc/tcb-offsets.sym: Add PID.
7367 2004-03-10  Andreas Schwab  <schwab@suse.de>
7369         * sysdeps/ia64/tcb-offsets.sym: Add PID.
7370         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
7371         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
7373 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
7375         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
7376         * tst-cancel21.c (do_one_test): Likewise.
7377         Reported by Gordon Jin <gordon.jin@intel.com>.
7379 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
7381         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
7382         if non-zero and set to INT_MIN if zero.
7383         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
7384         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
7385         (SAVE_PID, RESTORE_PID): Define.
7386         (__vfork): Use it.
7387         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
7388         Use relative path to avoid including NPTL i386/vfork.S.
7389         (SAVE_PID, RESTORE_PID): Define.
7390         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
7391         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
7392         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
7393         tst-vfork2x.
7394         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
7395         * tst-vfork1.c: New test.
7396         * tst-vfork2.c: New test.
7397         * tst-vfork1x.c: New test.
7398         * tst-vfork2x.c: New test.
7400 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
7402         * sysdeps/i386/tcb-offsets.sym: Add PID.
7403         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7404         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
7405         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
7407 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
7409         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
7411 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
7413         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
7414         _rtld_global_ro.
7416 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
7418         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
7419         _rtld_global_ro.
7421         * tst-once4.c: Remove unnecessary macro definition.
7423         * tst-mutex7.c (do_test): Limit thread stack size.
7424         * tst-once2.c (do_test): Likewise.
7425         * tst-tls3.c (do_test): Likewise.
7426         * tst-tls1.c (do_test): Likewise.
7427         * tst-signal3.c (do_test): Likewise.
7428         * tst-kill6.c (do_test): Likewise.
7429         * tst-key4.c (do_test): Likewise.
7430         * tst-join4.c (do_test): Likewise.
7431         * tst-fork1.c (do_test): Likewise.
7432         * tst-context1.c (do_test): Likewise.
7433         * tst-cond2.c (do_test): Likewise.
7434         * tst-cond10.c (do_test): Likewise.
7435         * tst-clock2.c (do_test): Likewise.
7436         * tst-cancel10.c (do_test): Likewise.
7437         * tst-basic2.c (do_test): Likewise.
7438         * tst-barrier4.c (do_test): Likewise.
7440 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
7442         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
7444 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
7446         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7447         (__pthread_cond_timedwait): Optimize wakeup test.
7448         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7449         (__pthread_cond_wait): Likewise.
7450         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
7451         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7452         Likewise.
7454 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
7456         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7457         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
7458         the atomic instruction needed.
7459         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
7460         (__lll_mutex_lock_wait): Likewise.
7462 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
7464         * Makefile (tests): Add tst-cond14 and tst-cond15.
7465         * tst-cond14.c: New file.
7466         * tst-cond15.c: New file.
7468 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
7470         * sysdeps/pthread/createthread.c (create_thread): Remove use of
7471         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
7472         needs to be implemented differently to be useful.
7474 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
7476         * pthread_attr_setschedparam.c: Don't test priority against limits
7477         here.  Set ATTR_FLAG_SCHED_SET flag.
7478         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
7479         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
7480         from parent thread to child.  If attribute is used and scheduling
7481         parameters are not inherited, copy parameters from attribute or
7482         compute them.  Check priority value.
7483         * pthread_getschedparam.c: If the parameters aren't known yet get
7484         them from the kernel.
7485         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
7486         ATTR_FLAG_POLICY_SET flag for thread.
7487         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
7488         and ATTR_FLAG_POLICY_SET.
7490         * sysdeps/pthread/createthread.c: Use tgkill if possible.
7492         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
7493         fail if stack address hasn't been set.  Just return 0.
7495 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
7497         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
7498         libpthread for the files in this list.
7499         (CFLAGS-tst-unload): Removed.
7500         * tst-unload.c (do_test): Don't use complete path for
7501         LIBPHREAD_SO.
7503         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
7504         tst-_res1mod2.
7506 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
7508         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7509         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
7510         operation per round is needed.
7511         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
7512         (__lll_mutex_lock_wait): Likewise.
7514 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
7516         * tst-cancel9.c (cleanup): Don't print to stderr.
7518 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7520         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
7522 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
7524         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
7525         (__syscall_error_handler2): Call CDISABLE.
7526         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
7527         (__syscall_error_handler2): Call CDISABLE.
7529         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7530         Release lock before the loop, don't reacquire it.
7532         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
7534 2004-02-19  Andreas Schwab  <schwab@suse.de>
7536         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7537         Fix last change.
7539 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
7541         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
7542         (pthread_barrier_wait): After wakeup, release lock only when the
7543         last thread stopped using the barrier object.
7544         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
7545         (pthread_barrier_wait): Likewise.
7546         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7547         Likewise.
7548         * Makefile (tests): Add tst-barrier4.
7549         * tst-barrier4.c: New file.
7551         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7552         (__pthread_cond_timedwait): Perform timeout test while holding
7553         internal lock to prevent wakeup race.
7554         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
7555         * sysdeps/pthread/pthread_cond_timedwait.c
7556         (__pthread_cond_timedwait): Likewise.
7557         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7558         (__pthread_cond_timedwait): Likewise.
7560 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
7562         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
7563         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
7564         * Makefile (tests): Add tst-rwlock13.
7565         * tst-rwlock13.c: New test.
7567 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
7569         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7570         (__condvar_tw_cleanup): Little optimization.
7571         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
7573 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
7575         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
7576         libpthread as "lib" parameter to SHLIB_COMPAT.
7577         (__novmx_siglongjmp): Fix typo in function name.
7578         (__novmx_longjmp): Fix typo in function name.
7580 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
7582         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
7583         __builtin_expect.
7585         * sysdeps/generic/pt-longjmp.c: Moved to...
7586         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
7588 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
7590         * Makefile (libpthread-routines): Add pt-cleanup.
7591         * pt-longjmp.c: Removed.
7592         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
7593         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
7594         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
7595         Version longjmp, siglongjmp for GLIBC_2.3.4.
7596         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
7598 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
7600         * sysdeps/pthread/pthread_cond_timedwait.c
7601         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
7602         Reuse code.  Add __builtin_expects.
7604         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7605         (__pthread_cond_timedwait): Get internal lock in case timeout has
7606         passed before the futex syscall.
7607         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7609 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
7611         * allocatestack.c: Pretty printing.
7613         * sysdeps/pthread/createthread.c (create_thread): Don't add
7614         CLONE_DETACHED bit if it is not necessary.
7616 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
7618         * pthread_getattr_np.c: Include ldsodefs.h.
7620 2004-01-16  Richard Henderson  <rth@redhat.com>
7622         * allocatestack.c: Don't declare __libc_stack_end.
7623         * init.c (__pthread_initialize_minimal_internal): Likewise.
7624         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
7626 2004-01-15  Richard Henderson  <rth@redhat.com>
7628         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
7629         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
7630         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
7631         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
7632         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
7633         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
7634         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
7635         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
7637 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
7639         * init.c (pthread_functions): Make array const.
7641 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
7643         * allocatestack.c (__make_stacks_executable): Change interface.
7644         Check parameters.  Pass parameter on to libc counterpart.
7645         * pthreadP.h: Change declaration.
7647 2004-01-13  Richard Henderson  <rth@redhat.com>
7649         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
7650         prototype form.
7651         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
7652         Likewise.
7654         * sysdeps/alpha/Makefile: New file.
7655         * sysdeps/alpha/tcb-offsets.sym: New file.
7656         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
7657         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
7659         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
7660         on powerpc version.
7662 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
7664         * Makefile (tests): Add tst-backtrace1.
7665         * tst-backtrace1.c: New test.
7667 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
7669         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
7670         register as second parameter to the REGISTER macro.
7671         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
7672         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
7673         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
7674         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
7675         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
7676         of thread register as second parameter to REGISTER macro in 64 case.
7678 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
7680         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
7681         (CFLAGS-getpid.o): Defined.
7682         (CFLAGS-getpid.os): Defined.
7684 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
7686         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
7687         returned for main thread does not overlap with any other VMA.
7688         Patch by Jakub Jelinek.
7690 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
7692         * tst-raise1.c: Include stdio.h.
7694 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
7696         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
7697         setting with __ASSUME_TGKILL || defined __NR_tgkill.
7698         If pid is 0, set it to selftid.
7699         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
7700         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
7701         != 0, return self->tid without doing a syscall.
7702         * descr.h (struct pthread): Move pid field after tid.
7704         * Makefile (tests): Add tst-raise1.
7705         * tst-raise1.c: New file.
7707 2003-12-23  Roland McGrath  <roland@redhat.com>
7709         * tst-oddstacklimit.c: New file.
7710         * Makefile (tests): Add it.
7711         (tst-oddstacklimit-ENV): New variable.
7713         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
7714         value up to page size for __default_stacksize.
7716 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
7718         * Makefile (tests): Add tst-eintr5.
7719         * tst-eintr5.c: New file.
7721         * eintr.c (eintr_source): Prevent sending signal to self.
7723         * tst-eintr2.c (tf1): Improve error message.
7725 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
7727         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
7728         * sysdeps/unix/sysv/linux/getpid.c: New file.
7729         * pthread_cancel.c: Add comment explaining use of PID field.
7730         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
7731         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
7732         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
7733         temporarily to signal the field must not be relied on and updated
7734         by getpid().
7735         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
7736         temporarily negative.
7737         * sysdeps/unix/sysv/linux/raise.c: Likewise.
7739 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
7741         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
7742         (eintr_source): If ARG != NULL, use pthread_kill.
7743         * tst-eintr1.c: Adjust for this change.
7744         * tst-eintr2.c: Likewise.
7745         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
7746         * tst-eintr3.c: New file.
7747         * tst-eintr4.c: New file.
7749 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
7751         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
7752         if CANCELSTATE_BITMASK is set.
7753         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
7754         Likewise.
7756         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
7757         (tests-reverse): Add tst-cancel23.
7758         * tst-cancel22.c: New test.
7759         * tst-cancel23.c: New test.
7761 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
7763         * tst-eintr1.c: Better error messages.
7765         * Makefile (tests): Add tst-eintr2.
7766         * tst-eintr2.c: New file.
7768 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
7770         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
7771         (CFLAGS-tst-cancelx21.c): Set.
7772         * tst-cancel21.c: New test.
7773         * tst-cancelx21.c: New test.
7775         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
7776         comparison operand.
7777         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
7778         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
7779         * pt-longjmp.c: Include jmpbuf-unwind.h.
7780         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
7781         _JMPBUF_UNWINDS.  Adjust compared pointers.
7782         * init.c (__pthread_initialize_minimal_internal): Initialize
7783         pd->stackblock_size.
7784         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
7785         * sysdeps/alpha/jmpbuf-unwind.h: New file.
7786         * sysdeps/i386/jmpbuf-unwind.h: New file.
7787         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
7788         * sysdeps/s390/jmpbuf-unwind.h: New file.
7789         * sysdeps/sh/jmpbuf-unwind.h: New file.
7790         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
7791         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
7792         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
7793         (_JMPBUF_CFA_UNWINDS): Remove.
7794         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
7796 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
7798         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
7799         (CFLAGS-tst-cancelx20.c): Set.
7800         * tst-cancel20.c: New test.
7801         * tst-cancelx20.c: New test.
7803 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
7805         * init.c (__pthread_initialize_minimal_internal): Don't treat
7806         architectures with separate register stack special here when
7807         computing default stack size.
7809 2003-12-17  Roland McGrath  <roland@redhat.com>
7811         * Makefile (tst-cancelx7-ARGS): New variable.
7812         Reportd by Greg Schafer <gschafer@zip.com.au>.
7814 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
7816         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
7817         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
7818         (tst-stack3-ENV): Set.
7819         ($(objpfx)tst-stack3-mem): New.
7820         * tst-stack3.c: New test.
7822 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
7824         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
7825         Add unwind directives.  Drop unused .regstk directive.
7826         (_fini_EPILOG_BEGINS): Add unwind directives.
7828 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
7830         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
7831         Assume parameter is a pointer.
7832         (lll_futex_wake): Likewise.
7833         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
7834         Likewise.
7835         (lll_futex_wake): Likewise.
7836         Reported by Boris Hu.
7837         * sysdeps/unix/sysv/linux/unregister-atfork.c
7838         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
7840         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
7842 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
7844         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
7845         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
7846         __rtld_lock_initialize for ld.so lock.
7847         Patch in part by Adam Li <adam.li@intel.com>.
7849 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
7851         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
7852         in $(gnulib).  Also, remove stale comment.
7854 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
7856         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
7857         advantage of new syscall stub and optimize accordingly.
7859         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
7860         from SYS_futex, to match expectations of
7861         sysdep.h:DO_INLINE_SYSCALL.
7862         (lll_futex_clobbers): Remove.
7863         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
7864         (lll_futex_wake): Likewise.
7865         (lll_futex_requeue): Likewise.
7866         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
7867         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
7868         Jelinek).
7869         (__lll_mutex_lock): Likewise.
7870         (__lll_mutex_cond_lock): Likewise.
7871         (__lll_mutex_timed_lock): Likewise.
7872         (__lll_mutex_unlock): Likewise.
7873         (__lll_mutex_unlock_force): Likewise.
7875         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
7876         comes before the include of <sysdep.h>.
7877         (THREAD_SELF_SYSINFO): New macro.
7878         (THREAD_SYSINFO): Likewise.
7879         (INIT_SYSINFO): New macro.
7880         (TLS_INIT_TP): Call INIT_SYSINFO.
7882         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
7884         * sysdeps/pthread/createthread.c (create_thread): Use
7885         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
7886         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
7887         THREAD_SELF_SYSINFO instead of open code.
7888         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
7889         (THREAD_SYSINFO): Likewise.
7891         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
7893         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
7895 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
7897         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
7898         instead of .init.  Patch by David Mosberger.
7900 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
7902         * sysdeps/pthread/configure.in: Remove broken declaration in C
7903         cleanup handling check.
7905 2003-11-30  Andreas Jaeger  <aj@suse.de>
7907         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
7908         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
7909         Likewise.
7911 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
7913         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
7914         * pthread_attr_destroy.c: Include shlib-compat.h.
7915         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
7916         is set in iattr->flags.
7917         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
7919 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
7921         * Makefile (distribute): Add tst-cleanup4aux.c.
7923         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
7924         include.
7926 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
7928         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
7929         pthread_cond_signal.
7931         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
7932         store mutex address if the current value is ~0l.
7933         * sysdeps/pthread/pthread_cond_timedwait.c
7934         (__pthread_cond_timedwait): Likewise.
7935         * sysdeps/pthread/pthread_cond_broadcast.c
7936         (__pthread_cond_broadcast): Don't use requeue for pshared
7937         condvars.
7939         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7940         (__pthread_cond_wait): Don't store mutex address if the current
7941         value is ~0l.
7942         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7943         (__pthread_cond_timedwait): Likewise.
7944         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
7945         (__pthread_cond_broadcast): Don't use requeue for pshared
7946         condvars.
7948         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
7949         element with ~0l for pshared condvars, with NULL otherwise.
7951         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7952         (__pthread_cond_wait): Don't store mutex address if the current
7953         value is ~0l.
7954         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7955         (__pthread_cond_timedwait): Likewise.
7956         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
7957         (__pthread_cond_broadcast): Don't use requeue for pshared
7958         condvars.
7960         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
7961         * tst-cond12.c: New file.
7962         * tst-cond13.c: New file.
7964 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
7966         * sysdeps/pthread/configure.in: Make missing forced unwind support
7967         fatal.
7969 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
7971         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
7973 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
7975         * Makefile: Add magic to clean up correctly.
7977 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
7979         * unwind.c (FRAME_LEFT): Define.
7980         (unwind_stop): Handle old style cleanups here.
7981         (__pthread_unwind): Handle old style cleanups only if
7982         !HAVE_FORCED_UNWIND.
7983         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
7984         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
7985         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
7986         ($(objpfx)tst-cleanupx4): Likewise.
7987         * tst-cleanup4.c: New test.
7988         * tst-cleanup4aux.c: New.
7989         * tst-cleanupx4.c: New test.
7991 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
7993         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
7994         lll_mutex_*lock macros to skip atomic operations on some archs.
7996 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
7998         * sysdeps/pthread/tst-timer.c (main): Initialize
7999         sigev2.sigev_value as well.
8001 2003-10-15  Roland McGrath  <roland@redhat.com>
8003         * sysdeps/pthread/configure.in: Barf if visibility attribute support
8004         is missing.
8005         * sysdeps/pthread/configure: Regenerated.
8007 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
8009         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
8010         locking macros.  No distinction between normal and mutex locking
8011         anymore.
8012         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
8013         Merge bits from lowlevelmutex.S we still need.
8014         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
8015         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
8016         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
8017         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
8018         new mutex implementation.
8019         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
8020         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
8021         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8022         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
8023         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
8024         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8025         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8026         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
8027         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8028         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
8029         symbol for entry point to avoid cancellation.
8031 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
8033         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
8034         changes.
8035         (SAVE_OLDTYPE_0): Fix a typo.
8037 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
8039         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
8040         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
8042 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
8044         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
8045         correct offset.
8047 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
8049         * Makefile (tests): Add tst-cancel19.
8050         * tst-cancel19.c: New test.
8052 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
8054         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
8055         restoring of the old cancellation type.
8057 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
8059         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
8061 2003-09-27  Wolfram Gloger  <wg@malloc.de>
8063         * sysdeps/pthread/malloc-machine.h: New file
8065 2003-09-24  Roland McGrath  <roland@redhat.com>
8067         * allocatestack.c (__make_stacks_executable): Don't ignore return
8068         value from _dl_make_stack_executable.
8070 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
8072         * allocatestack.c (__make_stacks_executable): Also change
8073         permission of the currently unused stacks.
8075         * allocatestack.c (change_stack_perm): Split out from
8076         __make_stacks_executable.
8077         (allocate_stack): If the required permission changed between the time
8078         we started preparing the stack and queueing it, change the permission.
8079         (__make_stacks_executable): Call change_stack_perm.
8081         * Makefile: Build tst-execstack-mod locally.
8082         * tst-execstack-mod.c: New file.
8084 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
8086         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
8088 2003-09-23  Roland McGrath  <roland@redhat.com>
8090         * tst-execstack.c: New file.
8091         * Makefile (tests): Add it.
8092         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
8093         (LDFLAGS-tst-execstack): New variable.
8095         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
8096         whether to use PROT_EXEC for stack mmap.
8097         (__make_stacks_executable): New function.
8098         * pthreadP.h: Declare it.
8099         * init.c (__pthread_initialize_minimal_internal): Set
8100         GL(dl_make_stack_executable_hook) to that.
8102 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
8104         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
8105         recommendation from AMD re avoidance of lock prefix.
8107 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
8109         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
8110         lll_futex_timed_wait instead of lll_futex_wait.
8111         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
8112         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
8113         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
8114         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
8115         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
8116         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
8117         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
8118         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
8119         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
8120         Completely revamp the locking macros.  No distinction between
8121         normal and mutex locking anymore.
8122         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
8123         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
8124         __lll_lock_timedwait): Fix prototypes.
8125         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
8126         __lll_lock_timedwait): Likewise.
8127         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
8128         macros, add __builtin_expect.
8129         (lll_mutex_timedlock): Likewise.  Fix return value.
8130         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
8131         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
8132         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
8133         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
8134         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
8135         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
8136         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
8137         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
8139 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
8141         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8142         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
8143         operation if possible.
8145         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
8146         like jumping over the lock prefix.
8148 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
8150         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
8151         locking macros.  No distinction between normal and mutex locking
8152         anymore.
8153         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8154         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
8155         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
8156         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
8157         locking.  Merge bits from lowlevelmutex.S we still need.
8158         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
8159         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
8160         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
8161         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
8162         * Makefile (routines): Remove libc-lowlevelmutex.
8163         (libpthread-rountines): Remove lowlevelmutex.
8164         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
8165         for new mutex implementation.
8166         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8167         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8168         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8169         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8170         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8171         Likewise.
8172         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8173         Likewise.
8174         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8175         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8176         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
8177         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
8178         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8179         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8180         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8181         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
8182         Likewise.
8183         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
8184         Likewise.
8185         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
8186         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8187         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8188         Don't use requeue.
8189         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8190         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
8192 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
8194         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
8195         in parameters of asm with output parameters.
8197         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
8198         type of DECR parameter to int.
8199         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
8201 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
8203         * tst-attr3.c (tf, do_test): Print stack start/end/size and
8204         guardsize for each thread.
8206 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
8208         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
8209         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
8210         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
8212         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
8213         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
8214         NULL.
8215         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
8216         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
8217         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
8218         (pthread_getaffinity_np): Add hidden_def.
8220         * Makefile (tests): Add tst-attr3.
8221         * tst-attr3.c: New test.
8223         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
8225 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
8227         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
8228         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
8230 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
8232         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
8233         * tst-align.c: Include tst-stack-align.h.
8234         (tf, do_test): Use TEST_STACK_ALIGN macro.
8236 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
8238         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
8239         variable.
8241 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
8243         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
8244         stack-related values for the initial thread.
8246 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
8248         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
8250 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
8252         * pthread_mutex_lock.c: Minor code rearrangements.
8254 2003-09-05  Roland McGrath  <roland@redhat.com>
8256         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
8257         Instead, include ../nptl_db/db_info.c to do its magic.
8258         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
8259         (__pthread_pthread_key_2ndlevel_size): Likewise.
8260         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
8261         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
8262         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
8263         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
8264         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
8265         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
8266         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
8267         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
8268         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
8269         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
8270         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
8271         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
8272         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
8273         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
8274         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
8275         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
8276         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
8278 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
8280         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
8281         of pthread_t to be compatible with LT.
8282         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
8283         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8284         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8285         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8286         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
8287         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8288         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
8290 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
8292         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
8294 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
8296         * unwind-forcedunwind.c: Move to...
8297         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
8298         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
8299         * sysdeps/pthread/jmpbuf-unwind.h: New file.
8300         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
8301         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
8302         * unwind.c: Include jmpbuf-unwind.h.
8303         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
8305 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
8307         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
8308         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
8309         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
8310         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
8311         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
8312         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
8313         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
8314         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
8315         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
8316         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
8317         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
8318         function.
8319         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
8320         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
8321         * Makefile (tests): Add tst-stack2.
8322         * tst-stack2.c: New test.
8323         * tst-stack1.c: Include limits.h and sys/param.h.
8324         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
8326         * pthread_condattr_setpshared.c: Include errno.h.
8327         (pthread_condattr_setpshared): Return EINVAL if pshared
8328         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
8330         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
8331         defined symbol for entry point to avoid cancellation.
8332         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
8333         Likewise.
8334         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
8335         Likewise.
8336         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
8337         Likewise.
8338         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
8339         Likewise.
8340         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
8341         Likewise.
8342         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
8343         __close_nocancel, __read_nocancel, __write_nocancel,
8344         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
8345         libpthread.so or librt.so, define to corresponding function
8346         without _nocancel suffix.
8347         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
8348         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
8349         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
8351         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
8353 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
8355         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
8356         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
8358         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
8359         in subsections has a symbol associated with it.
8361         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
8362         defined symbol for entry point to avoid cancellation.
8363         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
8365 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
8367         * Makefile (tests): Add tst-tls5.
8368         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
8369         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
8370         ($(objpfx)tst-tls5): New.
8371         ($(objpfx)tst-tls6.out): Likewise.
8372         (tests): Depend on $(objpfx)tst-tls6.out.
8373         * tst-tls3.c: Include stdint.h and pthreaddef.h.
8374         (do_test): Check pthread_self () return value alignment.
8375         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
8376         (tf): Check pthread_self () return value alignment.
8377         * tst-tls5.c: New test.
8378         * tst-tls5.h: New.
8379         * tst-tls5mod.c: New.
8380         * tst-tls5moda.c: New.
8381         * tst-tls5modb.c: New.
8382         * tst-tls5modc.c: New.
8383         * tst-tls5modd.c: New.
8384         * tst-tls5mode.c: New.
8385         * tst-tls5modf.c: New.
8386         * tst-tls6.sh: New test.
8388         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
8389         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
8390         * init.c (pthread_functions): Initialize them.
8391         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
8392         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
8393         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
8394         pthread_cond_timedwait@@GLIBC_2.3.2.
8396 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
8398         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
8399         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
8400         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
8401         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
8402         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
8403         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
8405         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
8407         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
8408         _POSIX_THREAD_PRIORITY_SCHEDULING.
8409         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
8411 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
8413         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
8414         nested function, use static inline function from libio.h.
8415         Code by Richard Henderson.
8417         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
8418         weak.
8420 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
8422         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
8423         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
8424         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
8425         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
8426         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
8427         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
8428         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
8429         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
8430         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
8431         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
8432         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
8433         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
8434         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
8435         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
8436         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
8437         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
8438         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
8439         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
8440         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
8441         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
8442         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
8443         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
8444         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
8445         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
8446         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
8447         * sysdeps/sparc/tls.h: New file.
8448         * sysdeps/sparc/tcb-offsets.sym: New file.
8449         * sysdeps/sparc/Makefile: New file.
8450         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
8451         * init.c [__sparc__] (__NR_set_tid_address): Define.
8453 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
8455         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
8456         _IO_release_lock): Define.
8458 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
8460         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
8461         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
8463 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
8465         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
8466         (__pthread_cleanup_class): Add missing return types of member
8467         functions.
8469 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
8471         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8472         (lll_mutex_unlock_force): Add memory barrier between store and futex
8473         syscall.
8475 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
8477         * tst-cancel4.c (do_test): Also unlink tempfname and remove
8478         tempmsg in first loop.
8480 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
8482         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8483         _POSIX_THREAD_PRIORITY_SCHEDULING.
8484         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8486 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
8488         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
8489         (__rtld_lock_default_lock_recursive,
8490         __rtld_lock_default_unlock_recursive): Define.
8491         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
8492         __rtld_lock_unlock_recursive): Define using
8493         GL(_dl_rtld_*lock_recursive).
8494         * init.c (__pthread_initialize_minimal_internal): Initialize
8495         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
8496         Lock GL(_dl_load_lock) the same number of times as
8497         GL(_dl_load_lock) using non-mt implementation was nested.
8499         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
8500         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
8502 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
8504         * tst-cancel17.c (do_test): Make len2 maximum of page size and
8505         PIPE_BUF.
8507 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
8509         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
8511 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
8513         * sysdeps/pthread/createthread.c (do_clone): Move error handling
8514         to first syscall error check.  Move syscall error check for tkill
8515         into __ASSUME_CLONE_STOPPED #ifdef.
8517 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
8519         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
8520         is not defined, do explicit synchronization.
8521         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
8522         is not defined also unlock pd->lock for non-debugging case in case
8523         it is necessary.
8524         * pthread_create.c (start_thread): Always get and release pd->lock
8525         if __ASSUME_CLONE_STOPPED is not defined.
8526         (start_thread_debug): Removed.  Adjust users.
8527         * allocatestack.c (allocate_stack): Always initialize lock if
8528         __ASSUME_CLONE_STOPPED is not defined.
8529         * Makefile (tests): Add tst-sched1.
8530         * tst-sched1.c: New file.
8532         * sysdeps/pthread/createthread.c (do_clone): Only use
8533         sched_setschduler and pass correct parameters.
8535 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
8537         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
8538         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
8539         PTHREAD_STACK_MIN in comments.
8541 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
8543         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8544         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
8545         argument.
8546         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
8547         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
8548         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
8549         (__pthread_cleanup_upto): Fix prototype.
8550         (_longjmp_unwind): Adjust caller.
8551         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
8552         Change second argument to const struct pointer.
8553         * tst-sem8.c (main): Remove unused s2 and s3 variables.
8554         * tst-sem9.c (main): Likewise.
8555         * unwind.c: Include string.h for strlen prototype.
8557 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
8559         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8560         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
8561         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
8562         Define HAVE_CMOV.
8563         Patch by Nicholas Miell <nmiell@attbi.com>.
8565 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
8567         * init.c (__pthread_initialize_minimal_internal): Initialize
8568         GL(dl_init_static_tls).
8569         * pthreadP.h (__pthread_init_static_tls): New prototype.
8570         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
8571         New functions.
8572         * Makefile (tests): Add tst-tls4.
8573         (modules-names): Add tst-tls4moda and tst-tls4modb.
8574         ($(objpfx)tst-tls4): Link against libdl and libpthread.
8575         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
8576         tst-tls4modb.so.
8577         * tst-tls4.c: New file.
8578         * tst-tls4moda.c: New file.
8579         * tst-tls4modb.c: New file.
8581 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
8583         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
8584         before __timer_dealloc.
8585         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
8586         Don't call list_unlink.
8588 2003-07-29  Roland McGrath  <roland@redhat.com>
8590         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
8592 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
8594         * tst-cancel17.c (do_test): Check if aio_cancel failed.
8595         Don't reuse struct aiocb A if it failed.
8596         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
8597         not just one byte, as that does not block.
8599 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
8601         * sysdeps/pthread/unwind-resume.c: New file.
8602         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
8603         unwind-resume in csu subdir.
8604         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
8605         exceptions.
8606         (librt-sysdep_routines, librt-shared-only-routines): Add
8607         rt-unwind-resume.
8608         * sysdeps/pthread/rt-unwind-resume.c: New file.
8609         * unwind-forcedunwind.c: New file.
8610         * Makefile (libpthread-routines): Add unwind-forcedunwind.
8611         (libpthread-shared-only-routines): Likewise.
8612         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
8613         * pthreadP.h (pthread_cancel_init): New prototype.
8614         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
8616         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
8617         attr argument const struct pthread_attr *.
8619         * res.c (__res_state): Return __resp.
8620         * descr.h: Include resolv.h.
8621         (struct pthread): Add res field.
8622         * pthread_create.c: Include resolv.h.
8623         (start_thread): Initialize __resp.
8624         * Makefile (tests): Add tst-_res1.
8625         (module-names): Add tst-_res1mod1, tst-_res1mod2.
8626         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
8627         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
8628         libpthread.
8629         * tst-_res1.c: New file.
8630         * tst-_res1mod1.c: New file.
8631         * tst-_res1mod2.c: New file.
8633 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
8635         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
8637         * Makefile: Define various *-no-z-defs variables for test DSOs
8638         which has undefined symbols.
8640 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
8642         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
8643         Retry if the stwcx fails to store once_control.
8645 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
8647         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
8648         pthread_attr_setaffinity.
8649         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
8650         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
8651         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
8652         * pthread_attr_destroy.c: Free cpuset element if allocated.
8653         * pthread_create.c: Pass iattr as additional parameter to
8654         create_thread.
8655         * sysdeps/pthread/createthread.c: If attribute is provided and
8656         a new thread is created with affinity set or scheduling parameters,
8657         start thread with CLONE_STOPPED.
8658         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
8659         pthread_attr_setaffinity.
8660         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
8661         cpuset element.
8663 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
8665         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
8667 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
8669         * sysdeps/pthread/configure.in: Require CFI directives also for
8670         ppc and s390.
8672 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
8674         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
8675         Add cfi directives.
8677 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
8679         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
8680         CLEANUP_JMP_BUF.
8681         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
8682         registers as variables.  Call __pthread_mutex_unlock_usercnt.
8683         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8684         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
8685         not self pointer in __writer.  Compare with TID to determine
8686         deadlocks.
8687         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8688         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
8689         Likewise.
8690         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
8691         Likewise.
8692         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
8693         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8694         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
8695         macros also when compiling librt.
8697 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
8699         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
8700         -fasynchronous-unwind-tables.
8701         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
8702         (PSEUDO): Add cfi directives.
8703         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
8704         Likewise.
8705         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
8706         Likewise.
8708 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
8710         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
8711         __pthread_unregister_cancel): Add prototypes and hidden_proto.
8712         * unwind.c (__pthread_unwind_next): Add hidden_def.
8713         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
8714         Likewise.
8715         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
8716         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
8717         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
8718         Likewise.
8719         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
8720         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
8721         Likewise.
8722         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
8723         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
8724         __pthread_unregister_cancel and __pthread_unwind_next.
8726 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
8728         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
8729         different symbol for the cancellation syscall wrapper and
8730         non-cancellation syscall wrapper.
8731         (PSEUDO_END): Define.
8733 2003-07-05  Richard Henderson  <rth@redhat.com>
8735         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
8736         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
8737         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8738         return actual return value from the syscall, not 0.
8740 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
8742         * descr.h (struct pthread): Add pid field.
8743         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
8744         (__reclaim_stacks): Likewise.
8745         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
8746         also check for PID of the signal source.
8747         (__pthread_initialize_minimal_internal): Also initialize pid field
8748         of initial thread's descriptor.
8749         * pthread_cancel.c: Use tgkill instead of tkill if possible.
8750         * sysdeps/unix/sysv/linux/fork.c: Likewise.
8751         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
8752         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8753         * sysdeps/unix/sysv/linux/raise.c: Likewise.
8755 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
8757         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
8758         Fix use of parameter.
8759         (__libc_cleanup_pop): Likewise.
8761 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
8763         * init.c (sigcancel_handler): Change parameters to match handler
8764         for SA_SIGACTION.  Check signal number and code to recognize
8765         invalid invocations.
8767 2003-07-03  Roland McGrath  <roland@redhat.com>
8769         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
8770         Apply sizeof (struct pthread) bias to r13 value.
8772 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
8774         * sysdeps/pthread/configure.in: Require CFI directives.
8776         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
8777         definition.
8778         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
8779         libpthread compilation.
8780         * unwind.c (__pthread_unwind): Add hidden_def.
8781         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
8783 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
8785         * libc-cancellation.c (__libc_cleanup_routine): Define.
8786         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
8787         (__pthread_cleanup_pop): Define.
8789 2003-07-01  Richard Henderson  <rth@redhat.com>
8791         * sysdeps/alpha/elf/pt-initfini.c: New file.
8792         * sysdeps/alpha/pthread_spin_lock.S: New file.
8793         * sysdeps/alpha/pthread_spin_trylock.S: New file.
8794         * sysdeps/alpha/pthreaddef.h: New file.
8795         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
8796         * sysdeps/alpha/tls.h: New file.
8797         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
8798         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
8799         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
8800         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
8801         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
8802         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
8803         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
8804         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
8805         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
8806         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
8808 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
8810         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
8811         cleanup support and unwind info.
8813 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
8815         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
8816         Use correct cleanup handler registration.  Add unwind info.
8817         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
8818         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
8819         * tst-once3.c: Add cleanup handler and check it is called.
8820         * tst-once4.c: Likewise.
8821         * tst-oncex3.c: New file.
8822         * tst-oncex4.c: New file.
8823         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
8825 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
8827         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
8829 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
8831         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
8832         (tf_msgsnd): Likewise.
8834         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
8835         premature returns a bit more.
8837 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
8839         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
8840         definition to the front.
8842         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
8843         the cleanup functions to make the names unique.  Fix dwarf opcode
8844         un unwind table.
8845         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
8846         functions to make the names unique.  Fix CFA offset for two blocks.
8848 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
8850         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
8851         missing closing braces.
8852         Patch by Christophe Saout <christophe@saout.de>.
8854 2003-06-24  Roland McGrath  <roland@redhat.com>
8856         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
8858 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
8860         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
8861         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
8863         * pthreadP.h: Declare __find_thread_by_id.
8864         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
8865         * pthread_clock_gettime.c: Allow using other thread's clock.
8866         * pthread_clock_settime.c: Likewise.
8867         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8868         * Makefile: Add rules to build and run tst-clock2.
8869         * tst-clock2.c: New file.
8871 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
8873         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
8874         to use exception-based cleanup handler.
8875         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8877         * tst-cond8.c (ch): Announce that we are done.
8879         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
8881         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
8882         Also test aio_suspend with timeout value.
8884 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
8886         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
8887         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
8888         attribute_hidden.
8890         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
8891         (__pthread_mutex_lock_internal): Likewise.
8892         (__pthread_mutex_unlock_internal): Likewise.
8893         (__pthread_mutex_unlock_usercnt): Declare.
8894         * pthread_mutex_destroy.c: Always fail if used in any way.
8895         * pthread_mutex_init.c: Update comment.
8896         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
8897         * pthread_mutex_timedlock.c: Adjust __nusers.
8898         * pthread_mutex_trylock.c: Adjust __nusers.
8899         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
8900         and public interfaces are wrapper with pass additional parameter.
8901         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
8902         parameter zero.
8903         * tst-mutex8.c: New file.
8904         * Makefile (tests): Add tst-mutex8.
8905         * sysdeps/pthread/pthread_cond_timedwait.c: Call
8906         __pthread_mutex_unlock_usercnt.
8907         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8908         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8909         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8910         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8911         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8912         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
8913         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8914         Add __nusers.
8915         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8916         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8917         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8918         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8919         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8921         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
8922         * pthread_mutex_timedlock.c: Likewise.
8923         * pthread_mutex_trylock.c: Adjust __nusers.
8924         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
8925         * tst-mutex9.c: New file.
8926         * Makefile (tests): Add tst-mutex9.
8927         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
8928         * sysdeps/ia64/tls.h: Likewise.
8929         * sysdeps/powerpc/tls.h: Likewise.
8930         * sysdeps/s390/tls.h: Likewise.
8931         * sysdeps/sh/tls.h: Likewise.
8932         * sysdeps/x86_64/tls.h: Likewise.
8933         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8934         Change type of __owner.
8935         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8936         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8937         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8938         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8939         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8941 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
8943         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
8944         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
8946         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
8947         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
8948         instead of nr to lll_futex_wake.  Only set errno and return -1
8949         if err < 0.
8951         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
8952         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8953         return actual return value from the syscall, not 0.
8955 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
8957         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
8958         find a random value.
8959         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
8960         errno==EIDRM.
8962         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
8963         compat_timer_settime.
8964         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
8965         compat_timer_gettime.
8966         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
8967         compat_timer_getoverrun.
8968         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
8969         compat_timer_delete.
8971         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
8972         error-checking mutex detect busy mutexes.
8974 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
8976         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
8977         Add ax to clobber list.
8978         (lll_mutex_cond_lock): Likewise.
8979         (lll_mutex_unlock): Likewise.
8980         (lll_lock): Likewise.
8981         (lll_unlock): Likewise.
8983         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
8984         * tst-cancel18.c: New file.
8985         * tst-cancelx18.c: New file.
8987         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
8988         and tcdrain.
8990         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
8991         * tst-cancel17.c: New file.
8992         * tst-cancelx17.c: New file.
8994         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
8995         * sysdeps/unix/sysv/linux/sigwait.c: New file.
8996         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
8998         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
9000 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
9002         * sysdeps/pthread/createthread.c (create_thread): Set
9003         header.multiple_threads unconditionally.
9004         * allocatestack.c (allocate_stack): Likewise.
9005         * descr.h (struct pthread): Add header.multiple_threads
9006         unconditionally.
9007         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
9008         Define for librt.  #error if neither libpthread, libc nor librt.
9009         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
9010         Likewise.
9011         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
9012         CDISABLE): Likewise.
9013         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
9014         CDISABLE): Likewise.
9015         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
9016         CDISABLE): Likewise.
9017         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
9018         CDISABLE): Likewise.  Access header.multiple_threads outside of
9019         libc and libpthread.
9020         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
9021         Likewise.
9022         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
9023         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
9025 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
9027         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
9028         Also test early cancellation before the thread reaches the cancellation
9029         point.
9031         * Makefile: Compile forward.c with exceptions.
9033         * sysdeps/unix/sysv/linux/sleep.c: New file.
9035 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
9037         * Makefile: Add CFLAGS definition to compile function wrappers
9038         duplicated from libc with exceptions.
9039         * tst-cancel4.c: Also check cancellation handlers.
9041         * Makefile: Add rules to build and run tst-cancel16 and
9042         tst-cancelx16.  Add missing CFLAGS definitions.
9043         * tst-cancel16.c: New file.
9044         * tst-cancelx16.c: New file.
9046 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
9048         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9049         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
9050         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
9051         (DL_SYSINFO_IMPLEMENTATION): Likewise.
9053         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
9054         (LIBC_CANCEL_RESET): Likewise.
9055         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
9056         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
9057         librt-cancellation.
9058         (CFLAGS-libcrt-cancellation.c): Define.
9059         * sysdeps/pthread/librt-cancellation.c: New file.
9060         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
9061         macros also when compiling librt.
9062         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
9063         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
9064         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
9065         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
9066         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
9067         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
9068         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
9070         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
9071         compat_timer_create.
9073 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
9075         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
9077         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
9078         __register_atfork.
9079         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
9080         Add libc_hidden_def.
9082 2003-06-13  Roland McGrath  <roland@redhat.com>
9084         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
9085         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
9087 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
9089         * allocatestack.c (queue_stack): Always inline.
9090         * ptreadhP.h (__do_cancel): Likewise.
9092 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
9094         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
9095         a typo.
9097 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
9099         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9100         (__pthread_cond_signal): Remove incorrect second addition for
9101         cond_lock!=0.
9103 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
9105         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9106         (__pthread_cond_signal): Use correct futex pointer in
9107         __lll_mutex_lock_wait call.
9109         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9110         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
9112 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
9114         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
9115         cancelable.
9116         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
9117         Likewise.
9119         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
9120         hand-written CFI generation code.  Since ENTRY/END also initiated
9121         CFI frames this caused two CFI sets to be generated.
9123 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
9125         * cleanup_routine.c: New file.
9126         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
9127         * sysdeps/pthread/pthread.h: Add support for fully exception-based
9128         cleanup handling.
9129         * Makefile (libpthread-routines): Add cleanup_routine.
9130         Add more CFLAGS variables to compile with exceptions.  Add comments
9131         why which file needs unwind tables.
9132         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
9133         tests.
9134         * tst-cancelx1.c: New file.
9135         * tst-cancelx2.c: New file.
9136         * tst-cancelx3.c: New file.
9137         * tst-cancelx4.c: New file.
9138         * tst-cancelx5.c: New file.
9139         * tst-cancelx6.c: New file.
9140         * tst-cancelx7.c: New file.
9141         * tst-cancelx8.c: New file.
9142         * tst-cancelx9.c: New file.
9143         * tst-cancelx10.c: New file.
9144         * tst-cancelx11.c: New file.
9145         * tst-cancelx12.c: New file.
9146         * tst-cancelx13.c: New file.
9147         * tst-cancelx14.c: New file.
9148         * tst-cancelx15.c: New file.
9149         * tst-cleanupx0.c: New file.
9150         * tst-cleanupx0.expect: New file.
9151         * tst-cleanupx1.c: New file.
9152         * tst-cleanupx2.c: New file.
9153         * tst-cleanupx3.c: New file.
9155         * tst-cleanup0.c: Make standard compliant.
9156         * tst-cleanup1.c: Likewise.
9158         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
9159         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
9160         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
9161         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
9162         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
9163         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9164         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
9165         CLEANUP_JMP_BUF.
9166         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
9167         * tst-cancel12.c: New file.
9168         * tst-cancel13.c: New file.
9169         * tst-cancel14.c: New file.
9170         * tst-cancel15.c: New file.
9171         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
9172         and tst-cancel15.
9174         * tst-cancel1.c: Add some comments.
9176         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
9177         timeout correctly.
9179 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
9181         * Makefile (CFLAGS-pthread_cancel.c): Define.
9183 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
9185         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
9186         Change type of __writer element to int.
9187         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9188         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9189         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9190         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9191         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9192         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
9193         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
9194         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
9195         Compare with TID to determine deadlocks.
9196         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
9197         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9198         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
9199         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9200         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
9201         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9202         Likewise.
9203         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9204         Likewise.
9205         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9206         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
9207         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
9208         Likewise.
9209         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
9210         Likewise.
9211         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
9212         * Makefile (tests): Add tst-rwlock12.
9213         * tst-rwlock12.c: New file.
9215 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
9217         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
9218         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
9219         Remove bogus hidden_proto.
9220         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
9221         Likewise.
9222         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
9223         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
9224         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
9225         ___lll_mutex_timedlock): Likewise.
9227 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
9229         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9230         (__pthread_cond_signal): Add some code to eventually handle
9231         cond_lock!=0.
9233 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
9235         * Makefile (tests): Add tst-exec4.
9236         (tst-exec4-ARGS): Define.
9237         * tst-exec4.c: New file.
9239 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
9241         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
9242         Also fail if tv_nsec < 0.
9243         (__lll_timedwait_tid): Likewise.
9244         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
9245         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
9246         Likewise.
9247         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
9248         Likewise.
9249         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
9250         Likewise.
9251         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
9252         Likewise.
9253         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
9254         Likewise.
9255         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
9256         Likewise.
9258         * Makefile (tests): Add tst-sem8 and tst-sem9.
9259         * tst-sem8.c: New file.
9260         * tst-sem9.c: New file.
9261         * sem_open.c: Fix creation of in_use record if the file exists but
9262         no internal record.
9264         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
9265         definitions.
9267         * sysdeps/pthread/timer_create.c (timer_create): In case
9268         evp==NULL, assign timer ID to sival_ptr.
9270         * descr.h (struct pthread_unwind_buf): Change type of prev element to
9271         struct pthread_unwind_buf *.
9272         (struct pthread): Likewise for cleanup_jmp_buf element.
9274         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
9275         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
9276         * unwind.c (__pthread_unwind_next): Likewise.
9278 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
9280         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9281         (lll_futex_timed_wait): Use int for futex value parameter.
9282         (lll_futex_wake): Likewise.
9283         (lll_futex_requeue): Likewise.
9285         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
9286         Replace one memory operation with one register operation.
9288         * tst-join4.c (do_test): Fix error message.
9290         * tst-rwlock6.c (do_test): Use correct format specifier.
9292         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9293         (__lll_mutex_lock_wait): Replace one memory operation with one
9294         register operation.
9295         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
9296         (__lll_mutex_lock_wait): Likewise.
9298         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9299         (__lll_mutex_cond_lock): Add one to value parameter of
9300         __lll_lock_wait to reflect reality in the futex syscall.
9301         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
9302         (lll_mutex_cond_lock): Likewise.
9304 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
9306         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
9307         New function.
9308         (lll_mutex_cond_lock): Define.
9310 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
9312         * Makefile (tests): Add tst-signal6.
9313         * tst-signal6.c: New file.
9315         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
9316         (__lll_mutex_unlock_force): New function
9317         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
9319         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9320         (__lll_mutex_unlock_force): New function.
9321         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
9323         * tst-rwlock7.c (do_test): Use correct format specifier.
9325         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
9326         Find break parameter in correct asm argument.
9328 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
9330         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
9331         Remove out4.
9332         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
9333         error occured.
9334         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
9335         Add __mutex.
9336         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
9337         lll_futex_requeue, lll_mutex_unlock_force): Define.
9339 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
9341         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9342         (pthread_cond_t): Add __mutex.
9343         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
9344         lll_futex_requeue, lll_mutex_unlock_force): Define.
9346 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
9348         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
9349         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
9350         Add __mutex field.
9351         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
9352         Define.
9353         (lll_futex_wait, lll_futex_wake): Define.
9354         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
9355         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
9356         FUTEX_REQUEUE instead of FUTEX_WAIT.
9357         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
9358         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
9359         mutex which was used in condvar structure.  Call
9360         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
9361         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
9363         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
9364         include tcb-offsets.h.  Read wakeup value in locked region.
9365         Use the value of gbr register as THREAD_ID.
9366         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9367         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9368         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9370         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
9371         macros.
9373 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
9375         * sysdeps/pthread/pthread_cond_broadcast.c
9376         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
9378 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
9380         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
9381         typo in register name.
9382         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
9383         correctly.  Actually use requeue.  Little optimization.
9384         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
9385         mutex address early.  Handle cancellation state as 32-bit value.
9386         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9387         Remove unnecessary label.
9389 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
9391         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
9392         instead of FUTEX_WAIT.
9393         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
9394         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9395         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9396         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
9397         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
9398         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
9399         used in condvar structure.  Call __pthread_mutex_cond_lock instead
9400         of __pthread_mutex_lock_internal.
9401         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9402         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9403         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
9404         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
9405         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9406         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9407         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
9408         Add pthread_mutex_cond_lock.
9409         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
9410         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
9411         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
9412         lll_mutex_cond_lock.
9413         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
9414         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9415         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9416         Add __mutex field.
9417         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9418         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9420         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
9421         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
9423         * pthreadP.h: Declare __pthread_mutex_cond_lock.
9424         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
9425         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
9426         macro don't define aliases.
9428         * cancellation.c: Remove __pthread_enable_asynccancel_2.
9429         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
9430         * sysdeps/pthread/pthread_cond_timedwait.c: Use
9431         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
9432         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9433         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9434         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
9435         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9436         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9438 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
9440         * sem_open.c: Fix one endless loop.  Implement correct semantics
9441         wrt opening the same semaphore more then once.
9442         * sem_close.c: Adjust for sem_open change.
9443         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
9444         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
9445         * Makefile (tests): Add tst-sem7.
9446         * tst-sem7.c: New file.
9448 2003-05-16  Roland McGrath  <roland@redhat.com>
9450         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
9451         uninitialized variable braino.
9453 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
9455         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
9456         test for syscall availability.
9458         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
9459         __no_posix_timers to -1 if the syscalls don't exist.
9461         * pthread_join.c (pthread_join): Set tid field of the joined
9462         thread to -1.  This isn't necessary but helps to recognize some
9463         error conditions with almost no cost.
9465         * allocatestack.c (FREE_P): Also negative values indicate an
9466         unused stack.
9468         * unwind.c: Include <unistd.h>.
9470 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
9472         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
9474 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
9476         * Makefile (crti-objs, crtn-objs): New variables.
9477         (omit-deps, extra-objs): Add crtn.
9478         ($(objpfx)libpthread.so): Depend on both crti and crtn
9479         and links to them in multidir.
9480         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
9482 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
9484         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
9485         (lll_mutex_unlock): Use atomic_exchange_rel.
9487 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
9489         * cond-perf.c (cons): Add missing locking around setting of alldone.
9491 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
9493         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
9494         related macros.
9495         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9497 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
9499         * tst-sem6.c: New file.
9500         * Makefile (tests): Add tst-sem6.
9502         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
9503         Use atomic_exchange_rel instead of atomic_exchange.
9504         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
9505         Likewise.
9507         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
9508         code for lll_futex_wait and lll_futex_wake in static apps.  Use
9509         vsyscall is possible.
9511         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
9512         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
9513         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
9514         pthread_setaffinity_np.
9515         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
9516         and pthread_setaffinity_np.
9517         * Makefile (libpthread-routines): Add pthread_getaffinity and
9518         pthread_setaffinity.
9520         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
9521         use it in case mmap to allocate the stack fails.
9522         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
9523         ARCH_MAP_FLAGS here.
9524         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
9525         ARCH_RETRY_MMAP.
9527 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
9529         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
9530         handler implementation.  It is now lockless in fork().
9531         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
9532         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
9533         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
9534         declare the __fork_*_lists.
9535         (struct fork_handler): Include pointers to all three functions.
9536         Add next, refcntr and need_signal elements.
9537         (__fork_handlers): New declaration.
9538         (__register_atfork_malloc): Remove declaration.
9539         (HAVE_register_atfork_malloc): Remove definition.
9540         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
9541         __pthread_child_handler variable.
9542         (__libc_pthread_init): Use __register_atfork instead of explicitly
9543         adding to the list.
9544         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
9545         and lll_futex_wake.
9546         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9548         * unwind.c (unwind_cleanup): Print error message and then abort.  This
9549         function must never be reached.
9551         * cond-perf.c: New file.
9553 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
9555         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
9557 2003-05-04  Roland McGrath  <roland@redhat.com>
9559         * Makefile ($(objpfx)../libc.so): New target.
9561 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
9563         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9564         (pthread_condattr_t): Size is only an int, don't use long for
9565         alignment.
9566         (pthread_mutexattr_t): Likewise.
9567         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9568         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9569         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9571 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
9573         * sysdeps/i386/tls.h: Define THREAD_ID.
9574         * sysdeps/ia64/tls.h: Likewise.
9575         * sysdeps/powerpc/tls.h: Likewise.
9576         * sysdeps/s390/tls.h: Likewise.
9577         * sysdeps/sh/tls.h: Likewise.
9578         * sysdeps/x86_64/tls.h: Likewise.
9579         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
9580         record ownership.
9581         * pthread_mutex_timedlock.c: Likewise.
9582         * pthread_mutex_trylock.c: Likewise.
9583         * pthread_mutex_unlock.c: Likewise.
9584         * pthread_rwlock_trywrlock.c: Likewise.
9585         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
9586         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9587         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
9588         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9590         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
9591         flag.
9593 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
9595         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9596         (__SIZEOF_PTHREAD_COND_T): Define to 48.
9597         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
9598         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
9599         Make __align long long instead of long.
9600         (pthread_rwlock_t): Formatting.
9601         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
9602         (pthread_rwlock_t): Formatting.
9603         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9604         (pthread_cond_t): Make __align long long instead of long.
9605         (pthread_rwlock_t): Move __flags field to the same position as in
9606         linuxthreads.
9608 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
9610         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
9611         * tst-rwlock7.c (do_test): Likewise.
9613 2003-04-26  Roland McGrath  <roland@redhat.com>
9615         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
9617 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
9619         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
9620         sizeof (struct pthread).
9621         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
9622         1 struct pthread.
9623         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
9624         to 0.
9625         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
9626         struct pthread.
9627         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
9628         to 32-bit bytes.
9629         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
9630         tcbp.
9631         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
9632         unneccessarily.
9633         (NO_TLS_OFFSET): Define.
9634         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
9635         add TLS_TCB_SIZE unnecessarily.
9637 2003-04-22  Roland McGrath  <roland@redhat.com>
9639         * Makeconfig (shared-thread-library): Reverse link order to work
9640         around linker bug.
9642 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
9644         * semaphore.h: Fix typo in comment.
9646 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
9648         * sysdeps/pthread/sigfillset.c: New file.
9650         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
9651         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
9652         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
9653         * sysdeps/pthread/sigaction.c: Likewise.
9654         * sysdeps/pthread/sigprocmask.c: New file.
9655         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
9656         __SIGRTMIN+1.
9657         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9658         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
9659         in this case.
9661 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
9663         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9664         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
9666         * sysdeps/unix/sysv/linux/unregister-atfork.c
9667         (__unregister_atfork): Don't free memory not allocated dynamically.
9669         * semaphore.h: Remove __THROW marker from cancellation points.
9670         * nptl/sysdeps/pthread/pthread.h: Likewise.
9672 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
9674         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
9675         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
9676         __THROW.
9678 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
9680         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
9682 2003-04-15  Roland McGrath  <roland@redhat.com>
9684         * forward.c (__pthread_unwind): Tweak to avoid warning.
9686 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
9688         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
9690 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
9692         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
9693         overflow CFA advance instructions.
9694         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9696 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
9698         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
9699         * sysdeps/i386/pthread_spin_lock.c: Likewise.
9700         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
9701         defined.
9703         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
9704         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
9705         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
9706         DW_CFA_advance_loc for .Laddl-.Lsubl.
9708 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
9710         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
9711         position-independent unwind data for static libraries.
9712         Add missing unwind info.  Add comments.
9714         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
9715         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9716         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9717         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9719 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
9721         * Makefile: Make sure all cancellation points are compiled with
9722         exception and asynchronous unwind tables.
9724         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
9725         which mishandles loading of global object addresses in PIC.
9726         (THREAD_SETMEM_NC): Likewise.
9728 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
9730         * pthread.h: Define new data structure for cleanup buffer.  Declare
9731         new cleanup handler interfaces.
9732         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
9733         (struct pthread): Add cleanup_jmp_buf pointer.  Define
9734         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
9735         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
9736         it.  Declare old cleanup handler installation functions.
9737         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
9738         handling.
9739         * cleanup_defer.c: Likewise.
9740         * cleanup_compat.c: New file.  Old cleanup code.
9741         * cleanup_def_compat.c: New file.  Old cleanup code.
9742         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
9743         if own thread descriptor.
9744         * unwind.c: New file.
9745         * forward.c: Add __pthread_unwind.
9746         * init.c (pthread_functions): Add __pthread_unwind.
9747         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
9748         Add ptr___pthread_unwind.
9749         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
9750         and unwind function.
9751         * Makefile (libpthread-routines): Add cleanup_compat,
9752         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
9753         table generation if necessary.
9754         * version.c: Record whether unwind support is compiled in.
9755         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
9756         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
9757         handler interfaces.
9758         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
9759         complication to generate unwind information for syscall wrappers.
9760         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
9761         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
9762         __cleanup_fct_attribute.
9764         * Makefile: Add rules to build and run tst-cleanup0.
9765         * tst-cleanup0.c: New file.
9766         * tst-cleanup0.expect: New file.
9768         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
9769         caller.  Optimize to avoid often unecessary local variable.
9771 2003-04-11  Roland McGrath  <roland@redhat.com>
9773         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
9774         sets variable `multidir'; include that.
9775         (generated): Add it.
9776         ($(objpfx)$(multidir)/crti.o): New target.
9777         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
9779 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
9781         * tst-attr2.c (do_test): Add cast to avoid warning.
9782         * tst-mutex4.c (do_test): Likewise.
9784 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
9786         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
9787         in child.
9789 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
9791         * Makefile (tests): Add tst-detach1.
9792         * tst-detach1.c: New file.
9794 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
9796         * sysdeps/pthread/pthread.h: Remove duplicate
9797         pthread_cleanup_{push,pop} definitions.
9799         * tst-barrier2.c: Eliminate warnings.
9800         * tst-cancel4.c: Likewise.
9801         * tst-cond4.c: Likewise.
9802         * tst-cond6.c: Likewise.
9803         * tst-detach1.c: Likewise.
9804         * tst-rwlock4.c: Likewise.
9805         * tst-rwlock6.c: Likewise.
9806         * tst-rwlock7.c: Likewise.
9807         * tst-sem3.c: Likewise.
9808         * tst-spin2.c: Likewise.
9809         * tst-umask1.c: Likewise.
9811 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
9813         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
9815 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
9817         * descr.h (struct pthread): Move cancelhandling member to the front.
9819 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
9821         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
9822         malloc_parent, and malloc_child statically.
9823         (__register_atfork_malloc): New function.
9824         (free_mem): Don't free any of the malloc_* variables on the list.
9825         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
9826         Define HAVE_register_atfork_malloc.
9828 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
9830         * sysdeps/pthread/createthread.c (create_thread): Add some more
9831         comments explaining when to set multiple_threads and when not.
9833         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9834         THREAD_ATOMIC_BIT_SET if not already defined.
9835         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9836         THREAD_ATOMIC_BIT_SET:
9837         * sysdeps/x86_64/tls.h: Likewise.
9838         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
9839         THREAD_ATOMIC_CMPXCHG_VAL.
9840         (_pthread_cleanup_pop_restore): Likewise.
9841         * cancellation.c (__pthread_enable_asynccancel): Likewise.
9842         (__pthread_enable_asynccancel_2): Likewise.
9843         (__pthread_disable_asynccancel): Likewise.
9844         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9845         (__libc_disable_asynccancel): Likewise.
9846         * init.c (sigcancel_handler): Likewise.
9847         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
9848         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
9850 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
9852         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
9853         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9854         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
9855         * Makefile (tests): Add tst-cancel11.
9856         * tst-cancel11.c: New file.
9858 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
9860         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
9861         round, not the first.  Use specific_used flag instead of local
9862         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
9863         (__free_tcb): Don't call deallocate_tsd here.
9864         (start_thread): Call deallocate_tsd here.
9865         * pthread_setspecific.c: Set specific_used flag really only when
9866         needed.
9867         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
9868         * tst-tsd3.c: New file.
9869         * tst-tsd4.c: New file.
9871 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
9873         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
9874         Use atomic_exchange_and_add instead of __lll_add.
9875         (__lll_mutex_timedlock): Likewise.
9876         Patch by Ian Wienand.
9878 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
9880         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9881         (SINGLE_THREAD_P): Fix typo.
9882         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
9884 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
9886         * Makefile (tests): Add tst-align.
9887         * tst-align.c: New file.
9888         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
9890         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
9891         function correctly.
9893         * tst-tsd2.c: Add casts to avoid warnings.
9895 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
9897         * descr.h (struct pthread): Move most often used elements to the front.
9899 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
9901         * Makefile (libpthread-routines): Add pthread_atfork.
9902         (libpthread-static-only-routines): Add pthread_atfork.
9904 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
9906         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
9907         of TLS_DTV_AT_TP.
9908         (INSTALL_DTV): Add parens.
9909         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
9910         Use passed descr instead of THREAD_SELF.
9911         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
9912         (__lll_mutex_timedlock_wait): Correct expected value after
9913         spurious wakeup.
9914         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
9915         Release lock before waking up the waiters.
9916         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
9917         criteria.  Reorderstruct passed to cleanup handler.  Fix
9918         handling of cancellation and failung pthread_mutex_unlock call.
9919         Use __pthread_enable_asynccancel_2 instead of
9920         __pthread_enable_asynccancel.
9921         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
9922         Return result of lock re-get if it fails.
9923         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
9924         for __pthread_cleanup_push.
9925         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
9926         completely broken rwlock implementation.
9927         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9928         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9929         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9930         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
9931         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9932         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
9933         versioned_symbol macro.
9934         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
9935         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
9937 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
9939         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
9940         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
9941         and __helper_tid.
9942         (struct timer): Remove th and bar field.
9943         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
9944         debugging code.  Create only one helper thread.
9945         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
9946         helper thread.
9947         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9948         Renamed.  Define statically.  Use thread info from siginfo.
9949         (__helper_once): New variable.
9950         (__helper_tid): New variable.
9951         (__reset_helper_control): New function.
9952         (__start_helper_thread): New function.
9954         * pthread_create.c (start_thread): Don't use setjmp inside
9955         __builtin_expect to work around gcc bug.
9957         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
9958         timer_delete syscall fails, but not with ENOSYS, set
9959         __no_posix_timers.
9961         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
9962         (timer_settime): Fix typo.
9963         * sysdeps/unix/sysv/linux/timer_getoverr.c
9964         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
9966 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
9968         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
9969         offset of cleanupbuf.__prev.
9971 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
9973         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
9974         of included file.
9976 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
9978         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
9979         NULL provide default definition to syscall.
9981 2003-03-25  Roland McGrath  <roland@redhat.com>
9983         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
9984         (timer_id2ptr): Fix typo.
9986 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
9988         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
9989         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
9990         * sysdeps/ia64/pthreaddef.h: Likewise.
9991         * sysdeps/powerpc/pthreaddef.h: Likewise.
9992         * sysdeps/s390/pthreaddef.h: Likewise.
9993         * sysdeps/sh/pthreaddef.h: Likewise.
9994         * sysdeps/x86_64/pthreaddef.h: Likewise.
9995         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
9996         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
9997         being changed.
9998         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
9999         SIGTIMER is not unblocked.
10000         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
10001         RT signal taken.
10002         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
10003         be send.
10004         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
10005         pass pointer through as ID.
10006         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
10007         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
10008         * sysdeps/unix/sysv/linux/timer_create.c: New file.
10009         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
10010         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
10011         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
10012         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
10013         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
10014         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
10015         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
10016         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
10017         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
10018         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
10019         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
10020         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
10021         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
10022         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
10023         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
10024         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
10025         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
10026         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
10027         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
10028         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
10029         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
10030         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
10031         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
10032         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
10033         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
10034         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
10035         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
10036         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
10037         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
10038         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
10040         * pthreadP.h: Remove FRAME_LEFT definition.
10041         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
10042         already left frame.  Programs which have this problem are not POSIX
10043         compliant.
10044         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
10046 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
10048         * sysdeps/pthread/tst-timer.c: Check return values of the
10049         functions we test.
10051 2003-03-23  Roland McGrath  <roland@redhat.com>
10053         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
10054         * tst-tls3mod.c: Likewise.
10055         * tst-tls1.c: Likewise.
10056         * tst-tls2.c: Likewise.
10058         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
10059         undefined behavior.
10061         * tst-join5.c (tf1, tf2): Add a cast.
10063         * Makeconfig (includes): Append -I$(..)nptl to this variable.
10065         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
10066         Don't test anything.
10067         * tst-cond4.c: Likewise.
10068         * tst-cond6.c: Likewise.
10069         * tst-flock2.c: Likewise.
10070         * tst-mutex4.c: Likewise.
10071         * tst-rwlock4.c: Likewise.
10072         * tst-signal1.c: Likewise.
10073         * tst-spin2.c: Likewise.
10074         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
10076         * tst-mutex4.c: Use test-skeleton.c.
10077         * tst-spin2.c: Likewise.
10078         * tst-sysconf.c: Likewise.
10079         * tst-barrier2.c: Likewise.
10080         * tst-cond4.c: Likewise.
10081         * tst-cond6.c: Likewise.
10082         * tst-rwlock4.c: Likewise.
10083         * tst-unload.c: Likewise.
10084         * tst-flock2.c (do_test): Use return instead of exit.
10086 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
10088         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
10090 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
10092         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
10093         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
10094         instead of __lll_compare_and_swap.
10095         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
10096         Likewise.
10097         Removed definition if __lll_compare_and_swap.
10099         * cancellation.c: Adjust for new form of compare&exchange macros.
10100         * cleanup_defer.c: Likewise.
10101         * init.c: Likewise.
10102         * libc-cancellation.c: Likewise.
10103         * old_pthread_cond_broadcast.c: Likewise.
10104         * old_pthread_cond_signal.c: Likewise.
10105         * old_pthread_cond_timedwait.c: Likewise.
10106         * old_pthread_cond_wait.c: Likewise.
10107         * pthread_cancel.c: Likewise.
10108         * pthread_create.c: Likewise.
10109         * pthread_detach.c: Likewise.
10110         * pthread_join.c: Likewise.
10111         * pthread_key_delete.c: Likewise.
10112         * pthread_setcancelstate.c: Likewise.
10113         * pthread_setcanceltype.c: Likewise.
10114         * pthread_timedjoin.c: Likewise.
10115         * pthread_tryjoin.c: Likewise.
10116         * sysdeps/pthread/createthread.c: Likewise.
10118 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
10120         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
10121         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
10122         definitions.  Replace uses with calls to atomic_* functions.
10123         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
10124         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
10125         __lll_test_and_set calls with atomic_exchange_and_add and
10126         atomic_exchange calls respectively.
10127         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
10128         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
10129         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
10130         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
10131         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
10132         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
10133         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
10135         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
10136         returns the old value.
10138 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
10140         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
10141         int for variable OLDVAL and correct inline assembler contraint.
10142         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
10143         type int for variable OLD.
10145         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
10146         only for s390-32.
10147         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
10148         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
10149         instead of multiple_threads field in the TCB.
10151 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
10153         * sysdeps/i386/i686/bits/atomic.h: Removed.
10154         * sysdeps/i386/i586/bits/atomic.h: Removed.
10155         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
10156         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
10157         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
10158         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
10159         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
10160         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
10161         * atomic.h: Removed.  Moved to glibc.
10163         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
10164         support for clock selection.
10166         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
10167         signalling waiters.
10169 2003-03-18  Roland McGrath  <roland@redhat.com>
10171         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
10172         Add __lll_rel_instr first.  Add memory clobber.
10173         (lll_mutex_unlock): Use __lll_test_and_set.
10174         From Paul Mackerras <paulus@samba.org>.
10176         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
10177         unconditionally.
10178         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
10179         (SINGLE_THREAD_P):  Add `header.' prefix.
10180         From Paul Mackerras <paulus@samba.org>.
10182         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
10183         pthread_timedjoin_np to ...
10184         (libpthread: GLIBC_2.3.3): ... here.
10185         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
10187         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
10188         Avoid shadowing VAL variable.
10190         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
10191         New macro.
10193 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
10195         * Makefile (tests): Add tst-cond11.
10196         * tst-cond11.c: New file.
10198         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
10199         struct passed to cleanup handler to eliminate one more
10200         instruction.
10201         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10203         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
10204         (pthrad_cond_t): Replace __unused field with __clock.
10206         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
10207         waken all waiters in cleanup handler.
10208         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
10209         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10211         * pthread_condattr_getclock.c: New file.
10212         * pthread_condattr_setclock.c: New file.
10213         * sysdeps/pthread/pthread.h: Declare these new functions.
10214         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
10215         * Makefile (libpthread-routines): Add the new functions.
10216         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
10217         Renamed field to value.  Document use of the bits.
10218         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
10219         change.
10220         * pthread_condattr_setpshared.c: Likewise.
10221         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
10222         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
10223         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
10224         Add __clock field.
10225         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
10226         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
10227         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
10228         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
10229         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
10230         Implement clock selection.
10231         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
10232         * pthread-errnos.sym: Add ENOSYS.
10233         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
10234         _POSIX_CLOCK_SELECTION.
10235         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
10237         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
10238         invalid .size directive.
10240 2003-03-17  Roland McGrath  <roland@redhat.com>
10242         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
10243         Formatting tweaks.
10245 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
10247         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
10248         Use __lll_add instead of spelling it out.  Use protected symbol names.
10249         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
10250         Use __lll_add.
10251         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
10252         Renamed from lll_compare_and_swap.  Use new name where necessary.
10253         (__lll_add): Defined.
10254         (__lll_dec_if_positive): Defined.
10255         (__lll_test_and_set): Defined.
10256         * sysdeps/ia64/pthread_spin_init.c: Removed.
10257         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
10258         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
10259         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
10260         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
10261         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
10262         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
10263         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
10264         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
10265         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
10266         __sync_lock_release_si.
10267         Patch by Jakub Jelinek.
10269         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
10270         Fix timeout handling.
10271         (__lll_timedwait_tid): Likewise.
10272         (lll_unlock_wake_cb): Wake up other waiters if necessary.
10273         Patch by Jakub Jelinek.
10275         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
10277 2003-03-17  Roland McGrath  <roland@redhat.com>
10279         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
10280         * sysdeps/pthread/pthread_spin_init.c: New file.
10281         * sysdeps/pthread/pthread_spin_unlock.c: New file.
10282         * sysdeps/powerpc/Makefile: New file.
10283         * sysdeps/powerpc/pthread_spin_lock.c: New file.
10284         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
10285         * sysdeps/powerpc/pthreaddef.h: New file.
10286         * sysdeps/powerpc/tcb-offsets.sym: New file.
10287         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
10288         * sysdeps/powerpc/tls.h: New file.
10289         * sysdeps/powerpc/bits/atomic.h: New file.
10290         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
10291         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
10292         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
10294         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
10295         * sysdeps/unix/sysv/linux/sem_post.c: New file.
10296         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
10297         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
10298         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
10299         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
10300         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
10301         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
10302         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
10303         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
10304         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
10305         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
10306         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
10307         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
10308         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
10310         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
10311         not gettimeofday.
10312         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
10313         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
10314         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
10315         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
10316         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10318 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
10320         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
10321         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
10322         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10323         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10324         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
10326 2003-03-16  Roland McGrath  <roland@redhat.com>
10328         * tst-fork4.c: Include <string.h>.
10329         * tst-signal2.c: Likewise.
10330         * tst-mutex5.c (do_test): exit -> return.
10331         * tst-mutex2.c: Include <stdlib.h>.
10333 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
10335         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
10336         (__lll_mutex_timedlock_wait): Correct expected value after
10337         spurious wakeup.  Otherwise we would never wait again.
10339         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
10340         zone versus inline asm stupidity.  Use correct instructions.
10342         * tst-rwlock6.c: Add some more status output.
10344 2003-03-15  Roland McGrath  <roland@redhat.com>
10346         * sysdeps/pthread/configure.in: New file.
10347         * sysdeps/pthread/configure: New file (generated).
10349 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
10351         * allocatestack.c (allocate_stack): Store the exact stack size of
10352         user allocated stacks.
10354 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
10356         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
10357         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
10358         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
10359         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
10360         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
10361         Use `header.' prefix.
10362         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
10364 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
10366         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
10367         __builtin_frame_address, use stack pointer.
10369         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
10370         instead of __builtin_frame_pointer.
10372 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
10374         * tst-basic1.c (do_test): Add cast to avoid warning.
10375         * tst-basic2.c (do_test): Likewise.
10377         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
10378         amount of stack correction.
10380         * tst-fork4.c: Use test-skeleton.c.
10382 2003-03-14  Roland McGrath  <roland@redhat.com>
10384         * init.c: Fix typo "#eli" for "#else".
10386 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
10388         * allocatestack.c (__stack_user): Use hidden_data_def.
10389         * pthread_create.c (__pthread_keys): Likewise.
10391         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
10393 2003-03-14  Roland McGrath  <roland@redhat.com>
10395         * tst-fork4.c: New file.
10396         * Makefile (tests): Add it.
10398         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
10399         we always define the padding space.
10400         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
10401         stopped supporting its own extensions fully.
10402         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
10403         struct also called `header', so `header.multiple_threads' is the field
10404         name to use on all machines.
10405         * allocatestack.c (allocate_stack): Use `header.' prefix.
10406         * sysdeps/pthread/createthread.c (create_thread): Likewise.
10407         * pthread_create.c (__pthread_create_2_1): Likewise.
10408         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
10409         (THREAD_SELF): Likewise.
10410         * sysdeps/x86_64/tls.h: Likewise.
10411         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
10412         (SINGLE_THREAD_P): Likewise.
10413         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
10414         (SINGLE_THREAD_P): Likewise.
10415         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
10416         (SINGLE_THREAD_P): Likewise.
10418         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
10419         value directly.
10421 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
10423         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
10424         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
10426         * pthread_create.c (start_thread): setjmp is expected to return 0.
10428         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
10429         (THREAD_GETMEM_NC): Likewise.
10431 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
10433         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
10434         and the size of the stack which must be allocated is a multiple,
10435         allocate one more page.
10436         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
10437         MULTI_PAGE_ALIASING.
10439 2003-03-13  Roland McGrath  <roland@redhat.com>
10441         * pthread_create.c (start_thread): Set EXITING_BIT after the
10442         event-reporting (and destructors), not before.
10444 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
10446         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
10447         lll_futex_wake): Declare register variables as long int instead of
10448         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
10449         Make syscall arguments clobbered by the syscall.
10450         (lll_futex_wait): Define using lll_futex_timed_wait.
10452         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
10453         to void *.
10455         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
10456         PPID if [! NDEBUG].
10458         * allocatestack.c (nptl_ncreated): Only declare if
10459         COLORING_INCREMENT != 0.
10461         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
10462         (__libc_enable_asynccancel_2): Remove prototype.
10464         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
10465         ctid to match kernel.
10467 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
10469         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
10470         libc_multiple_threads.
10471         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
10472         __libc_multiple_threads to...
10473         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
10475         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
10476         versioning.
10477         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10478         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10480         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
10481         (__pthread_once_internal): Define.
10483         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
10484         macros instead of .symver directly.
10485         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
10486         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
10488         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
10489         * sysdeps/x86_64/tcb-offsets.sym: New file.
10490         * sysdeps/x86_64/Makefile: New file.
10492         * sysdeps/i386/tcb-offsets.sym: Add SELF.
10493         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
10494         to access own pthread_t in TCB.
10495         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10496         Likewise.
10497         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10498         Likewise.
10499         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10501 2003-03-12  Roland McGrath  <roland@redhat.com>
10503         * pthread-errnos.sym: New file.
10504         * Makefile (gen-as-const-headers): New variable, list that file.
10505         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
10506         header <pthread-errnos.h> instead of defining errno values here.
10507         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
10508         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
10509         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
10510         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10511         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10512         Likewise.
10513         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10514         Likewise.
10515         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
10516         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10517         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10518         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10519         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10520         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10521         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
10522         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
10523         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
10524         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
10525         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
10526         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
10527         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
10528         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
10529         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
10530         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
10531         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
10532         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
10533         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
10534         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
10535         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10536         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
10537         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
10538         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
10539         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
10540         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
10541         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
10543         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
10544         CLONE_CHILD_SETTID worked.
10546 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
10548         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
10549         file.
10550         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
10551         file.
10553         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
10554         (pthread_cond_t): Add padding.
10556         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
10557         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
10558         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
10560         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
10561         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
10562         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
10563         (__pthread_rwlock_timedrdlock): Likewise.
10564         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
10565         (__pthread_rwlock_wrlock): Likewise.
10566         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
10567         (__pthread_rwlock_rdlock): Likewise.
10569         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
10571         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
10572         result of lock re-get if it fails.
10574 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
10576         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
10577         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
10578         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
10579         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
10580         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
10581         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
10582         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
10583         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
10584         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10585         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10587         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
10588         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
10590         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
10591         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
10592         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
10593         (create_thread): Likewise.
10594         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
10595         * init.c (__pthread_initialize_minimal_internal): Initialize
10596         __libc_multiple_threads_ptr if necessary.
10597         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
10598         __pthread_multiple_threads and __libc_multiple_threads_ptr.
10599         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
10600         __libc_multiple_threads.
10601         (__libc_pthread_init): Return pointer to __libc_pthread_init if
10602         necessary.
10604         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
10605         (THREAD_SETMEM_NC): Likewise.
10607         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
10608         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
10609         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
10610         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
10612         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
10613         Eliminate one entire instruction.
10615         * cancellation.c (__pthread_enable_asynccancel_2): New function.
10616         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
10617         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
10618         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
10619         instead of __pthread_enable_asynccancel.
10620         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10621         (__pthread_cond_wait): Likewise.
10622         * sysdeps/pthread/pthread_cond_timedwait.c
10623         (__pthread_cond_timedwait): Likewise.
10624         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
10626         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10627         (__condvar_cleanup): Wake up all waiters in case we got signaled
10628         after being woken up but before disabling asynchronous
10629         cancellation.
10630         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10631         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
10632         (__condvar_cleanup): Likewise.
10634         * init.c (__NR_set_tid_address): If already defined, don't redefine.
10635         Make it an error if architecture has no #if case.  Add x86-64.
10637         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
10638         pt-initfini.s generation.
10640         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
10641         (TLS_INIT_TP): Fix typo.
10643 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
10645         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
10646         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
10648         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
10649         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
10650         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
10651         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
10652         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
10653         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10654         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10655         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10657 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
10659         * sysdeps/pthread/pthread_cond_timedwait.c
10660         (__pthread_cond_timedwait): Return the result of the final
10661         locking.  If it succeeds, the regular function return value.
10663         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
10664         Return result of the final locking.
10665         * version.c (__nptl_main): Work around problems with the strange
10666         INTERNAL_SYSCALL macro on ppc32.
10667         * init.c (__pthread_initialize_minimal_internal): Unblock
10668         SIGCANCEL in case the parent blocked it.
10669         Reported by Paul Mackerras <paulus@samba.org>.
10671         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
10672         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
10673         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
10675 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
10677         * sysdeps/pthread/pthread_cond_timedwait.c
10678         (__pthread_cond_timedwait): Unlock and fail if
10679         __pthread_mutex_unlock_internal failed.
10681         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
10682         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
10683         Use ARCH_CLONE.
10684         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
10685         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
10686         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
10687         ALLOCATE_STACK): New macros.
10688         (TLS_TPADJ): New macro.
10689         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
10690         (allocate_stack): Handle TLS_DTV_AT_TP and
10691         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
10692         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
10693         Don't set PD->self.
10694         * init.c [__ia64__] (__NR_set_tid_address): Define.
10696         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
10697         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
10698         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
10699         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
10700         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
10701         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
10702         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
10703         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
10704         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
10705         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
10706         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
10707         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
10708         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
10709         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
10710         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
10711         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
10712         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
10713         * sysdeps/ia64/bits/atomic.h: New file.
10714         * sysdeps/ia64/Makefile: New file.
10715         * sysdeps/ia64/pthread_spin_init.c: New file.
10716         * sysdeps/ia64/pthread_spin_lock.c: New file.
10717         * sysdeps/ia64/pthread_spin_trylock.c: New file.
10718         * sysdeps/ia64/pthread_spin_unlock.c: New file.
10719         * sysdeps/ia64/pthreaddef.h: New file.
10720         * sysdeps/ia64/tcb-offsets.sym: New file.
10721         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
10722         * sysdeps/ia64/tls.h: New file.
10724         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
10725         to syscall instead of no arguments.
10727 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
10729         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
10730         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
10731         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
10732         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
10734         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
10735         unused code.
10737         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
10739         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10740         lowlevelbarrier.sym.
10741         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
10742         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
10743         Include lowlevelbarrier.h and don't define offsets locally.
10744         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
10746         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
10747         (__lll_mutex_lock_wait): Reverse order of first two parameters.
10748         (__lll_mutex_timedlock_wait): Likewise.
10749         (lll_mutex_lock): Adjust asm for that.
10750         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
10751         (lll_lock): Adjust asm for operand order change.
10752         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
10753         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
10755         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
10756         Reverse order of parameters.
10757         (__lll_timedwait_tid): Remove regparms attribute.
10758         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
10759         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
10761         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10762         (__lll_timedwait_tid): Remove one unnecessary instruction.
10764         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
10765         __lll_mutex_timedlock_wait only for NOT_IN_libc.
10766         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
10767         lowlevelmutex.S.
10769         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
10770         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
10771         for NOT_IN_libc.
10772         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
10773         lowlevellock.S.
10775         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
10776         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
10777         for libc.so.
10778         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
10779         define LOCK here (if UP is not defined).  The actual code is in
10780         lowlevelmutex.S.
10782         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
10783         LOCK is already defined.  Don't define lll_unlock_wake_cb and
10784         __lll_timedwait_tid for libc.so.
10785         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
10786         define LOCK here (if UP is not defined).  The actual code is in
10787         lowlevellock.S.
10789         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
10790         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
10791         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
10792         instead of lowlevelsem.h.
10793         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10794         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10795         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10797         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10798         lowlevelrwlock.sym.
10799         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
10800         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
10801         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
10803         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
10804         register loading.
10805         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
10806         last changed.  D'oh.
10808         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
10810         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
10811         of __libc_locking_needed.
10812         (lll_trylock): Initialize %eax to zero.
10814         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
10815         pthread_cond_t definition.
10817 2003-03-10  Roland McGrath  <roland@redhat.com>
10819         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
10820         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
10821         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
10822         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
10823         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
10825         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
10826         Instead of setting PD->multiple_threads, set globals
10827         __pthread_multiple_threads and __libc_multiple_threads.
10828         * sysdeps/pthread/createthread.c (create_thread): Likewise.
10829         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
10830         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
10832         * descr.h (struct pthread): Conditionalize first member on
10833         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
10834         containing an anonymous tcbhead_t.  Move `list' member out.
10835         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
10836         * allocatestack.c: Remove use of `header.data.' prefix.
10837         * pthread_create.c: Likewise.
10838         * init.c (__pthread_initialize_minimal_internal): Likewise.
10839         * sysdeps/pthread/createthread.c (create_thread): Likewise.
10840         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
10841         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
10842         * sysdeps/x86_64/tls.h: Likewise.
10843         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
10844         (SINGLE_THREAD_P): Likewise.
10845         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
10846         (SINGLE_THREAD_P): Likewise.
10847         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
10848         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
10850 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
10852         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
10854         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
10855         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10857         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
10858         leftovers from the ia32 code.
10860         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
10861         memory load.
10862         (clear_once_control): Don't load %esi.
10864         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
10865         handling.
10867         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10869         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
10870         * sysdeps/unix/sysv/linux/createthread.c: ...here.
10872         * Makefile (tests): Add tst-cond10.
10873         * tst-cond10.c: New file.
10875 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
10877         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
10878         * tst-signal3.c (do_test): Likewise.
10879         * tst-sem5.c (do_test): Likewise.
10880         * tst-kill6.c (do_test): Likewise.
10881         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
10883         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
10884         of inc/dec.
10885         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
10886         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
10887         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
10888         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
10889         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10890         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10891         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10892         Likewise.
10893         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10894         Likewise.
10895         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
10896         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10897         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10898         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10899         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10900         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
10901         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10902         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10904         * allocatestack.c (allocate_stack): If mprotect() fails free the
10905         TLS memory.
10907 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
10909         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
10911         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
10912         lll_wake_tid.  This was used only to work around kernel limits in
10913         the early days.
10914         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
10915         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
10916         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10917         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
10919         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
10920         (__pthread_initialize_minimal_internal): Change initialization of
10921         __static_tls_align_m1 appropriately.
10922         * pthreadP.h (__static_tls_align_m1): Renamed from
10923         __static_tls_align.
10924         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
10925         instead of __static_tls_align-1.
10927 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
10929         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
10931         * pthread_create.c: Define __pthread_keys using nocommon
10932         attribute, not by placing it explicitly in bss.
10933         Remove DEFINE_DEALLOC definition.  Not needed anymore.
10935         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
10936         Use it in mmap call to allocate stacks.
10938         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
10940         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
10941         result of the thread function.
10943 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
10945         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
10946         version is just fine.
10948         * sysdeps/unix/sysv/linux/libc_pthread_init.c
10949         (__pthread_child_handler): Renamed from pthread_child_handler,
10950         exported, and marked hidden.  Change all users.
10951         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
10952         free __pthread_child_handler from child list.
10954 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
10956         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
10958         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
10959         Fix handling of cancellation and failing pthread_mutex_unlock call.
10960         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10961         (__pthread_cond_wait): Likewise.
10963         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
10964         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
10965         lll_futex_timed_wait call.
10966         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
10967         (pthread_rwlock_timedwrlock): Likewise.
10969         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
10970         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
10971         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
10973         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
10974         check of lll_futex_wake return value.
10976 2003-03-03  Roland McGrath  <roland@redhat.com>
10978         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
10980         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
10981         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
10982         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
10984 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
10986         * sysdeps/pthread/timer_create.c (timer_create): Return correct
10987         error for CPU clocks.
10989         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
10990         _POSIX_MONOTONIC_CLOCK.
10991         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
10993         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
10994         recent kernels.
10996 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
10998         * descr.h (struct pthread): Move cleanup field to the front.
11000 2003-03-01  Roland McGrath  <roland@redhat.com>
11002         * sem_open.c (sem_open): Braino fix.
11004 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
11006         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
11007         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
11008         __pthread_cleanup_pop functionality.
11009         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
11011         * descr.h (struct pthread): Move tid field to the front now that
11012         it is often used.
11014         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
11015         (__lll_mutex_timedlock_wait): Remove.
11016         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
11017         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
11018         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
11019         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
11020         (lll_unlock_wake_cb): Don't save and restore %esi.
11021         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
11022         %esi.
11023         (__lll_timedwait_tid): Add alignment.
11024         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
11025         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
11026         %esi.
11027         (__lll_timedwait_tid): Removed.
11028         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
11029         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
11030         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
11031         (pthread_barrier_wait): Don't save, load, and restore %esi for
11032         last thread.
11033         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
11034         (__pthread_cond_signal): Don't save, load, and restore %esi.
11035         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
11036         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
11037         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
11038         Don't save, load, and restore %esi.
11040 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
11042         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
11043         Release lock before waking up the waiters.
11045         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
11047         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
11048         (reader_thread): Likewise.
11050         * sysdeps/pthread/pthread_rwlock_unlock.c
11051         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
11052         to wake up readers if there are none.
11054         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
11055         Release internal lock before wake threads.
11057 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
11059         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
11060         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
11061         predefined.
11062         * tst-rwlock9.c: Likewise.
11063         * tst-rwlock10.c: New file.
11064         * tst-rwlock11.c: New file.
11066         * Makefile (tests): Add tst-dlsym1.
11067         * tst-dlsym1.c: New file.
11069         * init.c (__pthread_initialize_minimal_internal): Set
11070         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
11071         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
11073 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
11075         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
11077         * tst-cond2.c: Fix sychronization with child.
11079         * tst-rwlock8.c (reader_thread): Remove unused variable.
11081         * Makefile: Add rules to build and run tst-tls3.
11082         * tst-tls3.c: New file.
11083         * tst-tls3mod.c: New file.
11085         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
11086         * tst-rwlock8.c: New file.
11087         * tst-rwlock9.c: New file.
11088         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
11089         complete broken rwlock implementation.
11090         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11091         Likewise.
11092         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11093         Likewise.
11094         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
11095         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
11096         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
11097         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
11098         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
11099         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
11100         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
11102 2003-02-23  Roland McGrath  <roland@redhat.com>
11104         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
11106 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
11108         * Makefile (tests): Add tst-context1.
11109         * tst-context1.c: New file.
11111         * Makefile (tests): Add tst-tls1 and tst-tls2.
11112         * tst-tls1.c: New file.
11113         * tst-tls2.c: New file.
11115         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
11116         for failed cmpxchg.
11118         * pthread_create.c (start_thread): Set EXITING_BIT early.
11120         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
11121         (THREAD_GETMEM_NC): Likewise.
11123 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
11125         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
11126         off 3 more bytes by using offset-less instructions when possible.
11128         * Makefile: Add dependency for $(objpfx)version.d.
11130         * eintr.c (eintr_source): Add unnecessary return but the compiler
11131         insists.
11133         * tst-kill3.c: Include <unistd.h>.
11135 2003-02-21  Roland McGrath  <roland@redhat.com>
11137         * pthread_create.c (start_thread): Call __libc_thread_freeres.
11139 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
11141         * Makefile (tests): Add tst-eintr1.
11142         (distribute): Add eintr.c.
11143         * tst-eintr1.c: New file.
11144         * eintr.c: New file.
11146         * pthread_cancel.c (pthread_cancel): Use tkill directly.
11148         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
11149         Disallow sending SIGCANCEL.
11151         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
11152         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
11153         * tst-kill1.c: New file.
11154         * tst-kill2.c: New file.
11155         * tst-kill3.c: New file.
11156         * tst-kill5.c: New file.
11157         * tst-kill6.c: New file.
11158         * tst-basic7.c: Renamed to...
11159         * tst-kill4.c: ...this.
11161 2003-02-21  Roland McGrath  <roland@redhat.com>
11163         * Makefile (install-lib-ldscripts): New variable.
11165 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
11167         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
11168         * pthread_cancel.c: Use INVALID_TD_P.
11169         * pthread_detach.c: Likewise.
11170         * pthread_getschedparam.c: Likewise.
11171         * pthread_setschedparam.c: Likewise.
11172         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
11173         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
11174         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
11175         * pthread_timedjoin.c: Likewise.
11177         * tst-basic7.c: Include <signal.h>.
11179         * pthread_join.c (pthread_join): Limited checking for invalid
11180         descriptors.
11181         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
11183 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
11185         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
11186         beginning of the loop.  Clear the entire first block of TSD.
11187         * Makefile (tests): Add tst-key4.
11188         * tst-key4.c: New file.
11190 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
11192         * Makefile (tests): Add tst-basic7.
11193         * tst-basic7.c: New file.
11195         * pthread_create.c (deallocate_tsd): Mark as internal_function.
11196         Add some more __builtin_expect.
11198         * pthreadP.h: Define dummy version of DEBUGGING_P.
11200 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
11202         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
11203         _POSIX_THREAD_PRIORITY_SCHEDULING.
11204         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
11205         _XOPEN_REALTIME_THREADS.
11206         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
11208         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
11209         kernel returns EINVAL for PID <= 0, work around it.
11211         * Makefile (tests): Add tst-signal5.
11212         * tst-signal5.c: New file.
11214         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
11215         and LOGIN_NAME_MAX.
11217         * tst-cancel1.c (tf): Block all signals.
11219         * Makefile (tests): Add tst-basic6.
11220         * tst-basic6.c: New file.
11222         * tst-basic1.c: Add test for process ID.
11224         * Makefile (tests): Add tst-cancel10.
11225         * tst-cancel10.c: New file.
11227         * Makefile (tests): Add tst-signal4.
11228         * tst-signal4.c: New file.
11230         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
11231         __sigismember instead of sigismember.  Add __builtin_expect.
11233 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
11235         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
11236         pthread_setcancelstate, and pthread_rwlock_setpshared.
11238         * tst-cancel7.c (do_test): Make sure the pid file exists before
11239         canceling the thread.
11241         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
11242         pthread_rwlock_timedrdlock tests.
11243         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
11244         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11245         Check for invalid tv_nsec field.
11246         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11247         Likewise.
11249         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
11250         recursive mutex of overflow.
11252         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
11254         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
11255         going into an endless loop.
11256         * Makefile (tests): Add tst-cancel9.
11257         * tst-cancel9.c: New file.
11259         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
11261 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
11263         * tst-mutex5.c (do_test): Add more timedlock tests.
11265         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
11266         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
11268         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
11269         use INLINE_SYSCALL.  Error number is returned, not -1.
11271         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
11272         and __deallocate_stack with internal_function.
11273         * pthread_create.c: Adjust definitions appropriately.
11274         * allocatestack.c: Likewise.
11276         * pthread_join.c: Add one more __builtin_expect.
11277         * pthread_timedjoin.c: Likewise.
11279         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
11280         not data of sequence number does not match.
11281         Add one __builtin_expect.
11283         * Makefile (tests): Add tst-clock1.
11284         * tst-clock1.c: New file.
11286         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
11287         negative arguments.
11288         * Makefile (tests): Add tst-basic5.
11289         * tst-basic5.c: New file.
11291 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
11293         * Makefile (tests): Add tst-basic4.
11294         * tst-basic4.c: New file.
11296         * pthreadP.h: Add declaraction for __nptl_nthreads.
11297         * pthread_create.c: Define __nptl_nthreads
11298         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
11299         after thread is done.  If then zero, call exit(0).
11300         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
11301         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
11302         * init.c (pthread_functions): Initialize ptr_nthreads.
11303         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
11304         (__reclaim_stacks): Decrement __nptl_nthreads.
11305         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
11306         Define.
11307         * Makefile (tests): Add tst-basic3.
11308         * tst-basic3.c: New file.
11310         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
11311         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
11312         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
11313         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
11314         if asynchronous canceling is enabled.
11315         * pthread_join.c (pthread_join): When recognizing circular joins,
11316         take into account the other thread might be already canceled.
11317         * Makefile (tests): Add tst-join5.
11318         * tst-join5.c: New file.
11320         * Makefile (tests): Add tst-join4.
11321         * tst-join4.c: New file.
11323 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
11325         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
11327 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
11329         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
11330         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
11331         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
11332         warning.
11333         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
11334         to avoid warning.
11335         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
11336         error if lll_futex_wake failed.
11338 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
11340         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
11341         handling of cancellation and failung pthread_mutex_unlock call.
11342         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
11343         * Makefile (tests): Add tst-cond8 and tst-cond9.
11344         * tst-cond8.c: New file.
11345         * tst-cond9.c: New file.
11347         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
11349         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
11350         non-standard initializers with __USE_GNU.
11352         * Makefile (tests): Add tst-cleanup3.
11353         * tst-cleanup3.c: New file.
11355 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
11357         * Makefile (tests): Add tst-attr1 and tst-attr2.
11358         * tst-attr1.c: New file.
11359         * tst-attr2.c: New file.
11361         * Makefile: Add rules to build and run tst-atfork2 test.
11362         * tst-atfork2.c: New file.
11363         * tst-atfork2mod.c: New file.
11365         * sysdeps/unix/sysv/linux/unregister-atfork.c
11366         (__unregister_atfork): Free the memory allocated for the handlers
11367         after removing them from the lists.
11369         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
11370         cleanup function.
11372         * tst-atfork1.c (do_test): Wait for the child we forked.
11373         Report error in child.
11375         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
11377         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
11379 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
11381         * Makefile (tests): Add tst-cancel8.
11382         * tst-cancel8.c: New file.
11384         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
11385         clearing of control variable.
11386         * Makefile (tests): Add tst-once3 and tst-once4.
11387         * tst-once3.c: New file.
11388         * tst-once4.c: New file.
11390 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
11392         * sysdeps/sh/Makefile: New file.
11393         * sysdeps/sh/bits/atomic.h: New file.
11394         * sysdeps/sh/pthread_spin_init.c: New file.
11395         * sysdeps/sh/pthread_spin_lock.c: New file.
11396         * sysdeps/sh/pthread_spin_trylock.S: New file.
11397         * sysdeps/sh/pthread_spin_unlock.S: New file.
11398         * sysdeps/sh/pthreaddef.h: New file.
11399         * sysdeps/sh/tcb-offsets.sym: New file.
11400         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
11401         * sysdeps/sh/tls.h: New file.
11402         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
11403         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
11404         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
11405         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
11406         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
11407         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
11408         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
11409         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
11410         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
11411         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
11412         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
11413         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
11414         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
11415         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
11416         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
11417         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
11418         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
11419         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
11420         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
11421         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
11422         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
11423         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
11424         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
11425         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
11426         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
11427         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
11428         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
11429         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
11430         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
11431         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
11433 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
11435         * tst-cond2.c: Rearrange code to not rely on behavior undefined
11436         according to POSIX.
11438         * tst-basic2.c (do_test): Lock mutex before creating the thread.
11440 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
11442         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
11443         (TLS_GET_FS): New #define.
11444         (TLS_SET_FS): New #define.
11445         Correct value of __NR_set_thread_area.
11447         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
11449 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
11451         * Makefile (tests): Add tst-popen1.
11452         * tst-popen1.c: New file.
11454         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
11455         but inactive generalization.
11456         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
11457         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
11458         Minor optimization, remove one instruction.
11459         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
11461 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
11463         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
11465 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
11467         * init.c (__NR_set_tid_address): Add #ifdef for s390.
11468         * sysdeps/pthread/pthread_barrier_wait.c: New file.
11469         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
11470         * sysdeps/pthread/pthread_cond_signal.c: New file.
11471         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
11472         * sysdeps/pthread/pthread_cond_wait.c: New file.
11473         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
11474         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
11475         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
11476         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
11477         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
11478         * sysdeps/s390/Makefile: New file.
11479         * sysdeps/s390/bits/atomic.h: New file.
11480         * sysdeps/s390/pthread_spin_init.c: New file.
11481         * sysdeps/s390/pthread_spin_lock.c: New file.
11482         * sysdeps/s390/pthread_spin_trylock.c: New file.
11483         * sysdeps/s390/pthread_spin_unlock.c: New file.
11484         * sysdeps/s390/pthreaddef.h: New file.
11485         * sysdeps/s390/tcb-offsets.sym: New file.
11486         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
11487         * sysdeps/s390/tls.h: New file.
11488         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
11489         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
11490         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
11491         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
11492         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
11493         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
11494         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
11495         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
11496         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
11497         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
11498         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
11499         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
11500         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
11501         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
11502         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
11503         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
11504         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
11505         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
11506         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
11507         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
11508         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
11509         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
11510         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
11512 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
11514         * atomic.h: Add a couple more default implementations.
11515         (atomic_compare_and_exchange_acq): Use
11516         __arch_compare_and_exchange_32_acq in return value definition.  It
11517         always exists.
11518         (atomic_bit_set): Renamed from atomic_set_bit.
11519         Add missing atomic_ prefixes.
11521         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
11522         thread library is available, use correct value to mark initialized
11523         once variable.
11525 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
11527         * allocatestack.c (allocate_stack): Use __getpagesize instead of
11528         __sysconf to determine pagesize.
11530         * pthread_create.c: Include <atomic.h>.
11531         * allocatestack.c (allocate_stack): Implement coloring of the
11532         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
11533         size minus one.  Adjust users.
11534         * sysdeps/i386/i686/Makefile: New file.
11536 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
11538         * allocatestack.c: Improve comment throughout the file.
11540         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
11541         (__lll_lock_wait): Add branch prediction.
11542         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
11543         (__lll_lock_wait): Likewise.
11544         (lll_unlock_wake_cb): Removed.
11546 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
11548         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
11549         _POSIX_THREAD_PRIORITY_SCHEDULING.
11551 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
11553         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
11554         Fix return type of ptr___pthread_getspecific.
11556 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
11558         * Makefile (tests): Add tst-umask1.
11559         (tst-umask1-ARGS): Define.
11560         * tst-umask1.c: New file.
11562 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
11564         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
11565         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
11566         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
11567         pthread_rwlock_unlock.
11568         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
11569         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
11570         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
11571         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
11572         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11573         New file.
11574         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
11575         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11576         New file.
11577         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
11578         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
11579         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
11580         New file.
11581         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
11582         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
11583         New file.
11584         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
11585         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
11586         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
11587         New file.
11588         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
11589         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
11590         New file.
11591         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
11593         * Makefile (libpthread-routines): Remove lowlevelcond and
11594         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
11595         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
11596         and pthread_cond_broadcast.
11597         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
11598         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
11599         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
11600         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
11601         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
11602         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
11603         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
11604         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
11605         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
11606         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
11607         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
11608         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
11609         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
11610         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
11611         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
11612         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
11613         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
11614         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
11615         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
11616         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
11617         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
11618         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
11619         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
11620         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
11621         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
11622         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
11623         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
11624         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
11625         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
11626         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
11627         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
11629         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
11630         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
11631         of the code is moved to ...
11632         * sysdeps/pthread/createthread.c: ...here.  New file.
11634 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
11636         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
11637         (__new_sem_post): Clear %eax before returning.
11638         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
11640         * Makefile (tests): Add tst-cleanup2.
11641         * tst-cleanup2.c: New file.
11643         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
11644         Interpret first parameter correctly.
11646 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
11648         * Makefile (headers): Add bits/semaphore.h.
11650 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
11652         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
11653         if not SHARED.
11655 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
11657         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
11658         must be used and mapping failed.
11659         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
11661         * Makefile (CFLAGS-pthread_self.os): Define this, not
11662         CFLAGS-pthread_self.c.
11664 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
11666         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
11667         lll_unlock_wake_cb.
11669         * Makefile (libpthread-routines): Add version.  Add rules to build
11670         version.os and banner.h.
11671         * version.c: New file.
11673 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
11675         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
11676         the alias unconditional.
11677         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
11679 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
11681         * Makefile (CFLAGS-pthread_self.c): New definition.
11683 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
11685         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
11686         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
11687         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
11688         * init.c (__pthread_initialize_minimal_internal): Likewise.
11690 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
11692         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
11694         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
11695         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11696         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11697         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
11698         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11699         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11701 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
11703         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
11704         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
11705         * tst-cancel-wrappers.sh: Remove all exceptions.
11707 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
11709         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
11710         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
11712         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
11713         Use __libc_pthread_functions array if SHARED.
11715         * pthreadP.h: Move pthread_cond_2_0_t definition to...
11716         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
11718         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
11719         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
11720         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
11721         __libc_ptf_call instead of __libc_maybe_call.
11722         (PTF): New #define.
11723         (__libc_cleanup_region_start): Wrap function name with PTF call.
11724         (__libc_cleanup_region_end): Likewise.
11725         (__libc_cleanup_end): Likewise.
11727         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
11728         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
11729         * pthread_key_create.c: Add __pthread_key_create_internal alias.
11730         * pthreadP.h: Add prototypes.
11732         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
11733         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
11734         __pthread_rwlock_unlock aliases.
11735         * pthreadP.h: Add prototypes for new aliases.
11737         * pthreadP.h (struct pthead_functions): Moved to...
11738         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
11739         * init.c (pthread_functions): Add initializers for new elements.
11741         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
11742         __pthread_cleanup_pop_restore aliases.
11743         * pthreadP.h: Add prototypes.
11745         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
11746         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
11747         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
11748         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
11749         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
11750         * pthreadP.h: Adjust prototypes and callers.
11752 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
11754         * Makefile (tests): Add tst-cancel7.
11755         (tst-cancel7-ARGS): New variable.
11756         * tst-cancel7.c: New file.
11758         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
11759         around gcc defficiencies.
11760         * old_pthread_cond_signal.c: Likewise.
11761         * old_pthread_cond_timedwait.c: Likewise.
11762         * old_pthread_cond_wait.c: Likewise.
11764         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
11766 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
11768         * Makefile (tests): Add tst-cond7.
11769         * tst-cond7.c: New file.
11771         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11772         (condvar_cleanup): Get condvar address from the right place.
11774         * atomic.h: Correct definitions of atomic_full_barrier,
11775         atomic_read_barrier, atomic_write_barrier.
11777         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
11778         race-free.
11779         * old_pthread_cond_signal.c: Likewise.
11780         * old_pthread_cond_timedwait.c: Likewise.
11781         * old_pthread_cond_wait.c: Likewise.
11783 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
11785         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
11787 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
11789         * pthreadP.h (pthread_cond_2_0_t): New type.
11790         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
11791         Use new type for the 2.0 condvar function prototypes.
11792         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
11793         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
11794         parameter.
11795         * old_pthread_cond_destroy.c: Likewise.
11796         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
11797         * old_pthread_cond_signal.c: Likewise.
11798         * old_pthread_cond_timedwait.c: Likewise.
11799         * old_pthread_cond_wait.c: Likewise.
11801         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11802         (__pthread_cond_wait): Don't save cancellation mode and seq value
11803         in same location.
11805         * herrno.c (__h_errno_location): Don't define as weak.
11807 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
11809         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
11810         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
11811         and pthread_cond_wait.
11812         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
11813         Renamed to...
11814         (__pthread_cond_broadcast_2_0): ... this.
11815         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
11816         Renamed to...
11817         (__pthread_cond_destroy_2_0): ... this.
11818         * old_pthread_cond_init.c (__old_pthread_cond_init):
11819         Renamed to...
11820         (__pthread_cond_init_2_0): ... this.
11821         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
11822         Renamed to...
11823         (__pthread_cond_signal_2_0): ... this.
11824         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
11825         Renamed to...
11826         (__pthread_cond_wait_2_0): ... this.
11827         * pthread_cond_destroy.c: Include shlib-compat.h.
11828         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
11829         * pthread_cond_init.c: Include shlib-compat.h.
11830         (pthread_cond_init): Change strong_alias into versioned_symbol.
11831         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
11832         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
11833         fields.
11834         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
11835         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
11836         __pthread_cond_wait_2_0): New prototypes.
11837         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
11838         __old_pthread_cond_init, __old_pthread_cond_signal,
11839         __old_pthread_cond_wait): Removed.
11840         * init.c: Include shlib-compat.h.
11841         (pthread_functions): Guard ptr___pthread_attr_init_2_0
11842         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
11843         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
11844         ptr___pthread_cond_*_2_0 fields.
11845         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
11846         pthread_cond_*@GLIBC_2.0 compatibility symbols.
11848         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
11849         LIBC_SIGACTION was not yet defined.
11850         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
11851         [!defined LIBC_SIGACTION] (__sigaction): New function and
11852         libc_hidden_weak.
11853         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
11854         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
11856 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
11858         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
11860 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
11862         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
11863         New, larger type definition.
11864         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
11865         implementation.
11866         * Versions [libpthread]: Add definitions for new pthread_cond_*
11867         interfaces for version GLIBC_2.3.2.
11868         * pthread_cond_init.c: Update initialization for new type definition.
11869         * Makefile (libpthread-routines): Remove pthread_cond_wait,
11870         pthread_cond_timedwait, pthread_cond_signal, and
11871         pthread_cond_broadcast.  Add old_pthread_cond_init,
11872         old_pthread_cond_destroy, old_pthread_cond_wait,
11873         old_pthread_cond_timedwait, old_pthread_cond_signal, and
11874         old_pthread_cond_broadcast.
11875         * old_pthread_cond_broadcast.c: New file.
11876         * old_pthread_cond_destroy.c: New file.
11877         * old_pthread_cond_init.c: New file.
11878         * old_pthread_cond_signal.c: New file.
11879         * old_pthread_cond_timedwait.c: New file.
11880         * old_pthread_cond_wait.c: New file.
11881         * pthreadP.h: Add prototypes for the compatibility interfaces.
11883         * pthread_cond_destroy.c: Don't include <errno.h>.
11885 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
11887         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
11888         unnecessary zero offset when addressing MUTEX.
11890 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
11892         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
11893         __register_atfork.
11894         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
11895         for __register_atfork.
11897 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
11899         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
11900         instead of ASSEMBLER test macro.
11902         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
11903         __libc_current_sigrtmax): Add libc_hidden_def.
11905         * sysdeps/pthread/list.h: Remove assert.h include.
11907 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
11909         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
11910         __pthread_initialize_minimal_internal not
11911         __pthread_initialize_minimal.
11913 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
11915         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
11916         __pthread_initialize_minimal as hidden.
11918         * init.c (__pthread_initialize_minimal_internal): Don't mark as
11919         constructor.
11921 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
11923         * Makefile ($(inst_libdir)/libpthread.so): Depend on
11924         $(common-objpfx)format.lds, include that into the output script.
11925         Fix comment.
11926         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
11928 2002-12-28  Andreas Jaeger  <aj@suse.de>
11930         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
11931         nsec resolution changes.
11932         (xstat64_conv): Likewise.
11933         (xstat32_conv): Likewise.
11934         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
11935         struct kernel_stat.
11936         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
11937         structs stat and stat64.
11938         * time/time.h (__timespec_defined): Define for __USE_MISC.
11939         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
11941 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
11943         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
11944         argument.
11945         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
11946         (pthread_exit): Use strong_alias to avoid warnings.
11947         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
11948         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
11949         ptr___pthread_attr_init_2_*.
11950         * init.c (pthread_functions): Adjust.
11952 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
11954         * forward.c: Make all functions available by default again.  It
11955         caused too much trouble.
11957         * pt-siglongjmp.c: Removed.
11959 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
11961         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
11962         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
11963         * sysdeps/i386/Makefile: New file.
11964         * sysdeps/i386/tcb-offsets.sym: New file.
11965         * sysdeps/pthread/tcb-offsets.h: New file.
11966         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11967         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
11969         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
11970         __register_atfork...
11971         (GLIBC_2.3.2): ...here.
11973 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
11975         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
11976         pthread_attr_setstackaddr with __attribute_deprecated__.
11978 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
11980         * pt-system.c (system): Remove cancellation handling.
11981         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
11982         cancellation routines.
11984 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
11986         * descr.h: Include <dl-sysdep.h>.
11987         (struct pthread): Move header.data.list to the back of the struct.
11988         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
11989         (MULTIPLE_THREADS_OFFSET): Adjust offset.
11990         (SYSINFO_OFFSEET): Likewise.
11992 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
11994         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
11995         Define.
11996         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
11997         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
11998         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
11999         (USE_DL_SYSINFO): Undef.
12001 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
12003         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
12004         $(common-objpfx)libc.so.
12005         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
12006         it is bigger than pipe buffer size even on arches with bigger
12007         page size.
12008         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
12010 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
12012         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
12013         correct errno access for case that USE___THREAD is not defined.
12015 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
12017         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
12018         Patch by Marijn Ros <marijn@mad.scientist.com>.
12020 2002-12-22  Roland McGrath  <roland@redhat.com>
12022         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
12024 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
12026         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
12028 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
12030         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
12031         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
12032         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
12034         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
12035         of int $0x80.
12036         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
12037         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
12038         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
12039         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
12040         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
12041         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
12042         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
12043         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
12045         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
12046         sysenter.
12047         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
12049         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
12051         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
12052         in new TCB.
12053         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
12054         that sysinfo is properly initialized.
12055         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
12056         to 1 only for ld.so.
12058         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
12059         RTLD_CORRECT_DYNAMIC_WEAK.
12061 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
12063         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
12064         Use return 0 as 6th argument to FORWARD4.
12065         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
12067 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
12069         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
12070         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
12071         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
12072         (INIT_SYSINFO): New #define.
12073         (TLS_TP_INIT): Use INIT_SYSINFO.
12074         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
12075         At test to make sure SYSINFO_OFFSET value is correct.
12076         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
12078 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
12080         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
12081         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
12082         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
12083         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
12084         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
12085         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
12086         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
12088 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
12090         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
12091         macro instead of using int $0x80 directly.
12093         * sysdeps/pthread/bits/stdio-lock.h: New file.
12094         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
12095         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
12096         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
12097         * Makefile (routines): Add libc-lowlevelmutex.
12099         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
12100         __i686.get_pc_thunk.dx.
12102 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
12104         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
12105         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
12106         ($(objpfx)tst-cancel-wrappers.out): New rule.
12107         * tst-cancel-wrappers.sh: New test.
12108         * tst-locale1.c: Include signal.h.
12109         (uselocale): Test static linking of __libc_current_sigrt*.
12111 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
12113         * Makefile (tests): Add tst-cancel6.
12114         * tst-cancel6.c: New file
12116 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
12118         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
12119         Define meaningfully for assembler as well.
12120         * pthreadP.h (struct pthread_functions): Remove
12121         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
12122         and ptr_pthread_attr_init_2_1 fields.
12123         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
12124         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
12125         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
12126         (FORWARD3): Define using FORWARD4.
12127         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
12128         versions.
12129         * pt-system.c: Remove duplicate stdlib.h include.
12131 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
12133         * sem_init.c: Define sem_init@GLIBC_2.0.
12134         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
12135         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
12137         * flockfile.c: Moved to...
12138         * sysdeps/pthread/flockfile.c: ...here.  New file.
12139         * funlockfile.c: Moved to...
12140         * sysdeps/pthread/funlockfile.c: ...here.  New file.
12141         * ftrylockfile.c: Moved to...
12142         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
12144 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
12146         * libc-cancellation.c: Guard both function with
12147         #if !defined NOT_IN_libc.
12148         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
12149         automatically provided pthread wrappers.
12150         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
12151         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
12152         nor in libpthread.
12153         * pt-open.c: Removed.
12154         * pt-fcntl.c: Removed.
12155         * pt-fsync.c: Removed.
12156         * pt-lseek.c: Removed.
12157         * pt-msgrcv.c: Removed.
12158         * pt-msgsnd.c: Removed.
12159         * pt-msync.c: Removed.
12160         * pt-nanosleep.c: Removed.
12161         * pt-open64.c: Removed.
12162         * pt-pause.c: Removed.
12163         * pt-pread.c: Removed.
12164         * pt-pread64.c: Removed.
12165         * pt-pwrite.c: Removed.
12166         * pt-pwrite64.c: Removed.
12167         * pt-read.c: Removed.
12168         * pt-recv.c: Removed.
12169         * pt-recvfrom.c: Removed.
12170         * pt-recvmsg.c: Removed.
12171         * pt-send.c: Removed.
12172         * pt-sendto.c: Removed.
12173         * pt-sigtimedwait.c: Removed.
12174         * pt-sigwait.c: Removed.
12175         * pt-wait.c: Removed.
12176         * pt-waitpid.c: Removed.
12177         * pt-write.c: Removed.
12178         * pt-accept.c: Removed.
12179         * pt-close.c: Removed.
12180         * pt-connect.c: Removed.
12181         * pt-lseek64.c: Removed.
12182         * pt-sendmsg.c: Removed.
12183         * pt-tcdrain.c: Removed.
12185 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
12187         * init.c (__pthread_initialize_minimal_internal): Renamed from
12188         __pthread_initialize_minimal.  Make old name an alias.  This
12189         converts a normal relocation into a relative relocation.
12191         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
12193         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
12194         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
12195         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
12196         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
12197         pt-sigwaitinfo, pt-waitid, and pt-writev.
12198         * pt-creat.c: Removed.
12199         * pt-poll.c: Removed.
12200         * pt-pselect.c: Removed.
12201         * pt-readv.c: Removed.
12202         * pt-select.c: Removed.
12203         * pt-sigpause.c: Removed.
12204         * pt-sigsuspend.c: Removed.
12205         * pt-sigwaitinfo.c: Removed.
12206         * pt-waitid.c: Removed.
12207         * pt-writev.c: Removed.
12209         * init.c (pthread_functions): New variable.
12210         (__pthread_initialize_minimal): Pass pointer to pthread_functions
12211         (or NULL) to __libc_pthread_init.
12212         * forward.c: Rewrite to use __libc:pthread_functions array to get
12213         function addresses.
12214         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
12215         prototype.
12216         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
12217         Take new parameter.  Copy content of variable pointed to by it
12218         to __libc_pthread_init.
12220         * pthreadP.h (struct pthread_functions): New type.
12221         (__libc_pthread_init): Declare.
12223         * pthread_attr_destroy.c: Add namespace protected alias.
12224         * pthread_attr_getdetachstate.c: Likewise.
12225         * pthread_attr_getinheritsched.c: Likewise.
12226         * pthread_attr_getschedparam.c: Likewise.
12227         * pthread_attr_getschedpolicy.c: Likewise.
12228         * pthread_attr_getscope.c: Likewise.
12229         * pthread_attr_setdetachstate.c: Likewise.
12230         * pthread_attr_setinheritsched.c: Likewise.
12231         * pthread_attr_setschedparam.c: Likewise.
12232         * pthread_attr_setschedpolicy.c: Likewise.
12233         * pthread_attr_setscope.c: Likewise.
12234         * pthread_cond_broadcast.c: Likewise.
12235         * pthread_cond_destroy.c: Likewise.
12236         * pthread_cond_init.c: Likewise.
12237         * pthread_cond_signal.c: Likewise.
12238         * pthread_cond_wait.c: Likewise.
12239         * pthread_condattr_destroy.c: Likewise.
12240         * pthread_condattr_init.c: Likewise.
12241         * pthread_equal.c: Likewise.
12242         * pthread_exit.c: Likewise.
12243         * pthread_getschedparam.c: Likewise.
12244         * pthread_self.c: Likewise.
12245         * pthread_setcancelstate.c: Likewise.
12246         * pthread_setschedparam.c: Likewise.
12247         * pthread_mutex_destroy.c: Likewise.
12248         * pthread_mutex_init.c: Likewise.
12249         * pthreadP.h: Add prototypes for the aliases.
12251         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
12252         multiple_threads member in correct TCB to 1.
12254         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
12255         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
12256         member of thread decriptor, otherwise return unconditionally 1.
12258 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
12260         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
12261         regular Linux version.  Remove file.
12262         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
12263         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
12264         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
12265         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
12266         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
12267         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
12268         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
12269         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
12270         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
12271         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
12272         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
12273         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
12274         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
12275         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
12276         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
12277         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
12278         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
12279         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
12280         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
12281         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
12282         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
12283         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
12284         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
12285         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
12286         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
12287         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
12288         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
12289         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
12290         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
12291         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
12293 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
12295         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
12296         * sysdeps/unix/sysv/linux/open.c: Removed.
12297         * sysdeps/unix/sysv/linux/fsync.c: Removed.
12298         * sysdeps/unix/sysv/linux/lseek.c: Removed.
12299         * sysdeps/unix/sysv/linux/msync.c: Removed.
12300         * sysdeps/unix/sysv/linux/read.c: Removed.
12301         * sysdeps/unix/sysv/linux/close.c: Removed.
12302         * sysdeps/unix/sysv/linux/creat.c: Removed.
12303         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
12304         * sysdeps/unix/sysv/linux/pause.c: Removed.
12305         * sysdeps/unix/sysv/linux/select.c: Removed.
12306         * sysdeps/unix/sysv/linux/write.c: Removed.
12308 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
12310         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
12311         element in TCB to see whether locking is needed.
12313         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
12314         MULTIPLE_THREADS_OFFSET value is correct.
12316         * sysdeps/unix/sysv/linux/close.c: New file.
12317         * sysdeps/unix/sysv/linux/connect.S: New file.
12318         * sysdeps/unix/sysv/linux/creat.c: New file.
12319         * sysdeps/unix/sysv/linux/fsync.c: New file.
12320         * sysdeps/unix/sysv/linux/llseek.c: New file.
12321         * sysdeps/unix/sysv/linux/lseek.c: New file.
12322         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
12323         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
12324         * sysdeps/unix/sysv/linux/msync.c: New file.
12325         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
12326         * sysdeps/unix/sysv/linux/open.c: New file.
12327         * sysdeps/unix/sysv/linux/open64.c: New file.
12328         * sysdeps/unix/sysv/linux/pause.c: New file.
12329         * sysdeps/unix/sysv/linux/poll.c: New file.
12330         * sysdeps/unix/sysv/linux/pread.c: New file.
12331         * sysdeps/unix/sysv/linux/pread64.c: New file.
12332         * sysdeps/unix/sysv/linux/pselect.c: New file.
12333         * sysdeps/unix/sysv/linux/pwrite.c: New file.
12334         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
12335         * sysdeps/unix/sysv/linux/readv.c: New file.
12336         * sysdeps/unix/sysv/linux/recv.S: New file.
12337         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
12338         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
12339         * sysdeps/unix/sysv/linux/select.c: New file.
12340         * sysdeps/unix/sysv/linux/send.S: New file.
12341         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
12342         * sysdeps/unix/sysv/linux/sendto.S: New file.
12343         * sysdeps/unix/sysv/linux/sigpause.c: New file.
12344         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
12345         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
12346         * sysdeps/unix/sysv/linux/sigwait.c: New file.
12347         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
12348         * sysdeps/unix/sysv/linux/system.c: New file.
12349         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
12350         * sysdeps/unix/sysv/linux/wait.c: New file.
12351         * sysdeps/unix/sysv/linux/waitid.c: New file.
12352         * sysdeps/unix/sysv/linux/waitpid.c: New file.
12353         * sysdeps/unix/sysv/linux/writev.c: New file.
12354         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
12356         * pt-readv.c: Fix comment.
12358 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
12360         * tst-cleanup1.c: Include stdlib.h.
12362         * tst-cancel5.c: New test.
12363         * Makefile (tests): Add tst-cancel5.
12364         (tst-cancel5): Link against libc.so libpthread.so in that order.
12366 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
12368         * forward.c (test_loaded): Prevent recursive calls.
12370         * Makefile (routines): Add libc-cancellation.
12371         * libc-cancellation.c: New file.
12372         * descr.h (struct pthread): Add multiple_threads field.
12373         * allocatestack.c (allocate_stack): Initialize multiple_header field of
12374         new thread descriptor to 1.
12375         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
12376         Initialize multiple_thread field after successful thread creation.
12377         * cancellation.c (__do_cancel): Move to pthreadP.h.
12378         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
12379         (__pthread_disable_asynccancel): Add internal_function attribute.
12380         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
12381         * pthread_setcancelstate.c: Likewise.
12382         * pthread_setcanceltype.c: Likewise.
12383         * pthread_exit.c: Likewise.
12384         * pthreadP.h (CANCELLATION_P): Likewise.
12385         (__do_cancel): Define as static inline.
12386         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
12387         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
12388         declarations.
12389         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
12390         fields.  Define MULTIPLE_THREADS_OFFSET.
12391         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
12392         declaration.
12393         * sysdeps/unix/sysv/linux/accept.S: New file.
12394         * sysdeps/unix/sysv/linux/read.c: New file.
12395         * sysdeps/unix/sysv/linux/write.c: New file.
12396         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
12397         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
12398         initialization of __libc_locking_needed.
12399         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
12400         __libc_locking_needed, use multiple_threads field in TCB.
12401         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
12403 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
12405         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
12406         version.
12407         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
12409         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
12410         access to __libc_locking_needed for PIC.
12412 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
12414         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
12415         declare for libc.so.
12416         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
12417         expression.
12418         (__libc_lock_lock): Put into statement expression.
12419         (__libc_lock_unlock): Remove trailing semicolon.
12420         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
12422 2002-12-12  Roland McGrath  <roland@redhat.com>
12424         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
12425         "m" constraint to refer to __libc_locking_needed.  Declare it here.
12427 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
12429         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
12430         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
12431         Initialize __libc_locking_needed.
12432         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
12433         instead of __register_pthread_fork_handler.
12434         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
12435         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
12436         fork-gen with libc_pthread_init.
12437         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
12438         of __register_pthread_fork_handler.
12439         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
12440         of __register_pthread_fork_handler.
12441         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
12442         __libc_locking_needed to determine whether lock prefix can be avoided.
12443         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
12445 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
12447         * Makefile (tests): Add tst-cleanup1.
12448         * tst-cleanup1.c: New file.
12449         * cancellation.c (__cleanup_thread): Removed.
12450         (__do_cancel): Remove call to __cleanup_thread.
12451         * pthreadP.h: Remove __cleanup_thread prorotype.
12453         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
12454         Remember function and argument even if cancellation handler
12455         function is not available.
12456         (__libc_cleanup_region_end): Execute registered function directly if
12457         pthread functions are not available.
12458         (__libc_cleanup_end): Likewise.
12460         * init.c (__pthread_initialize_minimal): Fix initialization in
12461         static lib by preventing gcc from being too clever.
12463 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
12465         * init.c (__pthread_initialize_minimal): Remove unneccesary
12466         sigaddset call.
12468         * Makefile (tests): We can run tst-locale2 now.
12470 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
12472         * Versions: Remove duplicated sigwait entry.
12474 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
12476         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
12477         inside libpthread.
12479         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
12481         * pthreadP.h: Declare __pthread_enable_asynccancel and
12482         __pthread_disable_asynccancel.
12483         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
12484         (CANCEL_RESET): Use __pthread_disable_asynccancel.
12485         * cancellation.c (__pthread_enable_asynccancel): New function.
12486         (__pthread_disable_asynccancel): New function.
12487         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
12488         * pt-close.c: Likewise.
12489         * pt-connect.c: Likewise.
12490         * pt-creat.c: Likewise.
12491         * pt-fcntl.c: Likewise.
12492         * pt-fsync.c: Likewise.
12493         * pt-lseek.c: Likewise.
12494         * pt-lseek64.c: Likewise.
12495         * pt-msgrcv.c: Likewise.
12496         * pt-msgsnd.c: Likewise.
12497         * pt-msync.c: Likewise.
12498         * pt-nanosleep.c: Likewise.
12499         * pt-open.c: Likewise.
12500         * pt-open64.c: Likewise.
12501         * pt-pause.c: Likewise.
12502         * pt-poll.c: Likewise.
12503         * pt-pread.c: Likewise.
12504         * pt-pread64.c: Likewise.
12505         * pt-pselect.c: Likewise.
12506         * pt-pwrite.c: Likewise.
12507         * pt-pwrite64.c: Likewise.
12508         * pt-read.c: Likewise.
12509         * pt-readv.c: Likewise.
12510         * pt-recv.c: Likewise.
12511         * pt-recvfrom.c: Likewise.
12512         * pt-recvmsg.c: Likewise.
12513         * pt-select.c: Likewise.
12514         * pt-send.c: Likewise.
12515         * pt-sendmsg.c: Likewise.
12516         * pt-sendto.c: Likewise.
12517         * pt-sigpause.c: Likewise.
12518         * pt-sigsuspend.c: Likewise.
12519         * pt-sigtimedwait.c: Likewise.
12520         * pt-sigwait.c: Likewise.
12521         * pt-sigwaitinfo.c: Likewise.
12522         * pt-system.c: Likewise.
12523         * pt-tcdrain.c: Likewise.
12524         * pt-wait.c: Likewise.
12525         * pt-waitid.c: Likewise.
12526         * pt-waitpid.c: Likewise.
12527         * pt-write.c: Likewise.
12528         * pt-writev.c: Likewise.
12529         * pthread_join.c: Likewise.
12530         * pthread_timedjoin.c: Likewise.
12532         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
12533         (__xpg_sigpause): New function.
12534         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
12536 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
12538         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
12540         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
12541         _GI_pthread_cleanup_pop to pthreadP.h.
12543         * ftrylockfile.c: Use _IO_lock_trylock instead of
12544         pthread_mutex_trylock.
12546         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
12547         (CANCEL_RESET): Likewise.
12548         (__pthread_setcanceltype_): Declare.
12549         (__pthread_mutex_lock_internal): Declare.
12550         (__pthread_mutex_unlock_internal): Declare.
12551         (__pthread_once_internal): Declare.
12552         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
12553         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
12555         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
12556         and pthread_mutex_unlock.
12557         * pthread_cond_wait.c: Likewise.
12558         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
12559         * pthread_mutex_unlock.c: Likewise.
12561         * pthread_setcanceltype.c: Add additional alias
12562         __pthread_setcanceltype.
12564         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
12565         * sem_open.c (sem_open): Likewise.
12566         Use __libc_open, __libc_write, and __libc_close instead of
12567         open, write, and close respectively.
12569         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
12570         Rewrite as statement expression since it must return a value.
12572         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
12573         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
12574         __pthread_kill.
12576         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
12577         alias __pthread_once_internal.
12579         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
12581 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
12583         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
12584         * tst-stdio1.c: New file.
12585         * tst-stdio2.c: New file.
12587         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
12589         * Makefile (tests): Comment out tst-locale2 for now.
12590         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
12592         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
12593         -D_IO_MTSAFE_IO.
12594         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
12595         Use _IO_lock_init instead of explicit assignment.
12597         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
12598         Define __libc_lock_* and __libc_lock_recursive macros with
12599         lowlevellock macros, not pthread mutexes.
12601         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
12602         of pthread_mutex_lock.
12603         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
12604         instead of pthread_mutex_unlock.
12606 2002-12-06  Roland McGrath  <roland@redhat.com>
12608         * allocatestack.c (__stack_user): Use uninitialized defn.
12609         * init.c (__pthread_initialize_minimal): Initialize it here.
12611 2002-12-05  Roland McGrath  <roland@redhat.com>
12613         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
12614         string.
12615         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
12617         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
12618         missing & here too.
12620 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
12622         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12623         lowlevellock.
12624         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
12625         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
12626         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
12627         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
12628         for __libc_lock_* macros.
12629         * Makefile (routines): Add libc-lowlevellock.
12631 2002-10-09  Roland McGrath  <roland@redhat.com>
12633         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
12634         Under [__PIC__], call the function via the pointer fetched for
12635         comparison rather than a call by name that uses the PLT.
12636         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
12637         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
12638         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
12639         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
12640         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
12642 2002-12-04  Roland McGrath  <roland@redhat.com>
12644         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
12646         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
12647         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
12649         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
12651 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
12653         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
12654         a completely opaque, non-integer type.
12655         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
12657 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
12659         * sysdeps/i386/tls.h: Include stdlib.h.
12660         * sysdeps/x86_64/tls.h: Likewise.
12662 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
12664         * Makefile (tests): Add tst-locale2.
12665         (tests-static): Likewise.
12666         * tst-locale2.c: New file.
12668         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
12669         volatile and add memory clobbers to lock operations.
12671 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
12673         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
12674         * sysdeps/i386/i486/bits/atomic.h: New file.
12675         * sysdeps/i386/i586/bits/atomic.h: New file.
12676         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
12677         include i486 version.
12678         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
12679         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
12680         Patch by Marijn Ros <marijn@mad.scientist.com>.
12682         * allocatestack.c (get_cached_stack): Don't crash if we first
12683         found a stack with a larger size then needed.
12684         Reported by Hui Huang <hui.huang@sun.com>.
12686         * Makefile (tests): Add tst-sysconf.
12687         * tst-sysconf.c: New file.
12689         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
12690         PTHREAD_THREADS_MAX.
12692 2002-12-02  Roland McGrath  <roland@redhat.com>
12694         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
12695         Declare using hidden_proto instead of attribute_hidden, so there are
12696         non-.hidden static symbols for gdb to find.
12697         (__pthread_keys): Likewise.
12698         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
12699         * allocatestack.c (__stack_user): Likewise.
12700         * pthread_create.c (__pthread_keys): Likewise.
12701         (__nptl_threads_events, __nptl_last_event): Make these static instead
12702         of hidden.
12703         * pthread_key_create.c (__pthread_pthread_keys_max,
12704         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
12706 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
12708         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
12709         statically.
12710         * tst-locale1.c: New file.
12712         * pthread_cond_timedwait.c: Include <stdlib.h>.
12714         * Makefile (tests): Add tst-fork2 and tst-fork3.
12715         * tst-fork2.c: New file.
12716         * tst-fork3.c: New file.
12718 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
12720         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
12722         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
12723         require it to 200112L.
12725         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
12726         instruction only if HAVE_CMOV is defined.
12727         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
12729         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
12731         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
12733         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
12735         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
12737 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
12739         * sysdeps/x86_64/bits/atomic.h: New file.
12741         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
12742         16-bit operations.
12744         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
12745         possible since gettid cannot fail.
12747         * sysdeps/x86_64/pthreaddef.h: New file.
12749         * sysdeps/i386/pthreaddef.h (gettid): Removed.
12751         * sysdeps/x86_64/pthread_spin_init.c: New file.
12752         * sysdeps/x86_64/pthread_spin_lock.c: New file.
12753         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
12754         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
12756         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
12757         Add missing lock prefix.  Minute optimization.
12759         * tst-spin2.c (main): Also check successful trylock call.
12761         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
12762         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
12764         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
12765         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
12767         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
12768         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
12769         value in case of an error.  Add support for INTERNAL_SYSCALL.
12771         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
12772         value in case of an error.
12774         * sysdeps/x86_64/tls.h: New file.
12776 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
12778         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
12779         takes the array member name and the index as parameters.
12780         (THREAD_SETMEM_NC): Likewise.
12781         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
12782         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
12783         interfaces.
12785         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
12786         to decide which code to use.
12787         (THREAD_SETMEM_NC): Likewise.
12789         * allocatestack.c (queue_stack): Don't remove stack from list here.
12790         Do it in the caller.  Correct condition to prematurely terminate
12791         loop to free stacks.
12792         (__deallocate_stack): Remove stack from list here.
12794 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
12796         * Makefile (tests): Add tst-stack1.
12797         * tst-stack1.c: New file.
12799         * allocatestack.c (allocate_stack): Initialize the TCB on a user
12800         provided stack.
12802         * pthread_attr_getstack.c: Return bottom of the thread area.
12804 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
12806         * Makefile (libpthread-routines): Add pt-allocrtsig and
12807         pthread_kill_other_threads.
12808         * pt-allocrtsig.c: New file.
12809         * pthread_kill_other_threads.c: New file.
12810         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
12811         all three functions.
12812         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12813         allocrtsig.
12814         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
12815         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
12816         and __libc_allocate_rtsig_private.
12817         * Versions (libpthread): Export pthread_kill_other_threads_np,
12818         __libc_current_sigrtmin, and __libc_current_sigrtmax.
12820 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
12822         * allocatestack.c (allocate_stack): stackaddr in attribute points to
12823         the end of the stack.  Adjust computations.
12824         When mprotect call fails dequeue stack and free it.
12825         * pthread_attr_setstack.c: Store top of the stack in stackaddr
12826         attribute.
12827         * pthread_getattr_np.c: Likewise.
12829         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
12830         surprises.
12832 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
12834         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
12835         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
12837 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
12839         * pthread_getspecific.c: Optimize access to first 2nd-level array.
12840         * pthread_setspecific.c: Likewise.
12842 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
12844         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
12845         definitions.  Get them from the official place.
12846         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
12848         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
12849         Use new CLONE_ flags in clone() calls.
12851         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
12852         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
12854         * Versions: Add pthread_* functions for libc.
12855         * forward.c: New file.
12857         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
12858         errno-loc.
12859         * herrno.c: New file.
12860         * res.c: New file.
12862         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
12863         sem_trywait, and sem_timedwait.  Add herrno and res.
12864         * sem_init.c: Don't initialize lock and waiters members.
12865         * sem_open.c: Likewise.
12866         * sem_post.c: Removed.
12867         * sem_wait.c: Removed.
12868         * sem_trywait.c: Removed.
12869         * sem_timedwait.c: Removed.
12870         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
12871         Includes full implementations of sem_post, sem_wait, sem_trywait,
12872         and sem_timedwait.
12873         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
12874         for new implementation.
12875         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
12876         and waiters fields.
12878         * tst-sem3.c: Improve error message.
12879         * tst-signal3.c: Likewise.
12881         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
12882         to tell the kernel about the termination futex and to initialize tid
12883         member.  Don't initialize main_thread.
12884         * descr.h (struct pthread): Remove main_thread member.
12885         * cancelllation.c (__do_cancel): Remove code handling main thread.
12886         The main thread is not special anymore.
12888         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
12889         size of the stacks to stack_cache_actsize.
12891         * pt-readv.c: Add missing "defined".
12892         * pt-sigwait.c: Likewise.
12893         * pt-writev.c: Likewise.
12895 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
12897         * Versions: Export __connect from libpthread.
12898         Patch by Luca Barbieri <ldb@ldb.ods.org>.
12900         * Makefile (libpthread-routines): Add pt-raise.
12901         * sysdeps/unix/sysv/linux/raise.c: New file.
12902         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
12903         * sysdeps/generic/pt-raise.c: New file.
12905         * pthread_cond_init.c: Initialize all data elements of the condvar
12906         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
12908         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
12909         * pthread_create.c: Likewise.
12911         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
12912         * tst-key1.c: New file.
12913         * tst-key2.c: New file.
12914         * tst-key3.c: New file.
12916         * Versions: Export pthread_detach for version GLIBC_2.0.
12917         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
12919 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
12921         * pthread_key_create.c: Terminate search after an unused key was found.
12922         Patch by Luca Barbieri <ldb@ldb.ods.org>.
12924         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
12925         Patch by Luca Barbieri <ldb@ldb.ods.org>.
12927 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
12929         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
12930         dynamic lookup for errno in PIC.
12932         * allocatestack.c (get_cached_stack): Rearrange code slightly to
12933         release the stack lock as soon as possible.
12934         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
12935         the static TLS block.
12936         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
12938         * cancellation.c: Renamed from cancelation.c.
12939         * Makefile: Adjust accordingly.
12940         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
12941         * cleanup_defer.c: Use CANCELLATION_P.
12942         * pthread_testcancel.c: Likewise.
12943         * descr.h: Fix spelling in comments.
12944         * init.c: Likewise.
12945         * pthread_getattr_np.c: Likewise.
12946         * pthread_getschedparam.c: Likewise.
12947         * pthread_setschedparam.c: Likewise.
12948         * Versions: Likewise.
12950         * pt-pselect.c: New file.
12951         * Makefile (libpthread-routines): Add pt-pselect.
12952         * Versions: Add pselect.
12954         * tst-cancel4.c: New file.
12955         * Makefile (tests): Add tst-cancel4.
12957 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
12959         * pthread_mutex_lock.c: Always record lock ownership.
12960         * pthread_mutex_timedlock.c: Likewise.
12961         * pthread_mutex_trylock.c: Likewise.
12963         * pt-readv.c: New file.
12964         * pt-writev.c: New file.
12965         * pt-creat.c: New file.
12966         * pt-msgrcv.c: New file.
12967         * pt-msgsnd.c: New file.
12968         * pt-poll.c: New file.
12969         * pt-select.c: New file.
12970         * pt-sigpause.c: New file.
12971         * pt-sigsuspend.c: New file.
12972         * pt-sigwait.c: New file.
12973         * pt-sigwaitinfo.c: New file.
12974         * pt-waitid.c: New file.
12975         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
12976         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
12977         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
12978         * Versions: Add all the new functions.
12980         * tst-exit1.c: New file.
12981         * Makefile (tests): Add tst-exit1.
12983         * sem_timedwait.c: Minor optimization for more optimal fastpath.
12985 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
12987         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
12989         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
12990         call.  pthread_join is an official cancellation point.
12991         * pthread_timedjoin.c: Likewise.
12993         * pthread_cond_wait.c: Revert order in which internal lock are dropped
12994         and the condvar's mutex are retrieved.
12995         * pthread_cond_timedwait.c: Likewise.
12996         Reported by dice@saros.East.Sun.COM.
12998 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
13000         * pthreadP.h: Cut out all type definitions and move them...
13001         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
13002         * pthreadP.h: Include <internaltypes.h>.
13004         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
13005         performance tweaks.
13007         * sem_trywait.c: Shuffle #includes around to get right order.
13008         * sem_timedwait.c: Likewise.
13009         * sem_post.c: Likewise.
13010         * sem_wait.c: Likewise.
13012         * nptl 0.3 released.
13014         * Makefile (tests): Add tst-signal3.
13015         * tst-signal3.c: New file.
13017 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
13019         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
13020         the asms modify the sem object.
13021         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
13023         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
13024         the actual members.
13025         * pthreadP.h (struct sem): New type.  Actual semaphore type.
13026         * semaphoreP.h: Include pthreadP.h.
13027         * sem_getvalue.c: Adjust to sem_t change.
13028         * sem_init.c: Likewise.
13029         * sem_open.c: Likewise.
13030         * sem_post.c: Likewise.
13031         * sem_timedwait.c: Likewise.
13032         * sem_trywait.c: Likewise.
13033         * sem_wait.c: Likewise.
13035 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
13037         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
13038         * tst-basic2.c: New file.
13039         * tst-exec1.c: New file.
13040         * tst-exec2.c: New file.
13041         * tst-exec3.c: New file.
13043         * tst-fork1.c: Remove extra */.
13045         * nptl 0.2 released.  The API for IA-32 is complete.