MIPS: Add wrappers to get/setrlimit64 to fix RLIM64_INFINITY constant
[glibc.git] / nptl / ChangeLog
blob9f4063016f0bd5f21b6e5d8fe7fb5196e1226381
1 2013-11-26  Ondřej Bílka  <neleai@seznam.cz>
2         * sysdeps/i386/tls.h: Use __glibc_reserved instead __unused.
3         * sysdeps/x86_64/tls.h: Likewise.
5 2013-11-25  Paul Pluzhnikov  <ppluzhnikov@google.com>
7         [BZ #11214]
8         * Makefile (tst-getpid2-ENV): New variable.
10 2013-11-20  Paul Pluzhnikov  <ppluzhnikov@google.com>
12         * Makefile (tst-cleanup2, tst-cleanupx2): Add -fno-builtin
14 2013-10-30  Mike Frysinger  <vapier@gentoo.org>
16         * sysdeps/pthread/configure.in: Moved to ...
17         * sysdeps/pthread/configure.ac: ... here.
18         * sysdeps/x86_64/configure.in: Moved to ...
19         * sysdeps/x86_64/configure.ac: ... here.
20         * sysdeps/pthread/configure: Regenerated.
21         * sysdeps/x86_64/configure: Likewise.
23 2013-10-04  Maciej W. Rozycki  <macro@codesourcery.com>
25         * tst-mutex8.c (check_type) [ENABLE_PI]: Handle ENOTSUP failure
26         from pthread_mutex_init.
28 2013-10-01  Siddhesh Poyarekar  <siddhesh@redhat.com>
30         [BZ #15988]
31         * pthread_cond_broadcast.c (__pthread_cond_broadcast)
32         [lll_futex_cmp_requeue_pi && __ASSUME_REQUEUE_PI]: Use
33         USE_REQUEUE_PI.
34         * pthread_cond_signal.c (__pthread_cond_signal)
35         [lll_futex_cmd_requeue_pi && __ASSUME_REQUEUE_PI]: Likewise.
37 2013-09-27  Siddhesh Poyarekar  <siddhesh@redhat.com>
39         * sysdeps/pthread/bits/libc-lock.h [_LIBC && (!NOT_IN_libc ||
40         IS_IN_libpthread)] (__libc_lock_fini_recursive): Use the mutex
41         member of the argument.
42         (__libc_lock_trylock_recursive): Likewise.
43         (__libc_lock_unlock_recursive): Likewise.
45 2013-09-04  Joseph Myers  <joseph@codesourcery.com>
47         * sysdeps/unix/sysv/linux/x86_64/cancellation.S
48         [SHARED && DO_VERSIONING && !NO_HIDDEN]: Change conditional to
49         [SHARED && !NO_HIDDEN].
51 2013-09-03  Siddhesh Poyarekar  <siddhesh@redhat.com>
53         [BZ #15921]
54         * tst-cleanup2.c (do_test): New volatile variable RET to
55         return success.
57 2013-08-30   Ondřej Bílka  <neleai@seznam.cz>
59         * sysdeps/pthread/pthread.h: Fix typos.
60         * sysdeps/unix/sysv/linux/internaltypes.h: Likewise.
61         * tst-cancel4.c: Likewise.
63 2013-08-21   Ondřej Bílka  <neleai@seznam.cz>
65         * pthread_getschedparam.c: Fix typos.
66         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
68 2013-07-23  David S. Miller  <davem@davemloft.net>
70         * tst-cancel4.c (WRITE_BUFFER_SIZE): Adjust comment.
72 2013-07-22  David S. Miller  <davem@davemloft.net>
74         * tst-cancel4.c (WRITE_BUFFER_SIZE): Increase to 16384.
76 2013-07-19  Dominik Vogt  <vogt@de.ibm.com>
78         * pthread_mutex_lock.c: Fix whitespace.
79         * pthread_mutex_trylock.c: Likewise.
80         * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: Likewise.
81         * sysdeps/unix/sysv/linux/x86/elision-conf.c: Likewise.
82         * sysdeps/unix/sysv/linux/x86/elision-conf.h: Likewise.
83         * sysdeps/unix/sysv/linux/x86/elision-lock.c: Likewise.
84         * sysdeps/unix/sysv/linux/x86/elision-timed.c: Likewise.
85         * sysdeps/unix/sysv/linux/x86/elision-trylock.c: Likewise.
86         * sysdeps/unix/sysv/linux/x86/force-elision.h: Likewise.
87         * sysdeps/unix/sysv/linux/x86/hle.h: Likewise.
88         * sysdeps/unix/sysv/linux/x86/pthread_mutex_cond_lock.c: Likewise.
89         * sysdeps/unix/sysv/linux/x86/pthread_mutex_lock.c: Likewise.
90         * sysdeps/unix/sysv/linux/x86/pthread_mutex_timedlock.c: Likewise.
91         * sysdeps/unix/sysv/linux/x86/pthread_mutex_trylock.c: Likewise.
93         * sysdeps/unix/sysv/linux/x86/elision-conf.c:
94         Remove __rwlock_rtm_enabled and __rwlock_rtm_read_retries.
95         (elision_init): Don't set __rwlock_rtm_enabled.
96         * sysdeps/unix/sysv/linux/x86/elision-conf.h:
97         Remove __rwlock_rtm_enabled.
99 2013-07-03  H.J. Lu  <hongjiu.lu@intel.com>
101         * sysdeps/unix/sysv/linux/x86/init-arch.c: New file.
102         * sysdeps/unix/sysv/linux/x86/init-arch.h: Likewise.
104 2013-07-02  Andi Kleen <ak@linux.intel.com>
106         * sysdeps/unix/sysv/linux/x86/elision-conf.c (elision_init):
107           Check ENABLE_LOCK_ELISION.
109 2013-07-02  Andi Kleen  <ak@linux.intel.com>
111         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype):
112           Disable elision for PTHREAD_MUTEX_DEFAULT.
114 2013-07-02  Andi Kleen  <ak@linux.intel.com>
115             Hongjiu Lu  <hongjiu.lu@intel.com>
117         * pthread_mutex_lock.c
118         (__pthread_mutex_lock): Add lock elision support.
119         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
120         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
121         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
122         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
123         * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: Likewise.
124         * sysdeps/unix/sysv/linux/x86/Makefile: New file.
125         * sysdeps/unix/sysv/linux/x86/force-elision.h: New file
126         * sysdeps/unix/sysv/linux/x86/pthread_mutex_cond_lock.c: Likewise.
127         * sysdeps/unix/sysv/linux/x86/pthread_mutex_lock.c: Likewise.
128         * sysdeps/unix/sysv/linux/x86/pthread_mutex_timedlock.c: Likewise.
129         * sysdeps/unix/sysv/linux/x86/pthread_mutex_trylock.c: Likewise.
130         * sysdeps/unix/sysv/linux/x86/pthread_mutex_unlock.c: Likewise.
132 2013-07-02  Andi Kleen  <ak@linux.intel.com>
134         * tst-mutex5.c: Include config.h.
135           (do_test): Add checks for ENABLE_LOCK_ELISION.
136         * tst-mutex8.c: Include config.h
137           (tf): Add checks for ENABLE_LOCK_ELISION.
138           (check_type): Likewise.
140 2013-07-02  Andi Kleen  <ak@linux.intel.com>
142         * pthreadP.h: Add elision types.
143           (PTHREAD_MUTEX_TYPE_ELISION): Add.
144         * sysdeps/pthread/pthread.h: Add elision initializers.
145           (PTHREAD_MUTEX_ELISION_NP, PTHREAD_MUTEX_NO_ELISION_NP,
146            PTHREAD_MUTEX_PSHARED_NP): Add new flags.
147           (__PTHREAD_SPINS): Add.
149 2013-07-02  Andi Kleen  <ak@linux.intel.com>
150             Hongjiu Lu  <hongjiu.lu@intel.com>
152         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_timedwait_tid,
153           lll_timedlock_elision, __lll_lock_elision, __lll_unlock_elision,
154           __lll_trylock_elision, lll_lock_elision, lll_unlock_elision,
155           lll_trylock_elision): Add.
156         * sysdeps/unix/sysv/linux/x86/Makefile: Imply x86.
157         * sysdeps/unix/sysv/linux/x86/elision-conf.c: New file.
158         * sysdeps/unix/sysv/linux/x86/elision-conf.h: New file.
159         * sysdeps/unix/sysv/linux/x86/elision-lock.c: New file.
160         * sysdeps/unix/sysv/linux/x86/elision-timed.c: New file.
161         * sysdeps/unix/sysv/linux/x86/elision-trylock.c: New file.
162         * sysdeps/unix/sysv/linux/x86/elision-unlock.c: New file.
163         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_timedwait_tid,
164           lll_timedlock_elision, __lll_lock_elision, __lll_unlock_elision,
165           __lll_trylock_elision, lll_lock_elision, lll_unlock_elision,
166           lll_trylock_elision): Add.
167         * nptl/sysdeps/unix/sysv/linux/x86/hle.h: New file.
168         * elision-conf.h: New file.
170 2013-06-24  Vladimir Nikulichev  <v.nikulichev@gmail.com>
172         [BZ #12310]
173         * pthread_exit.c: Add reference to pthread_create.
175 2013-06-22  Joseph Myers  <joseph@codesourcery.com>
177         * pthread_getattr_default_np.c: Include <string.h>.
179 2013-06-15  Siddhesh Poyarekar  <siddhesh@redhat.com>
181         * Versions (libpthread): Add GLIBC_2.18.
182         (GLIBC_2.18): Add pthread_setattr_default_np and
183         pthread_getattr_default_np.
184         * allocatestack.c (allocate_stack): Synchronize read from
185         __default_pthread_attr.
186         (__reclaim_stacks): Initialize __default_pthread_attr_lock.
187         * nptl-init.c (__pthread_initialize_minimal_internal):
188         Synchronize write to __default_pthread_attr.
189         * pthreadP.h (__default_pthread_attr_lock): Declare.
190         * pthread_attr_getstacksize (__pthread_attr_getstacksize):
191         Synchronize read from __default_pthread_attr.
192         * pthread_create.c (__pthread_create_2_1): Make a local copy of
193         __default_pthread_attr.  Check value of flags in IATTR even if
194         input ATTR is NULL.
195         * pthread_getattr_default_np.c: New file.
196         * pthread_setattr_default_np.c: New file.
197         * sysdeps/pthread/pthread.h [__USE_GNU]
198         (pthread_getattr_default_np, pthread_setattr_default_np):
199         Declare.
200         * tst-default-attr.c: New test case.
201         * Makefile (libpthread-routines): Add
202         pthread_setattr_default_np and pthread_getattr_default_np.
203         (tests): Add tst-default-attr.
204         * vars.c (__default_pthread_attr_lock): Declare and initialize.
206 2013-06-13  Siddhesh Poyarekar  <siddhesh@redhat.com>
207             Carlos O'Donell  <carlos@redhat.com>
209         [BZ #15618]
210         * tst-pthread-attr-affinity: New test case.
211         * Makefile (tests): Add it.
212         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
213         (__pthread_attr_getaffinity_new): Copy minimum of source and
214         destination sizes to avoid a buffer overrun.
216 2013-06-10  Carlos O'Donell  <carlos@redhat.com>
218         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
219         (lll_futex_wake): Return syscall error.
220         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
221         (lll_futex_wake): Return syscall error.
223 2013-08-06   Ondřej Bílka  <neleai@seznam.cz>
225         * sysdeps/pthread/allocalim.h: (__libc_use_alloca): Fix warning.
227 2013-06-06   Ondřej Bílka  <neleai@seznam.cz>
229         * tst-cond22.c: Fix leading whitespaces.
230         * tst-umask1.c: Likewise.
232 2013-06-06  Joseph Myers  <joseph@codesourcery.com>
234         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Remove
235         trailing whitespace.
236         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Likewise.
237         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
238         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
239         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
240         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
241         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
242         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
243         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
244         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
245         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
246         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
247         * tst-mutexpp10.c: Likewise.
248         * tst-stackguard1.c: Likewise.
250 2013-05-31  Joseph Myers  <joseph@codesourcery.com>
252         * Makefile ($(objpfx)libpthread.so): Remove dependencies on libc
253         and ld.so.
255 2013-05-16  Ryan S. Arnold  <rsa@linux.vnet.ibm.com>
257         * pthread_create.c: Add missing #include <stdint.h> due to uint64_t or
258         uint32_t usage.
259         * sysdeps/pthread/createthread.c: Likewise.
261 2013-05-14  Andreas Jaeger  <aj@suse.de>
263         [BZ #10686]
264         * sysdeps/x86_64/tls.h (struct tcbhead_t): Add __private_ss field.
265         * sysdeps/i386/tls.h (struct tcbhead_t): Likewise.
267 2013-05-09  Andi Kleen  <ak@linux.intel.com>
269         * tst-mutex8.c (do_test): Check for ENABLE_PI.
271 2013-04-22  Siddhesh Poyarekar  <siddhesh@redhat.com>
273         * pthreadP.h (check_sched_policy_attr): New inline function.
274         (check_sched_priority_attr): Likewise.
275         (check_stacksize_attr): Likewise.
276         (__kernel_cpumask_size, __determine_cpumask_size): Declare
277         extern.
278         (check_cpuset_attr): New inline function.
279         * pthread_attr_setschedparam (__pthread_attr_setschedparam):
280         Use check_sched_priority_attr.
281         * pthread_attr_setschedpolicy.c
282         (__pthread_attr_setschedpolicy): Use check_sched_policy_attr.
283         * pthread_attr_setstack.c (__pthread_attr_setstack): Use
284         check_stacksize_attr.
285         * pthread_attr_setstacksize.c (__pthread_attr_setstacksize):
286         Likewise.
287         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
288         (__pthread_attr_setaffinity_new): Use check_cpuset_attr.
290 2013-04-11  Andreas Schwab  <schwab@suse.de>
292         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
293         (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
294         directly use absolute timeout.
296 2013-04-07  Carlos O'Donell  <carlos@redhat.com>
298         * sysdeps/unix/sysv/linux/sem_post.c: Include atomic.h.
300 2013-04-04  Siddhesh Poyarekar  <siddhesh@redhat.com>
302         [BZ #15337]
303         * sysdeps/unix/sysv/linux/x86_64/cancellation.S
304         [IS_IN_libpthread]
305         [SHARED && defined DO_VERSIONING && !defined NO_HIDDEN]: Mark
306         __pthread_unwind hidden.
308 2013-03-28  Roland McGrath  <roland@hack.frob.com>
310         * pthread_create.c (start_thread) [!SHARED]:
311         Call __call_tls_dtors only if it's not NULL.
313 2013-03-19  Siddhesh Poyarekar  <siddhesh@redhat.com>
315         * allocatestack.c (allocate_stack): Use __default_pthread_attr
316         instead of __default_stacksize.
317         * nptl-init.c (__pthread_initialize_minimal_internal):
318         Likewise.  Initialize guardsize.
319         * pthreadP.h (__default_pthread_attr): Declare.
320         * pthread_attr_getstacksize.c (__pthread_attr_getstacksize):
321         Use __default_pthread_attr instead of __default_stacksize.
322         * pthread_create.c (default_attr): Remove.
323         (__pthread_create_2_1): Use __default_pthread_attr instead of
324         default_attr.
325         * vars.c (__default_stacksize): Remove.
326         (__default_pthread_attr): New static variable to store
327         default thread attributes.
329 2013-03-18  Siddhesh Poyarekar  <siddhesh@redhat.com>
331         * pthread_barrier_init.c (default_attr): Rename to
332         default_barrierattr.
333         (pthread_barrier_init): Adjust for the rename.
334         * pthread_mutex_init.c (default_attr): Rename to
335         default_mutexattr.
336         (__pthread_mutex_init): Adjust for the rename.
337         * pthread_rwlock_init.c (default_attr): Rebane to
338         default_rwlockattr.
339         (__pthread_rwlock_init): Adjust for the rename.
341 2013-03-12  Carlos O'Donell  <carlos@redhat.com>
343         * sysdeps/unix/sysv/linux/lowlevellock.c: Include <atomic.h>.
345 2013-03-04  Roland McGrath  <roland@hack.frob.com>
347         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h:
348         Change multiple inclusion guard to _LINUX_I686_DL_SYSDEP_H.
349         Use #include_next.
350         (HAVE_DL_DISCOVER_OSVERSION): Remove definition, now redundant.
351         (RTLD_PRIVATE_ERRNO): Likewise.
352         (NEED_DL_SYSINFO, DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION):
353         Move macros and associated declaration to ...
354         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: ... here.
355         Change multiple include guard to _LINUX_I386_DL_SYSDEP_H.
356         Use #include_next.
358 2013-03-01  Carlos O'Donell  <carlos@redhat.com>
360         * Makefile (tests): Revert last change.
361         (tst-pthread-stack-env-ENV): Likewise.
362         * nptl-init.c (set_default_stacksize): Likewise.
363         (__pthread_initialize_minimal_internal): Likewise.
364         * tst-pthread-stack-env.c: Likewise.
366 2013-03-01  Siddhesh Poyarekar  <siddhesh@redhat.com>
368         * tst-oddstacklimit.c: Include stdlib.h.
370         * Makefile (tests): Add tst-pthread-stack-env.
371         (tst-pthread-stack-env-ENV): Set environment for test.
372         * nptl-init.c (set_default_stacksize): New function.
373         (__pthread_initialize_minimal_internal): Accept ARGC, ARGV and
374         ENVP.  Initialize __ENVIRON and set __DEFAULT_STACKSIZE.
375         * tst-pthread-stack-env.c: New test case.
377 2013-02-21  David S. Miller  <davem@davemloft.net>
379         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
380         (FUTEX_WAIT_REQUEUE_PI): Define.
381         (FUTEX_CMP_REQUEUE_PI): Likewise.
382         (lll_futex_wait_requeue_pi): Likewise.
383         (lll_futex_timed_wait_requeue_pi): Likewise.
384         (lll_futex_cmp_requeue_pi): Likewise.
386 2013-02-21  Carlos O'Donell  <carlos@redhat.com>
388         * sysdeps/unix/sysv/linux/fork.c: Fix comment typo.
390 2013-02-18  Siddhesh Poyarekar  <siddhesh@redhat.com>
392         * sysdeps/pthread/tst-timer.c: Include stdlib.h for declaration
393         of exit.
394         * tst-barrier4.c: Likewise.
395         * tst-robust7.c: Likewise.
397         [BZ #14920]
398         * pthreadP.h (USE_REQUEUE_PI): New macro to check if mutex is
399         PI-aware.
400         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Use
401         PI-aware futex operations if available and mutex is PI-aware.
402         * pthread_cond_signal.c (__pthread_cond_signal): Likewise.
403         * nptl/pthread_cond_timedwait.c (__pthread_cond_timedwait):
404         Likewise.
405         * pthread_cond_wait.c (__condvar_cleanup): Adjust lock if
406         cancellation occurred just after futex returned successfully
407         from a PI operation with the mutex held.
408         (__pthread_cond_wait): Use PI-aware futex operations if
409         available and mutex is PI-aware.
410         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
411         (FUTEX_WAIT_REQUEUE_PI): Define.
412         (FUTEX_CMP_REQUEUE_PI): Likewise.
413         (lll_futex_wait_requeue_pi): Likewise.
414         (lll_futex_timed_wait_requeue_pi): Likewise.
415         (lll_futex_cmp_requeue_pi): Likewise.
416         * nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h
417         (FUTEX_WAIT_REQUEUE_PI): Define.
418         (FUTEX_CMP_REQUEUE_PI): Likewise.
419         (lll_futex_wait_requeue_pi): Likewise.
420         (lll_futex_timed_wait_requeue_pi): Likewise.
421         (lll_futex_cmp_requeue_pi): Likewise.
422         * sysdeps/unix/sysv/linux/kernel-features.h: Define
423         __ASSUME_REQUEUE_PI for Linux version higher than 2.6.31.
425 2013-02-04  Andreas Schwab  <schwab@suse.de>
427         [BZ #14142]
428         * tst-cancel14.c: Include <sys/time.h>.
429         * tst-cancel15.c: Likewise.
430         * tst-mutex9.c: Include <stdint.h>, <stdlib.h> and <sys/time.h>.
431         * tst-stackguard1.c: Include <tls.h>
433 2013-01-16  Andreas Schwab  <schwab@suse.de>
435         [BZ #14327]
436         * sem_open.c (sem_open): Use __mktemp instead of mktemp.
438 2013-01-11  Carlos O'Donell  <codonell@redhat.com>
440         * allocatestack.c (allocate_stack): Add comment. Remove assert
441         on attr.
443 2013-01-11  H.J. Lu  <hongjiu.lu@intel.com>
445         * Makefile (tst-cancel7-ARGS: Replace $(host-built-program-cmd)
446         with $(host-test-program-cmd).
447         (tst-exec4-ARGS): Likewise.
448         (tst-stackguard1-ARGS): Likewise.
449         ($(objpfx)tst-tls6.out): Don't pass $(elf-objpfx) to tst-tls6.sh.
450         Replace $(rtld-installed-name) with $(test-via-rtld-prefix).
451         * tst-tls6.sh (elf_objpfx): Removed.
452         (rtld_installed_name): Renamed to ...
453         (test_via_rtld_prefix): This.
454         (tst_tls5): Prepend ${test_via_rtld_prefix}.
456 2013-01-02  Joseph Myers  <joseph@codesourcery.com>
458         * All files with FSF copyright notices: Update copyright dates
459         using scripts/update-copyrights.
461 2013-01-01  Joseph Myers  <joseph@codesourcery.com>
463         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Reformat
464         copyright notice.
466 2012-12-28  Andi Kleen  <ak@linux.intel.com>
468         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Convert
469         to prototype.
470         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock):
471         Likewise.
473 2012-12-27  David S. Miller  <davem@davemloft.net>
475         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
476         (lll_futex_timed_wait_bitset): New macro.
478 2012-12-27  Siddhesh Poyarekar  <siddhesh@redhat.com>
480         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (SYS_futex):
481         Remove definition.
482         (lll_futex_timed_wait): Replace assembly code with
483         INTERNAL_SYSCALL.
484         (lll_futex_timed_wait_bitset): Likewise.
485         (lll_futex_wake): Likewise.
486         (lll_futex_requeue): Likewise.
487         (lll_futex_wake_unlock): Likewise.
489 2012-12-08  Siddhesh Poyarekar  <siddhesh@redhat.com>
491         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind):
492         Declare LOCAL_VAR as char.
494 2012-12-04  Joseph Myers  <joseph@codesourcery.com>
496         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__old_sem_post):
497         Cast result of atomic_increment_val to (void) instead of storing
498         in otherwise-unused variable.
500 2012-12-03  Allan McRae  <allan@archlinux.org>
502         * Makefile (LDFLAGS-tst-cond24, LDFLAGS-tst-cond25): Remove.
504 2012-11-26  H.J. Lu  <hongjiu.lu@intel.com>
506         * unwind.c (__pthread_unwind): Pass address of unwind_cleanup
507         to THREAD_SETMEM.
508         * sysdeps/i386/tls.h: Include <libc-internal.h>.
509         (THREAD_SETMEM): Use cast_to_integer before casting to uint64_t.
510         (THREAD_SETMEM_NC): Likewise.
511         * sysdeps/x86_64/tls.h: Include <libc-internal.h>.
512         (THREAD_SETMEM): Use cast_to_integer before casting to uint64_t.
513         (THREAD_SETMEM_NC): Likewise.
515 2012-11-21  Joseph Myers  <joseph@codesourcery.com>
517         * sysdeps/unix/sysv/linux/sem_post.c (__old_sem_post): Cast result
518         of atomic_increment_val to (void) instead of storing in
519         otherwise-unused variable.
521         * pthread_cond_timedwait.c (__pthread_cond_timedwait)
522         [__NR_clock_gettime]: Cast result of INTERNAL_VSYSCALL to void
523         instead of storing in otherwise-unused variable.
525 2012-11-14  Marcus Shawcroft  <marcus.shawcroft@linaro.org>
527         * Makefile (CFLAGS-open.c, CFLAGS-open64.c, CFLAGS-pause.c)
528           (CFLAGS-recv.c, CFLAGS-send.c): Define.
530 2012-11-06  Chris Metcalf  <cmetcalf@tilera.com>
532         * tst-sem14.c (TIMEOUT): Set timeout to 10 seconds.
533         * tst-cond24.c (TIMEOUT): Increase from 10 to 20 seconds.
535 2012-11-05  Siddhesh Poyarekar  <siddhesh@redhat.com>
537         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Time out
538         if absolute timeout is negative.
539         [__ASSUME_FUTEX_CLOCK_REALTIME &&
540         lll_futex_timed_wait_bitset]: Use lll_futex_timed_wait_bitset.
541         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
542         Likewise.
543         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
544         Likewise.
545         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
546         (__lll_robust_timedlock_wait): Likewise.
547         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
548         (lll_futex_timed_wait_bitset): New macro.
549         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
550         (lll_futex_timed_wait_bitset): Likewise.
552 2012-11-03  David S. Miller  <davem@davemloft.net>
554         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (BUSY_WAIT_NOP):
555         Add missing spaces.
556         (__cpu_relax): Likewise.
558 2012-11-02  H.J. Lu  <hongjiu.lu@intel.com>
560         * sysdeps/x86_64/tls.h: Don't include <xmmintrin.h>.
561         (__128bits): New struct typedef.
562         (tcbhead_t): Replace __m128 with __128bits.
564 2012-10-30  Aurelien Jarno  <aurelien@aurel32.net>
565             Joseph Myers  <joseph@codesourcery.com>
567         * Makefile (tst-cancel7-ARGS): Use exec in --command argument.
569 2012-10-28  David S. Miller  <davem@davemloft.net>
571         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (BUSY_WAIT_NOP):
572         Define when we have v9 instructions available.
573         * sysdeps/unix/sysv/linux/sparc/sparc64/cpu_relax.S: New file.
574         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/cpu_relax.S: New
575         file.
576         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/Makefile: New
577         file.
578         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Add cpu_relax
579         to libpthread-routines.
581 2012-10-25  Roland McGrath  <roland@hack.frob.com>
583         * tst-cond-except.c (TEST_FUNCTION): New macro.
585 2012-10-25  Joseph Myers  <joseph@codesourcery.com>
587         * Makefile ($(objpfx)tst-tls6.out): Use $(BASH) not $(SHELL) to
588         run tst-tls6.sh.
589         * tst-tls6.sh: Use /bin/bash not /bin/sh.
591 2012-10-25  Roland McGrath  <roland@hack.frob.com>
593         * tst-basic2.c (do_test): Return RESULT, not always zero.
595         * tst-cond25.c: Include <stdint.h>
596         (waiter): Add casts to uintptr_t between casting integer<->pointer.
597         (timed_waiter): Likewise.
598         (do_test_wait): Likewise.
599         * tst-cond-except.c (thr): Likewise.
600         (do_test): Use prototype definition.
602 2012-10-24  Joseph Myers  <joseph@codesourcery.com>
603             Jim Blandy  <jimb@codesourcery.com>
605         * Makefile ($(objpfx)tst-tls6.out): Pass $(test-wrapper-env) to
606         tst-tls6.sh.
607         * tst-tls6.sh (test_wrapper_env): New variable.  Use it to run
608         programs with LD_PRELOAD set.
610 2012-10-24  Roland McGrath  <roland@hack.frob.com>
612         * Makefile ($(objpfx)tst-cond11, $(objpfx)tst-cond19): Targets removed.
613         ($(objpfx)tst-sem5, $(objpfx)tst-cancel18): Likewise.
614         ((objpfx)tst-cancelx18, $(objpfx)tst-clock2): Likewise.
615         ($(objpfx)tst-rwlock14): Likewise.
617 2012-10-24  Joseph Myers  <joseph@codesourcery.com>
619         * Makefile (tests): Remove tst-oddstacklimit.
620         (test-srcs): New variable.
621         (tst-oddstacklimit-ENV): Remove.
622         [$(run-built-tests) = yes] (tests): Depend on
623         $(objpfx)tst-oddstacklimit.out.
624         [$(run-built-tests) = yes] ($(objpfx)tst-oddstacklimit.out): New
625         target.
626         * tst-oddstacklimit.c: Do not include "tst-basic1.c".  Use
627         setrlimit before executing tst-basic1 test passed to --command.
629 2012-10-23  Joseph Myers  <joseph@codesourcery.com>
631         * Makefile [$(cross-compiling) = no]: Change condition to
632         [$(run-built-tests) = yes].
634 2012-10-23  Jim Blandy  <jimb@codesourcery.com>
635             Joseph Myers  <joseph@codesourcery.com>
637         * Makefile (tst-cancel7-ARGS): Use $(host-built-program-cmd).
638         (tst-exec4-ARGS): Likewise.
639         (tst-stackguard1-ARGS): Likewise.
641 2012-10-21  Jim Blandy  <jimb@codesourcery.com>
642             Joseph Myers  <joseph@codesourcery.com>
644         * Makefile ($(objpfx)tst-cancel-wrappers.out): Pass $(NM) to
645         tst-cancel-wrappers.sh.
646         * tst-cancel-wrappers.sh: Use nm program given as first argument,
647         not hardcoded "nm".
649 2012-10-17  Siddhesh Poyarekar  <siddhesh@redhat.com>
651         * tst-cond25.c (do_test_wait): Don't check for return value from
652         pthread_cancel.
654 2012-10-16  Siddhesh Poyarekar  <siddhesh@redhat.com>
656         [BZ #14652]
657         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
658         (__condvar_tw_cleanup):  Adjust the mutex data structure if it
659         was locked by FUTEX_WAIT_REQUEUE_PI.
660         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait
661         (__condvar_w_cleanup): Likewise.
662         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
663         (__condvar_cleanup2): Likewise.
664         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
665         (__condvar_cleanup1): Likewise.
667 2012-10-10  Carlos O'Donell  <carlos@systemhalted.org>
669         * sysdeps/pthread/pthread.h [!(defined __GNUC__ &&
670         defined __EXCEPTIONS) && defined __USE_GNU]
671         (pthread_cleanup_push_defer_np): Fix formatting.
673 2012-10-10  Siddhesh Poyarekar  <siddhesh@redhat.com>
675         [BZ #14652]
676         * Makefile (tests): New test case tst-cond25.
677         (LDFLAGS-tst-cond25): Link tst-cond25 against librt.
678         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
679         (__condvar_tw_cleanup): Lock mutex only if we don't already
680         own it.
681         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
682         (__condvar_w_cleanup): Likewise.
683         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add TID_MASK.
684         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
685         (__condvar_cleanup2): Lock mutex only if we don't already
686         own it.
687         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
688         (__condvar_cleanup1): Likewise.
689         * tst-cond25.c: New test case.
691 2012-10-09  Roland McGrath  <roland@hack.frob.com>
693         * sysdeps/pthread/configure: Regenerated.
694         * sysdeps/x86_64/configure: Regenerated.
696 2012-10-05  David S. Miller  <davem@davemloft.net>
698         [BZ #14568]
699         * sysdeps/sparc/tls.h (DB_THREAD_SELF_INCLUDE): Delete.
700         (DB_THREAD_SELF): Use constants for the register offsets.  Correct
701         the case of a 64-bit debugger with a 32-bit inferior.
703 2012-10-05  H.J. Lu  <hongjiu.lu@intel.com>
705         [BZ #14557]
706         * Makefile (tests-static): Add tst-cancel24-static,
707         tst-cond8-static tst-mutex8-static, tst-mutexpi8-static,
708         tst-sem11-static and tst-sem12-static.
709         (tests): Likewise.
710         (LDLIBS-tst-cancel24-static): New macro.
711         * tst-cancel24-static.cc: New file.
712         * tst-cond8-static.c: Likewise.
713         * tst-mutex8-static.c: Likewise.
714         * tst-mutexpi8-static.c: Likewise.
715         * tst-sem11-static.c: Likewise.
716         * tst-sem12-static.c: Likewise.
718 2012-10-05  Siddhesh Poyarekar  <siddhesh@redhat.com>
720         [BZ #14417]
721         * Makefile (tests): New test case tst-cond24.
722         (LDFLAGS-tst-cond24): Link tst-cond24 against librt.
723         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
724         (__pthread_cond_timedwait): Unlock mutex before going back to
725         wait in PI case.
726         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
727         (__pthread_cond_wait): Likewise.  Revert handling of EAGAIN
728         return from futex_wait.
729         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
730         (__pthread_cond_timedwait): Unlock mutex before going back to
731         wait in PI case.  Set requeue_pi flag only if wait returned 0.
732         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
733         (__pthread_cond_wait): Likewise.  Revert handling of EAGAIN
734         return from futex_wait.
735         * tst-cond24.c: New test case.
737 2012-10-04  Roland McGrath  <roland@hack.frob.com>
739         * pthread_create.c (start_thread): Use __madvise, not madvise.
741 2012-10-02  H.J. Lu  <hongjiu.lu@intel.com>
743         * sysdeps/i386/tls.h: Update copyright years.
745 2012-10-02  Siddhesh Poyarekar  <siddhesh@redhat.com>
747         * pthread_create.c (start_thread): Fix clone flag name in
748         comment to CLONE_CHILD_CLEARTID.
749         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
750         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
751         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
752         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
753         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
754         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
756 2012-10-01  Siddhesh Poyarekar  <siddhesh@redhat.com>
758         [BZ #14477]
759         * Makefile (tests): Add tst-cond-except.
760         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
761         (__pthread_cond_timedwait): Mark instructions where %ebx is
762         incremented in PI case.
763         (.gcc_except_table): Add entry to jump to __condvar_tw_cleanup2
764         for the marked PI case instructions.
765         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
766         (__pthread_cond_wait): Mark instructions where %ebx is
767         incremented in PI case.
768         (.gcc_except_table): Add entry to jump to __condvar_w_cleanup2
769         for the marked PI case instructions.
770         * tst-cond-except.c: New test case.
772 2012-09-24  Dmitry V. Levin  <ldv@altlinux.org>
774         * tst-tls6.sh: Add "set -e".
775         * Makefile: Do not specify -e option when running testsuite
776         shell scripts.
778         * tst-tls6.sh: Add copyright header.
780 2012-09-24  H.J. Lu  <hongjiu.lu@intel.com>
782         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Add "()" when casting
783         to uint64_t for 64-bit store.
784         (THREAD_SETMEM_NC): Likewise.
786 2012-09-19  H.J. Lu  <hongjiu.lu@intel.com>
788         * sysdeps/i386/tls.h (THREAD_SETMEM): Cast to uint64_t for
789         64-bit store.
790         (THREAD_SETMEM_NC): Likewise.
792 2012-09-14  Jeff Law  <law@redhat.com>
794         [BZ #14583]
795         * sysdeps/pthread/pthread.h: Fix prototype of __sigsetjmp.
797 2012-09-13  H.J. Lu  <hongjiu.lu@intel.com>
799         [BZ #14576]
800         * sysdeps/pthread/bits/libc-lockP.h (__rtld_lock_init_recursive):
801         Removed.
803 2012-09-07  H.J. Lu  <hongjiu.lu@intel.com>
805         * Makefile (LDFLAGS-tst-cancel24): Renamed to ...
806         (LDLIBS-tst-cancel24): This.
808 2012-09-06  H.J. Lu  <hongjiu.lu@intel.com>
810         [BZ #14545]
811         * Makefile (tests-static): Add tst-cancel21-static.
812         (tests): Likewise.
813         * tst-cancel21-static.c: New file.
815 2012-09-01  Joseph Myers  <joseph@codesourcery.com>
817         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
818         [!__ASSUME_POSIX_CPU_TIMERS]: Remove conditional code.
819         [__NR_clock_getres]: Make code unconditional.
820         (pthread_getcpuclockid): Remove code left unreachable by removal
821         of conditionals.
823 2012-08-31  Joseph Myers  <joseph@codesourcery.com>
825         [BZ #14532]
826         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Use
827         atomic_compare_and_exchange_bool_rel.
828         * tst-sem14.c: New file.
829         * Makefile (tests): Add tst-sem14.
831 2012-08-15  Roland McGrath  <roland@hack.frob.com>
833         * Makefile (CFLAGS-flockfile.c): Use $(libio-mtsafe) instead
834         of -D_IO_MTSAFE_IO.
835         (CFLAGS-ftrylockfile.c, CFLAGS-funlockfile.c): Likewise.
836         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-fork.c): Likewise.
838 2012-08-16  Joseph Myers  <joseph@codesourcery.com>
840         * pthread_cond_timedwait.c (__pthread_cond_timedwait)
841         [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
842         * pthread_condattr_setclock.c (pthread_condattr_setclock)
843         [!__ASSUME_POSIX_TIMERS]: Likewise.
844         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
845         (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
846         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
847         [!__ASSUME_POSIX_TIMERS]: Likewise.
848         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
849         (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
850         * sysdeps/unix/sysv/linux/timer_create.c [__NR_timer_create]: Make
851         code unconditional.
852         [!__NR-timer_create]: Remove conditional code.
853         (timer_create) [!__ASSUME_POSIX_TIMERS]: Likewise.
854         * sysdeps/unix/sysv/linux/timer_delete.c [__NR_timer_delete]: Make
855         code unconditional.
856         [!__NR_timer_delete]: Remove conditional code.
857         (timer_delete) [!__ASSUME_POSIX_TIMERS]: Likewise.
858         * sysdeps/unix/sysv/linux/timer_getoverr.c
859         [__NR_timer_getoverrun]: Make code unconditional.
860         [!__NR_timer_getoverrun]: Remove conditional code.
861         (timer_getoverrun) [!__ASSUME_POSIX_TIMERS]: Likewise.
862         * sysdeps/unix/sysv/linux/timer_gettime.c [__NR_timer_gettime]:
863         Make code unconditional.
864         [!__NR_timer_gettime]: Remove conditional code.
865         (timer_gettime) [!__ASSUME_POSIX_TIMERS]: Likewise.
866         * sysdeps/unix/sysv/linux/timer_routines.c [__NR_timer_create]:
867         Make code unconditional.
868         [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
869         * sysdeps/unix/sysv/linux/timer_settime.c [__NR_timer_settime]:
870         Make code unconditional.
871         [!__NR_timer_settime]: Remove conditional code.
872         (timer_settime) [!__ASSUME_POSIX_TIMERS]: Likewise.
873         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
874         (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Remove
875         conditional code.
877 2012-08-15  Tom de Vries  <vries@codesourcery.com>
878             Maxim Kuvyrkov  <maxim@codesourcery.com>
880         * sysdeps/pthread/bits/libc-lockP.h (__libc_lock_lock)
881         (__libc_lock_trylock): Allow pre-existing definitions.
883 2012-08-15  Maxim Kuvyrkov  <maxim@codesourcery.com>
885         * pthread_spin_lock.c: New file.
886         * pthread_spin_trylock.c: New file.
888 2012-08-08  Joseph Myers  <joseph@codesourcery.com>
890         * allocatestack.c (setxid_signal_thread) [__ASSUME_TGKILL]: Make
891         code unconditional.
892         (setxid_signal_thread) [!__ASSUME_TGKILL]: Remove conditional code.
893         * pthread_cancel.c (pthread_cancel) [__ASSUME_TGKILL]: Make code
894         unconditional.
895         (pthread_cancel) [!__ASSUME_TGKILL]: Remove conditional code.
896         * sysdeps/pthread/createthread.c (do_clone) [__ASSUME_TGKILL]:
897         Make code unconditional.
898         (do_clone) [!__ASSUME_TGKILL]: Remove conditional code.
899         * sysdeps/unix/sysv/linux/pt-raise.c (raise) [__ASSUME_TGKILL ||
900         __NR_tgkill]: Make code unconditional.
901         (raise) [__ASSUME_TGKILL]: Likewise.
902         (raise) [!__ASSUME_TGKILL]: Remove conditional code.
903         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill)
904         [__ASSUME_TGKILL]: Make code unconditional.
905         (__pthread_kill) [!__ASSUME_TGKILL]: Remove conditional code.
906         * sysdeps/unix/sysv/linux/raise.c (raise) [__ASSUME_TGKILL ||
907         __NR_tgkill]: Make code unconditional.
908         (raise) [__ASSUME_TGKILL]: Likewise.
909         (raise) [!__ASSUME_TGKILL]: Remove conditional code.
911 2012-08-07  Joseph Myers  <joseph@codesourcery.com>
913         * sysdeps/pthread/createthread.c (create_thread)
914         [!__ASSUME_NO_CLONE_DETACHED]: Remove conditional code.
916 2012-08-03  Joseph Myers  <joseph@codesourcery.com>
918         * nptl-init.c (sigcancel_handler) [__ASSUME_CORRECT_SI_PID]: Make
919         code unconditional.
920         (sighandler_setxid) [__ASSUME_CORRECT_SI_PID]: Likewise.
922 2012-07-28  Siddhesh Poyarekar  <siddhesh@redhat.com>
924         * tst-pthread-getattr.c (MAX_STACK_SIZE): New macro.
925         (pagesize): New static variable.
926         (allocate_and_test): Return MEM.  Rename parameter to TARGET.
927         (check_stack_top): New local variables MEM and PAGEMASK.  Cap
928         stack size to MAX_STACK_SIZE.  Call allocate_and_test for
929         halfway up the stack top page.  Verify that the top page was
930         written into.
931         (do_test): Get pagesize using sysconf.
933 2012-07-25  Andreas Schwab  <schwab@linux-m68k.org>
935         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Remove pseudo_end
936         label.
937         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Likewise.
938         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO):
939         Likewise.
941 2012-07-25  Siddhesh Poyarekar  <siddhesh@redhat.com>
943         * tst-pthread-getattr.c: Revert last change.
945 2012-07-20  Siddhesh Poyarekar  <siddhesh@redhat.com>
947         * tst-pthread-getattr.c (MAX_STACK_SIZE): New max cap for stack
948         size.
949         (_MIN): New macro.
950         (allocate_and_test): Return STACKADDR.  Access STACKADDR instead
951         of MEM to test.
952         (check_stack_top): Read valued written into STACKADDR in
953         allocate_and_test.  Cap stack size to MAX_STACK_SIZE.
955 2012-07-19  Siddhesh Poyarekar  <siddhesh@redhat.com>
957         * nptl-init.c (sighandler_setxid): Fix the comment that
958         describes it.
960 2012-06-23  Thomas Schwinge  <thomas@codesourcery.com>
962         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
963         (__lll_robust_timedlock_wait): Simplify CFI directives.
965 2012-06-20  Siddhesh Poyarekar  <siddhesh@redhat.com>
967         [BZ #12416]
968         * Makefile (tests): Add test case.
969         * pthread_getattr_np.c (pthread_getattr_np): Deduct pages below
970         the __libc_stack_end page from stacksize.  Truncate stacksize to
971         make it page aligned when it is computed from RLIMIT_STACK.
972         * tst-pthread-getattr.c: New test case. Verify that stackaddr is
973         accessible.
975 2012-06-07  Carlos Sánchez de La Lama  <csanchezdll@gmail.com>
977         [BZ #14205]
978         * sysdeps/sparc/sparc32/pthread_spin_lock.S: Do not use v9
979         branches.
981 2012-06-04  Siddhesh Poyarekar  <siddhesh@redhat.com>
982             Jakub Jelinek  <jakub@redhat.com>
984         [BZ #14188]
985         * sysdeps/pthread/pthread.h
986         [!(defined __GNUC__ && defined __EXCEPTIONS)]
987         (pthread_cleanup_push, pthread_cleanup_push_defer_np): Use
988         __libc_unlikely instead of __builtin_expect.
990 2012-05-30  H.J. Lu  <hongjiu.lu@intel.com>
992         [BZ #14117]
993         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Removed.
994         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
995         * sysdeps/unix/sysv/linux/i386/Implies: New file.
996         * sysdeps/unix/sysv/linux/x86_64/Implies: Likewise.
997         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Renamed
998         to ...
999         * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: This.
1000         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Renamed
1001         to ...
1002         * sysdeps/unix/sysv/linux/x86/bits/semaphore.h: This.
1004 2012-05-30  Andreas Schwab  <schwab@linux-m68k.org>
1006         [BZ #14132]
1007         * nptl-init.c (pthread_functions): Remove use of INTUSE and
1008         _internal aliases.
1009         (__pthread_initialize_minimal_internal): Likewise.
1010         * sem_open.c: Likewise.
1011         * sem_unlink.c: Likewise.
1012         * pthreadP.h: Replace _internal aliases by hidden_proto
1013         declarations.
1014         * pthread_getspecific.c: Replace _internal alias by hidden_def.
1015         * pthread_key_create.c: Likewise.
1016         * pthread_mutex_destroy.c: Likewise.
1017         * pthread_mutex_init.c: Likewise.
1018         * pthread_mutex_lock.c: Likewise.
1019         * pthread_mutex_unlock.c: Likewise.
1020         * pthread_once.c: Likewise.
1021         * pthread_rwlock_rdlock.c: Likewise.
1022         * pthread_rwlock_unlock.c: Likewise.
1023         * pthread_rwlock_wrlock.c: Likewise.
1024         * pthread_setspecific.c: Likewise.
1025         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
1026         Likewise.
1027         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1028         Likewise.
1029         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1030         Likewise.
1031         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1032         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
1033         * sysdeps/unix/sysv/linux/s390/pthread_once.c: Likewise.
1034         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
1035         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
1036         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1037         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1038         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
1039         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
1040         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
1041         Likewise.
1042         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
1043         Likewise.
1044         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
1045         Likewise.
1047 2012-05-27  Chung-Lin Tang  <cltang@codesourcery.com>
1049         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO, LOAD_ARGS_1)
1050         (LOAD_ARGS_2 ,LOAD_ARGS_3 ,LOAD_ARGS_4): Add CFI restores.
1052         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_lock_wait_private)
1053         (__lll_lock_wait, __lll_timedlock_wait, __lll_timedwait_tid): Add CFI
1054         directives.
1055         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
1056         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Likewise.
1057         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
1058         (pthread_barrier_wait): Likewise.
1059         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
1060         (__pthread_cond_broadcast): Likewise.
1061         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
1062         (__pthread_cond_signal): Likewise.
1063         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1064         (__pthread_cond_timedwait): Likewise.
1065         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S (__pthread_cond_wait):
1066         Likewise.
1067         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S
1068         (__pthread_rwlock_rdlock): Likewise.
1069         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
1070         (pthread_rwlock_timedrdlock): Likewise.
1071         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
1072         (pthread_rwlock_timedwrlock): Likewise.
1073         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
1074         (__pthread_rwlock_unlock): Likewise.
1075         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S
1076         (__pthread_rwlock_wrlock): Likewise.
1077         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post): Likewise.
1078         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
1079         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
1080         Likewise.
1081         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
1083 2012-05-26  Siddhesh Poyarekar  <siddhesh@redhat.com>
1085         [BZ #12416]
1086         * nptl/pthread_getattr_np.c (pthread_getattr_np): Use
1087         __libc_stack_end rounded to the end of containing page as the
1088         real stack end.
1090 2012-05-25  Rayson Ho  <rho@redhat.com>
1092         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Low-level SystemTap
1093         probes for i386.
1094         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1095         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1096         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
1097         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1098         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1099         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1100         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1101         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1103 2012-05-25  Rayson Ho  <rho@redhat.com>
1104             Roland McGrath  <roland@hack.frob.com>
1106         * DESIGN-systemtap-probes.txt: New file.
1107         * pthread_cond_broadcast.c: SystemTap probes.
1108         * pthread_cond_init.c: Likewise.
1109         * pthread_cond_signal.c: Likewise.
1110         * pthread_cond_wait.c: Likewise.
1111         * pthread_cond_destroy.c: Likewise.
1112         * pthread_create.c: Likewise.
1113         * pthread_join.c: Likewise.
1114         * pthread_mutex_destroy.c: Likewise.
1115         * pthread_mutex_init.c: Likewise.
1116         * pthread_mutex_lock.c: Likewise.
1117         * pthread_mutex_timedlock.c: Likewise.
1118         * pthread_mutex_unlock.c: Likewise.
1119         * pthread_rwlock_destroy.c: Likewise.
1120         * pthread_rwlock_rdlock.c: Likewise.
1121         * pthread_rwlock_unlock.c: Likewise.
1122         * pthread_rwlock_wrlock.c: Likewise.
1123         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1124         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1125         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
1126         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1127         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1128         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1129         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1130         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1132 2012-05-24  Roland McGrath  <roland@hack.frob.com>
1134         * pthread_create.c (start_thread): Define pthread_start LIBC_PROBE.
1136 2012-05-17  Andreas Jaeger  <aj@suse.de>
1138         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
1139         (HAVE_DL_DISCOVER_OSVERSION): Don't declare _dl_discover_osversion
1140         only for older kernels.
1142 2012-05-15  Joseph Myers  <joseph@codesourcery.com>
1144         * pthreadP.h [!__NR_set_robust_list] (__NR_set_robust_list): Do
1145         not define.
1147 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1149         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_lock): Load
1150         futex pointer into RDI_LP.  Use RSP_LP to operate on stack.
1151         (lll_robust_lock): Likewise.
1152         (lll_cond_lock): Likewise.
1153         (lll_robust_cond_lock): Likewise.
1154         (lll_timedlock): Likewise.
1155         (lll_robust_timedlock): Likewise.
1156         (lll_unlock): Likewise.
1157         (lll_robust_unlock): Likewise.
1159 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1161         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use
1162         LP_OP(cmp) and RCX_LP on dep_mutex pointer.
1164 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1166         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Use LP_OP(op)
1167         on NWAITERS.
1168         (__gcc_personality_v0): Replace 8-byte data alignment with
1169         LP_SIZE alignment and .quad with ASM_ADDR.
1171 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1173         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Use LP_OP(op)
1174         on NWAITERS.
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/sem_post.S: Use LP_OP(cmp) on
1181         NWAITERS, which is unsigned long int.
1183 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1185         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
1186         (__gcc_personality_v0): Replace 8-byte data alignment with
1187         LP_SIZE alignment and .quad with ASM_ADDR.
1189 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1191         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Use
1192         LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer.  Load
1193         __vdso_clock_gettime pointer into RAX_LP.
1194         (__gcc_personality_v0): Replace 8-byte data alignment with
1195         LP_SIZE alignment and .quad with ASM_ADDR.
1197 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1199         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Use
1200         LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer.  Load
1201         __vdso_clock_gettime pointer into RAX_LP.
1202         (__gcc_personality_v0): Replace 8-byte data alignment with
1203         LP_SIZE alignment and .quad with ASM_ADDR.
1205 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1207         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Use
1208         LP_OP(cmp) and R8_LP on dep_mutex pointer.
1210 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1212         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Use LP_OP(mov)
1213         to update pointer in memory.  Load pointer into RDI_LP.
1215 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1217         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1218         (LLL_STUB_UNWIND_INFO_START): Align label to LP_SIZE instead
1219         of 8.
1220         (LLL_STUB_UNWIND_INFO_END): Likewise.
1221         (lll_timedlock): Load timeout pointer into RDX_LP.
1222         (lll_robust_timedlock): Likewise.
1224 2012-05-15  Siddhesh Poyarekar  <siddhesh@redhat.com>
1225             Jakub Jelinek  <jakub@redhat.com>
1227         [BZ #13613]
1228         * Makefile (tests): Add test cases.
1229         * descr.h (struct pthread): Add a comment describing multiple_threads.
1230         * pthreadP.h (__pthread_multiple_threads): Expand comment to include
1231         single-process case.
1232         * pthread_cancel.c (pthread_cancel): Enable multiple_threads
1233         before setting cancelstate of the thread.
1234         * sysdeps/unix/sysv/linux/libc_multiple_threads.c
1235         (__libc_multiple_threads): Add explanatory comment.
1236         * tst-cancel-self-cancelstate.c: New test case.
1237         * tst-cancel-self-canceltype.c: Likewise.
1238         * tst-cancel-self-cleanup.c: Supporting file for test cases.
1239         * tst-cancel-self-testcancel.c: New test case.
1240         * tst-cancel-self.c: Likewise.
1241         * vars.c: Expand comment to include single-process case.
1243 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
1245         * sysdeps/x86_64/tls.h: Don't include <bits/wordsize.h>.
1246         (tcbhead_t): Remove __x86_64__ check.  Align rtld_savespace_sse
1247         to 32 bytes.
1249 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
1251         * sysdeps/pthread/pthread.h (__PTHREAD_RWLOCK_INT_FLAGS_SHARED):
1252         New.
1253         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Check
1254         __PTHREAD_RWLOCK_INT_FLAGS_SHARED instead of __WORDSIZE.
1256 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
1258         * shlib-versions: Move x86_64-.*-linux.* entry to ...
1259         * sysdeps/x86_64/64/shlib-versions: Here.  New file.
1260         * sysdeps/x86_64/x32/shlib-versions: New file.
1262 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
1264         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Define x32
1265         __SIZEOF_PTHREAD_XXX_T.
1266         (__pthread_internal_list): Check __x86_64__ instead of __WORDSIZE.
1267         (pthread_mutex_t): Likewise.
1268         (pthread_rwlock_t): Likewise.
1269         (__PTHREAD_RWLOCK_INT_FLAGS_SHARED): New.  Defined if __x86_64__
1270         is defined.
1272 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
1274         * sysdeps/x86_64/x32/tls.h: New file.
1276 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
1278         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Use uint64_t on 64-bit
1279         integer.
1280         (THREAD_SETMEM_NC): Likewise.
1282 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
1284         * sysdeps/x86_64/tls.h (THREAD_SELF): Replace movq/%q0 with
1285         mov/%0.
1287 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
1289         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
1290         (__cleanup_fct_attribute): Check __x86_64__ instead of
1291         __WORDSIZE.
1293 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
1295         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER): Check
1296         __PTHREAD_MUTEX_HAVE_PREV instead of __WORDSIZE.
1297         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Likewise.
1298         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
1299         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
1301 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
1303         * pthread_create.c (start_thread): Check __PTHREAD_MUTEX_HAVE_PREV
1304         instead of __WORDSIZE.
1306 2012-05-10  Thomas Schwinge  <thomas@schwinge.name>
1308         [BZ #3748]
1309         * sysdeps/pthread/bits/libc-lockP.h (__libc_once_get): New macro.
1311 2012-05-09  Chung-Lin Tang  <cltang@codesourcery.com>
1313         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1314         (__pthread_cond_timedwait): Use CFI directives.
1315         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
1316         (__pthread_cond_wait): Likewise.
1317         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
1318         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
1320 2012-05-03  David S. Miller  <davem@davemloft.net>
1322         * sysdeps/sparc/sparc64/pthread_spin_unlock.S: Fix thinko, we
1323         always have to return 0, especially for the pthread_spin_init
1324         alias.
1325         * sysdeps/sparc/sparc32/pthread_spin_lock.S: Add missing trailing
1326         newline.
1327         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: Likewise.
1328         * sysdeps/sparc/sparc64/pthread_spin_lock.S: Likewise.
1330 2012-05-02  David S. Miller  <davem@davemloft.net>
1332         * sysdeps/sparc/sparc64/pthread_spin_lock.S: New.
1333         * sysdeps/sparc/sparc64/pthread_spin_lock.c: Delete.
1334         * sysdeps/sparc/sparc64/pthread_spin_unlock.S: New.
1335         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: Delete.
1336         * sysdeps/sparc/sparc64/pthread_spin_trylock.S: New.
1337         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: Delete.
1338         * sysdeps/sparc/sparc64/pthread_spin_init.c: New.
1339         * sysdeps/sparc/sparc32/pthread_spin_lock.S: New.
1340         * sysdeps/sparc/sparc32/pthread_spin_lock.c: Delete.
1341         * sysdeps/sparc/sparc32/pthread_spin_trylock.S: New.
1342         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: Delete.
1343         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: New.
1344         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: Delete.
1345         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.S: New.
1346         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: Delete.
1347         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.S: New.
1348         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: Delete.
1349         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_init.c: New.
1351 2012-05-02  Allan McRae  <allan@archlinux.org>
1353         * Makefile: (LDFLAGS-tst-tls5): Use $(no-as-needed).
1354         (LDFLAGS-tst-cancel24): Likewise.
1356 2012-05-02  Paul Pluzhnikov  <ppluzhnikov@google.com>
1358         * sysdeps/i386/pthread_spin_lock.S: New.
1359         * sysdeps/i386/pthread_spin_lock.c: Delete.
1360         * sysdeps/x86_64/pthread_spin_lock.S: New.
1361         * sysdeps/x86_64/pthread_spin_lock.c: Delete.
1363 2012-04-28  Andreas Schwab  <schwab@linux-m68k.org>
1365         * Makefile ($(objpfx)tst-stack3-mem, $(objpfx)tst-tls6.out): Don't
1366         run when cross-compiling.
1368 2012-04-26  Siddhesh Poyarekar  <siddhesh@redhat.com>
1370         * sysdeps/pthread/unwind-forcedunwind.c: Include gnu/lib-names.h
1371         instead of libgcc_s.h.
1373 2012-04-20  Paul Pluzhnikov  <ppluzhnikov@google.com>
1375         * sysdeps/x86_64/tls.h (TLS_GET_FS, TLS_SET_FS): Delete.
1377 2012-03-27  David S. Miller  <davem@davemloft.net>
1379         * tst-cond16.c (do_test): Use a thread stack size which is either
1380         PTHREAD_STACK_MIN or the page size, whichever is larger.
1381         * tst-cond18.c (do_test): Likewise.
1383 2012-03-19  H.J. Lu  <hongjiu.lu@intel.com>
1385         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Use
1386         register char * __asm__("rsp") to get stack frame.
1388 2012-03-19  H.J. Lu  <hongjiu.lu@intel.com>
1390         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (SYS_futex): Use
1391         __NR_futex directly.
1393 2012-03-19  H.J. Lu  <hongjiu.lu@intel.com>
1395         * unwind.c (unwind_stop): Cast _Unwind_GetCFA return to
1396         _Unwind_Ptr first.
1398 2012-03-16  David S. Miller  <davem@davemloft.net>
1400         [BZ #13844]
1401         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: Include using <..>
1402         instead of "...".
1403         * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c:
1404         Delete, not needed.
1406 2012-03-15  David S. Miller  <davem@davemloft.net>
1408         [BZ #13844]
1409         * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c: New file.
1411 2012-03-09  Paul Eggert  <eggert@cs.ucla.edu>
1413         [BZ #13673]
1414         * pt-crti.S: Replace FSF snail mail address with URL.
1416 2012-03-09  Joseph Myers  <joseph@codesourcery.com>
1418         * sysdeps/pthread/pthread.h (__need_clockid_t, __need_timespec):
1419         Do not define before including <time.h>.
1421 2012-03-08  David S. Miller  <davem@davemloft.net>
1423         * sysdeps/unix/sysv/linux/sparc/sem_post.c: Update copyright year.
1425 2012-03-08  Thomas Schwinge  <thomas@codesourcery.com>
1427         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1428         Check for timestamp before the Epoch.
1430         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Fix
1431         updating nwaiters.
1433         * tst-sem13.c (do_test): Add another test case.
1434         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1435         Fix updating nwaiters.
1437 2012-03-07  Joseph Myers  <joseph@codesourcery.com>
1439         [BZ #10545]
1440         * sysdeps/pthread/configure.in (libc_cv_forced_unwind): Change
1441         link test to a compile test.
1442         (libc_cv_c_cleanup): Likewise.  Declare puts rather than including
1443         <stdio.h>.
1444         * sysdeps/pthread/configure: Regenerated.
1446 2012-03-07  Ulrich Drepper  <drepper@gmail.com>
1448         * Makefile (distribute): Remove variable.
1450 2012-01-23  Thomas Schwinge  <thomas@codesourcery.com>
1452         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Get rid of
1453         superfluous assignment.
1454         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c (sem_timedwait):
1455         Likewise.
1456         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
1457         (sem_timedwait): Likewise.
1459 2012-03-06  Ulrich Drepper  <drepper@gmail.com>
1461         * sysdeps/pthread/bits/libc-lock.h: Move information not needed in
1462         installed headers to...
1463         * sysdeps/pthread/bits/libc-lockP.h: ...here.  New file.
1465 2012-03-06  David S. Miller  <davem@davemloft.net>
1467         * sysdeps/unix/sysv/linux/sparc/sem_post.c (__new_sem_post): Use
1468         atomic_increment and remove unused local variable.
1469         (__old_sem_post): Likewise.
1471 2012-02-27  David S. Miller  <davem@davemloft.net>
1473         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Don't refer to
1474         non-existing __pthread_attr.
1475         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1476         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1477         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1478         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1479         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1481 2012-02-26  Ulrich Drepper  <drepper@gmail.com>
1483         * sysdeps/pthread/pthread.h: Define __need_clockid_t for __USE_XOPEN2K.
1485         * sysdeps/pthread/pthread.h: Define __need_timespec before including
1486         <time.h>.
1487         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Name pthread_attr_t
1488         union.
1489         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1490         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1491         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1492         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1493         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1495 2012-02-21  Joseph Myers  <joseph@codesourcery.com>
1497         [BZ #13695]
1498         * Makefile (generated): Remove crti.S, crtn.S, defs.h and
1499         pt-initfini.s.
1500         [crti.S not in sysdirs] (omit-deps): Do not append.
1501         [crti.S not in sysdirs] (CFLAGS-pt-initfini.s): Remove variable.
1502         [crti.S not in sysdirs] (pt-initfini.c): Remove vpath directive.
1503         [crti.S not in sysdirs] ($(objpfx)crti.S): Remove rule.
1504         [crti.S not in sysdirs] ($(objpfx)crtn.S): Likewise.
1505         [crti.S not in sysdirs] ($(objpfx)defs.h): Likewise.
1506         [crti.S not in sysdirs] ($(objpfx)crti.o): Likewise.
1507         [crti.S not in sysdirs] ($(objpfx)crtn.o): Likewise.
1508         [crti.S in sysdirs] (extra-objs): Append unconditionally.
1509         [crti.S in sysdirs] ($(objpfx)crti.o): Define rule
1510         unconditionally.
1511         * sysdeps/pthread/pt-initfini.c: Remove file.
1513 2012-02-16  Richard Henderson  <rth@twiddle.net>
1515         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Remove file.
1516         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Remove file.
1518 2012-02-15  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1520         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Remove file.
1522 2012-02-16  David S. Miller  <davem@davemloft.net>
1524         * sysdeps/sparc/Makefile: Add -fPIC when building pt-crti.S and crtn.S
1526 2012-02-15  Marek Polacek  <polacek@redhat.com>
1528         * sysdeps/unix/sysv/linux/x86_64/Makefile: Remove file.
1530 2012-02-09  Paul Eggert  <eggert@cs.ucla.edu>
1532         Replace FSF snail mail address with URLs, as per GNU coding standards.
1534 2012-02-08  Andreas Schwab  <schwab@linux-m68k.org>
1536         * Makefile (extra-objs) [crti.S in sysdirs]: Add pt-crti.o.
1538 2012-02-08  Joseph Myers  <joseph@codesourcery.com>
1540         Support crti.S and crtn.S provided directly by architectures.
1541         * Makefile [crti.S in sysdirs] (omit-deps): Do not append.
1542         [crti.S in sysdirs] (CFLAGS-pt-initfini.s): Do not define variable.
1543         [crti.S in sysdirs] ($(objpfx)pt-initfini.s): Disable rule.
1544         [crti.S in sysdirs] ($(objpfx)crti.S): Likewise.
1545         [crti.S in sysdirs] ($(objpfx)crtn.S): Likewise.
1546         [crti.S in sysdirs] ($(objpfx)defs.h): Likewise.
1547         [crti.S in sysdirs] ($(objpfx)crti.o): Likewise.
1548         [crti.S in sysdirs] ($(objpfx)crtn.o): Likewise.
1549         [crti.S in sysdirs] (pt-initfini.c): Remove vpath directive.
1550         [crti.S in sysdirs] ($(objpfx)crti.o): New rule.
1551         * pt-crti.S: New file.
1552         * sysdeps/unix/sysv/linux/i386/Makefile: Remove file.
1554 2012-02-03  Joseph Myers  <joseph@codesourcery.com>
1556         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
1557         macros for PIC register setup.
1558         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1559         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1560         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1561         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1562         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1564 2012-01-11  Marek Polacek  <polacek@redhat.com>
1566         * forward.c (FORWARD_NORETURN): Define macro.
1567         (__pthread_unwind): Use FORWARD_NORETURN macro to avoid warning.
1568         (__pthread_exit): Likewise.
1570 2012-01-10  Ulrich Drepper  <drepper@gmail.com>
1572         * sysdeps/pthread/pthread.h: Add const attribute to pthread_equal.
1574         * pthreadP.h: Add noreturn to __pthread_exit.
1575         * sysdeps/pthread/pthread-functions.h: Likewise for ptr___pthread_exit.
1577 2011-12-30  Adhemerval Zanella  <azanella@linux.vnet.ibm.com>
1579         * sysdeps/unix/sysv/linux/aio_misc.h (__aio_create_helper_thread):
1580         Call pthread_attr_setstacksize() with result of
1581         __pthread_get_minstack() to account for application TLS usage.
1583 2012-01-08  Marek Polacek  <polacek@redhat.com>
1585         * sysdeps/unix/sysv/linux/mq_notify.c: Include <nptl/pthreadP.h>.
1587 2012-01-07  Ulrich Drepper  <drepper@gmail.com>
1589         [BZ #13553]
1590         * pthreadP.h: Use const instead of __const.
1591         * semaphore.h: Likewise.
1592         * sysdeps/pthread/bits/libc-lock.h: Likewise.
1593         * sysdeps/pthread/bits/sigthread.h: Likewise.
1594         * sysdeps/pthread/pthread.h: Likewise.
1596         * Makefile: Remove elf=yes test, only ELF is supported.
1598         * shlib-versions: Remove entries for ports architectures.
1600         In case anyone cares, the IA-64 architecture could move to ports.
1601         * sysdeps/ia64/*: Removed.
1602         * sysdeps/unix/sysv/linux/ia64/*: Removed.
1604 2011-12-22  Ulrich Drepper  <drepper@gmail.com>
1606         * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread): Use
1607         __pthread_get_minstack.
1608         * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Likewise.
1610         [BZ #13088]
1611         * sysdeps/unix/sysv/linux/timer_routines.c: Get minimum stack size
1612         through __pthread_get_minstack.
1613         * nptl-init.c (__pthread_initialize_minimal_internal): Get page size
1614         directly from _rtld_global_ro.
1615         (__pthread_get_minstack): New function.
1616         * pthreadP.h: Declare __pthread_get_minstack.
1617         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_get_minstack.
1619 2011-12-21  Ulrich Drepper  <drepper@gmail.com>
1621         [BZ #13515]
1622         * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1623         Correct reading name from file.
1625 2011-12-14  Carlos O'Donell  <carlos@systemhalted.org>
1627         * allocatestack.c (allocate_stack): Return errno on failure.
1629 2011-12-14  Jeff Law  <law@redhat.com>
1631         [BZ #5245]
1632         * pthread_create.c (__pthread_create_2_1): Translate ENOMEM to EAGAIN.
1634 2011-11-28  Andreas Schwab  <schwab@redhat.com>
1636         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Handle
1637         EAGAIN from FUTEX_WAIT_REQUEUE_PI.
1638         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1640 2011-11-15  Ulrich Drepper  <drepper@gmail.com>
1642         * pthread_getattr_np.c (pthread_getattr_np): Set FD_CLOEXEC for
1643         /proc/self/maps.
1645 2011-10-29  Ulrich Drepper  <drepper@gmail.com>
1647         [BZ #13358]
1648         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1649         (__pthread_cond_timedwait): Initialize %r15 correctly also for code
1650         path for kernels with FUTEX_CLOCK_REALTIME.
1651         Debugged by H.J. Lu <hjl.tools@gmail.com>.
1653 2011-10-27  Andreas Schwab  <schwab@redhat.com>
1655         [BZ #13344]
1656         * sysdeps/pthread/pthread.h: Use __THREADNL instead of __THREAD
1657         for memory synchronization functions.
1658         * semaphore.h: Likewise.
1660 2011-10-24  Ulrich Drepper  <drepper@gmail.com>
1662         * tst-cancel7.c: Avoid warning.
1663         * tst-mutex6.c: Likewise.
1664         * tst-mutex9.c: Likewise.
1665         * tst-mutexpi6.c: Likewise.
1667 2011-10-23  Ulrich Drepper  <drepper@gmail.com>
1669         * sysdeps/i386/tls.h: Remove #include <list.h>.
1671 2011-10-15  Ulrich Drepper  <drepper@gmail.com>
1673         * pthread_create.c (start_thread): Call __ctype_init.
1675 2011-09-15  Andreas Schwab  <schwab@redhat.com>
1677         * sysdeps/pthread/list.h: Define only list_t if __need_list_t is
1678         defined.
1679         (list_add): Add atomic_write_barrier.
1680         * descr.h: Define __need_list_t before including <list.h>.
1681         * nptl-init.c: Include <list.h>
1682         * allocatestack.c: Likewise.
1684 2011-09-11  Ulrich Drepper  <drepper@gmail.com>
1686         * sysdeps/i386/tls.h: Remove HAVE_TLS_SUPPORT test.
1687         * sysdeps/ia64/tls.h: Likewise.
1688         * sysdeps/powerpc/tls.h: Likewise.
1689         * sysdeps/s390/tls.h: Likewise.
1690         * sysdeps/sh/tls.h: Likewise.
1691         * sysdeps/sparc/tls.h: Likewise.
1692         * sysdeps/x86_64/tls.h: Likewise.
1694 2011-09-10  Ulrich Drepper  <drepper@gmail.com>
1696         * sysdeps/pthread/malloc-machine.h: Define MUTEX_INITIALIZER.
1698         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Don't handle
1699         !USE___THREAD.
1700         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1701         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1702         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1703         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1704         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
1705         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
1706         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
1707         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
1708         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1709         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1710         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
1711         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1713         * tst-tls1.c: Support for __thread is now mandatory.
1714         * tst-tls2.c: Likewise.
1715         * tst-tls3.c: Likewise.
1716         * tst-tls3mod.c: Likewise.
1717         * tst-tls4.c: Likewise.
1718         * tst-tls4moda.c: Likewise.
1719         * tst-tls4modb.c: Likewise.
1720         * tst-tls5.h: Likewise.
1722 2011-09-08  Ulrich Drepper  <drepper@gmail.com>
1724         [BZ #12403]
1725         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1726         (pthread_rwlock_timedwrlock): Use correct macro in test.
1727         Patch by H.J. Lu <hongjiu.lu@intel.com>.
1729 2011-09-06  Ulrich Drepper  <drepper@gmail.com>
1731         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): Don't
1732         use gettimeofday vsyscall, just call gettimeofday.
1733         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1734         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
1735         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1736         Likewise.
1737         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1738         Likewise.
1739         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1740         Simplify __vdso_clock_gettime use.
1742 2011-09-05  David S. Miller  <davem@davemloft.net>
1744         * sysdeps/unix/sysv/linux/sem_timedwait.c (do_futex_timed_wait):
1745         New function.
1746         (sem_timedwait): Call it to force an exception region around
1747         the async cancel enable and the futex operation.
1748         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: Likewise.
1749         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: Likewise.
1750         * sysdeps/unix/sysv/linux/sem_wait.c (do_futex_wait): New function.
1751         (__new_sem_wait): Call it to force an exception region around
1752         the async cancel enable and the futex operation.
1753         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: Likewise.
1754         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: Likewise.
1756 2011-08-31  Andreas Schwab  <schwab@redhat.com>
1758         * allocatestack.c (setxid_mark_thread): Ensure that the exiting
1759         thread is woken up.
1761 2011-08-20  David S. Miller  <davem@davemloft.net>
1763         * Makefile (tst-cleanup0.out): Fix typo in output redirection.
1765 2011-08-14  Roland McGrath  <roland@hack.frob.com>
1767         * sysdeps/i386/pthreaddef.h (TCB_ALIGNMENT): Set to 64, optimal on Atom.
1768         * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Likewise.
1770 2011-08-08  Andreas Schwab  <schwab@redhat.com>
1772         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned
1773         stack.
1774         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1775         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1777 2011-07-22  Ulrich Drepper  <drepper@gmail.com>
1779         * sysdeps/pthread/unwind-forcedunwind.c (_Unwind_Resume): Add read
1780         barrier.
1781         (__gcc_personality_v0): Likewise.
1782         (_Unwind_ForcedUnwind): Likewise.
1783         (_Unwind_GetCFA): Likewise.
1785 2011-07-14  Roland McGrath  <roland@hack.frob.com>
1787         * allocatestack.c (__reclaim_stacks): Use uintptr_t cast rather than
1788         UINTMAX_C.
1790 2011-06-30  Ulrich Drepper  <drepper@gmail.com>
1792         * nptl-init.c (__nptl_set_robust): New function.
1793         (pthread_functions): Add reference.
1794         * npthreadP.h: Declare __nptl_set_robust.
1795         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
1796         ptr_set_robust member.
1797         * sysdeps/unix/sysv/linux/fork.c: Call set_robust_list syscall in
1798         child if threads are used.
1800 2011-06-14  Andreas Jaeger  <aj@suse.de>
1802         * pthread_rwlock_init.c: Include <string.h> for memset declaration.
1804 2011-05-11  Ulrich Drepper  <drepper@gmail.com>
1806         [BZ #386]
1807         * allocatestack.c (allocate_stack): Convert ENOMEM error to EAGAIN.
1809 2011-04-10  Ulrich Drepper  <drepper@gmail.com>
1811         [BZ #12650]
1812         * allocatestack.c (get_cached_stack): Deallocate DTV entries before
1813         clearing memory.
1814         Patch partly by Robert Rex <robert.rex@exasol.com>.
1816 2011-01-19  Roland McGrath  <roland@redhat.com>
1818         * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
1819         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1820         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
1821         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1822         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
1823         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
1825 2011-01-16  Andreas Schwab  <schwab@linux-m68k.org>
1827         * Makefile (test-extras): Add tst-cleanup4aux.
1829 2011-01-14  Ulrich Drepper  <drepper@gmail.com>
1831         [BZ #10563]
1832         * sysdeps/pthread/setxid.h (__SETXID_1): Add cast to assignment.
1833         (__SETXID_2): Likewise.
1834         (__SETXID_3): Likewise.
1836 2011-01-13  Ulrich Drepper  <drepper@gmail.com>
1838         [BZ #10484]
1839         * Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
1840         * alloca_cutoff.c: Add libc_hidden_def.
1842 2010-10-13  H.J. Lu  <hongjiu.lu@intel.com>
1844         [BZ #12113]
1845         * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
1846         * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
1847         of "struct pthread".
1849 2010-09-21  Andreas Schwab  <schwab@redhat.com>
1851         * sysdeps/pthread/pthread.h (pthread_cleanup_push)
1852         [!__EXCEPTIONS]: Mangle local variable not_first_call.
1853         (pthread_cleanup_push_defer_np): Likewise.
1855 2010-09-03  Ulrich Drepper  <drepper@redhat.com>
1857         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are
1858         small.
1860 2010-08-10  Dinakar Guniguntala  <dino@in.ibm.com>
1861             Stefan Hajnoczi  <stefanha@linux.vnet.ibm.com>
1863         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
1864         FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
1866 2010-08-12  H.J. Lu  <hongjiu.lu@intel.com>
1868         * sysdeps/unix/sysv/linux/i386/Makefile: New file.
1870 2010-05-01  Alan Modra  <amodra@gmail.com>
1872         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1873         (PSEUDO): Use correct cr save.  Don't use wrong parm save area
1874         to save temps.  Correct cfi for possible later frame manipulation.
1875         (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
1876         (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
1877         (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
1878         (DOCARGS_6, UNDOCARGS_6): Likewise.
1879         (CENABLE, CDISABLE): Add nops for non-shared calls.
1881 2010-07-06  Andreas Schwab  <schwab@redhat.com>
1883         * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1884         Fix type mismatch.
1886 2010-07-03  Ulrich Drepper  <drepper@redhat.com>
1888         * tst-abstime.c (do_test): Some more cleanups
1890 2010-07-02  Ulrich Drepper  <drepper@redhat.com>
1892         * tst-abstime.c: Correct testing and add test for sem_timedwait.
1894 2010-07-01  Andreas Schwab  <schwab@redhat.com>
1895             Ulrich Drepper  <drepper@redhat.com>
1897         * Makefile (tests): Add tst-abstime.
1898         * tst-abstime.c: New file.
1899         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
1900         (__lll_timedlock_wait): Check for timestamp before the Epoch.
1901         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1902         (__lll_timedlock_wait): Likewise.
1903         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
1904         (__lll_robust_timedlock_wait): Likewise.
1905         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1906         (__pthread_cond_timedwait): Likewise.
1907         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
1908         (pthread_rwlock_timedrdlock): Likewise.
1909         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1910         (pthread_rwlock_timedwrlock): Likewise.
1911         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1912         Likewise.
1914 2010-07-01  Ulrich Drepper  <drepper@redhat.com>
1916         * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
1918 2010-06-01  Takashi Yoshii  <takashi.yoshii.zj@renesas.com>
1920         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
1921         location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
1923 2010-04-09  Ulrich Drepper  <drepper@redhat.com>
1925         [BZ #11390]
1926         * sysdeps/unix/sysv/linux/pthread_getname.c: New file.
1927         * sysdeps/unix/sysv/linux/pthread_setname.c: New file.
1928         * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and
1929         pthread_setname.
1930         * Makefile (libpthread-routines): Add pthread_getname and
1931         pthread_setname.
1932         * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12.
1934 2010-04-05  Thomas Schwinge  <thomas@schwinge.name>
1936         * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/.
1937         * sysdeps/pthread/rt-unwind-resume.c: Likewise.
1938         * sysdeps/pthread/Makefile: Remove csu section and rt section's
1939         unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead.
1941 2010-03-23  Luis Machado  <luisgpm@br.ibm.com>
1943         * pthread_cond_timedwait.c: Add check for
1944         HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
1945         (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
1946         INTERNAL_SYSCALL.
1948 2010-03-09  Ulrich Drepper  <drepper@redhat.com>
1950         * pthread_create.c (__pthread_create_2_1): If priorities are incorrect
1951         and the call fails wake eventually waiting setxid threads.  Don't free
1952         stack here if we try starting a thread.
1953         * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter
1954         if the clone call failed.
1956 2010-03-08  Andreas Schwab  <schwab@redhat.com>
1958         * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
1959         * allocatestack.c (get_cached_stack): Set setxid_futex.
1960         (allocate_stack): Likewise.
1962 2010-03-05  Andreas Schwab  <schwab@redhat.com>
1963             Ulrich Drepper  <drepper@redhat.com>
1965         * allocatestack.c (setxid_mark_thread): Delay handling of thread if
1966         it is creating a thread or it is just being created.
1967         * pthread_create.c (start_thread): Wake setxid thread if it is
1968         waiting.
1969         (__pthread_create_2_1): Initialize setxid_futex.
1970         * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it
1971         is waiting.
1973 2010-01-15  Ulrich Drepper  <drepper@redhat.com>
1975         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1976         Fix unwind info.
1977         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1979 2010-01-15  Michal Schmidt  <mschmidt@redhat.com>
1981         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1982         Fix pthread_cond_timedwait with requeue-PI.
1983         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1984         Fix pthread_cond_wait with requeue-PI.
1986 2010-01-14  Ulrich Drepper  <drepper@redhat.com>
1988         * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
1989         and pthread_mutexattr_setrobust for GLIBC_2.12.
1990         * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
1991         * pthread_mutexattr_getrobust.c: Define alias
1992         pthread_mutexattr_getrobust.
1993         * pthread_mutexattr_setrobust.c: Define alias
1994         pthread_mutexattr_setrobust.
1996 2010-01-12  Ulrich Drepper  <drepper@redhat.com>
1998         * sysdeps/pthread/pthread.h: Cleanup.  Fix up for XPG7.
2000 2010-01-08  Ulrich Drepper  <drepper@redhat.com>
2002         * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
2004 2009-12-18  Thomas Schwinge  <thomas@codesourcery.com>
2006         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
2007         call __gmon_start__.
2008         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
2010 2009-12-17  Ulrich Drepper  <drepper@redhat.com>
2012         * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
2013         using memset.
2015 2009-12-01  Dinakar Guniguntala  <dino@in.ibm.com>
2017         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
2018         FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
2019         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
2020         is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
2021         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
2022         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
2023         is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
2024         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2026 2009-12-12  Ulrich Drepper  <drepper@redhat.com>
2028         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
2029         Don't update nwaiters after invalid timeout is recognized.
2031 2009-11-27  Thomas Schwinge  <thomas@codesourcery.com>
2033         * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
2034         __gmon_start__.
2036 2009-11-27  Andreas Schwab  <schwab@redhat.com>
2038         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
2039         THREAD_SELF->cancelhandling after returning from futex call.
2041 2009-11-24  Ulrich Drepper  <drepper@redhat.com>
2043         * tst-sem13.c: New file.
2044         * Makefile (tests): Add tst-sem13.
2046 2009-11-22  Roland McGrath  <roland@redhat.com>
2048         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
2049         instead of recapitulating its contents.
2051 2009-11-18  Ulrich Drepper  <drepper@redhat.com>
2053         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
2054         optimizations and cleanups.
2056 2009-11-18  Dinakar Guniguntala  <dino@in.ibm.com>
2058         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
2059         Remove redundant code. Fix cfi offsets.
2060         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
2061         Fix cfi offsets.
2063 2009-11-17  Ulrich Drepper  <drepper@redhat.com>
2065         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
2066         reduce size of unwind info.
2068         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
2069         cfi directives.
2070         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2071         Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
2073 2009-11-03  Andreas Schwab  <schwab@linux-m68k.org>
2075         [BZ #4457]
2076         * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
2077         LIBGCC_S_SO.
2078         * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
2080 2009-10-30  Ulrich Drepper  <drepper@redhat.com>
2082         * tst-sem11.c (main): Rewrite to avoid aliasing problems.
2084         [BZ #3270]
2085         * allocatestack.c (__nptl_setxid): Perform the operation in multiple
2086         steps to avoid races with creation and terminations.
2087         * nptl-init.c (sighandler_setxid): Adjust.
2088         Patch by Daniel Jacobowitz.
2090 2009-09-07  Andreas Schwab  <schwab@redhat.com>
2092         * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
2094 2009-09-02  Suzuki K P  <suzuki@in.ibm.com>
2095             Joseph Myers  <joseph@codesourcery.com>
2097         [BZ #7094]
2098         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
2099         Initialize the sigev_notify field for newly created timer to make sure
2100         the timer gets deleted from the active timer's list upon timer_delete.
2102 2009-08-27  Andrew Stubbs  <ams@codesourcery.com>
2104         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
2105         Correct a logic error.
2107 2009-08-25  Ulrich Drepper  <drepper@redhat.com>
2109         * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
2110         of the field in local variables.
2111         (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
2112         variable and don't unconditionally clear it.
2114 2009-08-24  Ulrich Drepper  <drepper@redhat.com>
2116         * pthread_create.c (start_thread): Hint to the kernel that memory for
2117         the stack can be reused.  We do not mark all the memory.  The part
2118         still in use and some reserve are kept.
2120 2009-08-23  Ulrich Drepper  <drepper@redhat.com>
2122         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
2124 2009-08-11  Ulrich Drepper  <drepper@redhat.com>
2126         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
2127         directives.
2129 2009-08-10  Ulrich Drepper  <drepper@redhat.com>
2131         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
2132         directives.
2133         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2135 2009-08-10  Andreas Schwab  <schwab@redhat.com>
2137         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2138         (__pthread_cond_signal): Don't clobber register used for syscall
2139         number.
2141 2009-08-08  Ulrich Drepper  <drepper@redhat.com>
2143         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2144         Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
2146         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2147         (__pthread_cond_wait): Optimize by avoiding use of callee-safe
2148         register.
2150 2009-08-07  Ulrich Drepper  <drepper@redhat.com>
2152         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
2153         enabled by the special *_asynccancel functions.
2154         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2155         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2157         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
2159 2009-08-04  Ulrich Drepper  <drepper@redhat.com>
2161         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
2162         * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
2163         * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
2164         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
2165         since we can assume the special __*_{en,dis}able_asynccancel
2166         functions.
2167         (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
2168         * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
2169         and PTHREAD_CANCELED.
2171 2009-07-31  Ulrich Drepper  <drepper@redhat.com>
2173         * descr.h: Better definition of *_BITMASK macros for cancellation.
2175 2009-07-29  Ulrich Drepper  <drepper@redhat.com>
2177         * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
2179         * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
2180         dynamic linker might have to save.
2181         Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
2182         RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL.  Pretty
2183         printing.
2185         * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
2187 2009-07-28  Ulrich Drepper  <drepper@redhat.com>
2189         * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
2190         New function.
2191         * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
2192         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
2193         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
2194         requeue_pi for robust mutexes.
2195         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
2196         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2197         Don't only skip __pthread_mutex_cond_lock.  Call instead
2198         __pthread_mutex_cond_lock_adjust.
2199         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2201         * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
2202         optimization of PI mutex handling.
2204 2009-07-27  Ulrich Drepper  <drepper@redhat.com>
2206         [BZ #10418]
2207         * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
2208         instead of of _acq variants of cmpxchg.
2210 2009-07-23  Ulrich Drepper  <drepper@redhat.com>
2212         * sysdeps/x86_64/configure.in: New file.
2214         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
2215         path when not using absolute timeout futex.
2217 2009-07-20  Ulrich Drepper  <drepper@redhat.com>
2219         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
2220         optimizations of last changes.
2221         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2223 2009-07-19  Ulrich Drepper  <drepper@redhat.com>
2225         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
2226         FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
2227         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
2228         is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
2229         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
2230         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
2231         is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
2232         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2234         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2235         (__pthread_cond_timedwait): Make more robust.
2237 2009-07-18  Ulrich Drepper  <drepper@redhat.com>
2239         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2240         (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
2241         directly use absolute timeout.
2243         * tst-sem5.c (do_test): Add test for premature timeout.
2244         * Makefile: Linu tst-sem5 with librt.
2246         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
2247         (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
2248         directly use absolute timeout.
2249         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
2250         (pthread_rwlock_timedrdlock): Likewise.
2252         * tst-cond11.c (run_test): Add test to check that the timeout is
2253         long enough.
2255         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2256         (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
2257         directly use absolute timeout.
2259         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2260         (__pthread_cond_wait): Convert to using exception handler instead of
2261         registered unwind buffer.
2262         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2263         (__pthread_cond_timedwait): Likewise.
2265 2009-07-17  Ulrich Drepper  <drepper@redhat.com>
2267         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2268         If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
2269         use absolute timeout.
2271         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
2272         handling of uncontested semaphore.
2274         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2275         (__condvar_cleanup): Rewrite to use cfi directives instead of
2276         hand-coded unwind tables.
2277         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
2278         Likewise.
2279         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
2280         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2281         Likewise.
2283 2009-06-12  Ulrich Drepper  <drepper@redhat.com>
2285         * Makefile (libpthread-routines): Add pthread_sigqueue.
2286         * Versions: Add pthread_sigqueue for GLIBC_2.11.
2287         * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
2288         * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
2290 2009-06-11  Ulrich Drepper  <drepper@redhat.com>
2292         [BZ #10262]
2293         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2294         (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
2295         cannot be assumed.
2296         Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
2298 2009-05-16  Ulrich Drepper  <drepper@redhat.com>
2300         * libc-cancellation.c: Move __libc_cleanup_routine to...
2301         * libc-cleanup.c: ...here.  New file.
2302         * Makefile (routines): Add libc-cleanup.
2304         * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
2305         test.
2306         * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
2307         * sysdeps/pthread/librt-cancellation.c: Likewise.
2309         [BZ #9924]
2310         * nptl-init.c: Renamed from init.c.
2311         * Makefile: Change all occurences of init.c to nptl-init.c.
2313 2009-05-15  Ulrich Drepper  <drepper@redhat.com>
2315         * cancellation.c (__pthread_disable_asynccancel): Correct the bits
2316         to test when deciding on the delay.
2317         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
2318         * pthread_cancel.c: Close race between deciding on sending a signal
2319         and setting the CANCELING_BIT bit.
2321         * cancellation.c (__pthread_disable_asynccancel): Don't return if
2322         thread is canceled.
2323         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
2325 2009-04-27  Ulrich Drepper  <drepper@redhat.com>
2327         * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
2328         is available.
2329         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
2330         * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
2331         * sysdeps/i386/tls.h: Likewise.
2332         (tcbhead_t): Add __private_tm member.
2334 2009-04-26  Ulrich Drepper  <drepper@redhat.com>
2336         * sem_open.c (sem_open): Rewrite initialization of initsem to
2337         avoid warnings.
2339         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2340         Avoid warning by using may_alias attribute on ptrhack.
2342 2009-04-22  Ulrich Drepper  <drepper@redhat.com>
2344         [BZ #10090]
2345         * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
2346         Check policy and priority for validity.
2347         Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
2349 2009-03-15  Ulrich Drepper  <drepper@redhat.com>
2351         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2352         (__pthread_cond_timedwait): Change to use cfi directives instead of
2353         hand-coded unwind sections.
2355 2009-03-10  Ulrich Drepper  <drepper@redhat.com>
2357         * init.c (nptl_freeres): Compile only for SHARED.
2359 2009-03-09  Jakub Jelinek  <jakub@redhat.com>
2361         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
2362         FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
2363         FUTEX_BITSET_MATCH_ANY.
2365 2009-02-27  Roland McGrath  <roland@redhat.com>
2367         * init.c (__nptl_initial_report_events): Mark __attribute_used__.
2368         * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
2370 2009-02-26  Ulrich Drepper  <drepper@redhat.com>
2372         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2373         _POSIX_THREAD_ROBUST_PRIO_INHERIT and
2374         _POSIX_THREAD_ROBUST_PRIO_PROTECT.  Reset value of macros from
2375         200112L to 200809L.
2377 2009-02-25  Ulrich Drepper  <drepper@redhat.com>
2379         * sysdeps/pthread/pthread.h: The robust mutex functions are in
2380         POSIX 2008.
2382 2009-02-24  Ulrich Drepper  <drepper@redhat.com>
2384         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
2385         Unify name of include protector macro.
2387 2009-02-14  SUGIOKA Toshinobu  <sugioka@itonet.co.jp>
2389         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
2390         LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
2392 2009-01-29  Ulrich Drepper  <drepper@redhat.com>
2394         * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
2395         pointer variables.
2397         * allocatestack.c (__free_stacks): Renamed from free_stacks.
2398         (__free_stack_cache): Removed.  Change callers to call __free_stacks.
2399         * init.c (nptl_freeres): New function.
2400         (pthread_functions): Initialize ptr_freeres to nptl_freeres.
2401         * pthreadP.h: Don't declare __free_stack_cache.  Declare __free_stacks.
2402         * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
2403         variable.
2404         (pthread_cancel_init): Depend in libgcc_s_handle for decision to
2405         load DSO.  Assign last.
2406         (__unwind_freeres): New function.
2408         * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
2409         for better debugging.  No need to use stack_list_add here.
2411 2009-01-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2413         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
2414         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
2415         instead of computing relative timeout.
2416         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
2417         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
2419 2009-01-25  Ulrich Drepper  <drepper@redhat.com>
2421         * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
2423 2009-01-08  Ulrich Drepper  <drepper@redhat.com>
2425         * sysdeps/pthread/list.h (list_add): Initialize new element first.
2426         (list_add_tail): Removed.
2428 2009-01-07  Ulrich Drepper  <drepper@redhat.com>
2430         * (in_flight_stack): New variable.
2431         (stack_list_del): New function.  Use instead of list_del.
2432         (stack_list_add): New function.  Use instead of list_add when adding to
2433         stack_cache and stack_used lists.
2434         (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
2435         when the fork call interrupted another thread.
2437 2009-01-04  Ulrich Drepper  <drepper@redhat.com>
2439         * init.c (__pthread_initialize_minimal_internal): Optimize test
2440         FUTEX_CLOCK_REALTIME a bit.
2442 2009-01-03  Ulrich Drepper  <drepper@redhat.com>
2444         * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
2445         only passing five parameters to FUTEX_WAIT_BITSET call.
2447         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2448         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
2449         instead of computing relative timeout.
2451 2009-01-02  Ulrich Drepper  <drepper@redhat.com>
2453         * init.c (__pthread_initialize_minimal_internal): Check for
2454         FUTEX_CLOCK_REALTIME flag.
2455         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
2456         Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
2457         relative timeout.
2459         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
2460         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
2461         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2462         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2463         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2464         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2466 2008-12-09  Ulrich Drepper  <drepper@redhat.com>
2468         * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
2469         loop body instead of ; to avoid gcc warnings.
2470         (pthread_cleanup_pop_restore_np): Likewise.
2471         Patch by Caolán McNamara <caolanm@redhat.com>.
2473 2008-12-09  Jakub Jelinek  <jakub@redhat.com>
2475         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
2476         fast path here, for robust/PI/PP mutexes call
2477         __pthread_mutex_lock_full.  Don't use switch, instead use a series
2478         of ifs according to their probability.
2479         (__pthread_mutex_lock_full): New function.
2480         * pthread_mutex_unlock.c: Include assert.h.
2481         (__pthread_mutex_unlock_usercnt): Handle only the
2482         fast path here, for robust/PI/PP mutexes call
2483         __pthread_mutex_unlock_full.  Don't use switch, instead use a series
2484         of ifs according to their probability.
2485         (__pthread_mutex_unlock_full): New function.
2486         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
2487         (__pthread_mutex_lock_full): Define.
2489 2008-12-08  Ulrich Drepper  <drepper@redhat.com>
2491         * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
2492         implementation.  Add necessary padding and.
2493         * descr.h (struct pthread): Increase padding for tcbhead_t to 24
2494         words.
2496 2008-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2498         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
2499         and FUTEX_WAKE_BITSET.
2501 2008-12-02  Ulrich Drepper  <drepper@redhat.com>
2503         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
2504         and FUTEX_WAKE_BITSET.
2505         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2506         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2507         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2508         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2510 2008-11-25  Roland McGrath  <roland@redhat.com>
2512         * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
2513         Subdirectories moved to ports repository as
2514         sysdeps/.../nptl subdirectories.
2516 2008-11-12  Jakub Jelinek  <jakub@redhat.com>
2518         [BZ #7008]
2519         * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
2520         of old value.
2521         * pthread_cond_init.c (__pthread_cond_init): Fix
2522         cond->__data.__nwaiters initialization.
2523         * Makefile (tests): Add tst-cond23.
2524         * tst-cond23.c: New test.
2526 2008-11-07  Jakub Jelinek  <jakub@redhat.com>
2528         * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
2529         arguments.
2530         (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
2531         arguments.
2533 2008-11-01  Ulrich Drepper  <drepper@redhat.com>
2535         [BZ #6955]
2536         * pthread_mutex_lock.c: Add support for private PI mutexes.
2537         * pthread_mutex_timedlock.c: Likewise.
2538         * pthread_mutex_trylock.c: Likewise.
2539         * pthread_mutex_unlock.c: Likewise.
2540         Patch mostly by Ben Jackson <ben@ben.com>.
2542 2008-10-31  Ulrich Drepper  <drepper@redhat.com>
2544         [BZ #6843]
2545         * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
2546         Increase stack size for helper thread.
2548 2008-10-06  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2550         * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
2551         assembly with a clobber list for access registers a0 and a1.
2553 2008-09-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2555         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
2556         to force runp->refcntr to be read from memory.
2558 2008-09-08  Richard Guenther  <rguenther@suse.de>
2560         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
2561         lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2562         lll_timedlock, lll_robust_timedlock, lll_unlock,
2563         lll_robust_unlock): Promote private to int.
2565 2008-08-15  Ulrich Drepper  <drepper@redhat.com>
2567         * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
2568         ARCH_RETRY_MMAP definitions.
2569         * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
2570         Define MAP_STACK when not defined.
2571         (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS.  Remove
2572         handling of ARCH_RETRY_MMAP.
2574 2008-07-30  Ulrich Drepper  <drepper@redhat.com>
2576         * tst-align2.c (f): Print message that f is reached.
2578 2008-04-28  Hiroki Kaminaga  <kaminaga@sm.sony.co.jp>
2580         [BZ #6740]
2581         * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
2582         definition with #ifndef __ASSUME_PRIVATE_FUTEX.
2584 2008-07-25  Ulrich Drepper  <drepper@redhat.com>
2586         * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
2587         SOCK_CLOEXEC if possible.
2589 2008-05-29  Ulrich Drepper  <drepper@redhat.com>
2591         * Makefile (tests): Add tst-rwlock2a.
2592         * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
2593         * tst-rwlock2a.c: New file.
2595 2008-06-12  Ulrich Drepper  <drepper@redhat.com>
2597         * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
2599 2008-05-17  Samuel Thibault  <samuel.thibault@ens-lyon.org>
2601         * sysdeps/pthread/pthread.h: Fix typo in comment.
2603 2008-05-28  Ulrich Drepper  <drepper@redhat.com>
2605         * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
2606         of CPU set to the kernel.
2608 2008-05-23  Paul Pluzhnikov  <ppluzhnikov@google.com>
2610         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
2611         cfi directives.
2612         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
2613         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
2614         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2615         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2616         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2617         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2619 2008-05-22  Paul Pluzhnikov  <ppluzhnikov@google.com>
2621         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
2622         cfi directives.
2623         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2624         Likewise.
2625         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2626         Likewise.
2627         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2628         Likewise.
2630 2008-05-26  Ulrich Drepper  <drepper@redhat.com>
2632         * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
2634 2008-05-20  Jakub Jelinek  <jakub@redhat.com>
2636         David S. Miller  <davem@davemloft.net>
2638         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
2640 2008-05-10  Ulrich Drepper  <drepper@redhat.com>
2642         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
2643         __pshared correctly.
2644         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2645         Likewise.
2646         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2647         Likewise.
2648         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
2649         Likewise.
2650         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
2651         Likewise.
2652         Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
2654 2008-04-14  David S. Miller  <davem@davemloft.net>
2656         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2657         (__old_sem_wait): Fix argument to lll_futex_wait().
2659 2007-11-26  Daniel Jacobowitz  <dan@codesourcery.com>
2661         * pthread_create.c: Require pthread_mutex_trylock and
2662         pthread_key_delete for libgcc.
2664 2008-04-08  Jakub Jelinek  <jakub@redhat.com>
2666         [BZ #6020]
2667         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
2668         (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
2669         Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
2671 2008-03-27  Ulrich Drepper  <drepper@redhat.com>
2673         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
2674         <linux/limits.h> has defined it.
2675         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2676         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2677         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2678         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2680 2008-03-18  Jakub Jelinek  <jakub@redhat.com>
2682         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
2683         of ASSEMBLER.
2684         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2685         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
2687 2008-03-14  Ulrich Drepper  <drepper@redhat.com>
2689         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
2690         HAVE_DL_DISCOVER_OSVERSION.
2691         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2692         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
2694 2008-03-07  Ulrich Drepper  <drepper@redhat.com>
2696         [BZ #5778]
2697         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
2698         _POSIX_CHOWN_RESTRICTED value to zero.
2700 2008-01-31  Roland McGrath  <roland@redhat.com>
2702         * Makefile (omit-deps): Variable removed.
2704 2008-01-30  Ulrich Drepper  <drepper@redhat.com>
2706         * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
2707         unnecessary addr32 prefix.
2709 2008-01-29  Roland McGrath  <roland@redhat.com>
2711         * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
2713 2008-01-22  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2715         * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
2717 2008-01-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2719         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
2720         a scratch register.
2721         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
2722         (__lll_lock_wait_private): Fix typo.
2723         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
2724         (pthread_barrier_wait): Likewise.  Adjust XADD use.
2725         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
2726         Adjust XADD use.
2727         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
2728         (pthread_rwlock_timedrdlock): Return correct return value.
2729         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
2730         (pthread_rwlock_timedwrlock): Likewise.
2732 2008-01-15  Ulrich Drepper  <drepper@redhat.com>
2734         * tst-eintr2.c (do_test): make sure that if mutex_lock in main
2735         thread returns the program exits with an error code.
2737 2008-01-10  Ulrich Drepper  <drepper@redhat.com>
2739         * pthread-errnos.sym: Add EOVERFLOW.
2740         * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
2741         * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
2742         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2743         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2745 2007-12-14  Ulrich Drepper  <drepper@redhat.com>
2747         * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
2748         parameter.  Passed it as permission to mmap.
2749         * allocatestack.c (allocate_stack): Pass prot as second parameter
2750         to ARCH_RETRY_MMAP.
2752 2007-12-12  Ulrich Drepper  <drepper@redhat.com>
2754         * tst-basic7.c: Allocate memory for the stack.
2756         [BZ #5465]
2757         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
2758         (__pthread_cond_timedwait): Don't use VDSO.
2759         Patch by Michal Januszewski.
2761 2007-12-07  Ulrich Drepper  <drepper@redhat.com>
2763         [BZ #5455]
2764         * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
2765         Allow label before pthread_cleanup_pop.
2766         (pthread_cleanup_pop_restore_np): Likewise.
2768 2007-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2770         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
2771         Store 2 before returning ETIMEDOUT.
2773 2007-11-23  Ulrich Drepper  <drepper@redhat.com>
2775         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
2776         Store 2 before returning ETIMEDOUT.
2777         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
2778         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
2779         (__lll_lock_wait_private): Optimize.
2780         (__lll_lock_wait): Likewise.
2782 2007-11-20  Jakub Jelinek  <jakub@redhat.com>
2784         * sysdeps/pthread/pthread.h (pthread_cleanup_push,
2785         pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
2786         g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
2788 2007-11-08  Ulrich Drepper  <drepper@redhat.com>
2790         [BZ #5240]
2791         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
2792         If we time out, try one last time to lock the futex to avoid
2793         losing a wakeup signal.
2794         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2795         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2797         [BZ #5245]
2798         * sysdeps/pthread/createthread.c (do_clone): Translate clone error
2799         if necessary.
2801 2007-11-07  Ulrich Drepper  <drepper@redhat.com>
2803         [BZ #5245]
2804         * allocatestack.c (allocate_stack): Change ENOMEM error in case
2805         mmap failed to EAGAIN.
2806         * Makefile (tests): Add tst-basic7.
2807         * tst-basic7.c: New file.
2809 2007-11-05  Ulrich Drepper  <drepper@redhat.com>
2811         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
2812         Use __linkin_atfork.
2814 2007-11-03  Mike Frysinger  <vapier@gentoo.org>
2816         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
2817         missing line continuations.
2818         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
2819         LOAD_FUTEX_WAKE): Likewise.  Also add missing 3rd parameter.
2821 2007-10-28  Ulrich Drepper  <drepper@redhat.com>
2823         [BZ #5220]
2824         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
2825         __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
2826         (struct timer): Add next element.
2827         * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
2828         enqueue timer structure into __active_timer_sigev_thread list.
2829         * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
2830         remove timer struct from __active_timer_sigev_thread.
2831         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2832         Before using timer structure make sure it is still on the
2833         __active_timer_sigev_thread list.  Keep lock until done.
2834         Define __active_timer_sigev_thread and
2835         __active_timer_sigev_thread_lock.
2837 2007-10-27  Ulrich Drepper  <drepper@redhat.com>
2839         * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
2840         Redefine thread_atfork for use of ATFORK_MEM.
2841         * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
2842         * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
2843         function.
2844         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2845         Use atomic operation when removing first element of list.
2847 2007-10-17  Jakub Jelinek  <jakub@redhat.com>
2849         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
2850         routine instead of an alias to __new_sem_post.
2852 2007-10-15  Jakub Jelinek  <jakub@redhat.com>
2854         * init.c (__pthread_initialize_minimal): Initialize word to appease
2855         valgrind.
2857 2007-10-10  Jakub Jelinek  <jakub@redhat.com>
2859         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
2860         libc.so just clear NAME.
2861         (__libc_rwlock_fini): Nop inside of libc.so.
2862         * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
2863         all zeros.
2865 2007-09-02  Ulrich Drepper  <drepper@redhat.com>
2867         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2868         (__pthread_cond_wait): Fix unlocking of internal lock after mutex
2869         unlocking failed.
2870         Patch by Luca Barbieri <luca.barbieri@gmail.com>.
2872 2007-08-21  Ulrich Drepper  <drepper@redhat.com>
2874         [BZ #4938]
2875         * allocatestack.c (__reclaim_stacks): Clear the TSD in the
2876         reclaimed stack if necessary.
2877         * Makefile (tests): Add tst-tsd6.
2878         * tst-tsd6.c: New file.
2880 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
2882         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
2883         Add private argument.
2885 2007-08-20  Ulrich Drepper  <drepper@redhat.com>
2887         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2888         (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
2890 2007-08-16  Jakub Jelinek  <jakub@redhat.com>
2892         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
2893         (__lll_robust_timedlock): Pass private as last argument to
2894         __lll_robust_timedlock_wait.
2895         (__lll_unlock): Fix a pasto.
2897 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
2899         * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
2900         sparc_old_sem): New structs.
2901         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2902         (__sem_wait_cleanup): New function.
2903         (__new_sem_wait): Use sparc_new_sem structure.  Bump and afterwards
2904         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
2905         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2906         lll_futex_wait.
2907         (__old_sem_wait): New function.
2908         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
2909         nptl/sysdeps/unix/sysv/linux/sparc version.
2910         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
2911         Likewise.
2912         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
2913         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
2914         (__new_sem_trywait): Use sparc_old_sem structure.
2915         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
2916         (sem_timedwait): Use sparc_new_sem structure.  Bump and afterwards
2917         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
2918         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2919         lll_futex_timed_wait.
2920         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
2921         Use sparc_new_sem structure.  Only wake if nwaiters > 0.  Pass
2922         isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
2923         lll_futex_wake.
2924         (__old_sem_post): New function.
2925         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
2926         * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
2927         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
2928         * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
2929         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
2930         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
2932 2007-08-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2934         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
2935         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2936         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2937         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2938         * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
2939         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2940         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2941         Use FUTEX_WAKE_OP.
2942         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
2943         kernel-features.h and tcb-offsets.h.
2944         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2945         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2946         process private.
2947         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
2948         tcb-offsets.h.
2949         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
2950         to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2951         process private.
2952         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
2953         __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2954         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
2955         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
2956         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
2957         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
2958         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
2960 2007-08-14  Jakub Jelinek  <jakub@redhat.com>
2962         * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
2963         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
2964         (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
2965         lll_futex_timed_wait.
2967         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
2968         __lll_robust_unlock): Rewrite as macros instead of inline functions.
2969         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
2970         __lll_robust_unlock, __lll_wait_tid): Likewise.
2972 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
2974         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
2975         Fix a pasto.
2976         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
2977         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
2978         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2979         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
2980         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
2981         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
2982         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
2983         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
2984         kernel-features.h.
2985         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
2986         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2987         process private.  Switch DW_CFA_advance_loc1 and some
2988         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2989         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
2990         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
2991         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
2992         process private.  Switch DW_CFA_advance_loc{1,2} and some
2993         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
2994         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
2995         #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
2996         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2997         Likewise.
2998         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2999         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3000         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3001         Likewise.
3002         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
3003         (__pthread_cond_broadcast): Compare %r8 instead of
3004         dep_mutex-cond_*(%rdi) with $-1.
3005         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3006         (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
3007         of oring.
3009 2007-08-13  Ulrich Drepper  <drepper@redhat.com>
3011         * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
3013 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
3015         * allocatestack.c: Include kernel-features.h.
3016         * pthread_create.c: Likewise.
3017         * pthread_mutex_init.c: Likewise.
3018         * init.c: Likewise.
3019         * pthread_cond_timedwait.c: Likewise.
3020         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3021         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3022         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3023         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3024         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3025         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3026         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3027         Likewise.
3028         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3029         Likewise.
3030         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3031         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3032         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3033         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3035 2007-08-12  Jakub Jelinek  <jakub@redhat.com>
3037         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
3038         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
3039         byte elements.  One of them is the new __shared element.
3040         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
3041         adjust names of other padding elements.
3042         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
3043         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
3044         byte elements.  One of them is the new __shared element.
3045         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
3046         adjust names of other padding elements.
3047         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
3048         Renamed __pad1 element to __shared, adjust names of other padding
3049         elements.
3050         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3051         (pthread_rwlock_t): Likewise.
3052         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
3053         typo.
3055 2007-08-09  Anton Blanchard  <anton@samba.org>
3057         * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
3059 2007-08-12  Ulrich Drepper  <drepper@redhat.com>
3061         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
3062         <kernel-features.h>.
3063         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3065 2007-08-11  Ulrich Drepper  <drepper@redhat.com>
3067         * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
3068         * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
3069         dealing with robust mutexes.
3070         * pthread_mutex_timedlock.c: Likewise.
3071         * pthread_mutex_trylock.c: Likewise.
3072         * pthread_mutex_unlock.c: Likewise.
3073         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
3075 2007-08-06  Jakub Jelinek  <jakub@redhat.com>
3077         * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
3078         (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
3079         (PTHREAD_MUTEX_PSHARED): Define.
3080         * pthread_mutex_init.c (__pthread_mutex_init): Set
3081         PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
3082         mutexes.
3083         * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
3084         instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
3085         as second argument to lll_lock.
3086         (LLL_MUTEX_TRYLOCK): Take mutex as argument
3087         instead of its __data.__lock field.
3088         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
3089         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
3090         to lll_robust_lock.
3091         (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
3092         LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
3093         instead of mutex->__data.__kind directly, pass
3094         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
3095         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
3096         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
3097         directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
3098         (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
3099         to lll_timedlock, lll_robust_timedlock, lll_unlock and
3100         lll_futex_timed_wait.  Use PTHREAD_MUTEX_TYPE (mutex) instead
3101         of mutex->__data.__kind directly.
3102         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
3103         PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
3104         lll_robust_timedlock, lll_unlock and lll_futex_timed_wait.  Use
3105         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
3106         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
3107         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
3108         and lll_futex_wake.
3109         * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
3110         PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
3111         Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
3112         directly.
3113         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
3114         Take mutex as argument instead of its __data.__lock field, pass
3115         PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
3116         (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
3117         __data.__lock field.
3118         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
3119         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
3120         to lll_robust_cond_lock.
3121         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
3122         variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
3123         lll_futex_wake.  Don't use lll_futex_requeue if dependent mutex
3124         has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
3125         * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
3126         variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
3127         lll_futex_wait.
3128         * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
3129         variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
3130         lll_futex_wake.
3131         * pthread_cond_timedwait.c (__pthread_cond_wait): Add
3132         pshared variable, pass it to lll_lock, lll_unlock,
3133         lll_futex_timedwait and lll_futex_wake.
3134         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
3135         pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
3136         and lll_futex_wake.
3137         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
3138         lll_futex_wake_unlock): Add private argument, use __lll_private_flag
3139         macro.
3140         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
3141         lll_futex_wake_unlock): Likewise.
3142         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
3143         Likewise.
3144         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
3145         lll_futex_wake_unlock): Likewise.
3146         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
3147         Likewise.
3148         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
3149         lll_futex_wake_unlock): Likewise.
3150         (lll_futex_wake): Fix a typo.
3151         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
3152         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
3153         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
3154         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
3155         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
3156         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3157         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
3158         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
3159         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
3160         (__pthread_cond_timedwait): Likewise.
3161         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
3162         (__condvar_cleanup, __pthread_cond_wait): Likewise.
3164 2007-08-05  Jakub Jelinek  <jakub@redhat.com>
3166         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3167         Don't use CGOTSETUP and CGOTRESTORE macros.
3168         (CGOTSETUP, CGOTRESTORE): Remove.
3169         <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
3170         @local symbol.
3172 2007-08-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3174         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
3175         definitions for private futexes.
3176         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
3177         kernel-features.h and lowlevellock.h.  Use private futexes if
3178         they are available.
3179         (__lll_lock_wait_private, __lll_unlock_wake_private): New.
3180         (__lll_mutex_lock_wait): Rename to
3181         (__lll_lock_wait): ... this.  Don't compile in for libc.so.
3182         (__lll_mutex_timedlock_wait): Rename to ...
3183         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.
3184         Don't compile in for libc.so.
3185         (__lll_mutex_unlock_wake): Rename to ...
3186         (__lll_unlock_wake): ... this.  Don't compile in for libc.so.
3187         (__lll_timedwait_tid): Use __NR_gettimeofday.
3188         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
3189         the header from assembler.  Renamed all lll_mutex_* resp.
3190         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
3191         Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
3192         (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
3193         Define.
3194         (__lll_lock_wait_private): Add prototype.
3195         (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
3196         __lll_robust_timedlock_wait, __lll_unlock_wake_private,
3197         __lll_unlock_wake): Likewise.
3198         (lll_lock): Add private argument.  Call __lll_lock_wait_private
3199         if private is constant LLL_PRIVATE.
3200         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
3201         lll_timedlock, lll_robust_timedlock): Add private argument.
3202         (lll_unlock): Add private argument.  Call __lll_unlock_wake_private
3203         if private is constant LLL_PRIVATE.
3204         (lll_robust_unlock, lll_robust_dead): Add private argument.
3205         (lll_lock_t): Remove.
3206         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
3207         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
3208         lll_cond_wake, lll_cond_broadcast): Remove.
3209         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
3210         kernel-features.h and lowlevellock.h.
3211         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
3212         (LOAD_FUTEX_WAIT): Define.
3213         (__lll_robust_mutex_lock_wait): Rename to ...
3214         (__lll_robust_lock_wait): ... this.  Add private argument.
3215         Use LOAD_FUTEX_WAIT macro.
3216         (__lll_robust_mutex_timedlock_wait): Rename to ...
3217         (__lll_robust_timedlock_wait): ... this.    Add private argument.
3218         Use __NR_gettimeofday.  Use LOAD_FUTEX_WAIT macro.
3219         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
3220         lowlevellock.h.
3221         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
3222         (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
3223         __lll_mutex_{lock,unlock}_*.
3224         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
3225         lowlevellock.h and pthread-errnos.h.
3226         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3227         FUTEX_CMP_REQUEUE, EINVAL): Remove.
3228         (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
3229         __lll_mutex_{lock,unlock}_*.
3230         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
3231         lowlevellock.h and pthread-errnos.h.
3232         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
3233         (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
3234         __lll_mutex_{lock,unlock}_*.
3235         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
3236         lowlevellock.h.
3237         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
3238         (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
3239         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
3240         (__condvar_tw_cleanup): Likewise.
3241         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
3242         lowlevellock.h.
3243         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
3244         (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
3245         __lll_mutex_{lock,unlock}_*.
3246         ( __condvar_w_cleanup): Likewise.
3247         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
3248         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3249         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
3250         lowlevellock.h.
3251         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3252         (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
3253         __lll_mutex_{lock,unlock}_*.
3254         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
3255         lowlevellock.h.
3256         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
3257         FUTEX_PRIVATE_FLAG): Remove.
3258         (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
3259         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
3260         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
3261         lowlevellock.h.
3262         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
3263         FUTEX_PRIVATE_FLAG): Remove.
3264         (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
3265         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
3266         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
3267         lowlevellock.h.
3268         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3269         (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
3270         __lll_mutex_{lock,unlock}_*.
3271         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
3272         lowlevellock.h.
3273         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3274         (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
3275         __lll_mutex_{lock,unlock}_*.
3276         * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
3277         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3278         (__new_sem_post): Use standard initial exec code sequences.
3279         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
3280         lowlevellock.h.
3281         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
3282         FUTEX_PRIVATE_FLAG): Remove.
3283         (sem_timedwait): Use __NR_gettimeofday.  Use standard initial
3284         exec code sequences.
3285         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
3286         (__new_sem_trywait): Use standard initial exec code sequences.
3287         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
3288         (__new_sem_wait): Use standard initial exec code sequences.
3290 2007-07-31  Anton Blanchard  <anton@samba.org>
3292         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3293         Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
3294         atomic_full_barrier.
3296 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
3298         * allocatestack.c (stack_cache_lock): Change type to int.
3299         (get_cached_stack, allocate_stack, __deallocate_stack,
3300         __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
3301         __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
3302         as second argument to lll_lock and lll_unlock macros on
3303         stack_cache_lock.
3304         * pthread_create.c (__find_in_stack_list): Likewise.
3305         (start_thread): Similarly with pd->lock.  Use lll_robust_dead
3306         macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
3307         as second argument.
3308         * descr.h (struct pthread): Change lock and setxid_futex field
3309         type to int.
3310         * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
3311         LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
3312         * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
3313         * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
3314         Likewise.
3315         * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
3316         * pthread_cond_init.c (__pthread_cond_init): Likewise.
3317         * pthreadP.h (__attr_list_lock): Change type to int.
3318         * pthread_attr_init.c (__attr_list_lock): Likewise.
3319         * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
3320         ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
3321         lll_{,un}lock.
3322         * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
3323         also for lll_futex_{wake,wait}.
3324         * pthread_barrier_init.c (pthread_barrier_init): Make iattr
3325         a pointer to const.
3326         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
3327         LLL_SHARED as second argument to lll_{,un}lock.
3328         * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
3329         * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
3330         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
3331         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
3332         Likewise.
3333         * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
3334         as second argument to lll_{,un}lock macros on pd->lock.
3335         * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
3336         * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
3337         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
3338         * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
3339         Likewise.
3340         * sysdeps/pthread/createthread.c (do_clone, create_thread):
3341         Likewise.
3342         * pthread_once.c (once_lock): Change type to int.
3343         (__pthread_once): Pass LLL_PRIVATE as second argument to
3344         lll_{,un}lock macros on once_lock.
3345         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
3346         lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
3347         rwlock->__data.__shared as second argument to them and similarly
3348         for lll_futex_w*.
3349         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
3350         Likewise.
3351         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
3352         Likewise.
3353         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
3354         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
3355         * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
3356         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
3357         * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
3358         to lll_{,un}lock macros on __sem_mappings_lock.
3359         * sem_open.c (check_add_mapping): Likewise.
3360         (__sem_mappings_lock): Change type to int.
3361         * semaphoreP.h (__sem_mappings_lock): Likewise.
3362         * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
3363         LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
3364         instead of lll_*mutex_*, pass LLL_SHARED as last
3365         argument.
3366         (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
3367         pass LLL_SHARED as last argument.
3368         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
3369         LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
3370         lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
3371         pass LLL_SHARED as last argument.
3372         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
3373         lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
3374         LLL_SHARED as last argument.
3375         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
3376         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
3377         Similarly.
3378         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
3379         __libc_lock_lock_recursive, __libc_lock_unlock,
3380         __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
3381         argument to lll_{,un}lock.
3382         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
3383         _IO_lock_unlock): Likewise.
3384         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
3385         compound literal.
3386         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
3387         Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
3388         __fork_lock.
3389         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
3390         free_mem): Likewise.
3391         (__fork_lock): Change type to int.
3392         * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
3393         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
3394         isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
3395         lll_futex_wake.
3396         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
3397         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
3398         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
3399         New function.
3400         (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
3401         pass it through to lll_futex_*wait, only compile in when
3402         IS_IN_libpthread.
3403         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3404         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
3405         argument and pass it through to lll_futex_*wait.
3406         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
3407         lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
3408         lll_robust_*.  Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
3409         inline functions to __lll_* resp. __lll_robust_*.
3410         (LLL_MUTEX_LOCK_INITIALIZER): Remove.
3411         (lll_mutex_dead): Add private argument.
3412         (__lll_lock_wait_private): New prototype.
3413         (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
3414         __lll_robust_lock_timedwait): Add private argument to prototypes.
3415         (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
3416         call __lll_lock_wait_private, otherwise pass private to
3417         __lll_lock_wait.
3418         (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
3419         __lll_robust_timedlock): Add private argument, pass it to
3420         __lll_*wait functions.
3421         (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
3422         call __lll_unlock_wake_private, otherwise pass private to
3423         __lll_unlock_wake.
3424         (__lll_robust_unlock): Add private argument, pass it to
3425         __lll_robust_unlock_wake.
3426         (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
3427         lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
3428         argument, pass it through to __lll_* inline function.
3429         (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
3430         (lll_lock_t): Remove.
3431         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
3432         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
3433         lll_cond_wake, lll_cond_broadcast): Remove.
3434         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3435         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3436         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3437         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3438         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
3439         the header from assembler.  Renamed all lll_mutex_* resp.
3440         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
3441         (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
3442         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3443         (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
3444         LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
3445         (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
3446         __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
3447         Remove prototype.
3448         (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
3449         (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
3450         rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
3451         (lll_trylock): Likewise, use __lll_trylock_asm, pass
3452         MULTIPLE_THREADS_OFFSET as another asm operand.
3453         (lll_lock): Add private argument, use __lll_lock_asm_start, pass
3454         MULTIPLE_THREADS_OFFSET as last asm operand, call
3455         __lll_lock_wait_private if private is constant LLL_PRIVATE,
3456         otherwise pass private as another argument to __lll_lock_wait.
3457         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
3458         lll_timedlock, lll_robust_timedlock): Add private argument, pass
3459         private as another argument to __lll_*lock_wait call.
3460         (lll_unlock): Add private argument, use __lll_unlock_asm, pass
3461         MULTIPLE_THREADS_OFFSET as another asm operand, call
3462         __lll_unlock_wake_private if private is constant LLL_PRIVATE,
3463         otherwise pass private as another argument to __lll_unlock_wake.
3464         (lll_robust_unlock): Add private argument, pass private as another
3465         argument to __lll_unlock_wake.
3466         (lll_robust_dead): Add private argument, use __lll_private_flag
3467         macro.
3468         (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
3469         LLL_MUTEX_LOCK_INITIALIZER.
3470         (lll_lock_t): Remove.
3471         (LLL_LOCK_INITIALIZER_WAITERS): Define.
3472         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
3473         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
3474         lll_cond_wake, lll_cond_broadcast): Remove.
3475         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3476         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
3477         2007-05-2{3,9} changes.
3478         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
3479         kernel-features.h and lowlevellock.h.
3480         (LOAD_PRIVATE_FUTEX_WAIT): Define.
3481         (LOAD_FUTEX_WAIT): Rewritten.
3482         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
3483         define.
3484         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
3485         (__lll_mutex_lock_wait): Rename to ...
3486         (__lll_lock_wait): ... this.  Take futex addr from %edx instead of
3487         %ecx, %ecx is now private argument.  Don't compile in for libc.so.
3488         (__lll_mutex_timedlock_wait): Rename to ...
3489         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.  %esi
3490         contains private argument.  Don't compile in for libc.so.
3491         (__lll_mutex_unlock_wake): Rename to ...
3492         (__lll_unlock_wake): ... this.  %ecx contains private argument.
3493         Don't compile in for libc.so.
3494         (__lll_timedwait_tid): Use __NR_gettimeofday.
3495         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
3496         kernel-features.h and lowlevellock.h.
3497         (LOAD_FUTEX_WAIT): Define.
3498         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
3499         define.
3500         (__lll_robust_mutex_lock_wait): Rename to ...
3501         (__lll_robust_lock_wait): ... this.  Futex addr is now in %edx
3502         argument, %ecx argument contains private.  Use LOAD_FUTEX_WAIT
3503         macro.
3504         (__lll_robust_mutex_timedlock_wait): Rename to ...
3505         (__lll_robust_timedlock_wait): ... this.  Use __NR_gettimeofday.
3506         %esi argument contains private, use LOAD_FUTEX_WAIT macro.
3507         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
3508         lowlevellock.h.
3509         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3510         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
3511         PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
3512         __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
3513         to __lll_lock_wait in %edx.
3514         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
3515         Include lowlevellock.h and pthread-errnos.h.
3516         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3517         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
3518         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
3519         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3520         pass LLL_SHARED in %ecx to both __lll_lock_wait and
3521         __lll_unlock_wake.
3522         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
3523         Include lowlevellock.h and pthread-errnos.h.
3524         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
3525         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
3526         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
3527         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3528         pass LLL_SHARED in %ecx to both __lll_lock_wait and
3529         __lll_unlock_wake.
3530         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
3531         Include lowlevellock.h.
3532         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3533         Don't define.
3534         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
3535         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3536         pass LLL_SHARED in %ecx to both __lll_lock_wait and
3537         __lll_unlock_wake.  Use __NR_gettimeofday.
3538         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
3539         Include lowlevellock.h.
3540         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3541         (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
3542         to __lll_*, pass cond_lock address in %edx rather than %ecx to
3543         __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
3544         and __lll_unlock_wake.
3545         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
3546         Include lowlevellock.h.
3547         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3548         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
3549         MUTEX(%ebx) address in %edx rather than %ecx to
3550         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
3551         and __lll_unlock_wake.  Move return value from %ecx to %edx
3552         register.
3553         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3554         Include lowlevellock.h.
3555         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3556         Don't define.
3557         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3558         MUTEX(%ebp) address in %edx rather than %ecx to
3559         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
3560         and __lll_unlock_wake.  Move return value from %ecx to %edx
3561         register.  Use __NR_gettimeofday.
3562         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3563         Include lowlevellock.h.
3564         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3565         Don't define.
3566         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3567         MUTEX(%ebp) address in %edx rather than %ecx to
3568         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
3569         and __lll_unlock_wake.  Move return value from %ecx to %edx
3570         register.  Use __NR_gettimeofday.
3571         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
3572         Include lowlevellock.h.
3573         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3574         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
3575         MUTEX(%edi) address in %edx rather than %ecx to
3576         __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
3577         and __lll_unlock_wake.
3578         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
3579         Include lowlevellock.h.
3580         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3581         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3582         MUTEX(%ebx) address in %edx rather than %ecx to
3583         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
3584         and __lll_unlock_wake.  Move return value from %ecx to %edx
3585         register.
3586         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
3587         lowlevellock.h.
3588         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
3589         define.
3590         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
3591         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
3592         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
3593         lowlevellock.h.
3594         (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
3595         (sem_timedwait): Use __NR_gettimeofday.
3596         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
3597         lowlevellock.h.
3598         (LOCK): Don't define.
3599         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
3600         lowlevellock.h.
3601         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3602         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
3603         are waiters.
3604         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
3605         2007-05-2{3,9} changes.
3606         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
3607         kernel-features.h and lowlevellock.h.
3608         (LOAD_PRIVATE_FUTEX_WAIT): Define.
3609         (LOAD_FUTEX_WAIT): Rewritten.
3610         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
3611         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
3612         (__lll_mutex_lock_wait): Rename to ...
3613         (__lll_lock_wait): ... this.  %esi is now private argument.
3614         Don't compile in for libc.so.
3615         (__lll_mutex_timedlock_wait): Rename to ...
3616         (__lll_timedlock_wait): ... this.  %esi contains private argument.
3617         Don't compile in for libc.so.
3618         (__lll_mutex_unlock_wake): Rename to ...
3619         (__lll_unlock_wake): ... this.  %esi contains private argument.
3620         Don't compile in for libc.so.
3621         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
3622         kernel-features.h and lowlevellock.h.
3623         (LOAD_FUTEX_WAIT): Define.
3624         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
3625         (__lll_robust_mutex_lock_wait): Rename to ...
3626         (__lll_robust_lock_wait): ... this.  %esi argument contains private.
3627         Use LOAD_FUTEX_WAIT macro.
3628         (__lll_robust_mutex_timedlock_wait): Rename to ...
3629         (__lll_robust_timedlock_wait): ... this. %esi argument contains
3630         private, use LOAD_FUTEX_WAIT macro.
3631         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
3632         lowlevellock.h.
3633         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3634         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
3635         PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
3636         __lll_lock_wait and __lll_unlock_wake.
3637         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
3638         Include lowlevellock.h and pthread-errnos.h.
3639         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3640         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
3641         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
3642         pass LLL_SHARED in %esi to both __lll_lock_wait and
3643         __lll_unlock_wake.
3644         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
3645         Include lowlevellock.h and pthread-errnos.h.
3646         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
3647         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
3648         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
3649         pass LLL_SHARED in %esi to both __lll_lock_wait and
3650         __lll_unlock_wake.
3651         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
3652         Include lowlevellock.h.
3653         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3654         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
3655         pass LLL_SHARED in %esi to both __lll_lock_wait and
3656         __lll_unlock_wake.
3657         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
3658         Include lowlevellock.h.
3659         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3660         (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
3661         to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
3662         and __lll_unlock_wake.
3663         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
3664         Include lowlevellock.h.
3665         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3666         Don't define.
3667         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
3668         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3669         and __lll_unlock_wake.
3670         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3671         Include lowlevellock.h.
3672         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3673         Don't define.
3674         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3675         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3676         and __lll_unlock_wake.
3677         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3678         Include lowlevellock.h.
3679         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3680         Don't define.
3681         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3682         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3683         and __lll_unlock_wake.
3684         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
3685         Include lowlevellock.h.
3686         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3687         Don't define.
3688         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
3689         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3690         and __lll_unlock_wake.
3691         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
3692         Include lowlevellock.h.
3693         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3694         Don't define.
3695         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3696         pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
3697         and __lll_unlock_wake.
3698         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
3699         lowlevellock.h.
3700         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
3701         define.
3702         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
3703         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
3704         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
3705         lowlevellock.h.
3706         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3707         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
3708         lowlevellock.h.
3709         (LOCK): Don't define.
3710         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
3711         lowlevellock.h.
3712         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3713         * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
3714         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
3715         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
3716         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
3717         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
3718         (__lll_lock_wait_private): New function.
3719         (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
3720         it to lll_futex_*wait.  Don't compile in for libc.so.
3721         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
3722         Remove.
3723         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
3724         (struct sparc_pthread_barrier): Remove.
3725         (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
3726         struct sparc_pthread_barrier.  Pass
3727         ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
3728         and lll_futex_wait macros.
3729         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3730         Remove.
3731         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3732         Include sparc pthread_barrier_wait.c instead of generic one.
3734 2007-07-30  Jakub Jelinek  <jakub@redhat.com>
3736         * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
3738         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
3739         (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
3740         %ecx.
3741         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
3742         (pthread_rwlock_timedwrlock): Likewise.
3743         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
3744         (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
3746 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
3748         * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
3750 2007-07-26  Jakub Jelinek  <jakub@redhat.com>
3752         * tst-locale2.c (useless): Add return statement.
3754 2007-07-24  Jakub Jelinek  <jakub@redhat.com>
3756         * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
3757         lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
3758         * pthread_create.c (start_thread): Likewise.
3759         * init.c (sighandler_setxid): Likewise.
3760         * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3761         * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3762         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3763         * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3764         * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3765         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3766         * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3767         * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3768         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
3769         Likewise.
3770         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
3771         Likewise.
3772         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
3773         Likewise.
3774         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
3775         __rtld_notify): Likewise.
3776         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
3777         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
3778         __pthread_once): Likewise.
3779         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
3780         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3781         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3782         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3783         (lll_futex_wait): Add private argument, define as wrapper around
3784         lll_futex_timed_wait.
3785         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3786         use __lll_private_flag macro.
3787         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3788         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3789         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
3790         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3791         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3792         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3793         (lll_futex_wait): Add private argument, define as wrapper around
3794         lll_futex_timed_wait.
3795         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3796         use __lll_private_flag macro.
3797         (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
3798         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3799         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
3800         Define.
3801         (lll_futex_timed_wait, lll_futex_wake): Use it.
3802         (lll_private_futex_wait, lll_private_futex_timed_wait,
3803         lll_private_futex_wake): Removed.
3804         * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
3805         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3806         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3807         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3808         (lll_futex_wait): Add private argument, define as wrapper around
3809         lll_futex_timed_wait.
3810         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3811         use __lll_private_flag macro.
3812         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3813         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3814         to lll_futex_*.
3815         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3816         (lll_private_futex_wait, lll_private_futex_timed_wait,
3817         lll_private_futex_wake): Removed.
3818         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
3819         Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
3820         (lll_private_futex_wait, lll_private_futex_timed_wait,
3821         lll_private_futex_wake): Removed.
3822         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
3823         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3824         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3825         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3826         (lll_futex_wait): Add private argument, define as wrapper around
3827         lll_futex_timed_wait.
3828         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3829         use __lll_private_flag macro.
3830         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3831         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3832         to lll_futex_*.
3833         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
3834         Define.
3835         (lll_futex_timed_wait, lll_futex_wake): Use it.
3836         (lll_private_futex_wait, lll_private_futex_timed_wait,
3837         lll_private_futex_wake): Removed.
3839 2007-07-27  Jakub Jelinek  <jakub@redhat.com>
3841         * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
3842         of the structure for sparc32.
3844 2007-07-26  Aurelien Jarno  <aurelien@aurel32.net>
3846         * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
3848 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
3850         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3851         code used when private futexes are assumed.
3852         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3853         Likewise.
3855 2007-07-23  Jakub Jelinek  <jakub@redhat.com>
3857         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3858         (__lll_private_flag): Define.
3859         (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
3860         (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
3861         __lll_private_flag.
3862         (lll_private_futex_wait, lll_private_futex_timedwait,
3863         lll_private_futex_wake): Define as wrapper around non-_private
3864         macros.
3865         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3866         (__lll_private_flag): Define.
3867         (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
3868         (lll_private_futex_wait, lll_private_futex_timedwait,
3869         lll_private_futex_wake): Define as wrapper around non-_private
3870         macros.
3872 2007-07-10  Steven Munroe  <sjmunroe@us.ibm.com>
3874         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
3875         parameter to lll_futex_wait call.
3876         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
3878         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3879         Replace lll_futex_wait with lll_private_futex_wait.
3880         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3881         Add LLL_SHARED parameter to lll_futex_wake().
3883         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
3884         LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
3885         lll_private_futex_wake.
3886         (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
3887         bit from private parm before syscall.
3888         (lll_futex_timed_wait): Likewise.
3889         (lll_futex_wake): Likewise.
3890         (lll_futex_wake_unlock): Likewise.
3891         (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
3892         (lll_robust_mutex_unlock): Likewise.
3893         (lll_mutex_unlock_force): Likewise.
3894         (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
3896 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
3898         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
3899         compilation when unconditionally using private futexes.
3900         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3901         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3902         Likewise.
3903         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
3904         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3906 2007-07-17  Jakub Jelinek  <jakub@redhat.com>
3908         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
3909         Define.
3911 2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3913         * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
3914         kernel-features.h.
3916 2007-05-16  Roland McGrath  <roland@redhat.com>
3918         * init.c (__nptl_initial_report_events): New variable.
3919         (__pthread_initialize_minimal_internal): Initialize pd->report_events
3920         to that.
3922 2007-06-22  Jakub Jelinek  <jakub@redhat.com>
3924         * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
3925         cpusetsize if pthread_getaffinity_np failed with ENOSYS.
3927 2007-06-19  Ulrich Drepper  <drepper@redhat.com>
3929         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
3930         implementation.
3932 2007-06-18  Ulrich Drepper  <drepper@redhat.com>
3934         * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
3935         * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
3936         * pthread_mutex_timedlock.c: Likewise.
3937         * pthread_mutex_trylock.c: Likewise.
3938         * pthread_mutex_unlock.c: Likewise.
3940 2007-06-17  Andreas Schwab  <schwab@suse.de>
3942         * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
3943         sections.
3945 2007-06-17  Ulrich Drepper  <drepper@redhat.com>
3947         * allocatestack.c (allocate_stack): Make code compile if
3948         __ASSUME_PRIVATE_FUTEX is set.
3950 2007-06-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3952         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
3953         (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
3954         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
3955         (__pthread_rwlock_wrlock): Likewise.
3956         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
3957         (pthread_rwlock_timedrdlock): Likewise.
3958         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
3959         (pthread_rwlock_timedwrlock): Likewise.
3960         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
3961         (__pthread_rwlock_unlock): Likewise.
3963 2007-06-10  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3965         * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
3966         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
3967         Split __flags into __flags, __shared, __pad1 and __pad2.
3968         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
3969         futexes if they are available.
3970         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
3971         in libc-lowlevellock.S allow using private futexes.
3972         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
3973         FUTEX_PRIVATE_FLAG.  Add additional parameter to lll_futex_wait,
3974         lll_futex_timed_wait and lll_futex_wake.  Change lll_futex_wait
3975         to call lll_futex_timed_wait.  Add lll_private_futex_wait,
3976         lll_private_futex_timed_wait and lll_private_futex_wake.
3977         (lll_robust_mutex_unlock): Fix typo.
3978         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
3979         field in futex command setup.
3980         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
3981         COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
3982         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
3983         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
3984         if they are available.  Remove clear_once_control.
3985         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
3986         futexes if they are available.
3987         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3988         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3989         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
3990         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3991         * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
3992         Wake only when there are waiters.
3993         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
3994         support.  Indicate that there are waiters.  Remove unnecessary
3995         extra cancellation test.
3996         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.  Removed
3997         left-over duplication of __sem_wait_cleanup.
3999 2007-06-07  Ulrich Drepper  <drepper@redhat.com>
4001         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
4002         parameter to lll_futex_wait, lll_futex_timed_wait, and
4003         lll_futex_wake.  Change lll_futex_wait to call lll_futex_timed_wait.
4004         Add lll_private_futex_wait, lll_private_futex_timed_wait, and
4005         lll_private_futex_wake.
4006         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
4007         * allocatestack.c: Adjust use of lll_futex_* macros.
4008         * init.c: Likewise.
4009         * lowlevellock.h: Likewise.
4010         * pthread_barrier_wait.c: Likewise.
4011         * pthread_cond_broadcast.c: Likewise.
4012         * pthread_cond_destroy.c: Likewise.
4013         * pthread_cond_signal.c: Likewise.
4014         * pthread_cond_timedwait.c: Likewise.
4015         * pthread_cond_wait.c: Likewise.
4016         * pthread_create.c: Likewise.
4017         * pthread_mutex_lock.c: Likewise.
4018         * pthread_mutex_setprioceiling.c: Likewise.
4019         * pthread_mutex_timedlock.c: Likewise.
4020         * pthread_mutex_unlock.c: Likewise.
4021         * pthread_rwlock_timedrdlock.c: Likewise.
4022         * pthread_rwlock_timedwrlock.c: Likewise.
4023         * pthread_rwlock_unlock.c: Likewise.
4024         * sysdeps/alpha/tls.h: Likewise.
4025         * sysdeps/i386/tls.h: Likewise.
4026         * sysdeps/ia64/tls.h: Likewise.
4027         * sysdeps/powerpc/tls.h: Likewise.
4028         * sysdeps/pthread/aio_misc.h: Likewise.
4029         * sysdeps/pthread/gai_misc.h: Likewise.
4030         * sysdeps/s390/tls.h: Likewise.
4031         * sysdeps/sh/tls.h: Likewise.
4032         * sysdeps/sparc/tls.h: Likewise.
4033         * sysdeps/unix/sysv/linux/fork.c: Likewise.
4034         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
4035         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
4036         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
4037         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
4038         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
4039         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
4040         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
4041         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
4042         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
4043         Likewise.
4044         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
4045         * sysdeps/x86_64/tls.h: Likewise.
4047 2007-05-29  Ulrich Drepper  <drepper@redhat.com>
4049         * pthread_getattr_np.c: No need to install a cancellation handler,
4050         this is no cancellation point.
4051         * pthread_getschedparam.c: Likewise.
4052         * pthread_setschedparam.c: Likewise.
4053         * pthread_setschedprio.c: Likewise.
4054         * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
4055         lll_unlock_wake_cb.
4056         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
4057         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
4058         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4059         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4060         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4061         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4062         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
4063         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
4064         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
4065         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
4066         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
4067         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4069         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
4070         whether there are more than one thread makes no sense here since
4071         we only call the slow path if the locks are taken.
4072         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
4074         * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
4075         COND_NWAITERS_SHIFT.
4076         * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
4077         COND_CLOCK_BITS.
4078         * pthread_cond_init.c: Likewise.
4079         * pthread_cond_timedwait.c: Likewise.
4080         * pthread_cond_wait.c: Likewise.
4081         * pthread_condattr_getclock.c: Likewise.
4082         * pthread_condattr_setclock.c: Likewise.
4083         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
4084         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4085         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4086         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4087         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4089 2007-05-28  Jakub Jelinek  <jakub@redhat.com>
4091         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
4092         unistd.h.
4094         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
4095         insn suffix.
4096         (THREAD_GSCOPE_GET_FLAG): Remove.
4097         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
4098         * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
4099         changes.
4100         * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
4101         (THREAD_GSCOPE_GET_FLAG): Remove.
4102         (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
4103         instead of THREAD_GSCOPE_GET_FLAG.
4104         (THREAD_GSCOPE_SET_FLAG): Likewise.  Add atomic_write_barrier after
4105         it.
4106         * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4107         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4108         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4109         THREAD_GSCOPE_WAIT): Define.
4110         * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4111         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4112         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4113         THREAD_GSCOPE_WAIT): Define.
4114         * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4115         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4116         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4117         THREAD_GSCOPE_WAIT): Define.
4118         * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4119         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4120         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4121         THREAD_GSCOPE_WAIT): Define.
4123 2007-05-24  Richard Henderson  <rth@redhat.com>
4125         * descr.h (struct pthread): Add header.gscope_flag.
4126         * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4127         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4128         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4129         THREAD_GSCOPE_WAIT): Define.
4131 2007-05-27  Ulrich Drepper  <drepper@redhat.com>
4133         * init.c: Make it compile with older kernel headers.
4135         * tst-initializers1.c: Show through exit code which test failed.
4137         * pthread_rwlock_init.c: Also initialize __shared field.
4138         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
4139         element in rwlock structure into four byte elements.  One of them is
4140         the new __shared element.
4141         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
4142         Likewise.
4143         [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
4144         __shared, adjust names of other padding elements.
4145         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4146         * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
4147         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
4148         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
4149         FUTEX_PRIVATE_FLAG.
4150         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
4151         futex to use private operations if possible.
4152         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
4153         Likewise.
4154         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
4155         Likewise.
4156         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
4157         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
4158         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
4159         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
4160         Likewise.
4161         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
4162         Likewise.
4163         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
4164         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
4166 2007-05-26  Ulrich Drepper  <drepper@redhat.com>
4168         * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
4169         * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
4170         * pthread_rwlock_timedrdlock.c: Likewise.
4171         * pthread_rwlock_tryrdlock.c: Likewise.
4173         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
4174         optimization.
4176         * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
4177         * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
4178         duplication of __sem_wait_cleanup.
4180         * allocatestack.c: Revert last change.
4181         * init.c: Likewise.
4182         * sysdeps/i386/tls.h: Likewise.
4183         * sysdeps/x86_64/tls.h: Likewise.
4184         * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
4185         header structure.
4186         * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
4188         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
4189         Add private field.
4190         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
4191         * pthread_barrier_init.c: Set private flag if pshared and private
4192         futexes are supported.
4193         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
4194         private field in futex command setup.
4195         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
4197 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
4199         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
4200         support.
4201         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4202         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4203         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
4204         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4205         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4207         * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
4208         * sem_init.c (__new_sem_init): Rewrite to initialize all three
4209         fields in the structure.
4210         (__old_sem_init): New function.
4211         * sem_open.c: Initialize all fields of the structure.
4212         * sem_getvalue.c: Adjust for renamed element.
4213         * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
4214         (gen-as-const-headers): Add structsem.sym.
4215         * sysdeps/unix/sysv/linux/structsem.sym: New file.
4216         * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
4217         struct new_sem.  Add struct old_sem.
4218         * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
4219         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
4220         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
4221         * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
4222         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4223         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4224         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
4225         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4226         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4227         * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
4228         * tst-sem10.c: New file.
4229         * tst-sem11.c: New file.
4230         * tst-sem12.c: New file.
4231         * tst-typesizes.c: Test struct new_sem and struct old_sem instead
4232         of struct sem.
4234 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
4235             Jakub Jelinek  <jakub@redhat.com>
4237         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
4238         Move __pthread_enable_asynccancel right before futex syscall.
4239         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
4240         Likewise.
4242 2007-05-24  Jakub Jelinek  <jakub@redhat.com>
4244         * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
4245         THREAD_COPY_PRIVATE_FUTEX): Define.
4246         * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
4247         THREAD_COPY_PRIVATE_FUTEX): Define.
4248         * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
4249         * init.c (__pthread_initialize_minimal_internal): Use
4250         THREAD_SET_PRIVATE_FUTEX.
4252         * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
4253         (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
4254         THREAD_GSCOPE_FLAG_WAIT): Define.
4255         (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
4256         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
4257         * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
4258         PTR_DEMANGLE.
4259         (THREAD_GSCOPE_GET_FLAG): Define.
4260         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
4261         * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
4262         instead of ->header.gscope_flag directly.
4264 2007-05-23  Ulrich Drepper  <drepper@redhat.com>
4266         * init.c (__pthread_initialize_minimal_internal): Check whether
4267         private futexes are available.
4268         * allocatestack.c (allocate_stack): Copy private_futex field from
4269         current thread into the new stack.
4270         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
4271         futexes if they are available.
4272         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
4273         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
4274         in libc-lowlevellock.S allow using private futexes.
4275         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4276         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
4277         FUTEX_PRIVATE_FLAG.
4278         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
4279         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
4280         if they are available.
4281         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
4282         * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
4283         * sysdeps/i386/tcb-offsets.sym: Likewise.
4284         * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
4285         * sysdeps/i386/tls.h (tcbhead_t): Likewise.
4287 2007-05-21  Ulrich Drepper  <drepper@redhat.com>
4289         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
4290         Remove ptr_wait_lookup_done again.
4291         * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
4292         (__pthread_initialize_minimal_internal): Initialize
4293         _dl_wait_lookup_done pointer in _rtld_global directly.
4294         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
4295         Remove code to code _dl_wait_lookup_done.
4296         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
4297         encrypted for now.
4299 2007-05-21  Jakub Jelinek  <jakub@redhat.com>
4301         * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
4302         pthread_mutex_init failed with ENOTSUP.
4304 2007-05-19  Ulrich Drepper  <drepper@redhat.com>
4306         * allocatestack.c (__wait_lookup_done): New function.
4307         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
4308         Add ptr_wait_lookup_done.
4309         * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
4310         * pthreadP.h: Declare __wait_lookup_done.
4311         * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
4312         Define macros to implement reference handling of global scope.
4313         * sysdeps/x86_64/tls.h: Likewise.
4314         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
4315         Initialize GL(dl_wait_lookup_done).
4317 2007-05-17  Ulrich Drepper  <drepper@redhat.com>
4319         [BZ #4512]
4320         * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
4321         is detected.
4322         * pthread_mutex_timedlock.c: Likewise.
4323         * pthread_mutex_trylock.c: Likewise.
4324         Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
4326         * Makefile (tests): Add tst-robust9 and tst-robustpi9.
4327         * tst-robust9.c: New file.
4328         * tst-robustpi9.c: New file.
4330         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
4331         unnecessary extra cancellation test.
4333 2007-05-14  Ulrich Drepper  <drepper@redhat.com>
4335         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
4336         extra cancellation test.
4337         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4339 2007-05-10  Ulrich Drepper  <drepper@redhat.com>
4341         * descr.h (struct pthread): Rearrange members to fill hole in
4342         64-bit layout.
4344         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4345         (__pthread_setaffinity_new): If syscall was successful and
4346         RESET_VGETCPU_CACHE is defined, use it before returning.
4347         * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
4349 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
4351         [BZ #4455]
4352         * tst-align2.c: Include stackinfo.h.
4353         * tst-getpid1.c: Likewise.
4355 2007-05-02  Carlos O'Donell  <carlos@systemhalted.org>
4357         [BZ #4455]
4358         * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
4359         * tst-getpid1.c (do_test): Likewise.
4361         [BZ #4456]
4362         * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
4363         (allocate_stack): Likewise.
4365 2007-05-07  Ulrich Drepper  <drepper@redhat.com>
4367         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
4368         (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
4369         (__lll_robust_timedlock_wait): Likewise.
4370         Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
4372 2007-05-06  Mike Frysinger  <vapier@gentoo.org>
4374         [BZ #4465]
4375         * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
4376         * tst-cancel4.c (tf_fdatasync): New test.
4378 2007-04-27  Ulrich Drepper  <drepper@redhat.com>
4380         [BZ #4392]
4381         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
4382         check mutexes like normal mutexes.
4384         [BZ #4306]
4385         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
4386         Initialize the whole sigevent structure to appease valgrind.
4388 2007-04-25  Ulrich Drepper  <drepper@redhat.com>
4390         * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
4391         * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
4393 2007-04-06  Ulrich Drepper  <drepper@redhat.com>
4395         * tst-locale1.c: Avoid warnings.
4396         * tst-locale2.c: Likewise.
4398 2007-03-19  Steven Munroe  <sjmunroe@us.ibm.com>
4400         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4401         (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
4403 2007-03-16  Jakub Jelinek  <jakub@redhat.com>
4405         * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
4406         __extern_always_inline where appropriate.
4407         * sysdeps/pthread/pthread.h: Likewise.
4409 2007-03-13  Richard Henderson  <rth@redhat.com>
4411         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
4412         separate cfi regions for the two subsections.
4414 2007-02-25  Ulrich Drepper  <drepper@redhat.com>
4416         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
4417         new thread, don't just decrement it.
4418         Patch by Suzuki K P <suzuki@in.ibm.com>.
4420 2007-02-21  Ulrich Drepper  <drepper@redhat.com>
4422         * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
4423         PTHFCT_CALL definition.
4425 2007-02-18  Ulrich Drepper  <drepper@redhat.com>
4427         * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
4428         available, don't use it.
4430 2007-02-09  Jakub Jelinek  <jakub@redhat.com>
4432         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4433         (__lll_mutex_timedlock_wait): Use correct pointer when we don't
4434         call into the kernel to delay.
4436 2007-01-18  Ulrich Drepper  <drepper@redhat.com>
4438         * tst-initializers1.c: We want to test the initializers as seen
4439         outside of libc, so undefined _LIBC.
4441         * pthread_join.c (cleanup): Avoid warning.
4443 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
4445         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4446         (__lll_timedwait_tid): Add unwind info.
4448         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
4449         function table, mangle the pointers.
4450         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
4451         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
4452         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
4453         demangle pointers before use.
4454         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
4455         demangle pointer.
4456         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
4457         * sysdeps/pthread/setxid.h: Likewise.
4459 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
4461         * tst-rwlock7.c: Show some more information in case of correct
4462         behavior.
4464 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
4466         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4467         (lll_futex_timed_wait): Undo part of last change, don't negate
4468         return value.
4470 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
4472         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
4473         FUTEX_CMP_REQUEUE and lll_futex_requeue.
4475 2006-12-28  David S. Miller  <davem@davemloft.net>
4477         * shlib-versions: Fix sparc64 linux target specification.
4479 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
4481         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
4482         Adjust include path for pthread_barrier_wait.c move.
4484 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
4486         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
4487         tid isn't reread from pd->tid in between ESRCH test and the syscall.
4489 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
4491         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
4492         6 argument cancellable syscalls.
4493         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
4494         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
4495         6 argument cancellable syscalls.
4496         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
4498 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
4500         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
4501         (__rtld_mrlock_initialize): Add missing closing parenthesis.
4503 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
4505         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
4506         __sync_lock_release instead of __sync_lock_release_si.
4508 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
4510         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
4511         Define.
4512         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
4513         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
4514         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4515         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4516         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4517         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4518         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4519         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4520         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4521         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4522         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4524 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
4526         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
4527         * pthread_barrier_wait.c: ...here.
4528         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
4529         * pthread_cond_broadcast.c: ...here.
4530         * sysdeps/pthread/pthread_cond_signal.c: Move to...
4531         * pthread_cond_signal.c: ...here.
4532         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
4533         * pthread_cond_timedwait.c: ...here.
4534         * sysdeps/pthread/pthread_cond_wait.c: Move to...
4535         * pthread_cond_wait.c: ...here.
4536         * sysdeps/pthread/pthread_once.c: Move to...
4537         * pthread_once.c: ...here.
4538         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
4539         * pthread_rwlock_rdlock.c: ...here.
4540         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
4541         * pthread_rwlock_timedrdlock.c: ...here.
4542         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
4543         * pthread_rwlock_timedwrlock.c: ...here.
4544         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
4545         * pthread_rwlock_unlock.c: ...here.
4546         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
4547         * pthread_rwlock_wrlock.c: ...here.
4548         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
4549         * pthread_spin_destroy.c: ...here.
4550         * sysdeps/pthread/pthread_spin_init.c: Move to...
4551         * pthread_spin_init.c: ...here.
4552         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
4553         * pthread_spin_unlock.c: ...here.
4554         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
4555         * pthread_getcpuclockid.c: ...here.
4557         * init.c: USE_TLS support is now always enabled.
4558         * tst-tls5.h: Likewise.
4559         * sysdeps/alpha/tls.h: Likewise.
4560         * sysdeps/i386/tls.h: Likewise.
4561         * sysdeps/ia64/tls.h: Likewise.
4562         * sysdeps/powerpc/tls.h: Likewise.
4563         * sysdeps/s390/tls.h: Likewise.
4564         * sysdeps/sh/tls.h: Likewise.
4565         * sysdeps/sparc/tls.h: Likewise.
4566         * sysdeps/x86_64/tls.h: Likewise.
4568 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
4570         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
4571         __rtld_mrlock_change): Update oldval if atomic compare and exchange
4572         failed.
4574         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4575         Define to THREAD_SELF->header.multiple_threads.
4576         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
4577         Likewise.
4578         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
4579         Likewise.
4580         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
4581         (SINGLE_THREAD_P): Likewise.
4582         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
4583         (SINGLE_THREAD_P): Likewise.
4584         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4585         (SINGLE_THREAD_P): Likewise.
4586         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
4587         (SINGLE_THREAD_P): Likewise.
4588         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
4589         Likewise.
4590         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
4591         (SINGLE_THREAD_P): Likewise.
4592         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
4593         (SINGLE_THREAD_P): Likewise.
4594         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
4595         Likewise.
4597 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
4599         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
4600         by default rather than 2_3_3.
4602 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
4604         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
4605         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
4606         atomic_* instead of catomic_* macros.
4608 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
4610         [BZ #3285]
4611         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
4612         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
4613         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4614         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4615         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4616         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
4617         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4618         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4619         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4620         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
4621         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4622         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4623         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4625 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
4627         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
4628         cancelable syscalls with six parameters.
4630         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
4631         operations instead of atomic_*.
4633 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
4635         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
4637 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
4639         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
4640         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
4641         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
4642         New file.
4643         * pthread_attr_setstack.c: Allow overwriting the version number of the
4644         new symbol.
4645         * pthread_attr_setstacksize.c: Likewise.
4646         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
4647         it.
4648         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
4649         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
4651 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
4653         [BZ #3251]
4654         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
4655         Patch by Petr Baudis.
4657 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
4659         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
4661         * tst-cancel2.c (tf): Loop as long as something was written.
4663 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4665         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
4666         mutexes wake all mutexes.
4667         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
4668         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
4669         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4671 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
4673         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
4674         to guarantee the thread is always canceled.
4676 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
4678         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
4679         Include stdlib.h.
4680         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
4681         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
4682         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4683         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4684         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4686 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
4688         [BZ #3123]
4689         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
4690         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
4691         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4692         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4693         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4694         * Makefile (tests): Add tst-cond22.
4695         * tst-cond22.c: New file.
4697 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
4699         [BZ #3124]
4700         * descr.h (struct pthread): Add parent_cancelhandling.
4701         * sysdeps/pthread/createthread.c (create_thread): Pass parent
4702         cancelhandling value to child.
4703         * pthread_create.c (start_thread): If parent thread was canceled
4704         reset the SIGCANCEL mask.
4705         * Makefile (tests): Add tst-cancel25.
4706         * tst-cancel25.c: New file.
4708 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
4709             Ulrich Drepper  <drepper@redhat.com>
4711         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
4712         counterp if it is already zero.
4713         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
4715 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
4716             Roland McGrath  <roland@redhat.com>
4718         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4719         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4720         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
4721         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4722         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4723         lll_robust_mutex_timedlock, lll_mutex_unlock,
4724         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4725         Add _L_*_ symbols around the subsection.
4726         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
4727         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
4729 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
4730             Roland McGrath  <roland@redhat.com>
4732         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4733         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4734         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
4735         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4736         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4737         lll_robust_mutex_timedlock, lll_mutex_unlock,
4738         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4739         Add _L_*_ symbols around the subsection.
4740         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
4741         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
4743 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
4745         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
4746         change because it can disturb too much existing code.  If real hard
4747         reader preference is needed we'll introduce another type.
4748         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4749         (pthread_rwlock_timedwrlock): Likewise.
4750         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4751         Likewise.
4753 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
4755         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
4756         reader preference.
4757         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4758         (pthread_rwlock_timedwrlock): Likewise.
4759         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4760         Likewise.
4762 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
4764         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
4765         Only define ifdef SHARED.
4767 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
4769         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
4770         (free_stacks): ...here.
4771         (__free_stack_cache): New function.
4772         * pthreadP.h: Declare __free_stack_cache.
4773         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
4774         ptr_freeres.
4775         * init.c (pthread_functions): Initialize ptr_freeres.
4776         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
4777         New freeres function.
4779 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
4781         [BZ #3018]
4782         * Makefile (extra-objs): Add modules to extra-test-objs instead.
4784 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
4786         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4787         _XOPEN_REALTIME_THREADS.
4789 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
4791         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
4792         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
4793         HAVE_CLOCK_GETTIME_VSYSCALL.
4794         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
4796 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
4798         * sysdeps/unix/sysv/linux/bits/posix_opt.h
4799         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
4800         * descr.h (struct priority_protection_data): New type.
4801         (struct pthread): Add tpp field.
4802         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
4803         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
4804         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
4805         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
4806         TPP mutexes.
4807         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
4808         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
4809         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
4810         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
4811         * tpp.c: New file.
4812         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
4813         boosted by TPP.
4814         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
4815         * pthread_mutexattr_getprioceiling.c
4816         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
4817         in the SCHED_FIFO priority range.
4818         * pthread_mutexattr_setprioceiling.c
4819         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
4820         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
4821         if mutex is not TPP.  Ceiling is now in __data.__lock.
4822         * pthread_mutex_setprioceiling.c: Include stdbool.h.
4823         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
4824         is now in __data.__lock.  Add locking.
4825         * pthread_create.c (__free_tcb): Free pd->tpp structure.
4826         * Makefile (libpthread-routines): Add tpp.
4827         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
4828         * tst-tpp.h: New file.
4829         * tst-mutexpp1.c: New file.
4830         * tst-mutexpp6.c: New file.
4831         * tst-mutexpp10.c: New file.
4832         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
4833         * tst-mutex6.c (TEST_FUNCTION): Likewise.
4835 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
4837         [BZ #2843]
4838         * pthread_join.c (pthread_join): Account for self being canceled
4839         when checking for deadlocks.
4840         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
4841         (tf1): Don't print anything after pthread_join returns, this would be
4842         another cancellation point.
4843         (tf2): Likewise.
4844         * tst-join6.c: New file.
4845         * Makefile (tests): Add tst-join6.
4847 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
4849         [BZ #2892]
4850         * pthread_setspecific.c (__pthread_setspecific): Check
4851         out-of-range index before checking for unused key.
4853         * sysdeps/pthread/gai_misc.h: New file.
4855 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
4857         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
4858         file.  Don't use sysctl.
4859         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
4860         overwrite the file if this is likely not true.
4862 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
4864         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
4865         * Makefile (tests): Add tst-getpid3.
4866         * tst-getpid3.c: New file.
4868 2006-07-30  Roland McGrath  <roland@redhat.com>
4870         * Makefile (libpthread-routines): Add ptw-sigsuspend.
4872         * sysdeps/unix/sysv/linux/i386/not-cancel.h
4873         (pause_not_cancel): New macro.
4874         (nanosleep_not_cancel): New macro.
4875         (sigsuspend_not_cancel): New macro.
4876         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
4877         nanosleep_not_cancel macro from <not-cancel.h>.
4878         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
4879         macro from <not-cancel.h>.
4881 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
4882             Jakub Jelinek  <jakub@redhat.com>
4884         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
4885         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
4886         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
4887         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
4888         * pthread_mutex_init.c: Add support for priority inheritance mutex.
4889         * pthread_mutex_lock.c: Likewise.
4890         * pthread_mutex_timedlock.c: Likewise.
4891         * pthread_mutex_trylock.c: Likewise.
4892         * pthread_mutex_unlock.c: Likewise.
4893         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
4894         all mutexes.
4895         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
4896         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
4897         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
4898         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
4899         pthread-pi-defines.sym.
4900         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
4901         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
4902         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4903         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
4904         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4905         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4906         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4907         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
4908         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
4909         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4910         _POSIX_THREAD_PRIO_INHERIT to 200112L.
4911         * tst-mutex1.c: Adjust to allow use in PI mutex test.
4912         * tst-mutex2.c: Likewise.
4913         * tst-mutex3.c: Likewise.
4914         * tst-mutex4.c: Likewise.
4915         * tst-mutex5.c: Likewise.
4916         * tst-mutex6.c: Likewise.
4917         * tst-mutex7.c: Likewise.
4918         * tst-mutex7a.c: Likewise.
4919         * tst-mutex8.c: Likewise.
4920         * tst-mutex9.c: Likewise.
4921         * tst-robust1.c: Likewise.
4922         * tst-robust7.c: Likewise.
4923         * tst-robust8.c: Likewise.
4924         * tst-mutexpi1.c: New file.
4925         * tst-mutexpi2.c: New file.
4926         * tst-mutexpi3.c: New file.
4927         * tst-mutexpi4.c: New file.
4928         * tst-mutexpi5.c: New file.
4929         * tst-mutexpi6.c: New file.
4930         * tst-mutexpi7.c: New file.
4931         * tst-mutexpi7a.c: New file.
4932         * tst-mutexpi8.c: New file.
4933         * tst-mutexpi9.c: New file.
4934         * tst-robust1.c: New file.
4935         * tst-robust2.c: New file.
4936         * tst-robust3.c: New file.
4937         * tst-robust4.c: New file.
4938         * tst-robust5.c: New file.
4939         * tst-robust6.c: New file.
4940         * tst-robust7.c: New file.
4941         * tst-robust8.c: New file.
4942         * Makefile (tests): Add the new tests.
4944         * pthread_create.c (start_thread): Add some casts to avoid warnings.
4945         * pthread_mutex_destroy.c: Remove unneeded label.
4947 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
4949         * pthread_mutex_init.c (__pthread_mutex_init): Move some
4950         computations to compile time.
4952 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
4954         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
4956 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
4958         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
4960 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
4962         * pthread_key_create.c (__pthread_key_create): Do away with
4963         __pthread_keys_lock.
4965         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4966         (__kernel_cpumask_size): Mark as hidden.
4967         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4969         * sem_open.c (__sem_mappings_lock): Mark as hidden.
4970         * semaphoreP.h (__sem_mappings_lock): Likewise.
4972 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
4974         * pthread_atfork.c: Mark __dso_handle as hidden.
4976 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
4978         [BZ #2644]
4979         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
4980         the reload problem.  Change the one path in pthread_cancel_init
4981         which causes the problem.  Force gcc to reload.  Simplify callers.
4982         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
4983         (_Unwind_GetBSP): Undo last patch.
4985 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
4987         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
4988         function pointer is reloaded after pthread_cancel_init calls.
4990         [BZ #2644]
4991         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
4992         pointers are reloaded after pthread_cancel_init calls.
4994 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
4996         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
4997         __always_inline.
4999 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
5001         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5002         Allocate new object which is passed to timer_sigev_thread so that
5003         the timer can be deleted before the new thread is scheduled.
5005 2006-04-26  Roland McGrath  <roland@redhat.com>
5007         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
5009 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
5011         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
5012         suffix for conditional jumps.
5013         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
5014         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
5015         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
5016         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
5017         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
5018         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
5020         * init.c (sigcancel_handler): Compare with correct PID even if the
5021         thread is in the middle of a fork call.
5022         (sighandler_setxid): Likewise.
5023         Reported by Suzuki K P <suzuki@in.ibm.com> .
5025 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
5027         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
5029 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
5031         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
5032         fails [Coverity CID 105].
5034 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
5036         * sysdeps/pthread/pthread.h: Add nonnull attributes.
5038 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
5040         [BZ #2505]
5041         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
5042         Define __lll_rel_instr using lwsync.
5044 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
5046         * allocatestack.c (allocate_stack): Always initialize robust_head.
5047         * descr.h: Define struct robust_list_head.
5048         (struct pthread): Use robust_list_head in robust mutex list definition.
5049         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
5050         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
5051         (__pthread_initialize_minimal_internal): Register robust_list with
5052         the kernel.
5053         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
5054         Declare __set_robust_list_avail.
5055         * pthread_create.c (start_thread): Register robust_list of new thread.
5056         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
5057         waiters.
5058         * pthread_mutex_destroy.c: For robust mutexes don't look at the
5059         number of users, it's unreliable.
5060         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
5061         set_robust_list syscall is available.
5062         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
5063         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
5064         Set robust_head.list_op_pending before trying to lock a robust mutex.
5065         * pthread_mutex_timedlock.c: Likewise.
5066         * pthread_mutex_trylock.c: Likewise.
5067         * pthread_mutex_unlock.c: Likewise for unlocking.
5068         * Makefile (tests): Add tst-robust8.
5069         * tst-robust8.c: New file.
5071 2006-03-08  Andreas Schwab  <schwab@suse.de>
5073         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
5074         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
5076 2006-03-05  Roland McGrath  <roland@redhat.com>
5078         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
5079         and $config_os doesn't match *linux*.
5081 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
5083         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
5084         Use __syscall_error.
5085         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
5086         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
5087         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
5088         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
5089         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
5090         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
5092 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
5094         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
5096 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
5098         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
5099         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
5100         mutex.
5101         (__lll_robust_timedlock_wait): Likewise.
5102         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
5103         (__lll_robust_lock_wait): Likewise.
5104         (__lll_robust_timedlock_wait): Likewise.
5105         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
5106         (__lll_robust_lock_wait): Likewise.
5107         (__lll_robust_timedlock_wait): Likewise.
5109 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
5111         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
5112         lll_robust_mutex_trylock, lll_robust_mutex_lock,
5113         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
5114         lll_robust_mutex_unlock): Define.
5115         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
5117 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
5119         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
5120         instead of <clone.S>.
5122 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
5124         * Makefile (libpthread-routines): Add
5125         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
5126         and pthread_mutex_[sg]etprioceiling.
5127         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
5128         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
5129         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
5130         pthread_mutex_setprioceiling.
5131         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
5132         PTHREAD_PRIO_PROTECT): New enum values.
5133         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
5134         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
5135         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
5136         prototypes.
5137         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
5138         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
5139         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
5140         Define.
5141         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
5142         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
5143         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
5144         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
5145         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
5146         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
5147         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
5148         protocol mutexes.
5149         * pthread_mutex_getprioceiling.c: New file.
5150         * pthread_mutex_setprioceiling.c: New file.
5151         * pthread_mutexattr_getprioceiling.c: New file.
5152         * pthread_mutexattr_setprioceiling.c: New file.
5153         * pthread_mutexattr_getprotocol.c: New file.
5154         * pthread_mutexattr_setprotocol.c: New file.
5156 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
5158         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
5160 2006-02-27  Roland McGrath  <roland@redhat.com>
5162         * sysdeps/pthread/Subdirs: List nptl here too.
5163         * configure (libc_add_on_canonical): New variable.
5165         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
5167         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
5168         self to get main source tree's file.
5169         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
5170         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
5171         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
5172         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
5173         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
5174         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
5175         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
5176         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
5177         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
5178         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
5179         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
5180         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
5181         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
5183         * Makefile: Use $(sysdirs) in vpath directive.
5185         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
5186         (CPPFLAGS-timer_routines.c): Likewise.
5188         * Makeconfig (includes): Variable removed.
5190 2006-02-26  Roland McGrath  <roland@redhat.com>
5192         * sysdeps/generic/pt-raise.c: Moved to ...
5193         * pt-raise.c: ... here.
5194         * sysdeps/generic/lowlevellock.h: Moved to ...
5195         * lowlevellock.h: ... here.
5197 2006-02-23  Roland McGrath  <roland@redhat.com>
5199         * descr.h (struct pthread): Add final member `end_padding'.
5200         (PTHREAD_STRUCT_END_PADDING): Use it.
5202 2006-02-20  Roland McGrath  <roland@redhat.com>
5204         * sysdeps/mips: Directory removed, saved in ports repository.
5205         * sysdeps/unix/sysv/linux/mips: Likewise.
5207 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
5209         * tst-robust1.c: Add second mutex to check that the mutex list is
5210         handled correctly.
5212 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
5214         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
5215         lll_robust_mutex_trylock, lll_robust_mutex_lock,
5216         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
5217         lll_robust_mutex_unlock): New macros.
5218         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
5219         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
5220         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5221         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5222         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
5224 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5226         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
5227         definitions.
5228         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
5230 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
5232         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
5233         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
5234         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
5235         (lll_robust_mutex_unlock): Likewise.
5237 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
5239         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
5240         Set robust_list.__next rather than robust_list.
5241         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
5242         (__pthread_list_t): New typedef.
5243         (pthread_mutex_t): Replace __next and __prev fields with __list.
5244         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
5245         (__pthread_list_t): New typedef.
5246         (pthread_mutex_t): Replace __next and __prev fields with __list.
5247         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5248         (__pthread_list_t, __pthread_slist_t): New typedefs.
5249         (pthread_mutex_t): Replace __next and __prev fields with __list.
5250         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
5251         (__pthread_list_t, __pthread_slist_t): New typedefs.
5252         (pthread_mutex_t): Replace __next and __prev fields with __list.
5253         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
5254         (__pthread_list_t, __pthread_slist_t): New typedefs.
5255         (pthread_mutex_t): Replace __next and __prev fields with __list.
5256         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
5257         (__pthread_slist_t): New typedef.
5258         (pthread_mutex_t): Replace __next field with __list.
5260 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
5262         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
5263         PTHREAD_MUTEX_OWNERDEAD.
5264         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
5265         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
5266         * Makefile (libpthread-routines): Add lowlevelrobustlock.
5267         * pthread_create.c (start_thread): Very much simplify robust_list loop.
5268         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
5269         to PTHREAD_MUTEX_INCONSISTENT.
5270         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
5271         * pthread_mutex_lock.c: Reimplement robust mutex handling.
5272         * pthread_mutex_trylock.c: Likewise.
5273         * pthread_mutex_timedlock.c: Likewise.
5274         * pthread_mutex_unlock.c: Likewise.
5275         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
5276         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
5277         lowlevelrobustlock.sym.
5278         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
5279         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
5280         definitions.
5281         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5282         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
5283         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
5284         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
5285         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
5287 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
5289         * allocatestack.c (allocate_stack): Initialize robust_list.
5290         * init.c (__pthread_initialize_minimal_internal): Likewise.
5291         * descr.h (struct xid_command): Pretty printing.
5292         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
5293         robust_list.  Adjust macros.
5294         * pthread_create.c (start_thread): Adjust robust_list handling.
5295         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
5296         but the owner for all robust mutex types.
5297         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
5298         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
5299         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5300         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
5302         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
5303         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
5305 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
5307         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
5308         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
5310 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5312         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
5313         Return status.
5314         (lll_futex_timed_wait): Define.
5316 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
5318         * tst-cancel4.c: Test ppoll.
5320 2006-01-18  Andreas Jaeger  <aj@suse.de>
5322         [BZ #2167]
5323         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
5324         (pthread_mutex_t): Follow changes for other archs.  Based on patch
5325         by Jim Gifford <patches@jg555.com>.
5327 2006-01-13  Richard Henderson  <rth@redhat.com>
5329         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
5331 2006-01-10  Roland McGrath  <roland@redhat.com>
5333         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
5334         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
5335         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
5336         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
5337         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
5338         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
5339         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
5340         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
5341         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
5342         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
5344 2006-01-09  Roland McGrath  <roland@redhat.com>
5346         * tst-initializers1-c89.c: New file.
5347         * tst-initializers1-c99.c: New file.
5348         * tst-initializers1-gnu89.c: New file.
5349         * tst-initializers1-gnu99.c: New file.
5350         * Makefile (tests): Add them.
5351         (CFLAGS-tst-initializers1-c89.c): New variable.
5352         (CFLAGS-tst-initializers1-c99.c): New variable.
5353         (CFLAGS-tst-initializers1-gnu89.c): New variable.
5354         (CFLAGS-tst-initializers1-gnu99.c): New variable.
5356         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
5357         Use __extension__ on anonymous union definition.
5358         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5359         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5360         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5361         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5362         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5364 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
5366         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
5367         Don't give the union a name because it changes the mangled name.
5368         Instead name the struct for __data.
5369         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
5370         Likewise.
5371         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
5372         Likewise.
5374 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
5376         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
5377         stack bias to mc_ftp field.
5379 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
5381         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
5382         being too clever and reloading the futex value where it shouldn't.
5384 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
5386         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
5387         correct type.
5389 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
5391         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
5392         Add cfi directives.
5394 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
5396         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
5397         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
5398         rename in tcbhead_t.
5400         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
5401         Don't give the union a name because it changes the mangled name.
5402         Instead name the struct for __data.
5403         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5404         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5405         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5406         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5407         * pthread_create.c (start_thread): Adjust robust mutex free loop.
5408         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
5410 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
5412         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5413         Return status.
5414         (lll_futex_timed_wait): Define.
5415         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5416         * sysdeps/pthread/aio_misc.h: New file.
5418 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
5420         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
5422 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
5424         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5425         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
5426         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
5428 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
5430         * tst-cancel24.cc: Use C headers instead of C++ headers.
5432 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
5434         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
5435         sparc-linux configured glibc.
5436         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
5437         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
5438         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
5439         atomic_compare_and_exchange_val_24_acq instead of
5440         atomic_compare_and_exchange_val_acq.
5441         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
5442         instead of atomic_exchange_rel.
5443         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
5444         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
5445         file.
5446         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
5447         file.
5448         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
5449         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
5450         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
5451         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
5452         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
5453         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
5454         New file.
5455         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
5456         New file.
5457         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
5458         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
5459         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
5460         file.
5461         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
5462         file.
5463         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
5465 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
5467         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
5468         mutex initializers.
5470 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
5472         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
5473         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5474         THREAD_COPY_POINTER_GUARD): Define.
5475         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
5476         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
5478 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
5480         * version.c: Update copyright year.
5482 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5484         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
5485         .eh_frame section, use cfi_* directives.
5486         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
5488 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
5490         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
5491         now.
5493 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
5495         * sysdeps/pthread/sigaction.c: Removed.
5496         * sigaction.c: New file.
5497         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
5499 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
5501         * Makefile (tests): Add tst-signal7.
5502         * tst-signal7.c: New file.
5504 2005-12-27  Roland McGrath  <roland@redhat.com>
5506         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
5507         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
5508         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
5509         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
5510         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
5511         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
5512         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
5513         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
5514         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
5515         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
5516         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
5518 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
5520         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
5521         and __prev field to pthread_mutex_t.
5522         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5523         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5524         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5525         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5526         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
5527         to pthread_mutex_t.
5529 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
5531         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
5532         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
5533         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
5534         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
5535         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
5536         and PTHREAD_MUTEXATTR_FLAG_BITS.
5537         * descr.h (struct pthread): Add robust_list field and define
5538         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
5539         * pthread_mutexattr_getrobust.c: New file.
5540         * pthread_mutexattr_setrobust.c: New file.
5541         * pthread_mutex_consistent.c: New file.
5542         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
5543         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
5544         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
5545         Adjust pthread_mutex_t initializers.
5546         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
5547         field to pthread_mutex_t.
5548         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
5549         and __prev field to pthread_mutex_t.
5550         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
5551         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
5552         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
5553         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
5554         * pthread_mutexattr_gettype.c: Likewise.
5555         * pthread_mutexattr_setpshared.c: Likewise.
5556         * pthread_mutexattr_settype.c: Likewise.
5557         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
5558         Initialize mutex kind according to robust flag.
5559         * pthread_mutex_lock.c: Implement local robust mutex.
5560         * pthread_mutex_timedlock.c: Likewise.
5561         * pthread_mutex_trylock.c: Likewise.
5562         * pthread_mutex_unlock.c: Likewise.
5563         * pthread_create.c (start_thread): Mark robust mutexes which remained
5564         locked as dead.
5565         * tst-robust1.c: New file.
5566         * tst-robust2.c: New file.
5567         * tst-robust3.c: New file.
5568         * tst-robust4.c: New file.
5569         * tst-robust5.c: New file.
5570         * tst-robust6.c: New file.
5571         * tst-robust7.c: New file.
5572         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
5573         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
5574         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
5575         tst-robust5, tst-robust6, and tst-robust7.
5577         * tst-typesizes.c: New file.
5578         * Makefile (tests): Add tst-typesizes.
5580         * tst-once3.c: More debug output.
5582 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
5584         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
5585         missing after last change.
5587         * version.c: Update copyright year.
5589 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
5591         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
5592         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
5593         * pthread_mutex_trylock.c: Likewise.
5594         * pthread_mutex_timedlock.c: Likewise.
5595         * pthread_mutex_unlock.c: Likewise.
5597 2005-12-22  Roland McGrath  <roland@redhat.com>
5599         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
5600         so that #include_next's search location is not reset to the -I..
5601         directory where <nptl/...> can be found.
5603 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
5605         [BZ #1913]
5606         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5607         Fix unwind info.  Remove useless branch prediction prefix.
5608         * tst-cancel24.cc: New file.
5609         * Makefile: Add rules to build and run tst-cancel24.
5611 2005-12-21  Roland McGrath  <roland@redhat.com>
5613         * libc-cancellation.c: Use <> rather than "" #includes.
5614         * pt-cleanup.c: Likewise.
5615         * pthread_create.c: Likewise.
5616         * pthread_join.c: Likewise.
5617         * pthread_timedjoin.c: Likewise.
5618         * pthread_tryjoin.c: Likewise.
5619         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
5620         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
5621         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
5622         * unwind.c: Likewise.
5624 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5626         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
5627         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
5628         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5629         THREAD_COPY_POINTER_GUARD): Define.
5631 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
5633         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
5634         rather than one.
5635         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5636         THREAD_COPY_POINTER_GUARD): Define.
5637         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
5638         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
5639         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5640         THREAD_COPY_POINTER_GUARD): Define.
5641         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
5642         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
5643         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
5644         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
5645         Use PTR_DEMANGLE for B0 if defined.
5647 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
5649         * pthread_create.c (__pthread_create_2_1): Use
5650         THREAD_COPY_POINTER_GUARD if available.
5651         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
5652         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
5653         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
5654         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
5655         * sysdeps/x86_64/tls.h: Likewise.
5657 2005-12-15  Roland McGrath  <roland@redhat.com>
5659         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
5661 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
5663         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
5664         sysdeps/generic.
5665         * errno-loc.c: New file.
5667 2005-12-12  Roland McGrath  <roland@redhat.com>
5669         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
5670         adjustments before choosing stack size.  Update minimum stack size
5671         calculation to match allocate_stack change.
5673 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
5675         * allocatestack.c (allocate_stack): Don't demand that there is an
5676         additional full page available on the stack beside guard, TLS, the
5677         minimum stack.
5679 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
5681         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5682         (__cleanup_fct_attribute): Use __regparm__ not regparm.
5684         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
5685         compiling 32-bit code we must define __cleanup_fct_attribute.
5687 005-11-24  Jakub Jelinek  <jakub@redhat.com>
5689         [BZ #1920]
5690         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
5691         __attribute__ instead of __attribute.
5692         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5693         (__cleanup_fct_attribute): Likewise.
5695 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
5697         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
5698         a write barrier before writing libgcc_s_getcfa.
5700 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
5702         * sysdeps/unix/sysv/linux/configure: Removed.
5704 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
5706         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
5707         optional init_array/fini_array support.
5709 2005-10-24  Roland McGrath  <roland@redhat.com>
5711         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
5712         versioned_symbol use.
5714 2005-10-16  Roland McGrath  <roland@redhat.com>
5716         * init.c (__pthread_initialize_minimal_internal): Even when using a
5717         compile-time default stack size, apply the minimum that allocate_stack
5718         will require, and round up to page size.
5720 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
5722         * Makefile ($(test-modules)): Remove static pattern rule.
5724 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
5725             Ulrich Drepper  <drepper@redhat.com>
5727         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
5728         alignment in callback function.
5729         * Makefile: Add rules to build and run tst-align3.
5730         * tst-align3.c: New file.
5732 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
5734         * allocatestack.c (setxid_signal_thread): Add
5735         INTERNAL_SYSCALL_DECL (err).
5737 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
5739         * allocatestack.c (setxid_signal_thread): Need to use
5740         atomic_compare_and_exchange_bool_acq.
5742 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
5743             Jakub Jelinek  <jakub@redhat.com>
5745         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
5746         CANCEL_RESTMASK.
5747         (struct pthread): Move specific_used field to avoid padding.
5748         Add setxid_futex field.
5749         * init.c (sighandler_setxid): Reset setxid flag and release the
5750         setxid futex.
5751         * allocatestack.c (setxid_signal_thread): New function.  Broken
5752         out of the bodies of the two loops in __nptl_setxid.  For undetached
5753         threads check whether they are exiting and if yes, don't send a signal.
5754         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
5755         * pthread_create.c (start_thread): For undetached threads, check
5756         whether setxid bit is set.  If yes, wait until signal has been
5757         processed.
5759         * allocatestack.c (STACK_VARIABLES): Initialize them.
5760         * pthread_create.c (__pthread_create_2_1): Initialize pd.
5762 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
5764         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
5765         waiters, awake all waiters on the associated mutex.
5767 2005-09-22  Roland McGrath  <roland@redhat.com>
5769         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
5770         ../sysdeps/x86_64/hp-timing.h).
5772 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
5774         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
5775         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5776         (lll_futex_wake_unlock): Define.
5777         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
5778         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5779         (lll_futex_wake_unlock): Define.
5780         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
5781         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5782         (lll_futex_wake_unlock): Define.
5783         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
5784         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5785         (lll_futex_wake_unlock): Define.
5786         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
5787         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5788         (lll_futex_wake_unlock): Define.
5789         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
5790         lll_futex_wake_unlock.
5791         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
5792         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5793         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5794         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
5795         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5796         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5798 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5800         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5801         Fix typo in register name.
5803 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
5805         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5806         Use __sigfillset.  Document that sigfillset does the right thing wrt
5807         to SIGSETXID.
5809 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
5811         [BZ #1102]
5812         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
5813         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
5814         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
5815         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
5816         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
5817         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
5818         in the structure.
5819         * Makefile (tests): Add tst-initializers1.
5820         (CFLAGS-tst-initializers1.c): Set.
5821         * tst-initializers1.c: New test.
5823 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
5825         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
5826         Make sure __flags are located at offset 48 from the start of the
5827         structure.
5829 2005-07-02  Roland McGrath  <roland@redhat.com>
5831         * Makeconfig: Comment fix.
5833 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
5835         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
5836         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
5837         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
5838         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
5839         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5840         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5841         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
5842         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
5843         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
5844         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5846 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
5848         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
5849         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5850         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
5851         fields.
5852         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5853         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
5854         field.  Put in sysinfo field unconditionally.
5855         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5856         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
5857         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5858         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
5859         fields.
5860         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5861         * pthread_create.c (__pthread_create_2_1): Use
5862         THREAD_COPY_STACK_GUARD macro.
5863         * Makefile: Add rules to build and run tst-stackguard1{,-static}
5864         tests.
5865         * tst-stackguard1.c: New file.
5866         * tst-stackguard1-static.c: New file.
5868 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
5870         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5871         Invoke CGOTSETUP and CGOTRESTORE.
5872         (CGOTSETUP, CGOTRESTORE): Define.
5874 2005-05-29  Richard Henderson  <rth@redhat.com>
5876         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
5877         (tf_write, tf_writev): Use it.
5878         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
5879         the system minimum.
5881 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
5883         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5884         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
5885         __librt_*_asynccancel@local.
5887 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
5889         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
5890         all occurrences of JUMPTARGET.  Instead append @local to labels.
5892 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
5894         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
5895         size/alignment of struct pthread rather than tcbhead_t.
5896         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5897         Likewise.
5898         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5899         Likewise.
5900         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
5901         Likewise.
5903 2005-05-19  Richard Henderson  <rth@redhat.com>
5905         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
5906         __sync_val_compare_and_swap, not explicit _si variant.
5907         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
5909 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
5911         [BZ #915]
5912         * sysdeps/pthread/pthread.h: Avoid empty initializers.
5914 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
5916         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
5917         .eh_frame section, use cfi_* directives.
5919 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
5921         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
5922         of "" includes.
5924 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
5926         [BZ #1075]
5927         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
5928         aio_write blocks.
5930 2005-04-27  Roland McGrath  <roland@redhat.com>
5932         * Makefile (tests): Remove tst-clock2.
5934         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
5935         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
5936         translating to the kernel clockid_t for our own process/thread clock.
5938         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
5940 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
5942         * old_pthread_cond_init.c: Include <errno.h>.
5943         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
5944         process shared or uses clock other than CLOCK_REALTIME.
5945         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
5947 2005-04-13  David S. Miller  <davem@davemloft.net>
5949         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
5950         * sysdeps/sparc/sparc64/clone.S: New file.
5952 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
5954         [BZ #1102]
5955         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
5956         __inline instead of inline.
5957         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
5959 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
5961         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
5962         functionally equivalent, but shorter instructions.
5963         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5964         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
5965         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5966         Likewise.
5967         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
5968         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5969         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
5970         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5971         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5972         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
5973         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5974         Likewise.
5975         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5976         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5977         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5978         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
5979         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
5981 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
5983         * sysdeps/mips/Makefile: New file.
5984         * sysdeps/mips/nptl-sysdep.S: New file.
5985         * sysdeps/mips/tcb-offsets.sym: New file.
5986         * sysdeps/mips/pthread_spin_lock.S: New file.
5987         * sysdeps/mips/pthread_spin_trylock.S: New file.
5988         * sysdeps/mips/pthreaddef.h: New file.
5989         * sysdeps/mips/tls.h: New file.
5990         * sysdeps/mips/jmpbuf-unwind.h: New file.
5991         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
5992         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
5993         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
5994         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
5995         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
5996         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
5997         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
5998         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
5999         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
6000         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
6002 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
6004         [BZ #1112]
6005         * pthread_create.c (__pthread_create_2_1): Rename syscall error
6006         variable to scerr.
6008 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
6010         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
6012 2005-02-25  Roland McGrath  <roland@redhat.com>
6014         * alloca_cutoff.c: Correct license text.
6015         * tst-unload.c: Likewise.
6016         * sysdeps/pthread/allocalim.h: Likewise.
6017         * sysdeps/pthread/pt-initfini.c: Likewise.
6018         * sysdeps/pthread/bits/libc-lock.h: Likewise.
6019         * sysdeps/pthread/bits/sigthread.h: Likewise.
6020         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
6021         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
6023 2005-02-16  Roland McGrath  <roland@redhat.com>
6025         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
6026         Use unsigned int * for ptr_nthreads.
6028 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
6030         [BZ #721]
6031         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
6032         gcc4.
6034 2005-02-07  Richard Henderson  <rth@redhat.com>
6036         [BZ #787]
6037         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
6038         argument.
6040 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
6042         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
6043         order of arguments in invocation of atomic_add_zero.
6045 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
6047         [BZ #737]
6048         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
6049         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
6050         at least gotntpoff relocation and addition.
6051         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
6052         Likewise.
6053         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
6054         Likewise.
6055         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
6056         Likewise.
6058 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
6060         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
6061         entry for static tls deallocation fix.
6062         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
6063         also contains information whether the memory pointed to is static
6064         TLS or not.
6065         * sysdeps/i386/tls.h: Likewise.
6066         * sysdeps/ia64/tls.h: Likewise.
6067         * sysdeps/powerpc/tls.h: Likewise.
6068         * sysdeps/s390/tls.h: Likewise.
6069         * sysdeps/sh/tls.h: Likewise.
6070         * sysdeps/sparc/tls.h: Likewise.
6071         * sysdeps/x86_64/tls.h: Likewise.
6073 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
6075         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
6077 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
6079         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
6080         %esp.
6081         * Makefile (tests): Add tst-align2.
6082         * tst-align2.c: New test.
6083         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
6084         -mpreferred-stack-boundary=4.
6086 2004-12-18  Roland McGrath  <roland@redhat.com>
6088         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
6089         New file removed withdrawn for the moment.
6091 2004-12-17  Richard Henderson  <rth@redhat.com>
6093         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
6094         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
6096 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
6098         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
6099         Increased PTHREAD_STACK_MIN.
6101         * tst-context1.c (stacks): Use bigger stack size.
6103 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
6105         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
6106         * sysdeps/sparc/tcb-offsets.sym: Add TID.
6108 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
6110         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
6111         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
6112         * sysdeps/s390/tcb-offsets.sym (TID): Add.
6114 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
6116         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
6118 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
6120         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
6121         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
6123         * tst-getpid1.c: If child crashes, report this first.  Print which
6124         signal.
6126 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
6128         * init.c (__pthread_initialize_minimal_internal): Also unblock
6129         SIGSETXID.
6131 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
6133         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
6134         _POSIX_THREAD_CPUTIME): Define to 0.
6135         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
6136         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
6137         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
6138         __timer_signal_thread_tclk): Remove.
6139         (init_module): Remove their initialization.
6140         (thread_cleanup): Remove their cleanup assertions.
6141         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
6142         __timer_signal_thread_tclk): Remove.
6143         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
6144         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
6145         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
6147 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
6149         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
6150         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
6152         * Makefile (tests): Add tst-getpid2.
6153         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
6154         (do_test): Use it.  Use __clone2 instead of clone on ia64.
6155         * tst-getpid2.c: New test.
6157 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6159         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
6161 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
6163         * Makefile (tests): Add tst-getpid1.
6164         * tst-getpid1.c: New file.
6165         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
6166         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
6168 2004-12-02  Roland McGrath  <roland@redhat.com>
6170         * Makefile (libpthread-nonshared): Variable removed.
6171         ($(objpfx)libpthread_nonshared.a): Target removed.
6172         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
6173         These are now handled by generic magic from
6174         libpthread-static-only-routines being set.
6176 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
6178         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
6179         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
6180         _POSIX_THREAD_PRIO_PROTECT): Define.
6181         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6182         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
6183         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
6185 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
6187         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
6188         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
6189         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
6190         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
6191         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6192         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
6193         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
6195 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
6197         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
6199         * Makefile (libpthread-routines): Add pthread_setschedprio.
6200         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
6201         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
6202         * pthread_setschedprio.c: New file.
6204 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
6206         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
6207         * pthread_cancel.c (pthread_create): Likewise.
6209         * Makefile (libpthread-routines): Add vars.
6210         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
6211         * init.c (__default_stacksize, __is_smp): Remove.
6212         * vars.c: New file.
6213         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
6214         and define a wrapper macro.
6215         (PTHREAD_STATIC_FN_REQUIRE): Define.
6216         * allocatestack.c (__find_thread_by_id): Undefine.
6217         * pthread_create (__pthread_keys): Remove.
6218         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
6219         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
6220         PTHREAD_STATIC_FN_REQUIRE.
6222 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6224         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
6225         parameter to REGISTER macro.
6227 2004-11-17  Roland McGrath  <roland@redhat.com>
6229         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
6230         Make sure SIGCANCEL is blocked as well.
6232 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
6234         * sysdeps/pthread/setxid.h: New file.
6235         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
6236         (struct xid_command): Add forward decl.
6237         (struct pthread_functions): Change return type of __nptl_setxid hook
6238         to int.
6239         * pthreadP.h (__nptl_setxid): Change return type to int.
6240         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
6241         calling thread, return its return value and set errno on failure.
6242         * descr.h (struct xid_command): Change id type to long array.
6244         * Makefile: Add rules to build and test tst-setuid1 and
6245         tst-setuid1-static.
6246         * tst-setuid1.c: New test.
6247         * tst-setuid1-static.c: New test.
6249 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
6251         * Makefile (tests): Add tst-exit3.
6252         * tst-exit3.c: New test.
6254 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
6256         * Makefile (tests): Add tst-exit2.
6257         * tst-exit2.c: New file.
6259 2004-11-09  Roland McGrath  <roland@redhat.com>
6261         [BZ #530]
6262         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
6263         here, before calling clone.
6264         * pthread_create.c (start_thread): Don't do it here.
6266 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
6268         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
6270 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
6272         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
6273         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
6274         assembler warning.
6276 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
6278         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
6279         if sched_priority is not between minprio and maxprio.
6281 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6283         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6284         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
6286         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
6287         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
6289 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
6291         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
6292         not-cancelable I/O functions.
6294 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6296         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
6297         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
6298         make sure 2 is stored in the futex and we looked at the old value.
6299         Fix a few other problems to return the correct value.
6301 2004-10-14  Richard Henderson  <rth@redhat.com>
6303         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
6304         make gcc4 happy.
6306 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
6308         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
6309         of pthread-functions.h and pthreaddef.h.
6310         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
6312         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6313         Change __data.__nwaiters from int to unsigned int.
6315         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
6316         sysconf (_SC_THREAD_CPUTIME) returns negative value.
6318         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
6319         before return type.
6321         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
6322         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
6324 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
6326         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
6327         test fails, remove message queue.
6328         (tf_msgsnd): Likewise.
6330 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
6332         * tst-clock1.c: Change #ifdef to #if defined.
6333         * tst-clock2.c: Likewise.
6334         * tst-cond11.c: Likewise.
6336         * sysdeps/pthread/timer_create.c (timer_create): Use
6337         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
6338         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
6339         THREAD_CPUTIME.
6341 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
6343         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
6344         _POSIX_THREAD_CPUTIME): Define to 0.
6346 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
6348         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
6349         and _POSIX_THREAD_CPUTIME to zero.
6350         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
6351         * tst-barrier2.c: Fix testing for POSIX feature.
6352         * tst-clock1.c: Likewise.
6353         * tst-clock2.c: Likewise.
6354         * tst-cond11.c: Likewise.
6355         * tst-cond4.c: Likewise.
6356         * tst-cond6.c: Likewise.
6357         * tst-flock2.c: Likewise.
6358         * tst-mutex4.c: Likewise.
6359         * tst-mutex9.c: Likewise.
6360         * tst-rwlock12.c: Likewise.
6361         * tst-rwlock4.c: Likewise.
6362         * tst-signal1.c: Likewise.
6363         * tst-spin2.c: Likewise.
6364         * sysdeps/pthread/posix-timer.h: Likewise.
6365         * sysdeps/pthread/timer_create.c: Likewise.
6366         * sysdeps/pthread/timer_routines.c: Likewise.
6368 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
6370         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6371         (__lll_mutex_timedlock_wait): Address futex correctly.
6373         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6374         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
6375         make sure 2 is stored in the futex and we looked at the old value.
6376         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6377         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
6378         which might very well made the code not working at all before.
6379         [BZ #417]
6381 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
6383         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
6384         allow SIGSETXID to be sent.
6385         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
6386         for SIGSETXID to be defined.
6387         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
6388         SIGSETXID cannot be blocked.
6390         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6391         Add __extension__ to long long types.
6392         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6393         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6394         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6395         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6396         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
6397         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6398         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6400 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
6402         * descr.h (struct pthread): Add stopped_start field.
6403         * sysdeps/pthread/createthread.c (create_thread): Set
6404         start_stopped flag in descriptor for new thread appropriately.
6405         * pthread_create.c (start_thread): Only take lock to be stopped on
6406         startup if stopped_start flag says so.
6408 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
6410         * pthread_create.c (__pthread_create_2_1): Remember whether thread
6411         is created detached and if yes, do not try to free the stack in case
6412         the thread creation failed.
6413         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
6414         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
6415         case there has been no error.  [BZ #405]
6417         * pthread_create.c (start_thread): Don't wait for scheduler data
6418         etc to be set at the beginning of the function.  The cancellation
6419         infrastructure must have been set up.  And enable async
6420         cancellation before potentially going to sleep.  [BZ #401]
6422 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
6424         * Versions: Remove exports for pthread_set*id_np functions.
6425         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
6426         for now.
6427         * Makefile: Don't build pthread_set*id code for now.
6429 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
6431         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
6432         internal use.
6433         * allocatestack.c (__nptl_setxid): New function.
6434         * descr.h (struct xid_command): Define type.
6435         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
6436         (sighandler_setxid): New function.
6437         (__pthread_initialize_minimal): Register sighandler_setxid for
6438         SIGCANCEL.
6439         * pt-allocrtsig.c: Update comment.
6440         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
6441         Declare __nptl_setxid.
6442         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
6443         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
6444         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
6445         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
6446         and pthread_setresuid_np.
6447         * pthread_setgid_np.c: New file.
6448         * pthread_setuid_np.c: New file.
6449         * pthread_setegid_np.c: New file.
6450         * pthread_seteuid_np.c: New file.
6451         * pthread_setregid_np.c: New file.
6452         * pthread_setreuid_np.c: New file.
6453         * pthread_setresgid_np.c: New file.
6454         * pthread_setresuid_np.c: New file.
6455         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
6456         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
6457         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
6458         and pthread_setresuid_np.
6459         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
6460         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
6461         pthread_setregid, and pthread_setresgid.
6463 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
6465         * allocatestack.c (allocate_stack): Return EAGAIN instead of
6466         ENOMEM when out of memory.
6468 2004-09-10  Roland McGrath  <roland@redhat.com>
6470         [BZ #379]
6471         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
6472         code, since we don't try to use the broken CLONE_STOPPED any more.
6473         * pthread_create.c (start_thread): Likewise.
6475 2004-09-15  Richard Henderson  <rth@redhat.com>
6477         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
6479 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
6481         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
6482         (__libc_unwind_longjmp): Delete macro and declare as function.
6483         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
6484         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
6485         nptl directory.
6486         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
6487         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
6488         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
6490 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
6492         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
6493         for __USE_XOPEN2K.
6494         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
6495         types also for __USE_XOPEN2K.
6496         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6497         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6498         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6499         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6500         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6501         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6502         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6503         [BZ #320]
6505 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
6507         * sysdeps/pthread/pthread.h
6508         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
6509         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
6510         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
6511         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
6512         [BZ #375]
6514 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
6516         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
6517         PSEUDO to be used with . prefix.
6519         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
6520         Use atomic_increment instead of atomic_exchange_and_add.
6521         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
6522         Likewise.
6523         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
6524         Likewise.
6525         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
6526         Likewise.
6528         * allocatestack.c (allocate_stack): Use atomic_increment_val
6529         instead of atomic_exchange_and_add.
6530         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
6531         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
6532         Likewise.
6533         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6534         Likewise.
6536         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
6537         the initialization function might throw.
6539 2005-09-05  Richard Henderson  <rth@redhat.com>
6541         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
6542         Move definition inside libpthread, libc, librt check.  Provide
6543         definition for rtld.
6545 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
6547         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
6548         * sysdeps/i386/jmpbuf-unwind.h: Likewise
6549         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
6550         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
6551         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
6552         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
6553         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
6554         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
6555         * unwind.c: Use it.
6557         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6558         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
6559         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6560         Likewise.
6561         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
6562         Decrement __nwaiters.  If pthread_cond_destroy has been called and
6563         this is the last waiter, signal pthread_cond_destroy caller and
6564         avoid using the pthread_cond_t structure after unlock.
6565         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6566         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6567         Read clock type from the least significant bits of __nwaiters instead
6568         of __clock.
6569         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6570         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
6572 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
6574         [BZ #342]
6575         * Makefile (tests): Add tst-cond20 and tst-cond21.
6576         * tst-cond20.c: New test.
6577         * tst-cond21.c: New test.
6578         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
6579         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
6580         it unsigned int.
6581         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6582         Likewise.
6583         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6584         (pthread_cond_t): Likewise.
6585         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6586         Likewise.
6587         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6588         Likewise.
6589         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6590         Likewise.
6591         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
6592         (cond_nwaiters): New.
6593         (clock_bits): New.
6594         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
6595         if there are waiters not signalled yet.
6596         Wait until all already signalled waiters wake up.
6597         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
6598         __nwaiters.  If pthread_cond_destroy has been called and this is the
6599         last waiter, signal pthread_cond_destroy caller and avoid using
6600         the pthread_cond_t structure after unlock.
6601         (__pthread_cond_wait): Increment __nwaiters in the beginning,
6602         decrement it when leaving.  If pthread_cond_destroy has been called
6603         and this is the last waiter, signal pthread_cond_destroy caller.
6604         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6605         Likewise.  Read clock type from the least significant bits of
6606         __nwaiters instead of __clock.
6607         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
6608         whether clock ID can be encoded in COND_CLOCK_BITS bits.
6609         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
6610         clock type just from the last COND_CLOCK_BITS bits of value.
6611         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
6612         instead of __clock, just from second bit of condattr's value.
6614 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
6616         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
6617         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
6618         != 64.
6619         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6621 2004-08-15  Roland McGrath  <roland@frob.com>
6623         * pthread_atfork.c: Update copyright terms including special exception
6624         for these trivial files, which are statically linked into executables
6625         that use dynamic linking for the significant library code.
6627 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
6629         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
6630         pthread_rwlock_rdlock.
6631         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
6632         Decrease __nr_readers_queued after reacquiring lock.
6633         * sysdeps/pthread/pthread_rwlock_timedrdlock
6634         (pthread_rwlock_timedrdlock): Likewise.
6635         Reported by Bob Cook <bobcook47@hotmail.com>.
6637 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
6639         * tst-rwlock14.c (tf): Read main thread handle from *ARG
6640         before pthread_barrier_wait.
6642 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
6644         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
6645         Remove unnecessary exception handling data.
6647 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
6649         [BZ #284]
6650         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
6651         instead of clockid_t.
6653 2004-07-21  Roland McGrath  <roland@redhat.com>
6655         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
6657 2004-07-19  Roland McGrath  <roland@redhat.com>
6659         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
6661 2004-07-02  Roland McGrath  <roland@redhat.com>
6663         * configure: Don't exit.
6665 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6667         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6668         (__pthread_cond_timedwait): Check for invalid nanosecond in
6669         timeout value.
6671 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
6673         * Makefile: Add rules to build and run tst-fini1.
6674         * tst-fini1.c: New file.
6675         * tst-fini1mod.c: New file.
6677 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
6679         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
6680         if no cancellation support is needed.
6681         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6682         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6683         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6684         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6685         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6686         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6687         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6688         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
6689         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
6691         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
6692         only if not already defined.
6694 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
6696         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
6697         constraint "m" instead of "0" for futex.
6699         * shlib-versions: Add powerpc64-.*-linux.*.
6701 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
6703         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
6704         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
6705         for valid tv_nsec.
6706         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
6707         1 billion and 64-bit tv_nsec which is valid when truncated to 32
6708         bits.
6710 2004-06-29  Roland McGrath  <roland@redhat.com>
6712         * Banner: NPTL no longer has its own version number.
6713         * Makefile (nptl-version): Variable removed.
6714         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
6715         using $(version), the glibc version number.
6717 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6719         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6720         Fix branch offset for a PLT entry.
6721         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
6722         Likewise.
6723         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
6724         Likewise.
6725         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
6726         Likewise.
6727         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
6728         Likewise.
6730 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
6732         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
6733         unconditionally.
6735 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
6737         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
6738         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
6739         instead of tv_sec.
6740         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
6741         (pthread_rwlock_timedrdlock): Likewise.
6743 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
6745         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6746         Set __r7 to val, not mutex.
6748 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
6750         * Makefile: Add rules to build tst-rwlock14.
6751         * tst-rwlock14.c: New file.
6753 2004-06-24  Boris Hu  <boris.hu@intel.com>
6755         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
6756         check.
6757         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6759 2004-06-19  Andreas Jaeger  <aj@suse.de>
6761         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
6762         assembler in last patch.
6764 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
6766         * sysdeps/pthread/pthread_cond_timedwait.c
6767         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
6768         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6769         (__pthread_cond_timedwait): Check for invalid nanosecond in
6770         timeout value.
6771         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6772         * tst-cond19.c: New file.
6773         * Makefile: Add rules to build and run tst-cond19.
6775 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
6777         * tst-context1.c (GUARD_PATTERN): Defined.
6778         (tst_context_t): Define struct containing ucontext_t & guard words.
6779         (ctx): Declare as an array of tst_context_t.
6780         (fct): Verify uc_link & guard words are still valid.
6781         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
6783 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6785         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6786         Add __data.__futex field, reshuffle __data.__clock.
6787         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
6788         (__pthread_cond_signal): Increment __futex at the same time as
6789         __wakeup_seq or __total_seq.  Pass address of __futex instead of
6790         address of low 32-bits of __wakeup_seq to futex syscall.
6791         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6792         (__pthread_cond_wait): Likewise.  Pass __futex value from before
6793         releasing internal lock to FUTEX_WAIT.
6794         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6795         (__pthread_cond_timedwait): Likewise.
6796         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6797         (FUTEX_CMP_REQUEUE): Define.
6798         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6799         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6800         Pass __futex value from before the unlock and __futex address instead
6801         of address of low 32-bits of __wakeup_seq to futex syscall.
6802         Fallback to FUTEX_WAKE all on any errors.
6804 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
6806         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
6807         comment typo.
6808         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
6809         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
6810         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
6811         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
6812         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
6814 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
6816         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
6817         Add memory clobber to inline assembly.
6818         (__lll_mutex_trylock): Likewise.
6819         (__lll_mutex_cond_trylock): Likewise.
6821 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
6823         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6824         Pass val argument as 6th system call argument in %r7.
6826 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
6828         * Makefile (tests): Add tst-cond16.
6829         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
6830         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
6831         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6832         Add __data.__futex field, reshuffle __data.__clock.
6833         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
6834         (__pthread_cond_signal): Increment __futex at the same time as
6835         __wakeup_seq or __total_seq.  Pass address of __futex instead of
6836         address of low 32-bits of __wakeup_seq to futex syscall.
6837         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
6838         (__pthread_cond_wait): Likewise.  Pass __futex value from before
6839         releasing internal lock to FUTEX_WAIT.
6840         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
6841         (__pthread_cond_timedwait): Likewise.
6842         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
6843         (FUTEX_CMP_REQUEUE): Define.
6844         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6845         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6846         Pass __futex value from before the unlock and __futex address instead
6847         of address of low 32-bits of __wakeup_seq to futex syscall.
6848         Fallback to FUTEX_WAKE all on any errors.
6849         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
6850         Define.
6851         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6852         internally.  Return non-zero if error, zero if success.
6853         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6854         Add __data.__futex field, reshuffle __data.__clock.
6855         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
6856         Define.
6857         (lll_futex_requeue): Add val argument, return 1 unconditionally
6858         for the time being.
6859         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6860         Add __data.__futex field, reshuffle __data.__clock.
6861         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6862         Define.
6863         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6864         internally.  Return non-zero if error, zero if success.
6865         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6866         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
6867         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
6868         Define.
6869         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6870         internally.  Return non-zero if error, zero if success.
6871         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6872         Add __data.__futex field, reshuffle __data.__clock.
6873         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
6874         Define.
6875         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
6876         internally.  Return non-zero if error, zero if success.
6877         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6878         Add __data.__futex field, reshuffle __data.__clock.
6879         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6880         Add __data.__futex field, reshuffle __data.__clock.
6881         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
6882         Increment __futex at the same time as __wakeup_seq or __total_seq.
6883         Pass address of __futex instead of address of low 32-bits of
6884         __wakeup_seq to futex syscall.
6885         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
6886         Pass __futex value from before releasing internal lock
6887         to FUTEX_WAIT.
6888         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6889         Likewise.  Avoid unnecessary shadowing of variables.
6890         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
6891         Set __futex to 2 * __total_seq.  Pass __futex value from before the
6892         unlock and __futex address instead of address of low 32-bits of
6893         __wakeup_seq to futex_requeue macro, adjust for new return value
6894         meaning.
6895         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
6896         (__pthread_cond_signal): Increment __futex at the same time as
6897         __wakeup_seq or __total_seq.  Pass address of __futex instead of
6898         address of low 32-bits of __wakeup_seq to futex syscall.
6899         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
6900         (__pthread_cond_wait): Likewise.  Pass __futex value from before
6901         releasing internal lock to FUTEX_WAIT.
6902         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6903         (__pthread_cond_timedwait): Likewise.
6904         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6905         (FUTEX_CMP_REQUEUE): Define.
6906         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6907         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6908         Pass __futex value from before the unlock and __futex address instead
6909         of address of low 32-bits of __wakeup_seq to futex syscall.
6910         Fallback to FUTEX_WAKE all on any errors.
6912 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6914         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
6915         Add nop to align the end of critical section.
6916         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
6918 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6920         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6921         Add __broadcast_seq field.
6922         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
6923         all waiters as woken with woken_seq and bump broadcast counter.
6924         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
6925         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
6926         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6927         Comment typo fixes.  Avoid returning -ETIMEDOUT.
6929 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
6931         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6932         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
6933         Reported by Kaz Kojima.
6935 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
6937         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
6939 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
6941         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
6942         __broadcast_seq with bc_seq after acquiring internal lock instead of
6943         before it.
6945 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
6947         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
6948         compilation.
6949         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6950         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
6951         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6952         (pthread_cond_t): Add __data.__broadcast_seq field.
6953         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
6954         (FRAME_SIZE): Define.
6955         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
6956         Comment typo fixes.
6957         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
6958         Define.
6959         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
6960         typo fixes.
6961         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
6962         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
6963         fixes.
6965 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
6967         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
6968         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
6969         Add __broadcast_seq field.
6970         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6971         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6972         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6973         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6974         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6975         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
6976         all waiters as woken with woken_seq and bump broadcast counter.
6977         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
6978         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
6979         __broadcast_seq field.
6980         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6981         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6982         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
6983         * pthread_cond_init.c: Initialize __broadcast_seq field.
6984         * Makefile (tests): Add tst-cond17 and tst-cond18.
6985         Add .NOTPARALLEL goal.
6986         * tst-cond16.c: New file.  From Jakub.
6987         * tst-cond17.c: New file.  From Jakub.
6988         * tst-cond18.c: New file.  From Jakub.
6990 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
6992         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
6993         unwind info.
6995         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
6996         Parametrize frame size.  Correct some unwind info.
6997         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6999 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
7001         * tst-stack3.c: Note testing functionality beyond POSIX.
7003 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
7005         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
7006         Change conditional from ifdef to if.
7008 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
7010         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
7011         SYSDEP_CANCEL_ERROR): Define.
7012         (PSEUDO): Use it.
7014 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
7016         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
7018 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
7020         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
7022 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7024         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
7025         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
7026         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
7027         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
7029 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
7031         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
7032         thread has all signals blocked.
7034 2004-04-18  Andreas Jaeger  <aj@suse.de>
7036         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
7037         (SEM_VALUE_MAX): Add missing brace.
7039 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
7041         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
7042         in rt subdir.
7043         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
7044         * sysdeps/pthread/tst-mqueue8x.c: New test.
7045         * tst-cancel4.c: Update comment about message queues.
7047         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
7048         return it_value { 0, 0 }.
7049         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
7050         like SIGEV_SIGNAL.
7051         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
7052         assertion for SIGEV_NONE.
7053         (thread_attr_compare): Compare all attributes, not just a partial
7054         subset.
7056 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
7058         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
7060 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
7062         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
7063         Just use a plain number.
7064         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
7065         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
7066         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
7067         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
7068         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
7069         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
7070         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
7072 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7074         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
7075         frame info.
7076         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7078 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
7080         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
7081         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
7082         of calling sigwaitinfo.
7084 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
7086         * allocatestack.c (allocate_stack): Set reported_guardsize
7087         unconditionally.
7088         * pthread_getattr_np.c (pthread_getattr_np): Use
7089         reported_guardsize instead of guardsize.
7090         * descr.h (struct pthread): Add reported_guardsize field.
7092 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
7094         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
7096 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
7098         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
7100 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
7102         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
7103         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
7104         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
7105         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
7106         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
7107         Define.
7108         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
7109         (_POSIX_MESSAGE_PASSING): Define.
7110         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
7111         (_POSIX_MESSAGE_PASSING): Define.
7112         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
7113         (_POSIX_MESSAGE_PASSING): Define.
7115 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
7117         * tst-context1.c (fct): Check whether correct stack is used.
7119 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
7121         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
7122         matching constraints for asm mem parameters.
7124         * tst-clock2.c (tf): Don't define unless needed.
7126 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
7128         * Makefile (link-libc-static): Use $(static-gnulib) instead of
7129         $(gnulib).
7131 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
7133         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
7134         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
7135         * pthreadP.h: Declare __nptl_deallocate_tsd.
7136         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
7137         Adjust caller.
7139         * Makefile (tests): Add tst-tsd5.
7140         * tst-tsd5.c: New file.
7142 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
7144         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
7145         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
7146         is SHLIB_COMPAT check.
7147         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
7148         (__pthread_attr_getaffinity_old): Likewise.
7149         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7150         (__pthread_getaffinity_old): Likewise.
7151         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
7152         (__pthread_setaffinity_old): Likewise.
7154 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
7156         * allocatestack.c (_make_stacks_executable): Call
7157         _dl_make_stack_executable first.
7159 2004-03-24  Roland McGrath  <roland@redhat.com>
7161         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
7162         constraint instead of "0".
7164 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
7166         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7167         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
7169         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
7170         code to avoid warning.
7172 2004-03-24  Andreas Jaeger  <aj@suse.de>
7174         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
7175         (__pthread_attr_setaffinity_old): Remove const.
7177 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
7179         * sysdeps/unix/sysv/linux/smp.h: New file.
7180         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
7181         * init.c: Define __is_smp.
7182         (__pthread_initialize_minimal_internal): Call is_smp_system to
7183         initialize __is_smp.
7184         * pthreadP.h: Declare __is_smp.
7185         Define MAX_ADAPTIVE_COUNT is necessary.
7186         * pthread_mutex_init.c: Add comment regarding __spins field.
7187         * pthread_mutex_lock.c: Implement adaptive mutex type.
7188         * pthread_mutex_timedlock.c: Likewise.
7189         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
7190         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
7191         Add __spins field.
7192         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7193         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7194         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7195         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7196         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7197         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7198         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7199         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
7200         lll_mutex_cond_trylock.
7201         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7202         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7203         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7204         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7205         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7206         Define BUSY_WAIT_NOP.
7207         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7208         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7210         * tst-mutex5.c: Add support for testing adaptive mutexes.
7211         * tst-mutex7.c: Likewise.
7212         * tst-mutex5a.c: New file.
7213         * tst-mutex7a.c: New file.
7214         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
7216         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
7217         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
7218         vgettimeofday call might destroy the content.
7220         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
7221         @pause in the loop.
7223         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
7224         No need to restrict type of ret.  Make it int.  Add comment.
7226         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
7227         Remove unnecessary setne instruction.
7229 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
7231         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7232         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
7233         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
7234         If realloc fails, break out of the loop.
7236 2004-03-20  Andreas Jaeger  <aj@suse.de>
7238         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
7239         (__pthread_setaffinity_old): Fix interface.
7240         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7241         (__pthread_getaffinity_old): Likewise.
7243         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
7244         (__pthread_setaffinity_new): Remove duplicate declaration.
7246 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7248         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
7249         the return value to a safe register.
7250         (CDISABLE): Set the function argument correctly.
7252 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7254         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
7255         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
7256         Rewrite so that only one locked memory operation per round is needed.
7257         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
7258         (pthread_barrier_wait): After wakeup, release lock only when the
7259         last thread stopped using the barrier object.
7260         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
7261         (__pthread_cond_wait): Don't store mutex address if the current
7262         value is ~0l.  Add correct cleanup support and unwind info.
7263         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7264         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
7265         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
7266         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
7267         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
7268         Add correct cleanup support and unwind info.
7269         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
7270         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
7271         information for syscall wrappers.
7273 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
7275         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
7276         cpusetsize field, remove next.
7277         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
7278         parameter for size of the CPU set.
7279         (pthread_setaffinity_np): Likewise.
7280         (pthread_attr_getaffinity_np): Likewise.
7281         (pthread_attr_setaffinity_np): Likewise.
7282         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
7283         interface change, keep compatibility code.
7284         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
7285         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
7286         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
7287         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
7288         __pthread_getaffinity_np.
7289         * Versions: Add version for changed interfaces.
7290         * tst-attr3.c: Adjust test for interface change.
7291         * pthread_getattr_np.c: Query the kernel about the affinity mask with
7292         increasing buffer sizes.
7293         * pthread_attr_destroy.c: Remove unused list handling.
7294         * pthread_attr_init.c: Likewise.
7296 2004-03-17  Roland McGrath  <roland@redhat.com>
7298         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
7299         first argument to clock_getres so we ever enable kernel timers.
7301 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
7303         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
7305 2004-03-12  Richard Henderson  <rth@redhat.com>
7307         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
7308         oldvalue from CENABLE to CDISABLE.
7310 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
7312         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
7313         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
7314         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
7315         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
7317 2004-03-11  Richard Henderson  <rth@redhat.com>
7319         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
7320         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
7321         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
7323 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
7325         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
7326         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
7327         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
7329 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
7331         * forward.c (__pthread_cond_broadcast_2_0,
7332         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
7333         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
7334         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
7336 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7338         * sysdeps/sh/tcb-offsets.sym: Add PID.
7339         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
7340         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
7342 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
7344         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
7345         include <sysdep-cancel.h>, vfork is no cancellation point.
7346         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
7347         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
7348         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
7350 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
7352         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
7353         libc_hidden_def.
7354         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
7355         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
7356         Likewise.
7357         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
7358         Likewise.
7359         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
7360         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
7361         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
7362         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
7363         of DO_CALL_VIA_BREAK.  Work around a gas problem.
7365         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
7366         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
7367         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
7368         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
7369         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
7370         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
7372         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
7373         a local register for saving old PID.  Negate PID in parent upon exit.
7375         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
7376         tcb-offsets.h.
7377         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
7378         before syscall, set to the old value in the parent afterwards.
7379         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
7380         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
7381         tcb-offsets.h.
7382         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
7383         before syscall, set to the old value in the parent afterwards.
7384         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
7385         * sysdeps/s390/tcb-offsets.sym: Add PID.
7387         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
7388         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
7389         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
7390         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
7391         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
7392         * sysdeps/sparc/tcb-offsets.sym: Add PID.
7394 2004-03-10  Andreas Schwab  <schwab@suse.de>
7396         * sysdeps/ia64/tcb-offsets.sym: Add PID.
7397         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
7398         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
7400 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
7402         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
7403         * tst-cancel21.c (do_one_test): Likewise.
7404         Reported by Gordon Jin <gordon.jin@intel.com>.
7406 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
7408         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
7409         if non-zero and set to INT_MIN if zero.
7410         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
7411         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
7412         (SAVE_PID, RESTORE_PID): Define.
7413         (__vfork): Use it.
7414         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
7415         Use relative path to avoid including NPTL i386/vfork.S.
7416         (SAVE_PID, RESTORE_PID): Define.
7417         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
7418         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
7419         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
7420         tst-vfork2x.
7421         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
7422         * tst-vfork1.c: New test.
7423         * tst-vfork2.c: New test.
7424         * tst-vfork1x.c: New test.
7425         * tst-vfork2x.c: New test.
7427 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
7429         * sysdeps/i386/tcb-offsets.sym: Add PID.
7430         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7431         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
7432         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
7434 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
7436         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
7438 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
7440         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
7441         _rtld_global_ro.
7443 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
7445         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
7446         _rtld_global_ro.
7448         * tst-once4.c: Remove unnecessary macro definition.
7450         * tst-mutex7.c (do_test): Limit thread stack size.
7451         * tst-once2.c (do_test): Likewise.
7452         * tst-tls3.c (do_test): Likewise.
7453         * tst-tls1.c (do_test): Likewise.
7454         * tst-signal3.c (do_test): Likewise.
7455         * tst-kill6.c (do_test): Likewise.
7456         * tst-key4.c (do_test): Likewise.
7457         * tst-join4.c (do_test): Likewise.
7458         * tst-fork1.c (do_test): Likewise.
7459         * tst-context1.c (do_test): Likewise.
7460         * tst-cond2.c (do_test): Likewise.
7461         * tst-cond10.c (do_test): Likewise.
7462         * tst-clock2.c (do_test): Likewise.
7463         * tst-cancel10.c (do_test): Likewise.
7464         * tst-basic2.c (do_test): Likewise.
7465         * tst-barrier4.c (do_test): Likewise.
7467 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
7469         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
7471 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
7473         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7474         (__pthread_cond_timedwait): Optimize wakeup test.
7475         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7476         (__pthread_cond_wait): Likewise.
7477         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
7478         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7479         Likewise.
7481 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
7483         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7484         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
7485         the atomic instruction needed.
7486         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
7487         (__lll_mutex_lock_wait): Likewise.
7489 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
7491         * Makefile (tests): Add tst-cond14 and tst-cond15.
7492         * tst-cond14.c: New file.
7493         * tst-cond15.c: New file.
7495 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
7497         * sysdeps/pthread/createthread.c (create_thread): Remove use of
7498         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
7499         needs to be implemented differently to be useful.
7501 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
7503         * pthread_attr_setschedparam.c: Don't test priority against limits
7504         here.  Set ATTR_FLAG_SCHED_SET flag.
7505         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
7506         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
7507         from parent thread to child.  If attribute is used and scheduling
7508         parameters are not inherited, copy parameters from attribute or
7509         compute them.  Check priority value.
7510         * pthread_getschedparam.c: If the parameters aren't known yet get
7511         them from the kernel.
7512         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
7513         ATTR_FLAG_POLICY_SET flag for thread.
7514         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
7515         and ATTR_FLAG_POLICY_SET.
7517         * sysdeps/pthread/createthread.c: Use tgkill if possible.
7519         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
7520         fail if stack address hasn't been set.  Just return 0.
7522 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
7524         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
7525         libpthread for the files in this list.
7526         (CFLAGS-tst-unload): Removed.
7527         * tst-unload.c (do_test): Don't use complete path for
7528         LIBPHREAD_SO.
7530         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
7531         tst-_res1mod2.
7533 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
7535         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7536         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
7537         operation per round is needed.
7538         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
7539         (__lll_mutex_lock_wait): Likewise.
7541 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
7543         * tst-cancel9.c (cleanup): Don't print to stderr.
7545 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7547         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
7549 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
7551         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
7552         (__syscall_error_handler2): Call CDISABLE.
7553         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
7554         (__syscall_error_handler2): Call CDISABLE.
7556         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7557         Release lock before the loop, don't reacquire it.
7559         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
7561 2004-02-19  Andreas Schwab  <schwab@suse.de>
7563         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7564         Fix last change.
7566 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
7568         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
7569         (pthread_barrier_wait): After wakeup, release lock only when the
7570         last thread stopped using the barrier object.
7571         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
7572         (pthread_barrier_wait): Likewise.
7573         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7574         Likewise.
7575         * Makefile (tests): Add tst-barrier4.
7576         * tst-barrier4.c: New file.
7578         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7579         (__pthread_cond_timedwait): Perform timeout test while holding
7580         internal lock to prevent wakeup race.
7581         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
7582         * sysdeps/pthread/pthread_cond_timedwait.c
7583         (__pthread_cond_timedwait): Likewise.
7584         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7585         (__pthread_cond_timedwait): Likewise.
7587 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
7589         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
7590         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
7591         * Makefile (tests): Add tst-rwlock13.
7592         * tst-rwlock13.c: New test.
7594 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
7596         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7597         (__condvar_tw_cleanup): Little optimization.
7598         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
7600 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
7602         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
7603         libpthread as "lib" parameter to SHLIB_COMPAT.
7604         (__novmx_siglongjmp): Fix typo in function name.
7605         (__novmx_longjmp): Fix typo in function name.
7607 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
7609         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
7610         __builtin_expect.
7612         * sysdeps/generic/pt-longjmp.c: Moved to...
7613         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
7615 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
7617         * Makefile (libpthread-routines): Add pt-cleanup.
7618         * pt-longjmp.c: Removed.
7619         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
7620         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
7621         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
7622         Version longjmp, siglongjmp for GLIBC_2.3.4.
7623         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
7625 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
7627         * sysdeps/pthread/pthread_cond_timedwait.c
7628         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
7629         Reuse code.  Add __builtin_expects.
7631         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7632         (__pthread_cond_timedwait): Get internal lock in case timeout has
7633         passed before the futex syscall.
7634         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7636 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
7638         * allocatestack.c: Pretty printing.
7640         * sysdeps/pthread/createthread.c (create_thread): Don't add
7641         CLONE_DETACHED bit if it is not necessary.
7643 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
7645         * pthread_getattr_np.c: Include ldsodefs.h.
7647 2004-01-16  Richard Henderson  <rth@redhat.com>
7649         * allocatestack.c: Don't declare __libc_stack_end.
7650         * init.c (__pthread_initialize_minimal_internal): Likewise.
7651         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
7653 2004-01-15  Richard Henderson  <rth@redhat.com>
7655         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
7656         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
7657         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
7658         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
7659         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
7660         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
7661         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
7662         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
7664 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
7666         * init.c (pthread_functions): Make array const.
7668 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
7670         * allocatestack.c (__make_stacks_executable): Change interface.
7671         Check parameters.  Pass parameter on to libc counterpart.
7672         * pthreadP.h: Change declaration.
7674 2004-01-13  Richard Henderson  <rth@redhat.com>
7676         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
7677         prototype form.
7678         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
7679         Likewise.
7681         * sysdeps/alpha/Makefile: New file.
7682         * sysdeps/alpha/tcb-offsets.sym: New file.
7683         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
7684         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
7686         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
7687         on powerpc version.
7689 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
7691         * Makefile (tests): Add tst-backtrace1.
7692         * tst-backtrace1.c: New test.
7694 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
7696         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
7697         register as second parameter to the REGISTER macro.
7698         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
7699         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
7700         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
7701         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
7702         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
7703         of thread register as second parameter to REGISTER macro in 64 case.
7705 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
7707         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
7708         (CFLAGS-getpid.o): Defined.
7709         (CFLAGS-getpid.os): Defined.
7711 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
7713         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
7714         returned for main thread does not overlap with any other VMA.
7715         Patch by Jakub Jelinek.
7717 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
7719         * tst-raise1.c: Include stdio.h.
7721 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
7723         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
7724         setting with __ASSUME_TGKILL || defined __NR_tgkill.
7725         If pid is 0, set it to selftid.
7726         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
7727         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
7728         != 0, return self->tid without doing a syscall.
7729         * descr.h (struct pthread): Move pid field after tid.
7731         * Makefile (tests): Add tst-raise1.
7732         * tst-raise1.c: New file.
7734 2003-12-23  Roland McGrath  <roland@redhat.com>
7736         * tst-oddstacklimit.c: New file.
7737         * Makefile (tests): Add it.
7738         (tst-oddstacklimit-ENV): New variable.
7740         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
7741         value up to page size for __default_stacksize.
7743 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
7745         * Makefile (tests): Add tst-eintr5.
7746         * tst-eintr5.c: New file.
7748         * eintr.c (eintr_source): Prevent sending signal to self.
7750         * tst-eintr2.c (tf1): Improve error message.
7752 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
7754         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
7755         * sysdeps/unix/sysv/linux/getpid.c: New file.
7756         * pthread_cancel.c: Add comment explaining use of PID field.
7757         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
7758         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
7759         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
7760         temporarily to signal the field must not be relied on and updated
7761         by getpid().
7762         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
7763         temporarily negative.
7764         * sysdeps/unix/sysv/linux/raise.c: Likewise.
7766 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
7768         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
7769         (eintr_source): If ARG != NULL, use pthread_kill.
7770         * tst-eintr1.c: Adjust for this change.
7771         * tst-eintr2.c: Likewise.
7772         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
7773         * tst-eintr3.c: New file.
7774         * tst-eintr4.c: New file.
7776 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
7778         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
7779         if CANCELSTATE_BITMASK is set.
7780         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
7781         Likewise.
7783         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
7784         (tests-reverse): Add tst-cancel23.
7785         * tst-cancel22.c: New test.
7786         * tst-cancel23.c: New test.
7788 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
7790         * tst-eintr1.c: Better error messages.
7792         * Makefile (tests): Add tst-eintr2.
7793         * tst-eintr2.c: New file.
7795 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
7797         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
7798         (CFLAGS-tst-cancelx21.c): Set.
7799         * tst-cancel21.c: New test.
7800         * tst-cancelx21.c: New test.
7802         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
7803         comparison operand.
7804         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
7805         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
7806         * pt-longjmp.c: Include jmpbuf-unwind.h.
7807         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
7808         _JMPBUF_UNWINDS.  Adjust compared pointers.
7809         * init.c (__pthread_initialize_minimal_internal): Initialize
7810         pd->stackblock_size.
7811         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
7812         * sysdeps/alpha/jmpbuf-unwind.h: New file.
7813         * sysdeps/i386/jmpbuf-unwind.h: New file.
7814         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
7815         * sysdeps/s390/jmpbuf-unwind.h: New file.
7816         * sysdeps/sh/jmpbuf-unwind.h: New file.
7817         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
7818         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
7819         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
7820         (_JMPBUF_CFA_UNWINDS): Remove.
7821         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
7823 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
7825         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
7826         (CFLAGS-tst-cancelx20.c): Set.
7827         * tst-cancel20.c: New test.
7828         * tst-cancelx20.c: New test.
7830 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
7832         * init.c (__pthread_initialize_minimal_internal): Don't treat
7833         architectures with separate register stack special here when
7834         computing default stack size.
7836 2003-12-17  Roland McGrath  <roland@redhat.com>
7838         * Makefile (tst-cancelx7-ARGS): New variable.
7839         Reportd by Greg Schafer <gschafer@zip.com.au>.
7841 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
7843         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
7844         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
7845         (tst-stack3-ENV): Set.
7846         ($(objpfx)tst-stack3-mem): New.
7847         * tst-stack3.c: New test.
7849 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
7851         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
7852         Add unwind directives.  Drop unused .regstk directive.
7853         (_fini_EPILOG_BEGINS): Add unwind directives.
7855 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
7857         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
7858         Assume parameter is a pointer.
7859         (lll_futex_wake): Likewise.
7860         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
7861         Likewise.
7862         (lll_futex_wake): Likewise.
7863         Reported by Boris Hu.
7864         * sysdeps/unix/sysv/linux/unregister-atfork.c
7865         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
7867         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
7869 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
7871         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
7872         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
7873         __rtld_lock_initialize for ld.so lock.
7874         Patch in part by Adam Li <adam.li@intel.com>.
7876 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
7878         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
7879         in $(gnulib).  Also, remove stale comment.
7881 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
7883         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
7884         advantage of new syscall stub and optimize accordingly.
7886         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
7887         from SYS_futex, to match expectations of
7888         sysdep.h:DO_INLINE_SYSCALL.
7889         (lll_futex_clobbers): Remove.
7890         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
7891         (lll_futex_wake): Likewise.
7892         (lll_futex_requeue): Likewise.
7893         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
7894         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
7895         Jelinek).
7896         (__lll_mutex_lock): Likewise.
7897         (__lll_mutex_cond_lock): Likewise.
7898         (__lll_mutex_timed_lock): Likewise.
7899         (__lll_mutex_unlock): Likewise.
7900         (__lll_mutex_unlock_force): Likewise.
7902         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
7903         comes before the include of <sysdep.h>.
7904         (THREAD_SELF_SYSINFO): New macro.
7905         (THREAD_SYSINFO): Likewise.
7906         (INIT_SYSINFO): New macro.
7907         (TLS_INIT_TP): Call INIT_SYSINFO.
7909         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
7911         * sysdeps/pthread/createthread.c (create_thread): Use
7912         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
7913         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
7914         THREAD_SELF_SYSINFO instead of open code.
7915         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
7916         (THREAD_SYSINFO): Likewise.
7918         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
7920         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
7922 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
7924         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
7925         instead of .init.  Patch by David Mosberger.
7927 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
7929         * sysdeps/pthread/configure.in: Remove broken declaration in C
7930         cleanup handling check.
7932 2003-11-30  Andreas Jaeger  <aj@suse.de>
7934         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
7935         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
7936         Likewise.
7938 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
7940         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
7941         * pthread_attr_destroy.c: Include shlib-compat.h.
7942         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
7943         is set in iattr->flags.
7944         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
7946 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
7948         * Makefile (distribute): Add tst-cleanup4aux.c.
7950         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
7951         include.
7953 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
7955         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
7956         pthread_cond_signal.
7958         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
7959         store mutex address if the current value is ~0l.
7960         * sysdeps/pthread/pthread_cond_timedwait.c
7961         (__pthread_cond_timedwait): Likewise.
7962         * sysdeps/pthread/pthread_cond_broadcast.c
7963         (__pthread_cond_broadcast): Don't use requeue for pshared
7964         condvars.
7966         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7967         (__pthread_cond_wait): Don't store mutex address if the current
7968         value is ~0l.
7969         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7970         (__pthread_cond_timedwait): Likewise.
7971         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
7972         (__pthread_cond_broadcast): Don't use requeue for pshared
7973         condvars.
7975         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
7976         element with ~0l for pshared condvars, with NULL otherwise.
7978         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7979         (__pthread_cond_wait): Don't store mutex address if the current
7980         value is ~0l.
7981         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7982         (__pthread_cond_timedwait): Likewise.
7983         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
7984         (__pthread_cond_broadcast): Don't use requeue for pshared
7985         condvars.
7987         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
7988         * tst-cond12.c: New file.
7989         * tst-cond13.c: New file.
7991 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
7993         * sysdeps/pthread/configure.in: Make missing forced unwind support
7994         fatal.
7996 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
7998         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
8000 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
8002         * Makefile: Add magic to clean up correctly.
8004 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
8006         * unwind.c (FRAME_LEFT): Define.
8007         (unwind_stop): Handle old style cleanups here.
8008         (__pthread_unwind): Handle old style cleanups only if
8009         !HAVE_FORCED_UNWIND.
8010         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
8011         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
8012         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
8013         ($(objpfx)tst-cleanupx4): Likewise.
8014         * tst-cleanup4.c: New test.
8015         * tst-cleanup4aux.c: New.
8016         * tst-cleanupx4.c: New test.
8018 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
8020         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
8021         lll_mutex_*lock macros to skip atomic operations on some archs.
8023 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
8025         * sysdeps/pthread/tst-timer.c (main): Initialize
8026         sigev2.sigev_value as well.
8028 2003-10-15  Roland McGrath  <roland@redhat.com>
8030         * sysdeps/pthread/configure.in: Barf if visibility attribute support
8031         is missing.
8032         * sysdeps/pthread/configure: Regenerated.
8034 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
8036         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
8037         locking macros.  No distinction between normal and mutex locking
8038         anymore.
8039         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
8040         Merge bits from lowlevelmutex.S we still need.
8041         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
8042         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
8043         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
8044         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
8045         new mutex implementation.
8046         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
8047         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
8048         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8049         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
8050         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
8051         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8052         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8053         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
8054         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8055         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
8056         symbol for entry point to avoid cancellation.
8058 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
8060         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
8061         changes.
8062         (SAVE_OLDTYPE_0): Fix a typo.
8064 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
8066         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
8067         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
8069 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
8071         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
8072         correct offset.
8074 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
8076         * Makefile (tests): Add tst-cancel19.
8077         * tst-cancel19.c: New test.
8079 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
8081         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
8082         restoring of the old cancellation type.
8084 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
8086         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
8088 2003-09-27  Wolfram Gloger  <wg@malloc.de>
8090         * sysdeps/pthread/malloc-machine.h: New file
8092 2003-09-24  Roland McGrath  <roland@redhat.com>
8094         * allocatestack.c (__make_stacks_executable): Don't ignore return
8095         value from _dl_make_stack_executable.
8097 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
8099         * allocatestack.c (__make_stacks_executable): Also change
8100         permission of the currently unused stacks.
8102         * allocatestack.c (change_stack_perm): Split out from
8103         __make_stacks_executable.
8104         (allocate_stack): If the required permission changed between the time
8105         we started preparing the stack and queueing it, change the permission.
8106         (__make_stacks_executable): Call change_stack_perm.
8108         * Makefile: Build tst-execstack-mod locally.
8109         * tst-execstack-mod.c: New file.
8111 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
8113         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
8115 2003-09-23  Roland McGrath  <roland@redhat.com>
8117         * tst-execstack.c: New file.
8118         * Makefile (tests): Add it.
8119         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
8120         (LDFLAGS-tst-execstack): New variable.
8122         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
8123         whether to use PROT_EXEC for stack mmap.
8124         (__make_stacks_executable): New function.
8125         * pthreadP.h: Declare it.
8126         * init.c (__pthread_initialize_minimal_internal): Set
8127         GL(dl_make_stack_executable_hook) to that.
8129 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
8131         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
8132         recommendation from AMD re avoidance of lock prefix.
8134 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
8136         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
8137         lll_futex_timed_wait instead of lll_futex_wait.
8138         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
8139         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
8140         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
8141         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
8142         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
8143         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
8144         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
8145         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
8146         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
8147         Completely revamp the locking macros.  No distinction between
8148         normal and mutex locking anymore.
8149         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
8150         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
8151         __lll_lock_timedwait): Fix prototypes.
8152         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
8153         __lll_lock_timedwait): Likewise.
8154         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
8155         macros, add __builtin_expect.
8156         (lll_mutex_timedlock): Likewise.  Fix return value.
8157         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
8158         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
8159         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
8160         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
8161         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
8162         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
8163         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
8164         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
8166 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
8168         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8169         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
8170         operation if possible.
8172         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
8173         like jumping over the lock prefix.
8175 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
8177         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
8178         locking macros.  No distinction between normal and mutex locking
8179         anymore.
8180         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8181         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
8182         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
8183         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
8184         locking.  Merge bits from lowlevelmutex.S we still need.
8185         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
8186         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
8187         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
8188         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
8189         * Makefile (routines): Remove libc-lowlevelmutex.
8190         (libpthread-rountines): Remove lowlevelmutex.
8191         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
8192         for new mutex implementation.
8193         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8194         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8195         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8196         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8197         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8198         Likewise.
8199         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8200         Likewise.
8201         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8202         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8203         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
8204         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
8205         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8206         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8207         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8208         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
8209         Likewise.
8210         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
8211         Likewise.
8212         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
8213         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8214         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8215         Don't use requeue.
8216         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8217         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
8219 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
8221         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
8222         in parameters of asm with output parameters.
8224         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
8225         type of DECR parameter to int.
8226         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
8228 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
8230         * tst-attr3.c (tf, do_test): Print stack start/end/size and
8231         guardsize for each thread.
8233 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
8235         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
8236         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
8237         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
8239         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
8240         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
8241         NULL.
8242         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
8243         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
8244         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
8245         (pthread_getaffinity_np): Add hidden_def.
8247         * Makefile (tests): Add tst-attr3.
8248         * tst-attr3.c: New test.
8250         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
8252 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
8254         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
8255         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
8257 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
8259         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
8260         * tst-align.c: Include tst-stack-align.h.
8261         (tf, do_test): Use TEST_STACK_ALIGN macro.
8263 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
8265         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
8266         variable.
8268 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
8270         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
8271         stack-related values for the initial thread.
8273 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
8275         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
8277 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
8279         * pthread_mutex_lock.c: Minor code rearrangements.
8281 2003-09-05  Roland McGrath  <roland@redhat.com>
8283         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
8284         Instead, include ../nptl_db/db_info.c to do its magic.
8285         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
8286         (__pthread_pthread_key_2ndlevel_size): Likewise.
8287         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
8288         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
8289         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
8290         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
8291         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
8292         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
8293         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
8294         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
8295         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
8296         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
8297         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
8298         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
8299         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
8300         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
8301         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
8302         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
8303         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
8305 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
8307         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
8308         of pthread_t to be compatible with LT.
8309         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
8310         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8311         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8312         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8313         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
8314         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8315         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
8317 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
8319         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
8321 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
8323         * unwind-forcedunwind.c: Move to...
8324         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
8325         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
8326         * sysdeps/pthread/jmpbuf-unwind.h: New file.
8327         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
8328         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
8329         * unwind.c: Include jmpbuf-unwind.h.
8330         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
8332 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
8334         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
8335         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
8336         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
8337         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
8338         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
8339         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
8340         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
8341         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
8342         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
8343         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
8344         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
8345         function.
8346         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
8347         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
8348         * Makefile (tests): Add tst-stack2.
8349         * tst-stack2.c: New test.
8350         * tst-stack1.c: Include limits.h and sys/param.h.
8351         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
8353         * pthread_condattr_setpshared.c: Include errno.h.
8354         (pthread_condattr_setpshared): Return EINVAL if pshared
8355         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
8357         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
8358         defined symbol for entry point to avoid cancellation.
8359         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
8360         Likewise.
8361         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
8362         Likewise.
8363         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
8364         Likewise.
8365         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
8366         Likewise.
8367         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
8368         Likewise.
8369         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
8370         __close_nocancel, __read_nocancel, __write_nocancel,
8371         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
8372         libpthread.so or librt.so, define to corresponding function
8373         without _nocancel suffix.
8374         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
8375         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
8376         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
8378         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
8380 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
8382         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
8383         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
8385         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
8386         in subsections has a symbol associated with it.
8388         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
8389         defined symbol for entry point to avoid cancellation.
8390         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
8392 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
8394         * Makefile (tests): Add tst-tls5.
8395         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
8396         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
8397         ($(objpfx)tst-tls5): New.
8398         ($(objpfx)tst-tls6.out): Likewise.
8399         (tests): Depend on $(objpfx)tst-tls6.out.
8400         * tst-tls3.c: Include stdint.h and pthreaddef.h.
8401         (do_test): Check pthread_self () return value alignment.
8402         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
8403         (tf): Check pthread_self () return value alignment.
8404         * tst-tls5.c: New test.
8405         * tst-tls5.h: New.
8406         * tst-tls5mod.c: New.
8407         * tst-tls5moda.c: New.
8408         * tst-tls5modb.c: New.
8409         * tst-tls5modc.c: New.
8410         * tst-tls5modd.c: New.
8411         * tst-tls5mode.c: New.
8412         * tst-tls5modf.c: New.
8413         * tst-tls6.sh: New test.
8415         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
8416         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
8417         * init.c (pthread_functions): Initialize them.
8418         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
8419         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
8420         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
8421         pthread_cond_timedwait@@GLIBC_2.3.2.
8423 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
8425         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
8426         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
8427         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
8428         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
8429         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
8430         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
8432         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
8434         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
8435         _POSIX_THREAD_PRIORITY_SCHEDULING.
8436         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
8438 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
8440         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
8441         nested function, use static inline function from libio.h.
8442         Code by Richard Henderson.
8444         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
8445         weak.
8447 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
8449         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
8450         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
8451         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
8452         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
8453         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
8454         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
8455         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
8456         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
8457         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
8458         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
8459         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
8460         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
8461         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
8462         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
8463         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
8464         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
8465         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
8466         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
8467         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
8468         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
8469         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
8470         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
8471         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
8472         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
8473         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
8474         * sysdeps/sparc/tls.h: New file.
8475         * sysdeps/sparc/tcb-offsets.sym: New file.
8476         * sysdeps/sparc/Makefile: New file.
8477         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
8478         * init.c [__sparc__] (__NR_set_tid_address): Define.
8480 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
8482         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
8483         _IO_release_lock): Define.
8485 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
8487         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
8488         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
8490 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
8492         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
8493         (__pthread_cleanup_class): Add missing return types of member
8494         functions.
8496 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
8498         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8499         (lll_mutex_unlock_force): Add memory barrier between store and futex
8500         syscall.
8502 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
8504         * tst-cancel4.c (do_test): Also unlink tempfname and remove
8505         tempmsg in first loop.
8507 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
8509         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8510         _POSIX_THREAD_PRIORITY_SCHEDULING.
8511         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8513 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
8515         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
8516         (__rtld_lock_default_lock_recursive,
8517         __rtld_lock_default_unlock_recursive): Define.
8518         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
8519         __rtld_lock_unlock_recursive): Define using
8520         GL(_dl_rtld_*lock_recursive).
8521         * init.c (__pthread_initialize_minimal_internal): Initialize
8522         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
8523         Lock GL(_dl_load_lock) the same number of times as
8524         GL(_dl_load_lock) using non-mt implementation was nested.
8526         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
8527         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
8529 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
8531         * tst-cancel17.c (do_test): Make len2 maximum of page size and
8532         PIPE_BUF.
8534 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
8536         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
8538 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
8540         * sysdeps/pthread/createthread.c (do_clone): Move error handling
8541         to first syscall error check.  Move syscall error check for tkill
8542         into __ASSUME_CLONE_STOPPED #ifdef.
8544 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
8546         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
8547         is not defined, do explicit synchronization.
8548         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
8549         is not defined also unlock pd->lock for non-debugging case in case
8550         it is necessary.
8551         * pthread_create.c (start_thread): Always get and release pd->lock
8552         if __ASSUME_CLONE_STOPPED is not defined.
8553         (start_thread_debug): Removed.  Adjust users.
8554         * allocatestack.c (allocate_stack): Always initialize lock if
8555         __ASSUME_CLONE_STOPPED is not defined.
8556         * Makefile (tests): Add tst-sched1.
8557         * tst-sched1.c: New file.
8559         * sysdeps/pthread/createthread.c (do_clone): Only use
8560         sched_setschduler and pass correct parameters.
8562 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
8564         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
8565         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
8566         PTHREAD_STACK_MIN in comments.
8568 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
8570         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8571         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
8572         argument.
8573         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
8574         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
8575         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
8576         (__pthread_cleanup_upto): Fix prototype.
8577         (_longjmp_unwind): Adjust caller.
8578         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
8579         Change second argument to const struct pointer.
8580         * tst-sem8.c (main): Remove unused s2 and s3 variables.
8581         * tst-sem9.c (main): Likewise.
8582         * unwind.c: Include string.h for strlen prototype.
8584 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
8586         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8587         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
8588         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
8589         Define HAVE_CMOV.
8590         Patch by Nicholas Miell <nmiell@attbi.com>.
8592 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
8594         * init.c (__pthread_initialize_minimal_internal): Initialize
8595         GL(dl_init_static_tls).
8596         * pthreadP.h (__pthread_init_static_tls): New prototype.
8597         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
8598         New functions.
8599         * Makefile (tests): Add tst-tls4.
8600         (modules-names): Add tst-tls4moda and tst-tls4modb.
8601         ($(objpfx)tst-tls4): Link against libdl and libpthread.
8602         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
8603         tst-tls4modb.so.
8604         * tst-tls4.c: New file.
8605         * tst-tls4moda.c: New file.
8606         * tst-tls4modb.c: New file.
8608 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
8610         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
8611         before __timer_dealloc.
8612         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
8613         Don't call list_unlink.
8615 2003-07-29  Roland McGrath  <roland@redhat.com>
8617         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
8619 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
8621         * tst-cancel17.c (do_test): Check if aio_cancel failed.
8622         Don't reuse struct aiocb A if it failed.
8623         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
8624         not just one byte, as that does not block.
8626 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
8628         * sysdeps/pthread/unwind-resume.c: New file.
8629         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
8630         unwind-resume in csu subdir.
8631         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
8632         exceptions.
8633         (librt-sysdep_routines, librt-shared-only-routines): Add
8634         rt-unwind-resume.
8635         * sysdeps/pthread/rt-unwind-resume.c: New file.
8636         * unwind-forcedunwind.c: New file.
8637         * Makefile (libpthread-routines): Add unwind-forcedunwind.
8638         (libpthread-shared-only-routines): Likewise.
8639         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
8640         * pthreadP.h (pthread_cancel_init): New prototype.
8641         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
8643         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
8644         attr argument const struct pthread_attr *.
8646         * res.c (__res_state): Return __resp.
8647         * descr.h: Include resolv.h.
8648         (struct pthread): Add res field.
8649         * pthread_create.c: Include resolv.h.
8650         (start_thread): Initialize __resp.
8651         * Makefile (tests): Add tst-_res1.
8652         (module-names): Add tst-_res1mod1, tst-_res1mod2.
8653         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
8654         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
8655         libpthread.
8656         * tst-_res1.c: New file.
8657         * tst-_res1mod1.c: New file.
8658         * tst-_res1mod2.c: New file.
8660 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
8662         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
8664         * Makefile: Define various *-no-z-defs variables for test DSOs
8665         which has undefined symbols.
8667 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
8669         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
8670         Retry if the stwcx fails to store once_control.
8672 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
8674         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
8675         pthread_attr_setaffinity.
8676         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
8677         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
8678         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
8679         * pthread_attr_destroy.c: Free cpuset element if allocated.
8680         * pthread_create.c: Pass iattr as additional parameter to
8681         create_thread.
8682         * sysdeps/pthread/createthread.c: If attribute is provided and
8683         a new thread is created with affinity set or scheduling parameters,
8684         start thread with CLONE_STOPPED.
8685         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
8686         pthread_attr_setaffinity.
8687         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
8688         cpuset element.
8690 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
8692         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
8694 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
8696         * sysdeps/pthread/configure.in: Require CFI directives also for
8697         ppc and s390.
8699 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
8701         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
8702         Add cfi directives.
8704 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
8706         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
8707         CLEANUP_JMP_BUF.
8708         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
8709         registers as variables.  Call __pthread_mutex_unlock_usercnt.
8710         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8711         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
8712         not self pointer in __writer.  Compare with TID to determine
8713         deadlocks.
8714         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8715         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
8716         Likewise.
8717         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
8718         Likewise.
8719         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
8720         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8721         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
8722         macros also when compiling librt.
8724 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
8726         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
8727         -fasynchronous-unwind-tables.
8728         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
8729         (PSEUDO): Add cfi directives.
8730         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
8731         Likewise.
8732         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
8733         Likewise.
8735 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
8737         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
8738         __pthread_unregister_cancel): Add prototypes and hidden_proto.
8739         * unwind.c (__pthread_unwind_next): Add hidden_def.
8740         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
8741         Likewise.
8742         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
8743         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
8744         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
8745         Likewise.
8746         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
8747         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
8748         Likewise.
8749         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
8750         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
8751         __pthread_unregister_cancel and __pthread_unwind_next.
8753 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
8755         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
8756         different symbol for the cancellation syscall wrapper and
8757         non-cancellation syscall wrapper.
8758         (PSEUDO_END): Define.
8760 2003-07-05  Richard Henderson  <rth@redhat.com>
8762         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
8763         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
8764         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8765         return actual return value from the syscall, not 0.
8767 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
8769         * descr.h (struct pthread): Add pid field.
8770         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
8771         (__reclaim_stacks): Likewise.
8772         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
8773         also check for PID of the signal source.
8774         (__pthread_initialize_minimal_internal): Also initialize pid field
8775         of initial thread's descriptor.
8776         * pthread_cancel.c: Use tgkill instead of tkill if possible.
8777         * sysdeps/unix/sysv/linux/fork.c: Likewise.
8778         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
8779         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8780         * sysdeps/unix/sysv/linux/raise.c: Likewise.
8782 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
8784         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
8785         Fix use of parameter.
8786         (__libc_cleanup_pop): Likewise.
8788 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
8790         * init.c (sigcancel_handler): Change parameters to match handler
8791         for SA_SIGACTION.  Check signal number and code to recognize
8792         invalid invocations.
8794 2003-07-03  Roland McGrath  <roland@redhat.com>
8796         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
8797         Apply sizeof (struct pthread) bias to r13 value.
8799 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
8801         * sysdeps/pthread/configure.in: Require CFI directives.
8803         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
8804         definition.
8805         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
8806         libpthread compilation.
8807         * unwind.c (__pthread_unwind): Add hidden_def.
8808         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
8810 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
8812         * libc-cancellation.c (__libc_cleanup_routine): Define.
8813         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
8814         (__pthread_cleanup_pop): Define.
8816 2003-07-01  Richard Henderson  <rth@redhat.com>
8818         * sysdeps/alpha/elf/pt-initfini.c: New file.
8819         * sysdeps/alpha/pthread_spin_lock.S: New file.
8820         * sysdeps/alpha/pthread_spin_trylock.S: New file.
8821         * sysdeps/alpha/pthreaddef.h: New file.
8822         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
8823         * sysdeps/alpha/tls.h: New file.
8824         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
8825         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
8826         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
8827         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
8828         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
8829         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
8830         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
8831         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
8832         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
8833         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
8835 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
8837         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
8838         cleanup support and unwind info.
8840 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
8842         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
8843         Use correct cleanup handler registration.  Add unwind info.
8844         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
8845         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
8846         * tst-once3.c: Add cleanup handler and check it is called.
8847         * tst-once4.c: Likewise.
8848         * tst-oncex3.c: New file.
8849         * tst-oncex4.c: New file.
8850         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
8852 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
8854         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
8856 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
8858         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
8859         (tf_msgsnd): Likewise.
8861         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
8862         premature returns a bit more.
8864 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
8866         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
8867         definition to the front.
8869         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
8870         the cleanup functions to make the names unique.  Fix dwarf opcode
8871         un unwind table.
8872         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
8873         functions to make the names unique.  Fix CFA offset for two blocks.
8875 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
8877         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
8878         missing closing braces.
8879         Patch by Christophe Saout <christophe@saout.de>.
8881 2003-06-24  Roland McGrath  <roland@redhat.com>
8883         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
8885 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
8887         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
8888         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
8890         * pthreadP.h: Declare __find_thread_by_id.
8891         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
8892         * pthread_clock_gettime.c: Allow using other thread's clock.
8893         * pthread_clock_settime.c: Likewise.
8894         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8895         * Makefile: Add rules to build and run tst-clock2.
8896         * tst-clock2.c: New file.
8898 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
8900         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
8901         to use exception-based cleanup handler.
8902         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8904         * tst-cond8.c (ch): Announce that we are done.
8906         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
8908         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
8909         Also test aio_suspend with timeout value.
8911 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
8913         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
8914         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
8915         attribute_hidden.
8917         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
8918         (__pthread_mutex_lock_internal): Likewise.
8919         (__pthread_mutex_unlock_internal): Likewise.
8920         (__pthread_mutex_unlock_usercnt): Declare.
8921         * pthread_mutex_destroy.c: Always fail if used in any way.
8922         * pthread_mutex_init.c: Update comment.
8923         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
8924         * pthread_mutex_timedlock.c: Adjust __nusers.
8925         * pthread_mutex_trylock.c: Adjust __nusers.
8926         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
8927         and public interfaces are wrapper with pass additional parameter.
8928         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
8929         parameter zero.
8930         * tst-mutex8.c: New file.
8931         * Makefile (tests): Add tst-mutex8.
8932         * sysdeps/pthread/pthread_cond_timedwait.c: Call
8933         __pthread_mutex_unlock_usercnt.
8934         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
8935         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8936         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8937         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8938         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8939         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
8940         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8941         Add __nusers.
8942         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8943         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8944         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8945         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8946         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8948         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
8949         * pthread_mutex_timedlock.c: Likewise.
8950         * pthread_mutex_trylock.c: Adjust __nusers.
8951         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
8952         * tst-mutex9.c: New file.
8953         * Makefile (tests): Add tst-mutex9.
8954         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
8955         * sysdeps/ia64/tls.h: Likewise.
8956         * sysdeps/powerpc/tls.h: Likewise.
8957         * sysdeps/s390/tls.h: Likewise.
8958         * sysdeps/sh/tls.h: Likewise.
8959         * sysdeps/x86_64/tls.h: Likewise.
8960         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
8961         Change type of __owner.
8962         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8963         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8964         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8965         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8966         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
8968 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
8970         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
8971         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
8973         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
8974         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
8975         instead of nr to lll_futex_wake.  Only set errno and return -1
8976         if err < 0.
8978         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
8979         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8980         return actual return value from the syscall, not 0.
8982 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
8984         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
8985         find a random value.
8986         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
8987         errno==EIDRM.
8989         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
8990         compat_timer_settime.
8991         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
8992         compat_timer_gettime.
8993         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
8994         compat_timer_getoverrun.
8995         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
8996         compat_timer_delete.
8998         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
8999         error-checking mutex detect busy mutexes.
9001 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
9003         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
9004         Add ax to clobber list.
9005         (lll_mutex_cond_lock): Likewise.
9006         (lll_mutex_unlock): Likewise.
9007         (lll_lock): Likewise.
9008         (lll_unlock): Likewise.
9010         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
9011         * tst-cancel18.c: New file.
9012         * tst-cancelx18.c: New file.
9014         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
9015         and tcdrain.
9017         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
9018         * tst-cancel17.c: New file.
9019         * tst-cancelx17.c: New file.
9021         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
9022         * sysdeps/unix/sysv/linux/sigwait.c: New file.
9023         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
9025         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
9027 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
9029         * sysdeps/pthread/createthread.c (create_thread): Set
9030         header.multiple_threads unconditionally.
9031         * allocatestack.c (allocate_stack): Likewise.
9032         * descr.h (struct pthread): Add header.multiple_threads
9033         unconditionally.
9034         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
9035         Define for librt.  #error if neither libpthread, libc nor librt.
9036         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
9037         Likewise.
9038         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
9039         CDISABLE): Likewise.
9040         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
9041         CDISABLE): Likewise.
9042         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
9043         CDISABLE): Likewise.
9044         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
9045         CDISABLE): Likewise.  Access header.multiple_threads outside of
9046         libc and libpthread.
9047         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
9048         Likewise.
9049         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
9050         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
9052 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
9054         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
9055         Also test early cancellation before the thread reaches the cancellation
9056         point.
9058         * Makefile: Compile forward.c with exceptions.
9060         * sysdeps/unix/sysv/linux/sleep.c: New file.
9062 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
9064         * Makefile: Add CFLAGS definition to compile function wrappers
9065         duplicated from libc with exceptions.
9066         * tst-cancel4.c: Also check cancellation handlers.
9068         * Makefile: Add rules to build and run tst-cancel16 and
9069         tst-cancelx16.  Add missing CFLAGS definitions.
9070         * tst-cancel16.c: New file.
9071         * tst-cancelx16.c: New file.
9073 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
9075         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9076         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
9077         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
9078         (DL_SYSINFO_IMPLEMENTATION): Likewise.
9080         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
9081         (LIBC_CANCEL_RESET): Likewise.
9082         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
9083         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
9084         librt-cancellation.
9085         (CFLAGS-libcrt-cancellation.c): Define.
9086         * sysdeps/pthread/librt-cancellation.c: New file.
9087         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
9088         macros also when compiling librt.
9089         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
9090         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
9091         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
9092         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
9093         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
9094         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
9095         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
9097         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
9098         compat_timer_create.
9100 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
9102         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
9104         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
9105         __register_atfork.
9106         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
9107         Add libc_hidden_def.
9109 2003-06-13  Roland McGrath  <roland@redhat.com>
9111         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
9112         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
9114 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
9116         * allocatestack.c (queue_stack): Always inline.
9117         * ptreadhP.h (__do_cancel): Likewise.
9119 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
9121         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
9122         a typo.
9124 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
9126         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9127         (__pthread_cond_signal): Remove incorrect second addition for
9128         cond_lock!=0.
9130 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
9132         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9133         (__pthread_cond_signal): Use correct futex pointer in
9134         __lll_mutex_lock_wait call.
9136         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9137         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
9139 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
9141         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
9142         cancelable.
9143         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
9144         Likewise.
9146         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
9147         hand-written CFI generation code.  Since ENTRY/END also initiated
9148         CFI frames this caused two CFI sets to be generated.
9150 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
9152         * cleanup_routine.c: New file.
9153         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
9154         * sysdeps/pthread/pthread.h: Add support for fully exception-based
9155         cleanup handling.
9156         * Makefile (libpthread-routines): Add cleanup_routine.
9157         Add more CFLAGS variables to compile with exceptions.  Add comments
9158         why which file needs unwind tables.
9159         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
9160         tests.
9161         * tst-cancelx1.c: New file.
9162         * tst-cancelx2.c: New file.
9163         * tst-cancelx3.c: New file.
9164         * tst-cancelx4.c: New file.
9165         * tst-cancelx5.c: New file.
9166         * tst-cancelx6.c: New file.
9167         * tst-cancelx7.c: New file.
9168         * tst-cancelx8.c: New file.
9169         * tst-cancelx9.c: New file.
9170         * tst-cancelx10.c: New file.
9171         * tst-cancelx11.c: New file.
9172         * tst-cancelx12.c: New file.
9173         * tst-cancelx13.c: New file.
9174         * tst-cancelx14.c: New file.
9175         * tst-cancelx15.c: New file.
9176         * tst-cleanupx0.c: New file.
9177         * tst-cleanupx0.expect: New file.
9178         * tst-cleanupx1.c: New file.
9179         * tst-cleanupx2.c: New file.
9180         * tst-cleanupx3.c: New file.
9182         * tst-cleanup0.c: Make standard compliant.
9183         * tst-cleanup1.c: Likewise.
9185         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
9186         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
9187         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
9188         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
9189         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
9190         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9191         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
9192         CLEANUP_JMP_BUF.
9193         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
9194         * tst-cancel12.c: New file.
9195         * tst-cancel13.c: New file.
9196         * tst-cancel14.c: New file.
9197         * tst-cancel15.c: New file.
9198         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
9199         and tst-cancel15.
9201         * tst-cancel1.c: Add some comments.
9203         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
9204         timeout correctly.
9206 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
9208         * Makefile (CFLAGS-pthread_cancel.c): Define.
9210 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
9212         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
9213         Change type of __writer element to int.
9214         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9215         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9216         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9217         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9218         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9219         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
9220         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
9221         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
9222         Compare with TID to determine deadlocks.
9223         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
9224         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9225         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
9226         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9227         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
9228         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9229         Likewise.
9230         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9231         Likewise.
9232         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9233         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
9234         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
9235         Likewise.
9236         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
9237         Likewise.
9238         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
9239         * Makefile (tests): Add tst-rwlock12.
9240         * tst-rwlock12.c: New file.
9242 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
9244         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
9245         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
9246         Remove bogus hidden_proto.
9247         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
9248         Likewise.
9249         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
9250         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
9251         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
9252         ___lll_mutex_timedlock): Likewise.
9254 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
9256         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9257         (__pthread_cond_signal): Add some code to eventually handle
9258         cond_lock!=0.
9260 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
9262         * Makefile (tests): Add tst-exec4.
9263         (tst-exec4-ARGS): Define.
9264         * tst-exec4.c: New file.
9266 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
9268         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
9269         Also fail if tv_nsec < 0.
9270         (__lll_timedwait_tid): Likewise.
9271         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
9272         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
9273         Likewise.
9274         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
9275         Likewise.
9276         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
9277         Likewise.
9278         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
9279         Likewise.
9280         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
9281         Likewise.
9282         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
9283         Likewise.
9285         * Makefile (tests): Add tst-sem8 and tst-sem9.
9286         * tst-sem8.c: New file.
9287         * tst-sem9.c: New file.
9288         * sem_open.c: Fix creation of in_use record if the file exists but
9289         no internal record.
9291         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
9292         definitions.
9294         * sysdeps/pthread/timer_create.c (timer_create): In case
9295         evp==NULL, assign timer ID to sival_ptr.
9297         * descr.h (struct pthread_unwind_buf): Change type of prev element to
9298         struct pthread_unwind_buf *.
9299         (struct pthread): Likewise for cleanup_jmp_buf element.
9301         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
9302         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
9303         * unwind.c (__pthread_unwind_next): Likewise.
9305 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
9307         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9308         (lll_futex_timed_wait): Use int for futex value parameter.
9309         (lll_futex_wake): Likewise.
9310         (lll_futex_requeue): Likewise.
9312         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
9313         Replace one memory operation with one register operation.
9315         * tst-join4.c (do_test): Fix error message.
9317         * tst-rwlock6.c (do_test): Use correct format specifier.
9319         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9320         (__lll_mutex_lock_wait): Replace one memory operation with one
9321         register operation.
9322         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
9323         (__lll_mutex_lock_wait): Likewise.
9325         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9326         (__lll_mutex_cond_lock): Add one to value parameter of
9327         __lll_lock_wait to reflect reality in the futex syscall.
9328         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
9329         (lll_mutex_cond_lock): Likewise.
9331 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
9333         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
9334         New function.
9335         (lll_mutex_cond_lock): Define.
9337 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
9339         * Makefile (tests): Add tst-signal6.
9340         * tst-signal6.c: New file.
9342         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
9343         (__lll_mutex_unlock_force): New function
9344         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
9346         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9347         (__lll_mutex_unlock_force): New function.
9348         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
9350         * tst-rwlock7.c (do_test): Use correct format specifier.
9352         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
9353         Find break parameter in correct asm argument.
9355 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
9357         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
9358         Remove out4.
9359         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
9360         error occured.
9361         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
9362         Add __mutex.
9363         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
9364         lll_futex_requeue, lll_mutex_unlock_force): Define.
9366 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
9368         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9369         (pthread_cond_t): Add __mutex.
9370         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
9371         lll_futex_requeue, lll_mutex_unlock_force): Define.
9373 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
9375         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
9376         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
9377         Add __mutex field.
9378         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
9379         Define.
9380         (lll_futex_wait, lll_futex_wake): Define.
9381         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
9382         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
9383         FUTEX_REQUEUE instead of FUTEX_WAIT.
9384         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
9385         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
9386         mutex which was used in condvar structure.  Call
9387         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
9388         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
9390         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
9391         include tcb-offsets.h.  Read wakeup value in locked region.
9392         Use the value of gbr register as THREAD_ID.
9393         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9394         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9395         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9397         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
9398         macros.
9400 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
9402         * sysdeps/pthread/pthread_cond_broadcast.c
9403         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
9405 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
9407         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
9408         typo in register name.
9409         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
9410         correctly.  Actually use requeue.  Little optimization.
9411         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
9412         mutex address early.  Handle cancellation state as 32-bit value.
9413         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9414         Remove unnecessary label.
9416 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
9418         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
9419         instead of FUTEX_WAIT.
9420         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
9421         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9422         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9423         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
9424         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
9425         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
9426         used in condvar structure.  Call __pthread_mutex_cond_lock instead
9427         of __pthread_mutex_lock_internal.
9428         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9429         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9430         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
9431         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
9432         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9433         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9434         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
9435         Add pthread_mutex_cond_lock.
9436         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
9437         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
9438         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
9439         lll_mutex_cond_lock.
9440         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
9441         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9442         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9443         Add __mutex field.
9444         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9445         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9447         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
9448         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
9450         * pthreadP.h: Declare __pthread_mutex_cond_lock.
9451         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
9452         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
9453         macro don't define aliases.
9455         * cancellation.c: Remove __pthread_enable_asynccancel_2.
9456         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
9457         * sysdeps/pthread/pthread_cond_timedwait.c: Use
9458         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
9459         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9460         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9461         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
9462         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9463         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9465 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
9467         * sem_open.c: Fix one endless loop.  Implement correct semantics
9468         wrt opening the same semaphore more then once.
9469         * sem_close.c: Adjust for sem_open change.
9470         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
9471         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
9472         * Makefile (tests): Add tst-sem7.
9473         * tst-sem7.c: New file.
9475 2003-05-16  Roland McGrath  <roland@redhat.com>
9477         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
9478         uninitialized variable braino.
9480 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
9482         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
9483         test for syscall availability.
9485         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
9486         __no_posix_timers to -1 if the syscalls don't exist.
9488         * pthread_join.c (pthread_join): Set tid field of the joined
9489         thread to -1.  This isn't necessary but helps to recognize some
9490         error conditions with almost no cost.
9492         * allocatestack.c (FREE_P): Also negative values indicate an
9493         unused stack.
9495         * unwind.c: Include <unistd.h>.
9497 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
9499         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
9501 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
9503         * Makefile (crti-objs, crtn-objs): New variables.
9504         (omit-deps, extra-objs): Add crtn.
9505         ($(objpfx)libpthread.so): Depend on both crti and crtn
9506         and links to them in multidir.
9507         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
9509 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
9511         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
9512         (lll_mutex_unlock): Use atomic_exchange_rel.
9514 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
9516         * cond-perf.c (cons): Add missing locking around setting of alldone.
9518 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
9520         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
9521         related macros.
9522         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9524 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
9526         * tst-sem6.c: New file.
9527         * Makefile (tests): Add tst-sem6.
9529         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
9530         Use atomic_exchange_rel instead of atomic_exchange.
9531         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
9532         Likewise.
9534         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
9535         code for lll_futex_wait and lll_futex_wake in static apps.  Use
9536         vsyscall is possible.
9538         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
9539         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
9540         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
9541         pthread_setaffinity_np.
9542         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
9543         and pthread_setaffinity_np.
9544         * Makefile (libpthread-routines): Add pthread_getaffinity and
9545         pthread_setaffinity.
9547         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
9548         use it in case mmap to allocate the stack fails.
9549         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
9550         ARCH_MAP_FLAGS here.
9551         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
9552         ARCH_RETRY_MMAP.
9554 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
9556         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
9557         handler implementation.  It is now lockless in fork().
9558         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
9559         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
9560         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
9561         declare the __fork_*_lists.
9562         (struct fork_handler): Include pointers to all three functions.
9563         Add next, refcntr and need_signal elements.
9564         (__fork_handlers): New declaration.
9565         (__register_atfork_malloc): Remove declaration.
9566         (HAVE_register_atfork_malloc): Remove definition.
9567         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
9568         __pthread_child_handler variable.
9569         (__libc_pthread_init): Use __register_atfork instead of explicitly
9570         adding to the list.
9571         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
9572         and lll_futex_wake.
9573         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9575         * unwind.c (unwind_cleanup): Print error message and then abort.  This
9576         function must never be reached.
9578         * cond-perf.c: New file.
9580 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
9582         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
9584 2003-05-04  Roland McGrath  <roland@redhat.com>
9586         * Makefile ($(objpfx)../libc.so): New target.
9588 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
9590         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9591         (pthread_condattr_t): Size is only an int, don't use long for
9592         alignment.
9593         (pthread_mutexattr_t): Likewise.
9594         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9595         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9596         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9598 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
9600         * sysdeps/i386/tls.h: Define THREAD_ID.
9601         * sysdeps/ia64/tls.h: Likewise.
9602         * sysdeps/powerpc/tls.h: Likewise.
9603         * sysdeps/s390/tls.h: Likewise.
9604         * sysdeps/sh/tls.h: Likewise.
9605         * sysdeps/x86_64/tls.h: Likewise.
9606         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
9607         record ownership.
9608         * pthread_mutex_timedlock.c: Likewise.
9609         * pthread_mutex_trylock.c: Likewise.
9610         * pthread_mutex_unlock.c: Likewise.
9611         * pthread_rwlock_trywrlock.c: Likewise.
9612         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
9613         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9614         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
9615         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9617         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
9618         flag.
9620 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
9622         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9623         (__SIZEOF_PTHREAD_COND_T): Define to 48.
9624         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
9625         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
9626         Make __align long long instead of long.
9627         (pthread_rwlock_t): Formatting.
9628         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
9629         (pthread_rwlock_t): Formatting.
9630         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9631         (pthread_cond_t): Make __align long long instead of long.
9632         (pthread_rwlock_t): Move __flags field to the same position as in
9633         linuxthreads.
9635 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
9637         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
9638         * tst-rwlock7.c (do_test): Likewise.
9640 2003-04-26  Roland McGrath  <roland@redhat.com>
9642         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
9644 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
9646         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
9647         sizeof (struct pthread).
9648         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
9649         1 struct pthread.
9650         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
9651         to 0.
9652         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
9653         struct pthread.
9654         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
9655         to 32-bit bytes.
9656         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
9657         tcbp.
9658         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
9659         unneccessarily.
9660         (NO_TLS_OFFSET): Define.
9661         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
9662         add TLS_TCB_SIZE unnecessarily.
9664 2003-04-22  Roland McGrath  <roland@redhat.com>
9666         * Makeconfig (shared-thread-library): Reverse link order to work
9667         around linker bug.
9669 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
9671         * semaphore.h: Fix typo in comment.
9673 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
9675         * sysdeps/pthread/sigfillset.c: New file.
9677         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
9678         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
9679         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
9680         * sysdeps/pthread/sigaction.c: Likewise.
9681         * sysdeps/pthread/sigprocmask.c: New file.
9682         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
9683         __SIGRTMIN+1.
9684         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9685         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
9686         in this case.
9688 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
9690         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9691         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
9693         * sysdeps/unix/sysv/linux/unregister-atfork.c
9694         (__unregister_atfork): Don't free memory not allocated dynamically.
9696         * semaphore.h: Remove __THROW marker from cancellation points.
9697         * nptl/sysdeps/pthread/pthread.h: Likewise.
9699 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
9701         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
9702         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
9703         __THROW.
9705 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
9707         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
9709 2003-04-15  Roland McGrath  <roland@redhat.com>
9711         * forward.c (__pthread_unwind): Tweak to avoid warning.
9713 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
9715         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
9717 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
9719         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
9720         overflow CFA advance instructions.
9721         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9723 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
9725         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
9726         * sysdeps/i386/pthread_spin_lock.c: Likewise.
9727         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
9728         defined.
9730         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
9731         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
9732         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
9733         DW_CFA_advance_loc for .Laddl-.Lsubl.
9735 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
9737         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
9738         position-independent unwind data for static libraries.
9739         Add missing unwind info.  Add comments.
9741         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
9742         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9743         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9744         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9746 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
9748         * Makefile: Make sure all cancellation points are compiled with
9749         exception and asynchronous unwind tables.
9751         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
9752         which mishandles loading of global object addresses in PIC.
9753         (THREAD_SETMEM_NC): Likewise.
9755 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
9757         * pthread.h: Define new data structure for cleanup buffer.  Declare
9758         new cleanup handler interfaces.
9759         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
9760         (struct pthread): Add cleanup_jmp_buf pointer.  Define
9761         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
9762         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
9763         it.  Declare old cleanup handler installation functions.
9764         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
9765         handling.
9766         * cleanup_defer.c: Likewise.
9767         * cleanup_compat.c: New file.  Old cleanup code.
9768         * cleanup_def_compat.c: New file.  Old cleanup code.
9769         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
9770         if own thread descriptor.
9771         * unwind.c: New file.
9772         * forward.c: Add __pthread_unwind.
9773         * init.c (pthread_functions): Add __pthread_unwind.
9774         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
9775         Add ptr___pthread_unwind.
9776         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
9777         and unwind function.
9778         * Makefile (libpthread-routines): Add cleanup_compat,
9779         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
9780         table generation if necessary.
9781         * version.c: Record whether unwind support is compiled in.
9782         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
9783         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
9784         handler interfaces.
9785         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
9786         complication to generate unwind information for syscall wrappers.
9787         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
9788         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
9789         __cleanup_fct_attribute.
9791         * Makefile: Add rules to build and run tst-cleanup0.
9792         * tst-cleanup0.c: New file.
9793         * tst-cleanup0.expect: New file.
9795         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
9796         caller.  Optimize to avoid often unecessary local variable.
9798 2003-04-11  Roland McGrath  <roland@redhat.com>
9800         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
9801         sets variable `multidir'; include that.
9802         (generated): Add it.
9803         ($(objpfx)$(multidir)/crti.o): New target.
9804         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
9806 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
9808         * tst-attr2.c (do_test): Add cast to avoid warning.
9809         * tst-mutex4.c (do_test): Likewise.
9811 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
9813         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
9814         in child.
9816 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
9818         * Makefile (tests): Add tst-detach1.
9819         * tst-detach1.c: New file.
9821 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
9823         * sysdeps/pthread/pthread.h: Remove duplicate
9824         pthread_cleanup_{push,pop} definitions.
9826         * tst-barrier2.c: Eliminate warnings.
9827         * tst-cancel4.c: Likewise.
9828         * tst-cond4.c: Likewise.
9829         * tst-cond6.c: Likewise.
9830         * tst-detach1.c: Likewise.
9831         * tst-rwlock4.c: Likewise.
9832         * tst-rwlock6.c: Likewise.
9833         * tst-rwlock7.c: Likewise.
9834         * tst-sem3.c: Likewise.
9835         * tst-spin2.c: Likewise.
9836         * tst-umask1.c: Likewise.
9838 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
9840         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
9842 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
9844         * descr.h (struct pthread): Move cancelhandling member to the front.
9846 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
9848         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
9849         malloc_parent, and malloc_child statically.
9850         (__register_atfork_malloc): New function.
9851         (free_mem): Don't free any of the malloc_* variables on the list.
9852         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
9853         Define HAVE_register_atfork_malloc.
9855 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
9857         * sysdeps/pthread/createthread.c (create_thread): Add some more
9858         comments explaining when to set multiple_threads and when not.
9860         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9861         THREAD_ATOMIC_BIT_SET if not already defined.
9862         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
9863         THREAD_ATOMIC_BIT_SET:
9864         * sysdeps/x86_64/tls.h: Likewise.
9865         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
9866         THREAD_ATOMIC_CMPXCHG_VAL.
9867         (_pthread_cleanup_pop_restore): Likewise.
9868         * cancellation.c (__pthread_enable_asynccancel): Likewise.
9869         (__pthread_enable_asynccancel_2): Likewise.
9870         (__pthread_disable_asynccancel): Likewise.
9871         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9872         (__libc_disable_asynccancel): Likewise.
9873         * init.c (sigcancel_handler): Likewise.
9874         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
9875         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
9877 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
9879         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
9880         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
9881         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
9882         * Makefile (tests): Add tst-cancel11.
9883         * tst-cancel11.c: New file.
9885 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
9887         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
9888         round, not the first.  Use specific_used flag instead of local
9889         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
9890         (__free_tcb): Don't call deallocate_tsd here.
9891         (start_thread): Call deallocate_tsd here.
9892         * pthread_setspecific.c: Set specific_used flag really only when
9893         needed.
9894         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
9895         * tst-tsd3.c: New file.
9896         * tst-tsd4.c: New file.
9898 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
9900         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
9901         Use atomic_exchange_and_add instead of __lll_add.
9902         (__lll_mutex_timedlock): Likewise.
9903         Patch by Ian Wienand.
9905 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
9907         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
9908         (SINGLE_THREAD_P): Fix typo.
9909         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
9911 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
9913         * Makefile (tests): Add tst-align.
9914         * tst-align.c: New file.
9915         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
9917         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
9918         function correctly.
9920         * tst-tsd2.c: Add casts to avoid warnings.
9922 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
9924         * descr.h (struct pthread): Move most often used elements to the front.
9926 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
9928         * Makefile (libpthread-routines): Add pthread_atfork.
9929         (libpthread-static-only-routines): Add pthread_atfork.
9931 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
9933         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
9934         of TLS_DTV_AT_TP.
9935         (INSTALL_DTV): Add parens.
9936         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
9937         Use passed descr instead of THREAD_SELF.
9938         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
9939         (__lll_mutex_timedlock_wait): Correct expected value after
9940         spurious wakeup.
9941         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
9942         Release lock before waking up the waiters.
9943         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
9944         criteria.  Reorderstruct passed to cleanup handler.  Fix
9945         handling of cancellation and failung pthread_mutex_unlock call.
9946         Use __pthread_enable_asynccancel_2 instead of
9947         __pthread_enable_asynccancel.
9948         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
9949         Return result of lock re-get if it fails.
9950         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
9951         for __pthread_cleanup_push.
9952         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
9953         completely broken rwlock implementation.
9954         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9955         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9956         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9957         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
9958         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9959         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
9960         versioned_symbol macro.
9961         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
9962         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
9964 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
9966         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
9967         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
9968         and __helper_tid.
9969         (struct timer): Remove th and bar field.
9970         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
9971         debugging code.  Create only one helper thread.
9972         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
9973         helper thread.
9974         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9975         Renamed.  Define statically.  Use thread info from siginfo.
9976         (__helper_once): New variable.
9977         (__helper_tid): New variable.
9978         (__reset_helper_control): New function.
9979         (__start_helper_thread): New function.
9981         * pthread_create.c (start_thread): Don't use setjmp inside
9982         __builtin_expect to work around gcc bug.
9984         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
9985         timer_delete syscall fails, but not with ENOSYS, set
9986         __no_posix_timers.
9988         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
9989         (timer_settime): Fix typo.
9990         * sysdeps/unix/sysv/linux/timer_getoverr.c
9991         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
9993 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
9995         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
9996         offset of cleanupbuf.__prev.
9998 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
10000         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
10001         of included file.
10003 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
10005         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
10006         NULL provide default definition to syscall.
10008 2003-03-25  Roland McGrath  <roland@redhat.com>
10010         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
10011         (timer_id2ptr): Fix typo.
10013 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
10015         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
10016         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
10017         * sysdeps/ia64/pthreaddef.h: Likewise.
10018         * sysdeps/powerpc/pthreaddef.h: Likewise.
10019         * sysdeps/s390/pthreaddef.h: Likewise.
10020         * sysdeps/sh/pthreaddef.h: Likewise.
10021         * sysdeps/x86_64/pthreaddef.h: Likewise.
10022         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
10023         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
10024         being changed.
10025         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
10026         SIGTIMER is not unblocked.
10027         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
10028         RT signal taken.
10029         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
10030         be send.
10031         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
10032         pass pointer through as ID.
10033         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
10034         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
10035         * sysdeps/unix/sysv/linux/timer_create.c: New file.
10036         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
10037         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
10038         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
10039         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
10040         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
10041         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
10042         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
10043         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
10044         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
10045         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
10046         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
10047         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
10048         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
10049         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
10050         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
10051         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
10052         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
10053         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
10054         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
10055         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
10056         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
10057         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
10058         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
10059         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
10060         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
10061         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
10062         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
10063         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
10064         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
10065         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
10067         * pthreadP.h: Remove FRAME_LEFT definition.
10068         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
10069         already left frame.  Programs which have this problem are not POSIX
10070         compliant.
10071         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
10073 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
10075         * sysdeps/pthread/tst-timer.c: Check return values of the
10076         functions we test.
10078 2003-03-23  Roland McGrath  <roland@redhat.com>
10080         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
10081         * tst-tls3mod.c: Likewise.
10082         * tst-tls1.c: Likewise.
10083         * tst-tls2.c: Likewise.
10085         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
10086         undefined behavior.
10088         * tst-join5.c (tf1, tf2): Add a cast.
10090         * Makeconfig (includes): Append -I$(..)nptl to this variable.
10092         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
10093         Don't test anything.
10094         * tst-cond4.c: Likewise.
10095         * tst-cond6.c: Likewise.
10096         * tst-flock2.c: Likewise.
10097         * tst-mutex4.c: Likewise.
10098         * tst-rwlock4.c: Likewise.
10099         * tst-signal1.c: Likewise.
10100         * tst-spin2.c: Likewise.
10101         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
10103         * tst-mutex4.c: Use test-skeleton.c.
10104         * tst-spin2.c: Likewise.
10105         * tst-sysconf.c: Likewise.
10106         * tst-barrier2.c: Likewise.
10107         * tst-cond4.c: Likewise.
10108         * tst-cond6.c: Likewise.
10109         * tst-rwlock4.c: Likewise.
10110         * tst-unload.c: Likewise.
10111         * tst-flock2.c (do_test): Use return instead of exit.
10113 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
10115         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
10117 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
10119         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
10120         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
10121         instead of __lll_compare_and_swap.
10122         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
10123         Likewise.
10124         Removed definition if __lll_compare_and_swap.
10126         * cancellation.c: Adjust for new form of compare&exchange macros.
10127         * cleanup_defer.c: Likewise.
10128         * init.c: Likewise.
10129         * libc-cancellation.c: Likewise.
10130         * old_pthread_cond_broadcast.c: Likewise.
10131         * old_pthread_cond_signal.c: Likewise.
10132         * old_pthread_cond_timedwait.c: Likewise.
10133         * old_pthread_cond_wait.c: Likewise.
10134         * pthread_cancel.c: Likewise.
10135         * pthread_create.c: Likewise.
10136         * pthread_detach.c: Likewise.
10137         * pthread_join.c: Likewise.
10138         * pthread_key_delete.c: Likewise.
10139         * pthread_setcancelstate.c: Likewise.
10140         * pthread_setcanceltype.c: Likewise.
10141         * pthread_timedjoin.c: Likewise.
10142         * pthread_tryjoin.c: Likewise.
10143         * sysdeps/pthread/createthread.c: Likewise.
10145 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
10147         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
10148         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
10149         definitions.  Replace uses with calls to atomic_* functions.
10150         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
10151         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
10152         __lll_test_and_set calls with atomic_exchange_and_add and
10153         atomic_exchange calls respectively.
10154         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
10155         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
10156         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
10157         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
10158         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
10159         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
10160         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
10162         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
10163         returns the old value.
10165 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
10167         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
10168         int for variable OLDVAL and correct inline assembler contraint.
10169         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
10170         type int for variable OLD.
10172         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
10173         only for s390-32.
10174         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
10175         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
10176         instead of multiple_threads field in the TCB.
10178 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
10180         * sysdeps/i386/i686/bits/atomic.h: Removed.
10181         * sysdeps/i386/i586/bits/atomic.h: Removed.
10182         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
10183         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
10184         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
10185         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
10186         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
10187         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
10188         * atomic.h: Removed.  Moved to glibc.
10190         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
10191         support for clock selection.
10193         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
10194         signalling waiters.
10196 2003-03-18  Roland McGrath  <roland@redhat.com>
10198         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
10199         Add __lll_rel_instr first.  Add memory clobber.
10200         (lll_mutex_unlock): Use __lll_test_and_set.
10201         From Paul Mackerras <paulus@samba.org>.
10203         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
10204         unconditionally.
10205         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
10206         (SINGLE_THREAD_P):  Add `header.' prefix.
10207         From Paul Mackerras <paulus@samba.org>.
10209         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
10210         pthread_timedjoin_np to ...
10211         (libpthread: GLIBC_2.3.3): ... here.
10212         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
10214         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
10215         Avoid shadowing VAL variable.
10217         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
10218         New macro.
10220 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
10222         * Makefile (tests): Add tst-cond11.
10223         * tst-cond11.c: New file.
10225         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
10226         struct passed to cleanup handler to eliminate one more
10227         instruction.
10228         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10230         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
10231         (pthrad_cond_t): Replace __unused field with __clock.
10233         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
10234         waken all waiters in cleanup handler.
10235         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
10236         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10238         * pthread_condattr_getclock.c: New file.
10239         * pthread_condattr_setclock.c: New file.
10240         * sysdeps/pthread/pthread.h: Declare these new functions.
10241         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
10242         * Makefile (libpthread-routines): Add the new functions.
10243         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
10244         Renamed field to value.  Document use of the bits.
10245         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
10246         change.
10247         * pthread_condattr_setpshared.c: Likewise.
10248         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
10249         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
10250         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
10251         Add __clock field.
10252         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
10253         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
10254         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
10255         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
10256         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
10257         Implement clock selection.
10258         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
10259         * pthread-errnos.sym: Add ENOSYS.
10260         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
10261         _POSIX_CLOCK_SELECTION.
10262         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
10264         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
10265         invalid .size directive.
10267 2003-03-17  Roland McGrath  <roland@redhat.com>
10269         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
10270         Formatting tweaks.
10272 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
10274         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
10275         Use __lll_add instead of spelling it out.  Use protected symbol names.
10276         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
10277         Use __lll_add.
10278         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
10279         Renamed from lll_compare_and_swap.  Use new name where necessary.
10280         (__lll_add): Defined.
10281         (__lll_dec_if_positive): Defined.
10282         (__lll_test_and_set): Defined.
10283         * sysdeps/ia64/pthread_spin_init.c: Removed.
10284         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
10285         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
10286         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
10287         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
10288         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
10289         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
10290         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
10291         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
10292         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
10293         __sync_lock_release_si.
10294         Patch by Jakub Jelinek.
10296         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
10297         Fix timeout handling.
10298         (__lll_timedwait_tid): Likewise.
10299         (lll_unlock_wake_cb): Wake up other waiters if necessary.
10300         Patch by Jakub Jelinek.
10302         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
10304 2003-03-17  Roland McGrath  <roland@redhat.com>
10306         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
10307         * sysdeps/pthread/pthread_spin_init.c: New file.
10308         * sysdeps/pthread/pthread_spin_unlock.c: New file.
10309         * sysdeps/powerpc/Makefile: New file.
10310         * sysdeps/powerpc/pthread_spin_lock.c: New file.
10311         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
10312         * sysdeps/powerpc/pthreaddef.h: New file.
10313         * sysdeps/powerpc/tcb-offsets.sym: New file.
10314         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
10315         * sysdeps/powerpc/tls.h: New file.
10316         * sysdeps/powerpc/bits/atomic.h: New file.
10317         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
10318         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
10319         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
10321         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
10322         * sysdeps/unix/sysv/linux/sem_post.c: New file.
10323         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
10324         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
10325         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
10326         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
10327         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
10328         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
10329         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
10330         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
10331         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
10332         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
10333         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
10334         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
10335         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
10337         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
10338         not gettimeofday.
10339         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
10340         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
10341         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
10342         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
10343         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10345 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
10347         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
10348         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
10349         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10350         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10351         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
10353 2003-03-16  Roland McGrath  <roland@redhat.com>
10355         * tst-fork4.c: Include <string.h>.
10356         * tst-signal2.c: Likewise.
10357         * tst-mutex5.c (do_test): exit -> return.
10358         * tst-mutex2.c: Include <stdlib.h>.
10360 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
10362         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
10363         (__lll_mutex_timedlock_wait): Correct expected value after
10364         spurious wakeup.  Otherwise we would never wait again.
10366         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
10367         zone versus inline asm stupidity.  Use correct instructions.
10369         * tst-rwlock6.c: Add some more status output.
10371 2003-03-15  Roland McGrath  <roland@redhat.com>
10373         * sysdeps/pthread/configure.in: New file.
10374         * sysdeps/pthread/configure: New file (generated).
10376 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
10378         * allocatestack.c (allocate_stack): Store the exact stack size of
10379         user allocated stacks.
10381 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
10383         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
10384         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
10385         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
10386         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
10387         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
10388         Use `header.' prefix.
10389         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
10391 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
10393         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
10394         __builtin_frame_address, use stack pointer.
10396         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
10397         instead of __builtin_frame_pointer.
10399 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
10401         * tst-basic1.c (do_test): Add cast to avoid warning.
10402         * tst-basic2.c (do_test): Likewise.
10404         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
10405         amount of stack correction.
10407         * tst-fork4.c: Use test-skeleton.c.
10409 2003-03-14  Roland McGrath  <roland@redhat.com>
10411         * init.c: Fix typo "#eli" for "#else".
10413 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
10415         * allocatestack.c (__stack_user): Use hidden_data_def.
10416         * pthread_create.c (__pthread_keys): Likewise.
10418         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
10420 2003-03-14  Roland McGrath  <roland@redhat.com>
10422         * tst-fork4.c: New file.
10423         * Makefile (tests): Add it.
10425         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
10426         we always define the padding space.
10427         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
10428         stopped supporting its own extensions fully.
10429         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
10430         struct also called `header', so `header.multiple_threads' is the field
10431         name to use on all machines.
10432         * allocatestack.c (allocate_stack): Use `header.' prefix.
10433         * sysdeps/pthread/createthread.c (create_thread): Likewise.
10434         * pthread_create.c (__pthread_create_2_1): Likewise.
10435         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
10436         (THREAD_SELF): Likewise.
10437         * sysdeps/x86_64/tls.h: Likewise.
10438         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
10439         (SINGLE_THREAD_P): Likewise.
10440         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
10441         (SINGLE_THREAD_P): Likewise.
10442         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
10443         (SINGLE_THREAD_P): Likewise.
10445         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
10446         value directly.
10448 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
10450         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
10451         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
10453         * pthread_create.c (start_thread): setjmp is expected to return 0.
10455         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
10456         (THREAD_GETMEM_NC): Likewise.
10458 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
10460         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
10461         and the size of the stack which must be allocated is a multiple,
10462         allocate one more page.
10463         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
10464         MULTI_PAGE_ALIASING.
10466 2003-03-13  Roland McGrath  <roland@redhat.com>
10468         * pthread_create.c (start_thread): Set EXITING_BIT after the
10469         event-reporting (and destructors), not before.
10471 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
10473         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
10474         lll_futex_wake): Declare register variables as long int instead of
10475         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
10476         Make syscall arguments clobbered by the syscall.
10477         (lll_futex_wait): Define using lll_futex_timed_wait.
10479         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
10480         to void *.
10482         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
10483         PPID if [! NDEBUG].
10485         * allocatestack.c (nptl_ncreated): Only declare if
10486         COLORING_INCREMENT != 0.
10488         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
10489         (__libc_enable_asynccancel_2): Remove prototype.
10491         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
10492         ctid to match kernel.
10494 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
10496         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
10497         libc_multiple_threads.
10498         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
10499         __libc_multiple_threads to...
10500         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
10502         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
10503         versioning.
10504         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10505         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10507         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
10508         (__pthread_once_internal): Define.
10510         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
10511         macros instead of .symver directly.
10512         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
10513         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
10515         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
10516         * sysdeps/x86_64/tcb-offsets.sym: New file.
10517         * sysdeps/x86_64/Makefile: New file.
10519         * sysdeps/i386/tcb-offsets.sym: Add SELF.
10520         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
10521         to access own pthread_t in TCB.
10522         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10523         Likewise.
10524         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10525         Likewise.
10526         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10528 2003-03-12  Roland McGrath  <roland@redhat.com>
10530         * pthread-errnos.sym: New file.
10531         * Makefile (gen-as-const-headers): New variable, list that file.
10532         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
10533         header <pthread-errnos.h> instead of defining errno values here.
10534         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
10535         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
10536         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
10537         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10538         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10539         Likewise.
10540         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10541         Likewise.
10542         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
10543         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10544         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10545         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10546         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10547         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10548         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
10549         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
10550         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
10551         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
10552         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
10553         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
10554         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
10555         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
10556         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
10557         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
10558         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
10559         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
10560         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
10561         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
10562         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10563         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
10564         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
10565         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
10566         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
10567         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
10568         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
10570         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
10571         CLONE_CHILD_SETTID worked.
10573 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
10575         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
10576         file.
10577         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
10578         file.
10580         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
10581         (pthread_cond_t): Add padding.
10583         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
10584         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
10585         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
10587         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
10588         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
10589         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
10590         (__pthread_rwlock_timedrdlock): Likewise.
10591         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
10592         (__pthread_rwlock_wrlock): Likewise.
10593         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
10594         (__pthread_rwlock_rdlock): Likewise.
10596         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
10598         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
10599         result of lock re-get if it fails.
10601 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
10603         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
10604         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
10605         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
10606         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
10607         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
10608         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
10609         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
10610         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
10611         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10612         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10614         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
10615         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
10617         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
10618         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
10619         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
10620         (create_thread): Likewise.
10621         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
10622         * init.c (__pthread_initialize_minimal_internal): Initialize
10623         __libc_multiple_threads_ptr if necessary.
10624         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
10625         __pthread_multiple_threads and __libc_multiple_threads_ptr.
10626         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
10627         __libc_multiple_threads.
10628         (__libc_pthread_init): Return pointer to __libc_pthread_init if
10629         necessary.
10631         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
10632         (THREAD_SETMEM_NC): Likewise.
10634         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
10635         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
10636         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
10637         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
10639         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
10640         Eliminate one entire instruction.
10642         * cancellation.c (__pthread_enable_asynccancel_2): New function.
10643         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
10644         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
10645         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
10646         instead of __pthread_enable_asynccancel.
10647         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10648         (__pthread_cond_wait): Likewise.
10649         * sysdeps/pthread/pthread_cond_timedwait.c
10650         (__pthread_cond_timedwait): Likewise.
10651         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
10653         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10654         (__condvar_cleanup): Wake up all waiters in case we got signaled
10655         after being woken up but before disabling asynchronous
10656         cancellation.
10657         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10658         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
10659         (__condvar_cleanup): Likewise.
10661         * init.c (__NR_set_tid_address): If already defined, don't redefine.
10662         Make it an error if architecture has no #if case.  Add x86-64.
10664         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
10665         pt-initfini.s generation.
10667         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
10668         (TLS_INIT_TP): Fix typo.
10670 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
10672         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
10673         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
10675         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
10676         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
10677         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
10678         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
10679         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
10680         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10681         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10682         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10684 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
10686         * sysdeps/pthread/pthread_cond_timedwait.c
10687         (__pthread_cond_timedwait): Return the result of the final
10688         locking.  If it succeeds, the regular function return value.
10690         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
10691         Return result of the final locking.
10692         * version.c (__nptl_main): Work around problems with the strange
10693         INTERNAL_SYSCALL macro on ppc32.
10694         * init.c (__pthread_initialize_minimal_internal): Unblock
10695         SIGCANCEL in case the parent blocked it.
10696         Reported by Paul Mackerras <paulus@samba.org>.
10698         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
10699         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
10700         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
10702 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
10704         * sysdeps/pthread/pthread_cond_timedwait.c
10705         (__pthread_cond_timedwait): Unlock and fail if
10706         __pthread_mutex_unlock_internal failed.
10708         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
10709         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
10710         Use ARCH_CLONE.
10711         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
10712         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
10713         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
10714         ALLOCATE_STACK): New macros.
10715         (TLS_TPADJ): New macro.
10716         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
10717         (allocate_stack): Handle TLS_DTV_AT_TP and
10718         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
10719         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
10720         Don't set PD->self.
10721         * init.c [__ia64__] (__NR_set_tid_address): Define.
10723         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
10724         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
10725         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
10726         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
10727         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
10728         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
10729         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
10730         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
10731         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
10732         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
10733         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
10734         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
10735         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
10736         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
10737         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
10738         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
10739         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
10740         * sysdeps/ia64/bits/atomic.h: New file.
10741         * sysdeps/ia64/Makefile: New file.
10742         * sysdeps/ia64/pthread_spin_init.c: New file.
10743         * sysdeps/ia64/pthread_spin_lock.c: New file.
10744         * sysdeps/ia64/pthread_spin_trylock.c: New file.
10745         * sysdeps/ia64/pthread_spin_unlock.c: New file.
10746         * sysdeps/ia64/pthreaddef.h: New file.
10747         * sysdeps/ia64/tcb-offsets.sym: New file.
10748         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
10749         * sysdeps/ia64/tls.h: New file.
10751         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
10752         to syscall instead of no arguments.
10754 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
10756         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
10757         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
10758         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
10759         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
10761         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
10762         unused code.
10764         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
10766         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10767         lowlevelbarrier.sym.
10768         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
10769         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
10770         Include lowlevelbarrier.h and don't define offsets locally.
10771         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
10773         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
10774         (__lll_mutex_lock_wait): Reverse order of first two parameters.
10775         (__lll_mutex_timedlock_wait): Likewise.
10776         (lll_mutex_lock): Adjust asm for that.
10777         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
10778         (lll_lock): Adjust asm for operand order change.
10779         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
10780         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
10782         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
10783         Reverse order of parameters.
10784         (__lll_timedwait_tid): Remove regparms attribute.
10785         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
10786         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
10788         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10789         (__lll_timedwait_tid): Remove one unnecessary instruction.
10791         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
10792         __lll_mutex_timedlock_wait only for NOT_IN_libc.
10793         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
10794         lowlevelmutex.S.
10796         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
10797         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
10798         for NOT_IN_libc.
10799         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
10800         lowlevellock.S.
10802         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
10803         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
10804         for libc.so.
10805         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
10806         define LOCK here (if UP is not defined).  The actual code is in
10807         lowlevelmutex.S.
10809         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
10810         LOCK is already defined.  Don't define lll_unlock_wake_cb and
10811         __lll_timedwait_tid for libc.so.
10812         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
10813         define LOCK here (if UP is not defined).  The actual code is in
10814         lowlevellock.S.
10816         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
10817         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
10818         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
10819         instead of lowlevelsem.h.
10820         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10821         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10822         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10824         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10825         lowlevelrwlock.sym.
10826         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
10827         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
10828         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
10830         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
10831         register loading.
10832         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
10833         last changed.  D'oh.
10835         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
10837         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
10838         of __libc_locking_needed.
10839         (lll_trylock): Initialize %eax to zero.
10841         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
10842         pthread_cond_t definition.
10844 2003-03-10  Roland McGrath  <roland@redhat.com>
10846         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
10847         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
10848         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
10849         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
10850         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
10852         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
10853         Instead of setting PD->multiple_threads, set globals
10854         __pthread_multiple_threads and __libc_multiple_threads.
10855         * sysdeps/pthread/createthread.c (create_thread): Likewise.
10856         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
10857         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
10859         * descr.h (struct pthread): Conditionalize first member on
10860         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
10861         containing an anonymous tcbhead_t.  Move `list' member out.
10862         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
10863         * allocatestack.c: Remove use of `header.data.' prefix.
10864         * pthread_create.c: Likewise.
10865         * init.c (__pthread_initialize_minimal_internal): Likewise.
10866         * sysdeps/pthread/createthread.c (create_thread): Likewise.
10867         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
10868         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
10869         * sysdeps/x86_64/tls.h: Likewise.
10870         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
10871         (SINGLE_THREAD_P): Likewise.
10872         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
10873         (SINGLE_THREAD_P): Likewise.
10874         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
10875         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
10877 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
10879         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
10881         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
10882         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10884         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
10885         leftovers from the ia32 code.
10887         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
10888         memory load.
10889         (clear_once_control): Don't load %esi.
10891         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
10892         handling.
10894         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
10896         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
10897         * sysdeps/unix/sysv/linux/createthread.c: ...here.
10899         * Makefile (tests): Add tst-cond10.
10900         * tst-cond10.c: New file.
10902 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
10904         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
10905         * tst-signal3.c (do_test): Likewise.
10906         * tst-sem5.c (do_test): Likewise.
10907         * tst-kill6.c (do_test): Likewise.
10908         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
10910         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
10911         of inc/dec.
10912         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
10913         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
10914         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
10915         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
10916         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10917         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
10918         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10919         Likewise.
10920         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10921         Likewise.
10922         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
10923         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10924         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10925         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
10926         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
10927         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
10928         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10929         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10931         * allocatestack.c (allocate_stack): If mprotect() fails free the
10932         TLS memory.
10934 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
10936         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
10938         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
10939         lll_wake_tid.  This was used only to work around kernel limits in
10940         the early days.
10941         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
10942         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
10943         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10944         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
10946         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
10947         (__pthread_initialize_minimal_internal): Change initialization of
10948         __static_tls_align_m1 appropriately.
10949         * pthreadP.h (__static_tls_align_m1): Renamed from
10950         __static_tls_align.
10951         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
10952         instead of __static_tls_align-1.
10954 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
10956         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
10958         * pthread_create.c: Define __pthread_keys using nocommon
10959         attribute, not by placing it explicitly in bss.
10960         Remove DEFINE_DEALLOC definition.  Not needed anymore.
10962         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
10963         Use it in mmap call to allocate stacks.
10965         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
10967         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
10968         result of the thread function.
10970 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
10972         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
10973         version is just fine.
10975         * sysdeps/unix/sysv/linux/libc_pthread_init.c
10976         (__pthread_child_handler): Renamed from pthread_child_handler,
10977         exported, and marked hidden.  Change all users.
10978         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
10979         free __pthread_child_handler from child list.
10981 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
10983         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
10985         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
10986         Fix handling of cancellation and failing pthread_mutex_unlock call.
10987         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10988         (__pthread_cond_wait): Likewise.
10990         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
10991         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
10992         lll_futex_timed_wait call.
10993         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
10994         (pthread_rwlock_timedwrlock): Likewise.
10996         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
10997         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
10998         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
11000         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
11001         check of lll_futex_wake return value.
11003 2003-03-03  Roland McGrath  <roland@redhat.com>
11005         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
11007         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
11008         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
11009         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
11011 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
11013         * sysdeps/pthread/timer_create.c (timer_create): Return correct
11014         error for CPU clocks.
11016         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
11017         _POSIX_MONOTONIC_CLOCK.
11018         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
11020         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
11021         recent kernels.
11023 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
11025         * descr.h (struct pthread): Move cleanup field to the front.
11027 2003-03-01  Roland McGrath  <roland@redhat.com>
11029         * sem_open.c (sem_open): Braino fix.
11031 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
11033         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
11034         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
11035         __pthread_cleanup_pop functionality.
11036         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
11038         * descr.h (struct pthread): Move tid field to the front now that
11039         it is often used.
11041         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
11042         (__lll_mutex_timedlock_wait): Remove.
11043         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
11044         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
11045         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
11046         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
11047         (lll_unlock_wake_cb): Don't save and restore %esi.
11048         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
11049         %esi.
11050         (__lll_timedwait_tid): Add alignment.
11051         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
11052         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
11053         %esi.
11054         (__lll_timedwait_tid): Removed.
11055         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
11056         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
11057         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
11058         (pthread_barrier_wait): Don't save, load, and restore %esi for
11059         last thread.
11060         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
11061         (__pthread_cond_signal): Don't save, load, and restore %esi.
11062         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
11063         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
11064         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
11065         Don't save, load, and restore %esi.
11067 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
11069         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
11070         Release lock before waking up the waiters.
11072         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
11074         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
11075         (reader_thread): Likewise.
11077         * sysdeps/pthread/pthread_rwlock_unlock.c
11078         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
11079         to wake up readers if there are none.
11081         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
11082         Release internal lock before wake threads.
11084 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
11086         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
11087         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
11088         predefined.
11089         * tst-rwlock9.c: Likewise.
11090         * tst-rwlock10.c: New file.
11091         * tst-rwlock11.c: New file.
11093         * Makefile (tests): Add tst-dlsym1.
11094         * tst-dlsym1.c: New file.
11096         * init.c (__pthread_initialize_minimal_internal): Set
11097         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
11098         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
11100 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
11102         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
11104         * tst-cond2.c: Fix sychronization with child.
11106         * tst-rwlock8.c (reader_thread): Remove unused variable.
11108         * Makefile: Add rules to build and run tst-tls3.
11109         * tst-tls3.c: New file.
11110         * tst-tls3mod.c: New file.
11112         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
11113         * tst-rwlock8.c: New file.
11114         * tst-rwlock9.c: New file.
11115         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
11116         complete broken rwlock implementation.
11117         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11118         Likewise.
11119         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11120         Likewise.
11121         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
11122         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
11123         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
11124         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
11125         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
11126         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
11127         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
11129 2003-02-23  Roland McGrath  <roland@redhat.com>
11131         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
11133 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
11135         * Makefile (tests): Add tst-context1.
11136         * tst-context1.c: New file.
11138         * Makefile (tests): Add tst-tls1 and tst-tls2.
11139         * tst-tls1.c: New file.
11140         * tst-tls2.c: New file.
11142         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
11143         for failed cmpxchg.
11145         * pthread_create.c (start_thread): Set EXITING_BIT early.
11147         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
11148         (THREAD_GETMEM_NC): Likewise.
11150 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
11152         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
11153         off 3 more bytes by using offset-less instructions when possible.
11155         * Makefile: Add dependency for $(objpfx)version.d.
11157         * eintr.c (eintr_source): Add unnecessary return but the compiler
11158         insists.
11160         * tst-kill3.c: Include <unistd.h>.
11162 2003-02-21  Roland McGrath  <roland@redhat.com>
11164         * pthread_create.c (start_thread): Call __libc_thread_freeres.
11166 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
11168         * Makefile (tests): Add tst-eintr1.
11169         (distribute): Add eintr.c.
11170         * tst-eintr1.c: New file.
11171         * eintr.c: New file.
11173         * pthread_cancel.c (pthread_cancel): Use tkill directly.
11175         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
11176         Disallow sending SIGCANCEL.
11178         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
11179         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
11180         * tst-kill1.c: New file.
11181         * tst-kill2.c: New file.
11182         * tst-kill3.c: New file.
11183         * tst-kill5.c: New file.
11184         * tst-kill6.c: New file.
11185         * tst-basic7.c: Renamed to...
11186         * tst-kill4.c: ...this.
11188 2003-02-21  Roland McGrath  <roland@redhat.com>
11190         * Makefile (install-lib-ldscripts): New variable.
11192 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
11194         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
11195         * pthread_cancel.c: Use INVALID_TD_P.
11196         * pthread_detach.c: Likewise.
11197         * pthread_getschedparam.c: Likewise.
11198         * pthread_setschedparam.c: Likewise.
11199         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
11200         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
11201         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
11202         * pthread_timedjoin.c: Likewise.
11204         * tst-basic7.c: Include <signal.h>.
11206         * pthread_join.c (pthread_join): Limited checking for invalid
11207         descriptors.
11208         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
11210 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
11212         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
11213         beginning of the loop.  Clear the entire first block of TSD.
11214         * Makefile (tests): Add tst-key4.
11215         * tst-key4.c: New file.
11217 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
11219         * Makefile (tests): Add tst-basic7.
11220         * tst-basic7.c: New file.
11222         * pthread_create.c (deallocate_tsd): Mark as internal_function.
11223         Add some more __builtin_expect.
11225         * pthreadP.h: Define dummy version of DEBUGGING_P.
11227 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
11229         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
11230         _POSIX_THREAD_PRIORITY_SCHEDULING.
11231         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
11232         _XOPEN_REALTIME_THREADS.
11233         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
11235         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
11236         kernel returns EINVAL for PID <= 0, work around it.
11238         * Makefile (tests): Add tst-signal5.
11239         * tst-signal5.c: New file.
11241         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
11242         and LOGIN_NAME_MAX.
11244         * tst-cancel1.c (tf): Block all signals.
11246         * Makefile (tests): Add tst-basic6.
11247         * tst-basic6.c: New file.
11249         * tst-basic1.c: Add test for process ID.
11251         * Makefile (tests): Add tst-cancel10.
11252         * tst-cancel10.c: New file.
11254         * Makefile (tests): Add tst-signal4.
11255         * tst-signal4.c: New file.
11257         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
11258         __sigismember instead of sigismember.  Add __builtin_expect.
11260 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
11262         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
11263         pthread_setcancelstate, and pthread_rwlock_setpshared.
11265         * tst-cancel7.c (do_test): Make sure the pid file exists before
11266         canceling the thread.
11268         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
11269         pthread_rwlock_timedrdlock tests.
11270         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
11271         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11272         Check for invalid tv_nsec field.
11273         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11274         Likewise.
11276         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
11277         recursive mutex of overflow.
11279         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
11281         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
11282         going into an endless loop.
11283         * Makefile (tests): Add tst-cancel9.
11284         * tst-cancel9.c: New file.
11286         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
11288 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
11290         * tst-mutex5.c (do_test): Add more timedlock tests.
11292         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
11293         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
11295         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
11296         use INLINE_SYSCALL.  Error number is returned, not -1.
11298         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
11299         and __deallocate_stack with internal_function.
11300         * pthread_create.c: Adjust definitions appropriately.
11301         * allocatestack.c: Likewise.
11303         * pthread_join.c: Add one more __builtin_expect.
11304         * pthread_timedjoin.c: Likewise.
11306         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
11307         not data of sequence number does not match.
11308         Add one __builtin_expect.
11310         * Makefile (tests): Add tst-clock1.
11311         * tst-clock1.c: New file.
11313         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
11314         negative arguments.
11315         * Makefile (tests): Add tst-basic5.
11316         * tst-basic5.c: New file.
11318 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
11320         * Makefile (tests): Add tst-basic4.
11321         * tst-basic4.c: New file.
11323         * pthreadP.h: Add declaraction for __nptl_nthreads.
11324         * pthread_create.c: Define __nptl_nthreads
11325         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
11326         after thread is done.  If then zero, call exit(0).
11327         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
11328         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
11329         * init.c (pthread_functions): Initialize ptr_nthreads.
11330         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
11331         (__reclaim_stacks): Decrement __nptl_nthreads.
11332         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
11333         Define.
11334         * Makefile (tests): Add tst-basic3.
11335         * tst-basic3.c: New file.
11337         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
11338         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
11339         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
11340         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
11341         if asynchronous canceling is enabled.
11342         * pthread_join.c (pthread_join): When recognizing circular joins,
11343         take into account the other thread might be already canceled.
11344         * Makefile (tests): Add tst-join5.
11345         * tst-join5.c: New file.
11347         * Makefile (tests): Add tst-join4.
11348         * tst-join4.c: New file.
11350 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
11352         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
11354 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
11356         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
11357         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
11358         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
11359         warning.
11360         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
11361         to avoid warning.
11362         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
11363         error if lll_futex_wake failed.
11365 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
11367         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
11368         handling of cancellation and failung pthread_mutex_unlock call.
11369         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
11370         * Makefile (tests): Add tst-cond8 and tst-cond9.
11371         * tst-cond8.c: New file.
11372         * tst-cond9.c: New file.
11374         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
11376         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
11377         non-standard initializers with __USE_GNU.
11379         * Makefile (tests): Add tst-cleanup3.
11380         * tst-cleanup3.c: New file.
11382 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
11384         * Makefile (tests): Add tst-attr1 and tst-attr2.
11385         * tst-attr1.c: New file.
11386         * tst-attr2.c: New file.
11388         * Makefile: Add rules to build and run tst-atfork2 test.
11389         * tst-atfork2.c: New file.
11390         * tst-atfork2mod.c: New file.
11392         * sysdeps/unix/sysv/linux/unregister-atfork.c
11393         (__unregister_atfork): Free the memory allocated for the handlers
11394         after removing them from the lists.
11396         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
11397         cleanup function.
11399         * tst-atfork1.c (do_test): Wait for the child we forked.
11400         Report error in child.
11402         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
11404         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
11406 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
11408         * Makefile (tests): Add tst-cancel8.
11409         * tst-cancel8.c: New file.
11411         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
11412         clearing of control variable.
11413         * Makefile (tests): Add tst-once3 and tst-once4.
11414         * tst-once3.c: New file.
11415         * tst-once4.c: New file.
11417 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
11419         * sysdeps/sh/Makefile: New file.
11420         * sysdeps/sh/bits/atomic.h: New file.
11421         * sysdeps/sh/pthread_spin_init.c: New file.
11422         * sysdeps/sh/pthread_spin_lock.c: New file.
11423         * sysdeps/sh/pthread_spin_trylock.S: New file.
11424         * sysdeps/sh/pthread_spin_unlock.S: New file.
11425         * sysdeps/sh/pthreaddef.h: New file.
11426         * sysdeps/sh/tcb-offsets.sym: New file.
11427         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
11428         * sysdeps/sh/tls.h: New file.
11429         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
11430         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
11431         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
11432         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
11433         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
11434         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
11435         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
11436         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
11437         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
11438         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
11439         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
11440         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
11441         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
11442         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
11443         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
11444         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
11445         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
11446         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
11447         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
11448         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
11449         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
11450         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
11451         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
11452         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
11453         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
11454         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
11455         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
11456         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
11457         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
11458         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
11460 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
11462         * tst-cond2.c: Rearrange code to not rely on behavior undefined
11463         according to POSIX.
11465         * tst-basic2.c (do_test): Lock mutex before creating the thread.
11467 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
11469         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
11470         (TLS_GET_FS): New #define.
11471         (TLS_SET_FS): New #define.
11472         Correct value of __NR_set_thread_area.
11474         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
11476 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
11478         * Makefile (tests): Add tst-popen1.
11479         * tst-popen1.c: New file.
11481         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
11482         but inactive generalization.
11483         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
11484         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
11485         Minor optimization, remove one instruction.
11486         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
11488 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
11490         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
11492 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
11494         * init.c (__NR_set_tid_address): Add #ifdef for s390.
11495         * sysdeps/pthread/pthread_barrier_wait.c: New file.
11496         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
11497         * sysdeps/pthread/pthread_cond_signal.c: New file.
11498         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
11499         * sysdeps/pthread/pthread_cond_wait.c: New file.
11500         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
11501         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
11502         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
11503         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
11504         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
11505         * sysdeps/s390/Makefile: New file.
11506         * sysdeps/s390/bits/atomic.h: New file.
11507         * sysdeps/s390/pthread_spin_init.c: New file.
11508         * sysdeps/s390/pthread_spin_lock.c: New file.
11509         * sysdeps/s390/pthread_spin_trylock.c: New file.
11510         * sysdeps/s390/pthread_spin_unlock.c: New file.
11511         * sysdeps/s390/pthreaddef.h: New file.
11512         * sysdeps/s390/tcb-offsets.sym: New file.
11513         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
11514         * sysdeps/s390/tls.h: New file.
11515         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
11516         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
11517         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
11518         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
11519         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
11520         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
11521         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
11522         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
11523         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
11524         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
11525         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
11526         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
11527         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
11528         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
11529         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
11530         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
11531         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
11532         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
11533         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
11534         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
11535         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
11536         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
11537         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
11539 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
11541         * atomic.h: Add a couple more default implementations.
11542         (atomic_compare_and_exchange_acq): Use
11543         __arch_compare_and_exchange_32_acq in return value definition.  It
11544         always exists.
11545         (atomic_bit_set): Renamed from atomic_set_bit.
11546         Add missing atomic_ prefixes.
11548         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
11549         thread library is available, use correct value to mark initialized
11550         once variable.
11552 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
11554         * allocatestack.c (allocate_stack): Use __getpagesize instead of
11555         __sysconf to determine pagesize.
11557         * pthread_create.c: Include <atomic.h>.
11558         * allocatestack.c (allocate_stack): Implement coloring of the
11559         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
11560         size minus one.  Adjust users.
11561         * sysdeps/i386/i686/Makefile: New file.
11563 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
11565         * allocatestack.c: Improve comment throughout the file.
11567         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
11568         (__lll_lock_wait): Add branch prediction.
11569         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
11570         (__lll_lock_wait): Likewise.
11571         (lll_unlock_wake_cb): Removed.
11573 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
11575         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
11576         _POSIX_THREAD_PRIORITY_SCHEDULING.
11578 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
11580         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
11581         Fix return type of ptr___pthread_getspecific.
11583 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
11585         * Makefile (tests): Add tst-umask1.
11586         (tst-umask1-ARGS): Define.
11587         * tst-umask1.c: New file.
11589 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
11591         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
11592         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
11593         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
11594         pthread_rwlock_unlock.
11595         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
11596         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
11597         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
11598         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
11599         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11600         New file.
11601         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
11602         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11603         New file.
11604         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
11605         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
11606         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
11607         New file.
11608         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
11609         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
11610         New file.
11611         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
11612         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
11613         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
11614         New file.
11615         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
11616         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
11617         New file.
11618         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
11620         * Makefile (libpthread-routines): Remove lowlevelcond and
11621         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
11622         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
11623         and pthread_cond_broadcast.
11624         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
11625         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
11626         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
11627         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
11628         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
11629         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
11630         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
11631         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
11632         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
11633         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
11634         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
11635         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
11636         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
11637         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
11638         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
11639         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
11640         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
11641         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
11642         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
11643         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
11644         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
11645         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
11646         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
11647         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
11648         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
11649         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
11650         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
11651         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
11652         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
11653         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
11654         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
11656         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
11657         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
11658         of the code is moved to ...
11659         * sysdeps/pthread/createthread.c: ...here.  New file.
11661 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
11663         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
11664         (__new_sem_post): Clear %eax before returning.
11665         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
11667         * Makefile (tests): Add tst-cleanup2.
11668         * tst-cleanup2.c: New file.
11670         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
11671         Interpret first parameter correctly.
11673 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
11675         * Makefile (headers): Add bits/semaphore.h.
11677 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
11679         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
11680         if not SHARED.
11682 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
11684         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
11685         must be used and mapping failed.
11686         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
11688         * Makefile (CFLAGS-pthread_self.os): Define this, not
11689         CFLAGS-pthread_self.c.
11691 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
11693         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
11694         lll_unlock_wake_cb.
11696         * Makefile (libpthread-routines): Add version.  Add rules to build
11697         version.os and banner.h.
11698         * version.c: New file.
11700 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
11702         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
11703         the alias unconditional.
11704         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
11706 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
11708         * Makefile (CFLAGS-pthread_self.c): New definition.
11710 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
11712         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
11713         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
11714         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
11715         * init.c (__pthread_initialize_minimal_internal): Likewise.
11717 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
11719         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
11721         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
11722         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11723         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11724         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
11725         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11726         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11728 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
11730         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
11731         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
11732         * tst-cancel-wrappers.sh: Remove all exceptions.
11734 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
11736         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
11737         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
11739         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
11740         Use __libc_pthread_functions array if SHARED.
11742         * pthreadP.h: Move pthread_cond_2_0_t definition to...
11743         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
11745         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
11746         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
11747         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
11748         __libc_ptf_call instead of __libc_maybe_call.
11749         (PTF): New #define.
11750         (__libc_cleanup_region_start): Wrap function name with PTF call.
11751         (__libc_cleanup_region_end): Likewise.
11752         (__libc_cleanup_end): Likewise.
11754         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
11755         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
11756         * pthread_key_create.c: Add __pthread_key_create_internal alias.
11757         * pthreadP.h: Add prototypes.
11759         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
11760         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
11761         __pthread_rwlock_unlock aliases.
11762         * pthreadP.h: Add prototypes for new aliases.
11764         * pthreadP.h (struct pthead_functions): Moved to...
11765         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
11766         * init.c (pthread_functions): Add initializers for new elements.
11768         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
11769         __pthread_cleanup_pop_restore aliases.
11770         * pthreadP.h: Add prototypes.
11772         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
11773         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
11774         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
11775         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
11776         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
11777         * pthreadP.h: Adjust prototypes and callers.
11779 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
11781         * Makefile (tests): Add tst-cancel7.
11782         (tst-cancel7-ARGS): New variable.
11783         * tst-cancel7.c: New file.
11785         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
11786         around gcc defficiencies.
11787         * old_pthread_cond_signal.c: Likewise.
11788         * old_pthread_cond_timedwait.c: Likewise.
11789         * old_pthread_cond_wait.c: Likewise.
11791         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
11793 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
11795         * Makefile (tests): Add tst-cond7.
11796         * tst-cond7.c: New file.
11798         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11799         (condvar_cleanup): Get condvar address from the right place.
11801         * atomic.h: Correct definitions of atomic_full_barrier,
11802         atomic_read_barrier, atomic_write_barrier.
11804         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
11805         race-free.
11806         * old_pthread_cond_signal.c: Likewise.
11807         * old_pthread_cond_timedwait.c: Likewise.
11808         * old_pthread_cond_wait.c: Likewise.
11810 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
11812         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
11814 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
11816         * pthreadP.h (pthread_cond_2_0_t): New type.
11817         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
11818         Use new type for the 2.0 condvar function prototypes.
11819         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
11820         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
11821         parameter.
11822         * old_pthread_cond_destroy.c: Likewise.
11823         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
11824         * old_pthread_cond_signal.c: Likewise.
11825         * old_pthread_cond_timedwait.c: Likewise.
11826         * old_pthread_cond_wait.c: Likewise.
11828         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11829         (__pthread_cond_wait): Don't save cancellation mode and seq value
11830         in same location.
11832         * herrno.c (__h_errno_location): Don't define as weak.
11834 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
11836         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
11837         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
11838         and pthread_cond_wait.
11839         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
11840         Renamed to...
11841         (__pthread_cond_broadcast_2_0): ... this.
11842         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
11843         Renamed to...
11844         (__pthread_cond_destroy_2_0): ... this.
11845         * old_pthread_cond_init.c (__old_pthread_cond_init):
11846         Renamed to...
11847         (__pthread_cond_init_2_0): ... this.
11848         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
11849         Renamed to...
11850         (__pthread_cond_signal_2_0): ... this.
11851         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
11852         Renamed to...
11853         (__pthread_cond_wait_2_0): ... this.
11854         * pthread_cond_destroy.c: Include shlib-compat.h.
11855         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
11856         * pthread_cond_init.c: Include shlib-compat.h.
11857         (pthread_cond_init): Change strong_alias into versioned_symbol.
11858         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
11859         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
11860         fields.
11861         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
11862         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
11863         __pthread_cond_wait_2_0): New prototypes.
11864         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
11865         __old_pthread_cond_init, __old_pthread_cond_signal,
11866         __old_pthread_cond_wait): Removed.
11867         * init.c: Include shlib-compat.h.
11868         (pthread_functions): Guard ptr___pthread_attr_init_2_0
11869         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
11870         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
11871         ptr___pthread_cond_*_2_0 fields.
11872         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
11873         pthread_cond_*@GLIBC_2.0 compatibility symbols.
11875         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
11876         LIBC_SIGACTION was not yet defined.
11877         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
11878         [!defined LIBC_SIGACTION] (__sigaction): New function and
11879         libc_hidden_weak.
11880         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
11881         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
11883 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
11885         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
11887 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
11889         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
11890         New, larger type definition.
11891         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
11892         implementation.
11893         * Versions [libpthread]: Add definitions for new pthread_cond_*
11894         interfaces for version GLIBC_2.3.2.
11895         * pthread_cond_init.c: Update initialization for new type definition.
11896         * Makefile (libpthread-routines): Remove pthread_cond_wait,
11897         pthread_cond_timedwait, pthread_cond_signal, and
11898         pthread_cond_broadcast.  Add old_pthread_cond_init,
11899         old_pthread_cond_destroy, old_pthread_cond_wait,
11900         old_pthread_cond_timedwait, old_pthread_cond_signal, and
11901         old_pthread_cond_broadcast.
11902         * old_pthread_cond_broadcast.c: New file.
11903         * old_pthread_cond_destroy.c: New file.
11904         * old_pthread_cond_init.c: New file.
11905         * old_pthread_cond_signal.c: New file.
11906         * old_pthread_cond_timedwait.c: New file.
11907         * old_pthread_cond_wait.c: New file.
11908         * pthreadP.h: Add prototypes for the compatibility interfaces.
11910         * pthread_cond_destroy.c: Don't include <errno.h>.
11912 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
11914         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
11915         unnecessary zero offset when addressing MUTEX.
11917 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
11919         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
11920         __register_atfork.
11921         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
11922         for __register_atfork.
11924 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
11926         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
11927         instead of ASSEMBLER test macro.
11929         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
11930         __libc_current_sigrtmax): Add libc_hidden_def.
11932         * sysdeps/pthread/list.h: Remove assert.h include.
11934 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
11936         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
11937         __pthread_initialize_minimal_internal not
11938         __pthread_initialize_minimal.
11940 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
11942         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
11943         __pthread_initialize_minimal as hidden.
11945         * init.c (__pthread_initialize_minimal_internal): Don't mark as
11946         constructor.
11948 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
11950         * Makefile ($(inst_libdir)/libpthread.so): Depend on
11951         $(common-objpfx)format.lds, include that into the output script.
11952         Fix comment.
11953         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
11955 2002-12-28  Andreas Jaeger  <aj@suse.de>
11957         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
11958         nsec resolution changes.
11959         (xstat64_conv): Likewise.
11960         (xstat32_conv): Likewise.
11961         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
11962         struct kernel_stat.
11963         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
11964         structs stat and stat64.
11965         * time/time.h (__timespec_defined): Define for __USE_MISC.
11966         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
11968 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
11970         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
11971         argument.
11972         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
11973         (pthread_exit): Use strong_alias to avoid warnings.
11974         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
11975         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
11976         ptr___pthread_attr_init_2_*.
11977         * init.c (pthread_functions): Adjust.
11979 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
11981         * forward.c: Make all functions available by default again.  It
11982         caused too much trouble.
11984         * pt-siglongjmp.c: Removed.
11986 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
11988         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
11989         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
11990         * sysdeps/i386/Makefile: New file.
11991         * sysdeps/i386/tcb-offsets.sym: New file.
11992         * sysdeps/pthread/tcb-offsets.h: New file.
11993         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
11994         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
11996         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
11997         __register_atfork...
11998         (GLIBC_2.3.2): ...here.
12000 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
12002         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
12003         pthread_attr_setstackaddr with __attribute_deprecated__.
12005 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
12007         * pt-system.c (system): Remove cancellation handling.
12008         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
12009         cancellation routines.
12011 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
12013         * descr.h: Include <dl-sysdep.h>.
12014         (struct pthread): Move header.data.list to the back of the struct.
12015         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
12016         (MULTIPLE_THREADS_OFFSET): Adjust offset.
12017         (SYSINFO_OFFSEET): Likewise.
12019 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
12021         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
12022         Define.
12023         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
12024         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
12025         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
12026         (USE_DL_SYSINFO): Undef.
12028 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
12030         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
12031         $(common-objpfx)libc.so.
12032         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
12033         it is bigger than pipe buffer size even on arches with bigger
12034         page size.
12035         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
12037 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
12039         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
12040         correct errno access for case that USE___THREAD is not defined.
12042 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
12044         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
12045         Patch by Marijn Ros <marijn@mad.scientist.com>.
12047 2002-12-22  Roland McGrath  <roland@redhat.com>
12049         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
12051 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
12053         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
12055 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
12057         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
12058         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
12059         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
12061         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
12062         of int $0x80.
12063         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
12064         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
12065         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
12066         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
12067         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
12068         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
12069         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
12070         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
12072         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
12073         sysenter.
12074         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
12076         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
12078         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
12079         in new TCB.
12080         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
12081         that sysinfo is properly initialized.
12082         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
12083         to 1 only for ld.so.
12085         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
12086         RTLD_CORRECT_DYNAMIC_WEAK.
12088 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
12090         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
12091         Use return 0 as 6th argument to FORWARD4.
12092         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
12094 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
12096         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
12097         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
12098         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
12099         (INIT_SYSINFO): New #define.
12100         (TLS_TP_INIT): Use INIT_SYSINFO.
12101         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
12102         At test to make sure SYSINFO_OFFSET value is correct.
12103         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
12105 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
12107         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
12108         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
12109         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
12110         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
12111         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
12112         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
12113         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
12115 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
12117         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
12118         macro instead of using int $0x80 directly.
12120         * sysdeps/pthread/bits/stdio-lock.h: New file.
12121         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
12122         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
12123         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
12124         * Makefile (routines): Add libc-lowlevelmutex.
12126         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
12127         __i686.get_pc_thunk.dx.
12129 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
12131         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
12132         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
12133         ($(objpfx)tst-cancel-wrappers.out): New rule.
12134         * tst-cancel-wrappers.sh: New test.
12135         * tst-locale1.c: Include signal.h.
12136         (uselocale): Test static linking of __libc_current_sigrt*.
12138 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
12140         * Makefile (tests): Add tst-cancel6.
12141         * tst-cancel6.c: New file
12143 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
12145         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
12146         Define meaningfully for assembler as well.
12147         * pthreadP.h (struct pthread_functions): Remove
12148         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
12149         and ptr_pthread_attr_init_2_1 fields.
12150         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
12151         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
12152         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
12153         (FORWARD3): Define using FORWARD4.
12154         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
12155         versions.
12156         * pt-system.c: Remove duplicate stdlib.h include.
12158 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
12160         * sem_init.c: Define sem_init@GLIBC_2.0.
12161         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
12162         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
12164         * flockfile.c: Moved to...
12165         * sysdeps/pthread/flockfile.c: ...here.  New file.
12166         * funlockfile.c: Moved to...
12167         * sysdeps/pthread/funlockfile.c: ...here.  New file.
12168         * ftrylockfile.c: Moved to...
12169         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
12171 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
12173         * libc-cancellation.c: Guard both function with
12174         #if !defined NOT_IN_libc.
12175         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
12176         automatically provided pthread wrappers.
12177         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
12178         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
12179         nor in libpthread.
12180         * pt-open.c: Removed.
12181         * pt-fcntl.c: Removed.
12182         * pt-fsync.c: Removed.
12183         * pt-lseek.c: Removed.
12184         * pt-msgrcv.c: Removed.
12185         * pt-msgsnd.c: Removed.
12186         * pt-msync.c: Removed.
12187         * pt-nanosleep.c: Removed.
12188         * pt-open64.c: Removed.
12189         * pt-pause.c: Removed.
12190         * pt-pread.c: Removed.
12191         * pt-pread64.c: Removed.
12192         * pt-pwrite.c: Removed.
12193         * pt-pwrite64.c: Removed.
12194         * pt-read.c: Removed.
12195         * pt-recv.c: Removed.
12196         * pt-recvfrom.c: Removed.
12197         * pt-recvmsg.c: Removed.
12198         * pt-send.c: Removed.
12199         * pt-sendto.c: Removed.
12200         * pt-sigtimedwait.c: Removed.
12201         * pt-sigwait.c: Removed.
12202         * pt-wait.c: Removed.
12203         * pt-waitpid.c: Removed.
12204         * pt-write.c: Removed.
12205         * pt-accept.c: Removed.
12206         * pt-close.c: Removed.
12207         * pt-connect.c: Removed.
12208         * pt-lseek64.c: Removed.
12209         * pt-sendmsg.c: Removed.
12210         * pt-tcdrain.c: Removed.
12212 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
12214         * init.c (__pthread_initialize_minimal_internal): Renamed from
12215         __pthread_initialize_minimal.  Make old name an alias.  This
12216         converts a normal relocation into a relative relocation.
12218         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
12220         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
12221         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
12222         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
12223         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
12224         pt-sigwaitinfo, pt-waitid, and pt-writev.
12225         * pt-creat.c: Removed.
12226         * pt-poll.c: Removed.
12227         * pt-pselect.c: Removed.
12228         * pt-readv.c: Removed.
12229         * pt-select.c: Removed.
12230         * pt-sigpause.c: Removed.
12231         * pt-sigsuspend.c: Removed.
12232         * pt-sigwaitinfo.c: Removed.
12233         * pt-waitid.c: Removed.
12234         * pt-writev.c: Removed.
12236         * init.c (pthread_functions): New variable.
12237         (__pthread_initialize_minimal): Pass pointer to pthread_functions
12238         (or NULL) to __libc_pthread_init.
12239         * forward.c: Rewrite to use __libc:pthread_functions array to get
12240         function addresses.
12241         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
12242         prototype.
12243         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
12244         Take new parameter.  Copy content of variable pointed to by it
12245         to __libc_pthread_init.
12247         * pthreadP.h (struct pthread_functions): New type.
12248         (__libc_pthread_init): Declare.
12250         * pthread_attr_destroy.c: Add namespace protected alias.
12251         * pthread_attr_getdetachstate.c: Likewise.
12252         * pthread_attr_getinheritsched.c: Likewise.
12253         * pthread_attr_getschedparam.c: Likewise.
12254         * pthread_attr_getschedpolicy.c: Likewise.
12255         * pthread_attr_getscope.c: Likewise.
12256         * pthread_attr_setdetachstate.c: Likewise.
12257         * pthread_attr_setinheritsched.c: Likewise.
12258         * pthread_attr_setschedparam.c: Likewise.
12259         * pthread_attr_setschedpolicy.c: Likewise.
12260         * pthread_attr_setscope.c: Likewise.
12261         * pthread_cond_broadcast.c: Likewise.
12262         * pthread_cond_destroy.c: Likewise.
12263         * pthread_cond_init.c: Likewise.
12264         * pthread_cond_signal.c: Likewise.
12265         * pthread_cond_wait.c: Likewise.
12266         * pthread_condattr_destroy.c: Likewise.
12267         * pthread_condattr_init.c: Likewise.
12268         * pthread_equal.c: Likewise.
12269         * pthread_exit.c: Likewise.
12270         * pthread_getschedparam.c: Likewise.
12271         * pthread_self.c: Likewise.
12272         * pthread_setcancelstate.c: Likewise.
12273         * pthread_setschedparam.c: Likewise.
12274         * pthread_mutex_destroy.c: Likewise.
12275         * pthread_mutex_init.c: Likewise.
12276         * pthreadP.h: Add prototypes for the aliases.
12278         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
12279         multiple_threads member in correct TCB to 1.
12281         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
12282         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
12283         member of thread decriptor, otherwise return unconditionally 1.
12285 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
12287         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
12288         regular Linux version.  Remove file.
12289         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
12290         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
12291         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
12292         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
12293         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
12294         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
12295         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
12296         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
12297         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
12298         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
12299         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
12300         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
12301         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
12302         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
12303         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
12304         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
12305         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
12306         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
12307         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
12308         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
12309         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
12310         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
12311         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
12312         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
12313         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
12314         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
12315         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
12316         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
12317         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
12318         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
12320 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
12322         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
12323         * sysdeps/unix/sysv/linux/open.c: Removed.
12324         * sysdeps/unix/sysv/linux/fsync.c: Removed.
12325         * sysdeps/unix/sysv/linux/lseek.c: Removed.
12326         * sysdeps/unix/sysv/linux/msync.c: Removed.
12327         * sysdeps/unix/sysv/linux/read.c: Removed.
12328         * sysdeps/unix/sysv/linux/close.c: Removed.
12329         * sysdeps/unix/sysv/linux/creat.c: Removed.
12330         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
12331         * sysdeps/unix/sysv/linux/pause.c: Removed.
12332         * sysdeps/unix/sysv/linux/select.c: Removed.
12333         * sysdeps/unix/sysv/linux/write.c: Removed.
12335 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
12337         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
12338         element in TCB to see whether locking is needed.
12340         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
12341         MULTIPLE_THREADS_OFFSET value is correct.
12343         * sysdeps/unix/sysv/linux/close.c: New file.
12344         * sysdeps/unix/sysv/linux/connect.S: New file.
12345         * sysdeps/unix/sysv/linux/creat.c: New file.
12346         * sysdeps/unix/sysv/linux/fsync.c: New file.
12347         * sysdeps/unix/sysv/linux/llseek.c: New file.
12348         * sysdeps/unix/sysv/linux/lseek.c: New file.
12349         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
12350         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
12351         * sysdeps/unix/sysv/linux/msync.c: New file.
12352         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
12353         * sysdeps/unix/sysv/linux/open.c: New file.
12354         * sysdeps/unix/sysv/linux/open64.c: New file.
12355         * sysdeps/unix/sysv/linux/pause.c: New file.
12356         * sysdeps/unix/sysv/linux/poll.c: New file.
12357         * sysdeps/unix/sysv/linux/pread.c: New file.
12358         * sysdeps/unix/sysv/linux/pread64.c: New file.
12359         * sysdeps/unix/sysv/linux/pselect.c: New file.
12360         * sysdeps/unix/sysv/linux/pwrite.c: New file.
12361         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
12362         * sysdeps/unix/sysv/linux/readv.c: New file.
12363         * sysdeps/unix/sysv/linux/recv.S: New file.
12364         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
12365         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
12366         * sysdeps/unix/sysv/linux/select.c: New file.
12367         * sysdeps/unix/sysv/linux/send.S: New file.
12368         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
12369         * sysdeps/unix/sysv/linux/sendto.S: New file.
12370         * sysdeps/unix/sysv/linux/sigpause.c: New file.
12371         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
12372         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
12373         * sysdeps/unix/sysv/linux/sigwait.c: New file.
12374         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
12375         * sysdeps/unix/sysv/linux/system.c: New file.
12376         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
12377         * sysdeps/unix/sysv/linux/wait.c: New file.
12378         * sysdeps/unix/sysv/linux/waitid.c: New file.
12379         * sysdeps/unix/sysv/linux/waitpid.c: New file.
12380         * sysdeps/unix/sysv/linux/writev.c: New file.
12381         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
12383         * pt-readv.c: Fix comment.
12385 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
12387         * tst-cleanup1.c: Include stdlib.h.
12389         * tst-cancel5.c: New test.
12390         * Makefile (tests): Add tst-cancel5.
12391         (tst-cancel5): Link against libc.so libpthread.so in that order.
12393 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
12395         * forward.c (test_loaded): Prevent recursive calls.
12397         * Makefile (routines): Add libc-cancellation.
12398         * libc-cancellation.c: New file.
12399         * descr.h (struct pthread): Add multiple_threads field.
12400         * allocatestack.c (allocate_stack): Initialize multiple_header field of
12401         new thread descriptor to 1.
12402         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
12403         Initialize multiple_thread field after successful thread creation.
12404         * cancellation.c (__do_cancel): Move to pthreadP.h.
12405         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
12406         (__pthread_disable_asynccancel): Add internal_function attribute.
12407         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
12408         * pthread_setcancelstate.c: Likewise.
12409         * pthread_setcanceltype.c: Likewise.
12410         * pthread_exit.c: Likewise.
12411         * pthreadP.h (CANCELLATION_P): Likewise.
12412         (__do_cancel): Define as static inline.
12413         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
12414         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
12415         declarations.
12416         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
12417         fields.  Define MULTIPLE_THREADS_OFFSET.
12418         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
12419         declaration.
12420         * sysdeps/unix/sysv/linux/accept.S: New file.
12421         * sysdeps/unix/sysv/linux/read.c: New file.
12422         * sysdeps/unix/sysv/linux/write.c: New file.
12423         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
12424         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
12425         initialization of __libc_locking_needed.
12426         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
12427         __libc_locking_needed, use multiple_threads field in TCB.
12428         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
12430 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
12432         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
12433         version.
12434         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
12436         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
12437         access to __libc_locking_needed for PIC.
12439 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
12441         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
12442         declare for libc.so.
12443         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
12444         expression.
12445         (__libc_lock_lock): Put into statement expression.
12446         (__libc_lock_unlock): Remove trailing semicolon.
12447         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
12449 2002-12-12  Roland McGrath  <roland@redhat.com>
12451         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
12452         "m" constraint to refer to __libc_locking_needed.  Declare it here.
12454 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
12456         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
12457         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
12458         Initialize __libc_locking_needed.
12459         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
12460         instead of __register_pthread_fork_handler.
12461         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
12462         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
12463         fork-gen with libc_pthread_init.
12464         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
12465         of __register_pthread_fork_handler.
12466         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
12467         of __register_pthread_fork_handler.
12468         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
12469         __libc_locking_needed to determine whether lock prefix can be avoided.
12470         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
12472 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
12474         * Makefile (tests): Add tst-cleanup1.
12475         * tst-cleanup1.c: New file.
12476         * cancellation.c (__cleanup_thread): Removed.
12477         (__do_cancel): Remove call to __cleanup_thread.
12478         * pthreadP.h: Remove __cleanup_thread prorotype.
12480         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
12481         Remember function and argument even if cancellation handler
12482         function is not available.
12483         (__libc_cleanup_region_end): Execute registered function directly if
12484         pthread functions are not available.
12485         (__libc_cleanup_end): Likewise.
12487         * init.c (__pthread_initialize_minimal): Fix initialization in
12488         static lib by preventing gcc from being too clever.
12490 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
12492         * init.c (__pthread_initialize_minimal): Remove unneccesary
12493         sigaddset call.
12495         * Makefile (tests): We can run tst-locale2 now.
12497 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
12499         * Versions: Remove duplicated sigwait entry.
12501 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
12503         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
12504         inside libpthread.
12506         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
12508         * pthreadP.h: Declare __pthread_enable_asynccancel and
12509         __pthread_disable_asynccancel.
12510         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
12511         (CANCEL_RESET): Use __pthread_disable_asynccancel.
12512         * cancellation.c (__pthread_enable_asynccancel): New function.
12513         (__pthread_disable_asynccancel): New function.
12514         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
12515         * pt-close.c: Likewise.
12516         * pt-connect.c: Likewise.
12517         * pt-creat.c: Likewise.
12518         * pt-fcntl.c: Likewise.
12519         * pt-fsync.c: Likewise.
12520         * pt-lseek.c: Likewise.
12521         * pt-lseek64.c: Likewise.
12522         * pt-msgrcv.c: Likewise.
12523         * pt-msgsnd.c: Likewise.
12524         * pt-msync.c: Likewise.
12525         * pt-nanosleep.c: Likewise.
12526         * pt-open.c: Likewise.
12527         * pt-open64.c: Likewise.
12528         * pt-pause.c: Likewise.
12529         * pt-poll.c: Likewise.
12530         * pt-pread.c: Likewise.
12531         * pt-pread64.c: Likewise.
12532         * pt-pselect.c: Likewise.
12533         * pt-pwrite.c: Likewise.
12534         * pt-pwrite64.c: Likewise.
12535         * pt-read.c: Likewise.
12536         * pt-readv.c: Likewise.
12537         * pt-recv.c: Likewise.
12538         * pt-recvfrom.c: Likewise.
12539         * pt-recvmsg.c: Likewise.
12540         * pt-select.c: Likewise.
12541         * pt-send.c: Likewise.
12542         * pt-sendmsg.c: Likewise.
12543         * pt-sendto.c: Likewise.
12544         * pt-sigpause.c: Likewise.
12545         * pt-sigsuspend.c: Likewise.
12546         * pt-sigtimedwait.c: Likewise.
12547         * pt-sigwait.c: Likewise.
12548         * pt-sigwaitinfo.c: Likewise.
12549         * pt-system.c: Likewise.
12550         * pt-tcdrain.c: Likewise.
12551         * pt-wait.c: Likewise.
12552         * pt-waitid.c: Likewise.
12553         * pt-waitpid.c: Likewise.
12554         * pt-write.c: Likewise.
12555         * pt-writev.c: Likewise.
12556         * pthread_join.c: Likewise.
12557         * pthread_timedjoin.c: Likewise.
12559         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
12560         (__xpg_sigpause): New function.
12561         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
12563 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
12565         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
12567         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
12568         _GI_pthread_cleanup_pop to pthreadP.h.
12570         * ftrylockfile.c: Use _IO_lock_trylock instead of
12571         pthread_mutex_trylock.
12573         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
12574         (CANCEL_RESET): Likewise.
12575         (__pthread_setcanceltype_): Declare.
12576         (__pthread_mutex_lock_internal): Declare.
12577         (__pthread_mutex_unlock_internal): Declare.
12578         (__pthread_once_internal): Declare.
12579         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
12580         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
12582         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
12583         and pthread_mutex_unlock.
12584         * pthread_cond_wait.c: Likewise.
12585         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
12586         * pthread_mutex_unlock.c: Likewise.
12588         * pthread_setcanceltype.c: Add additional alias
12589         __pthread_setcanceltype.
12591         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
12592         * sem_open.c (sem_open): Likewise.
12593         Use __libc_open, __libc_write, and __libc_close instead of
12594         open, write, and close respectively.
12596         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
12597         Rewrite as statement expression since it must return a value.
12599         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
12600         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
12601         __pthread_kill.
12603         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
12604         alias __pthread_once_internal.
12606         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
12608 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
12610         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
12611         * tst-stdio1.c: New file.
12612         * tst-stdio2.c: New file.
12614         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
12616         * Makefile (tests): Comment out tst-locale2 for now.
12617         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
12619         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
12620         -D_IO_MTSAFE_IO.
12621         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
12622         Use _IO_lock_init instead of explicit assignment.
12624         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
12625         Define __libc_lock_* and __libc_lock_recursive macros with
12626         lowlevellock macros, not pthread mutexes.
12628         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
12629         of pthread_mutex_lock.
12630         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
12631         instead of pthread_mutex_unlock.
12633 2002-12-06  Roland McGrath  <roland@redhat.com>
12635         * allocatestack.c (__stack_user): Use uninitialized defn.
12636         * init.c (__pthread_initialize_minimal): Initialize it here.
12638 2002-12-05  Roland McGrath  <roland@redhat.com>
12640         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
12641         string.
12642         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
12644         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
12645         missing & here too.
12647 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
12649         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12650         lowlevellock.
12651         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
12652         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
12653         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
12654         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
12655         for __libc_lock_* macros.
12656         * Makefile (routines): Add libc-lowlevellock.
12658 2002-10-09  Roland McGrath  <roland@redhat.com>
12660         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
12661         Under [__PIC__], call the function via the pointer fetched for
12662         comparison rather than a call by name that uses the PLT.
12663         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
12664         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
12665         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
12666         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
12667         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
12669 2002-12-04  Roland McGrath  <roland@redhat.com>
12671         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
12673         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
12674         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
12676         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
12678 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
12680         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
12681         a completely opaque, non-integer type.
12682         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
12684 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
12686         * sysdeps/i386/tls.h: Include stdlib.h.
12687         * sysdeps/x86_64/tls.h: Likewise.
12689 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
12691         * Makefile (tests): Add tst-locale2.
12692         (tests-static): Likewise.
12693         * tst-locale2.c: New file.
12695         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
12696         volatile and add memory clobbers to lock operations.
12698 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
12700         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
12701         * sysdeps/i386/i486/bits/atomic.h: New file.
12702         * sysdeps/i386/i586/bits/atomic.h: New file.
12703         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
12704         include i486 version.
12705         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
12706         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
12707         Patch by Marijn Ros <marijn@mad.scientist.com>.
12709         * allocatestack.c (get_cached_stack): Don't crash if we first
12710         found a stack with a larger size then needed.
12711         Reported by Hui Huang <hui.huang@sun.com>.
12713         * Makefile (tests): Add tst-sysconf.
12714         * tst-sysconf.c: New file.
12716         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
12717         PTHREAD_THREADS_MAX.
12719 2002-12-02  Roland McGrath  <roland@redhat.com>
12721         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
12722         Declare using hidden_proto instead of attribute_hidden, so there are
12723         non-.hidden static symbols for gdb to find.
12724         (__pthread_keys): Likewise.
12725         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
12726         * allocatestack.c (__stack_user): Likewise.
12727         * pthread_create.c (__pthread_keys): Likewise.
12728         (__nptl_threads_events, __nptl_last_event): Make these static instead
12729         of hidden.
12730         * pthread_key_create.c (__pthread_pthread_keys_max,
12731         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
12733 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
12735         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
12736         statically.
12737         * tst-locale1.c: New file.
12739         * pthread_cond_timedwait.c: Include <stdlib.h>.
12741         * Makefile (tests): Add tst-fork2 and tst-fork3.
12742         * tst-fork2.c: New file.
12743         * tst-fork3.c: New file.
12745 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
12747         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
12749         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
12750         require it to 200112L.
12752         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
12753         instruction only if HAVE_CMOV is defined.
12754         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
12756         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
12758         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
12760         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
12762         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
12764 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
12766         * sysdeps/x86_64/bits/atomic.h: New file.
12768         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
12769         16-bit operations.
12771         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
12772         possible since gettid cannot fail.
12774         * sysdeps/x86_64/pthreaddef.h: New file.
12776         * sysdeps/i386/pthreaddef.h (gettid): Removed.
12778         * sysdeps/x86_64/pthread_spin_init.c: New file.
12779         * sysdeps/x86_64/pthread_spin_lock.c: New file.
12780         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
12781         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
12783         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
12784         Add missing lock prefix.  Minute optimization.
12786         * tst-spin2.c (main): Also check successful trylock call.
12788         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
12789         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
12791         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
12792         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
12794         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
12795         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
12796         value in case of an error.  Add support for INTERNAL_SYSCALL.
12798         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
12799         value in case of an error.
12801         * sysdeps/x86_64/tls.h: New file.
12803 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
12805         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
12806         takes the array member name and the index as parameters.
12807         (THREAD_SETMEM_NC): Likewise.
12808         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
12809         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
12810         interfaces.
12812         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
12813         to decide which code to use.
12814         (THREAD_SETMEM_NC): Likewise.
12816         * allocatestack.c (queue_stack): Don't remove stack from list here.
12817         Do it in the caller.  Correct condition to prematurely terminate
12818         loop to free stacks.
12819         (__deallocate_stack): Remove stack from list here.
12821 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
12823         * Makefile (tests): Add tst-stack1.
12824         * tst-stack1.c: New file.
12826         * allocatestack.c (allocate_stack): Initialize the TCB on a user
12827         provided stack.
12829         * pthread_attr_getstack.c: Return bottom of the thread area.
12831 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
12833         * Makefile (libpthread-routines): Add pt-allocrtsig and
12834         pthread_kill_other_threads.
12835         * pt-allocrtsig.c: New file.
12836         * pthread_kill_other_threads.c: New file.
12837         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
12838         all three functions.
12839         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12840         allocrtsig.
12841         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
12842         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
12843         and __libc_allocate_rtsig_private.
12844         * Versions (libpthread): Export pthread_kill_other_threads_np,
12845         __libc_current_sigrtmin, and __libc_current_sigrtmax.
12847 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
12849         * allocatestack.c (allocate_stack): stackaddr in attribute points to
12850         the end of the stack.  Adjust computations.
12851         When mprotect call fails dequeue stack and free it.
12852         * pthread_attr_setstack.c: Store top of the stack in stackaddr
12853         attribute.
12854         * pthread_getattr_np.c: Likewise.
12856         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
12857         surprises.
12859 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
12861         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
12862         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
12864 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
12866         * pthread_getspecific.c: Optimize access to first 2nd-level array.
12867         * pthread_setspecific.c: Likewise.
12869 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
12871         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
12872         definitions.  Get them from the official place.
12873         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
12875         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
12876         Use new CLONE_ flags in clone() calls.
12878         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
12879         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
12881         * Versions: Add pthread_* functions for libc.
12882         * forward.c: New file.
12884         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
12885         errno-loc.
12886         * herrno.c: New file.
12887         * res.c: New file.
12889         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
12890         sem_trywait, and sem_timedwait.  Add herrno and res.
12891         * sem_init.c: Don't initialize lock and waiters members.
12892         * sem_open.c: Likewise.
12893         * sem_post.c: Removed.
12894         * sem_wait.c: Removed.
12895         * sem_trywait.c: Removed.
12896         * sem_timedwait.c: Removed.
12897         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
12898         Includes full implementations of sem_post, sem_wait, sem_trywait,
12899         and sem_timedwait.
12900         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
12901         for new implementation.
12902         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
12903         and waiters fields.
12905         * tst-sem3.c: Improve error message.
12906         * tst-signal3.c: Likewise.
12908         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
12909         to tell the kernel about the termination futex and to initialize tid
12910         member.  Don't initialize main_thread.
12911         * descr.h (struct pthread): Remove main_thread member.
12912         * cancelllation.c (__do_cancel): Remove code handling main thread.
12913         The main thread is not special anymore.
12915         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
12916         size of the stacks to stack_cache_actsize.
12918         * pt-readv.c: Add missing "defined".
12919         * pt-sigwait.c: Likewise.
12920         * pt-writev.c: Likewise.
12922 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
12924         * Versions: Export __connect from libpthread.
12925         Patch by Luca Barbieri <ldb@ldb.ods.org>.
12927         * Makefile (libpthread-routines): Add pt-raise.
12928         * sysdeps/unix/sysv/linux/raise.c: New file.
12929         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
12930         * sysdeps/generic/pt-raise.c: New file.
12932         * pthread_cond_init.c: Initialize all data elements of the condvar
12933         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
12935         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
12936         * pthread_create.c: Likewise.
12938         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
12939         * tst-key1.c: New file.
12940         * tst-key2.c: New file.
12941         * tst-key3.c: New file.
12943         * Versions: Export pthread_detach for version GLIBC_2.0.
12944         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
12946 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
12948         * pthread_key_create.c: Terminate search after an unused key was found.
12949         Patch by Luca Barbieri <ldb@ldb.ods.org>.
12951         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
12952         Patch by Luca Barbieri <ldb@ldb.ods.org>.
12954 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
12956         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
12957         dynamic lookup for errno in PIC.
12959         * allocatestack.c (get_cached_stack): Rearrange code slightly to
12960         release the stack lock as soon as possible.
12961         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
12962         the static TLS block.
12963         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
12965         * cancellation.c: Renamed from cancelation.c.
12966         * Makefile: Adjust accordingly.
12967         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
12968         * cleanup_defer.c: Use CANCELLATION_P.
12969         * pthread_testcancel.c: Likewise.
12970         * descr.h: Fix spelling in comments.
12971         * init.c: Likewise.
12972         * pthread_getattr_np.c: Likewise.
12973         * pthread_getschedparam.c: Likewise.
12974         * pthread_setschedparam.c: Likewise.
12975         * Versions: Likewise.
12977         * pt-pselect.c: New file.
12978         * Makefile (libpthread-routines): Add pt-pselect.
12979         * Versions: Add pselect.
12981         * tst-cancel4.c: New file.
12982         * Makefile (tests): Add tst-cancel4.
12984 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
12986         * pthread_mutex_lock.c: Always record lock ownership.
12987         * pthread_mutex_timedlock.c: Likewise.
12988         * pthread_mutex_trylock.c: Likewise.
12990         * pt-readv.c: New file.
12991         * pt-writev.c: New file.
12992         * pt-creat.c: New file.
12993         * pt-msgrcv.c: New file.
12994         * pt-msgsnd.c: New file.
12995         * pt-poll.c: New file.
12996         * pt-select.c: New file.
12997         * pt-sigpause.c: New file.
12998         * pt-sigsuspend.c: New file.
12999         * pt-sigwait.c: New file.
13000         * pt-sigwaitinfo.c: New file.
13001         * pt-waitid.c: New file.
13002         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
13003         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
13004         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
13005         * Versions: Add all the new functions.
13007         * tst-exit1.c: New file.
13008         * Makefile (tests): Add tst-exit1.
13010         * sem_timedwait.c: Minor optimization for more optimal fastpath.
13012 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
13014         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
13016         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
13017         call.  pthread_join is an official cancellation point.
13018         * pthread_timedjoin.c: Likewise.
13020         * pthread_cond_wait.c: Revert order in which internal lock are dropped
13021         and the condvar's mutex are retrieved.
13022         * pthread_cond_timedwait.c: Likewise.
13023         Reported by dice@saros.East.Sun.COM.
13025 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
13027         * pthreadP.h: Cut out all type definitions and move them...
13028         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
13029         * pthreadP.h: Include <internaltypes.h>.
13031         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
13032         performance tweaks.
13034         * sem_trywait.c: Shuffle #includes around to get right order.
13035         * sem_timedwait.c: Likewise.
13036         * sem_post.c: Likewise.
13037         * sem_wait.c: Likewise.
13039         * nptl 0.3 released.
13041         * Makefile (tests): Add tst-signal3.
13042         * tst-signal3.c: New file.
13044 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
13046         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
13047         the asms modify the sem object.
13048         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
13050         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
13051         the actual members.
13052         * pthreadP.h (struct sem): New type.  Actual semaphore type.
13053         * semaphoreP.h: Include pthreadP.h.
13054         * sem_getvalue.c: Adjust to sem_t change.
13055         * sem_init.c: Likewise.
13056         * sem_open.c: Likewise.
13057         * sem_post.c: Likewise.
13058         * sem_timedwait.c: Likewise.
13059         * sem_trywait.c: Likewise.
13060         * sem_wait.c: Likewise.
13062 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
13064         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
13065         * tst-basic2.c: New file.
13066         * tst-exec1.c: New file.
13067         * tst-exec2.c: New file.
13068         * tst-exec3.c: New file.
13070         * tst-fork1.c: Remove extra */.
13072         * nptl 0.2 released.  The API for IA-32 is complete.