Fix BZ 18036 buffer overflow (read past end of buffer) in internal_fnmatch
[glibc.git] / nptl / ChangeLog.old
blobe022a1927a45f59f6ed7b188b5c9c48774ef0b90
1 This file describes changes to the nptl/ subdirectory prior to 2014-03-03.
2 Later nptl/ changes go into the top-level ChangeLog file, not here.
4 \f
6 2014-02-28  Roland McGrath  <roland@hack.frob.com>
8         * Makefile (generated-dirs): Use += rather than =.
10 2014-02-26  Joseph Myers  <joseph@codesourcery.com>
12         * Makefile: Include Makeconfig immediately after defining subdir.
14 2014-02-21  Joseph Myers  <joseph@codesourcery.com>
16         * Makefile ($(objpfx)tst-stack3-mem): Use $(evaluate-test).
17         ($(objpfx)tst-tls6.out): Likewise.
18         ($(objpfx)tst-cleanup0.out): Likewise.
19         ($(objpfx)tst-cleanup0-cmp.out): Likewise.
20         ($(objpfx)tst-cancel-wrappers.out): Likewise.
21         ($(objpfx)tst-oddstacklimit.out): Likewise.
23 2014-02-14  Joseph Myers  <joseph@codesourcery.com>
25         * Makefile ($(objpfx)tst-cleanup0.out): Do not run cmp.
26         [$(run-built-tests) = yes] (tests): Depend on
27         $(objpfx)tst-cleanup0-cmp.out.
28         ($(objpfx)tst-cleanup0-cmp.out): New rule.
30 2014-02-10  Ondřej Bílka  <neleai@seznam.cz>
32         * allocatestack.c (queue_stack, allocate_stack,
33         __deallocate_stack, __reclaim_stacks): Use glibc_likely instead
34         __builtin_expect.
35         * cancellation.c (__pthread_enable_asynccancel,
36         __pthread_disable_asynccancel): Likewise.
37         * cleanup_defer.c (__pthread_register_cancel_defer,
38         __pthread_unregister_cancel_restore): Likewise.
39         * cleanup_defer_compat.c (_pthread_cleanup_push_defer,
40         _pthread_cleanup_pop_restore): Likewise.
41         * cond-perf.c (main): Likewise.
42         * nptl-init.c (sigcancel_handler, sighandler_setxid): Likewise.
43         * perf.c (get_clockfreq): Likewise.
44         * pthread_barrier_destroy.c (pthread_barrier_destroy): Likewise.
45         * pthread_barrier_init.c (pthread_barrier_init): Likewise.
46         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
47         * pthread_cond_wait.c (__pthread_cond_wait): Likewise.
48         * pthread_create.c (__free_tcb, start_thread, __pthread_create_2_1):
49         Likewise.
50         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
51         * pthread_getspecific.c (__pthread_getspecific): Likewise.
52         * pthread_join.c (pthread_join): Likewise.
53         * pthread_key_delete.c (pthread_key_delete): Likewise.
54         * pthread_mutex_init.c (__pthread_mutex_init): Likewise.
55         * pthread_mutex_lock.c (__pthread_mutex_lock,
56         __pthread_mutex_lock_full): Likewise.
57         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
58         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
59         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
60         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
61         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
62         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
63         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
64         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
65         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
66         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
67         * pthread_setspecific.c (__pthread_setspecific): Likewise.
68         * sem_init.c (__new_sem_init): Likewise.
69         * sem_open.c (__where_is_shmfs): Likewise.
70         * sigaction.c: Likewise.
71         * sockperf.c (get_clockfreq): Likewise.
72         * sysdeps/pthread/createthread.c (do_clone, create_thread): Likewise.
73         * sysdeps/pthread/setxid.h: Likewise.
74         * sysdeps/pthread/timer_create.c (timer_create): Likewise.
75         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init,
76         __unwind_freeres, _Unwind_Resume, __gcc_personality_v0,
77         _Unwind_ForcedUnwind): Likewise.
78         * sysdeps/unix/sysv/linux/getpid.c (__getpid): Likewise.
79         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
80         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Likewise.
81         * sysdeps/unix/sysv/linux/mq_notify.c (mq_notify): Likewise.
82         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
83         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Likewise.
84         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
85         (__pthread_setaffinity_new): Likewise.
86         * sysdeps/unix/sysv/linux/pthread_sigqueue.c (pthread_sigqueue):
87         Likewise.
88         * sysdeps/unix/sysv/linux/pt-raise.c (raise): Likewise.
89         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
90         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_robust_trylock,
91         __lll_robust_lock, __lll_cond_lock, __lll_robust_timedlock): Likewise.
92         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (__lll_lock,
93         __lll_cond_lock, __lll_timedlock, __lll_robust_timedlock): Likewise.
94         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c
95         (pthread_barrier_destroy): Likewise.
96         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c
97         (pthread_barrier_init): Likewise.
98         * sysdeps/unix/sysv/linux/sparc/sem_init.c (__new_sem_init): Likewise.
99         * sysdeps/unix/sysv/linux/x86_64/timer_create.c (__timer_create_old):
100         Likewise.
101         * unwind.c (unwind_stop): Likewise.
103 2014-02-08  Mike Frysinger  <vapier@gentoo.org>
105         * sem_open.c (__where_is_shmfs): Compare f.f_type to RAMFS_MAGIC too.
107 2014-02-05  Carlos O'Donell  <carlos@redhat.com>
109         * sysdeps/unix/sysv/linux/tst-setgetname.c (do_test): Skip the
110         test if !__ASSUME_PROC_PID_TASK_COMM and get_self_comm returns
111         ENOENT.
113 2014-01-23  Stefan Liebler  <stli@linux.vnet.ibm.com>
115         * tst-tls7.c: Adjust testcase timeout
117 2014-01-18  H.J. Lu  <hongjiu.lu@intel.com>
119         [BZ #14782]
120         * tst-cancel-wrappers.sh: Remove system.
122 2014-01-11  Paul Pluzhnikov  <ppluzhnikov@google.com>
124         * tst-tls7.c (action): New function.
125         (do_test): Call it.
126         * tst-tls7mod.c (action): Move sem_post to caller.
128 2011-12-12  Adhemerval Zanella  <azanella@linux.vnet.ibm.com>
130         * sysdeps/powerpc/tls.h (struct tcbhead_t): Add DSO and TAR fields.
131         * nptl/sysdeps/powerpc/tcb-offsets.sym: Likewise.
133 2013-12-09  Carlos O'Donell  <carlos@redhat.com>
135         * sysdeps/unix/sysv/linux/tst-setgetname.c: New file.
136         * sysdeps/unix/sysv/linux/Makefile (tests): Add tst-setgetname.
138 2013-12-09  Andreas Schwab  <schwab@suse.de>
140         [BZ #15843]
141         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
142         (__pthread_cond_timedwait): Remove wrong cfi_adjust_cfa_offset
143         before __condvar_tw_cleanup2 label.
145 2013-12-04  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
147         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
148         (CANCEL_FRAMESIZE, CANCEL_PARM_SAVE): New macros to save parameters
149         into our own stack frame instead of the caller's.
150         (PSEUDO): Use them.  Use symbolic stack frame offsets.
151         (DOCARGS_1, UNDOCARGS_1): Use CANCEL_PARM_SAVE.
152         (DOCARGS_2, UNDOCARGS_2): Likewise.
153         (DOCARGS_3, UNDOCARGS_3): Likewise.
154         (DOCARGS_4, UNDOCARGS_4): Likewise.
155         (DOCARGS_5, UNDOCARGS_5): Likewise.
156         (DOCARGS_6, UNDOCARGS_6): Likewise.
158 2013-11-26  Ondřej Bílka  <neleai@seznam.cz>
160         * sysdeps/i386/tls.h: Use __glibc_reserved instead __unused.
161         * sysdeps/x86_64/tls.h: Likewise.
163 2013-11-25  Paul Pluzhnikov  <ppluzhnikov@google.com>
165         [BZ #11214]
166         * Makefile (tst-getpid2-ENV): New variable.
168 2013-11-20  Paul Pluzhnikov  <ppluzhnikov@google.com>
170         * Makefile (tst-cleanup2, tst-cleanupx2): Add -fno-builtin
172 2013-10-30  Mike Frysinger  <vapier@gentoo.org>
174         * sysdeps/pthread/configure.in: Moved to ...
175         * sysdeps/pthread/configure.ac: ... here.
176         * sysdeps/x86_64/configure.in: Moved to ...
177         * sysdeps/x86_64/configure.ac: ... here.
178         * sysdeps/pthread/configure: Regenerated.
179         * sysdeps/x86_64/configure: Likewise.
181 2013-10-04  Maciej W. Rozycki  <macro@codesourcery.com>
183         * tst-mutex8.c (check_type) [ENABLE_PI]: Handle ENOTSUP failure
184         from pthread_mutex_init.
186 2013-10-01  Siddhesh Poyarekar  <siddhesh@redhat.com>
188         [BZ #15988]
189         * pthread_cond_broadcast.c (__pthread_cond_broadcast)
190         [lll_futex_cmp_requeue_pi && __ASSUME_REQUEUE_PI]: Use
191         USE_REQUEUE_PI.
192         * pthread_cond_signal.c (__pthread_cond_signal)
193         [lll_futex_cmd_requeue_pi && __ASSUME_REQUEUE_PI]: Likewise.
195 2013-09-27  Siddhesh Poyarekar  <siddhesh@redhat.com>
197         * sysdeps/pthread/bits/libc-lock.h [_LIBC && (!NOT_IN_libc ||
198         IS_IN_libpthread)] (__libc_lock_fini_recursive): Use the mutex
199         member of the argument.
200         (__libc_lock_trylock_recursive): Likewise.
201         (__libc_lock_unlock_recursive): Likewise.
203 2013-09-04  Joseph Myers  <joseph@codesourcery.com>
205         * sysdeps/unix/sysv/linux/x86_64/cancellation.S
206         [SHARED && DO_VERSIONING && !NO_HIDDEN]: Change conditional to
207         [SHARED && !NO_HIDDEN].
209 2013-09-03  Siddhesh Poyarekar  <siddhesh@redhat.com>
211         [BZ #15921]
212         * tst-cleanup2.c (do_test): New volatile variable RET to
213         return success.
215 2013-08-30   Ondřej Bílka  <neleai@seznam.cz>
217         * sysdeps/pthread/pthread.h: Fix typos.
218         * sysdeps/unix/sysv/linux/internaltypes.h: Likewise.
219         * tst-cancel4.c: Likewise.
221 2013-08-21   Ondřej Bílka  <neleai@seznam.cz>
223         * pthread_getschedparam.c: Fix typos.
224         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
226 2013-07-23  David S. Miller  <davem@davemloft.net>
228         * tst-cancel4.c (WRITE_BUFFER_SIZE): Adjust comment.
230 2013-07-22  David S. Miller  <davem@davemloft.net>
232         * tst-cancel4.c (WRITE_BUFFER_SIZE): Increase to 16384.
234 2013-07-19  Dominik Vogt  <vogt@de.ibm.com>
236         * pthread_mutex_lock.c: Fix whitespace.
237         * pthread_mutex_trylock.c: Likewise.
238         * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: Likewise.
239         * sysdeps/unix/sysv/linux/x86/elision-conf.c: Likewise.
240         * sysdeps/unix/sysv/linux/x86/elision-conf.h: Likewise.
241         * sysdeps/unix/sysv/linux/x86/elision-lock.c: Likewise.
242         * sysdeps/unix/sysv/linux/x86/elision-timed.c: Likewise.
243         * sysdeps/unix/sysv/linux/x86/elision-trylock.c: Likewise.
244         * sysdeps/unix/sysv/linux/x86/force-elision.h: Likewise.
245         * sysdeps/unix/sysv/linux/x86/hle.h: Likewise.
246         * sysdeps/unix/sysv/linux/x86/pthread_mutex_cond_lock.c: Likewise.
247         * sysdeps/unix/sysv/linux/x86/pthread_mutex_lock.c: Likewise.
248         * sysdeps/unix/sysv/linux/x86/pthread_mutex_timedlock.c: Likewise.
249         * sysdeps/unix/sysv/linux/x86/pthread_mutex_trylock.c: Likewise.
251         * sysdeps/unix/sysv/linux/x86/elision-conf.c:
252         Remove __rwlock_rtm_enabled and __rwlock_rtm_read_retries.
253         (elision_init): Don't set __rwlock_rtm_enabled.
254         * sysdeps/unix/sysv/linux/x86/elision-conf.h:
255         Remove __rwlock_rtm_enabled.
257 2013-07-03  H.J. Lu  <hongjiu.lu@intel.com>
259         * sysdeps/unix/sysv/linux/x86/init-arch.c: New file.
260         * sysdeps/unix/sysv/linux/x86/init-arch.h: Likewise.
262 2013-07-02  Andi Kleen <ak@linux.intel.com>
264         * sysdeps/unix/sysv/linux/x86/elision-conf.c (elision_init):
265           Check ENABLE_LOCK_ELISION.
267 2013-07-02  Andi Kleen  <ak@linux.intel.com>
269         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype):
270           Disable elision for PTHREAD_MUTEX_DEFAULT.
272 2013-07-02  Andi Kleen  <ak@linux.intel.com>
273             Hongjiu Lu  <hongjiu.lu@intel.com>
275         * pthread_mutex_lock.c
276         (__pthread_mutex_lock): Add lock elision support.
277         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
278         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
279         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
280         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
281         * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: Likewise.
282         * sysdeps/unix/sysv/linux/x86/Makefile: New file.
283         * sysdeps/unix/sysv/linux/x86/force-elision.h: New file
284         * sysdeps/unix/sysv/linux/x86/pthread_mutex_cond_lock.c: Likewise.
285         * sysdeps/unix/sysv/linux/x86/pthread_mutex_lock.c: Likewise.
286         * sysdeps/unix/sysv/linux/x86/pthread_mutex_timedlock.c: Likewise.
287         * sysdeps/unix/sysv/linux/x86/pthread_mutex_trylock.c: Likewise.
288         * sysdeps/unix/sysv/linux/x86/pthread_mutex_unlock.c: Likewise.
290 2013-07-02  Andi Kleen  <ak@linux.intel.com>
292         * tst-mutex5.c: Include config.h.
293           (do_test): Add checks for ENABLE_LOCK_ELISION.
294         * tst-mutex8.c: Include config.h
295           (tf): Add checks for ENABLE_LOCK_ELISION.
296           (check_type): Likewise.
298 2013-07-02  Andi Kleen  <ak@linux.intel.com>
300         * pthreadP.h: Add elision types.
301           (PTHREAD_MUTEX_TYPE_ELISION): Add.
302         * sysdeps/pthread/pthread.h: Add elision initializers.
303           (PTHREAD_MUTEX_ELISION_NP, PTHREAD_MUTEX_NO_ELISION_NP,
304            PTHREAD_MUTEX_PSHARED_NP): Add new flags.
305           (__PTHREAD_SPINS): Add.
307 2013-07-02  Andi Kleen  <ak@linux.intel.com>
308             Hongjiu Lu  <hongjiu.lu@intel.com>
310         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_timedwait_tid,
311           lll_timedlock_elision, __lll_lock_elision, __lll_unlock_elision,
312           __lll_trylock_elision, lll_lock_elision, lll_unlock_elision,
313           lll_trylock_elision): Add.
314         * sysdeps/unix/sysv/linux/x86/Makefile: Imply x86.
315         * sysdeps/unix/sysv/linux/x86/elision-conf.c: New file.
316         * sysdeps/unix/sysv/linux/x86/elision-conf.h: New file.
317         * sysdeps/unix/sysv/linux/x86/elision-lock.c: New file.
318         * sysdeps/unix/sysv/linux/x86/elision-timed.c: New file.
319         * sysdeps/unix/sysv/linux/x86/elision-trylock.c: New file.
320         * sysdeps/unix/sysv/linux/x86/elision-unlock.c: New file.
321         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_timedwait_tid,
322           lll_timedlock_elision, __lll_lock_elision, __lll_unlock_elision,
323           __lll_trylock_elision, lll_lock_elision, lll_unlock_elision,
324           lll_trylock_elision): Add.
325         * nptl/sysdeps/unix/sysv/linux/x86/hle.h: New file.
326         * elision-conf.h: New file.
328 2013-06-24  Vladimir Nikulichev  <v.nikulichev@gmail.com>
330         [BZ #12310]
331         * pthread_exit.c: Add reference to pthread_create.
333 2013-06-22  Joseph Myers  <joseph@codesourcery.com>
335         * pthread_getattr_default_np.c: Include <string.h>.
337 2013-06-15  Siddhesh Poyarekar  <siddhesh@redhat.com>
339         * Versions (libpthread): Add GLIBC_2.18.
340         (GLIBC_2.18): Add pthread_setattr_default_np and
341         pthread_getattr_default_np.
342         * allocatestack.c (allocate_stack): Synchronize read from
343         __default_pthread_attr.
344         (__reclaim_stacks): Initialize __default_pthread_attr_lock.
345         * nptl-init.c (__pthread_initialize_minimal_internal):
346         Synchronize write to __default_pthread_attr.
347         * pthreadP.h (__default_pthread_attr_lock): Declare.
348         * pthread_attr_getstacksize (__pthread_attr_getstacksize):
349         Synchronize read from __default_pthread_attr.
350         * pthread_create.c (__pthread_create_2_1): Make a local copy of
351         __default_pthread_attr.  Check value of flags in IATTR even if
352         input ATTR is NULL.
353         * pthread_getattr_default_np.c: New file.
354         * pthread_setattr_default_np.c: New file.
355         * sysdeps/pthread/pthread.h [__USE_GNU]
356         (pthread_getattr_default_np, pthread_setattr_default_np):
357         Declare.
358         * tst-default-attr.c: New test case.
359         * Makefile (libpthread-routines): Add
360         pthread_setattr_default_np and pthread_getattr_default_np.
361         (tests): Add tst-default-attr.
362         * vars.c (__default_pthread_attr_lock): Declare and initialize.
364 2013-06-13  Siddhesh Poyarekar  <siddhesh@redhat.com>
365             Carlos O'Donell  <carlos@redhat.com>
367         [BZ #15618]
368         * tst-pthread-attr-affinity: New test case.
369         * Makefile (tests): Add it.
370         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
371         (__pthread_attr_getaffinity_new): Copy minimum of source and
372         destination sizes to avoid a buffer overrun.
374 2013-06-10  Carlos O'Donell  <carlos@redhat.com>
376         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
377         (lll_futex_wake): Return syscall error.
378         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
379         (lll_futex_wake): Return syscall error.
381 2013-08-06   Ondřej Bílka  <neleai@seznam.cz>
383         * sysdeps/pthread/allocalim.h: (__libc_use_alloca): Fix warning.
385 2013-06-06   Ondřej Bílka  <neleai@seznam.cz>
387         * tst-cond22.c: Fix leading whitespaces.
388         * tst-umask1.c: Likewise.
390 2013-06-06  Joseph Myers  <joseph@codesourcery.com>
392         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Remove
393         trailing whitespace.
394         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Likewise.
395         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
396         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
397         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
398         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
399         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
400         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
401         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
402         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
403         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
404         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
405         * tst-mutexpp10.c: Likewise.
406         * tst-stackguard1.c: Likewise.
408 2013-05-31  Joseph Myers  <joseph@codesourcery.com>
410         * Makefile ($(objpfx)libpthread.so): Remove dependencies on libc
411         and ld.so.
413 2013-05-16  Ryan S. Arnold  <rsa@linux.vnet.ibm.com>
415         * pthread_create.c: Add missing #include <stdint.h> due to uint64_t or
416         uint32_t usage.
417         * sysdeps/pthread/createthread.c: Likewise.
419 2013-05-14  Andreas Jaeger  <aj@suse.de>
421         [BZ #10686]
422         * sysdeps/x86_64/tls.h (struct tcbhead_t): Add __private_ss field.
423         * sysdeps/i386/tls.h (struct tcbhead_t): Likewise.
425 2013-05-09  Andi Kleen  <ak@linux.intel.com>
427         * tst-mutex8.c (do_test): Check for ENABLE_PI.
429 2013-04-22  Siddhesh Poyarekar  <siddhesh@redhat.com>
431         * pthreadP.h (check_sched_policy_attr): New inline function.
432         (check_sched_priority_attr): Likewise.
433         (check_stacksize_attr): Likewise.
434         (__kernel_cpumask_size, __determine_cpumask_size): Declare
435         extern.
436         (check_cpuset_attr): New inline function.
437         * pthread_attr_setschedparam (__pthread_attr_setschedparam):
438         Use check_sched_priority_attr.
439         * pthread_attr_setschedpolicy.c
440         (__pthread_attr_setschedpolicy): Use check_sched_policy_attr.
441         * pthread_attr_setstack.c (__pthread_attr_setstack): Use
442         check_stacksize_attr.
443         * pthread_attr_setstacksize.c (__pthread_attr_setstacksize):
444         Likewise.
445         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
446         (__pthread_attr_setaffinity_new): Use check_cpuset_attr.
448 2013-04-11  Andreas Schwab  <schwab@suse.de>
450         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
451         (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
452         directly use absolute timeout.
454 2013-04-07  Carlos O'Donell  <carlos@redhat.com>
456         * sysdeps/unix/sysv/linux/sem_post.c: Include atomic.h.
458 2013-04-04  Siddhesh Poyarekar  <siddhesh@redhat.com>
460         [BZ #15337]
461         * sysdeps/unix/sysv/linux/x86_64/cancellation.S
462         [IS_IN_libpthread]
463         [SHARED && defined DO_VERSIONING && !defined NO_HIDDEN]: Mark
464         __pthread_unwind hidden.
466 2013-03-28  Roland McGrath  <roland@hack.frob.com>
468         * pthread_create.c (start_thread) [!SHARED]:
469         Call __call_tls_dtors only if it's not NULL.
471 2013-03-19  Siddhesh Poyarekar  <siddhesh@redhat.com>
473         * allocatestack.c (allocate_stack): Use __default_pthread_attr
474         instead of __default_stacksize.
475         * nptl-init.c (__pthread_initialize_minimal_internal):
476         Likewise.  Initialize guardsize.
477         * pthreadP.h (__default_pthread_attr): Declare.
478         * pthread_attr_getstacksize.c (__pthread_attr_getstacksize):
479         Use __default_pthread_attr instead of __default_stacksize.
480         * pthread_create.c (default_attr): Remove.
481         (__pthread_create_2_1): Use __default_pthread_attr instead of
482         default_attr.
483         * vars.c (__default_stacksize): Remove.
484         (__default_pthread_attr): New static variable to store
485         default thread attributes.
487 2013-03-18  Siddhesh Poyarekar  <siddhesh@redhat.com>
489         * pthread_barrier_init.c (default_attr): Rename to
490         default_barrierattr.
491         (pthread_barrier_init): Adjust for the rename.
492         * pthread_mutex_init.c (default_attr): Rename to
493         default_mutexattr.
494         (__pthread_mutex_init): Adjust for the rename.
495         * pthread_rwlock_init.c (default_attr): Rebane to
496         default_rwlockattr.
497         (__pthread_rwlock_init): Adjust for the rename.
499 2013-03-12  Carlos O'Donell  <carlos@redhat.com>
501         * sysdeps/unix/sysv/linux/lowlevellock.c: Include <atomic.h>.
503 2013-03-04  Roland McGrath  <roland@hack.frob.com>
505         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h:
506         Change multiple inclusion guard to _LINUX_I686_DL_SYSDEP_H.
507         Use #include_next.
508         (HAVE_DL_DISCOVER_OSVERSION): Remove definition, now redundant.
509         (RTLD_PRIVATE_ERRNO): Likewise.
510         (NEED_DL_SYSINFO, DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION):
511         Move macros and associated declaration to ...
512         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: ... here.
513         Change multiple include guard to _LINUX_I386_DL_SYSDEP_H.
514         Use #include_next.
516 2013-03-01  Carlos O'Donell  <carlos@redhat.com>
518         * Makefile (tests): Revert last change.
519         (tst-pthread-stack-env-ENV): Likewise.
520         * nptl-init.c (set_default_stacksize): Likewise.
521         (__pthread_initialize_minimal_internal): Likewise.
522         * tst-pthread-stack-env.c: Likewise.
524 2013-03-01  Siddhesh Poyarekar  <siddhesh@redhat.com>
526         * tst-oddstacklimit.c: Include stdlib.h.
528         * Makefile (tests): Add tst-pthread-stack-env.
529         (tst-pthread-stack-env-ENV): Set environment for test.
530         * nptl-init.c (set_default_stacksize): New function.
531         (__pthread_initialize_minimal_internal): Accept ARGC, ARGV and
532         ENVP.  Initialize __ENVIRON and set __DEFAULT_STACKSIZE.
533         * tst-pthread-stack-env.c: New test case.
535 2013-02-21  David S. Miller  <davem@davemloft.net>
537         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
538         (FUTEX_WAIT_REQUEUE_PI): Define.
539         (FUTEX_CMP_REQUEUE_PI): Likewise.
540         (lll_futex_wait_requeue_pi): Likewise.
541         (lll_futex_timed_wait_requeue_pi): Likewise.
542         (lll_futex_cmp_requeue_pi): Likewise.
544 2013-02-21  Carlos O'Donell  <carlos@redhat.com>
546         * sysdeps/unix/sysv/linux/fork.c: Fix comment typo.
548 2013-02-18  Siddhesh Poyarekar  <siddhesh@redhat.com>
550         * sysdeps/pthread/tst-timer.c: Include stdlib.h for declaration
551         of exit.
552         * tst-barrier4.c: Likewise.
553         * tst-robust7.c: Likewise.
555         [BZ #14920]
556         * pthreadP.h (USE_REQUEUE_PI): New macro to check if mutex is
557         PI-aware.
558         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Use
559         PI-aware futex operations if available and mutex is PI-aware.
560         * pthread_cond_signal.c (__pthread_cond_signal): Likewise.
561         * nptl/pthread_cond_timedwait.c (__pthread_cond_timedwait):
562         Likewise.
563         * pthread_cond_wait.c (__condvar_cleanup): Adjust lock if
564         cancellation occurred just after futex returned successfully
565         from a PI operation with the mutex held.
566         (__pthread_cond_wait): Use PI-aware futex operations if
567         available and mutex is PI-aware.
568         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
569         (FUTEX_WAIT_REQUEUE_PI): Define.
570         (FUTEX_CMP_REQUEUE_PI): Likewise.
571         (lll_futex_wait_requeue_pi): Likewise.
572         (lll_futex_timed_wait_requeue_pi): Likewise.
573         (lll_futex_cmp_requeue_pi): Likewise.
574         * nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h
575         (FUTEX_WAIT_REQUEUE_PI): Define.
576         (FUTEX_CMP_REQUEUE_PI): Likewise.
577         (lll_futex_wait_requeue_pi): Likewise.
578         (lll_futex_timed_wait_requeue_pi): Likewise.
579         (lll_futex_cmp_requeue_pi): Likewise.
580         * sysdeps/unix/sysv/linux/kernel-features.h: Define
581         __ASSUME_REQUEUE_PI for Linux version higher than 2.6.31.
583 2013-02-04  Andreas Schwab  <schwab@suse.de>
585         [BZ #14142]
586         * tst-cancel14.c: Include <sys/time.h>.
587         * tst-cancel15.c: Likewise.
588         * tst-mutex9.c: Include <stdint.h>, <stdlib.h> and <sys/time.h>.
589         * tst-stackguard1.c: Include <tls.h>
591 2013-01-16  Andreas Schwab  <schwab@suse.de>
593         [BZ #14327]
594         * sem_open.c (sem_open): Use __mktemp instead of mktemp.
596 2013-01-11  Carlos O'Donell  <codonell@redhat.com>
598         * allocatestack.c (allocate_stack): Add comment. Remove assert
599         on attr.
601 2013-01-11  H.J. Lu  <hongjiu.lu@intel.com>
603         * Makefile (tst-cancel7-ARGS: Replace $(host-built-program-cmd)
604         with $(host-test-program-cmd).
605         (tst-exec4-ARGS): Likewise.
606         (tst-stackguard1-ARGS): Likewise.
607         ($(objpfx)tst-tls6.out): Don't pass $(elf-objpfx) to tst-tls6.sh.
608         Replace $(rtld-installed-name) with $(test-via-rtld-prefix).
609         * tst-tls6.sh (elf_objpfx): Removed.
610         (rtld_installed_name): Renamed to ...
611         (test_via_rtld_prefix): This.
612         (tst_tls5): Prepend ${test_via_rtld_prefix}.
614 2013-01-02  Joseph Myers  <joseph@codesourcery.com>
616         * All files with FSF copyright notices: Update copyright dates
617         using scripts/update-copyrights.
619 2013-01-01  Joseph Myers  <joseph@codesourcery.com>
621         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Reformat
622         copyright notice.
624 2012-12-28  Andi Kleen  <ak@linux.intel.com>
626         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Convert
627         to prototype.
628         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock):
629         Likewise.
631 2012-12-27  David S. Miller  <davem@davemloft.net>
633         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
634         (lll_futex_timed_wait_bitset): New macro.
636 2012-12-27  Siddhesh Poyarekar  <siddhesh@redhat.com>
638         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (SYS_futex):
639         Remove definition.
640         (lll_futex_timed_wait): Replace assembly code with
641         INTERNAL_SYSCALL.
642         (lll_futex_timed_wait_bitset): Likewise.
643         (lll_futex_wake): Likewise.
644         (lll_futex_requeue): Likewise.
645         (lll_futex_wake_unlock): Likewise.
647 2012-12-08  Siddhesh Poyarekar  <siddhesh@redhat.com>
649         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind):
650         Declare LOCAL_VAR as char.
652 2012-12-04  Joseph Myers  <joseph@codesourcery.com>
654         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__old_sem_post):
655         Cast result of atomic_increment_val to (void) instead of storing
656         in otherwise-unused variable.
658 2012-12-03  Allan McRae  <allan@archlinux.org>
660         * Makefile (LDFLAGS-tst-cond24, LDFLAGS-tst-cond25): Remove.
662 2012-11-26  H.J. Lu  <hongjiu.lu@intel.com>
664         * unwind.c (__pthread_unwind): Pass address of unwind_cleanup
665         to THREAD_SETMEM.
666         * sysdeps/i386/tls.h: Include <libc-internal.h>.
667         (THREAD_SETMEM): Use cast_to_integer before casting to uint64_t.
668         (THREAD_SETMEM_NC): Likewise.
669         * sysdeps/x86_64/tls.h: Include <libc-internal.h>.
670         (THREAD_SETMEM): Use cast_to_integer before casting to uint64_t.
671         (THREAD_SETMEM_NC): Likewise.
673 2012-11-21  Joseph Myers  <joseph@codesourcery.com>
675         * sysdeps/unix/sysv/linux/sem_post.c (__old_sem_post): Cast result
676         of atomic_increment_val to (void) instead of storing in
677         otherwise-unused variable.
679         * pthread_cond_timedwait.c (__pthread_cond_timedwait)
680         [__NR_clock_gettime]: Cast result of INTERNAL_VSYSCALL to void
681         instead of storing in otherwise-unused variable.
683 2012-11-14  Marcus Shawcroft  <marcus.shawcroft@linaro.org>
685         * Makefile (CFLAGS-open.c, CFLAGS-open64.c, CFLAGS-pause.c)
686           (CFLAGS-recv.c, CFLAGS-send.c): Define.
688 2012-11-06  Chris Metcalf  <cmetcalf@tilera.com>
690         * tst-sem14.c (TIMEOUT): Set timeout to 10 seconds.
691         * tst-cond24.c (TIMEOUT): Increase from 10 to 20 seconds.
693 2012-11-05  Siddhesh Poyarekar  <siddhesh@redhat.com>
695         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Time out
696         if absolute timeout is negative.
697         [__ASSUME_FUTEX_CLOCK_REALTIME &&
698         lll_futex_timed_wait_bitset]: Use lll_futex_timed_wait_bitset.
699         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
700         Likewise.
701         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
702         Likewise.
703         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
704         (__lll_robust_timedlock_wait): Likewise.
705         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
706         (lll_futex_timed_wait_bitset): New macro.
707         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
708         (lll_futex_timed_wait_bitset): Likewise.
710 2012-11-03  David S. Miller  <davem@davemloft.net>
712         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (BUSY_WAIT_NOP):
713         Add missing spaces.
714         (__cpu_relax): Likewise.
716 2012-11-02  H.J. Lu  <hongjiu.lu@intel.com>
718         * sysdeps/x86_64/tls.h: Don't include <xmmintrin.h>.
719         (__128bits): New struct typedef.
720         (tcbhead_t): Replace __m128 with __128bits.
722 2012-10-30  Aurelien Jarno  <aurelien@aurel32.net>
723             Joseph Myers  <joseph@codesourcery.com>
725         * Makefile (tst-cancel7-ARGS): Use exec in --command argument.
727 2012-10-28  David S. Miller  <davem@davemloft.net>
729         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (BUSY_WAIT_NOP):
730         Define when we have v9 instructions available.
731         * sysdeps/unix/sysv/linux/sparc/sparc64/cpu_relax.S: New file.
732         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/cpu_relax.S: New
733         file.
734         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/Makefile: New
735         file.
736         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Add cpu_relax
737         to libpthread-routines.
739 2012-10-25  Roland McGrath  <roland@hack.frob.com>
741         * tst-cond-except.c (TEST_FUNCTION): New macro.
743 2012-10-25  Joseph Myers  <joseph@codesourcery.com>
745         * Makefile ($(objpfx)tst-tls6.out): Use $(BASH) not $(SHELL) to
746         run tst-tls6.sh.
747         * tst-tls6.sh: Use /bin/bash not /bin/sh.
749 2012-10-25  Roland McGrath  <roland@hack.frob.com>
751         * tst-basic2.c (do_test): Return RESULT, not always zero.
753         * tst-cond25.c: Include <stdint.h>
754         (waiter): Add casts to uintptr_t between casting integer<->pointer.
755         (timed_waiter): Likewise.
756         (do_test_wait): Likewise.
757         * tst-cond-except.c (thr): Likewise.
758         (do_test): Use prototype definition.
760 2012-10-24  Joseph Myers  <joseph@codesourcery.com>
761             Jim Blandy  <jimb@codesourcery.com>
763         * Makefile ($(objpfx)tst-tls6.out): Pass $(test-wrapper-env) to
764         tst-tls6.sh.
765         * tst-tls6.sh (test_wrapper_env): New variable.  Use it to run
766         programs with LD_PRELOAD set.
768 2012-10-24  Roland McGrath  <roland@hack.frob.com>
770         * Makefile ($(objpfx)tst-cond11, $(objpfx)tst-cond19): Targets removed.
771         ($(objpfx)tst-sem5, $(objpfx)tst-cancel18): Likewise.
772         ((objpfx)tst-cancelx18, $(objpfx)tst-clock2): Likewise.
773         ($(objpfx)tst-rwlock14): Likewise.
775 2012-10-24  Joseph Myers  <joseph@codesourcery.com>
777         * Makefile (tests): Remove tst-oddstacklimit.
778         (test-srcs): New variable.
779         (tst-oddstacklimit-ENV): Remove.
780         [$(run-built-tests) = yes] (tests): Depend on
781         $(objpfx)tst-oddstacklimit.out.
782         [$(run-built-tests) = yes] ($(objpfx)tst-oddstacklimit.out): New
783         target.
784         * tst-oddstacklimit.c: Do not include "tst-basic1.c".  Use
785         setrlimit before executing tst-basic1 test passed to --command.
787 2012-10-23  Joseph Myers  <joseph@codesourcery.com>
789         * Makefile [$(cross-compiling) = no]: Change condition to
790         [$(run-built-tests) = yes].
792 2012-10-23  Jim Blandy  <jimb@codesourcery.com>
793             Joseph Myers  <joseph@codesourcery.com>
795         * Makefile (tst-cancel7-ARGS): Use $(host-built-program-cmd).
796         (tst-exec4-ARGS): Likewise.
797         (tst-stackguard1-ARGS): Likewise.
799 2012-10-21  Jim Blandy  <jimb@codesourcery.com>
800             Joseph Myers  <joseph@codesourcery.com>
802         * Makefile ($(objpfx)tst-cancel-wrappers.out): Pass $(NM) to
803         tst-cancel-wrappers.sh.
804         * tst-cancel-wrappers.sh: Use nm program given as first argument,
805         not hardcoded "nm".
807 2012-10-17  Siddhesh Poyarekar  <siddhesh@redhat.com>
809         * tst-cond25.c (do_test_wait): Don't check for return value from
810         pthread_cancel.
812 2012-10-16  Siddhesh Poyarekar  <siddhesh@redhat.com>
814         [BZ #14652]
815         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
816         (__condvar_tw_cleanup):  Adjust the mutex data structure if it
817         was locked by FUTEX_WAIT_REQUEUE_PI.
818         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait
819         (__condvar_w_cleanup): Likewise.
820         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
821         (__condvar_cleanup2): Likewise.
822         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
823         (__condvar_cleanup1): Likewise.
825 2012-10-10  Carlos O'Donell  <carlos@systemhalted.org>
827         * sysdeps/pthread/pthread.h [!(defined __GNUC__ &&
828         defined __EXCEPTIONS) && defined __USE_GNU]
829         (pthread_cleanup_push_defer_np): Fix formatting.
831 2012-10-10  Siddhesh Poyarekar  <siddhesh@redhat.com>
833         [BZ #14652]
834         * Makefile (tests): New test case tst-cond25.
835         (LDFLAGS-tst-cond25): Link tst-cond25 against librt.
836         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
837         (__condvar_tw_cleanup): Lock mutex only if we don't already
838         own it.
839         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
840         (__condvar_w_cleanup): Likewise.
841         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add TID_MASK.
842         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
843         (__condvar_cleanup2): Lock mutex only if we don't already
844         own it.
845         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
846         (__condvar_cleanup1): Likewise.
847         * tst-cond25.c: New test case.
849 2012-10-09  Roland McGrath  <roland@hack.frob.com>
851         * sysdeps/pthread/configure: Regenerated.
852         * sysdeps/x86_64/configure: Regenerated.
854 2012-10-05  David S. Miller  <davem@davemloft.net>
856         [BZ #14568]
857         * sysdeps/sparc/tls.h (DB_THREAD_SELF_INCLUDE): Delete.
858         (DB_THREAD_SELF): Use constants for the register offsets.  Correct
859         the case of a 64-bit debugger with a 32-bit inferior.
861 2012-10-05  H.J. Lu  <hongjiu.lu@intel.com>
863         [BZ #14557]
864         * Makefile (tests-static): Add tst-cancel24-static,
865         tst-cond8-static tst-mutex8-static, tst-mutexpi8-static,
866         tst-sem11-static and tst-sem12-static.
867         (tests): Likewise.
868         (LDLIBS-tst-cancel24-static): New macro.
869         * tst-cancel24-static.cc: New file.
870         * tst-cond8-static.c: Likewise.
871         * tst-mutex8-static.c: Likewise.
872         * tst-mutexpi8-static.c: Likewise.
873         * tst-sem11-static.c: Likewise.
874         * tst-sem12-static.c: Likewise.
876 2012-10-05  Siddhesh Poyarekar  <siddhesh@redhat.com>
878         [BZ #14417]
879         * Makefile (tests): New test case tst-cond24.
880         (LDFLAGS-tst-cond24): Link tst-cond24 against librt.
881         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
882         (__pthread_cond_timedwait): Unlock mutex before going back to
883         wait in PI case.
884         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
885         (__pthread_cond_wait): Likewise.  Revert handling of EAGAIN
886         return from futex_wait.
887         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
888         (__pthread_cond_timedwait): Unlock mutex before going back to
889         wait in PI case.  Set requeue_pi flag only if wait returned 0.
890         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
891         (__pthread_cond_wait): Likewise.  Revert handling of EAGAIN
892         return from futex_wait.
893         * tst-cond24.c: New test case.
895 2012-10-04  Roland McGrath  <roland@hack.frob.com>
897         * pthread_create.c (start_thread): Use __madvise, not madvise.
899 2012-10-02  H.J. Lu  <hongjiu.lu@intel.com>
901         * sysdeps/i386/tls.h: Update copyright years.
903 2012-10-02  Siddhesh Poyarekar  <siddhesh@redhat.com>
905         * pthread_create.c (start_thread): Fix clone flag name in
906         comment to CLONE_CHILD_CLEARTID.
907         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
908         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
909         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
910         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
911         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
912         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
914 2012-10-01  Siddhesh Poyarekar  <siddhesh@redhat.com>
916         [BZ #14477]
917         * Makefile (tests): Add tst-cond-except.
918         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
919         (__pthread_cond_timedwait): Mark instructions where %ebx is
920         incremented in PI case.
921         (.gcc_except_table): Add entry to jump to __condvar_tw_cleanup2
922         for the marked PI case instructions.
923         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
924         (__pthread_cond_wait): Mark instructions where %ebx is
925         incremented in PI case.
926         (.gcc_except_table): Add entry to jump to __condvar_w_cleanup2
927         for the marked PI case instructions.
928         * tst-cond-except.c: New test case.
930 2012-09-24  Dmitry V. Levin  <ldv@altlinux.org>
932         * tst-tls6.sh: Add "set -e".
933         * Makefile: Do not specify -e option when running testsuite
934         shell scripts.
936         * tst-tls6.sh: Add copyright header.
938 2012-09-24  H.J. Lu  <hongjiu.lu@intel.com>
940         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Add "()" when casting
941         to uint64_t for 64-bit store.
942         (THREAD_SETMEM_NC): Likewise.
944 2012-09-19  H.J. Lu  <hongjiu.lu@intel.com>
946         * sysdeps/i386/tls.h (THREAD_SETMEM): Cast to uint64_t for
947         64-bit store.
948         (THREAD_SETMEM_NC): Likewise.
950 2012-09-14  Jeff Law  <law@redhat.com>
952         [BZ #14583]
953         * sysdeps/pthread/pthread.h: Fix prototype of __sigsetjmp.
955 2012-09-13  H.J. Lu  <hongjiu.lu@intel.com>
957         [BZ #14576]
958         * sysdeps/pthread/bits/libc-lockP.h (__rtld_lock_init_recursive):
959         Removed.
961 2012-09-07  H.J. Lu  <hongjiu.lu@intel.com>
963         * Makefile (LDFLAGS-tst-cancel24): Renamed to ...
964         (LDLIBS-tst-cancel24): This.
966 2012-09-06  H.J. Lu  <hongjiu.lu@intel.com>
968         [BZ #14545]
969         * Makefile (tests-static): Add tst-cancel21-static.
970         (tests): Likewise.
971         * tst-cancel21-static.c: New file.
973 2012-09-01  Joseph Myers  <joseph@codesourcery.com>
975         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
976         [!__ASSUME_POSIX_CPU_TIMERS]: Remove conditional code.
977         [__NR_clock_getres]: Make code unconditional.
978         (pthread_getcpuclockid): Remove code left unreachable by removal
979         of conditionals.
981 2012-08-31  Joseph Myers  <joseph@codesourcery.com>
983         [BZ #14532]
984         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Use
985         atomic_compare_and_exchange_bool_rel.
986         * tst-sem14.c: New file.
987         * Makefile (tests): Add tst-sem14.
989 2012-08-15  Roland McGrath  <roland@hack.frob.com>
991         * Makefile (CFLAGS-flockfile.c): Use $(libio-mtsafe) instead
992         of -D_IO_MTSAFE_IO.
993         (CFLAGS-ftrylockfile.c, CFLAGS-funlockfile.c): Likewise.
994         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-fork.c): Likewise.
996 2012-08-16  Joseph Myers  <joseph@codesourcery.com>
998         * pthread_cond_timedwait.c (__pthread_cond_timedwait)
999         [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
1000         * pthread_condattr_setclock.c (pthread_condattr_setclock)
1001         [!__ASSUME_POSIX_TIMERS]: Likewise.
1002         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
1003         (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
1004         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
1005         [!__ASSUME_POSIX_TIMERS]: Likewise.
1006         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1007         (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
1008         * sysdeps/unix/sysv/linux/timer_create.c [__NR_timer_create]: Make
1009         code unconditional.
1010         [!__NR-timer_create]: Remove conditional code.
1011         (timer_create) [!__ASSUME_POSIX_TIMERS]: Likewise.
1012         * sysdeps/unix/sysv/linux/timer_delete.c [__NR_timer_delete]: Make
1013         code unconditional.
1014         [!__NR_timer_delete]: Remove conditional code.
1015         (timer_delete) [!__ASSUME_POSIX_TIMERS]: Likewise.
1016         * sysdeps/unix/sysv/linux/timer_getoverr.c
1017         [__NR_timer_getoverrun]: Make code unconditional.
1018         [!__NR_timer_getoverrun]: Remove conditional code.
1019         (timer_getoverrun) [!__ASSUME_POSIX_TIMERS]: Likewise.
1020         * sysdeps/unix/sysv/linux/timer_gettime.c [__NR_timer_gettime]:
1021         Make code unconditional.
1022         [!__NR_timer_gettime]: Remove conditional code.
1023         (timer_gettime) [!__ASSUME_POSIX_TIMERS]: Likewise.
1024         * sysdeps/unix/sysv/linux/timer_routines.c [__NR_timer_create]:
1025         Make code unconditional.
1026         [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
1027         * sysdeps/unix/sysv/linux/timer_settime.c [__NR_timer_settime]:
1028         Make code unconditional.
1029         [!__NR_timer_settime]: Remove conditional code.
1030         (timer_settime) [!__ASSUME_POSIX_TIMERS]: Likewise.
1031         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1032         (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Remove
1033         conditional code.
1035 2012-08-15  Tom de Vries  <vries@codesourcery.com>
1036             Maxim Kuvyrkov  <maxim@codesourcery.com>
1038         * sysdeps/pthread/bits/libc-lockP.h (__libc_lock_lock)
1039         (__libc_lock_trylock): Allow pre-existing definitions.
1041 2012-08-15  Maxim Kuvyrkov  <maxim@codesourcery.com>
1043         * pthread_spin_lock.c: New file.
1044         * pthread_spin_trylock.c: New file.
1046 2012-08-08  Joseph Myers  <joseph@codesourcery.com>
1048         * allocatestack.c (setxid_signal_thread) [__ASSUME_TGKILL]: Make
1049         code unconditional.
1050         (setxid_signal_thread) [!__ASSUME_TGKILL]: Remove conditional code.
1051         * pthread_cancel.c (pthread_cancel) [__ASSUME_TGKILL]: Make code
1052         unconditional.
1053         (pthread_cancel) [!__ASSUME_TGKILL]: Remove conditional code.
1054         * sysdeps/pthread/createthread.c (do_clone) [__ASSUME_TGKILL]:
1055         Make code unconditional.
1056         (do_clone) [!__ASSUME_TGKILL]: Remove conditional code.
1057         * sysdeps/unix/sysv/linux/pt-raise.c (raise) [__ASSUME_TGKILL ||
1058         __NR_tgkill]: Make code unconditional.
1059         (raise) [__ASSUME_TGKILL]: Likewise.
1060         (raise) [!__ASSUME_TGKILL]: Remove conditional code.
1061         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill)
1062         [__ASSUME_TGKILL]: Make code unconditional.
1063         (__pthread_kill) [!__ASSUME_TGKILL]: Remove conditional code.
1064         * sysdeps/unix/sysv/linux/raise.c (raise) [__ASSUME_TGKILL ||
1065         __NR_tgkill]: Make code unconditional.
1066         (raise) [__ASSUME_TGKILL]: Likewise.
1067         (raise) [!__ASSUME_TGKILL]: Remove conditional code.
1069 2012-08-07  Joseph Myers  <joseph@codesourcery.com>
1071         * sysdeps/pthread/createthread.c (create_thread)
1072         [!__ASSUME_NO_CLONE_DETACHED]: Remove conditional code.
1074 2012-08-03  Joseph Myers  <joseph@codesourcery.com>
1076         * nptl-init.c (sigcancel_handler) [__ASSUME_CORRECT_SI_PID]: Make
1077         code unconditional.
1078         (sighandler_setxid) [__ASSUME_CORRECT_SI_PID]: Likewise.
1080 2012-07-28  Siddhesh Poyarekar  <siddhesh@redhat.com>
1082         * tst-pthread-getattr.c (MAX_STACK_SIZE): New macro.
1083         (pagesize): New static variable.
1084         (allocate_and_test): Return MEM.  Rename parameter to TARGET.
1085         (check_stack_top): New local variables MEM and PAGEMASK.  Cap
1086         stack size to MAX_STACK_SIZE.  Call allocate_and_test for
1087         halfway up the stack top page.  Verify that the top page was
1088         written into.
1089         (do_test): Get pagesize using sysconf.
1091 2012-07-25  Andreas Schwab  <schwab@linux-m68k.org>
1093         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Remove pseudo_end
1094         label.
1095         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Likewise.
1096         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO):
1097         Likewise.
1099 2012-07-25  Siddhesh Poyarekar  <siddhesh@redhat.com>
1101         * tst-pthread-getattr.c: Revert last change.
1103 2012-07-20  Siddhesh Poyarekar  <siddhesh@redhat.com>
1105         * tst-pthread-getattr.c (MAX_STACK_SIZE): New max cap for stack
1106         size.
1107         (_MIN): New macro.
1108         (allocate_and_test): Return STACKADDR.  Access STACKADDR instead
1109         of MEM to test.
1110         (check_stack_top): Read valued written into STACKADDR in
1111         allocate_and_test.  Cap stack size to MAX_STACK_SIZE.
1113 2012-07-19  Siddhesh Poyarekar  <siddhesh@redhat.com>
1115         * nptl-init.c (sighandler_setxid): Fix the comment that
1116         describes it.
1118 2012-06-23  Thomas Schwinge  <thomas@codesourcery.com>
1120         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
1121         (__lll_robust_timedlock_wait): Simplify CFI directives.
1123 2012-06-20  Siddhesh Poyarekar  <siddhesh@redhat.com>
1125         [BZ #12416]
1126         * Makefile (tests): Add test case.
1127         * pthread_getattr_np.c (pthread_getattr_np): Deduct pages below
1128         the __libc_stack_end page from stacksize.  Truncate stacksize to
1129         make it page aligned when it is computed from RLIMIT_STACK.
1130         * tst-pthread-getattr.c: New test case. Verify that stackaddr is
1131         accessible.
1133 2012-06-07  Carlos Sánchez de La Lama  <csanchezdll@gmail.com>
1135         [BZ #14205]
1136         * sysdeps/sparc/sparc32/pthread_spin_lock.S: Do not use v9
1137         branches.
1139 2012-06-04  Siddhesh Poyarekar  <siddhesh@redhat.com>
1140             Jakub Jelinek  <jakub@redhat.com>
1142         [BZ #14188]
1143         * sysdeps/pthread/pthread.h
1144         [!(defined __GNUC__ && defined __EXCEPTIONS)]
1145         (pthread_cleanup_push, pthread_cleanup_push_defer_np): Use
1146         __libc_unlikely instead of __builtin_expect.
1148 2012-05-30  H.J. Lu  <hongjiu.lu@intel.com>
1150         [BZ #14117]
1151         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Removed.
1152         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
1153         * sysdeps/unix/sysv/linux/i386/Implies: New file.
1154         * sysdeps/unix/sysv/linux/x86_64/Implies: Likewise.
1155         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Renamed
1156         to ...
1157         * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: This.
1158         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Renamed
1159         to ...
1160         * sysdeps/unix/sysv/linux/x86/bits/semaphore.h: This.
1162 2012-05-30  Andreas Schwab  <schwab@linux-m68k.org>
1164         [BZ #14132]
1165         * nptl-init.c (pthread_functions): Remove use of INTUSE and
1166         _internal aliases.
1167         (__pthread_initialize_minimal_internal): Likewise.
1168         * sem_open.c: Likewise.
1169         * sem_unlink.c: Likewise.
1170         * pthreadP.h: Replace _internal aliases by hidden_proto
1171         declarations.
1172         * pthread_getspecific.c: Replace _internal alias by hidden_def.
1173         * pthread_key_create.c: Likewise.
1174         * pthread_mutex_destroy.c: Likewise.
1175         * pthread_mutex_init.c: Likewise.
1176         * pthread_mutex_lock.c: Likewise.
1177         * pthread_mutex_unlock.c: Likewise.
1178         * pthread_once.c: Likewise.
1179         * pthread_rwlock_rdlock.c: Likewise.
1180         * pthread_rwlock_unlock.c: Likewise.
1181         * pthread_rwlock_wrlock.c: Likewise.
1182         * pthread_setspecific.c: Likewise.
1183         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
1184         Likewise.
1185         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1186         Likewise.
1187         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1188         Likewise.
1189         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1190         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
1191         * sysdeps/unix/sysv/linux/s390/pthread_once.c: Likewise.
1192         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
1193         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
1194         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1195         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1196         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
1197         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
1198         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
1199         Likewise.
1200         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
1201         Likewise.
1202         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
1203         Likewise.
1205 2012-05-27  Chung-Lin Tang  <cltang@codesourcery.com>
1207         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO, LOAD_ARGS_1)
1208         (LOAD_ARGS_2 ,LOAD_ARGS_3 ,LOAD_ARGS_4): Add CFI restores.
1210         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_lock_wait_private)
1211         (__lll_lock_wait, __lll_timedlock_wait, __lll_timedwait_tid): Add CFI
1212         directives.
1213         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
1214         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Likewise.
1215         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
1216         (pthread_barrier_wait): Likewise.
1217         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
1218         (__pthread_cond_broadcast): Likewise.
1219         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
1220         (__pthread_cond_signal): Likewise.
1221         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1222         (__pthread_cond_timedwait): Likewise.
1223         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S (__pthread_cond_wait):
1224         Likewise.
1225         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S
1226         (__pthread_rwlock_rdlock): Likewise.
1227         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
1228         (pthread_rwlock_timedrdlock): Likewise.
1229         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
1230         (pthread_rwlock_timedwrlock): Likewise.
1231         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
1232         (__pthread_rwlock_unlock): Likewise.
1233         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S
1234         (__pthread_rwlock_wrlock): Likewise.
1235         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post): Likewise.
1236         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
1237         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
1238         Likewise.
1239         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
1241 2012-05-26  Siddhesh Poyarekar  <siddhesh@redhat.com>
1243         [BZ #12416]
1244         * nptl/pthread_getattr_np.c (pthread_getattr_np): Use
1245         __libc_stack_end rounded to the end of containing page as the
1246         real stack end.
1248 2012-05-25  Rayson Ho  <rho@redhat.com>
1250         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Low-level SystemTap
1251         probes for i386.
1252         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1253         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1254         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
1255         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1256         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1257         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1258         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1259         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1261 2012-05-25  Rayson Ho  <rho@redhat.com>
1262             Roland McGrath  <roland@hack.frob.com>
1264         * DESIGN-systemtap-probes.txt: New file.
1265         * pthread_cond_broadcast.c: SystemTap probes.
1266         * pthread_cond_init.c: Likewise.
1267         * pthread_cond_signal.c: Likewise.
1268         * pthread_cond_wait.c: Likewise.
1269         * pthread_cond_destroy.c: Likewise.
1270         * pthread_create.c: Likewise.
1271         * pthread_join.c: Likewise.
1272         * pthread_mutex_destroy.c: Likewise.
1273         * pthread_mutex_init.c: Likewise.
1274         * pthread_mutex_lock.c: Likewise.
1275         * pthread_mutex_timedlock.c: Likewise.
1276         * pthread_mutex_unlock.c: Likewise.
1277         * pthread_rwlock_destroy.c: Likewise.
1278         * pthread_rwlock_rdlock.c: Likewise.
1279         * pthread_rwlock_unlock.c: Likewise.
1280         * pthread_rwlock_wrlock.c: Likewise.
1281         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1282         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1283         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
1284         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1285         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1286         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1287         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1288         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1290 2012-05-24  Roland McGrath  <roland@hack.frob.com>
1292         * pthread_create.c (start_thread): Define pthread_start LIBC_PROBE.
1294 2012-05-17  Andreas Jaeger  <aj@suse.de>
1296         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
1297         (HAVE_DL_DISCOVER_OSVERSION): Don't declare _dl_discover_osversion
1298         only for older kernels.
1300 2012-05-15  Joseph Myers  <joseph@codesourcery.com>
1302         * pthreadP.h [!__NR_set_robust_list] (__NR_set_robust_list): Do
1303         not define.
1305 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1307         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_lock): Load
1308         futex pointer into RDI_LP.  Use RSP_LP to operate on stack.
1309         (lll_robust_lock): Likewise.
1310         (lll_cond_lock): Likewise.
1311         (lll_robust_cond_lock): Likewise.
1312         (lll_timedlock): Likewise.
1313         (lll_robust_timedlock): Likewise.
1314         (lll_unlock): Likewise.
1315         (lll_robust_unlock): Likewise.
1317 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1319         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use
1320         LP_OP(cmp) and RCX_LP on dep_mutex pointer.
1322 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1324         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Use LP_OP(op)
1325         on NWAITERS.
1326         (__gcc_personality_v0): Replace 8-byte data alignment with
1327         LP_SIZE alignment and .quad with ASM_ADDR.
1329 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1331         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Use LP_OP(op)
1332         on NWAITERS.
1333         (__gcc_personality_v0): Replace 8-byte data alignment with
1334         LP_SIZE alignment and .quad with ASM_ADDR.
1336 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1338         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Use LP_OP(cmp) on
1339         NWAITERS, which is unsigned long int.
1341 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1343         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
1344         (__gcc_personality_v0): Replace 8-byte data alignment with
1345         LP_SIZE alignment and .quad with ASM_ADDR.
1347 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1349         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Use
1350         LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer.  Load
1351         __vdso_clock_gettime pointer into RAX_LP.
1352         (__gcc_personality_v0): Replace 8-byte data alignment with
1353         LP_SIZE alignment and .quad with ASM_ADDR.
1355 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1357         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Use
1358         LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer.  Load
1359         __vdso_clock_gettime pointer into RAX_LP.
1360         (__gcc_personality_v0): Replace 8-byte data alignment with
1361         LP_SIZE alignment and .quad with ASM_ADDR.
1363 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1365         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Use
1366         LP_OP(cmp) and R8_LP on dep_mutex pointer.
1368 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1370         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Use LP_OP(mov)
1371         to update pointer in memory.  Load pointer into RDI_LP.
1373 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1375         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1376         (LLL_STUB_UNWIND_INFO_START): Align label to LP_SIZE instead
1377         of 8.
1378         (LLL_STUB_UNWIND_INFO_END): Likewise.
1379         (lll_timedlock): Load timeout pointer into RDX_LP.
1380         (lll_robust_timedlock): Likewise.
1382 2012-05-15  Siddhesh Poyarekar  <siddhesh@redhat.com>
1383             Jakub Jelinek  <jakub@redhat.com>
1385         [BZ #13613]
1386         * Makefile (tests): Add test cases.
1387         * descr.h (struct pthread): Add a comment describing multiple_threads.
1388         * pthreadP.h (__pthread_multiple_threads): Expand comment to include
1389         single-process case.
1390         * pthread_cancel.c (pthread_cancel): Enable multiple_threads
1391         before setting cancelstate of the thread.
1392         * sysdeps/unix/sysv/linux/libc_multiple_threads.c
1393         (__libc_multiple_threads): Add explanatory comment.
1394         * tst-cancel-self-cancelstate.c: New test case.
1395         * tst-cancel-self-canceltype.c: Likewise.
1396         * tst-cancel-self-cleanup.c: Supporting file for test cases.
1397         * tst-cancel-self-testcancel.c: New test case.
1398         * tst-cancel-self.c: Likewise.
1399         * vars.c: Expand comment to include single-process case.
1401 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
1403         * sysdeps/x86_64/tls.h: Don't include <bits/wordsize.h>.
1404         (tcbhead_t): Remove __x86_64__ check.  Align rtld_savespace_sse
1405         to 32 bytes.
1407 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
1409         * sysdeps/pthread/pthread.h (__PTHREAD_RWLOCK_INT_FLAGS_SHARED):
1410         New.
1411         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Check
1412         __PTHREAD_RWLOCK_INT_FLAGS_SHARED instead of __WORDSIZE.
1414 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
1416         * shlib-versions: Move x86_64-.*-linux.* entry to ...
1417         * sysdeps/x86_64/64/shlib-versions: Here.  New file.
1418         * sysdeps/x86_64/x32/shlib-versions: New file.
1420 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
1422         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Define x32
1423         __SIZEOF_PTHREAD_XXX_T.
1424         (__pthread_internal_list): Check __x86_64__ instead of __WORDSIZE.
1425         (pthread_mutex_t): Likewise.
1426         (pthread_rwlock_t): Likewise.
1427         (__PTHREAD_RWLOCK_INT_FLAGS_SHARED): New.  Defined if __x86_64__
1428         is defined.
1430 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
1432         * sysdeps/x86_64/x32/tls.h: New file.
1434 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
1436         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Use uint64_t on 64-bit
1437         integer.
1438         (THREAD_SETMEM_NC): Likewise.
1440 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
1442         * sysdeps/x86_64/tls.h (THREAD_SELF): Replace movq/%q0 with
1443         mov/%0.
1445 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
1447         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
1448         (__cleanup_fct_attribute): Check __x86_64__ instead of
1449         __WORDSIZE.
1451 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
1453         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER): Check
1454         __PTHREAD_MUTEX_HAVE_PREV instead of __WORDSIZE.
1455         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Likewise.
1456         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
1457         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
1459 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
1461         * pthread_create.c (start_thread): Check __PTHREAD_MUTEX_HAVE_PREV
1462         instead of __WORDSIZE.
1464 2012-05-10  Thomas Schwinge  <thomas@schwinge.name>
1466         [BZ #3748]
1467         * sysdeps/pthread/bits/libc-lockP.h (__libc_once_get): New macro.
1469 2012-05-09  Chung-Lin Tang  <cltang@codesourcery.com>
1471         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1472         (__pthread_cond_timedwait): Use CFI directives.
1473         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
1474         (__pthread_cond_wait): Likewise.
1475         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
1476         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
1478 2012-05-03  David S. Miller  <davem@davemloft.net>
1480         * sysdeps/sparc/sparc64/pthread_spin_unlock.S: Fix thinko, we
1481         always have to return 0, especially for the pthread_spin_init
1482         alias.
1483         * sysdeps/sparc/sparc32/pthread_spin_lock.S: Add missing trailing
1484         newline.
1485         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: Likewise.
1486         * sysdeps/sparc/sparc64/pthread_spin_lock.S: Likewise.
1488 2012-05-02  David S. Miller  <davem@davemloft.net>
1490         * sysdeps/sparc/sparc64/pthread_spin_lock.S: New.
1491         * sysdeps/sparc/sparc64/pthread_spin_lock.c: Delete.
1492         * sysdeps/sparc/sparc64/pthread_spin_unlock.S: New.
1493         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: Delete.
1494         * sysdeps/sparc/sparc64/pthread_spin_trylock.S: New.
1495         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: Delete.
1496         * sysdeps/sparc/sparc64/pthread_spin_init.c: New.
1497         * sysdeps/sparc/sparc32/pthread_spin_lock.S: New.
1498         * sysdeps/sparc/sparc32/pthread_spin_lock.c: Delete.
1499         * sysdeps/sparc/sparc32/pthread_spin_trylock.S: New.
1500         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: Delete.
1501         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: New.
1502         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: Delete.
1503         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.S: New.
1504         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: Delete.
1505         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.S: New.
1506         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: Delete.
1507         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_init.c: New.
1509 2012-05-02  Allan McRae  <allan@archlinux.org>
1511         * Makefile: (LDFLAGS-tst-tls5): Use $(no-as-needed).
1512         (LDFLAGS-tst-cancel24): Likewise.
1514 2012-05-02  Paul Pluzhnikov  <ppluzhnikov@google.com>
1516         * sysdeps/i386/pthread_spin_lock.S: New.
1517         * sysdeps/i386/pthread_spin_lock.c: Delete.
1518         * sysdeps/x86_64/pthread_spin_lock.S: New.
1519         * sysdeps/x86_64/pthread_spin_lock.c: Delete.
1521 2012-04-28  Andreas Schwab  <schwab@linux-m68k.org>
1523         * Makefile ($(objpfx)tst-stack3-mem, $(objpfx)tst-tls6.out): Don't
1524         run when cross-compiling.
1526 2012-04-26  Siddhesh Poyarekar  <siddhesh@redhat.com>
1528         * sysdeps/pthread/unwind-forcedunwind.c: Include gnu/lib-names.h
1529         instead of libgcc_s.h.
1531 2012-04-20  Paul Pluzhnikov  <ppluzhnikov@google.com>
1533         * sysdeps/x86_64/tls.h (TLS_GET_FS, TLS_SET_FS): Delete.
1535 2012-03-27  David S. Miller  <davem@davemloft.net>
1537         * tst-cond16.c (do_test): Use a thread stack size which is either
1538         PTHREAD_STACK_MIN or the page size, whichever is larger.
1539         * tst-cond18.c (do_test): Likewise.
1541 2012-03-19  H.J. Lu  <hongjiu.lu@intel.com>
1543         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Use
1544         register char * __asm__("rsp") to get stack frame.
1546 2012-03-19  H.J. Lu  <hongjiu.lu@intel.com>
1548         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (SYS_futex): Use
1549         __NR_futex directly.
1551 2012-03-19  H.J. Lu  <hongjiu.lu@intel.com>
1553         * unwind.c (unwind_stop): Cast _Unwind_GetCFA return to
1554         _Unwind_Ptr first.
1556 2012-03-16  David S. Miller  <davem@davemloft.net>
1558         [BZ #13844]
1559         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: Include using <..>
1560         instead of "...".
1561         * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c:
1562         Delete, not needed.
1564 2012-03-15  David S. Miller  <davem@davemloft.net>
1566         [BZ #13844]
1567         * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c: New file.
1569 2012-03-09  Paul Eggert  <eggert@cs.ucla.edu>
1571         [BZ #13673]
1572         * pt-crti.S: Replace FSF snail mail address with URL.
1574 2012-03-09  Joseph Myers  <joseph@codesourcery.com>
1576         * sysdeps/pthread/pthread.h (__need_clockid_t, __need_timespec):
1577         Do not define before including <time.h>.
1579 2012-03-08  David S. Miller  <davem@davemloft.net>
1581         * sysdeps/unix/sysv/linux/sparc/sem_post.c: Update copyright year.
1583 2012-03-08  Thomas Schwinge  <thomas@codesourcery.com>
1585         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1586         Check for timestamp before the Epoch.
1588         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Fix
1589         updating nwaiters.
1591         * tst-sem13.c (do_test): Add another test case.
1592         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1593         Fix updating nwaiters.
1595 2012-03-07  Joseph Myers  <joseph@codesourcery.com>
1597         [BZ #10545]
1598         * sysdeps/pthread/configure.in (libc_cv_forced_unwind): Change
1599         link test to a compile test.
1600         (libc_cv_c_cleanup): Likewise.  Declare puts rather than including
1601         <stdio.h>.
1602         * sysdeps/pthread/configure: Regenerated.
1604 2012-03-07  Ulrich Drepper  <drepper@gmail.com>
1606         * Makefile (distribute): Remove variable.
1608 2012-01-23  Thomas Schwinge  <thomas@codesourcery.com>
1610         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Get rid of
1611         superfluous assignment.
1612         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c (sem_timedwait):
1613         Likewise.
1614         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
1615         (sem_timedwait): Likewise.
1617 2012-03-06  Ulrich Drepper  <drepper@gmail.com>
1619         * sysdeps/pthread/bits/libc-lock.h: Move information not needed in
1620         installed headers to...
1621         * sysdeps/pthread/bits/libc-lockP.h: ...here.  New file.
1623 2012-03-06  David S. Miller  <davem@davemloft.net>
1625         * sysdeps/unix/sysv/linux/sparc/sem_post.c (__new_sem_post): Use
1626         atomic_increment and remove unused local variable.
1627         (__old_sem_post): Likewise.
1629 2012-02-27  David S. Miller  <davem@davemloft.net>
1631         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Don't refer to
1632         non-existing __pthread_attr.
1633         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1634         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1635         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1636         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1637         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1639 2012-02-26  Ulrich Drepper  <drepper@gmail.com>
1641         * sysdeps/pthread/pthread.h: Define __need_clockid_t for __USE_XOPEN2K.
1643         * sysdeps/pthread/pthread.h: Define __need_timespec before including
1644         <time.h>.
1645         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Name pthread_attr_t
1646         union.
1647         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1648         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1649         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1650         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1651         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1653 2012-02-21  Joseph Myers  <joseph@codesourcery.com>
1655         [BZ #13695]
1656         * Makefile (generated): Remove crti.S, crtn.S, defs.h and
1657         pt-initfini.s.
1658         [crti.S not in sysdirs] (omit-deps): Do not append.
1659         [crti.S not in sysdirs] (CFLAGS-pt-initfini.s): Remove variable.
1660         [crti.S not in sysdirs] (pt-initfini.c): Remove vpath directive.
1661         [crti.S not in sysdirs] ($(objpfx)crti.S): Remove rule.
1662         [crti.S not in sysdirs] ($(objpfx)crtn.S): Likewise.
1663         [crti.S not in sysdirs] ($(objpfx)defs.h): Likewise.
1664         [crti.S not in sysdirs] ($(objpfx)crti.o): Likewise.
1665         [crti.S not in sysdirs] ($(objpfx)crtn.o): Likewise.
1666         [crti.S in sysdirs] (extra-objs): Append unconditionally.
1667         [crti.S in sysdirs] ($(objpfx)crti.o): Define rule
1668         unconditionally.
1669         * sysdeps/pthread/pt-initfini.c: Remove file.
1671 2012-02-16  Richard Henderson  <rth@twiddle.net>
1673         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Remove file.
1674         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Remove file.
1676 2012-02-15  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1678         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Remove file.
1680 2012-02-16  David S. Miller  <davem@davemloft.net>
1682         * sysdeps/sparc/Makefile: Add -fPIC when building pt-crti.S and crtn.S
1684 2012-02-15  Marek Polacek  <polacek@redhat.com>
1686         * sysdeps/unix/sysv/linux/x86_64/Makefile: Remove file.
1688 2012-02-09  Paul Eggert  <eggert@cs.ucla.edu>
1690         Replace FSF snail mail address with URLs, as per GNU coding standards.
1692 2012-02-08  Andreas Schwab  <schwab@linux-m68k.org>
1694         * Makefile (extra-objs) [crti.S in sysdirs]: Add pt-crti.o.
1696 2012-02-08  Joseph Myers  <joseph@codesourcery.com>
1698         Support crti.S and crtn.S provided directly by architectures.
1699         * Makefile [crti.S in sysdirs] (omit-deps): Do not append.
1700         [crti.S in sysdirs] (CFLAGS-pt-initfini.s): Do not define variable.
1701         [crti.S in sysdirs] ($(objpfx)pt-initfini.s): Disable rule.
1702         [crti.S in sysdirs] ($(objpfx)crti.S): Likewise.
1703         [crti.S in sysdirs] ($(objpfx)crtn.S): Likewise.
1704         [crti.S in sysdirs] ($(objpfx)defs.h): Likewise.
1705         [crti.S in sysdirs] ($(objpfx)crti.o): Likewise.
1706         [crti.S in sysdirs] ($(objpfx)crtn.o): Likewise.
1707         [crti.S in sysdirs] (pt-initfini.c): Remove vpath directive.
1708         [crti.S in sysdirs] ($(objpfx)crti.o): New rule.
1709         * pt-crti.S: New file.
1710         * sysdeps/unix/sysv/linux/i386/Makefile: Remove file.
1712 2012-02-03  Joseph Myers  <joseph@codesourcery.com>
1714         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
1715         macros for PIC register setup.
1716         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1717         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1718         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1719         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1720         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1722 2012-01-11  Marek Polacek  <polacek@redhat.com>
1724         * forward.c (FORWARD_NORETURN): Define macro.
1725         (__pthread_unwind): Use FORWARD_NORETURN macro to avoid warning.
1726         (__pthread_exit): Likewise.
1728 2012-01-10  Ulrich Drepper  <drepper@gmail.com>
1730         * sysdeps/pthread/pthread.h: Add const attribute to pthread_equal.
1732         * pthreadP.h: Add noreturn to __pthread_exit.
1733         * sysdeps/pthread/pthread-functions.h: Likewise for ptr___pthread_exit.
1735 2011-12-30  Adhemerval Zanella  <azanella@linux.vnet.ibm.com>
1737         * sysdeps/unix/sysv/linux/aio_misc.h (__aio_create_helper_thread):
1738         Call pthread_attr_setstacksize() with result of
1739         __pthread_get_minstack() to account for application TLS usage.
1741 2012-01-08  Marek Polacek  <polacek@redhat.com>
1743         * sysdeps/unix/sysv/linux/mq_notify.c: Include <nptl/pthreadP.h>.
1745 2012-01-07  Ulrich Drepper  <drepper@gmail.com>
1747         [BZ #13553]
1748         * pthreadP.h: Use const instead of __const.
1749         * semaphore.h: Likewise.
1750         * sysdeps/pthread/bits/libc-lock.h: Likewise.
1751         * sysdeps/pthread/bits/sigthread.h: Likewise.
1752         * sysdeps/pthread/pthread.h: Likewise.
1754         * Makefile: Remove elf=yes test, only ELF is supported.
1756         * shlib-versions: Remove entries for ports architectures.
1758         In case anyone cares, the IA-64 architecture could move to ports.
1759         * sysdeps/ia64/*: Removed.
1760         * sysdeps/unix/sysv/linux/ia64/*: Removed.
1762 2011-12-22  Ulrich Drepper  <drepper@gmail.com>
1764         * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread): Use
1765         __pthread_get_minstack.
1766         * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Likewise.
1768         [BZ #13088]
1769         * sysdeps/unix/sysv/linux/timer_routines.c: Get minimum stack size
1770         through __pthread_get_minstack.
1771         * nptl-init.c (__pthread_initialize_minimal_internal): Get page size
1772         directly from _rtld_global_ro.
1773         (__pthread_get_minstack): New function.
1774         * pthreadP.h: Declare __pthread_get_minstack.
1775         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_get_minstack.
1777 2011-12-21  Ulrich Drepper  <drepper@gmail.com>
1779         [BZ #13515]
1780         * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1781         Correct reading name from file.
1783 2011-12-14  Carlos O'Donell  <carlos@systemhalted.org>
1785         * allocatestack.c (allocate_stack): Return errno on failure.
1787 2011-12-14  Jeff Law  <law@redhat.com>
1789         [BZ #5245]
1790         * pthread_create.c (__pthread_create_2_1): Translate ENOMEM to EAGAIN.
1792 2011-11-28  Andreas Schwab  <schwab@redhat.com>
1794         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Handle
1795         EAGAIN from FUTEX_WAIT_REQUEUE_PI.
1796         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1798 2011-11-15  Ulrich Drepper  <drepper@gmail.com>
1800         * pthread_getattr_np.c (pthread_getattr_np): Set FD_CLOEXEC for
1801         /proc/self/maps.
1803 2011-10-29  Ulrich Drepper  <drepper@gmail.com>
1805         [BZ #13358]
1806         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1807         (__pthread_cond_timedwait): Initialize %r15 correctly also for code
1808         path for kernels with FUTEX_CLOCK_REALTIME.
1809         Debugged by H.J. Lu <hjl.tools@gmail.com>.
1811 2011-10-27  Andreas Schwab  <schwab@redhat.com>
1813         [BZ #13344]
1814         * sysdeps/pthread/pthread.h: Use __THREADNL instead of __THREAD
1815         for memory synchronization functions.
1816         * semaphore.h: Likewise.
1818 2011-10-24  Ulrich Drepper  <drepper@gmail.com>
1820         * tst-cancel7.c: Avoid warning.
1821         * tst-mutex6.c: Likewise.
1822         * tst-mutex9.c: Likewise.
1823         * tst-mutexpi6.c: Likewise.
1825 2011-10-23  Ulrich Drepper  <drepper@gmail.com>
1827         * sysdeps/i386/tls.h: Remove #include <list.h>.
1829 2011-10-15  Ulrich Drepper  <drepper@gmail.com>
1831         * pthread_create.c (start_thread): Call __ctype_init.
1833 2011-09-15  Andreas Schwab  <schwab@redhat.com>
1835         * sysdeps/pthread/list.h: Define only list_t if __need_list_t is
1836         defined.
1837         (list_add): Add atomic_write_barrier.
1838         * descr.h: Define __need_list_t before including <list.h>.
1839         * nptl-init.c: Include <list.h>
1840         * allocatestack.c: Likewise.
1842 2011-09-11  Ulrich Drepper  <drepper@gmail.com>
1844         * sysdeps/i386/tls.h: Remove HAVE_TLS_SUPPORT test.
1845         * sysdeps/ia64/tls.h: Likewise.
1846         * sysdeps/powerpc/tls.h: Likewise.
1847         * sysdeps/s390/tls.h: Likewise.
1848         * sysdeps/sh/tls.h: Likewise.
1849         * sysdeps/sparc/tls.h: Likewise.
1850         * sysdeps/x86_64/tls.h: Likewise.
1852 2011-09-10  Ulrich Drepper  <drepper@gmail.com>
1854         * sysdeps/pthread/malloc-machine.h: Define MUTEX_INITIALIZER.
1856         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Don't handle
1857         !USE___THREAD.
1858         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1859         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1860         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1861         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1862         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
1863         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
1864         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
1865         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
1866         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1867         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1868         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
1869         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1871         * tst-tls1.c: Support for __thread is now mandatory.
1872         * tst-tls2.c: Likewise.
1873         * tst-tls3.c: Likewise.
1874         * tst-tls3mod.c: Likewise.
1875         * tst-tls4.c: Likewise.
1876         * tst-tls4moda.c: Likewise.
1877         * tst-tls4modb.c: Likewise.
1878         * tst-tls5.h: Likewise.
1880 2011-09-08  Ulrich Drepper  <drepper@gmail.com>
1882         [BZ #12403]
1883         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1884         (pthread_rwlock_timedwrlock): Use correct macro in test.
1885         Patch by H.J. Lu <hongjiu.lu@intel.com>.
1887 2011-09-06  Ulrich Drepper  <drepper@gmail.com>
1889         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): Don't
1890         use gettimeofday vsyscall, just call gettimeofday.
1891         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1892         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
1893         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1894         Likewise.
1895         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1896         Likewise.
1897         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1898         Simplify __vdso_clock_gettime use.
1900 2011-09-05  David S. Miller  <davem@davemloft.net>
1902         * sysdeps/unix/sysv/linux/sem_timedwait.c (do_futex_timed_wait):
1903         New function.
1904         (sem_timedwait): Call it to force an exception region around
1905         the async cancel enable and the futex operation.
1906         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: Likewise.
1907         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: Likewise.
1908         * sysdeps/unix/sysv/linux/sem_wait.c (do_futex_wait): New function.
1909         (__new_sem_wait): Call it to force an exception region around
1910         the async cancel enable and the futex operation.
1911         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: Likewise.
1912         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: Likewise.
1914 2011-08-31  Andreas Schwab  <schwab@redhat.com>
1916         * allocatestack.c (setxid_mark_thread): Ensure that the exiting
1917         thread is woken up.
1919 2011-08-20  David S. Miller  <davem@davemloft.net>
1921         * Makefile (tst-cleanup0.out): Fix typo in output redirection.
1923 2011-08-14  Roland McGrath  <roland@hack.frob.com>
1925         * sysdeps/i386/pthreaddef.h (TCB_ALIGNMENT): Set to 64, optimal on Atom.
1926         * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Likewise.
1928 2011-08-08  Andreas Schwab  <schwab@redhat.com>
1930         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned
1931         stack.
1932         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1933         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1935 2011-07-22  Ulrich Drepper  <drepper@gmail.com>
1937         * sysdeps/pthread/unwind-forcedunwind.c (_Unwind_Resume): Add read
1938         barrier.
1939         (__gcc_personality_v0): Likewise.
1940         (_Unwind_ForcedUnwind): Likewise.
1941         (_Unwind_GetCFA): Likewise.
1943 2011-07-14  Roland McGrath  <roland@hack.frob.com>
1945         * allocatestack.c (__reclaim_stacks): Use uintptr_t cast rather than
1946         UINTMAX_C.
1948 2011-06-30  Ulrich Drepper  <drepper@gmail.com>
1950         * nptl-init.c (__nptl_set_robust): New function.
1951         (pthread_functions): Add reference.
1952         * npthreadP.h: Declare __nptl_set_robust.
1953         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
1954         ptr_set_robust member.
1955         * sysdeps/unix/sysv/linux/fork.c: Call set_robust_list syscall in
1956         child if threads are used.
1958 2011-06-14  Andreas Jaeger  <aj@suse.de>
1960         * pthread_rwlock_init.c: Include <string.h> for memset declaration.
1962 2011-05-11  Ulrich Drepper  <drepper@gmail.com>
1964         [BZ #386]
1965         * allocatestack.c (allocate_stack): Convert ENOMEM error to EAGAIN.
1967 2011-04-10  Ulrich Drepper  <drepper@gmail.com>
1969         [BZ #12650]
1970         * allocatestack.c (get_cached_stack): Deallocate DTV entries before
1971         clearing memory.
1972         Patch partly by Robert Rex <robert.rex@exasol.com>.
1974 2011-01-19  Roland McGrath  <roland@redhat.com>
1976         * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
1977         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1978         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
1979         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1980         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
1981         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
1983 2011-01-16  Andreas Schwab  <schwab@linux-m68k.org>
1985         * Makefile (test-extras): Add tst-cleanup4aux.
1987 2011-01-14  Ulrich Drepper  <drepper@gmail.com>
1989         [BZ #10563]
1990         * sysdeps/pthread/setxid.h (__SETXID_1): Add cast to assignment.
1991         (__SETXID_2): Likewise.
1992         (__SETXID_3): Likewise.
1994 2011-01-13  Ulrich Drepper  <drepper@gmail.com>
1996         [BZ #10484]
1997         * Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
1998         * alloca_cutoff.c: Add libc_hidden_def.
2000 2010-10-13  H.J. Lu  <hongjiu.lu@intel.com>
2002         [BZ #12113]
2003         * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
2004         * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
2005         of "struct pthread".
2007 2010-09-21  Andreas Schwab  <schwab@redhat.com>
2009         * sysdeps/pthread/pthread.h (pthread_cleanup_push)
2010         [!__EXCEPTIONS]: Mangle local variable not_first_call.
2011         (pthread_cleanup_push_defer_np): Likewise.
2013 2010-09-03  Ulrich Drepper  <drepper@redhat.com>
2015         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are
2016         small.
2018 2010-08-10  Dinakar Guniguntala  <dino@in.ibm.com>
2019             Stefan Hajnoczi  <stefanha@linux.vnet.ibm.com>
2021         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
2022         FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
2024 2010-08-12  H.J. Lu  <hongjiu.lu@intel.com>
2026         * sysdeps/unix/sysv/linux/i386/Makefile: New file.
2028 2010-05-01  Alan Modra  <amodra@gmail.com>
2030         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
2031         (PSEUDO): Use correct cr save.  Don't use wrong parm save area
2032         to save temps.  Correct cfi for possible later frame manipulation.
2033         (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
2034         (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
2035         (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
2036         (DOCARGS_6, UNDOCARGS_6): Likewise.
2037         (CENABLE, CDISABLE): Add nops for non-shared calls.
2039 2010-07-06  Andreas Schwab  <schwab@redhat.com>
2041         * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
2042         Fix type mismatch.
2044 2010-07-03  Ulrich Drepper  <drepper@redhat.com>
2046         * tst-abstime.c (do_test): Some more cleanups
2048 2010-07-02  Ulrich Drepper  <drepper@redhat.com>
2050         * tst-abstime.c: Correct testing and add test for sem_timedwait.
2052 2010-07-01  Andreas Schwab  <schwab@redhat.com>
2053             Ulrich Drepper  <drepper@redhat.com>
2055         * Makefile (tests): Add tst-abstime.
2056         * tst-abstime.c: New file.
2057         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2058         (__lll_timedlock_wait): Check for timestamp before the Epoch.
2059         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2060         (__lll_timedlock_wait): Likewise.
2061         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2062         (__lll_robust_timedlock_wait): Likewise.
2063         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2064         (__pthread_cond_timedwait): Likewise.
2065         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
2066         (pthread_rwlock_timedrdlock): Likewise.
2067         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
2068         (pthread_rwlock_timedwrlock): Likewise.
2069         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2070         Likewise.
2072 2010-07-01  Ulrich Drepper  <drepper@redhat.com>
2074         * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
2076 2010-06-01  Takashi Yoshii  <takashi.yoshii.zj@renesas.com>
2078         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
2079         location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
2081 2010-04-09  Ulrich Drepper  <drepper@redhat.com>
2083         [BZ #11390]
2084         * sysdeps/unix/sysv/linux/pthread_getname.c: New file.
2085         * sysdeps/unix/sysv/linux/pthread_setname.c: New file.
2086         * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and
2087         pthread_setname.
2088         * Makefile (libpthread-routines): Add pthread_getname and
2089         pthread_setname.
2090         * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12.
2092 2010-04-05  Thomas Schwinge  <thomas@schwinge.name>
2094         * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/.
2095         * sysdeps/pthread/rt-unwind-resume.c: Likewise.
2096         * sysdeps/pthread/Makefile: Remove csu section and rt section's
2097         unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead.
2099 2010-03-23  Luis Machado  <luisgpm@br.ibm.com>
2101         * pthread_cond_timedwait.c: Add check for
2102         HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
2103         (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
2104         INTERNAL_SYSCALL.
2106 2010-03-09  Ulrich Drepper  <drepper@redhat.com>
2108         * pthread_create.c (__pthread_create_2_1): If priorities are incorrect
2109         and the call fails wake eventually waiting setxid threads.  Don't free
2110         stack here if we try starting a thread.
2111         * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter
2112         if the clone call failed.
2114 2010-03-08  Andreas Schwab  <schwab@redhat.com>
2116         * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
2117         * allocatestack.c (get_cached_stack): Set setxid_futex.
2118         (allocate_stack): Likewise.
2120 2010-03-05  Andreas Schwab  <schwab@redhat.com>
2121             Ulrich Drepper  <drepper@redhat.com>
2123         * allocatestack.c (setxid_mark_thread): Delay handling of thread if
2124         it is creating a thread or it is just being created.
2125         * pthread_create.c (start_thread): Wake setxid thread if it is
2126         waiting.
2127         (__pthread_create_2_1): Initialize setxid_futex.
2128         * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it
2129         is waiting.
2131 2010-01-15  Ulrich Drepper  <drepper@redhat.com>
2133         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
2134         Fix unwind info.
2135         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2137 2010-01-15  Michal Schmidt  <mschmidt@redhat.com>
2139         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
2140         Fix pthread_cond_timedwait with requeue-PI.
2141         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
2142         Fix pthread_cond_wait with requeue-PI.
2144 2010-01-14  Ulrich Drepper  <drepper@redhat.com>
2146         * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
2147         and pthread_mutexattr_setrobust for GLIBC_2.12.
2148         * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
2149         * pthread_mutexattr_getrobust.c: Define alias
2150         pthread_mutexattr_getrobust.
2151         * pthread_mutexattr_setrobust.c: Define alias
2152         pthread_mutexattr_setrobust.
2154 2010-01-12  Ulrich Drepper  <drepper@redhat.com>
2156         * sysdeps/pthread/pthread.h: Cleanup.  Fix up for XPG7.
2158 2010-01-08  Ulrich Drepper  <drepper@redhat.com>
2160         * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
2162 2009-12-18  Thomas Schwinge  <thomas@codesourcery.com>
2164         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
2165         call __gmon_start__.
2166         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
2168 2009-12-17  Ulrich Drepper  <drepper@redhat.com>
2170         * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
2171         using memset.
2173 2009-12-01  Dinakar Guniguntala  <dino@in.ibm.com>
2175         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
2176         FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
2177         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
2178         is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
2179         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
2180         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
2181         is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
2182         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2184 2009-12-12  Ulrich Drepper  <drepper@redhat.com>
2186         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
2187         Don't update nwaiters after invalid timeout is recognized.
2189 2009-11-27  Thomas Schwinge  <thomas@codesourcery.com>
2191         * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
2192         __gmon_start__.
2194 2009-11-27  Andreas Schwab  <schwab@redhat.com>
2196         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
2197         THREAD_SELF->cancelhandling after returning from futex call.
2199 2009-11-24  Ulrich Drepper  <drepper@redhat.com>
2201         * tst-sem13.c: New file.
2202         * Makefile (tests): Add tst-sem13.
2204 2009-11-22  Roland McGrath  <roland@redhat.com>
2206         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
2207         instead of recapitulating its contents.
2209 2009-11-18  Ulrich Drepper  <drepper@redhat.com>
2211         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
2212         optimizations and cleanups.
2214 2009-11-18  Dinakar Guniguntala  <dino@in.ibm.com>
2216         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
2217         Remove redundant code. Fix cfi offsets.
2218         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
2219         Fix cfi offsets.
2221 2009-11-17  Ulrich Drepper  <drepper@redhat.com>
2223         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
2224         reduce size of unwind info.
2226         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
2227         cfi directives.
2228         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2229         Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
2231 2009-11-03  Andreas Schwab  <schwab@linux-m68k.org>
2233         [BZ #4457]
2234         * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
2235         LIBGCC_S_SO.
2236         * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
2238 2009-10-30  Ulrich Drepper  <drepper@redhat.com>
2240         * tst-sem11.c (main): Rewrite to avoid aliasing problems.
2242         [BZ #3270]
2243         * allocatestack.c (__nptl_setxid): Perform the operation in multiple
2244         steps to avoid races with creation and terminations.
2245         * nptl-init.c (sighandler_setxid): Adjust.
2246         Patch by Daniel Jacobowitz.
2248 2009-09-07  Andreas Schwab  <schwab@redhat.com>
2250         * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
2252 2009-09-02  Suzuki K P  <suzuki@in.ibm.com>
2253             Joseph Myers  <joseph@codesourcery.com>
2255         [BZ #7094]
2256         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
2257         Initialize the sigev_notify field for newly created timer to make sure
2258         the timer gets deleted from the active timer's list upon timer_delete.
2260 2009-08-27  Andrew Stubbs  <ams@codesourcery.com>
2262         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
2263         Correct a logic error.
2265 2009-08-25  Ulrich Drepper  <drepper@redhat.com>
2267         * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
2268         of the field in local variables.
2269         (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
2270         variable and don't unconditionally clear it.
2272 2009-08-24  Ulrich Drepper  <drepper@redhat.com>
2274         * pthread_create.c (start_thread): Hint to the kernel that memory for
2275         the stack can be reused.  We do not mark all the memory.  The part
2276         still in use and some reserve are kept.
2278 2009-08-23  Ulrich Drepper  <drepper@redhat.com>
2280         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
2282 2009-08-11  Ulrich Drepper  <drepper@redhat.com>
2284         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
2285         directives.
2287 2009-08-10  Ulrich Drepper  <drepper@redhat.com>
2289         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
2290         directives.
2291         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2293 2009-08-10  Andreas Schwab  <schwab@redhat.com>
2295         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2296         (__pthread_cond_signal): Don't clobber register used for syscall
2297         number.
2299 2009-08-08  Ulrich Drepper  <drepper@redhat.com>
2301         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2302         Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
2304         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2305         (__pthread_cond_wait): Optimize by avoiding use of callee-safe
2306         register.
2308 2009-08-07  Ulrich Drepper  <drepper@redhat.com>
2310         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
2311         enabled by the special *_asynccancel functions.
2312         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2313         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2315         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
2317 2009-08-04  Ulrich Drepper  <drepper@redhat.com>
2319         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
2320         * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
2321         * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
2322         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
2323         since we can assume the special __*_{en,dis}able_asynccancel
2324         functions.
2325         (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
2326         * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
2327         and PTHREAD_CANCELED.
2329 2009-07-31  Ulrich Drepper  <drepper@redhat.com>
2331         * descr.h: Better definition of *_BITMASK macros for cancellation.
2333 2009-07-29  Ulrich Drepper  <drepper@redhat.com>
2335         * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
2337         * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
2338         dynamic linker might have to save.
2339         Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
2340         RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL.  Pretty
2341         printing.
2343         * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
2345 2009-07-28  Ulrich Drepper  <drepper@redhat.com>
2347         * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
2348         New function.
2349         * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
2350         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
2351         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
2352         requeue_pi for robust mutexes.
2353         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
2354         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2355         Don't only skip __pthread_mutex_cond_lock.  Call instead
2356         __pthread_mutex_cond_lock_adjust.
2357         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2359         * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
2360         optimization of PI mutex handling.
2362 2009-07-27  Ulrich Drepper  <drepper@redhat.com>
2364         [BZ #10418]
2365         * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
2366         instead of of _acq variants of cmpxchg.
2368 2009-07-23  Ulrich Drepper  <drepper@redhat.com>
2370         * sysdeps/x86_64/configure.in: New file.
2372         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
2373         path when not using absolute timeout futex.
2375 2009-07-20  Ulrich Drepper  <drepper@redhat.com>
2377         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
2378         optimizations of last changes.
2379         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2381 2009-07-19  Ulrich Drepper  <drepper@redhat.com>
2383         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
2384         FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
2385         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
2386         is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
2387         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
2388         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
2389         is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
2390         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2392         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2393         (__pthread_cond_timedwait): Make more robust.
2395 2009-07-18  Ulrich Drepper  <drepper@redhat.com>
2397         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2398         (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
2399         directly use absolute timeout.
2401         * tst-sem5.c (do_test): Add test for premature timeout.
2402         * Makefile: Linu tst-sem5 with librt.
2404         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
2405         (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
2406         directly use absolute timeout.
2407         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
2408         (pthread_rwlock_timedrdlock): Likewise.
2410         * tst-cond11.c (run_test): Add test to check that the timeout is
2411         long enough.
2413         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2414         (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
2415         directly use absolute timeout.
2417         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2418         (__pthread_cond_wait): Convert to using exception handler instead of
2419         registered unwind buffer.
2420         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2421         (__pthread_cond_timedwait): Likewise.
2423 2009-07-17  Ulrich Drepper  <drepper@redhat.com>
2425         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2426         If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
2427         use absolute timeout.
2429         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
2430         handling of uncontested semaphore.
2432         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2433         (__condvar_cleanup): Rewrite to use cfi directives instead of
2434         hand-coded unwind tables.
2435         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
2436         Likewise.
2437         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
2438         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2439         Likewise.
2441 2009-06-12  Ulrich Drepper  <drepper@redhat.com>
2443         * Makefile (libpthread-routines): Add pthread_sigqueue.
2444         * Versions: Add pthread_sigqueue for GLIBC_2.11.
2445         * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
2446         * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
2448 2009-06-11  Ulrich Drepper  <drepper@redhat.com>
2450         [BZ #10262]
2451         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2452         (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
2453         cannot be assumed.
2454         Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
2456 2009-05-16  Ulrich Drepper  <drepper@redhat.com>
2458         * libc-cancellation.c: Move __libc_cleanup_routine to...
2459         * libc-cleanup.c: ...here.  New file.
2460         * Makefile (routines): Add libc-cleanup.
2462         * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
2463         test.
2464         * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
2465         * sysdeps/pthread/librt-cancellation.c: Likewise.
2467         [BZ #9924]
2468         * nptl-init.c: Renamed from init.c.
2469         * Makefile: Change all occurences of init.c to nptl-init.c.
2471 2009-05-15  Ulrich Drepper  <drepper@redhat.com>
2473         * cancellation.c (__pthread_disable_asynccancel): Correct the bits
2474         to test when deciding on the delay.
2475         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
2476         * pthread_cancel.c: Close race between deciding on sending a signal
2477         and setting the CANCELING_BIT bit.
2479         * cancellation.c (__pthread_disable_asynccancel): Don't return if
2480         thread is canceled.
2481         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
2483 2009-04-27  Ulrich Drepper  <drepper@redhat.com>
2485         * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
2486         is available.
2487         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
2488         * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
2489         * sysdeps/i386/tls.h: Likewise.
2490         (tcbhead_t): Add __private_tm member.
2492 2009-04-26  Ulrich Drepper  <drepper@redhat.com>
2494         * sem_open.c (sem_open): Rewrite initialization of initsem to
2495         avoid warnings.
2497         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2498         Avoid warning by using may_alias attribute on ptrhack.
2500 2009-04-22  Ulrich Drepper  <drepper@redhat.com>
2502         [BZ #10090]
2503         * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
2504         Check policy and priority for validity.
2505         Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
2507 2009-03-15  Ulrich Drepper  <drepper@redhat.com>
2509         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2510         (__pthread_cond_timedwait): Change to use cfi directives instead of
2511         hand-coded unwind sections.
2513 2009-03-10  Ulrich Drepper  <drepper@redhat.com>
2515         * init.c (nptl_freeres): Compile only for SHARED.
2517 2009-03-09  Jakub Jelinek  <jakub@redhat.com>
2519         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
2520         FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
2521         FUTEX_BITSET_MATCH_ANY.
2523 2009-02-27  Roland McGrath  <roland@redhat.com>
2525         * init.c (__nptl_initial_report_events): Mark __attribute_used__.
2526         * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
2528 2009-02-26  Ulrich Drepper  <drepper@redhat.com>
2530         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2531         _POSIX_THREAD_ROBUST_PRIO_INHERIT and
2532         _POSIX_THREAD_ROBUST_PRIO_PROTECT.  Reset value of macros from
2533         200112L to 200809L.
2535 2009-02-25  Ulrich Drepper  <drepper@redhat.com>
2537         * sysdeps/pthread/pthread.h: The robust mutex functions are in
2538         POSIX 2008.
2540 2009-02-24  Ulrich Drepper  <drepper@redhat.com>
2542         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
2543         Unify name of include protector macro.
2545 2009-02-14  SUGIOKA Toshinobu  <sugioka@itonet.co.jp>
2547         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
2548         LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
2550 2009-01-29  Ulrich Drepper  <drepper@redhat.com>
2552         * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
2553         pointer variables.
2555         * allocatestack.c (__free_stacks): Renamed from free_stacks.
2556         (__free_stack_cache): Removed.  Change callers to call __free_stacks.
2557         * init.c (nptl_freeres): New function.
2558         (pthread_functions): Initialize ptr_freeres to nptl_freeres.
2559         * pthreadP.h: Don't declare __free_stack_cache.  Declare __free_stacks.
2560         * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
2561         variable.
2562         (pthread_cancel_init): Depend in libgcc_s_handle for decision to
2563         load DSO.  Assign last.
2564         (__unwind_freeres): New function.
2566         * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
2567         for better debugging.  No need to use stack_list_add here.
2569 2009-01-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2571         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
2572         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
2573         instead of computing relative timeout.
2574         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
2575         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
2577 2009-01-25  Ulrich Drepper  <drepper@redhat.com>
2579         * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
2581 2009-01-08  Ulrich Drepper  <drepper@redhat.com>
2583         * sysdeps/pthread/list.h (list_add): Initialize new element first.
2584         (list_add_tail): Removed.
2586 2009-01-07  Ulrich Drepper  <drepper@redhat.com>
2588         * (in_flight_stack): New variable.
2589         (stack_list_del): New function.  Use instead of list_del.
2590         (stack_list_add): New function.  Use instead of list_add when adding to
2591         stack_cache and stack_used lists.
2592         (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
2593         when the fork call interrupted another thread.
2595 2009-01-04  Ulrich Drepper  <drepper@redhat.com>
2597         * init.c (__pthread_initialize_minimal_internal): Optimize test
2598         FUTEX_CLOCK_REALTIME a bit.
2600 2009-01-03  Ulrich Drepper  <drepper@redhat.com>
2602         * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
2603         only passing five parameters to FUTEX_WAIT_BITSET call.
2605         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2606         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
2607         instead of computing relative timeout.
2609 2009-01-02  Ulrich Drepper  <drepper@redhat.com>
2611         * init.c (__pthread_initialize_minimal_internal): Check for
2612         FUTEX_CLOCK_REALTIME flag.
2613         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
2614         Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
2615         relative timeout.
2617         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
2618         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
2619         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2620         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2621         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2622         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2624 2008-12-09  Ulrich Drepper  <drepper@redhat.com>
2626         * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
2627         loop body instead of ; to avoid gcc warnings.
2628         (pthread_cleanup_pop_restore_np): Likewise.
2629         Patch by Caolán McNamara <caolanm@redhat.com>.
2631 2008-12-09  Jakub Jelinek  <jakub@redhat.com>
2633         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
2634         fast path here, for robust/PI/PP mutexes call
2635         __pthread_mutex_lock_full.  Don't use switch, instead use a series
2636         of ifs according to their probability.
2637         (__pthread_mutex_lock_full): New function.
2638         * pthread_mutex_unlock.c: Include assert.h.
2639         (__pthread_mutex_unlock_usercnt): Handle only the
2640         fast path here, for robust/PI/PP mutexes call
2641         __pthread_mutex_unlock_full.  Don't use switch, instead use a series
2642         of ifs according to their probability.
2643         (__pthread_mutex_unlock_full): New function.
2644         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
2645         (__pthread_mutex_lock_full): Define.
2647 2008-12-08  Ulrich Drepper  <drepper@redhat.com>
2649         * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
2650         implementation.  Add necessary padding and.
2651         * descr.h (struct pthread): Increase padding for tcbhead_t to 24
2652         words.
2654 2008-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2656         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
2657         and FUTEX_WAKE_BITSET.
2659 2008-12-02  Ulrich Drepper  <drepper@redhat.com>
2661         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
2662         and FUTEX_WAKE_BITSET.
2663         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2664         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2665         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2666         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2668 2008-11-25  Roland McGrath  <roland@redhat.com>
2670         * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
2671         Subdirectories moved to ports repository as
2672         sysdeps/.../nptl subdirectories.
2674 2008-11-12  Jakub Jelinek  <jakub@redhat.com>
2676         [BZ #7008]
2677         * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
2678         of old value.
2679         * pthread_cond_init.c (__pthread_cond_init): Fix
2680         cond->__data.__nwaiters initialization.
2681         * Makefile (tests): Add tst-cond23.
2682         * tst-cond23.c: New test.
2684 2008-11-07  Jakub Jelinek  <jakub@redhat.com>
2686         * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
2687         arguments.
2688         (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
2689         arguments.
2691 2008-11-01  Ulrich Drepper  <drepper@redhat.com>
2693         [BZ #6955]
2694         * pthread_mutex_lock.c: Add support for private PI mutexes.
2695         * pthread_mutex_timedlock.c: Likewise.
2696         * pthread_mutex_trylock.c: Likewise.
2697         * pthread_mutex_unlock.c: Likewise.
2698         Patch mostly by Ben Jackson <ben@ben.com>.
2700 2008-10-31  Ulrich Drepper  <drepper@redhat.com>
2702         [BZ #6843]
2703         * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
2704         Increase stack size for helper thread.
2706 2008-10-06  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2708         * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
2709         assembly with a clobber list for access registers a0 and a1.
2711 2008-09-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2713         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
2714         to force runp->refcntr to be read from memory.
2716 2008-09-08  Richard Guenther  <rguenther@suse.de>
2718         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
2719         lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2720         lll_timedlock, lll_robust_timedlock, lll_unlock,
2721         lll_robust_unlock): Promote private to int.
2723 2008-08-15  Ulrich Drepper  <drepper@redhat.com>
2725         * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
2726         ARCH_RETRY_MMAP definitions.
2727         * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
2728         Define MAP_STACK when not defined.
2729         (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS.  Remove
2730         handling of ARCH_RETRY_MMAP.
2732 2008-07-30  Ulrich Drepper  <drepper@redhat.com>
2734         * tst-align2.c (f): Print message that f is reached.
2736 2008-04-28  Hiroki Kaminaga  <kaminaga@sm.sony.co.jp>
2738         [BZ #6740]
2739         * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
2740         definition with #ifndef __ASSUME_PRIVATE_FUTEX.
2742 2008-07-25  Ulrich Drepper  <drepper@redhat.com>
2744         * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
2745         SOCK_CLOEXEC if possible.
2747 2008-05-29  Ulrich Drepper  <drepper@redhat.com>
2749         * Makefile (tests): Add tst-rwlock2a.
2750         * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
2751         * tst-rwlock2a.c: New file.
2753 2008-06-12  Ulrich Drepper  <drepper@redhat.com>
2755         * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
2757 2008-05-17  Samuel Thibault  <samuel.thibault@ens-lyon.org>
2759         * sysdeps/pthread/pthread.h: Fix typo in comment.
2761 2008-05-28  Ulrich Drepper  <drepper@redhat.com>
2763         * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
2764         of CPU set to the kernel.
2766 2008-05-23  Paul Pluzhnikov  <ppluzhnikov@google.com>
2768         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
2769         cfi directives.
2770         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
2771         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
2772         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2773         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2774         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2775         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2777 2008-05-22  Paul Pluzhnikov  <ppluzhnikov@google.com>
2779         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
2780         cfi directives.
2781         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2782         Likewise.
2783         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2784         Likewise.
2785         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2786         Likewise.
2788 2008-05-26  Ulrich Drepper  <drepper@redhat.com>
2790         * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
2792 2008-05-20  Jakub Jelinek  <jakub@redhat.com>
2794         David S. Miller  <davem@davemloft.net>
2796         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
2798 2008-05-10  Ulrich Drepper  <drepper@redhat.com>
2800         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
2801         __pshared correctly.
2802         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2803         Likewise.
2804         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2805         Likewise.
2806         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
2807         Likewise.
2808         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
2809         Likewise.
2810         Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
2812 2008-04-14  David S. Miller  <davem@davemloft.net>
2814         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2815         (__old_sem_wait): Fix argument to lll_futex_wait().
2817 2007-11-26  Daniel Jacobowitz  <dan@codesourcery.com>
2819         * pthread_create.c: Require pthread_mutex_trylock and
2820         pthread_key_delete for libgcc.
2822 2008-04-08  Jakub Jelinek  <jakub@redhat.com>
2824         [BZ #6020]
2825         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
2826         (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
2827         Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
2829 2008-03-27  Ulrich Drepper  <drepper@redhat.com>
2831         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
2832         <linux/limits.h> has defined it.
2833         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2834         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2835         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2836         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2838 2008-03-18  Jakub Jelinek  <jakub@redhat.com>
2840         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
2841         of ASSEMBLER.
2842         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2843         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
2845 2008-03-14  Ulrich Drepper  <drepper@redhat.com>
2847         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
2848         HAVE_DL_DISCOVER_OSVERSION.
2849         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2850         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
2852 2008-03-07  Ulrich Drepper  <drepper@redhat.com>
2854         [BZ #5778]
2855         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
2856         _POSIX_CHOWN_RESTRICTED value to zero.
2858 2008-01-31  Roland McGrath  <roland@redhat.com>
2860         * Makefile (omit-deps): Variable removed.
2862 2008-01-30  Ulrich Drepper  <drepper@redhat.com>
2864         * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
2865         unnecessary addr32 prefix.
2867 2008-01-29  Roland McGrath  <roland@redhat.com>
2869         * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
2871 2008-01-22  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2873         * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
2875 2008-01-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2877         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
2878         a scratch register.
2879         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
2880         (__lll_lock_wait_private): Fix typo.
2881         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
2882         (pthread_barrier_wait): Likewise.  Adjust XADD use.
2883         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
2884         Adjust XADD use.
2885         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
2886         (pthread_rwlock_timedrdlock): Return correct return value.
2887         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
2888         (pthread_rwlock_timedwrlock): Likewise.
2890 2008-01-15  Ulrich Drepper  <drepper@redhat.com>
2892         * tst-eintr2.c (do_test): make sure that if mutex_lock in main
2893         thread returns the program exits with an error code.
2895 2008-01-10  Ulrich Drepper  <drepper@redhat.com>
2897         * pthread-errnos.sym: Add EOVERFLOW.
2898         * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
2899         * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
2900         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2901         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2903 2007-12-14  Ulrich Drepper  <drepper@redhat.com>
2905         * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
2906         parameter.  Passed it as permission to mmap.
2907         * allocatestack.c (allocate_stack): Pass prot as second parameter
2908         to ARCH_RETRY_MMAP.
2910 2007-12-12  Ulrich Drepper  <drepper@redhat.com>
2912         * tst-basic7.c: Allocate memory for the stack.
2914         [BZ #5465]
2915         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
2916         (__pthread_cond_timedwait): Don't use VDSO.
2917         Patch by Michal Januszewski.
2919 2007-12-07  Ulrich Drepper  <drepper@redhat.com>
2921         [BZ #5455]
2922         * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
2923         Allow label before pthread_cleanup_pop.
2924         (pthread_cleanup_pop_restore_np): Likewise.
2926 2007-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2928         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
2929         Store 2 before returning ETIMEDOUT.
2931 2007-11-23  Ulrich Drepper  <drepper@redhat.com>
2933         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
2934         Store 2 before returning ETIMEDOUT.
2935         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
2936         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
2937         (__lll_lock_wait_private): Optimize.
2938         (__lll_lock_wait): Likewise.
2940 2007-11-20  Jakub Jelinek  <jakub@redhat.com>
2942         * sysdeps/pthread/pthread.h (pthread_cleanup_push,
2943         pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
2944         g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
2946 2007-11-08  Ulrich Drepper  <drepper@redhat.com>
2948         [BZ #5240]
2949         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
2950         If we time out, try one last time to lock the futex to avoid
2951         losing a wakeup signal.
2952         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2953         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2955         [BZ #5245]
2956         * sysdeps/pthread/createthread.c (do_clone): Translate clone error
2957         if necessary.
2959 2007-11-07  Ulrich Drepper  <drepper@redhat.com>
2961         [BZ #5245]
2962         * allocatestack.c (allocate_stack): Change ENOMEM error in case
2963         mmap failed to EAGAIN.
2964         * Makefile (tests): Add tst-basic7.
2965         * tst-basic7.c: New file.
2967 2007-11-05  Ulrich Drepper  <drepper@redhat.com>
2969         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
2970         Use __linkin_atfork.
2972 2007-11-03  Mike Frysinger  <vapier@gentoo.org>
2974         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
2975         missing line continuations.
2976         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
2977         LOAD_FUTEX_WAKE): Likewise.  Also add missing 3rd parameter.
2979 2007-10-28  Ulrich Drepper  <drepper@redhat.com>
2981         [BZ #5220]
2982         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
2983         __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
2984         (struct timer): Add next element.
2985         * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
2986         enqueue timer structure into __active_timer_sigev_thread list.
2987         * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
2988         remove timer struct from __active_timer_sigev_thread.
2989         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2990         Before using timer structure make sure it is still on the
2991         __active_timer_sigev_thread list.  Keep lock until done.
2992         Define __active_timer_sigev_thread and
2993         __active_timer_sigev_thread_lock.
2995 2007-10-27  Ulrich Drepper  <drepper@redhat.com>
2997         * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
2998         Redefine thread_atfork for use of ATFORK_MEM.
2999         * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
3000         * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
3001         function.
3002         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
3003         Use atomic operation when removing first element of list.
3005 2007-10-17  Jakub Jelinek  <jakub@redhat.com>
3007         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
3008         routine instead of an alias to __new_sem_post.
3010 2007-10-15  Jakub Jelinek  <jakub@redhat.com>
3012         * init.c (__pthread_initialize_minimal): Initialize word to appease
3013         valgrind.
3015 2007-10-10  Jakub Jelinek  <jakub@redhat.com>
3017         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
3018         libc.so just clear NAME.
3019         (__libc_rwlock_fini): Nop inside of libc.so.
3020         * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
3021         all zeros.
3023 2007-09-02  Ulrich Drepper  <drepper@redhat.com>
3025         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
3026         (__pthread_cond_wait): Fix unlocking of internal lock after mutex
3027         unlocking failed.
3028         Patch by Luca Barbieri <luca.barbieri@gmail.com>.
3030 2007-08-21  Ulrich Drepper  <drepper@redhat.com>
3032         [BZ #4938]
3033         * allocatestack.c (__reclaim_stacks): Clear the TSD in the
3034         reclaimed stack if necessary.
3035         * Makefile (tests): Add tst-tsd6.
3036         * tst-tsd6.c: New file.
3038 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
3040         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
3041         Add private argument.
3043 2007-08-20  Ulrich Drepper  <drepper@redhat.com>
3045         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
3046         (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
3048 2007-08-16  Jakub Jelinek  <jakub@redhat.com>
3050         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
3051         (__lll_robust_timedlock): Pass private as last argument to
3052         __lll_robust_timedlock_wait.
3053         (__lll_unlock): Fix a pasto.
3055 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
3057         * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
3058         sparc_old_sem): New structs.
3059         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
3060         (__sem_wait_cleanup): New function.
3061         (__new_sem_wait): Use sparc_new_sem structure.  Bump and afterwards
3062         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
3063         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
3064         lll_futex_wait.
3065         (__old_sem_wait): New function.
3066         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
3067         nptl/sysdeps/unix/sysv/linux/sparc version.
3068         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
3069         Likewise.
3070         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
3071         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
3072         (__new_sem_trywait): Use sparc_old_sem structure.
3073         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
3074         (sem_timedwait): Use sparc_new_sem structure.  Bump and afterwards
3075         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
3076         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
3077         lll_futex_timed_wait.
3078         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
3079         Use sparc_new_sem structure.  Only wake if nwaiters > 0.  Pass
3080         isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
3081         lll_futex_wake.
3082         (__old_sem_post): New function.
3083         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
3084         * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
3085         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
3086         * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
3087         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
3088         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
3090 2007-08-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3092         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
3093         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
3094         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
3095         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
3096         * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
3097         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
3098         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
3099         Use FUTEX_WAKE_OP.
3100         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
3101         kernel-features.h and tcb-offsets.h.
3102         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
3103         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
3104         process private.
3105         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
3106         tcb-offsets.h.
3107         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
3108         to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
3109         process private.
3110         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
3111         __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
3112         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
3113         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3114         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3115         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
3116         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3118 2007-08-14  Jakub Jelinek  <jakub@redhat.com>
3120         * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
3121         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
3122         (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
3123         lll_futex_timed_wait.
3125         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
3126         __lll_robust_unlock): Rewrite as macros instead of inline functions.
3127         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
3128         __lll_robust_unlock, __lll_wait_tid): Likewise.
3130 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
3132         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
3133         Fix a pasto.
3134         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
3135         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
3136         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
3137         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
3138         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3139         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
3140         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
3141         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
3142         kernel-features.h.
3143         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
3144         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
3145         process private.  Switch DW_CFA_advance_loc1 and some
3146         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
3147         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3148         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
3149         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
3150         process private.  Switch DW_CFA_advance_loc{1,2} and some
3151         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
3152         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
3153         #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
3154         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3155         Likewise.
3156         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3157         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3158         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3159         Likewise.
3160         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
3161         (__pthread_cond_broadcast): Compare %r8 instead of
3162         dep_mutex-cond_*(%rdi) with $-1.
3163         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3164         (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
3165         of oring.
3167 2007-08-13  Ulrich Drepper  <drepper@redhat.com>
3169         * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
3171 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
3173         * allocatestack.c: Include kernel-features.h.
3174         * pthread_create.c: Likewise.
3175         * pthread_mutex_init.c: Likewise.
3176         * init.c: Likewise.
3177         * pthread_cond_timedwait.c: Likewise.
3178         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3179         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3180         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3181         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3182         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3183         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3184         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3185         Likewise.
3186         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3187         Likewise.
3188         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3189         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3190         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3191         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3193 2007-08-12  Jakub Jelinek  <jakub@redhat.com>
3195         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
3196         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
3197         byte elements.  One of them is the new __shared element.
3198         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
3199         adjust names of other padding elements.
3200         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
3201         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
3202         byte elements.  One of them is the new __shared element.
3203         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
3204         adjust names of other padding elements.
3205         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
3206         Renamed __pad1 element to __shared, adjust names of other padding
3207         elements.
3208         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3209         (pthread_rwlock_t): Likewise.
3210         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
3211         typo.
3213 2007-08-09  Anton Blanchard  <anton@samba.org>
3215         * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
3217 2007-08-12  Ulrich Drepper  <drepper@redhat.com>
3219         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
3220         <kernel-features.h>.
3221         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3223 2007-08-11  Ulrich Drepper  <drepper@redhat.com>
3225         * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
3226         * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
3227         dealing with robust mutexes.
3228         * pthread_mutex_timedlock.c: Likewise.
3229         * pthread_mutex_trylock.c: Likewise.
3230         * pthread_mutex_unlock.c: Likewise.
3231         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
3233 2007-08-06  Jakub Jelinek  <jakub@redhat.com>
3235         * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
3236         (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
3237         (PTHREAD_MUTEX_PSHARED): Define.
3238         * pthread_mutex_init.c (__pthread_mutex_init): Set
3239         PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
3240         mutexes.
3241         * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
3242         instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
3243         as second argument to lll_lock.
3244         (LLL_MUTEX_TRYLOCK): Take mutex as argument
3245         instead of its __data.__lock field.
3246         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
3247         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
3248         to lll_robust_lock.
3249         (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
3250         LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
3251         instead of mutex->__data.__kind directly, pass
3252         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
3253         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
3254         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
3255         directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
3256         (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
3257         to lll_timedlock, lll_robust_timedlock, lll_unlock and
3258         lll_futex_timed_wait.  Use PTHREAD_MUTEX_TYPE (mutex) instead
3259         of mutex->__data.__kind directly.
3260         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
3261         PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
3262         lll_robust_timedlock, lll_unlock and lll_futex_timed_wait.  Use
3263         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
3264         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
3265         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
3266         and lll_futex_wake.
3267         * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
3268         PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
3269         Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
3270         directly.
3271         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
3272         Take mutex as argument instead of its __data.__lock field, pass
3273         PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
3274         (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
3275         __data.__lock field.
3276         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
3277         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
3278         to lll_robust_cond_lock.
3279         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
3280         variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
3281         lll_futex_wake.  Don't use lll_futex_requeue if dependent mutex
3282         has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
3283         * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
3284         variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
3285         lll_futex_wait.
3286         * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
3287         variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
3288         lll_futex_wake.
3289         * pthread_cond_timedwait.c (__pthread_cond_wait): Add
3290         pshared variable, pass it to lll_lock, lll_unlock,
3291         lll_futex_timedwait and lll_futex_wake.
3292         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
3293         pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
3294         and lll_futex_wake.
3295         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
3296         lll_futex_wake_unlock): Add private argument, use __lll_private_flag
3297         macro.
3298         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
3299         lll_futex_wake_unlock): Likewise.
3300         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
3301         Likewise.
3302         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
3303         lll_futex_wake_unlock): Likewise.
3304         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
3305         Likewise.
3306         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
3307         lll_futex_wake_unlock): Likewise.
3308         (lll_futex_wake): Fix a typo.
3309         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
3310         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
3311         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
3312         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
3313         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
3314         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3315         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
3316         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
3317         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
3318         (__pthread_cond_timedwait): Likewise.
3319         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
3320         (__condvar_cleanup, __pthread_cond_wait): Likewise.
3322 2007-08-05  Jakub Jelinek  <jakub@redhat.com>
3324         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3325         Don't use CGOTSETUP and CGOTRESTORE macros.
3326         (CGOTSETUP, CGOTRESTORE): Remove.
3327         <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
3328         @local symbol.
3330 2007-08-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3332         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
3333         definitions for private futexes.
3334         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
3335         kernel-features.h and lowlevellock.h.  Use private futexes if
3336         they are available.
3337         (__lll_lock_wait_private, __lll_unlock_wake_private): New.
3338         (__lll_mutex_lock_wait): Rename to
3339         (__lll_lock_wait): ... this.  Don't compile in for libc.so.
3340         (__lll_mutex_timedlock_wait): Rename to ...
3341         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.
3342         Don't compile in for libc.so.
3343         (__lll_mutex_unlock_wake): Rename to ...
3344         (__lll_unlock_wake): ... this.  Don't compile in for libc.so.
3345         (__lll_timedwait_tid): Use __NR_gettimeofday.
3346         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
3347         the header from assembler.  Renamed all lll_mutex_* resp.
3348         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
3349         Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
3350         (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
3351         Define.
3352         (__lll_lock_wait_private): Add prototype.
3353         (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
3354         __lll_robust_timedlock_wait, __lll_unlock_wake_private,
3355         __lll_unlock_wake): Likewise.
3356         (lll_lock): Add private argument.  Call __lll_lock_wait_private
3357         if private is constant LLL_PRIVATE.
3358         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
3359         lll_timedlock, lll_robust_timedlock): Add private argument.
3360         (lll_unlock): Add private argument.  Call __lll_unlock_wake_private
3361         if private is constant LLL_PRIVATE.
3362         (lll_robust_unlock, lll_robust_dead): Add private argument.
3363         (lll_lock_t): Remove.
3364         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
3365         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
3366         lll_cond_wake, lll_cond_broadcast): Remove.
3367         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
3368         kernel-features.h and lowlevellock.h.
3369         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
3370         (LOAD_FUTEX_WAIT): Define.
3371         (__lll_robust_mutex_lock_wait): Rename to ...
3372         (__lll_robust_lock_wait): ... this.  Add private argument.
3373         Use LOAD_FUTEX_WAIT macro.
3374         (__lll_robust_mutex_timedlock_wait): Rename to ...
3375         (__lll_robust_timedlock_wait): ... this.    Add private argument.
3376         Use __NR_gettimeofday.  Use LOAD_FUTEX_WAIT macro.
3377         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
3378         lowlevellock.h.
3379         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
3380         (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
3381         __lll_mutex_{lock,unlock}_*.
3382         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
3383         lowlevellock.h and pthread-errnos.h.
3384         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3385         FUTEX_CMP_REQUEUE, EINVAL): Remove.
3386         (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
3387         __lll_mutex_{lock,unlock}_*.
3388         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
3389         lowlevellock.h and pthread-errnos.h.
3390         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
3391         (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
3392         __lll_mutex_{lock,unlock}_*.
3393         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
3394         lowlevellock.h.
3395         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
3396         (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
3397         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
3398         (__condvar_tw_cleanup): Likewise.
3399         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
3400         lowlevellock.h.
3401         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
3402         (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
3403         __lll_mutex_{lock,unlock}_*.
3404         ( __condvar_w_cleanup): Likewise.
3405         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
3406         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3407         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
3408         lowlevellock.h.
3409         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3410         (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
3411         __lll_mutex_{lock,unlock}_*.
3412         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
3413         lowlevellock.h.
3414         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
3415         FUTEX_PRIVATE_FLAG): Remove.
3416         (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
3417         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
3418         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
3419         lowlevellock.h.
3420         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
3421         FUTEX_PRIVATE_FLAG): Remove.
3422         (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
3423         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
3424         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
3425         lowlevellock.h.
3426         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3427         (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
3428         __lll_mutex_{lock,unlock}_*.
3429         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
3430         lowlevellock.h.
3431         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3432         (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
3433         __lll_mutex_{lock,unlock}_*.
3434         * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
3435         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3436         (__new_sem_post): Use standard initial exec code sequences.
3437         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
3438         lowlevellock.h.
3439         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
3440         FUTEX_PRIVATE_FLAG): Remove.
3441         (sem_timedwait): Use __NR_gettimeofday.  Use standard initial
3442         exec code sequences.
3443         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
3444         (__new_sem_trywait): Use standard initial exec code sequences.
3445         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
3446         (__new_sem_wait): Use standard initial exec code sequences.
3448 2007-07-31  Anton Blanchard  <anton@samba.org>
3450         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3451         Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
3452         atomic_full_barrier.
3454 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
3456         * allocatestack.c (stack_cache_lock): Change type to int.
3457         (get_cached_stack, allocate_stack, __deallocate_stack,
3458         __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
3459         __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
3460         as second argument to lll_lock and lll_unlock macros on
3461         stack_cache_lock.
3462         * pthread_create.c (__find_in_stack_list): Likewise.
3463         (start_thread): Similarly with pd->lock.  Use lll_robust_dead
3464         macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
3465         as second argument.
3466         * descr.h (struct pthread): Change lock and setxid_futex field
3467         type to int.
3468         * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
3469         LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
3470         * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
3471         * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
3472         Likewise.
3473         * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
3474         * pthread_cond_init.c (__pthread_cond_init): Likewise.
3475         * pthreadP.h (__attr_list_lock): Change type to int.
3476         * pthread_attr_init.c (__attr_list_lock): Likewise.
3477         * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
3478         ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
3479         lll_{,un}lock.
3480         * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
3481         also for lll_futex_{wake,wait}.
3482         * pthread_barrier_init.c (pthread_barrier_init): Make iattr
3483         a pointer to const.
3484         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
3485         LLL_SHARED as second argument to lll_{,un}lock.
3486         * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
3487         * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
3488         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
3489         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
3490         Likewise.
3491         * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
3492         as second argument to lll_{,un}lock macros on pd->lock.
3493         * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
3494         * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
3495         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
3496         * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
3497         Likewise.
3498         * sysdeps/pthread/createthread.c (do_clone, create_thread):
3499         Likewise.
3500         * pthread_once.c (once_lock): Change type to int.
3501         (__pthread_once): Pass LLL_PRIVATE as second argument to
3502         lll_{,un}lock macros on once_lock.
3503         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
3504         lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
3505         rwlock->__data.__shared as second argument to them and similarly
3506         for lll_futex_w*.
3507         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
3508         Likewise.
3509         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
3510         Likewise.
3511         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
3512         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
3513         * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
3514         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
3515         * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
3516         to lll_{,un}lock macros on __sem_mappings_lock.
3517         * sem_open.c (check_add_mapping): Likewise.
3518         (__sem_mappings_lock): Change type to int.
3519         * semaphoreP.h (__sem_mappings_lock): Likewise.
3520         * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
3521         LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
3522         instead of lll_*mutex_*, pass LLL_SHARED as last
3523         argument.
3524         (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
3525         pass LLL_SHARED as last argument.
3526         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
3527         LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
3528         lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
3529         pass LLL_SHARED as last argument.
3530         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
3531         lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
3532         LLL_SHARED as last argument.
3533         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
3534         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
3535         Similarly.
3536         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
3537         __libc_lock_lock_recursive, __libc_lock_unlock,
3538         __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
3539         argument to lll_{,un}lock.
3540         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
3541         _IO_lock_unlock): Likewise.
3542         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
3543         compound literal.
3544         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
3545         Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
3546         __fork_lock.
3547         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
3548         free_mem): Likewise.
3549         (__fork_lock): Change type to int.
3550         * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
3551         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
3552         isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
3553         lll_futex_wake.
3554         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
3555         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
3556         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
3557         New function.
3558         (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
3559         pass it through to lll_futex_*wait, only compile in when
3560         IS_IN_libpthread.
3561         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3562         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
3563         argument and pass it through to lll_futex_*wait.
3564         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
3565         lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
3566         lll_robust_*.  Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
3567         inline functions to __lll_* resp. __lll_robust_*.
3568         (LLL_MUTEX_LOCK_INITIALIZER): Remove.
3569         (lll_mutex_dead): Add private argument.
3570         (__lll_lock_wait_private): New prototype.
3571         (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
3572         __lll_robust_lock_timedwait): Add private argument to prototypes.
3573         (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
3574         call __lll_lock_wait_private, otherwise pass private to
3575         __lll_lock_wait.
3576         (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
3577         __lll_robust_timedlock): Add private argument, pass it to
3578         __lll_*wait functions.
3579         (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
3580         call __lll_unlock_wake_private, otherwise pass private to
3581         __lll_unlock_wake.
3582         (__lll_robust_unlock): Add private argument, pass it to
3583         __lll_robust_unlock_wake.
3584         (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
3585         lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
3586         argument, pass it through to __lll_* inline function.
3587         (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
3588         (lll_lock_t): Remove.
3589         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
3590         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
3591         lll_cond_wake, lll_cond_broadcast): Remove.
3592         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3593         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3594         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3595         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3596         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
3597         the header from assembler.  Renamed all lll_mutex_* resp.
3598         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
3599         (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
3600         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3601         (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
3602         LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
3603         (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
3604         __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
3605         Remove prototype.
3606         (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
3607         (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
3608         rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
3609         (lll_trylock): Likewise, use __lll_trylock_asm, pass
3610         MULTIPLE_THREADS_OFFSET as another asm operand.
3611         (lll_lock): Add private argument, use __lll_lock_asm_start, pass
3612         MULTIPLE_THREADS_OFFSET as last asm operand, call
3613         __lll_lock_wait_private if private is constant LLL_PRIVATE,
3614         otherwise pass private as another argument to __lll_lock_wait.
3615         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
3616         lll_timedlock, lll_robust_timedlock): Add private argument, pass
3617         private as another argument to __lll_*lock_wait call.
3618         (lll_unlock): Add private argument, use __lll_unlock_asm, pass
3619         MULTIPLE_THREADS_OFFSET as another asm operand, call
3620         __lll_unlock_wake_private if private is constant LLL_PRIVATE,
3621         otherwise pass private as another argument to __lll_unlock_wake.
3622         (lll_robust_unlock): Add private argument, pass private as another
3623         argument to __lll_unlock_wake.
3624         (lll_robust_dead): Add private argument, use __lll_private_flag
3625         macro.
3626         (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
3627         LLL_MUTEX_LOCK_INITIALIZER.
3628         (lll_lock_t): Remove.
3629         (LLL_LOCK_INITIALIZER_WAITERS): Define.
3630         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
3631         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
3632         lll_cond_wake, lll_cond_broadcast): Remove.
3633         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3634         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
3635         2007-05-2{3,9} changes.
3636         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
3637         kernel-features.h and lowlevellock.h.
3638         (LOAD_PRIVATE_FUTEX_WAIT): Define.
3639         (LOAD_FUTEX_WAIT): Rewritten.
3640         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
3641         define.
3642         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
3643         (__lll_mutex_lock_wait): Rename to ...
3644         (__lll_lock_wait): ... this.  Take futex addr from %edx instead of
3645         %ecx, %ecx is now private argument.  Don't compile in for libc.so.
3646         (__lll_mutex_timedlock_wait): Rename to ...
3647         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.  %esi
3648         contains private argument.  Don't compile in for libc.so.
3649         (__lll_mutex_unlock_wake): Rename to ...
3650         (__lll_unlock_wake): ... this.  %ecx contains private argument.
3651         Don't compile in for libc.so.
3652         (__lll_timedwait_tid): Use __NR_gettimeofday.
3653         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
3654         kernel-features.h and lowlevellock.h.
3655         (LOAD_FUTEX_WAIT): Define.
3656         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
3657         define.
3658         (__lll_robust_mutex_lock_wait): Rename to ...
3659         (__lll_robust_lock_wait): ... this.  Futex addr is now in %edx
3660         argument, %ecx argument contains private.  Use LOAD_FUTEX_WAIT
3661         macro.
3662         (__lll_robust_mutex_timedlock_wait): Rename to ...
3663         (__lll_robust_timedlock_wait): ... this.  Use __NR_gettimeofday.
3664         %esi argument contains private, use LOAD_FUTEX_WAIT macro.
3665         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
3666         lowlevellock.h.
3667         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3668         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
3669         PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
3670         __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
3671         to __lll_lock_wait in %edx.
3672         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
3673         Include lowlevellock.h and pthread-errnos.h.
3674         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3675         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
3676         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
3677         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3678         pass LLL_SHARED in %ecx to both __lll_lock_wait and
3679         __lll_unlock_wake.
3680         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
3681         Include lowlevellock.h and pthread-errnos.h.
3682         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
3683         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
3684         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
3685         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3686         pass LLL_SHARED in %ecx to both __lll_lock_wait and
3687         __lll_unlock_wake.
3688         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
3689         Include lowlevellock.h.
3690         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3691         Don't define.
3692         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
3693         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3694         pass LLL_SHARED in %ecx to both __lll_lock_wait and
3695         __lll_unlock_wake.  Use __NR_gettimeofday.
3696         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
3697         Include lowlevellock.h.
3698         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3699         (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
3700         to __lll_*, pass cond_lock address in %edx rather than %ecx to
3701         __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
3702         and __lll_unlock_wake.
3703         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
3704         Include lowlevellock.h.
3705         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3706         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
3707         MUTEX(%ebx) address in %edx rather than %ecx to
3708         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
3709         and __lll_unlock_wake.  Move return value from %ecx to %edx
3710         register.
3711         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3712         Include lowlevellock.h.
3713         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3714         Don't define.
3715         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3716         MUTEX(%ebp) address in %edx rather than %ecx to
3717         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
3718         and __lll_unlock_wake.  Move return value from %ecx to %edx
3719         register.  Use __NR_gettimeofday.
3720         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3721         Include lowlevellock.h.
3722         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3723         Don't define.
3724         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3725         MUTEX(%ebp) address in %edx rather than %ecx to
3726         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
3727         and __lll_unlock_wake.  Move return value from %ecx to %edx
3728         register.  Use __NR_gettimeofday.
3729         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
3730         Include lowlevellock.h.
3731         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3732         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
3733         MUTEX(%edi) address in %edx rather than %ecx to
3734         __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
3735         and __lll_unlock_wake.
3736         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
3737         Include lowlevellock.h.
3738         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3739         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3740         MUTEX(%ebx) address in %edx rather than %ecx to
3741         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
3742         and __lll_unlock_wake.  Move return value from %ecx to %edx
3743         register.
3744         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
3745         lowlevellock.h.
3746         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
3747         define.
3748         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
3749         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
3750         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
3751         lowlevellock.h.
3752         (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
3753         (sem_timedwait): Use __NR_gettimeofday.
3754         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
3755         lowlevellock.h.
3756         (LOCK): Don't define.
3757         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
3758         lowlevellock.h.
3759         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3760         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
3761         are waiters.
3762         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
3763         2007-05-2{3,9} changes.
3764         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
3765         kernel-features.h and lowlevellock.h.
3766         (LOAD_PRIVATE_FUTEX_WAIT): Define.
3767         (LOAD_FUTEX_WAIT): Rewritten.
3768         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
3769         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
3770         (__lll_mutex_lock_wait): Rename to ...
3771         (__lll_lock_wait): ... this.  %esi is now private argument.
3772         Don't compile in for libc.so.
3773         (__lll_mutex_timedlock_wait): Rename to ...
3774         (__lll_timedlock_wait): ... this.  %esi contains private argument.
3775         Don't compile in for libc.so.
3776         (__lll_mutex_unlock_wake): Rename to ...
3777         (__lll_unlock_wake): ... this.  %esi contains private argument.
3778         Don't compile in for libc.so.
3779         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
3780         kernel-features.h and lowlevellock.h.
3781         (LOAD_FUTEX_WAIT): Define.
3782         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
3783         (__lll_robust_mutex_lock_wait): Rename to ...
3784         (__lll_robust_lock_wait): ... this.  %esi argument contains private.
3785         Use LOAD_FUTEX_WAIT macro.
3786         (__lll_robust_mutex_timedlock_wait): Rename to ...
3787         (__lll_robust_timedlock_wait): ... this. %esi argument contains
3788         private, use LOAD_FUTEX_WAIT macro.
3789         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
3790         lowlevellock.h.
3791         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3792         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
3793         PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
3794         __lll_lock_wait and __lll_unlock_wake.
3795         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
3796         Include lowlevellock.h and pthread-errnos.h.
3797         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3798         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
3799         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
3800         pass LLL_SHARED in %esi to both __lll_lock_wait and
3801         __lll_unlock_wake.
3802         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
3803         Include lowlevellock.h and pthread-errnos.h.
3804         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
3805         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
3806         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
3807         pass LLL_SHARED in %esi to both __lll_lock_wait and
3808         __lll_unlock_wake.
3809         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
3810         Include lowlevellock.h.
3811         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3812         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
3813         pass LLL_SHARED in %esi to both __lll_lock_wait and
3814         __lll_unlock_wake.
3815         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
3816         Include lowlevellock.h.
3817         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3818         (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
3819         to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
3820         and __lll_unlock_wake.
3821         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
3822         Include lowlevellock.h.
3823         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3824         Don't define.
3825         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
3826         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3827         and __lll_unlock_wake.
3828         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3829         Include lowlevellock.h.
3830         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3831         Don't define.
3832         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3833         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3834         and __lll_unlock_wake.
3835         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3836         Include lowlevellock.h.
3837         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3838         Don't define.
3839         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3840         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3841         and __lll_unlock_wake.
3842         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
3843         Include lowlevellock.h.
3844         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3845         Don't define.
3846         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
3847         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3848         and __lll_unlock_wake.
3849         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
3850         Include lowlevellock.h.
3851         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3852         Don't define.
3853         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3854         pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
3855         and __lll_unlock_wake.
3856         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
3857         lowlevellock.h.
3858         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
3859         define.
3860         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
3861         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
3862         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
3863         lowlevellock.h.
3864         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3865         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
3866         lowlevellock.h.
3867         (LOCK): Don't define.
3868         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
3869         lowlevellock.h.
3870         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3871         * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
3872         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
3873         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
3874         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
3875         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
3876         (__lll_lock_wait_private): New function.
3877         (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
3878         it to lll_futex_*wait.  Don't compile in for libc.so.
3879         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
3880         Remove.
3881         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
3882         (struct sparc_pthread_barrier): Remove.
3883         (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
3884         struct sparc_pthread_barrier.  Pass
3885         ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
3886         and lll_futex_wait macros.
3887         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3888         Remove.
3889         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3890         Include sparc pthread_barrier_wait.c instead of generic one.
3892 2007-07-30  Jakub Jelinek  <jakub@redhat.com>
3894         * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
3896         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
3897         (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
3898         %ecx.
3899         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
3900         (pthread_rwlock_timedwrlock): Likewise.
3901         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
3902         (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
3904 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
3906         * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
3908 2007-07-26  Jakub Jelinek  <jakub@redhat.com>
3910         * tst-locale2.c (useless): Add return statement.
3912 2007-07-24  Jakub Jelinek  <jakub@redhat.com>
3914         * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
3915         lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
3916         * pthread_create.c (start_thread): Likewise.
3917         * init.c (sighandler_setxid): Likewise.
3918         * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3919         * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3920         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3921         * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3922         * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3923         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3924         * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3925         * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3926         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
3927         Likewise.
3928         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
3929         Likewise.
3930         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
3931         Likewise.
3932         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
3933         __rtld_notify): Likewise.
3934         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
3935         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
3936         __pthread_once): Likewise.
3937         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
3938         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3939         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3940         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3941         (lll_futex_wait): Add private argument, define as wrapper around
3942         lll_futex_timed_wait.
3943         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3944         use __lll_private_flag macro.
3945         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3946         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3947         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
3948         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3949         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3950         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3951         (lll_futex_wait): Add private argument, define as wrapper around
3952         lll_futex_timed_wait.
3953         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3954         use __lll_private_flag macro.
3955         (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
3956         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3957         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
3958         Define.
3959         (lll_futex_timed_wait, lll_futex_wake): Use it.
3960         (lll_private_futex_wait, lll_private_futex_timed_wait,
3961         lll_private_futex_wake): Removed.
3962         * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
3963         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3964         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3965         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3966         (lll_futex_wait): Add private argument, define as wrapper around
3967         lll_futex_timed_wait.
3968         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3969         use __lll_private_flag macro.
3970         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3971         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3972         to lll_futex_*.
3973         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3974         (lll_private_futex_wait, lll_private_futex_timed_wait,
3975         lll_private_futex_wake): Removed.
3976         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
3977         Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
3978         (lll_private_futex_wait, lll_private_futex_timed_wait,
3979         lll_private_futex_wake): Removed.
3980         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
3981         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3982         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3983         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3984         (lll_futex_wait): Add private argument, define as wrapper around
3985         lll_futex_timed_wait.
3986         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3987         use __lll_private_flag macro.
3988         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3989         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3990         to lll_futex_*.
3991         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
3992         Define.
3993         (lll_futex_timed_wait, lll_futex_wake): Use it.
3994         (lll_private_futex_wait, lll_private_futex_timed_wait,
3995         lll_private_futex_wake): Removed.
3997 2007-07-27  Jakub Jelinek  <jakub@redhat.com>
3999         * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
4000         of the structure for sparc32.
4002 2007-07-26  Aurelien Jarno  <aurelien@aurel32.net>
4004         * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
4006 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
4008         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
4009         code used when private futexes are assumed.
4010         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
4011         Likewise.
4013 2007-07-23  Jakub Jelinek  <jakub@redhat.com>
4015         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4016         (__lll_private_flag): Define.
4017         (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
4018         (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
4019         __lll_private_flag.
4020         (lll_private_futex_wait, lll_private_futex_timedwait,
4021         lll_private_futex_wake): Define as wrapper around non-_private
4022         macros.
4023         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4024         (__lll_private_flag): Define.
4025         (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
4026         (lll_private_futex_wait, lll_private_futex_timedwait,
4027         lll_private_futex_wake): Define as wrapper around non-_private
4028         macros.
4030 2007-07-10  Steven Munroe  <sjmunroe@us.ibm.com>
4032         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
4033         parameter to lll_futex_wait call.
4034         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
4036         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
4037         Replace lll_futex_wait with lll_private_futex_wait.
4038         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
4039         Add LLL_SHARED parameter to lll_futex_wake().
4041         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
4042         LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
4043         lll_private_futex_wake.
4044         (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
4045         bit from private parm before syscall.
4046         (lll_futex_timed_wait): Likewise.
4047         (lll_futex_wake): Likewise.
4048         (lll_futex_wake_unlock): Likewise.
4049         (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
4050         (lll_robust_mutex_unlock): Likewise.
4051         (lll_mutex_unlock_force): Likewise.
4052         (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
4054 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
4056         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
4057         compilation when unconditionally using private futexes.
4058         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
4059         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
4060         Likewise.
4061         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
4062         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
4064 2007-07-17  Jakub Jelinek  <jakub@redhat.com>
4066         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
4067         Define.
4069 2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4071         * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
4072         kernel-features.h.
4074 2007-05-16  Roland McGrath  <roland@redhat.com>
4076         * init.c (__nptl_initial_report_events): New variable.
4077         (__pthread_initialize_minimal_internal): Initialize pd->report_events
4078         to that.
4080 2007-06-22  Jakub Jelinek  <jakub@redhat.com>
4082         * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
4083         cpusetsize if pthread_getaffinity_np failed with ENOSYS.
4085 2007-06-19  Ulrich Drepper  <drepper@redhat.com>
4087         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
4088         implementation.
4090 2007-06-18  Ulrich Drepper  <drepper@redhat.com>
4092         * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
4093         * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
4094         * pthread_mutex_timedlock.c: Likewise.
4095         * pthread_mutex_trylock.c: Likewise.
4096         * pthread_mutex_unlock.c: Likewise.
4098 2007-06-17  Andreas Schwab  <schwab@suse.de>
4100         * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
4101         sections.
4103 2007-06-17  Ulrich Drepper  <drepper@redhat.com>
4105         * allocatestack.c (allocate_stack): Make code compile if
4106         __ASSUME_PRIVATE_FUTEX is set.
4108 2007-06-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4110         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
4111         (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
4112         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
4113         (__pthread_rwlock_wrlock): Likewise.
4114         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
4115         (pthread_rwlock_timedrdlock): Likewise.
4116         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
4117         (pthread_rwlock_timedwrlock): Likewise.
4118         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
4119         (__pthread_rwlock_unlock): Likewise.
4121 2007-06-10  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4123         * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
4124         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
4125         Split __flags into __flags, __shared, __pad1 and __pad2.
4126         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
4127         futexes if they are available.
4128         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
4129         in libc-lowlevellock.S allow using private futexes.
4130         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
4131         FUTEX_PRIVATE_FLAG.  Add additional parameter to lll_futex_wait,
4132         lll_futex_timed_wait and lll_futex_wake.  Change lll_futex_wait
4133         to call lll_futex_timed_wait.  Add lll_private_futex_wait,
4134         lll_private_futex_timed_wait and lll_private_futex_wake.
4135         (lll_robust_mutex_unlock): Fix typo.
4136         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
4137         field in futex command setup.
4138         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
4139         COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
4140         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
4141         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
4142         if they are available.  Remove clear_once_control.
4143         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
4144         futexes if they are available.
4145         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
4146         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
4147         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
4148         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
4149         * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
4150         Wake only when there are waiters.
4151         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
4152         support.  Indicate that there are waiters.  Remove unnecessary
4153         extra cancellation test.
4154         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.  Removed
4155         left-over duplication of __sem_wait_cleanup.
4157 2007-06-07  Ulrich Drepper  <drepper@redhat.com>
4159         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
4160         parameter to lll_futex_wait, lll_futex_timed_wait, and
4161         lll_futex_wake.  Change lll_futex_wait to call lll_futex_timed_wait.
4162         Add lll_private_futex_wait, lll_private_futex_timed_wait, and
4163         lll_private_futex_wake.
4164         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
4165         * allocatestack.c: Adjust use of lll_futex_* macros.
4166         * init.c: Likewise.
4167         * lowlevellock.h: Likewise.
4168         * pthread_barrier_wait.c: Likewise.
4169         * pthread_cond_broadcast.c: Likewise.
4170         * pthread_cond_destroy.c: Likewise.
4171         * pthread_cond_signal.c: Likewise.
4172         * pthread_cond_timedwait.c: Likewise.
4173         * pthread_cond_wait.c: Likewise.
4174         * pthread_create.c: Likewise.
4175         * pthread_mutex_lock.c: Likewise.
4176         * pthread_mutex_setprioceiling.c: Likewise.
4177         * pthread_mutex_timedlock.c: Likewise.
4178         * pthread_mutex_unlock.c: Likewise.
4179         * pthread_rwlock_timedrdlock.c: Likewise.
4180         * pthread_rwlock_timedwrlock.c: Likewise.
4181         * pthread_rwlock_unlock.c: Likewise.
4182         * sysdeps/alpha/tls.h: Likewise.
4183         * sysdeps/i386/tls.h: Likewise.
4184         * sysdeps/ia64/tls.h: Likewise.
4185         * sysdeps/powerpc/tls.h: Likewise.
4186         * sysdeps/pthread/aio_misc.h: Likewise.
4187         * sysdeps/pthread/gai_misc.h: Likewise.
4188         * sysdeps/s390/tls.h: Likewise.
4189         * sysdeps/sh/tls.h: Likewise.
4190         * sysdeps/sparc/tls.h: Likewise.
4191         * sysdeps/unix/sysv/linux/fork.c: Likewise.
4192         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
4193         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
4194         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
4195         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
4196         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
4197         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
4198         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
4199         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
4200         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
4201         Likewise.
4202         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
4203         * sysdeps/x86_64/tls.h: Likewise.
4205 2007-05-29  Ulrich Drepper  <drepper@redhat.com>
4207         * pthread_getattr_np.c: No need to install a cancellation handler,
4208         this is no cancellation point.
4209         * pthread_getschedparam.c: Likewise.
4210         * pthread_setschedparam.c: Likewise.
4211         * pthread_setschedprio.c: Likewise.
4212         * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
4213         lll_unlock_wake_cb.
4214         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
4215         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
4216         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4217         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4218         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4219         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4220         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
4221         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
4222         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
4223         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
4224         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
4225         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4227         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
4228         whether there are more than one thread makes no sense here since
4229         we only call the slow path if the locks are taken.
4230         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
4232         * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
4233         COND_NWAITERS_SHIFT.
4234         * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
4235         COND_CLOCK_BITS.
4236         * pthread_cond_init.c: Likewise.
4237         * pthread_cond_timedwait.c: Likewise.
4238         * pthread_cond_wait.c: Likewise.
4239         * pthread_condattr_getclock.c: Likewise.
4240         * pthread_condattr_setclock.c: Likewise.
4241         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
4242         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4243         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4244         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4245         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4247 2007-05-28  Jakub Jelinek  <jakub@redhat.com>
4249         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
4250         unistd.h.
4252         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
4253         insn suffix.
4254         (THREAD_GSCOPE_GET_FLAG): Remove.
4255         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
4256         * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
4257         changes.
4258         * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
4259         (THREAD_GSCOPE_GET_FLAG): Remove.
4260         (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
4261         instead of THREAD_GSCOPE_GET_FLAG.
4262         (THREAD_GSCOPE_SET_FLAG): Likewise.  Add atomic_write_barrier after
4263         it.
4264         * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4265         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4266         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4267         THREAD_GSCOPE_WAIT): Define.
4268         * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4269         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4270         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4271         THREAD_GSCOPE_WAIT): Define.
4272         * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4273         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4274         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4275         THREAD_GSCOPE_WAIT): Define.
4276         * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4277         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4278         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4279         THREAD_GSCOPE_WAIT): Define.
4281 2007-05-24  Richard Henderson  <rth@redhat.com>
4283         * descr.h (struct pthread): Add header.gscope_flag.
4284         * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4285         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4286         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4287         THREAD_GSCOPE_WAIT): Define.
4289 2007-05-27  Ulrich Drepper  <drepper@redhat.com>
4291         * init.c: Make it compile with older kernel headers.
4293         * tst-initializers1.c: Show through exit code which test failed.
4295         * pthread_rwlock_init.c: Also initialize __shared field.
4296         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
4297         element in rwlock structure into four byte elements.  One of them is
4298         the new __shared element.
4299         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
4300         Likewise.
4301         [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
4302         __shared, adjust names of other padding elements.
4303         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4304         * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
4305         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
4306         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
4307         FUTEX_PRIVATE_FLAG.
4308         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
4309         futex to use private operations if possible.
4310         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
4311         Likewise.
4312         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
4313         Likewise.
4314         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
4315         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
4316         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
4317         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
4318         Likewise.
4319         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
4320         Likewise.
4321         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
4322         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
4324 2007-05-26  Ulrich Drepper  <drepper@redhat.com>
4326         * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
4327         * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
4328         * pthread_rwlock_timedrdlock.c: Likewise.
4329         * pthread_rwlock_tryrdlock.c: Likewise.
4331         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
4332         optimization.
4334         * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
4335         * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
4336         duplication of __sem_wait_cleanup.
4338         * allocatestack.c: Revert last change.
4339         * init.c: Likewise.
4340         * sysdeps/i386/tls.h: Likewise.
4341         * sysdeps/x86_64/tls.h: Likewise.
4342         * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
4343         header structure.
4344         * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
4346         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
4347         Add private field.
4348         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
4349         * pthread_barrier_init.c: Set private flag if pshared and private
4350         futexes are supported.
4351         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
4352         private field in futex command setup.
4353         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
4355 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
4357         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
4358         support.
4359         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4360         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4361         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
4362         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4363         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4365         * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
4366         * sem_init.c (__new_sem_init): Rewrite to initialize all three
4367         fields in the structure.
4368         (__old_sem_init): New function.
4369         * sem_open.c: Initialize all fields of the structure.
4370         * sem_getvalue.c: Adjust for renamed element.
4371         * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
4372         (gen-as-const-headers): Add structsem.sym.
4373         * sysdeps/unix/sysv/linux/structsem.sym: New file.
4374         * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
4375         struct new_sem.  Add struct old_sem.
4376         * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
4377         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
4378         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
4379         * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
4380         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4381         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4382         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
4383         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4384         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4385         * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
4386         * tst-sem10.c: New file.
4387         * tst-sem11.c: New file.
4388         * tst-sem12.c: New file.
4389         * tst-typesizes.c: Test struct new_sem and struct old_sem instead
4390         of struct sem.
4392 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
4393             Jakub Jelinek  <jakub@redhat.com>
4395         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
4396         Move __pthread_enable_asynccancel right before futex syscall.
4397         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
4398         Likewise.
4400 2007-05-24  Jakub Jelinek  <jakub@redhat.com>
4402         * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
4403         THREAD_COPY_PRIVATE_FUTEX): Define.
4404         * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
4405         THREAD_COPY_PRIVATE_FUTEX): Define.
4406         * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
4407         * init.c (__pthread_initialize_minimal_internal): Use
4408         THREAD_SET_PRIVATE_FUTEX.
4410         * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
4411         (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
4412         THREAD_GSCOPE_FLAG_WAIT): Define.
4413         (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
4414         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
4415         * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
4416         PTR_DEMANGLE.
4417         (THREAD_GSCOPE_GET_FLAG): Define.
4418         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
4419         * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
4420         instead of ->header.gscope_flag directly.
4422 2007-05-23  Ulrich Drepper  <drepper@redhat.com>
4424         * init.c (__pthread_initialize_minimal_internal): Check whether
4425         private futexes are available.
4426         * allocatestack.c (allocate_stack): Copy private_futex field from
4427         current thread into the new stack.
4428         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
4429         futexes if they are available.
4430         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
4431         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
4432         in libc-lowlevellock.S allow using private futexes.
4433         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4434         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
4435         FUTEX_PRIVATE_FLAG.
4436         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
4437         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
4438         if they are available.
4439         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
4440         * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
4441         * sysdeps/i386/tcb-offsets.sym: Likewise.
4442         * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
4443         * sysdeps/i386/tls.h (tcbhead_t): Likewise.
4445 2007-05-21  Ulrich Drepper  <drepper@redhat.com>
4447         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
4448         Remove ptr_wait_lookup_done again.
4449         * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
4450         (__pthread_initialize_minimal_internal): Initialize
4451         _dl_wait_lookup_done pointer in _rtld_global directly.
4452         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
4453         Remove code to code _dl_wait_lookup_done.
4454         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
4455         encrypted for now.
4457 2007-05-21  Jakub Jelinek  <jakub@redhat.com>
4459         * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
4460         pthread_mutex_init failed with ENOTSUP.
4462 2007-05-19  Ulrich Drepper  <drepper@redhat.com>
4464         * allocatestack.c (__wait_lookup_done): New function.
4465         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
4466         Add ptr_wait_lookup_done.
4467         * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
4468         * pthreadP.h: Declare __wait_lookup_done.
4469         * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
4470         Define macros to implement reference handling of global scope.
4471         * sysdeps/x86_64/tls.h: Likewise.
4472         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
4473         Initialize GL(dl_wait_lookup_done).
4475 2007-05-17  Ulrich Drepper  <drepper@redhat.com>
4477         [BZ #4512]
4478         * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
4479         is detected.
4480         * pthread_mutex_timedlock.c: Likewise.
4481         * pthread_mutex_trylock.c: Likewise.
4482         Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
4484         * Makefile (tests): Add tst-robust9 and tst-robustpi9.
4485         * tst-robust9.c: New file.
4486         * tst-robustpi9.c: New file.
4488         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
4489         unnecessary extra cancellation test.
4491 2007-05-14  Ulrich Drepper  <drepper@redhat.com>
4493         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
4494         extra cancellation test.
4495         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4497 2007-05-10  Ulrich Drepper  <drepper@redhat.com>
4499         * descr.h (struct pthread): Rearrange members to fill hole in
4500         64-bit layout.
4502         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4503         (__pthread_setaffinity_new): If syscall was successful and
4504         RESET_VGETCPU_CACHE is defined, use it before returning.
4505         * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
4507 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
4509         [BZ #4455]
4510         * tst-align2.c: Include stackinfo.h.
4511         * tst-getpid1.c: Likewise.
4513 2007-05-02  Carlos O'Donell  <carlos@systemhalted.org>
4515         [BZ #4455]
4516         * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
4517         * tst-getpid1.c (do_test): Likewise.
4519         [BZ #4456]
4520         * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
4521         (allocate_stack): Likewise.
4523 2007-05-07  Ulrich Drepper  <drepper@redhat.com>
4525         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
4526         (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
4527         (__lll_robust_timedlock_wait): Likewise.
4528         Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
4530 2007-05-06  Mike Frysinger  <vapier@gentoo.org>
4532         [BZ #4465]
4533         * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
4534         * tst-cancel4.c (tf_fdatasync): New test.
4536 2007-04-27  Ulrich Drepper  <drepper@redhat.com>
4538         [BZ #4392]
4539         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
4540         check mutexes like normal mutexes.
4542         [BZ #4306]
4543         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
4544         Initialize the whole sigevent structure to appease valgrind.
4546 2007-04-25  Ulrich Drepper  <drepper@redhat.com>
4548         * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
4549         * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
4551 2007-04-06  Ulrich Drepper  <drepper@redhat.com>
4553         * tst-locale1.c: Avoid warnings.
4554         * tst-locale2.c: Likewise.
4556 2007-03-19  Steven Munroe  <sjmunroe@us.ibm.com>
4558         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4559         (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
4561 2007-03-16  Jakub Jelinek  <jakub@redhat.com>
4563         * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
4564         __extern_always_inline where appropriate.
4565         * sysdeps/pthread/pthread.h: Likewise.
4567 2007-03-13  Richard Henderson  <rth@redhat.com>
4569         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
4570         separate cfi regions for the two subsections.
4572 2007-02-25  Ulrich Drepper  <drepper@redhat.com>
4574         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
4575         new thread, don't just decrement it.
4576         Patch by Suzuki K P <suzuki@in.ibm.com>.
4578 2007-02-21  Ulrich Drepper  <drepper@redhat.com>
4580         * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
4581         PTHFCT_CALL definition.
4583 2007-02-18  Ulrich Drepper  <drepper@redhat.com>
4585         * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
4586         available, don't use it.
4588 2007-02-09  Jakub Jelinek  <jakub@redhat.com>
4590         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4591         (__lll_mutex_timedlock_wait): Use correct pointer when we don't
4592         call into the kernel to delay.
4594 2007-01-18  Ulrich Drepper  <drepper@redhat.com>
4596         * tst-initializers1.c: We want to test the initializers as seen
4597         outside of libc, so undefined _LIBC.
4599         * pthread_join.c (cleanup): Avoid warning.
4601 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
4603         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4604         (__lll_timedwait_tid): Add unwind info.
4606         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
4607         function table, mangle the pointers.
4608         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
4609         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
4610         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
4611         demangle pointers before use.
4612         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
4613         demangle pointer.
4614         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
4615         * sysdeps/pthread/setxid.h: Likewise.
4617 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
4619         * tst-rwlock7.c: Show some more information in case of correct
4620         behavior.
4622 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
4624         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4625         (lll_futex_timed_wait): Undo part of last change, don't negate
4626         return value.
4628 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
4630         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
4631         FUTEX_CMP_REQUEUE and lll_futex_requeue.
4633 2006-12-28  David S. Miller  <davem@davemloft.net>
4635         * shlib-versions: Fix sparc64 linux target specification.
4637 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
4639         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
4640         Adjust include path for pthread_barrier_wait.c move.
4642 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
4644         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
4645         tid isn't reread from pd->tid in between ESRCH test and the syscall.
4647 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
4649         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
4650         6 argument cancellable syscalls.
4651         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
4652         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
4653         6 argument cancellable syscalls.
4654         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
4656 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
4658         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
4659         (__rtld_mrlock_initialize): Add missing closing parenthesis.
4661 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
4663         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
4664         __sync_lock_release instead of __sync_lock_release_si.
4666 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
4668         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
4669         Define.
4670         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
4671         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
4672         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4673         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4674         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4675         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4676         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4677         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4678         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4679         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4680         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4682 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
4684         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
4685         * pthread_barrier_wait.c: ...here.
4686         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
4687         * pthread_cond_broadcast.c: ...here.
4688         * sysdeps/pthread/pthread_cond_signal.c: Move to...
4689         * pthread_cond_signal.c: ...here.
4690         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
4691         * pthread_cond_timedwait.c: ...here.
4692         * sysdeps/pthread/pthread_cond_wait.c: Move to...
4693         * pthread_cond_wait.c: ...here.
4694         * sysdeps/pthread/pthread_once.c: Move to...
4695         * pthread_once.c: ...here.
4696         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
4697         * pthread_rwlock_rdlock.c: ...here.
4698         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
4699         * pthread_rwlock_timedrdlock.c: ...here.
4700         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
4701         * pthread_rwlock_timedwrlock.c: ...here.
4702         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
4703         * pthread_rwlock_unlock.c: ...here.
4704         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
4705         * pthread_rwlock_wrlock.c: ...here.
4706         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
4707         * pthread_spin_destroy.c: ...here.
4708         * sysdeps/pthread/pthread_spin_init.c: Move to...
4709         * pthread_spin_init.c: ...here.
4710         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
4711         * pthread_spin_unlock.c: ...here.
4712         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
4713         * pthread_getcpuclockid.c: ...here.
4715         * init.c: USE_TLS support is now always enabled.
4716         * tst-tls5.h: Likewise.
4717         * sysdeps/alpha/tls.h: Likewise.
4718         * sysdeps/i386/tls.h: Likewise.
4719         * sysdeps/ia64/tls.h: Likewise.
4720         * sysdeps/powerpc/tls.h: Likewise.
4721         * sysdeps/s390/tls.h: Likewise.
4722         * sysdeps/sh/tls.h: Likewise.
4723         * sysdeps/sparc/tls.h: Likewise.
4724         * sysdeps/x86_64/tls.h: Likewise.
4726 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
4728         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
4729         __rtld_mrlock_change): Update oldval if atomic compare and exchange
4730         failed.
4732         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4733         Define to THREAD_SELF->header.multiple_threads.
4734         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
4735         Likewise.
4736         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
4737         Likewise.
4738         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
4739         (SINGLE_THREAD_P): Likewise.
4740         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
4741         (SINGLE_THREAD_P): Likewise.
4742         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4743         (SINGLE_THREAD_P): Likewise.
4744         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
4745         (SINGLE_THREAD_P): Likewise.
4746         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
4747         Likewise.
4748         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
4749         (SINGLE_THREAD_P): Likewise.
4750         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
4751         (SINGLE_THREAD_P): Likewise.
4752         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
4753         Likewise.
4755 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
4757         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
4758         by default rather than 2_3_3.
4760 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
4762         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
4763         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
4764         atomic_* instead of catomic_* macros.
4766 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
4768         [BZ #3285]
4769         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
4770         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
4771         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4772         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4773         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4774         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
4775         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4776         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4777         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4778         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
4779         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4780         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4781         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4783 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
4785         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
4786         cancelable syscalls with six parameters.
4788         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
4789         operations instead of atomic_*.
4791 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
4793         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
4795 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
4797         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
4798         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
4799         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
4800         New file.
4801         * pthread_attr_setstack.c: Allow overwriting the version number of the
4802         new symbol.
4803         * pthread_attr_setstacksize.c: Likewise.
4804         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
4805         it.
4806         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
4807         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
4809 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
4811         [BZ #3251]
4812         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
4813         Patch by Petr Baudis.
4815 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
4817         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
4819         * tst-cancel2.c (tf): Loop as long as something was written.
4821 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4823         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
4824         mutexes wake all mutexes.
4825         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
4826         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
4827         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4829 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
4831         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
4832         to guarantee the thread is always canceled.
4834 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
4836         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
4837         Include stdlib.h.
4838         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
4839         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
4840         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4841         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4842         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4844 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
4846         [BZ #3123]
4847         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
4848         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
4849         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4850         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4851         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4852         * Makefile (tests): Add tst-cond22.
4853         * tst-cond22.c: New file.
4855 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
4857         [BZ #3124]
4858         * descr.h (struct pthread): Add parent_cancelhandling.
4859         * sysdeps/pthread/createthread.c (create_thread): Pass parent
4860         cancelhandling value to child.
4861         * pthread_create.c (start_thread): If parent thread was canceled
4862         reset the SIGCANCEL mask.
4863         * Makefile (tests): Add tst-cancel25.
4864         * tst-cancel25.c: New file.
4866 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
4867             Ulrich Drepper  <drepper@redhat.com>
4869         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
4870         counterp if it is already zero.
4871         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
4873 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
4874             Roland McGrath  <roland@redhat.com>
4876         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4877         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4878         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
4879         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4880         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4881         lll_robust_mutex_timedlock, lll_mutex_unlock,
4882         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4883         Add _L_*_ symbols around the subsection.
4884         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
4885         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
4887 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
4888             Roland McGrath  <roland@redhat.com>
4890         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4891         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4892         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
4893         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4894         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4895         lll_robust_mutex_timedlock, lll_mutex_unlock,
4896         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4897         Add _L_*_ symbols around the subsection.
4898         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
4899         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
4901 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
4903         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
4904         change because it can disturb too much existing code.  If real hard
4905         reader preference is needed we'll introduce another type.
4906         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4907         (pthread_rwlock_timedwrlock): Likewise.
4908         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4909         Likewise.
4911 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
4913         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
4914         reader preference.
4915         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4916         (pthread_rwlock_timedwrlock): Likewise.
4917         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4918         Likewise.
4920 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
4922         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
4923         Only define ifdef SHARED.
4925 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
4927         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
4928         (free_stacks): ...here.
4929         (__free_stack_cache): New function.
4930         * pthreadP.h: Declare __free_stack_cache.
4931         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
4932         ptr_freeres.
4933         * init.c (pthread_functions): Initialize ptr_freeres.
4934         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
4935         New freeres function.
4937 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
4939         [BZ #3018]
4940         * Makefile (extra-objs): Add modules to extra-test-objs instead.
4942 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
4944         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4945         _XOPEN_REALTIME_THREADS.
4947 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
4949         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
4950         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
4951         HAVE_CLOCK_GETTIME_VSYSCALL.
4952         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
4954 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
4956         * sysdeps/unix/sysv/linux/bits/posix_opt.h
4957         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
4958         * descr.h (struct priority_protection_data): New type.
4959         (struct pthread): Add tpp field.
4960         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
4961         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
4962         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
4963         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
4964         TPP mutexes.
4965         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
4966         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
4967         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
4968         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
4969         * tpp.c: New file.
4970         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
4971         boosted by TPP.
4972         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
4973         * pthread_mutexattr_getprioceiling.c
4974         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
4975         in the SCHED_FIFO priority range.
4976         * pthread_mutexattr_setprioceiling.c
4977         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
4978         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
4979         if mutex is not TPP.  Ceiling is now in __data.__lock.
4980         * pthread_mutex_setprioceiling.c: Include stdbool.h.
4981         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
4982         is now in __data.__lock.  Add locking.
4983         * pthread_create.c (__free_tcb): Free pd->tpp structure.
4984         * Makefile (libpthread-routines): Add tpp.
4985         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
4986         * tst-tpp.h: New file.
4987         * tst-mutexpp1.c: New file.
4988         * tst-mutexpp6.c: New file.
4989         * tst-mutexpp10.c: New file.
4990         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
4991         * tst-mutex6.c (TEST_FUNCTION): Likewise.
4993 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
4995         [BZ #2843]
4996         * pthread_join.c (pthread_join): Account for self being canceled
4997         when checking for deadlocks.
4998         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
4999         (tf1): Don't print anything after pthread_join returns, this would be
5000         another cancellation point.
5001         (tf2): Likewise.
5002         * tst-join6.c: New file.
5003         * Makefile (tests): Add tst-join6.
5005 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
5007         [BZ #2892]
5008         * pthread_setspecific.c (__pthread_setspecific): Check
5009         out-of-range index before checking for unused key.
5011         * sysdeps/pthread/gai_misc.h: New file.
5013 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
5015         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
5016         file.  Don't use sysctl.
5017         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
5018         overwrite the file if this is likely not true.
5020 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
5022         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
5023         * Makefile (tests): Add tst-getpid3.
5024         * tst-getpid3.c: New file.
5026 2006-07-30  Roland McGrath  <roland@redhat.com>
5028         * Makefile (libpthread-routines): Add ptw-sigsuspend.
5030         * sysdeps/unix/sysv/linux/i386/not-cancel.h
5031         (pause_not_cancel): New macro.
5032         (nanosleep_not_cancel): New macro.
5033         (sigsuspend_not_cancel): New macro.
5034         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
5035         nanosleep_not_cancel macro from <not-cancel.h>.
5036         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
5037         macro from <not-cancel.h>.
5039 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
5040             Jakub Jelinek  <jakub@redhat.com>
5042         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
5043         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
5044         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
5045         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
5046         * pthread_mutex_init.c: Add support for priority inheritance mutex.
5047         * pthread_mutex_lock.c: Likewise.
5048         * pthread_mutex_timedlock.c: Likewise.
5049         * pthread_mutex_trylock.c: Likewise.
5050         * pthread_mutex_unlock.c: Likewise.
5051         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
5052         all mutexes.
5053         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
5054         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
5055         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
5056         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
5057         pthread-pi-defines.sym.
5058         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
5059         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
5060         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5061         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
5062         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5063         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5064         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
5065         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
5066         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
5067         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5068         _POSIX_THREAD_PRIO_INHERIT to 200112L.
5069         * tst-mutex1.c: Adjust to allow use in PI mutex test.
5070         * tst-mutex2.c: Likewise.
5071         * tst-mutex3.c: Likewise.
5072         * tst-mutex4.c: Likewise.
5073         * tst-mutex5.c: Likewise.
5074         * tst-mutex6.c: Likewise.
5075         * tst-mutex7.c: Likewise.
5076         * tst-mutex7a.c: Likewise.
5077         * tst-mutex8.c: Likewise.
5078         * tst-mutex9.c: Likewise.
5079         * tst-robust1.c: Likewise.
5080         * tst-robust7.c: Likewise.
5081         * tst-robust8.c: Likewise.
5082         * tst-mutexpi1.c: New file.
5083         * tst-mutexpi2.c: New file.
5084         * tst-mutexpi3.c: New file.
5085         * tst-mutexpi4.c: New file.
5086         * tst-mutexpi5.c: New file.
5087         * tst-mutexpi6.c: New file.
5088         * tst-mutexpi7.c: New file.
5089         * tst-mutexpi7a.c: New file.
5090         * tst-mutexpi8.c: New file.
5091         * tst-mutexpi9.c: New file.
5092         * tst-robust1.c: New file.
5093         * tst-robust2.c: New file.
5094         * tst-robust3.c: New file.
5095         * tst-robust4.c: New file.
5096         * tst-robust5.c: New file.
5097         * tst-robust6.c: New file.
5098         * tst-robust7.c: New file.
5099         * tst-robust8.c: New file.
5100         * Makefile (tests): Add the new tests.
5102         * pthread_create.c (start_thread): Add some casts to avoid warnings.
5103         * pthread_mutex_destroy.c: Remove unneeded label.
5105 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
5107         * pthread_mutex_init.c (__pthread_mutex_init): Move some
5108         computations to compile time.
5110 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
5112         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
5114 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
5116         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
5118 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
5120         * pthread_key_create.c (__pthread_key_create): Do away with
5121         __pthread_keys_lock.
5123         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5124         (__kernel_cpumask_size): Mark as hidden.
5125         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
5127         * sem_open.c (__sem_mappings_lock): Mark as hidden.
5128         * semaphoreP.h (__sem_mappings_lock): Likewise.
5130 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
5132         * pthread_atfork.c: Mark __dso_handle as hidden.
5134 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
5136         [BZ #2644]
5137         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
5138         the reload problem.  Change the one path in pthread_cancel_init
5139         which causes the problem.  Force gcc to reload.  Simplify callers.
5140         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
5141         (_Unwind_GetBSP): Undo last patch.
5143 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
5145         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
5146         function pointer is reloaded after pthread_cancel_init calls.
5148         [BZ #2644]
5149         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
5150         pointers are reloaded after pthread_cancel_init calls.
5152 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
5154         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
5155         __always_inline.
5157 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
5159         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5160         Allocate new object which is passed to timer_sigev_thread so that
5161         the timer can be deleted before the new thread is scheduled.
5163 2006-04-26  Roland McGrath  <roland@redhat.com>
5165         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
5167 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
5169         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
5170         suffix for conditional jumps.
5171         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
5172         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
5173         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
5174         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
5175         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
5176         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
5178         * init.c (sigcancel_handler): Compare with correct PID even if the
5179         thread is in the middle of a fork call.
5180         (sighandler_setxid): Likewise.
5181         Reported by Suzuki K P <suzuki@in.ibm.com> .
5183 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
5185         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
5187 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
5189         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
5190         fails [Coverity CID 105].
5192 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
5194         * sysdeps/pthread/pthread.h: Add nonnull attributes.
5196 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
5198         [BZ #2505]
5199         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
5200         Define __lll_rel_instr using lwsync.
5202 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
5204         * allocatestack.c (allocate_stack): Always initialize robust_head.
5205         * descr.h: Define struct robust_list_head.
5206         (struct pthread): Use robust_list_head in robust mutex list definition.
5207         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
5208         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
5209         (__pthread_initialize_minimal_internal): Register robust_list with
5210         the kernel.
5211         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
5212         Declare __set_robust_list_avail.
5213         * pthread_create.c (start_thread): Register robust_list of new thread.
5214         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
5215         waiters.
5216         * pthread_mutex_destroy.c: For robust mutexes don't look at the
5217         number of users, it's unreliable.
5218         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
5219         set_robust_list syscall is available.
5220         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
5221         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
5222         Set robust_head.list_op_pending before trying to lock a robust mutex.
5223         * pthread_mutex_timedlock.c: Likewise.
5224         * pthread_mutex_trylock.c: Likewise.
5225         * pthread_mutex_unlock.c: Likewise for unlocking.
5226         * Makefile (tests): Add tst-robust8.
5227         * tst-robust8.c: New file.
5229 2006-03-08  Andreas Schwab  <schwab@suse.de>
5231         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
5232         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
5234 2006-03-05  Roland McGrath  <roland@redhat.com>
5236         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
5237         and $config_os doesn't match *linux*.
5239 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
5241         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
5242         Use __syscall_error.
5243         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
5244         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
5245         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
5246         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
5247         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
5248         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
5250 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
5252         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
5254 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
5256         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
5257         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
5258         mutex.
5259         (__lll_robust_timedlock_wait): Likewise.
5260         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
5261         (__lll_robust_lock_wait): Likewise.
5262         (__lll_robust_timedlock_wait): Likewise.
5263         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
5264         (__lll_robust_lock_wait): Likewise.
5265         (__lll_robust_timedlock_wait): Likewise.
5267 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
5269         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
5270         lll_robust_mutex_trylock, lll_robust_mutex_lock,
5271         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
5272         lll_robust_mutex_unlock): Define.
5273         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
5275 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
5277         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
5278         instead of <clone.S>.
5280 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
5282         * Makefile (libpthread-routines): Add
5283         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
5284         and pthread_mutex_[sg]etprioceiling.
5285         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
5286         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
5287         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
5288         pthread_mutex_setprioceiling.
5289         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
5290         PTHREAD_PRIO_PROTECT): New enum values.
5291         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
5292         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
5293         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
5294         prototypes.
5295         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
5296         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
5297         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
5298         Define.
5299         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
5300         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
5301         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
5302         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
5303         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
5304         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
5305         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
5306         protocol mutexes.
5307         * pthread_mutex_getprioceiling.c: New file.
5308         * pthread_mutex_setprioceiling.c: New file.
5309         * pthread_mutexattr_getprioceiling.c: New file.
5310         * pthread_mutexattr_setprioceiling.c: New file.
5311         * pthread_mutexattr_getprotocol.c: New file.
5312         * pthread_mutexattr_setprotocol.c: New file.
5314 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
5316         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
5318 2006-02-27  Roland McGrath  <roland@redhat.com>
5320         * sysdeps/pthread/Subdirs: List nptl here too.
5321         * configure (libc_add_on_canonical): New variable.
5323         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
5325         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
5326         self to get main source tree's file.
5327         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
5328         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
5329         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
5330         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
5331         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
5332         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
5333         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
5334         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
5335         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
5336         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
5337         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
5338         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
5339         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
5341         * Makefile: Use $(sysdirs) in vpath directive.
5343         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
5344         (CPPFLAGS-timer_routines.c): Likewise.
5346         * Makeconfig (includes): Variable removed.
5348 2006-02-26  Roland McGrath  <roland@redhat.com>
5350         * sysdeps/generic/pt-raise.c: Moved to ...
5351         * pt-raise.c: ... here.
5352         * sysdeps/generic/lowlevellock.h: Moved to ...
5353         * lowlevellock.h: ... here.
5355 2006-02-23  Roland McGrath  <roland@redhat.com>
5357         * descr.h (struct pthread): Add final member `end_padding'.
5358         (PTHREAD_STRUCT_END_PADDING): Use it.
5360 2006-02-20  Roland McGrath  <roland@redhat.com>
5362         * sysdeps/mips: Directory removed, saved in ports repository.
5363         * sysdeps/unix/sysv/linux/mips: Likewise.
5365 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
5367         * tst-robust1.c: Add second mutex to check that the mutex list is
5368         handled correctly.
5370 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
5372         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
5373         lll_robust_mutex_trylock, lll_robust_mutex_lock,
5374         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
5375         lll_robust_mutex_unlock): New macros.
5376         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
5377         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
5378         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5379         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5380         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
5382 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5384         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
5385         definitions.
5386         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
5388 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
5390         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
5391         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
5392         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
5393         (lll_robust_mutex_unlock): Likewise.
5395 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
5397         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
5398         Set robust_list.__next rather than robust_list.
5399         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
5400         (__pthread_list_t): New typedef.
5401         (pthread_mutex_t): Replace __next and __prev fields with __list.
5402         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
5403         (__pthread_list_t): New typedef.
5404         (pthread_mutex_t): Replace __next and __prev fields with __list.
5405         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5406         (__pthread_list_t, __pthread_slist_t): New typedefs.
5407         (pthread_mutex_t): Replace __next and __prev fields with __list.
5408         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
5409         (__pthread_list_t, __pthread_slist_t): New typedefs.
5410         (pthread_mutex_t): Replace __next and __prev fields with __list.
5411         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
5412         (__pthread_list_t, __pthread_slist_t): New typedefs.
5413         (pthread_mutex_t): Replace __next and __prev fields with __list.
5414         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
5415         (__pthread_slist_t): New typedef.
5416         (pthread_mutex_t): Replace __next field with __list.
5418 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
5420         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
5421         PTHREAD_MUTEX_OWNERDEAD.
5422         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
5423         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
5424         * Makefile (libpthread-routines): Add lowlevelrobustlock.
5425         * pthread_create.c (start_thread): Very much simplify robust_list loop.
5426         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
5427         to PTHREAD_MUTEX_INCONSISTENT.
5428         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
5429         * pthread_mutex_lock.c: Reimplement robust mutex handling.
5430         * pthread_mutex_trylock.c: Likewise.
5431         * pthread_mutex_timedlock.c: Likewise.
5432         * pthread_mutex_unlock.c: Likewise.
5433         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
5434         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
5435         lowlevelrobustlock.sym.
5436         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
5437         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
5438         definitions.
5439         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5440         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
5441         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
5442         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
5443         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
5445 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
5447         * allocatestack.c (allocate_stack): Initialize robust_list.
5448         * init.c (__pthread_initialize_minimal_internal): Likewise.
5449         * descr.h (struct xid_command): Pretty printing.
5450         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
5451         robust_list.  Adjust macros.
5452         * pthread_create.c (start_thread): Adjust robust_list handling.
5453         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
5454         but the owner for all robust mutex types.
5455         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
5456         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
5457         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5458         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
5460         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
5461         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
5463 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
5465         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
5466         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
5468 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5470         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
5471         Return status.
5472         (lll_futex_timed_wait): Define.
5474 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
5476         * tst-cancel4.c: Test ppoll.
5478 2006-01-18  Andreas Jaeger  <aj@suse.de>
5480         [BZ #2167]
5481         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
5482         (pthread_mutex_t): Follow changes for other archs.  Based on patch
5483         by Jim Gifford <patches@jg555.com>.
5485 2006-01-13  Richard Henderson  <rth@redhat.com>
5487         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
5489 2006-01-10  Roland McGrath  <roland@redhat.com>
5491         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
5492         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
5493         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
5494         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
5495         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
5496         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
5497         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
5498         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
5499         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
5500         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
5502 2006-01-09  Roland McGrath  <roland@redhat.com>
5504         * tst-initializers1-c89.c: New file.
5505         * tst-initializers1-c99.c: New file.
5506         * tst-initializers1-gnu89.c: New file.
5507         * tst-initializers1-gnu99.c: New file.
5508         * Makefile (tests): Add them.
5509         (CFLAGS-tst-initializers1-c89.c): New variable.
5510         (CFLAGS-tst-initializers1-c99.c): New variable.
5511         (CFLAGS-tst-initializers1-gnu89.c): New variable.
5512         (CFLAGS-tst-initializers1-gnu99.c): New variable.
5514         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
5515         Use __extension__ on anonymous union definition.
5516         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5517         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5518         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5519         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5520         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5522 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
5524         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
5525         Don't give the union a name because it changes the mangled name.
5526         Instead name the struct for __data.
5527         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
5528         Likewise.
5529         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
5530         Likewise.
5532 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
5534         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
5535         stack bias to mc_ftp field.
5537 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
5539         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
5540         being too clever and reloading the futex value where it shouldn't.
5542 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
5544         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
5545         correct type.
5547 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
5549         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
5550         Add cfi directives.
5552 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
5554         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
5555         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
5556         rename in tcbhead_t.
5558         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
5559         Don't give the union a name because it changes the mangled name.
5560         Instead name the struct for __data.
5561         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5562         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5563         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5564         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5565         * pthread_create.c (start_thread): Adjust robust mutex free loop.
5566         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
5568 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
5570         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5571         Return status.
5572         (lll_futex_timed_wait): Define.
5573         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5574         * sysdeps/pthread/aio_misc.h: New file.
5576 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
5578         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
5580 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
5582         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5583         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
5584         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
5586 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
5588         * tst-cancel24.cc: Use C headers instead of C++ headers.
5590 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
5592         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
5593         sparc-linux configured glibc.
5594         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
5595         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
5596         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
5597         atomic_compare_and_exchange_val_24_acq instead of
5598         atomic_compare_and_exchange_val_acq.
5599         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
5600         instead of atomic_exchange_rel.
5601         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
5602         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
5603         file.
5604         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
5605         file.
5606         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
5607         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
5608         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
5609         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
5610         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
5611         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
5612         New file.
5613         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
5614         New file.
5615         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
5616         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
5617         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
5618         file.
5619         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
5620         file.
5621         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
5623 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
5625         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
5626         mutex initializers.
5628 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
5630         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
5631         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5632         THREAD_COPY_POINTER_GUARD): Define.
5633         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
5634         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
5636 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
5638         * version.c: Update copyright year.
5640 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5642         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
5643         .eh_frame section, use cfi_* directives.
5644         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
5646 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
5648         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
5649         now.
5651 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
5653         * sysdeps/pthread/sigaction.c: Removed.
5654         * sigaction.c: New file.
5655         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
5657 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
5659         * Makefile (tests): Add tst-signal7.
5660         * tst-signal7.c: New file.
5662 2005-12-27  Roland McGrath  <roland@redhat.com>
5664         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
5665         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
5666         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
5667         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
5668         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
5669         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
5670         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
5671         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
5672         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
5673         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
5674         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
5676 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
5678         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
5679         and __prev field to pthread_mutex_t.
5680         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5681         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5682         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5683         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5684         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
5685         to pthread_mutex_t.
5687 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
5689         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
5690         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
5691         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
5692         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
5693         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
5694         and PTHREAD_MUTEXATTR_FLAG_BITS.
5695         * descr.h (struct pthread): Add robust_list field and define
5696         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
5697         * pthread_mutexattr_getrobust.c: New file.
5698         * pthread_mutexattr_setrobust.c: New file.
5699         * pthread_mutex_consistent.c: New file.
5700         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
5701         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
5702         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
5703         Adjust pthread_mutex_t initializers.
5704         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
5705         field to pthread_mutex_t.
5706         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
5707         and __prev field to pthread_mutex_t.
5708         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
5709         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
5710         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
5711         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
5712         * pthread_mutexattr_gettype.c: Likewise.
5713         * pthread_mutexattr_setpshared.c: Likewise.
5714         * pthread_mutexattr_settype.c: Likewise.
5715         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
5716         Initialize mutex kind according to robust flag.
5717         * pthread_mutex_lock.c: Implement local robust mutex.
5718         * pthread_mutex_timedlock.c: Likewise.
5719         * pthread_mutex_trylock.c: Likewise.
5720         * pthread_mutex_unlock.c: Likewise.
5721         * pthread_create.c (start_thread): Mark robust mutexes which remained
5722         locked as dead.
5723         * tst-robust1.c: New file.
5724         * tst-robust2.c: New file.
5725         * tst-robust3.c: New file.
5726         * tst-robust4.c: New file.
5727         * tst-robust5.c: New file.
5728         * tst-robust6.c: New file.
5729         * tst-robust7.c: New file.
5730         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
5731         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
5732         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
5733         tst-robust5, tst-robust6, and tst-robust7.
5735         * tst-typesizes.c: New file.
5736         * Makefile (tests): Add tst-typesizes.
5738         * tst-once3.c: More debug output.
5740 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
5742         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
5743         missing after last change.
5745         * version.c: Update copyright year.
5747 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
5749         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
5750         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
5751         * pthread_mutex_trylock.c: Likewise.
5752         * pthread_mutex_timedlock.c: Likewise.
5753         * pthread_mutex_unlock.c: Likewise.
5755 2005-12-22  Roland McGrath  <roland@redhat.com>
5757         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
5758         so that #include_next's search location is not reset to the -I..
5759         directory where <nptl/...> can be found.
5761 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
5763         [BZ #1913]
5764         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5765         Fix unwind info.  Remove useless branch prediction prefix.
5766         * tst-cancel24.cc: New file.
5767         * Makefile: Add rules to build and run tst-cancel24.
5769 2005-12-21  Roland McGrath  <roland@redhat.com>
5771         * libc-cancellation.c: Use <> rather than "" #includes.
5772         * pt-cleanup.c: Likewise.
5773         * pthread_create.c: Likewise.
5774         * pthread_join.c: Likewise.
5775         * pthread_timedjoin.c: Likewise.
5776         * pthread_tryjoin.c: Likewise.
5777         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
5778         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
5779         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
5780         * unwind.c: Likewise.
5782 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5784         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
5785         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
5786         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5787         THREAD_COPY_POINTER_GUARD): Define.
5789 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
5791         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
5792         rather than one.
5793         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5794         THREAD_COPY_POINTER_GUARD): Define.
5795         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
5796         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
5797         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5798         THREAD_COPY_POINTER_GUARD): Define.
5799         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
5800         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
5801         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
5802         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
5803         Use PTR_DEMANGLE for B0 if defined.
5805 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
5807         * pthread_create.c (__pthread_create_2_1): Use
5808         THREAD_COPY_POINTER_GUARD if available.
5809         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
5810         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
5811         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
5812         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
5813         * sysdeps/x86_64/tls.h: Likewise.
5815 2005-12-15  Roland McGrath  <roland@redhat.com>
5817         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
5819 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
5821         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
5822         sysdeps/generic.
5823         * errno-loc.c: New file.
5825 2005-12-12  Roland McGrath  <roland@redhat.com>
5827         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
5828         adjustments before choosing stack size.  Update minimum stack size
5829         calculation to match allocate_stack change.
5831 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
5833         * allocatestack.c (allocate_stack): Don't demand that there is an
5834         additional full page available on the stack beside guard, TLS, the
5835         minimum stack.
5837 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
5839         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5840         (__cleanup_fct_attribute): Use __regparm__ not regparm.
5842         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
5843         compiling 32-bit code we must define __cleanup_fct_attribute.
5845 005-11-24  Jakub Jelinek  <jakub@redhat.com>
5847         [BZ #1920]
5848         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
5849         __attribute__ instead of __attribute.
5850         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5851         (__cleanup_fct_attribute): Likewise.
5853 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
5855         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
5856         a write barrier before writing libgcc_s_getcfa.
5858 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
5860         * sysdeps/unix/sysv/linux/configure: Removed.
5862 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
5864         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
5865         optional init_array/fini_array support.
5867 2005-10-24  Roland McGrath  <roland@redhat.com>
5869         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
5870         versioned_symbol use.
5872 2005-10-16  Roland McGrath  <roland@redhat.com>
5874         * init.c (__pthread_initialize_minimal_internal): Even when using a
5875         compile-time default stack size, apply the minimum that allocate_stack
5876         will require, and round up to page size.
5878 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
5880         * Makefile ($(test-modules)): Remove static pattern rule.
5882 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
5883             Ulrich Drepper  <drepper@redhat.com>
5885         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
5886         alignment in callback function.
5887         * Makefile: Add rules to build and run tst-align3.
5888         * tst-align3.c: New file.
5890 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
5892         * allocatestack.c (setxid_signal_thread): Add
5893         INTERNAL_SYSCALL_DECL (err).
5895 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
5897         * allocatestack.c (setxid_signal_thread): Need to use
5898         atomic_compare_and_exchange_bool_acq.
5900 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
5901             Jakub Jelinek  <jakub@redhat.com>
5903         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
5904         CANCEL_RESTMASK.
5905         (struct pthread): Move specific_used field to avoid padding.
5906         Add setxid_futex field.
5907         * init.c (sighandler_setxid): Reset setxid flag and release the
5908         setxid futex.
5909         * allocatestack.c (setxid_signal_thread): New function.  Broken
5910         out of the bodies of the two loops in __nptl_setxid.  For undetached
5911         threads check whether they are exiting and if yes, don't send a signal.
5912         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
5913         * pthread_create.c (start_thread): For undetached threads, check
5914         whether setxid bit is set.  If yes, wait until signal has been
5915         processed.
5917         * allocatestack.c (STACK_VARIABLES): Initialize them.
5918         * pthread_create.c (__pthread_create_2_1): Initialize pd.
5920 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
5922         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
5923         waiters, awake all waiters on the associated mutex.
5925 2005-09-22  Roland McGrath  <roland@redhat.com>
5927         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
5928         ../sysdeps/x86_64/hp-timing.h).
5930 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
5932         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
5933         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5934         (lll_futex_wake_unlock): Define.
5935         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
5936         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5937         (lll_futex_wake_unlock): Define.
5938         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
5939         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5940         (lll_futex_wake_unlock): Define.
5941         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
5942         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5943         (lll_futex_wake_unlock): Define.
5944         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
5945         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5946         (lll_futex_wake_unlock): Define.
5947         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
5948         lll_futex_wake_unlock.
5949         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
5950         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5951         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5952         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
5953         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5954         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5956 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5958         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5959         Fix typo in register name.
5961 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
5963         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5964         Use __sigfillset.  Document that sigfillset does the right thing wrt
5965         to SIGSETXID.
5967 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
5969         [BZ #1102]
5970         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
5971         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
5972         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
5973         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
5974         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
5975         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
5976         in the structure.
5977         * Makefile (tests): Add tst-initializers1.
5978         (CFLAGS-tst-initializers1.c): Set.
5979         * tst-initializers1.c: New test.
5981 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
5983         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
5984         Make sure __flags are located at offset 48 from the start of the
5985         structure.
5987 2005-07-02  Roland McGrath  <roland@redhat.com>
5989         * Makeconfig: Comment fix.
5991 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
5993         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
5994         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
5995         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
5996         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
5997         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5998         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5999         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
6000         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
6001         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
6002         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
6004 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
6006         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
6007         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
6008         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
6009         fields.
6010         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
6011         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
6012         field.  Put in sysinfo field unconditionally.
6013         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
6014         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
6015         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
6016         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
6017         fields.
6018         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
6019         * pthread_create.c (__pthread_create_2_1): Use
6020         THREAD_COPY_STACK_GUARD macro.
6021         * Makefile: Add rules to build and run tst-stackguard1{,-static}
6022         tests.
6023         * tst-stackguard1.c: New file.
6024         * tst-stackguard1-static.c: New file.
6026 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
6028         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
6029         Invoke CGOTSETUP and CGOTRESTORE.
6030         (CGOTSETUP, CGOTRESTORE): Define.
6032 2005-05-29  Richard Henderson  <rth@redhat.com>
6034         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
6035         (tf_write, tf_writev): Use it.
6036         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
6037         the system minimum.
6039 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
6041         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
6042         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
6043         __librt_*_asynccancel@local.
6045 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
6047         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
6048         all occurrences of JUMPTARGET.  Instead append @local to labels.
6050 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
6052         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
6053         size/alignment of struct pthread rather than tcbhead_t.
6054         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
6055         Likewise.
6056         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
6057         Likewise.
6058         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
6059         Likewise.
6061 2005-05-19  Richard Henderson  <rth@redhat.com>
6063         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
6064         __sync_val_compare_and_swap, not explicit _si variant.
6065         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
6067 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
6069         [BZ #915]
6070         * sysdeps/pthread/pthread.h: Avoid empty initializers.
6072 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
6074         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
6075         .eh_frame section, use cfi_* directives.
6077 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
6079         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
6080         of "" includes.
6082 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
6084         [BZ #1075]
6085         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
6086         aio_write blocks.
6088 2005-04-27  Roland McGrath  <roland@redhat.com>
6090         * Makefile (tests): Remove tst-clock2.
6092         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
6093         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
6094         translating to the kernel clockid_t for our own process/thread clock.
6096         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
6098 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
6100         * old_pthread_cond_init.c: Include <errno.h>.
6101         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
6102         process shared or uses clock other than CLOCK_REALTIME.
6103         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
6105 2005-04-13  David S. Miller  <davem@davemloft.net>
6107         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
6108         * sysdeps/sparc/sparc64/clone.S: New file.
6110 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
6112         [BZ #1102]
6113         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
6114         __inline instead of inline.
6115         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
6117 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
6119         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
6120         functionally equivalent, but shorter instructions.
6121         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6122         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6123         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6124         Likewise.
6125         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
6126         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6127         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6128         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6129         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6130         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
6131         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6132         Likewise.
6133         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6134         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
6135         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6136         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
6137         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6139 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
6141         * sysdeps/mips/Makefile: New file.
6142         * sysdeps/mips/nptl-sysdep.S: New file.
6143         * sysdeps/mips/tcb-offsets.sym: New file.
6144         * sysdeps/mips/pthread_spin_lock.S: New file.
6145         * sysdeps/mips/pthread_spin_trylock.S: New file.
6146         * sysdeps/mips/pthreaddef.h: New file.
6147         * sysdeps/mips/tls.h: New file.
6148         * sysdeps/mips/jmpbuf-unwind.h: New file.
6149         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
6150         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
6151         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
6152         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
6153         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
6154         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
6155         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
6156         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
6157         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
6158         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
6160 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
6162         [BZ #1112]
6163         * pthread_create.c (__pthread_create_2_1): Rename syscall error
6164         variable to scerr.
6166 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
6168         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
6170 2005-02-25  Roland McGrath  <roland@redhat.com>
6172         * alloca_cutoff.c: Correct license text.
6173         * tst-unload.c: Likewise.
6174         * sysdeps/pthread/allocalim.h: Likewise.
6175         * sysdeps/pthread/pt-initfini.c: Likewise.
6176         * sysdeps/pthread/bits/libc-lock.h: Likewise.
6177         * sysdeps/pthread/bits/sigthread.h: Likewise.
6178         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
6179         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
6181 2005-02-16  Roland McGrath  <roland@redhat.com>
6183         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
6184         Use unsigned int * for ptr_nthreads.
6186 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
6188         [BZ #721]
6189         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
6190         gcc4.
6192 2005-02-07  Richard Henderson  <rth@redhat.com>
6194         [BZ #787]
6195         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
6196         argument.
6198 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
6200         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
6201         order of arguments in invocation of atomic_add_zero.
6203 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
6205         [BZ #737]
6206         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
6207         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
6208         at least gotntpoff relocation and addition.
6209         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
6210         Likewise.
6211         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
6212         Likewise.
6213         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
6214         Likewise.
6216 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
6218         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
6219         entry for static tls deallocation fix.
6220         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
6221         also contains information whether the memory pointed to is static
6222         TLS or not.
6223         * sysdeps/i386/tls.h: Likewise.
6224         * sysdeps/ia64/tls.h: Likewise.
6225         * sysdeps/powerpc/tls.h: Likewise.
6226         * sysdeps/s390/tls.h: Likewise.
6227         * sysdeps/sh/tls.h: Likewise.
6228         * sysdeps/sparc/tls.h: Likewise.
6229         * sysdeps/x86_64/tls.h: Likewise.
6231 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
6233         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
6235 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
6237         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
6238         %esp.
6239         * Makefile (tests): Add tst-align2.
6240         * tst-align2.c: New test.
6241         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
6242         -mpreferred-stack-boundary=4.
6244 2004-12-18  Roland McGrath  <roland@redhat.com>
6246         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
6247         New file removed withdrawn for the moment.
6249 2004-12-17  Richard Henderson  <rth@redhat.com>
6251         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
6252         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
6254 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
6256         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
6257         Increased PTHREAD_STACK_MIN.
6259         * tst-context1.c (stacks): Use bigger stack size.
6261 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
6263         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
6264         * sysdeps/sparc/tcb-offsets.sym: Add TID.
6266 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
6268         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
6269         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
6270         * sysdeps/s390/tcb-offsets.sym (TID): Add.
6272 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
6274         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
6276 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
6278         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
6279         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
6281         * tst-getpid1.c: If child crashes, report this first.  Print which
6282         signal.
6284 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
6286         * init.c (__pthread_initialize_minimal_internal): Also unblock
6287         SIGSETXID.
6289 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
6291         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
6292         _POSIX_THREAD_CPUTIME): Define to 0.
6293         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
6294         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
6295         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
6296         __timer_signal_thread_tclk): Remove.
6297         (init_module): Remove their initialization.
6298         (thread_cleanup): Remove their cleanup assertions.
6299         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
6300         __timer_signal_thread_tclk): Remove.
6301         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
6302         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
6303         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
6305 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
6307         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
6308         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
6310         * Makefile (tests): Add tst-getpid2.
6311         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
6312         (do_test): Use it.  Use __clone2 instead of clone on ia64.
6313         * tst-getpid2.c: New test.
6315 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6317         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
6319 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
6321         * Makefile (tests): Add tst-getpid1.
6322         * tst-getpid1.c: New file.
6323         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
6324         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
6326 2004-12-02  Roland McGrath  <roland@redhat.com>
6328         * Makefile (libpthread-nonshared): Variable removed.
6329         ($(objpfx)libpthread_nonshared.a): Target removed.
6330         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
6331         These are now handled by generic magic from
6332         libpthread-static-only-routines being set.
6334 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
6336         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
6337         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
6338         _POSIX_THREAD_PRIO_PROTECT): Define.
6339         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6340         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
6341         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
6343 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
6345         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
6346         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
6347         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
6348         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
6349         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6350         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
6351         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
6353 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
6355         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
6357         * Makefile (libpthread-routines): Add pthread_setschedprio.
6358         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
6359         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
6360         * pthread_setschedprio.c: New file.
6362 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
6364         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
6365         * pthread_cancel.c (pthread_create): Likewise.
6367         * Makefile (libpthread-routines): Add vars.
6368         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
6369         * init.c (__default_stacksize, __is_smp): Remove.
6370         * vars.c: New file.
6371         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
6372         and define a wrapper macro.
6373         (PTHREAD_STATIC_FN_REQUIRE): Define.
6374         * allocatestack.c (__find_thread_by_id): Undefine.
6375         * pthread_create (__pthread_keys): Remove.
6376         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
6377         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
6378         PTHREAD_STATIC_FN_REQUIRE.
6380 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6382         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
6383         parameter to REGISTER macro.
6385 2004-11-17  Roland McGrath  <roland@redhat.com>
6387         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
6388         Make sure SIGCANCEL is blocked as well.
6390 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
6392         * sysdeps/pthread/setxid.h: New file.
6393         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
6394         (struct xid_command): Add forward decl.
6395         (struct pthread_functions): Change return type of __nptl_setxid hook
6396         to int.
6397         * pthreadP.h (__nptl_setxid): Change return type to int.
6398         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
6399         calling thread, return its return value and set errno on failure.
6400         * descr.h (struct xid_command): Change id type to long array.
6402         * Makefile: Add rules to build and test tst-setuid1 and
6403         tst-setuid1-static.
6404         * tst-setuid1.c: New test.
6405         * tst-setuid1-static.c: New test.
6407 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
6409         * Makefile (tests): Add tst-exit3.
6410         * tst-exit3.c: New test.
6412 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
6414         * Makefile (tests): Add tst-exit2.
6415         * tst-exit2.c: New file.
6417 2004-11-09  Roland McGrath  <roland@redhat.com>
6419         [BZ #530]
6420         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
6421         here, before calling clone.
6422         * pthread_create.c (start_thread): Don't do it here.
6424 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
6426         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
6428 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
6430         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
6431         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
6432         assembler warning.
6434 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
6436         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
6437         if sched_priority is not between minprio and maxprio.
6439 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6441         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6442         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
6444         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
6445         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
6447 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
6449         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
6450         not-cancelable I/O functions.
6452 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6454         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
6455         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
6456         make sure 2 is stored in the futex and we looked at the old value.
6457         Fix a few other problems to return the correct value.
6459 2004-10-14  Richard Henderson  <rth@redhat.com>
6461         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
6462         make gcc4 happy.
6464 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
6466         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
6467         of pthread-functions.h and pthreaddef.h.
6468         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
6470         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6471         Change __data.__nwaiters from int to unsigned int.
6473         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
6474         sysconf (_SC_THREAD_CPUTIME) returns negative value.
6476         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
6477         before return type.
6479         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
6480         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
6482 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
6484         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
6485         test fails, remove message queue.
6486         (tf_msgsnd): Likewise.
6488 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
6490         * tst-clock1.c: Change #ifdef to #if defined.
6491         * tst-clock2.c: Likewise.
6492         * tst-cond11.c: Likewise.
6494         * sysdeps/pthread/timer_create.c (timer_create): Use
6495         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
6496         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
6497         THREAD_CPUTIME.
6499 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
6501         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
6502         _POSIX_THREAD_CPUTIME): Define to 0.
6504 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
6506         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
6507         and _POSIX_THREAD_CPUTIME to zero.
6508         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
6509         * tst-barrier2.c: Fix testing for POSIX feature.
6510         * tst-clock1.c: Likewise.
6511         * tst-clock2.c: Likewise.
6512         * tst-cond11.c: Likewise.
6513         * tst-cond4.c: Likewise.
6514         * tst-cond6.c: Likewise.
6515         * tst-flock2.c: Likewise.
6516         * tst-mutex4.c: Likewise.
6517         * tst-mutex9.c: Likewise.
6518         * tst-rwlock12.c: Likewise.
6519         * tst-rwlock4.c: Likewise.
6520         * tst-signal1.c: Likewise.
6521         * tst-spin2.c: Likewise.
6522         * sysdeps/pthread/posix-timer.h: Likewise.
6523         * sysdeps/pthread/timer_create.c: Likewise.
6524         * sysdeps/pthread/timer_routines.c: Likewise.
6526 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
6528         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6529         (__lll_mutex_timedlock_wait): Address futex correctly.
6531         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6532         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
6533         make sure 2 is stored in the futex and we looked at the old value.
6534         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6535         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
6536         which might very well made the code not working at all before.
6537         [BZ #417]
6539 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
6541         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
6542         allow SIGSETXID to be sent.
6543         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
6544         for SIGSETXID to be defined.
6545         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
6546         SIGSETXID cannot be blocked.
6548         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6549         Add __extension__ to long long types.
6550         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6551         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6552         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6553         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6554         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
6555         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6556         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6558 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
6560         * descr.h (struct pthread): Add stopped_start field.
6561         * sysdeps/pthread/createthread.c (create_thread): Set
6562         start_stopped flag in descriptor for new thread appropriately.
6563         * pthread_create.c (start_thread): Only take lock to be stopped on
6564         startup if stopped_start flag says so.
6566 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
6568         * pthread_create.c (__pthread_create_2_1): Remember whether thread
6569         is created detached and if yes, do not try to free the stack in case
6570         the thread creation failed.
6571         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
6572         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
6573         case there has been no error.  [BZ #405]
6575         * pthread_create.c (start_thread): Don't wait for scheduler data
6576         etc to be set at the beginning of the function.  The cancellation
6577         infrastructure must have been set up.  And enable async
6578         cancellation before potentially going to sleep.  [BZ #401]
6580 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
6582         * Versions: Remove exports for pthread_set*id_np functions.
6583         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
6584         for now.
6585         * Makefile: Don't build pthread_set*id code for now.
6587 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
6589         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
6590         internal use.
6591         * allocatestack.c (__nptl_setxid): New function.
6592         * descr.h (struct xid_command): Define type.
6593         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
6594         (sighandler_setxid): New function.
6595         (__pthread_initialize_minimal): Register sighandler_setxid for
6596         SIGCANCEL.
6597         * pt-allocrtsig.c: Update comment.
6598         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
6599         Declare __nptl_setxid.
6600         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
6601         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
6602         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
6603         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
6604         and pthread_setresuid_np.
6605         * pthread_setgid_np.c: New file.
6606         * pthread_setuid_np.c: New file.
6607         * pthread_setegid_np.c: New file.
6608         * pthread_seteuid_np.c: New file.
6609         * pthread_setregid_np.c: New file.
6610         * pthread_setreuid_np.c: New file.
6611         * pthread_setresgid_np.c: New file.
6612         * pthread_setresuid_np.c: New file.
6613         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
6614         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
6615         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
6616         and pthread_setresuid_np.
6617         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
6618         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
6619         pthread_setregid, and pthread_setresgid.
6621 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
6623         * allocatestack.c (allocate_stack): Return EAGAIN instead of
6624         ENOMEM when out of memory.
6626 2004-09-10  Roland McGrath  <roland@redhat.com>
6628         [BZ #379]
6629         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
6630         code, since we don't try to use the broken CLONE_STOPPED any more.
6631         * pthread_create.c (start_thread): Likewise.
6633 2004-09-15  Richard Henderson  <rth@redhat.com>
6635         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
6637 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
6639         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
6640         (__libc_unwind_longjmp): Delete macro and declare as function.
6641         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
6642         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
6643         nptl directory.
6644         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
6645         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
6646         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
6648 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
6650         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
6651         for __USE_XOPEN2K.
6652         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
6653         types also for __USE_XOPEN2K.
6654         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6655         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6656         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6657         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6658         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6659         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6660         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6661         [BZ #320]
6663 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
6665         * sysdeps/pthread/pthread.h
6666         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
6667         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
6668         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
6669         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
6670         [BZ #375]
6672 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
6674         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
6675         PSEUDO to be used with . prefix.
6677         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
6678         Use atomic_increment instead of atomic_exchange_and_add.
6679         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
6680         Likewise.
6681         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
6682         Likewise.
6683         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
6684         Likewise.
6686         * allocatestack.c (allocate_stack): Use atomic_increment_val
6687         instead of atomic_exchange_and_add.
6688         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
6689         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
6690         Likewise.
6691         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6692         Likewise.
6694         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
6695         the initialization function might throw.
6697 2005-09-05  Richard Henderson  <rth@redhat.com>
6699         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
6700         Move definition inside libpthread, libc, librt check.  Provide
6701         definition for rtld.
6703 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
6705         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
6706         * sysdeps/i386/jmpbuf-unwind.h: Likewise
6707         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
6708         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
6709         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
6710         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
6711         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
6712         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
6713         * unwind.c: Use it.
6715         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6716         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
6717         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6718         Likewise.
6719         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
6720         Decrement __nwaiters.  If pthread_cond_destroy has been called and
6721         this is the last waiter, signal pthread_cond_destroy caller and
6722         avoid using the pthread_cond_t structure after unlock.
6723         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6724         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6725         Read clock type from the least significant bits of __nwaiters instead
6726         of __clock.
6727         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6728         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
6730 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
6732         [BZ #342]
6733         * Makefile (tests): Add tst-cond20 and tst-cond21.
6734         * tst-cond20.c: New test.
6735         * tst-cond21.c: New test.
6736         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
6737         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
6738         it unsigned int.
6739         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6740         Likewise.
6741         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6742         (pthread_cond_t): Likewise.
6743         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6744         Likewise.
6745         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6746         Likewise.
6747         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6748         Likewise.
6749         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
6750         (cond_nwaiters): New.
6751         (clock_bits): New.
6752         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
6753         if there are waiters not signalled yet.
6754         Wait until all already signalled waiters wake up.
6755         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
6756         __nwaiters.  If pthread_cond_destroy has been called and this is the
6757         last waiter, signal pthread_cond_destroy caller and avoid using
6758         the pthread_cond_t structure after unlock.
6759         (__pthread_cond_wait): Increment __nwaiters in the beginning,
6760         decrement it when leaving.  If pthread_cond_destroy has been called
6761         and this is the last waiter, signal pthread_cond_destroy caller.
6762         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6763         Likewise.  Read clock type from the least significant bits of
6764         __nwaiters instead of __clock.
6765         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
6766         whether clock ID can be encoded in COND_CLOCK_BITS bits.
6767         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
6768         clock type just from the last COND_CLOCK_BITS bits of value.
6769         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
6770         instead of __clock, just from second bit of condattr's value.
6772 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
6774         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
6775         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
6776         != 64.
6777         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6779 2004-08-15  Roland McGrath  <roland@frob.com>
6781         * pthread_atfork.c: Update copyright terms including special exception
6782         for these trivial files, which are statically linked into executables
6783         that use dynamic linking for the significant library code.
6785 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
6787         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
6788         pthread_rwlock_rdlock.
6789         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
6790         Decrease __nr_readers_queued after reacquiring lock.
6791         * sysdeps/pthread/pthread_rwlock_timedrdlock
6792         (pthread_rwlock_timedrdlock): Likewise.
6793         Reported by Bob Cook <bobcook47@hotmail.com>.
6795 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
6797         * tst-rwlock14.c (tf): Read main thread handle from *ARG
6798         before pthread_barrier_wait.
6800 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
6802         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
6803         Remove unnecessary exception handling data.
6805 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
6807         [BZ #284]
6808         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
6809         instead of clockid_t.
6811 2004-07-21  Roland McGrath  <roland@redhat.com>
6813         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
6815 2004-07-19  Roland McGrath  <roland@redhat.com>
6817         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
6819 2004-07-02  Roland McGrath  <roland@redhat.com>
6821         * configure: Don't exit.
6823 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6825         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6826         (__pthread_cond_timedwait): Check for invalid nanosecond in
6827         timeout value.
6829 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
6831         * Makefile: Add rules to build and run tst-fini1.
6832         * tst-fini1.c: New file.
6833         * tst-fini1mod.c: New file.
6835 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
6837         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
6838         if no cancellation support is needed.
6839         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6840         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6841         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6842         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6843         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6844         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6845         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6846         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
6847         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
6849         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
6850         only if not already defined.
6852 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
6854         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
6855         constraint "m" instead of "0" for futex.
6857         * shlib-versions: Add powerpc64-.*-linux.*.
6859 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
6861         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
6862         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
6863         for valid tv_nsec.
6864         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
6865         1 billion and 64-bit tv_nsec which is valid when truncated to 32
6866         bits.
6868 2004-06-29  Roland McGrath  <roland@redhat.com>
6870         * Banner: NPTL no longer has its own version number.
6871         * Makefile (nptl-version): Variable removed.
6872         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
6873         using $(version), the glibc version number.
6875 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6877         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6878         Fix branch offset for a PLT entry.
6879         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
6880         Likewise.
6881         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
6882         Likewise.
6883         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
6884         Likewise.
6885         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
6886         Likewise.
6888 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
6890         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
6891         unconditionally.
6893 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
6895         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
6896         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
6897         instead of tv_sec.
6898         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
6899         (pthread_rwlock_timedrdlock): Likewise.
6901 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
6903         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6904         Set __r7 to val, not mutex.
6906 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
6908         * Makefile: Add rules to build tst-rwlock14.
6909         * tst-rwlock14.c: New file.
6911 2004-06-24  Boris Hu  <boris.hu@intel.com>
6913         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
6914         check.
6915         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6917 2004-06-19  Andreas Jaeger  <aj@suse.de>
6919         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
6920         assembler in last patch.
6922 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
6924         * sysdeps/pthread/pthread_cond_timedwait.c
6925         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
6926         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6927         (__pthread_cond_timedwait): Check for invalid nanosecond in
6928         timeout value.
6929         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6930         * tst-cond19.c: New file.
6931         * Makefile: Add rules to build and run tst-cond19.
6933 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
6935         * tst-context1.c (GUARD_PATTERN): Defined.
6936         (tst_context_t): Define struct containing ucontext_t & guard words.
6937         (ctx): Declare as an array of tst_context_t.
6938         (fct): Verify uc_link & guard words are still valid.
6939         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
6941 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6943         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6944         Add __data.__futex field, reshuffle __data.__clock.
6945         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
6946         (__pthread_cond_signal): Increment __futex at the same time as
6947         __wakeup_seq or __total_seq.  Pass address of __futex instead of
6948         address of low 32-bits of __wakeup_seq to futex syscall.
6949         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6950         (__pthread_cond_wait): Likewise.  Pass __futex value from before
6951         releasing internal lock to FUTEX_WAIT.
6952         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6953         (__pthread_cond_timedwait): Likewise.
6954         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6955         (FUTEX_CMP_REQUEUE): Define.
6956         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6957         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6958         Pass __futex value from before the unlock and __futex address instead
6959         of address of low 32-bits of __wakeup_seq to futex syscall.
6960         Fallback to FUTEX_WAKE all on any errors.
6962 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
6964         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
6965         comment typo.
6966         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
6967         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
6968         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
6969         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
6970         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
6972 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
6974         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
6975         Add memory clobber to inline assembly.
6976         (__lll_mutex_trylock): Likewise.
6977         (__lll_mutex_cond_trylock): Likewise.
6979 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
6981         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6982         Pass val argument as 6th system call argument in %r7.
6984 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
6986         * Makefile (tests): Add tst-cond16.
6987         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
6988         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
6989         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6990         Add __data.__futex field, reshuffle __data.__clock.
6991         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
6992         (__pthread_cond_signal): Increment __futex at the same time as
6993         __wakeup_seq or __total_seq.  Pass address of __futex instead of
6994         address of low 32-bits of __wakeup_seq to futex syscall.
6995         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
6996         (__pthread_cond_wait): Likewise.  Pass __futex value from before
6997         releasing internal lock to FUTEX_WAIT.
6998         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
6999         (__pthread_cond_timedwait): Likewise.
7000         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
7001         (FUTEX_CMP_REQUEUE): Define.
7002         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
7003         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
7004         Pass __futex value from before the unlock and __futex address instead
7005         of address of low 32-bits of __wakeup_seq to futex syscall.
7006         Fallback to FUTEX_WAKE all on any errors.
7007         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
7008         Define.
7009         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
7010         internally.  Return non-zero if error, zero if success.
7011         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
7012         Add __data.__futex field, reshuffle __data.__clock.
7013         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
7014         Define.
7015         (lll_futex_requeue): Add val argument, return 1 unconditionally
7016         for the time being.
7017         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7018         Add __data.__futex field, reshuffle __data.__clock.
7019         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
7020         Define.
7021         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
7022         internally.  Return non-zero if error, zero if success.
7023         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7024         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
7025         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
7026         Define.
7027         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
7028         internally.  Return non-zero if error, zero if success.
7029         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
7030         Add __data.__futex field, reshuffle __data.__clock.
7031         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
7032         Define.
7033         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
7034         internally.  Return non-zero if error, zero if success.
7035         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
7036         Add __data.__futex field, reshuffle __data.__clock.
7037         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
7038         Add __data.__futex field, reshuffle __data.__clock.
7039         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
7040         Increment __futex at the same time as __wakeup_seq or __total_seq.
7041         Pass address of __futex instead of address of low 32-bits of
7042         __wakeup_seq to futex syscall.
7043         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
7044         Pass __futex value from before releasing internal lock
7045         to FUTEX_WAIT.
7046         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7047         Likewise.  Avoid unnecessary shadowing of variables.
7048         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
7049         Set __futex to 2 * __total_seq.  Pass __futex value from before the
7050         unlock and __futex address instead of address of low 32-bits of
7051         __wakeup_seq to futex_requeue macro, adjust for new return value
7052         meaning.
7053         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
7054         (__pthread_cond_signal): Increment __futex at the same time as
7055         __wakeup_seq or __total_seq.  Pass address of __futex instead of
7056         address of low 32-bits of __wakeup_seq to futex syscall.
7057         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7058         (__pthread_cond_wait): Likewise.  Pass __futex value from before
7059         releasing internal lock to FUTEX_WAIT.
7060         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7061         (__pthread_cond_timedwait): Likewise.
7062         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
7063         (FUTEX_CMP_REQUEUE): Define.
7064         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
7065         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
7066         Pass __futex value from before the unlock and __futex address instead
7067         of address of low 32-bits of __wakeup_seq to futex syscall.
7068         Fallback to FUTEX_WAKE all on any errors.
7070 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7072         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
7073         Add nop to align the end of critical section.
7074         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
7076 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7078         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
7079         Add __broadcast_seq field.
7080         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
7081         all waiters as woken with woken_seq and bump broadcast counter.
7082         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
7083         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
7084         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7085         Comment typo fixes.  Avoid returning -ETIMEDOUT.
7087 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
7089         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7090         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
7091         Reported by Kaz Kojima.
7093 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
7095         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
7097 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
7099         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
7100         __broadcast_seq with bc_seq after acquiring internal lock instead of
7101         before it.
7103 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
7105         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
7106         compilation.
7107         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7108         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
7109         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7110         (pthread_cond_t): Add __data.__broadcast_seq field.
7111         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7112         (FRAME_SIZE): Define.
7113         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
7114         Comment typo fixes.
7115         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
7116         Define.
7117         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
7118         typo fixes.
7119         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
7120         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
7121         fixes.
7123 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
7125         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
7126         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
7127         Add __broadcast_seq field.
7128         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7129         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7130         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7131         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7132         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7133         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
7134         all waiters as woken with woken_seq and bump broadcast counter.
7135         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
7136         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
7137         __broadcast_seq field.
7138         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7139         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7140         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7141         * pthread_cond_init.c: Initialize __broadcast_seq field.
7142         * Makefile (tests): Add tst-cond17 and tst-cond18.
7143         Add .NOTPARALLEL goal.
7144         * tst-cond16.c: New file.  From Jakub.
7145         * tst-cond17.c: New file.  From Jakub.
7146         * tst-cond18.c: New file.  From Jakub.
7148 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
7150         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
7151         unwind info.
7153         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
7154         Parametrize frame size.  Correct some unwind info.
7155         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7157 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
7159         * tst-stack3.c: Note testing functionality beyond POSIX.
7161 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
7163         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
7164         Change conditional from ifdef to if.
7166 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
7168         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
7169         SYSDEP_CANCEL_ERROR): Define.
7170         (PSEUDO): Use it.
7172 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
7174         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
7176 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
7178         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
7180 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7182         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
7183         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
7184         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
7185         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
7187 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
7189         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
7190         thread has all signals blocked.
7192 2004-04-18  Andreas Jaeger  <aj@suse.de>
7194         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
7195         (SEM_VALUE_MAX): Add missing brace.
7197 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
7199         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
7200         in rt subdir.
7201         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
7202         * sysdeps/pthread/tst-mqueue8x.c: New test.
7203         * tst-cancel4.c: Update comment about message queues.
7205         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
7206         return it_value { 0, 0 }.
7207         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
7208         like SIGEV_SIGNAL.
7209         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
7210         assertion for SIGEV_NONE.
7211         (thread_attr_compare): Compare all attributes, not just a partial
7212         subset.
7214 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
7216         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
7218 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
7220         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
7221         Just use a plain number.
7222         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
7223         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
7224         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
7225         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
7226         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
7227         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
7228         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
7230 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7232         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
7233         frame info.
7234         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7236 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
7238         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
7239         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
7240         of calling sigwaitinfo.
7242 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
7244         * allocatestack.c (allocate_stack): Set reported_guardsize
7245         unconditionally.
7246         * pthread_getattr_np.c (pthread_getattr_np): Use
7247         reported_guardsize instead of guardsize.
7248         * descr.h (struct pthread): Add reported_guardsize field.
7250 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
7252         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
7254 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
7256         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
7258 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
7260         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
7261         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
7262         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
7263         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
7264         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
7265         Define.
7266         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
7267         (_POSIX_MESSAGE_PASSING): Define.
7268         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
7269         (_POSIX_MESSAGE_PASSING): Define.
7270         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
7271         (_POSIX_MESSAGE_PASSING): Define.
7273 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
7275         * tst-context1.c (fct): Check whether correct stack is used.
7277 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
7279         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
7280         matching constraints for asm mem parameters.
7282         * tst-clock2.c (tf): Don't define unless needed.
7284 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
7286         * Makefile (link-libc-static): Use $(static-gnulib) instead of
7287         $(gnulib).
7289 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
7291         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
7292         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
7293         * pthreadP.h: Declare __nptl_deallocate_tsd.
7294         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
7295         Adjust caller.
7297         * Makefile (tests): Add tst-tsd5.
7298         * tst-tsd5.c: New file.
7300 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
7302         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
7303         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
7304         is SHLIB_COMPAT check.
7305         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
7306         (__pthread_attr_getaffinity_old): Likewise.
7307         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7308         (__pthread_getaffinity_old): Likewise.
7309         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
7310         (__pthread_setaffinity_old): Likewise.
7312 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
7314         * allocatestack.c (_make_stacks_executable): Call
7315         _dl_make_stack_executable first.
7317 2004-03-24  Roland McGrath  <roland@redhat.com>
7319         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
7320         constraint instead of "0".
7322 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
7324         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7325         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
7327         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
7328         code to avoid warning.
7330 2004-03-24  Andreas Jaeger  <aj@suse.de>
7332         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
7333         (__pthread_attr_setaffinity_old): Remove const.
7335 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
7337         * sysdeps/unix/sysv/linux/smp.h: New file.
7338         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
7339         * init.c: Define __is_smp.
7340         (__pthread_initialize_minimal_internal): Call is_smp_system to
7341         initialize __is_smp.
7342         * pthreadP.h: Declare __is_smp.
7343         Define MAX_ADAPTIVE_COUNT is necessary.
7344         * pthread_mutex_init.c: Add comment regarding __spins field.
7345         * pthread_mutex_lock.c: Implement adaptive mutex type.
7346         * pthread_mutex_timedlock.c: Likewise.
7347         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
7348         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
7349         Add __spins field.
7350         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7351         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7352         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7353         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7354         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7355         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7356         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7357         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
7358         lll_mutex_cond_trylock.
7359         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7360         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7361         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7362         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7363         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7364         Define BUSY_WAIT_NOP.
7365         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7366         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7368         * tst-mutex5.c: Add support for testing adaptive mutexes.
7369         * tst-mutex7.c: Likewise.
7370         * tst-mutex5a.c: New file.
7371         * tst-mutex7a.c: New file.
7372         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
7374         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
7375         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
7376         vgettimeofday call might destroy the content.
7378         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
7379         @pause in the loop.
7381         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
7382         No need to restrict type of ret.  Make it int.  Add comment.
7384         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
7385         Remove unnecessary setne instruction.
7387 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
7389         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7390         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
7391         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
7392         If realloc fails, break out of the loop.
7394 2004-03-20  Andreas Jaeger  <aj@suse.de>
7396         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
7397         (__pthread_setaffinity_old): Fix interface.
7398         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7399         (__pthread_getaffinity_old): Likewise.
7401         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
7402         (__pthread_setaffinity_new): Remove duplicate declaration.
7404 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7406         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
7407         the return value to a safe register.
7408         (CDISABLE): Set the function argument correctly.
7410 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7412         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
7413         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
7414         Rewrite so that only one locked memory operation per round is needed.
7415         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
7416         (pthread_barrier_wait): After wakeup, release lock only when the
7417         last thread stopped using the barrier object.
7418         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
7419         (__pthread_cond_wait): Don't store mutex address if the current
7420         value is ~0l.  Add correct cleanup support and unwind info.
7421         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7422         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
7423         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
7424         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
7425         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
7426         Add correct cleanup support and unwind info.
7427         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
7428         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
7429         information for syscall wrappers.
7431 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
7433         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
7434         cpusetsize field, remove next.
7435         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
7436         parameter for size of the CPU set.
7437         (pthread_setaffinity_np): Likewise.
7438         (pthread_attr_getaffinity_np): Likewise.
7439         (pthread_attr_setaffinity_np): Likewise.
7440         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
7441         interface change, keep compatibility code.
7442         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
7443         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
7444         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
7445         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
7446         __pthread_getaffinity_np.
7447         * Versions: Add version for changed interfaces.
7448         * tst-attr3.c: Adjust test for interface change.
7449         * pthread_getattr_np.c: Query the kernel about the affinity mask with
7450         increasing buffer sizes.
7451         * pthread_attr_destroy.c: Remove unused list handling.
7452         * pthread_attr_init.c: Likewise.
7454 2004-03-17  Roland McGrath  <roland@redhat.com>
7456         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
7457         first argument to clock_getres so we ever enable kernel timers.
7459 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
7461         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
7463 2004-03-12  Richard Henderson  <rth@redhat.com>
7465         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
7466         oldvalue from CENABLE to CDISABLE.
7468 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
7470         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
7471         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
7472         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
7473         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
7475 2004-03-11  Richard Henderson  <rth@redhat.com>
7477         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
7478         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
7479         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
7481 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
7483         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
7484         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
7485         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
7487 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
7489         * forward.c (__pthread_cond_broadcast_2_0,
7490         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
7491         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
7492         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
7494 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7496         * sysdeps/sh/tcb-offsets.sym: Add PID.
7497         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
7498         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
7500 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
7502         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
7503         include <sysdep-cancel.h>, vfork is no cancellation point.
7504         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
7505         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
7506         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
7508 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
7510         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
7511         libc_hidden_def.
7512         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
7513         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
7514         Likewise.
7515         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
7516         Likewise.
7517         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
7518         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
7519         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
7520         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
7521         of DO_CALL_VIA_BREAK.  Work around a gas problem.
7523         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
7524         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
7525         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
7526         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
7527         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
7528         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
7530         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
7531         a local register for saving old PID.  Negate PID in parent upon exit.
7533         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
7534         tcb-offsets.h.
7535         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
7536         before syscall, set to the old value in the parent afterwards.
7537         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
7538         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
7539         tcb-offsets.h.
7540         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
7541         before syscall, set to the old value in the parent afterwards.
7542         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
7543         * sysdeps/s390/tcb-offsets.sym: Add PID.
7545         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
7546         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
7547         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
7548         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
7549         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
7550         * sysdeps/sparc/tcb-offsets.sym: Add PID.
7552 2004-03-10  Andreas Schwab  <schwab@suse.de>
7554         * sysdeps/ia64/tcb-offsets.sym: Add PID.
7555         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
7556         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
7558 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
7560         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
7561         * tst-cancel21.c (do_one_test): Likewise.
7562         Reported by Gordon Jin <gordon.jin@intel.com>.
7564 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
7566         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
7567         if non-zero and set to INT_MIN if zero.
7568         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
7569         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
7570         (SAVE_PID, RESTORE_PID): Define.
7571         (__vfork): Use it.
7572         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
7573         Use relative path to avoid including NPTL i386/vfork.S.
7574         (SAVE_PID, RESTORE_PID): Define.
7575         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
7576         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
7577         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
7578         tst-vfork2x.
7579         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
7580         * tst-vfork1.c: New test.
7581         * tst-vfork2.c: New test.
7582         * tst-vfork1x.c: New test.
7583         * tst-vfork2x.c: New test.
7585 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
7587         * sysdeps/i386/tcb-offsets.sym: Add PID.
7588         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7589         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
7590         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
7592 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
7594         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
7596 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
7598         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
7599         _rtld_global_ro.
7601 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
7603         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
7604         _rtld_global_ro.
7606         * tst-once4.c: Remove unnecessary macro definition.
7608         * tst-mutex7.c (do_test): Limit thread stack size.
7609         * tst-once2.c (do_test): Likewise.
7610         * tst-tls3.c (do_test): Likewise.
7611         * tst-tls1.c (do_test): Likewise.
7612         * tst-signal3.c (do_test): Likewise.
7613         * tst-kill6.c (do_test): Likewise.
7614         * tst-key4.c (do_test): Likewise.
7615         * tst-join4.c (do_test): Likewise.
7616         * tst-fork1.c (do_test): Likewise.
7617         * tst-context1.c (do_test): Likewise.
7618         * tst-cond2.c (do_test): Likewise.
7619         * tst-cond10.c (do_test): Likewise.
7620         * tst-clock2.c (do_test): Likewise.
7621         * tst-cancel10.c (do_test): Likewise.
7622         * tst-basic2.c (do_test): Likewise.
7623         * tst-barrier4.c (do_test): Likewise.
7625 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
7627         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
7629 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
7631         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7632         (__pthread_cond_timedwait): Optimize wakeup test.
7633         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7634         (__pthread_cond_wait): Likewise.
7635         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
7636         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7637         Likewise.
7639 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
7641         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7642         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
7643         the atomic instruction needed.
7644         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
7645         (__lll_mutex_lock_wait): Likewise.
7647 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
7649         * Makefile (tests): Add tst-cond14 and tst-cond15.
7650         * tst-cond14.c: New file.
7651         * tst-cond15.c: New file.
7653 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
7655         * sysdeps/pthread/createthread.c (create_thread): Remove use of
7656         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
7657         needs to be implemented differently to be useful.
7659 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
7661         * pthread_attr_setschedparam.c: Don't test priority against limits
7662         here.  Set ATTR_FLAG_SCHED_SET flag.
7663         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
7664         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
7665         from parent thread to child.  If attribute is used and scheduling
7666         parameters are not inherited, copy parameters from attribute or
7667         compute them.  Check priority value.
7668         * pthread_getschedparam.c: If the parameters aren't known yet get
7669         them from the kernel.
7670         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
7671         ATTR_FLAG_POLICY_SET flag for thread.
7672         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
7673         and ATTR_FLAG_POLICY_SET.
7675         * sysdeps/pthread/createthread.c: Use tgkill if possible.
7677         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
7678         fail if stack address hasn't been set.  Just return 0.
7680 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
7682         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
7683         libpthread for the files in this list.
7684         (CFLAGS-tst-unload): Removed.
7685         * tst-unload.c (do_test): Don't use complete path for
7686         LIBPHREAD_SO.
7688         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
7689         tst-_res1mod2.
7691 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
7693         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7694         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
7695         operation per round is needed.
7696         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
7697         (__lll_mutex_lock_wait): Likewise.
7699 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
7701         * tst-cancel9.c (cleanup): Don't print to stderr.
7703 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7705         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
7707 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
7709         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
7710         (__syscall_error_handler2): Call CDISABLE.
7711         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
7712         (__syscall_error_handler2): Call CDISABLE.
7714         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7715         Release lock before the loop, don't reacquire it.
7717         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
7719 2004-02-19  Andreas Schwab  <schwab@suse.de>
7721         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7722         Fix last change.
7724 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
7726         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
7727         (pthread_barrier_wait): After wakeup, release lock only when the
7728         last thread stopped using the barrier object.
7729         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
7730         (pthread_barrier_wait): Likewise.
7731         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7732         Likewise.
7733         * Makefile (tests): Add tst-barrier4.
7734         * tst-barrier4.c: New file.
7736         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7737         (__pthread_cond_timedwait): Perform timeout test while holding
7738         internal lock to prevent wakeup race.
7739         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
7740         * sysdeps/pthread/pthread_cond_timedwait.c
7741         (__pthread_cond_timedwait): Likewise.
7742         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7743         (__pthread_cond_timedwait): Likewise.
7745 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
7747         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
7748         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
7749         * Makefile (tests): Add tst-rwlock13.
7750         * tst-rwlock13.c: New test.
7752 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
7754         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7755         (__condvar_tw_cleanup): Little optimization.
7756         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
7758 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
7760         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
7761         libpthread as "lib" parameter to SHLIB_COMPAT.
7762         (__novmx_siglongjmp): Fix typo in function name.
7763         (__novmx_longjmp): Fix typo in function name.
7765 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
7767         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
7768         __builtin_expect.
7770         * sysdeps/generic/pt-longjmp.c: Moved to...
7771         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
7773 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
7775         * Makefile (libpthread-routines): Add pt-cleanup.
7776         * pt-longjmp.c: Removed.
7777         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
7778         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
7779         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
7780         Version longjmp, siglongjmp for GLIBC_2.3.4.
7781         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
7783 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
7785         * sysdeps/pthread/pthread_cond_timedwait.c
7786         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
7787         Reuse code.  Add __builtin_expects.
7789         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7790         (__pthread_cond_timedwait): Get internal lock in case timeout has
7791         passed before the futex syscall.
7792         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7794 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
7796         * allocatestack.c: Pretty printing.
7798         * sysdeps/pthread/createthread.c (create_thread): Don't add
7799         CLONE_DETACHED bit if it is not necessary.
7801 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
7803         * pthread_getattr_np.c: Include ldsodefs.h.
7805 2004-01-16  Richard Henderson  <rth@redhat.com>
7807         * allocatestack.c: Don't declare __libc_stack_end.
7808         * init.c (__pthread_initialize_minimal_internal): Likewise.
7809         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
7811 2004-01-15  Richard Henderson  <rth@redhat.com>
7813         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
7814         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
7815         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
7816         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
7817         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
7818         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
7819         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
7820         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
7822 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
7824         * init.c (pthread_functions): Make array const.
7826 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
7828         * allocatestack.c (__make_stacks_executable): Change interface.
7829         Check parameters.  Pass parameter on to libc counterpart.
7830         * pthreadP.h: Change declaration.
7832 2004-01-13  Richard Henderson  <rth@redhat.com>
7834         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
7835         prototype form.
7836         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
7837         Likewise.
7839         * sysdeps/alpha/Makefile: New file.
7840         * sysdeps/alpha/tcb-offsets.sym: New file.
7841         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
7842         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
7844         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
7845         on powerpc version.
7847 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
7849         * Makefile (tests): Add tst-backtrace1.
7850         * tst-backtrace1.c: New test.
7852 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
7854         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
7855         register as second parameter to the REGISTER macro.
7856         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
7857         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
7858         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
7859         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
7860         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
7861         of thread register as second parameter to REGISTER macro in 64 case.
7863 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
7865         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
7866         (CFLAGS-getpid.o): Defined.
7867         (CFLAGS-getpid.os): Defined.
7869 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
7871         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
7872         returned for main thread does not overlap with any other VMA.
7873         Patch by Jakub Jelinek.
7875 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
7877         * tst-raise1.c: Include stdio.h.
7879 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
7881         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
7882         setting with __ASSUME_TGKILL || defined __NR_tgkill.
7883         If pid is 0, set it to selftid.
7884         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
7885         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
7886         != 0, return self->tid without doing a syscall.
7887         * descr.h (struct pthread): Move pid field after tid.
7889         * Makefile (tests): Add tst-raise1.
7890         * tst-raise1.c: New file.
7892 2003-12-23  Roland McGrath  <roland@redhat.com>
7894         * tst-oddstacklimit.c: New file.
7895         * Makefile (tests): Add it.
7896         (tst-oddstacklimit-ENV): New variable.
7898         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
7899         value up to page size for __default_stacksize.
7901 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
7903         * Makefile (tests): Add tst-eintr5.
7904         * tst-eintr5.c: New file.
7906         * eintr.c (eintr_source): Prevent sending signal to self.
7908         * tst-eintr2.c (tf1): Improve error message.
7910 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
7912         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
7913         * sysdeps/unix/sysv/linux/getpid.c: New file.
7914         * pthread_cancel.c: Add comment explaining use of PID field.
7915         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
7916         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
7917         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
7918         temporarily to signal the field must not be relied on and updated
7919         by getpid().
7920         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
7921         temporarily negative.
7922         * sysdeps/unix/sysv/linux/raise.c: Likewise.
7924 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
7926         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
7927         (eintr_source): If ARG != NULL, use pthread_kill.
7928         * tst-eintr1.c: Adjust for this change.
7929         * tst-eintr2.c: Likewise.
7930         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
7931         * tst-eintr3.c: New file.
7932         * tst-eintr4.c: New file.
7934 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
7936         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
7937         if CANCELSTATE_BITMASK is set.
7938         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
7939         Likewise.
7941         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
7942         (tests-reverse): Add tst-cancel23.
7943         * tst-cancel22.c: New test.
7944         * tst-cancel23.c: New test.
7946 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
7948         * tst-eintr1.c: Better error messages.
7950         * Makefile (tests): Add tst-eintr2.
7951         * tst-eintr2.c: New file.
7953 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
7955         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
7956         (CFLAGS-tst-cancelx21.c): Set.
7957         * tst-cancel21.c: New test.
7958         * tst-cancelx21.c: New test.
7960         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
7961         comparison operand.
7962         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
7963         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
7964         * pt-longjmp.c: Include jmpbuf-unwind.h.
7965         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
7966         _JMPBUF_UNWINDS.  Adjust compared pointers.
7967         * init.c (__pthread_initialize_minimal_internal): Initialize
7968         pd->stackblock_size.
7969         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
7970         * sysdeps/alpha/jmpbuf-unwind.h: New file.
7971         * sysdeps/i386/jmpbuf-unwind.h: New file.
7972         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
7973         * sysdeps/s390/jmpbuf-unwind.h: New file.
7974         * sysdeps/sh/jmpbuf-unwind.h: New file.
7975         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
7976         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
7977         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
7978         (_JMPBUF_CFA_UNWINDS): Remove.
7979         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
7981 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
7983         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
7984         (CFLAGS-tst-cancelx20.c): Set.
7985         * tst-cancel20.c: New test.
7986         * tst-cancelx20.c: New test.
7988 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
7990         * init.c (__pthread_initialize_minimal_internal): Don't treat
7991         architectures with separate register stack special here when
7992         computing default stack size.
7994 2003-12-17  Roland McGrath  <roland@redhat.com>
7996         * Makefile (tst-cancelx7-ARGS): New variable.
7997         Reportd by Greg Schafer <gschafer@zip.com.au>.
7999 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
8001         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
8002         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
8003         (tst-stack3-ENV): Set.
8004         ($(objpfx)tst-stack3-mem): New.
8005         * tst-stack3.c: New test.
8007 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
8009         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
8010         Add unwind directives.  Drop unused .regstk directive.
8011         (_fini_EPILOG_BEGINS): Add unwind directives.
8013 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
8015         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
8016         Assume parameter is a pointer.
8017         (lll_futex_wake): Likewise.
8018         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
8019         Likewise.
8020         (lll_futex_wake): Likewise.
8021         Reported by Boris Hu.
8022         * sysdeps/unix/sysv/linux/unregister-atfork.c
8023         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
8025         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
8027 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
8029         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
8030         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
8031         __rtld_lock_initialize for ld.so lock.
8032         Patch in part by Adam Li <adam.li@intel.com>.
8034 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
8036         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
8037         in $(gnulib).  Also, remove stale comment.
8039 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
8041         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
8042         advantage of new syscall stub and optimize accordingly.
8044         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
8045         from SYS_futex, to match expectations of
8046         sysdep.h:DO_INLINE_SYSCALL.
8047         (lll_futex_clobbers): Remove.
8048         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
8049         (lll_futex_wake): Likewise.
8050         (lll_futex_requeue): Likewise.
8051         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
8052         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
8053         Jelinek).
8054         (__lll_mutex_lock): Likewise.
8055         (__lll_mutex_cond_lock): Likewise.
8056         (__lll_mutex_timed_lock): Likewise.
8057         (__lll_mutex_unlock): Likewise.
8058         (__lll_mutex_unlock_force): Likewise.
8060         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
8061         comes before the include of <sysdep.h>.
8062         (THREAD_SELF_SYSINFO): New macro.
8063         (THREAD_SYSINFO): Likewise.
8064         (INIT_SYSINFO): New macro.
8065         (TLS_INIT_TP): Call INIT_SYSINFO.
8067         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
8069         * sysdeps/pthread/createthread.c (create_thread): Use
8070         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
8071         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
8072         THREAD_SELF_SYSINFO instead of open code.
8073         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
8074         (THREAD_SYSINFO): Likewise.
8076         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
8078         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
8080 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
8082         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
8083         instead of .init.  Patch by David Mosberger.
8085 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
8087         * sysdeps/pthread/configure.in: Remove broken declaration in C
8088         cleanup handling check.
8090 2003-11-30  Andreas Jaeger  <aj@suse.de>
8092         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
8093         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
8094         Likewise.
8096 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
8098         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
8099         * pthread_attr_destroy.c: Include shlib-compat.h.
8100         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
8101         is set in iattr->flags.
8102         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
8104 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
8106         * Makefile (distribute): Add tst-cleanup4aux.c.
8108         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
8109         include.
8111 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
8113         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
8114         pthread_cond_signal.
8116         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
8117         store mutex address if the current value is ~0l.
8118         * sysdeps/pthread/pthread_cond_timedwait.c
8119         (__pthread_cond_timedwait): Likewise.
8120         * sysdeps/pthread/pthread_cond_broadcast.c
8121         (__pthread_cond_broadcast): Don't use requeue for pshared
8122         condvars.
8124         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
8125         (__pthread_cond_wait): Don't store mutex address if the current
8126         value is ~0l.
8127         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
8128         (__pthread_cond_timedwait): Likewise.
8129         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
8130         (__pthread_cond_broadcast): Don't use requeue for pshared
8131         condvars.
8133         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
8134         element with ~0l for pshared condvars, with NULL otherwise.
8136         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8137         (__pthread_cond_wait): Don't store mutex address if the current
8138         value is ~0l.
8139         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8140         (__pthread_cond_timedwait): Likewise.
8141         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
8142         (__pthread_cond_broadcast): Don't use requeue for pshared
8143         condvars.
8145         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
8146         * tst-cond12.c: New file.
8147         * tst-cond13.c: New file.
8149 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
8151         * sysdeps/pthread/configure.in: Make missing forced unwind support
8152         fatal.
8154 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
8156         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
8158 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
8160         * Makefile: Add magic to clean up correctly.
8162 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
8164         * unwind.c (FRAME_LEFT): Define.
8165         (unwind_stop): Handle old style cleanups here.
8166         (__pthread_unwind): Handle old style cleanups only if
8167         !HAVE_FORCED_UNWIND.
8168         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
8169         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
8170         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
8171         ($(objpfx)tst-cleanupx4): Likewise.
8172         * tst-cleanup4.c: New test.
8173         * tst-cleanup4aux.c: New.
8174         * tst-cleanupx4.c: New test.
8176 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
8178         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
8179         lll_mutex_*lock macros to skip atomic operations on some archs.
8181 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
8183         * sysdeps/pthread/tst-timer.c (main): Initialize
8184         sigev2.sigev_value as well.
8186 2003-10-15  Roland McGrath  <roland@redhat.com>
8188         * sysdeps/pthread/configure.in: Barf if visibility attribute support
8189         is missing.
8190         * sysdeps/pthread/configure: Regenerated.
8192 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
8194         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
8195         locking macros.  No distinction between normal and mutex locking
8196         anymore.
8197         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
8198         Merge bits from lowlevelmutex.S we still need.
8199         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
8200         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
8201         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
8202         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
8203         new mutex implementation.
8204         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
8205         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
8206         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8207         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
8208         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
8209         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8210         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8211         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
8212         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8213         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
8214         symbol for entry point to avoid cancellation.
8216 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
8218         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
8219         changes.
8220         (SAVE_OLDTYPE_0): Fix a typo.
8222 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
8224         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
8225         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
8227 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
8229         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
8230         correct offset.
8232 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
8234         * Makefile (tests): Add tst-cancel19.
8235         * tst-cancel19.c: New test.
8237 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
8239         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
8240         restoring of the old cancellation type.
8242 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
8244         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
8246 2003-09-27  Wolfram Gloger  <wg@malloc.de>
8248         * sysdeps/pthread/malloc-machine.h: New file
8250 2003-09-24  Roland McGrath  <roland@redhat.com>
8252         * allocatestack.c (__make_stacks_executable): Don't ignore return
8253         value from _dl_make_stack_executable.
8255 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
8257         * allocatestack.c (__make_stacks_executable): Also change
8258         permission of the currently unused stacks.
8260         * allocatestack.c (change_stack_perm): Split out from
8261         __make_stacks_executable.
8262         (allocate_stack): If the required permission changed between the time
8263         we started preparing the stack and queueing it, change the permission.
8264         (__make_stacks_executable): Call change_stack_perm.
8266         * Makefile: Build tst-execstack-mod locally.
8267         * tst-execstack-mod.c: New file.
8269 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
8271         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
8273 2003-09-23  Roland McGrath  <roland@redhat.com>
8275         * tst-execstack.c: New file.
8276         * Makefile (tests): Add it.
8277         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
8278         (LDFLAGS-tst-execstack): New variable.
8280         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
8281         whether to use PROT_EXEC for stack mmap.
8282         (__make_stacks_executable): New function.
8283         * pthreadP.h: Declare it.
8284         * init.c (__pthread_initialize_minimal_internal): Set
8285         GL(dl_make_stack_executable_hook) to that.
8287 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
8289         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
8290         recommendation from AMD re avoidance of lock prefix.
8292 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
8294         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
8295         lll_futex_timed_wait instead of lll_futex_wait.
8296         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
8297         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
8298         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
8299         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
8300         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
8301         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
8302         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
8303         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
8304         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
8305         Completely revamp the locking macros.  No distinction between
8306         normal and mutex locking anymore.
8307         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
8308         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
8309         __lll_lock_timedwait): Fix prototypes.
8310         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
8311         __lll_lock_timedwait): Likewise.
8312         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
8313         macros, add __builtin_expect.
8314         (lll_mutex_timedlock): Likewise.  Fix return value.
8315         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
8316         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
8317         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
8318         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
8319         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
8320         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
8321         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
8322         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
8324 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
8326         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8327         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
8328         operation if possible.
8330         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
8331         like jumping over the lock prefix.
8333 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
8335         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
8336         locking macros.  No distinction between normal and mutex locking
8337         anymore.
8338         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8339         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
8340         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
8341         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
8342         locking.  Merge bits from lowlevelmutex.S we still need.
8343         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
8344         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
8345         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
8346         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
8347         * Makefile (routines): Remove libc-lowlevelmutex.
8348         (libpthread-rountines): Remove lowlevelmutex.
8349         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
8350         for new mutex implementation.
8351         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8352         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8353         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8354         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8355         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8356         Likewise.
8357         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8358         Likewise.
8359         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8360         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8361         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
8362         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
8363         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8364         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8365         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8366         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
8367         Likewise.
8368         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
8369         Likewise.
8370         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
8371         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8372         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8373         Don't use requeue.
8374         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8375         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
8377 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
8379         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
8380         in parameters of asm with output parameters.
8382         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
8383         type of DECR parameter to int.
8384         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
8386 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
8388         * tst-attr3.c (tf, do_test): Print stack start/end/size and
8389         guardsize for each thread.
8391 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
8393         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
8394         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
8395         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
8397         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
8398         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
8399         NULL.
8400         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
8401         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
8402         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
8403         (pthread_getaffinity_np): Add hidden_def.
8405         * Makefile (tests): Add tst-attr3.
8406         * tst-attr3.c: New test.
8408         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
8410 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
8412         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
8413         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
8415 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
8417         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
8418         * tst-align.c: Include tst-stack-align.h.
8419         (tf, do_test): Use TEST_STACK_ALIGN macro.
8421 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
8423         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
8424         variable.
8426 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
8428         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
8429         stack-related values for the initial thread.
8431 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
8433         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
8435 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
8437         * pthread_mutex_lock.c: Minor code rearrangements.
8439 2003-09-05  Roland McGrath  <roland@redhat.com>
8441         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
8442         Instead, include ../nptl_db/db_info.c to do its magic.
8443         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
8444         (__pthread_pthread_key_2ndlevel_size): Likewise.
8445         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
8446         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
8447         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
8448         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
8449         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
8450         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
8451         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
8452         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
8453         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
8454         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
8455         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
8456         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
8457         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
8458         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
8459         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
8460         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
8461         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
8463 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
8465         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
8466         of pthread_t to be compatible with LT.
8467         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
8468         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8469         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8470         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8471         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
8472         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8473         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
8475 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
8477         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
8479 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
8481         * unwind-forcedunwind.c: Move to...
8482         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
8483         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
8484         * sysdeps/pthread/jmpbuf-unwind.h: New file.
8485         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
8486         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
8487         * unwind.c: Include jmpbuf-unwind.h.
8488         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
8490 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
8492         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
8493         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
8494         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
8495         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
8496         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
8497         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
8498         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
8499         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
8500         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
8501         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
8502         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
8503         function.
8504         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
8505         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
8506         * Makefile (tests): Add tst-stack2.
8507         * tst-stack2.c: New test.
8508         * tst-stack1.c: Include limits.h and sys/param.h.
8509         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
8511         * pthread_condattr_setpshared.c: Include errno.h.
8512         (pthread_condattr_setpshared): Return EINVAL if pshared
8513         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
8515         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
8516         defined symbol for entry point to avoid cancellation.
8517         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
8518         Likewise.
8519         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
8520         Likewise.
8521         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
8522         Likewise.
8523         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
8524         Likewise.
8525         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
8526         Likewise.
8527         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
8528         __close_nocancel, __read_nocancel, __write_nocancel,
8529         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
8530         libpthread.so or librt.so, define to corresponding function
8531         without _nocancel suffix.
8532         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
8533         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
8534         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
8536         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
8538 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
8540         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
8541         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
8543         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
8544         in subsections has a symbol associated with it.
8546         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
8547         defined symbol for entry point to avoid cancellation.
8548         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
8550 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
8552         * Makefile (tests): Add tst-tls5.
8553         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
8554         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
8555         ($(objpfx)tst-tls5): New.
8556         ($(objpfx)tst-tls6.out): Likewise.
8557         (tests): Depend on $(objpfx)tst-tls6.out.
8558         * tst-tls3.c: Include stdint.h and pthreaddef.h.
8559         (do_test): Check pthread_self () return value alignment.
8560         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
8561         (tf): Check pthread_self () return value alignment.
8562         * tst-tls5.c: New test.
8563         * tst-tls5.h: New.
8564         * tst-tls5mod.c: New.
8565         * tst-tls5moda.c: New.
8566         * tst-tls5modb.c: New.
8567         * tst-tls5modc.c: New.
8568         * tst-tls5modd.c: New.
8569         * tst-tls5mode.c: New.
8570         * tst-tls5modf.c: New.
8571         * tst-tls6.sh: New test.
8573         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
8574         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
8575         * init.c (pthread_functions): Initialize them.
8576         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
8577         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
8578         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
8579         pthread_cond_timedwait@@GLIBC_2.3.2.
8581 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
8583         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
8584         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
8585         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
8586         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
8587         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
8588         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
8590         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
8592         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
8593         _POSIX_THREAD_PRIORITY_SCHEDULING.
8594         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
8596 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
8598         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
8599         nested function, use static inline function from libio.h.
8600         Code by Richard Henderson.
8602         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
8603         weak.
8605 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
8607         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
8608         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
8609         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
8610         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
8611         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
8612         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
8613         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
8614         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
8615         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
8616         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
8617         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
8618         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
8619         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
8620         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
8621         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
8622         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
8623         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
8624         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
8625         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
8626         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
8627         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
8628         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
8629         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
8630         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
8631         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
8632         * sysdeps/sparc/tls.h: New file.
8633         * sysdeps/sparc/tcb-offsets.sym: New file.
8634         * sysdeps/sparc/Makefile: New file.
8635         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
8636         * init.c [__sparc__] (__NR_set_tid_address): Define.
8638 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
8640         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
8641         _IO_release_lock): Define.
8643 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
8645         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
8646         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
8648 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
8650         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
8651         (__pthread_cleanup_class): Add missing return types of member
8652         functions.
8654 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
8656         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8657         (lll_mutex_unlock_force): Add memory barrier between store and futex
8658         syscall.
8660 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
8662         * tst-cancel4.c (do_test): Also unlink tempfname and remove
8663         tempmsg in first loop.
8665 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
8667         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8668         _POSIX_THREAD_PRIORITY_SCHEDULING.
8669         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8671 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
8673         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
8674         (__rtld_lock_default_lock_recursive,
8675         __rtld_lock_default_unlock_recursive): Define.
8676         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
8677         __rtld_lock_unlock_recursive): Define using
8678         GL(_dl_rtld_*lock_recursive).
8679         * init.c (__pthread_initialize_minimal_internal): Initialize
8680         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
8681         Lock GL(_dl_load_lock) the same number of times as
8682         GL(_dl_load_lock) using non-mt implementation was nested.
8684         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
8685         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
8687 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
8689         * tst-cancel17.c (do_test): Make len2 maximum of page size and
8690         PIPE_BUF.
8692 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
8694         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
8696 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
8698         * sysdeps/pthread/createthread.c (do_clone): Move error handling
8699         to first syscall error check.  Move syscall error check for tkill
8700         into __ASSUME_CLONE_STOPPED #ifdef.
8702 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
8704         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
8705         is not defined, do explicit synchronization.
8706         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
8707         is not defined also unlock pd->lock for non-debugging case in case
8708         it is necessary.
8709         * pthread_create.c (start_thread): Always get and release pd->lock
8710         if __ASSUME_CLONE_STOPPED is not defined.
8711         (start_thread_debug): Removed.  Adjust users.
8712         * allocatestack.c (allocate_stack): Always initialize lock if
8713         __ASSUME_CLONE_STOPPED is not defined.
8714         * Makefile (tests): Add tst-sched1.
8715         * tst-sched1.c: New file.
8717         * sysdeps/pthread/createthread.c (do_clone): Only use
8718         sched_setschduler and pass correct parameters.
8720 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
8722         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
8723         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
8724         PTHREAD_STACK_MIN in comments.
8726 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
8728         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8729         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
8730         argument.
8731         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
8732         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
8733         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
8734         (__pthread_cleanup_upto): Fix prototype.
8735         (_longjmp_unwind): Adjust caller.
8736         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
8737         Change second argument to const struct pointer.
8738         * tst-sem8.c (main): Remove unused s2 and s3 variables.
8739         * tst-sem9.c (main): Likewise.
8740         * unwind.c: Include string.h for strlen prototype.
8742 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
8744         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8745         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
8746         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
8747         Define HAVE_CMOV.
8748         Patch by Nicholas Miell <nmiell@attbi.com>.
8750 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
8752         * init.c (__pthread_initialize_minimal_internal): Initialize
8753         GL(dl_init_static_tls).
8754         * pthreadP.h (__pthread_init_static_tls): New prototype.
8755         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
8756         New functions.
8757         * Makefile (tests): Add tst-tls4.
8758         (modules-names): Add tst-tls4moda and tst-tls4modb.
8759         ($(objpfx)tst-tls4): Link against libdl and libpthread.
8760         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
8761         tst-tls4modb.so.
8762         * tst-tls4.c: New file.
8763         * tst-tls4moda.c: New file.
8764         * tst-tls4modb.c: New file.
8766 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
8768         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
8769         before __timer_dealloc.
8770         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
8771         Don't call list_unlink.
8773 2003-07-29  Roland McGrath  <roland@redhat.com>
8775         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
8777 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
8779         * tst-cancel17.c (do_test): Check if aio_cancel failed.
8780         Don't reuse struct aiocb A if it failed.
8781         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
8782         not just one byte, as that does not block.
8784 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
8786         * sysdeps/pthread/unwind-resume.c: New file.
8787         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
8788         unwind-resume in csu subdir.
8789         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
8790         exceptions.
8791         (librt-sysdep_routines, librt-shared-only-routines): Add
8792         rt-unwind-resume.
8793         * sysdeps/pthread/rt-unwind-resume.c: New file.
8794         * unwind-forcedunwind.c: New file.
8795         * Makefile (libpthread-routines): Add unwind-forcedunwind.
8796         (libpthread-shared-only-routines): Likewise.
8797         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
8798         * pthreadP.h (pthread_cancel_init): New prototype.
8799         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
8801         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
8802         attr argument const struct pthread_attr *.
8804         * res.c (__res_state): Return __resp.
8805         * descr.h: Include resolv.h.
8806         (struct pthread): Add res field.
8807         * pthread_create.c: Include resolv.h.
8808         (start_thread): Initialize __resp.
8809         * Makefile (tests): Add tst-_res1.
8810         (module-names): Add tst-_res1mod1, tst-_res1mod2.
8811         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
8812         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
8813         libpthread.
8814         * tst-_res1.c: New file.
8815         * tst-_res1mod1.c: New file.
8816         * tst-_res1mod2.c: New file.
8818 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
8820         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
8822         * Makefile: Define various *-no-z-defs variables for test DSOs
8823         which has undefined symbols.
8825 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
8827         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
8828         Retry if the stwcx fails to store once_control.
8830 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
8832         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
8833         pthread_attr_setaffinity.
8834         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
8835         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
8836         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
8837         * pthread_attr_destroy.c: Free cpuset element if allocated.
8838         * pthread_create.c: Pass iattr as additional parameter to
8839         create_thread.
8840         * sysdeps/pthread/createthread.c: If attribute is provided and
8841         a new thread is created with affinity set or scheduling parameters,
8842         start thread with CLONE_STOPPED.
8843         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
8844         pthread_attr_setaffinity.
8845         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
8846         cpuset element.
8848 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
8850         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
8852 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
8854         * sysdeps/pthread/configure.in: Require CFI directives also for
8855         ppc and s390.
8857 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
8859         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
8860         Add cfi directives.
8862 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
8864         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
8865         CLEANUP_JMP_BUF.
8866         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
8867         registers as variables.  Call __pthread_mutex_unlock_usercnt.
8868         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8869         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
8870         not self pointer in __writer.  Compare with TID to determine
8871         deadlocks.
8872         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8873         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
8874         Likewise.
8875         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
8876         Likewise.
8877         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
8878         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8879         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
8880         macros also when compiling librt.
8882 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
8884         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
8885         -fasynchronous-unwind-tables.
8886         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
8887         (PSEUDO): Add cfi directives.
8888         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
8889         Likewise.
8890         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
8891         Likewise.
8893 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
8895         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
8896         __pthread_unregister_cancel): Add prototypes and hidden_proto.
8897         * unwind.c (__pthread_unwind_next): Add hidden_def.
8898         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
8899         Likewise.
8900         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
8901         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
8902         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
8903         Likewise.
8904         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
8905         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
8906         Likewise.
8907         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
8908         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
8909         __pthread_unregister_cancel and __pthread_unwind_next.
8911 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
8913         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
8914         different symbol for the cancellation syscall wrapper and
8915         non-cancellation syscall wrapper.
8916         (PSEUDO_END): Define.
8918 2003-07-05  Richard Henderson  <rth@redhat.com>
8920         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
8921         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
8922         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8923         return actual return value from the syscall, not 0.
8925 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
8927         * descr.h (struct pthread): Add pid field.
8928         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
8929         (__reclaim_stacks): Likewise.
8930         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
8931         also check for PID of the signal source.
8932         (__pthread_initialize_minimal_internal): Also initialize pid field
8933         of initial thread's descriptor.
8934         * pthread_cancel.c: Use tgkill instead of tkill if possible.
8935         * sysdeps/unix/sysv/linux/fork.c: Likewise.
8936         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
8937         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8938         * sysdeps/unix/sysv/linux/raise.c: Likewise.
8940 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
8942         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
8943         Fix use of parameter.
8944         (__libc_cleanup_pop): Likewise.
8946 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
8948         * init.c (sigcancel_handler): Change parameters to match handler
8949         for SA_SIGACTION.  Check signal number and code to recognize
8950         invalid invocations.
8952 2003-07-03  Roland McGrath  <roland@redhat.com>
8954         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
8955         Apply sizeof (struct pthread) bias to r13 value.
8957 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
8959         * sysdeps/pthread/configure.in: Require CFI directives.
8961         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
8962         definition.
8963         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
8964         libpthread compilation.
8965         * unwind.c (__pthread_unwind): Add hidden_def.
8966         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
8968 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
8970         * libc-cancellation.c (__libc_cleanup_routine): Define.
8971         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
8972         (__pthread_cleanup_pop): Define.
8974 2003-07-01  Richard Henderson  <rth@redhat.com>
8976         * sysdeps/alpha/elf/pt-initfini.c: New file.
8977         * sysdeps/alpha/pthread_spin_lock.S: New file.
8978         * sysdeps/alpha/pthread_spin_trylock.S: New file.
8979         * sysdeps/alpha/pthreaddef.h: New file.
8980         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
8981         * sysdeps/alpha/tls.h: New file.
8982         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
8983         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
8984         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
8985         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
8986         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
8987         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
8988         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
8989         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
8990         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
8991         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
8993 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
8995         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
8996         cleanup support and unwind info.
8998 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
9000         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
9001         Use correct cleanup handler registration.  Add unwind info.
9002         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
9003         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
9004         * tst-once3.c: Add cleanup handler and check it is called.
9005         * tst-once4.c: Likewise.
9006         * tst-oncex3.c: New file.
9007         * tst-oncex4.c: New file.
9008         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
9010 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
9012         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
9014 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
9016         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
9017         (tf_msgsnd): Likewise.
9019         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
9020         premature returns a bit more.
9022 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
9024         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
9025         definition to the front.
9027         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
9028         the cleanup functions to make the names unique.  Fix dwarf opcode
9029         un unwind table.
9030         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
9031         functions to make the names unique.  Fix CFA offset for two blocks.
9033 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
9035         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
9036         missing closing braces.
9037         Patch by Christophe Saout <christophe@saout.de>.
9039 2003-06-24  Roland McGrath  <roland@redhat.com>
9041         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
9043 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
9045         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
9046         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
9048         * pthreadP.h: Declare __find_thread_by_id.
9049         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
9050         * pthread_clock_gettime.c: Allow using other thread's clock.
9051         * pthread_clock_settime.c: Likewise.
9052         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
9053         * Makefile: Add rules to build and run tst-clock2.
9054         * tst-clock2.c: New file.
9056 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
9058         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
9059         to use exception-based cleanup handler.
9060         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9062         * tst-cond8.c (ch): Announce that we are done.
9064         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
9066         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
9067         Also test aio_suspend with timeout value.
9069 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
9071         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
9072         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
9073         attribute_hidden.
9075         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
9076         (__pthread_mutex_lock_internal): Likewise.
9077         (__pthread_mutex_unlock_internal): Likewise.
9078         (__pthread_mutex_unlock_usercnt): Declare.
9079         * pthread_mutex_destroy.c: Always fail if used in any way.
9080         * pthread_mutex_init.c: Update comment.
9081         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
9082         * pthread_mutex_timedlock.c: Adjust __nusers.
9083         * pthread_mutex_trylock.c: Adjust __nusers.
9084         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
9085         and public interfaces are wrapper with pass additional parameter.
9086         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
9087         parameter zero.
9088         * tst-mutex8.c: New file.
9089         * Makefile (tests): Add tst-mutex8.
9090         * sysdeps/pthread/pthread_cond_timedwait.c: Call
9091         __pthread_mutex_unlock_usercnt.
9092         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
9093         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9094         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9095         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9096         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9097         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
9098         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
9099         Add __nusers.
9100         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9101         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9102         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9103         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
9104         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9106         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
9107         * pthread_mutex_timedlock.c: Likewise.
9108         * pthread_mutex_trylock.c: Adjust __nusers.
9109         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
9110         * tst-mutex9.c: New file.
9111         * Makefile (tests): Add tst-mutex9.
9112         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
9113         * sysdeps/ia64/tls.h: Likewise.
9114         * sysdeps/powerpc/tls.h: Likewise.
9115         * sysdeps/s390/tls.h: Likewise.
9116         * sysdeps/sh/tls.h: Likewise.
9117         * sysdeps/x86_64/tls.h: Likewise.
9118         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
9119         Change type of __owner.
9120         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9121         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9122         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9123         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
9124         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9126 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
9128         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
9129         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
9131         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
9132         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
9133         instead of nr to lll_futex_wake.  Only set errno and return -1
9134         if err < 0.
9136         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
9137         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
9138         return actual return value from the syscall, not 0.
9140 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
9142         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
9143         find a random value.
9144         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
9145         errno==EIDRM.
9147         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
9148         compat_timer_settime.
9149         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
9150         compat_timer_gettime.
9151         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
9152         compat_timer_getoverrun.
9153         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
9154         compat_timer_delete.
9156         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
9157         error-checking mutex detect busy mutexes.
9159 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
9161         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
9162         Add ax to clobber list.
9163         (lll_mutex_cond_lock): Likewise.
9164         (lll_mutex_unlock): Likewise.
9165         (lll_lock): Likewise.
9166         (lll_unlock): Likewise.
9168         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
9169         * tst-cancel18.c: New file.
9170         * tst-cancelx18.c: New file.
9172         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
9173         and tcdrain.
9175         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
9176         * tst-cancel17.c: New file.
9177         * tst-cancelx17.c: New file.
9179         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
9180         * sysdeps/unix/sysv/linux/sigwait.c: New file.
9181         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
9183         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
9185 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
9187         * sysdeps/pthread/createthread.c (create_thread): Set
9188         header.multiple_threads unconditionally.
9189         * allocatestack.c (allocate_stack): Likewise.
9190         * descr.h (struct pthread): Add header.multiple_threads
9191         unconditionally.
9192         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
9193         Define for librt.  #error if neither libpthread, libc nor librt.
9194         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
9195         Likewise.
9196         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
9197         CDISABLE): Likewise.
9198         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
9199         CDISABLE): Likewise.
9200         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
9201         CDISABLE): Likewise.
9202         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
9203         CDISABLE): Likewise.  Access header.multiple_threads outside of
9204         libc and libpthread.
9205         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
9206         Likewise.
9207         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
9208         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
9210 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
9212         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
9213         Also test early cancellation before the thread reaches the cancellation
9214         point.
9216         * Makefile: Compile forward.c with exceptions.
9218         * sysdeps/unix/sysv/linux/sleep.c: New file.
9220 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
9222         * Makefile: Add CFLAGS definition to compile function wrappers
9223         duplicated from libc with exceptions.
9224         * tst-cancel4.c: Also check cancellation handlers.
9226         * Makefile: Add rules to build and run tst-cancel16 and
9227         tst-cancelx16.  Add missing CFLAGS definitions.
9228         * tst-cancel16.c: New file.
9229         * tst-cancelx16.c: New file.
9231 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
9233         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9234         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
9235         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
9236         (DL_SYSINFO_IMPLEMENTATION): Likewise.
9238         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
9239         (LIBC_CANCEL_RESET): Likewise.
9240         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
9241         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
9242         librt-cancellation.
9243         (CFLAGS-libcrt-cancellation.c): Define.
9244         * sysdeps/pthread/librt-cancellation.c: New file.
9245         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
9246         macros also when compiling librt.
9247         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
9248         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
9249         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
9250         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
9251         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
9252         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
9253         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
9255         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
9256         compat_timer_create.
9258 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
9260         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
9262         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
9263         __register_atfork.
9264         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
9265         Add libc_hidden_def.
9267 2003-06-13  Roland McGrath  <roland@redhat.com>
9269         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
9270         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
9272 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
9274         * allocatestack.c (queue_stack): Always inline.
9275         * ptreadhP.h (__do_cancel): Likewise.
9277 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
9279         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
9280         a typo.
9282 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
9284         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9285         (__pthread_cond_signal): Remove incorrect second addition for
9286         cond_lock!=0.
9288 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
9290         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9291         (__pthread_cond_signal): Use correct futex pointer in
9292         __lll_mutex_lock_wait call.
9294         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9295         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
9297 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
9299         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
9300         cancelable.
9301         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
9302         Likewise.
9304         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
9305         hand-written CFI generation code.  Since ENTRY/END also initiated
9306         CFI frames this caused two CFI sets to be generated.
9308 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
9310         * cleanup_routine.c: New file.
9311         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
9312         * sysdeps/pthread/pthread.h: Add support for fully exception-based
9313         cleanup handling.
9314         * Makefile (libpthread-routines): Add cleanup_routine.
9315         Add more CFLAGS variables to compile with exceptions.  Add comments
9316         why which file needs unwind tables.
9317         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
9318         tests.
9319         * tst-cancelx1.c: New file.
9320         * tst-cancelx2.c: New file.
9321         * tst-cancelx3.c: New file.
9322         * tst-cancelx4.c: New file.
9323         * tst-cancelx5.c: New file.
9324         * tst-cancelx6.c: New file.
9325         * tst-cancelx7.c: New file.
9326         * tst-cancelx8.c: New file.
9327         * tst-cancelx9.c: New file.
9328         * tst-cancelx10.c: New file.
9329         * tst-cancelx11.c: New file.
9330         * tst-cancelx12.c: New file.
9331         * tst-cancelx13.c: New file.
9332         * tst-cancelx14.c: New file.
9333         * tst-cancelx15.c: New file.
9334         * tst-cleanupx0.c: New file.
9335         * tst-cleanupx0.expect: New file.
9336         * tst-cleanupx1.c: New file.
9337         * tst-cleanupx2.c: New file.
9338         * tst-cleanupx3.c: New file.
9340         * tst-cleanup0.c: Make standard compliant.
9341         * tst-cleanup1.c: Likewise.
9343         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
9344         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
9345         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
9346         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
9347         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
9348         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9349         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
9350         CLEANUP_JMP_BUF.
9351         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
9352         * tst-cancel12.c: New file.
9353         * tst-cancel13.c: New file.
9354         * tst-cancel14.c: New file.
9355         * tst-cancel15.c: New file.
9356         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
9357         and tst-cancel15.
9359         * tst-cancel1.c: Add some comments.
9361         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
9362         timeout correctly.
9364 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
9366         * Makefile (CFLAGS-pthread_cancel.c): Define.
9368 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
9370         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
9371         Change type of __writer element to int.
9372         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9373         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9374         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9375         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9376         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9377         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
9378         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
9379         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
9380         Compare with TID to determine deadlocks.
9381         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
9382         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9383         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
9384         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9385         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
9386         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9387         Likewise.
9388         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9389         Likewise.
9390         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9391         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
9392         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
9393         Likewise.
9394         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
9395         Likewise.
9396         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
9397         * Makefile (tests): Add tst-rwlock12.
9398         * tst-rwlock12.c: New file.
9400 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
9402         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
9403         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
9404         Remove bogus hidden_proto.
9405         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
9406         Likewise.
9407         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
9408         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
9409         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
9410         ___lll_mutex_timedlock): Likewise.
9412 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
9414         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9415         (__pthread_cond_signal): Add some code to eventually handle
9416         cond_lock!=0.
9418 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
9420         * Makefile (tests): Add tst-exec4.
9421         (tst-exec4-ARGS): Define.
9422         * tst-exec4.c: New file.
9424 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
9426         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
9427         Also fail if tv_nsec < 0.
9428         (__lll_timedwait_tid): Likewise.
9429         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
9430         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
9431         Likewise.
9432         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
9433         Likewise.
9434         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
9435         Likewise.
9436         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
9437         Likewise.
9438         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
9439         Likewise.
9440         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
9441         Likewise.
9443         * Makefile (tests): Add tst-sem8 and tst-sem9.
9444         * tst-sem8.c: New file.
9445         * tst-sem9.c: New file.
9446         * sem_open.c: Fix creation of in_use record if the file exists but
9447         no internal record.
9449         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
9450         definitions.
9452         * sysdeps/pthread/timer_create.c (timer_create): In case
9453         evp==NULL, assign timer ID to sival_ptr.
9455         * descr.h (struct pthread_unwind_buf): Change type of prev element to
9456         struct pthread_unwind_buf *.
9457         (struct pthread): Likewise for cleanup_jmp_buf element.
9459         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
9460         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
9461         * unwind.c (__pthread_unwind_next): Likewise.
9463 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
9465         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9466         (lll_futex_timed_wait): Use int for futex value parameter.
9467         (lll_futex_wake): Likewise.
9468         (lll_futex_requeue): Likewise.
9470         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
9471         Replace one memory operation with one register operation.
9473         * tst-join4.c (do_test): Fix error message.
9475         * tst-rwlock6.c (do_test): Use correct format specifier.
9477         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9478         (__lll_mutex_lock_wait): Replace one memory operation with one
9479         register operation.
9480         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
9481         (__lll_mutex_lock_wait): Likewise.
9483         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9484         (__lll_mutex_cond_lock): Add one to value parameter of
9485         __lll_lock_wait to reflect reality in the futex syscall.
9486         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
9487         (lll_mutex_cond_lock): Likewise.
9489 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
9491         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
9492         New function.
9493         (lll_mutex_cond_lock): Define.
9495 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
9497         * Makefile (tests): Add tst-signal6.
9498         * tst-signal6.c: New file.
9500         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
9501         (__lll_mutex_unlock_force): New function
9502         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
9504         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9505         (__lll_mutex_unlock_force): New function.
9506         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
9508         * tst-rwlock7.c (do_test): Use correct format specifier.
9510         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
9511         Find break parameter in correct asm argument.
9513 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
9515         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
9516         Remove out4.
9517         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
9518         error occured.
9519         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
9520         Add __mutex.
9521         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
9522         lll_futex_requeue, lll_mutex_unlock_force): Define.
9524 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
9526         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9527         (pthread_cond_t): Add __mutex.
9528         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
9529         lll_futex_requeue, lll_mutex_unlock_force): Define.
9531 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
9533         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
9534         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
9535         Add __mutex field.
9536         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
9537         Define.
9538         (lll_futex_wait, lll_futex_wake): Define.
9539         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
9540         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
9541         FUTEX_REQUEUE instead of FUTEX_WAIT.
9542         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
9543         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
9544         mutex which was used in condvar structure.  Call
9545         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
9546         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
9548         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
9549         include tcb-offsets.h.  Read wakeup value in locked region.
9550         Use the value of gbr register as THREAD_ID.
9551         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9552         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9553         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9555         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
9556         macros.
9558 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
9560         * sysdeps/pthread/pthread_cond_broadcast.c
9561         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
9563 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
9565         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
9566         typo in register name.
9567         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
9568         correctly.  Actually use requeue.  Little optimization.
9569         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
9570         mutex address early.  Handle cancellation state as 32-bit value.
9571         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9572         Remove unnecessary label.
9574 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
9576         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
9577         instead of FUTEX_WAIT.
9578         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
9579         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9580         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9581         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
9582         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
9583         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
9584         used in condvar structure.  Call __pthread_mutex_cond_lock instead
9585         of __pthread_mutex_lock_internal.
9586         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9587         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9588         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
9589         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
9590         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9591         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9592         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
9593         Add pthread_mutex_cond_lock.
9594         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
9595         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
9596         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
9597         lll_mutex_cond_lock.
9598         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
9599         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9600         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9601         Add __mutex field.
9602         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9603         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9605         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
9606         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
9608         * pthreadP.h: Declare __pthread_mutex_cond_lock.
9609         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
9610         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
9611         macro don't define aliases.
9613         * cancellation.c: Remove __pthread_enable_asynccancel_2.
9614         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
9615         * sysdeps/pthread/pthread_cond_timedwait.c: Use
9616         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
9617         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9618         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9619         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
9620         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9621         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9623 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
9625         * sem_open.c: Fix one endless loop.  Implement correct semantics
9626         wrt opening the same semaphore more then once.
9627         * sem_close.c: Adjust for sem_open change.
9628         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
9629         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
9630         * Makefile (tests): Add tst-sem7.
9631         * tst-sem7.c: New file.
9633 2003-05-16  Roland McGrath  <roland@redhat.com>
9635         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
9636         uninitialized variable braino.
9638 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
9640         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
9641         test for syscall availability.
9643         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
9644         __no_posix_timers to -1 if the syscalls don't exist.
9646         * pthread_join.c (pthread_join): Set tid field of the joined
9647         thread to -1.  This isn't necessary but helps to recognize some
9648         error conditions with almost no cost.
9650         * allocatestack.c (FREE_P): Also negative values indicate an
9651         unused stack.
9653         * unwind.c: Include <unistd.h>.
9655 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
9657         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
9659 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
9661         * Makefile (crti-objs, crtn-objs): New variables.
9662         (omit-deps, extra-objs): Add crtn.
9663         ($(objpfx)libpthread.so): Depend on both crti and crtn
9664         and links to them in multidir.
9665         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
9667 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
9669         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
9670         (lll_mutex_unlock): Use atomic_exchange_rel.
9672 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
9674         * cond-perf.c (cons): Add missing locking around setting of alldone.
9676 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
9678         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
9679         related macros.
9680         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9682 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
9684         * tst-sem6.c: New file.
9685         * Makefile (tests): Add tst-sem6.
9687         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
9688         Use atomic_exchange_rel instead of atomic_exchange.
9689         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
9690         Likewise.
9692         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
9693         code for lll_futex_wait and lll_futex_wake in static apps.  Use
9694         vsyscall is possible.
9696         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
9697         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
9698         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
9699         pthread_setaffinity_np.
9700         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
9701         and pthread_setaffinity_np.
9702         * Makefile (libpthread-routines): Add pthread_getaffinity and
9703         pthread_setaffinity.
9705         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
9706         use it in case mmap to allocate the stack fails.
9707         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
9708         ARCH_MAP_FLAGS here.
9709         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
9710         ARCH_RETRY_MMAP.
9712 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
9714         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
9715         handler implementation.  It is now lockless in fork().
9716         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
9717         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
9718         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
9719         declare the __fork_*_lists.
9720         (struct fork_handler): Include pointers to all three functions.
9721         Add next, refcntr and need_signal elements.
9722         (__fork_handlers): New declaration.
9723         (__register_atfork_malloc): Remove declaration.
9724         (HAVE_register_atfork_malloc): Remove definition.
9725         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
9726         __pthread_child_handler variable.
9727         (__libc_pthread_init): Use __register_atfork instead of explicitly
9728         adding to the list.
9729         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
9730         and lll_futex_wake.
9731         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9733         * unwind.c (unwind_cleanup): Print error message and then abort.  This
9734         function must never be reached.
9736         * cond-perf.c: New file.
9738 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
9740         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
9742 2003-05-04  Roland McGrath  <roland@redhat.com>
9744         * Makefile ($(objpfx)../libc.so): New target.
9746 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
9748         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9749         (pthread_condattr_t): Size is only an int, don't use long for
9750         alignment.
9751         (pthread_mutexattr_t): Likewise.
9752         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9753         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9754         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9756 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
9758         * sysdeps/i386/tls.h: Define THREAD_ID.
9759         * sysdeps/ia64/tls.h: Likewise.
9760         * sysdeps/powerpc/tls.h: Likewise.
9761         * sysdeps/s390/tls.h: Likewise.
9762         * sysdeps/sh/tls.h: Likewise.
9763         * sysdeps/x86_64/tls.h: Likewise.
9764         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
9765         record ownership.
9766         * pthread_mutex_timedlock.c: Likewise.
9767         * pthread_mutex_trylock.c: Likewise.
9768         * pthread_mutex_unlock.c: Likewise.
9769         * pthread_rwlock_trywrlock.c: Likewise.
9770         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
9771         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9772         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
9773         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9775         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
9776         flag.
9778 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
9780         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9781         (__SIZEOF_PTHREAD_COND_T): Define to 48.
9782         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
9783         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
9784         Make __align long long instead of long.
9785         (pthread_rwlock_t): Formatting.
9786         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
9787         (pthread_rwlock_t): Formatting.
9788         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9789         (pthread_cond_t): Make __align long long instead of long.
9790         (pthread_rwlock_t): Move __flags field to the same position as in
9791         linuxthreads.
9793 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
9795         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
9796         * tst-rwlock7.c (do_test): Likewise.
9798 2003-04-26  Roland McGrath  <roland@redhat.com>
9800         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
9802 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
9804         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
9805         sizeof (struct pthread).
9806         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
9807         1 struct pthread.
9808         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
9809         to 0.
9810         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
9811         struct pthread.
9812         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
9813         to 32-bit bytes.
9814         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
9815         tcbp.
9816         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
9817         unneccessarily.
9818         (NO_TLS_OFFSET): Define.
9819         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
9820         add TLS_TCB_SIZE unnecessarily.
9822 2003-04-22  Roland McGrath  <roland@redhat.com>
9824         * Makeconfig (shared-thread-library): Reverse link order to work
9825         around linker bug.
9827 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
9829         * semaphore.h: Fix typo in comment.
9831 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
9833         * sysdeps/pthread/sigfillset.c: New file.
9835         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
9836         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
9837         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
9838         * sysdeps/pthread/sigaction.c: Likewise.
9839         * sysdeps/pthread/sigprocmask.c: New file.
9840         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
9841         __SIGRTMIN+1.
9842         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9843         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
9844         in this case.
9846 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
9848         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9849         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
9851         * sysdeps/unix/sysv/linux/unregister-atfork.c
9852         (__unregister_atfork): Don't free memory not allocated dynamically.
9854         * semaphore.h: Remove __THROW marker from cancellation points.
9855         * nptl/sysdeps/pthread/pthread.h: Likewise.
9857 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
9859         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
9860         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
9861         __THROW.
9863 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
9865         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
9867 2003-04-15  Roland McGrath  <roland@redhat.com>
9869         * forward.c (__pthread_unwind): Tweak to avoid warning.
9871 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
9873         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
9875 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
9877         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
9878         overflow CFA advance instructions.
9879         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9881 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
9883         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
9884         * sysdeps/i386/pthread_spin_lock.c: Likewise.
9885         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
9886         defined.
9888         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
9889         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
9890         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
9891         DW_CFA_advance_loc for .Laddl-.Lsubl.
9893 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
9895         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
9896         position-independent unwind data for static libraries.
9897         Add missing unwind info.  Add comments.
9899         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
9900         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9901         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9902         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9904 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
9906         * Makefile: Make sure all cancellation points are compiled with
9907         exception and asynchronous unwind tables.
9909         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
9910         which mishandles loading of global object addresses in PIC.
9911         (THREAD_SETMEM_NC): Likewise.
9913 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
9915         * pthread.h: Define new data structure for cleanup buffer.  Declare
9916         new cleanup handler interfaces.
9917         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
9918         (struct pthread): Add cleanup_jmp_buf pointer.  Define
9919         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
9920         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
9921         it.  Declare old cleanup handler installation functions.
9922         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
9923         handling.
9924         * cleanup_defer.c: Likewise.
9925         * cleanup_compat.c: New file.  Old cleanup code.
9926         * cleanup_def_compat.c: New file.  Old cleanup code.
9927         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
9928         if own thread descriptor.
9929         * unwind.c: New file.
9930         * forward.c: Add __pthread_unwind.
9931         * init.c (pthread_functions): Add __pthread_unwind.
9932         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
9933         Add ptr___pthread_unwind.
9934         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
9935         and unwind function.
9936         * Makefile (libpthread-routines): Add cleanup_compat,
9937         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
9938         table generation if necessary.
9939         * version.c: Record whether unwind support is compiled in.
9940         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
9941         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
9942         handler interfaces.
9943         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
9944         complication to generate unwind information for syscall wrappers.
9945         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
9946         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
9947         __cleanup_fct_attribute.
9949         * Makefile: Add rules to build and run tst-cleanup0.
9950         * tst-cleanup0.c: New file.
9951         * tst-cleanup0.expect: New file.
9953         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
9954         caller.  Optimize to avoid often unecessary local variable.
9956 2003-04-11  Roland McGrath  <roland@redhat.com>
9958         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
9959         sets variable `multidir'; include that.
9960         (generated): Add it.
9961         ($(objpfx)$(multidir)/crti.o): New target.
9962         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
9964 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
9966         * tst-attr2.c (do_test): Add cast to avoid warning.
9967         * tst-mutex4.c (do_test): Likewise.
9969 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
9971         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
9972         in child.
9974 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
9976         * Makefile (tests): Add tst-detach1.
9977         * tst-detach1.c: New file.
9979 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
9981         * sysdeps/pthread/pthread.h: Remove duplicate
9982         pthread_cleanup_{push,pop} definitions.
9984         * tst-barrier2.c: Eliminate warnings.
9985         * tst-cancel4.c: Likewise.
9986         * tst-cond4.c: Likewise.
9987         * tst-cond6.c: Likewise.
9988         * tst-detach1.c: Likewise.
9989         * tst-rwlock4.c: Likewise.
9990         * tst-rwlock6.c: Likewise.
9991         * tst-rwlock7.c: Likewise.
9992         * tst-sem3.c: Likewise.
9993         * tst-spin2.c: Likewise.
9994         * tst-umask1.c: Likewise.
9996 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
9998         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
10000 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
10002         * descr.h (struct pthread): Move cancelhandling member to the front.
10004 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
10006         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
10007         malloc_parent, and malloc_child statically.
10008         (__register_atfork_malloc): New function.
10009         (free_mem): Don't free any of the malloc_* variables on the list.
10010         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
10011         Define HAVE_register_atfork_malloc.
10013 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
10015         * sysdeps/pthread/createthread.c (create_thread): Add some more
10016         comments explaining when to set multiple_threads and when not.
10018         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
10019         THREAD_ATOMIC_BIT_SET if not already defined.
10020         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
10021         THREAD_ATOMIC_BIT_SET:
10022         * sysdeps/x86_64/tls.h: Likewise.
10023         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
10024         THREAD_ATOMIC_CMPXCHG_VAL.
10025         (_pthread_cleanup_pop_restore): Likewise.
10026         * cancellation.c (__pthread_enable_asynccancel): Likewise.
10027         (__pthread_enable_asynccancel_2): Likewise.
10028         (__pthread_disable_asynccancel): Likewise.
10029         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
10030         (__libc_disable_asynccancel): Likewise.
10031         * init.c (sigcancel_handler): Likewise.
10032         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
10033         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
10035 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
10037         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
10038         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
10039         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
10040         * Makefile (tests): Add tst-cancel11.
10041         * tst-cancel11.c: New file.
10043 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
10045         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
10046         round, not the first.  Use specific_used flag instead of local
10047         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
10048         (__free_tcb): Don't call deallocate_tsd here.
10049         (start_thread): Call deallocate_tsd here.
10050         * pthread_setspecific.c: Set specific_used flag really only when
10051         needed.
10052         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
10053         * tst-tsd3.c: New file.
10054         * tst-tsd4.c: New file.
10056 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
10058         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
10059         Use atomic_exchange_and_add instead of __lll_add.
10060         (__lll_mutex_timedlock): Likewise.
10061         Patch by Ian Wienand.
10063 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
10065         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
10066         (SINGLE_THREAD_P): Fix typo.
10067         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
10069 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
10071         * Makefile (tests): Add tst-align.
10072         * tst-align.c: New file.
10073         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
10075         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
10076         function correctly.
10078         * tst-tsd2.c: Add casts to avoid warnings.
10080 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
10082         * descr.h (struct pthread): Move most often used elements to the front.
10084 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
10086         * Makefile (libpthread-routines): Add pthread_atfork.
10087         (libpthread-static-only-routines): Add pthread_atfork.
10089 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
10091         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
10092         of TLS_DTV_AT_TP.
10093         (INSTALL_DTV): Add parens.
10094         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
10095         Use passed descr instead of THREAD_SELF.
10096         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
10097         (__lll_mutex_timedlock_wait): Correct expected value after
10098         spurious wakeup.
10099         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
10100         Release lock before waking up the waiters.
10101         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
10102         criteria.  Reorderstruct passed to cleanup handler.  Fix
10103         handling of cancellation and failung pthread_mutex_unlock call.
10104         Use __pthread_enable_asynccancel_2 instead of
10105         __pthread_enable_asynccancel.
10106         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
10107         Return result of lock re-get if it fails.
10108         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
10109         for __pthread_cleanup_push.
10110         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
10111         completely broken rwlock implementation.
10112         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
10113         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
10114         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
10115         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
10116         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
10117         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
10118         versioned_symbol macro.
10119         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
10120         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
10122 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
10124         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
10125         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
10126         and __helper_tid.
10127         (struct timer): Remove th and bar field.
10128         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
10129         debugging code.  Create only one helper thread.
10130         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
10131         helper thread.
10132         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
10133         Renamed.  Define statically.  Use thread info from siginfo.
10134         (__helper_once): New variable.
10135         (__helper_tid): New variable.
10136         (__reset_helper_control): New function.
10137         (__start_helper_thread): New function.
10139         * pthread_create.c (start_thread): Don't use setjmp inside
10140         __builtin_expect to work around gcc bug.
10142         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
10143         timer_delete syscall fails, but not with ENOSYS, set
10144         __no_posix_timers.
10146         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
10147         (timer_settime): Fix typo.
10148         * sysdeps/unix/sysv/linux/timer_getoverr.c
10149         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
10151 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
10153         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
10154         offset of cleanupbuf.__prev.
10156 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
10158         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
10159         of included file.
10161 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
10163         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
10164         NULL provide default definition to syscall.
10166 2003-03-25  Roland McGrath  <roland@redhat.com>
10168         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
10169         (timer_id2ptr): Fix typo.
10171 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
10173         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
10174         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
10175         * sysdeps/ia64/pthreaddef.h: Likewise.
10176         * sysdeps/powerpc/pthreaddef.h: Likewise.
10177         * sysdeps/s390/pthreaddef.h: Likewise.
10178         * sysdeps/sh/pthreaddef.h: Likewise.
10179         * sysdeps/x86_64/pthreaddef.h: Likewise.
10180         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
10181         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
10182         being changed.
10183         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
10184         SIGTIMER is not unblocked.
10185         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
10186         RT signal taken.
10187         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
10188         be send.
10189         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
10190         pass pointer through as ID.
10191         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
10192         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
10193         * sysdeps/unix/sysv/linux/timer_create.c: New file.
10194         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
10195         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
10196         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
10197         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
10198         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
10199         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
10200         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
10201         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
10202         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
10203         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
10204         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
10205         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
10206         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
10207         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
10208         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
10209         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
10210         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
10211         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
10212         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
10213         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
10214         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
10215         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
10216         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
10217         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
10218         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
10219         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
10220         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
10221         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
10222         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
10223         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
10225         * pthreadP.h: Remove FRAME_LEFT definition.
10226         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
10227         already left frame.  Programs which have this problem are not POSIX
10228         compliant.
10229         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
10231 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
10233         * sysdeps/pthread/tst-timer.c: Check return values of the
10234         functions we test.
10236 2003-03-23  Roland McGrath  <roland@redhat.com>
10238         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
10239         * tst-tls3mod.c: Likewise.
10240         * tst-tls1.c: Likewise.
10241         * tst-tls2.c: Likewise.
10243         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
10244         undefined behavior.
10246         * tst-join5.c (tf1, tf2): Add a cast.
10248         * Makeconfig (includes): Append -I$(..)nptl to this variable.
10250         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
10251         Don't test anything.
10252         * tst-cond4.c: Likewise.
10253         * tst-cond6.c: Likewise.
10254         * tst-flock2.c: Likewise.
10255         * tst-mutex4.c: Likewise.
10256         * tst-rwlock4.c: Likewise.
10257         * tst-signal1.c: Likewise.
10258         * tst-spin2.c: Likewise.
10259         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
10261         * tst-mutex4.c: Use test-skeleton.c.
10262         * tst-spin2.c: Likewise.
10263         * tst-sysconf.c: Likewise.
10264         * tst-barrier2.c: Likewise.
10265         * tst-cond4.c: Likewise.
10266         * tst-cond6.c: Likewise.
10267         * tst-rwlock4.c: Likewise.
10268         * tst-unload.c: Likewise.
10269         * tst-flock2.c (do_test): Use return instead of exit.
10271 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
10273         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
10275 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
10277         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
10278         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
10279         instead of __lll_compare_and_swap.
10280         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
10281         Likewise.
10282         Removed definition if __lll_compare_and_swap.
10284         * cancellation.c: Adjust for new form of compare&exchange macros.
10285         * cleanup_defer.c: Likewise.
10286         * init.c: Likewise.
10287         * libc-cancellation.c: Likewise.
10288         * old_pthread_cond_broadcast.c: Likewise.
10289         * old_pthread_cond_signal.c: Likewise.
10290         * old_pthread_cond_timedwait.c: Likewise.
10291         * old_pthread_cond_wait.c: Likewise.
10292         * pthread_cancel.c: Likewise.
10293         * pthread_create.c: Likewise.
10294         * pthread_detach.c: Likewise.
10295         * pthread_join.c: Likewise.
10296         * pthread_key_delete.c: Likewise.
10297         * pthread_setcancelstate.c: Likewise.
10298         * pthread_setcanceltype.c: Likewise.
10299         * pthread_timedjoin.c: Likewise.
10300         * pthread_tryjoin.c: Likewise.
10301         * sysdeps/pthread/createthread.c: Likewise.
10303 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
10305         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
10306         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
10307         definitions.  Replace uses with calls to atomic_* functions.
10308         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
10309         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
10310         __lll_test_and_set calls with atomic_exchange_and_add and
10311         atomic_exchange calls respectively.
10312         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
10313         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
10314         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
10315         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
10316         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
10317         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
10318         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
10320         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
10321         returns the old value.
10323 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
10325         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
10326         int for variable OLDVAL and correct inline assembler contraint.
10327         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
10328         type int for variable OLD.
10330         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
10331         only for s390-32.
10332         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
10333         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
10334         instead of multiple_threads field in the TCB.
10336 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
10338         * sysdeps/i386/i686/bits/atomic.h: Removed.
10339         * sysdeps/i386/i586/bits/atomic.h: Removed.
10340         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
10341         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
10342         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
10343         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
10344         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
10345         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
10346         * atomic.h: Removed.  Moved to glibc.
10348         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
10349         support for clock selection.
10351         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
10352         signalling waiters.
10354 2003-03-18  Roland McGrath  <roland@redhat.com>
10356         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
10357         Add __lll_rel_instr first.  Add memory clobber.
10358         (lll_mutex_unlock): Use __lll_test_and_set.
10359         From Paul Mackerras <paulus@samba.org>.
10361         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
10362         unconditionally.
10363         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
10364         (SINGLE_THREAD_P):  Add `header.' prefix.
10365         From Paul Mackerras <paulus@samba.org>.
10367         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
10368         pthread_timedjoin_np to ...
10369         (libpthread: GLIBC_2.3.3): ... here.
10370         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
10372         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
10373         Avoid shadowing VAL variable.
10375         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
10376         New macro.
10378 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
10380         * Makefile (tests): Add tst-cond11.
10381         * tst-cond11.c: New file.
10383         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
10384         struct passed to cleanup handler to eliminate one more
10385         instruction.
10386         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10388         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
10389         (pthrad_cond_t): Replace __unused field with __clock.
10391         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
10392         waken all waiters in cleanup handler.
10393         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
10394         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10396         * pthread_condattr_getclock.c: New file.
10397         * pthread_condattr_setclock.c: New file.
10398         * sysdeps/pthread/pthread.h: Declare these new functions.
10399         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
10400         * Makefile (libpthread-routines): Add the new functions.
10401         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
10402         Renamed field to value.  Document use of the bits.
10403         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
10404         change.
10405         * pthread_condattr_setpshared.c: Likewise.
10406         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
10407         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
10408         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
10409         Add __clock field.
10410         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
10411         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
10412         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
10413         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
10414         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
10415         Implement clock selection.
10416         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
10417         * pthread-errnos.sym: Add ENOSYS.
10418         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
10419         _POSIX_CLOCK_SELECTION.
10420         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
10422         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
10423         invalid .size directive.
10425 2003-03-17  Roland McGrath  <roland@redhat.com>
10427         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
10428         Formatting tweaks.
10430 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
10432         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
10433         Use __lll_add instead of spelling it out.  Use protected symbol names.
10434         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
10435         Use __lll_add.
10436         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
10437         Renamed from lll_compare_and_swap.  Use new name where necessary.
10438         (__lll_add): Defined.
10439         (__lll_dec_if_positive): Defined.
10440         (__lll_test_and_set): Defined.
10441         * sysdeps/ia64/pthread_spin_init.c: Removed.
10442         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
10443         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
10444         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
10445         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
10446         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
10447         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
10448         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
10449         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
10450         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
10451         __sync_lock_release_si.
10452         Patch by Jakub Jelinek.
10454         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
10455         Fix timeout handling.
10456         (__lll_timedwait_tid): Likewise.
10457         (lll_unlock_wake_cb): Wake up other waiters if necessary.
10458         Patch by Jakub Jelinek.
10460         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
10462 2003-03-17  Roland McGrath  <roland@redhat.com>
10464         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
10465         * sysdeps/pthread/pthread_spin_init.c: New file.
10466         * sysdeps/pthread/pthread_spin_unlock.c: New file.
10467         * sysdeps/powerpc/Makefile: New file.
10468         * sysdeps/powerpc/pthread_spin_lock.c: New file.
10469         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
10470         * sysdeps/powerpc/pthreaddef.h: New file.
10471         * sysdeps/powerpc/tcb-offsets.sym: New file.
10472         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
10473         * sysdeps/powerpc/tls.h: New file.
10474         * sysdeps/powerpc/bits/atomic.h: New file.
10475         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
10476         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
10477         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
10479         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
10480         * sysdeps/unix/sysv/linux/sem_post.c: New file.
10481         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
10482         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
10483         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
10484         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
10485         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
10486         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
10487         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
10488         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
10489         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
10490         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
10491         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
10492         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
10493         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
10495         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
10496         not gettimeofday.
10497         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
10498         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
10499         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
10500         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
10501         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10503 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
10505         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
10506         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
10507         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10508         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10509         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
10511 2003-03-16  Roland McGrath  <roland@redhat.com>
10513         * tst-fork4.c: Include <string.h>.
10514         * tst-signal2.c: Likewise.
10515         * tst-mutex5.c (do_test): exit -> return.
10516         * tst-mutex2.c: Include <stdlib.h>.
10518 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
10520         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
10521         (__lll_mutex_timedlock_wait): Correct expected value after
10522         spurious wakeup.  Otherwise we would never wait again.
10524         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
10525         zone versus inline asm stupidity.  Use correct instructions.
10527         * tst-rwlock6.c: Add some more status output.
10529 2003-03-15  Roland McGrath  <roland@redhat.com>
10531         * sysdeps/pthread/configure.in: New file.
10532         * sysdeps/pthread/configure: New file (generated).
10534 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
10536         * allocatestack.c (allocate_stack): Store the exact stack size of
10537         user allocated stacks.
10539 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
10541         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
10542         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
10543         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
10544         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
10545         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
10546         Use `header.' prefix.
10547         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
10549 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
10551         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
10552         __builtin_frame_address, use stack pointer.
10554         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
10555         instead of __builtin_frame_pointer.
10557 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
10559         * tst-basic1.c (do_test): Add cast to avoid warning.
10560         * tst-basic2.c (do_test): Likewise.
10562         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
10563         amount of stack correction.
10565         * tst-fork4.c: Use test-skeleton.c.
10567 2003-03-14  Roland McGrath  <roland@redhat.com>
10569         * init.c: Fix typo "#eli" for "#else".
10571 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
10573         * allocatestack.c (__stack_user): Use hidden_data_def.
10574         * pthread_create.c (__pthread_keys): Likewise.
10576         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
10578 2003-03-14  Roland McGrath  <roland@redhat.com>
10580         * tst-fork4.c: New file.
10581         * Makefile (tests): Add it.
10583         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
10584         we always define the padding space.
10585         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
10586         stopped supporting its own extensions fully.
10587         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
10588         struct also called `header', so `header.multiple_threads' is the field
10589         name to use on all machines.
10590         * allocatestack.c (allocate_stack): Use `header.' prefix.
10591         * sysdeps/pthread/createthread.c (create_thread): Likewise.
10592         * pthread_create.c (__pthread_create_2_1): Likewise.
10593         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
10594         (THREAD_SELF): Likewise.
10595         * sysdeps/x86_64/tls.h: Likewise.
10596         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
10597         (SINGLE_THREAD_P): Likewise.
10598         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
10599         (SINGLE_THREAD_P): Likewise.
10600         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
10601         (SINGLE_THREAD_P): Likewise.
10603         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
10604         value directly.
10606 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
10608         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
10609         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
10611         * pthread_create.c (start_thread): setjmp is expected to return 0.
10613         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
10614         (THREAD_GETMEM_NC): Likewise.
10616 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
10618         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
10619         and the size of the stack which must be allocated is a multiple,
10620         allocate one more page.
10621         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
10622         MULTI_PAGE_ALIASING.
10624 2003-03-13  Roland McGrath  <roland@redhat.com>
10626         * pthread_create.c (start_thread): Set EXITING_BIT after the
10627         event-reporting (and destructors), not before.
10629 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
10631         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
10632         lll_futex_wake): Declare register variables as long int instead of
10633         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
10634         Make syscall arguments clobbered by the syscall.
10635         (lll_futex_wait): Define using lll_futex_timed_wait.
10637         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
10638         to void *.
10640         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
10641         PPID if [! NDEBUG].
10643         * allocatestack.c (nptl_ncreated): Only declare if
10644         COLORING_INCREMENT != 0.
10646         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
10647         (__libc_enable_asynccancel_2): Remove prototype.
10649         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
10650         ctid to match kernel.
10652 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
10654         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
10655         libc_multiple_threads.
10656         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
10657         __libc_multiple_threads to...
10658         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
10660         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
10661         versioning.
10662         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10663         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10665         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
10666         (__pthread_once_internal): Define.
10668         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
10669         macros instead of .symver directly.
10670         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
10671         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
10673         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
10674         * sysdeps/x86_64/tcb-offsets.sym: New file.
10675         * sysdeps/x86_64/Makefile: New file.
10677         * sysdeps/i386/tcb-offsets.sym: Add SELF.
10678         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
10679         to access own pthread_t in TCB.
10680         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10681         Likewise.
10682         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10683         Likewise.
10684         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10686 2003-03-12  Roland McGrath  <roland@redhat.com>
10688         * pthread-errnos.sym: New file.
10689         * Makefile (gen-as-const-headers): New variable, list that file.
10690         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
10691         header <pthread-errnos.h> instead of defining errno values here.
10692         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
10693         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
10694         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
10695         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10696         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10697         Likewise.
10698         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10699         Likewise.
10700         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
10701         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10702         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10703         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10704         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10705         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10706         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
10707         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
10708         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
10709         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
10710         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
10711         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
10712         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
10713         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
10714         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
10715         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
10716         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
10717         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
10718         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
10719         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
10720         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10721         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
10722         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
10723         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
10724         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
10725         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
10726         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
10728         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
10729         CLONE_CHILD_SETTID worked.
10731 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
10733         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
10734         file.
10735         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
10736         file.
10738         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
10739         (pthread_cond_t): Add padding.
10741         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
10742         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
10743         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
10745         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
10746         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
10747         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
10748         (__pthread_rwlock_timedrdlock): Likewise.
10749         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
10750         (__pthread_rwlock_wrlock): Likewise.
10751         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
10752         (__pthread_rwlock_rdlock): Likewise.
10754         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
10756         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
10757         result of lock re-get if it fails.
10759 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
10761         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
10762         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
10763         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
10764         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
10765         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
10766         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
10767         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
10768         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
10769         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10770         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10772         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
10773         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
10775         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
10776         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
10777         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
10778         (create_thread): Likewise.
10779         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
10780         * init.c (__pthread_initialize_minimal_internal): Initialize
10781         __libc_multiple_threads_ptr if necessary.
10782         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
10783         __pthread_multiple_threads and __libc_multiple_threads_ptr.
10784         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
10785         __libc_multiple_threads.
10786         (__libc_pthread_init): Return pointer to __libc_pthread_init if
10787         necessary.
10789         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
10790         (THREAD_SETMEM_NC): Likewise.
10792         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
10793         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
10794         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
10795         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
10797         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
10798         Eliminate one entire instruction.
10800         * cancellation.c (__pthread_enable_asynccancel_2): New function.
10801         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
10802         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
10803         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
10804         instead of __pthread_enable_asynccancel.
10805         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10806         (__pthread_cond_wait): Likewise.
10807         * sysdeps/pthread/pthread_cond_timedwait.c
10808         (__pthread_cond_timedwait): Likewise.
10809         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
10811         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10812         (__condvar_cleanup): Wake up all waiters in case we got signaled
10813         after being woken up but before disabling asynchronous
10814         cancellation.
10815         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10816         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
10817         (__condvar_cleanup): Likewise.
10819         * init.c (__NR_set_tid_address): If already defined, don't redefine.
10820         Make it an error if architecture has no #if case.  Add x86-64.
10822         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
10823         pt-initfini.s generation.
10825         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
10826         (TLS_INIT_TP): Fix typo.
10828 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
10830         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
10831         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
10833         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
10834         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
10835         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
10836         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
10837         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
10838         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10839         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10840         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10842 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
10844         * sysdeps/pthread/pthread_cond_timedwait.c
10845         (__pthread_cond_timedwait): Return the result of the final
10846         locking.  If it succeeds, the regular function return value.
10848         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
10849         Return result of the final locking.
10850         * version.c (__nptl_main): Work around problems with the strange
10851         INTERNAL_SYSCALL macro on ppc32.
10852         * init.c (__pthread_initialize_minimal_internal): Unblock
10853         SIGCANCEL in case the parent blocked it.
10854         Reported by Paul Mackerras <paulus@samba.org>.
10856         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
10857         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
10858         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
10860 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
10862         * sysdeps/pthread/pthread_cond_timedwait.c
10863         (__pthread_cond_timedwait): Unlock and fail if
10864         __pthread_mutex_unlock_internal failed.
10866         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
10867         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
10868         Use ARCH_CLONE.
10869         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
10870         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
10871         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
10872         ALLOCATE_STACK): New macros.
10873         (TLS_TPADJ): New macro.
10874         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
10875         (allocate_stack): Handle TLS_DTV_AT_TP and
10876         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
10877         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
10878         Don't set PD->self.
10879         * init.c [__ia64__] (__NR_set_tid_address): Define.
10881         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
10882         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
10883         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
10884         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
10885         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
10886         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
10887         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
10888         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
10889         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
10890         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
10891         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
10892         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
10893         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
10894         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
10895         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
10896         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
10897         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
10898         * sysdeps/ia64/bits/atomic.h: New file.
10899         * sysdeps/ia64/Makefile: New file.
10900         * sysdeps/ia64/pthread_spin_init.c: New file.
10901         * sysdeps/ia64/pthread_spin_lock.c: New file.
10902         * sysdeps/ia64/pthread_spin_trylock.c: New file.
10903         * sysdeps/ia64/pthread_spin_unlock.c: New file.
10904         * sysdeps/ia64/pthreaddef.h: New file.
10905         * sysdeps/ia64/tcb-offsets.sym: New file.
10906         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
10907         * sysdeps/ia64/tls.h: New file.
10909         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
10910         to syscall instead of no arguments.
10912 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
10914         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
10915         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
10916         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
10917         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
10919         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
10920         unused code.
10922         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
10924         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10925         lowlevelbarrier.sym.
10926         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
10927         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
10928         Include lowlevelbarrier.h and don't define offsets locally.
10929         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
10931         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
10932         (__lll_mutex_lock_wait): Reverse order of first two parameters.
10933         (__lll_mutex_timedlock_wait): Likewise.
10934         (lll_mutex_lock): Adjust asm for that.
10935         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
10936         (lll_lock): Adjust asm for operand order change.
10937         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
10938         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
10940         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
10941         Reverse order of parameters.
10942         (__lll_timedwait_tid): Remove regparms attribute.
10943         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
10944         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
10946         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10947         (__lll_timedwait_tid): Remove one unnecessary instruction.
10949         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
10950         __lll_mutex_timedlock_wait only for NOT_IN_libc.
10951         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
10952         lowlevelmutex.S.
10954         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
10955         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
10956         for NOT_IN_libc.
10957         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
10958         lowlevellock.S.
10960         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
10961         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
10962         for libc.so.
10963         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
10964         define LOCK here (if UP is not defined).  The actual code is in
10965         lowlevelmutex.S.
10967         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
10968         LOCK is already defined.  Don't define lll_unlock_wake_cb and
10969         __lll_timedwait_tid for libc.so.
10970         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
10971         define LOCK here (if UP is not defined).  The actual code is in
10972         lowlevellock.S.
10974         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
10975         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
10976         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
10977         instead of lowlevelsem.h.
10978         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10979         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10980         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10982         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10983         lowlevelrwlock.sym.
10984         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
10985         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
10986         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
10988         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
10989         register loading.
10990         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
10991         last changed.  D'oh.
10993         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
10995         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
10996         of __libc_locking_needed.
10997         (lll_trylock): Initialize %eax to zero.
10999         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
11000         pthread_cond_t definition.
11002 2003-03-10  Roland McGrath  <roland@redhat.com>
11004         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
11005         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
11006         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
11007         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
11008         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
11010         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
11011         Instead of setting PD->multiple_threads, set globals
11012         __pthread_multiple_threads and __libc_multiple_threads.
11013         * sysdeps/pthread/createthread.c (create_thread): Likewise.
11014         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
11015         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
11017         * descr.h (struct pthread): Conditionalize first member on
11018         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
11019         containing an anonymous tcbhead_t.  Move `list' member out.
11020         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
11021         * allocatestack.c: Remove use of `header.data.' prefix.
11022         * pthread_create.c: Likewise.
11023         * init.c (__pthread_initialize_minimal_internal): Likewise.
11024         * sysdeps/pthread/createthread.c (create_thread): Likewise.
11025         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
11026         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
11027         * sysdeps/x86_64/tls.h: Likewise.
11028         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
11029         (SINGLE_THREAD_P): Likewise.
11030         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
11031         (SINGLE_THREAD_P): Likewise.
11032         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
11033         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
11035 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
11037         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
11039         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
11040         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
11042         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
11043         leftovers from the ia32 code.
11045         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
11046         memory load.
11047         (clear_once_control): Don't load %esi.
11049         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
11050         handling.
11052         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
11054         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
11055         * sysdeps/unix/sysv/linux/createthread.c: ...here.
11057         * Makefile (tests): Add tst-cond10.
11058         * tst-cond10.c: New file.
11060 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
11062         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
11063         * tst-signal3.c (do_test): Likewise.
11064         * tst-sem5.c (do_test): Likewise.
11065         * tst-kill6.c (do_test): Likewise.
11066         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
11068         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
11069         of inc/dec.
11070         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
11071         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
11072         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
11073         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
11074         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
11075         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
11076         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11077         Likewise.
11078         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11079         Likewise.
11080         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
11081         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
11082         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
11083         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
11084         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
11085         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
11086         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
11087         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
11089         * allocatestack.c (allocate_stack): If mprotect() fails free the
11090         TLS memory.
11092 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
11094         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
11096         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
11097         lll_wake_tid.  This was used only to work around kernel limits in
11098         the early days.
11099         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
11100         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
11101         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
11102         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
11104         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
11105         (__pthread_initialize_minimal_internal): Change initialization of
11106         __static_tls_align_m1 appropriately.
11107         * pthreadP.h (__static_tls_align_m1): Renamed from
11108         __static_tls_align.
11109         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
11110         instead of __static_tls_align-1.
11112 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
11114         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
11116         * pthread_create.c: Define __pthread_keys using nocommon
11117         attribute, not by placing it explicitly in bss.
11118         Remove DEFINE_DEALLOC definition.  Not needed anymore.
11120         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
11121         Use it in mmap call to allocate stacks.
11123         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
11125         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
11126         result of the thread function.
11128 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
11130         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
11131         version is just fine.
11133         * sysdeps/unix/sysv/linux/libc_pthread_init.c
11134         (__pthread_child_handler): Renamed from pthread_child_handler,
11135         exported, and marked hidden.  Change all users.
11136         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
11137         free __pthread_child_handler from child list.
11139 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
11141         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
11143         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
11144         Fix handling of cancellation and failing pthread_mutex_unlock call.
11145         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
11146         (__pthread_cond_wait): Likewise.
11148         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
11149         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
11150         lll_futex_timed_wait call.
11151         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
11152         (pthread_rwlock_timedwrlock): Likewise.
11154         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
11155         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
11156         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
11158         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
11159         check of lll_futex_wake return value.
11161 2003-03-03  Roland McGrath  <roland@redhat.com>
11163         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
11165         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
11166         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
11167         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
11169 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
11171         * sysdeps/pthread/timer_create.c (timer_create): Return correct
11172         error for CPU clocks.
11174         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
11175         _POSIX_MONOTONIC_CLOCK.
11176         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
11178         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
11179         recent kernels.
11181 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
11183         * descr.h (struct pthread): Move cleanup field to the front.
11185 2003-03-01  Roland McGrath  <roland@redhat.com>
11187         * sem_open.c (sem_open): Braino fix.
11189 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
11191         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
11192         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
11193         __pthread_cleanup_pop functionality.
11194         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
11196         * descr.h (struct pthread): Move tid field to the front now that
11197         it is often used.
11199         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
11200         (__lll_mutex_timedlock_wait): Remove.
11201         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
11202         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
11203         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
11204         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
11205         (lll_unlock_wake_cb): Don't save and restore %esi.
11206         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
11207         %esi.
11208         (__lll_timedwait_tid): Add alignment.
11209         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
11210         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
11211         %esi.
11212         (__lll_timedwait_tid): Removed.
11213         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
11214         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
11215         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
11216         (pthread_barrier_wait): Don't save, load, and restore %esi for
11217         last thread.
11218         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
11219         (__pthread_cond_signal): Don't save, load, and restore %esi.
11220         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
11221         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
11222         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
11223         Don't save, load, and restore %esi.
11225 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
11227         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
11228         Release lock before waking up the waiters.
11230         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
11232         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
11233         (reader_thread): Likewise.
11235         * sysdeps/pthread/pthread_rwlock_unlock.c
11236         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
11237         to wake up readers if there are none.
11239         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
11240         Release internal lock before wake threads.
11242 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
11244         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
11245         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
11246         predefined.
11247         * tst-rwlock9.c: Likewise.
11248         * tst-rwlock10.c: New file.
11249         * tst-rwlock11.c: New file.
11251         * Makefile (tests): Add tst-dlsym1.
11252         * tst-dlsym1.c: New file.
11254         * init.c (__pthread_initialize_minimal_internal): Set
11255         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
11256         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
11258 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
11260         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
11262         * tst-cond2.c: Fix sychronization with child.
11264         * tst-rwlock8.c (reader_thread): Remove unused variable.
11266         * Makefile: Add rules to build and run tst-tls3.
11267         * tst-tls3.c: New file.
11268         * tst-tls3mod.c: New file.
11270         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
11271         * tst-rwlock8.c: New file.
11272         * tst-rwlock9.c: New file.
11273         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
11274         complete broken rwlock implementation.
11275         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11276         Likewise.
11277         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11278         Likewise.
11279         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
11280         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
11281         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
11282         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
11283         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
11284         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
11285         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
11287 2003-02-23  Roland McGrath  <roland@redhat.com>
11289         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
11291 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
11293         * Makefile (tests): Add tst-context1.
11294         * tst-context1.c: New file.
11296         * Makefile (tests): Add tst-tls1 and tst-tls2.
11297         * tst-tls1.c: New file.
11298         * tst-tls2.c: New file.
11300         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
11301         for failed cmpxchg.
11303         * pthread_create.c (start_thread): Set EXITING_BIT early.
11305         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
11306         (THREAD_GETMEM_NC): Likewise.
11308 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
11310         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
11311         off 3 more bytes by using offset-less instructions when possible.
11313         * Makefile: Add dependency for $(objpfx)version.d.
11315         * eintr.c (eintr_source): Add unnecessary return but the compiler
11316         insists.
11318         * tst-kill3.c: Include <unistd.h>.
11320 2003-02-21  Roland McGrath  <roland@redhat.com>
11322         * pthread_create.c (start_thread): Call __libc_thread_freeres.
11324 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
11326         * Makefile (tests): Add tst-eintr1.
11327         (distribute): Add eintr.c.
11328         * tst-eintr1.c: New file.
11329         * eintr.c: New file.
11331         * pthread_cancel.c (pthread_cancel): Use tkill directly.
11333         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
11334         Disallow sending SIGCANCEL.
11336         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
11337         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
11338         * tst-kill1.c: New file.
11339         * tst-kill2.c: New file.
11340         * tst-kill3.c: New file.
11341         * tst-kill5.c: New file.
11342         * tst-kill6.c: New file.
11343         * tst-basic7.c: Renamed to...
11344         * tst-kill4.c: ...this.
11346 2003-02-21  Roland McGrath  <roland@redhat.com>
11348         * Makefile (install-lib-ldscripts): New variable.
11350 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
11352         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
11353         * pthread_cancel.c: Use INVALID_TD_P.
11354         * pthread_detach.c: Likewise.
11355         * pthread_getschedparam.c: Likewise.
11356         * pthread_setschedparam.c: Likewise.
11357         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
11358         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
11359         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
11360         * pthread_timedjoin.c: Likewise.
11362         * tst-basic7.c: Include <signal.h>.
11364         * pthread_join.c (pthread_join): Limited checking for invalid
11365         descriptors.
11366         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
11368 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
11370         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
11371         beginning of the loop.  Clear the entire first block of TSD.
11372         * Makefile (tests): Add tst-key4.
11373         * tst-key4.c: New file.
11375 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
11377         * Makefile (tests): Add tst-basic7.
11378         * tst-basic7.c: New file.
11380         * pthread_create.c (deallocate_tsd): Mark as internal_function.
11381         Add some more __builtin_expect.
11383         * pthreadP.h: Define dummy version of DEBUGGING_P.
11385 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
11387         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
11388         _POSIX_THREAD_PRIORITY_SCHEDULING.
11389         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
11390         _XOPEN_REALTIME_THREADS.
11391         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
11393         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
11394         kernel returns EINVAL for PID <= 0, work around it.
11396         * Makefile (tests): Add tst-signal5.
11397         * tst-signal5.c: New file.
11399         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
11400         and LOGIN_NAME_MAX.
11402         * tst-cancel1.c (tf): Block all signals.
11404         * Makefile (tests): Add tst-basic6.
11405         * tst-basic6.c: New file.
11407         * tst-basic1.c: Add test for process ID.
11409         * Makefile (tests): Add tst-cancel10.
11410         * tst-cancel10.c: New file.
11412         * Makefile (tests): Add tst-signal4.
11413         * tst-signal4.c: New file.
11415         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
11416         __sigismember instead of sigismember.  Add __builtin_expect.
11418 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
11420         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
11421         pthread_setcancelstate, and pthread_rwlock_setpshared.
11423         * tst-cancel7.c (do_test): Make sure the pid file exists before
11424         canceling the thread.
11426         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
11427         pthread_rwlock_timedrdlock tests.
11428         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
11429         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11430         Check for invalid tv_nsec field.
11431         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11432         Likewise.
11434         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
11435         recursive mutex of overflow.
11437         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
11439         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
11440         going into an endless loop.
11441         * Makefile (tests): Add tst-cancel9.
11442         * tst-cancel9.c: New file.
11444         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
11446 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
11448         * tst-mutex5.c (do_test): Add more timedlock tests.
11450         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
11451         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
11453         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
11454         use INLINE_SYSCALL.  Error number is returned, not -1.
11456         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
11457         and __deallocate_stack with internal_function.
11458         * pthread_create.c: Adjust definitions appropriately.
11459         * allocatestack.c: Likewise.
11461         * pthread_join.c: Add one more __builtin_expect.
11462         * pthread_timedjoin.c: Likewise.
11464         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
11465         not data of sequence number does not match.
11466         Add one __builtin_expect.
11468         * Makefile (tests): Add tst-clock1.
11469         * tst-clock1.c: New file.
11471         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
11472         negative arguments.
11473         * Makefile (tests): Add tst-basic5.
11474         * tst-basic5.c: New file.
11476 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
11478         * Makefile (tests): Add tst-basic4.
11479         * tst-basic4.c: New file.
11481         * pthreadP.h: Add declaraction for __nptl_nthreads.
11482         * pthread_create.c: Define __nptl_nthreads
11483         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
11484         after thread is done.  If then zero, call exit(0).
11485         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
11486         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
11487         * init.c (pthread_functions): Initialize ptr_nthreads.
11488         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
11489         (__reclaim_stacks): Decrement __nptl_nthreads.
11490         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
11491         Define.
11492         * Makefile (tests): Add tst-basic3.
11493         * tst-basic3.c: New file.
11495         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
11496         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
11497         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
11498         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
11499         if asynchronous canceling is enabled.
11500         * pthread_join.c (pthread_join): When recognizing circular joins,
11501         take into account the other thread might be already canceled.
11502         * Makefile (tests): Add tst-join5.
11503         * tst-join5.c: New file.
11505         * Makefile (tests): Add tst-join4.
11506         * tst-join4.c: New file.
11508 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
11510         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
11512 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
11514         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
11515         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
11516         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
11517         warning.
11518         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
11519         to avoid warning.
11520         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
11521         error if lll_futex_wake failed.
11523 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
11525         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
11526         handling of cancellation and failung pthread_mutex_unlock call.
11527         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
11528         * Makefile (tests): Add tst-cond8 and tst-cond9.
11529         * tst-cond8.c: New file.
11530         * tst-cond9.c: New file.
11532         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
11534         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
11535         non-standard initializers with __USE_GNU.
11537         * Makefile (tests): Add tst-cleanup3.
11538         * tst-cleanup3.c: New file.
11540 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
11542         * Makefile (tests): Add tst-attr1 and tst-attr2.
11543         * tst-attr1.c: New file.
11544         * tst-attr2.c: New file.
11546         * Makefile: Add rules to build and run tst-atfork2 test.
11547         * tst-atfork2.c: New file.
11548         * tst-atfork2mod.c: New file.
11550         * sysdeps/unix/sysv/linux/unregister-atfork.c
11551         (__unregister_atfork): Free the memory allocated for the handlers
11552         after removing them from the lists.
11554         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
11555         cleanup function.
11557         * tst-atfork1.c (do_test): Wait for the child we forked.
11558         Report error in child.
11560         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
11562         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
11564 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
11566         * Makefile (tests): Add tst-cancel8.
11567         * tst-cancel8.c: New file.
11569         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
11570         clearing of control variable.
11571         * Makefile (tests): Add tst-once3 and tst-once4.
11572         * tst-once3.c: New file.
11573         * tst-once4.c: New file.
11575 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
11577         * sysdeps/sh/Makefile: New file.
11578         * sysdeps/sh/bits/atomic.h: New file.
11579         * sysdeps/sh/pthread_spin_init.c: New file.
11580         * sysdeps/sh/pthread_spin_lock.c: New file.
11581         * sysdeps/sh/pthread_spin_trylock.S: New file.
11582         * sysdeps/sh/pthread_spin_unlock.S: New file.
11583         * sysdeps/sh/pthreaddef.h: New file.
11584         * sysdeps/sh/tcb-offsets.sym: New file.
11585         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
11586         * sysdeps/sh/tls.h: New file.
11587         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
11588         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
11589         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
11590         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
11591         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
11592         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
11593         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
11594         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
11595         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
11596         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
11597         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
11598         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
11599         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
11600         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
11601         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
11602         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
11603         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
11604         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
11605         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
11606         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
11607         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
11608         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
11609         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
11610         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
11611         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
11612         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
11613         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
11614         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
11615         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
11616         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
11618 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
11620         * tst-cond2.c: Rearrange code to not rely on behavior undefined
11621         according to POSIX.
11623         * tst-basic2.c (do_test): Lock mutex before creating the thread.
11625 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
11627         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
11628         (TLS_GET_FS): New #define.
11629         (TLS_SET_FS): New #define.
11630         Correct value of __NR_set_thread_area.
11632         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
11634 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
11636         * Makefile (tests): Add tst-popen1.
11637         * tst-popen1.c: New file.
11639         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
11640         but inactive generalization.
11641         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
11642         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
11643         Minor optimization, remove one instruction.
11644         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
11646 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
11648         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
11650 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
11652         * init.c (__NR_set_tid_address): Add #ifdef for s390.
11653         * sysdeps/pthread/pthread_barrier_wait.c: New file.
11654         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
11655         * sysdeps/pthread/pthread_cond_signal.c: New file.
11656         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
11657         * sysdeps/pthread/pthread_cond_wait.c: New file.
11658         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
11659         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
11660         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
11661         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
11662         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
11663         * sysdeps/s390/Makefile: New file.
11664         * sysdeps/s390/bits/atomic.h: New file.
11665         * sysdeps/s390/pthread_spin_init.c: New file.
11666         * sysdeps/s390/pthread_spin_lock.c: New file.
11667         * sysdeps/s390/pthread_spin_trylock.c: New file.
11668         * sysdeps/s390/pthread_spin_unlock.c: New file.
11669         * sysdeps/s390/pthreaddef.h: New file.
11670         * sysdeps/s390/tcb-offsets.sym: New file.
11671         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
11672         * sysdeps/s390/tls.h: New file.
11673         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
11674         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
11675         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
11676         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
11677         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
11678         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
11679         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
11680         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
11681         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
11682         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
11683         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
11684         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
11685         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
11686         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
11687         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
11688         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
11689         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
11690         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
11691         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
11692         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
11693         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
11694         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
11695         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
11697 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
11699         * atomic.h: Add a couple more default implementations.
11700         (atomic_compare_and_exchange_acq): Use
11701         __arch_compare_and_exchange_32_acq in return value definition.  It
11702         always exists.
11703         (atomic_bit_set): Renamed from atomic_set_bit.
11704         Add missing atomic_ prefixes.
11706         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
11707         thread library is available, use correct value to mark initialized
11708         once variable.
11710 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
11712         * allocatestack.c (allocate_stack): Use __getpagesize instead of
11713         __sysconf to determine pagesize.
11715         * pthread_create.c: Include <atomic.h>.
11716         * allocatestack.c (allocate_stack): Implement coloring of the
11717         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
11718         size minus one.  Adjust users.
11719         * sysdeps/i386/i686/Makefile: New file.
11721 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
11723         * allocatestack.c: Improve comment throughout the file.
11725         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
11726         (__lll_lock_wait): Add branch prediction.
11727         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
11728         (__lll_lock_wait): Likewise.
11729         (lll_unlock_wake_cb): Removed.
11731 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
11733         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
11734         _POSIX_THREAD_PRIORITY_SCHEDULING.
11736 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
11738         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
11739         Fix return type of ptr___pthread_getspecific.
11741 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
11743         * Makefile (tests): Add tst-umask1.
11744         (tst-umask1-ARGS): Define.
11745         * tst-umask1.c: New file.
11747 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
11749         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
11750         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
11751         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
11752         pthread_rwlock_unlock.
11753         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
11754         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
11755         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
11756         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
11757         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11758         New file.
11759         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
11760         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11761         New file.
11762         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
11763         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
11764         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
11765         New file.
11766         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
11767         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
11768         New file.
11769         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
11770         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
11771         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
11772         New file.
11773         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
11774         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
11775         New file.
11776         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
11778         * Makefile (libpthread-routines): Remove lowlevelcond and
11779         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
11780         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
11781         and pthread_cond_broadcast.
11782         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
11783         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
11784         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
11785         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
11786         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
11787         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
11788         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
11789         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
11790         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
11791         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
11792         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
11793         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
11794         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
11795         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
11796         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
11797         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
11798         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
11799         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
11800         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
11801         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
11802         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
11803         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
11804         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
11805         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
11806         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
11807         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
11808         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
11809         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
11810         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
11811         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
11812         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
11814         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
11815         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
11816         of the code is moved to ...
11817         * sysdeps/pthread/createthread.c: ...here.  New file.
11819 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
11821         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
11822         (__new_sem_post): Clear %eax before returning.
11823         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
11825         * Makefile (tests): Add tst-cleanup2.
11826         * tst-cleanup2.c: New file.
11828         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
11829         Interpret first parameter correctly.
11831 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
11833         * Makefile (headers): Add bits/semaphore.h.
11835 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
11837         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
11838         if not SHARED.
11840 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
11842         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
11843         must be used and mapping failed.
11844         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
11846         * Makefile (CFLAGS-pthread_self.os): Define this, not
11847         CFLAGS-pthread_self.c.
11849 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
11851         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
11852         lll_unlock_wake_cb.
11854         * Makefile (libpthread-routines): Add version.  Add rules to build
11855         version.os and banner.h.
11856         * version.c: New file.
11858 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
11860         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
11861         the alias unconditional.
11862         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
11864 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
11866         * Makefile (CFLAGS-pthread_self.c): New definition.
11868 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
11870         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
11871         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
11872         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
11873         * init.c (__pthread_initialize_minimal_internal): Likewise.
11875 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
11877         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
11879         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
11880         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11881         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11882         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
11883         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11884         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11886 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
11888         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
11889         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
11890         * tst-cancel-wrappers.sh: Remove all exceptions.
11892 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
11894         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
11895         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
11897         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
11898         Use __libc_pthread_functions array if SHARED.
11900         * pthreadP.h: Move pthread_cond_2_0_t definition to...
11901         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
11903         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
11904         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
11905         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
11906         __libc_ptf_call instead of __libc_maybe_call.
11907         (PTF): New #define.
11908         (__libc_cleanup_region_start): Wrap function name with PTF call.
11909         (__libc_cleanup_region_end): Likewise.
11910         (__libc_cleanup_end): Likewise.
11912         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
11913         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
11914         * pthread_key_create.c: Add __pthread_key_create_internal alias.
11915         * pthreadP.h: Add prototypes.
11917         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
11918         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
11919         __pthread_rwlock_unlock aliases.
11920         * pthreadP.h: Add prototypes for new aliases.
11922         * pthreadP.h (struct pthead_functions): Moved to...
11923         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
11924         * init.c (pthread_functions): Add initializers for new elements.
11926         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
11927         __pthread_cleanup_pop_restore aliases.
11928         * pthreadP.h: Add prototypes.
11930         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
11931         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
11932         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
11933         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
11934         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
11935         * pthreadP.h: Adjust prototypes and callers.
11937 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
11939         * Makefile (tests): Add tst-cancel7.
11940         (tst-cancel7-ARGS): New variable.
11941         * tst-cancel7.c: New file.
11943         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
11944         around gcc defficiencies.
11945         * old_pthread_cond_signal.c: Likewise.
11946         * old_pthread_cond_timedwait.c: Likewise.
11947         * old_pthread_cond_wait.c: Likewise.
11949         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
11951 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
11953         * Makefile (tests): Add tst-cond7.
11954         * tst-cond7.c: New file.
11956         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11957         (condvar_cleanup): Get condvar address from the right place.
11959         * atomic.h: Correct definitions of atomic_full_barrier,
11960         atomic_read_barrier, atomic_write_barrier.
11962         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
11963         race-free.
11964         * old_pthread_cond_signal.c: Likewise.
11965         * old_pthread_cond_timedwait.c: Likewise.
11966         * old_pthread_cond_wait.c: Likewise.
11968 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
11970         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
11972 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
11974         * pthreadP.h (pthread_cond_2_0_t): New type.
11975         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
11976         Use new type for the 2.0 condvar function prototypes.
11977         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
11978         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
11979         parameter.
11980         * old_pthread_cond_destroy.c: Likewise.
11981         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
11982         * old_pthread_cond_signal.c: Likewise.
11983         * old_pthread_cond_timedwait.c: Likewise.
11984         * old_pthread_cond_wait.c: Likewise.
11986         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11987         (__pthread_cond_wait): Don't save cancellation mode and seq value
11988         in same location.
11990         * herrno.c (__h_errno_location): Don't define as weak.
11992 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
11994         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
11995         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
11996         and pthread_cond_wait.
11997         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
11998         Renamed to...
11999         (__pthread_cond_broadcast_2_0): ... this.
12000         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
12001         Renamed to...
12002         (__pthread_cond_destroy_2_0): ... this.
12003         * old_pthread_cond_init.c (__old_pthread_cond_init):
12004         Renamed to...
12005         (__pthread_cond_init_2_0): ... this.
12006         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
12007         Renamed to...
12008         (__pthread_cond_signal_2_0): ... this.
12009         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
12010         Renamed to...
12011         (__pthread_cond_wait_2_0): ... this.
12012         * pthread_cond_destroy.c: Include shlib-compat.h.
12013         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
12014         * pthread_cond_init.c: Include shlib-compat.h.
12015         (pthread_cond_init): Change strong_alias into versioned_symbol.
12016         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
12017         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
12018         fields.
12019         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
12020         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
12021         __pthread_cond_wait_2_0): New prototypes.
12022         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
12023         __old_pthread_cond_init, __old_pthread_cond_signal,
12024         __old_pthread_cond_wait): Removed.
12025         * init.c: Include shlib-compat.h.
12026         (pthread_functions): Guard ptr___pthread_attr_init_2_0
12027         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
12028         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
12029         ptr___pthread_cond_*_2_0 fields.
12030         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
12031         pthread_cond_*@GLIBC_2.0 compatibility symbols.
12033         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
12034         LIBC_SIGACTION was not yet defined.
12035         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
12036         [!defined LIBC_SIGACTION] (__sigaction): New function and
12037         libc_hidden_weak.
12038         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
12039         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
12041 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
12043         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
12045 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
12047         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
12048         New, larger type definition.
12049         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
12050         implementation.
12051         * Versions [libpthread]: Add definitions for new pthread_cond_*
12052         interfaces for version GLIBC_2.3.2.
12053         * pthread_cond_init.c: Update initialization for new type definition.
12054         * Makefile (libpthread-routines): Remove pthread_cond_wait,
12055         pthread_cond_timedwait, pthread_cond_signal, and
12056         pthread_cond_broadcast.  Add old_pthread_cond_init,
12057         old_pthread_cond_destroy, old_pthread_cond_wait,
12058         old_pthread_cond_timedwait, old_pthread_cond_signal, and
12059         old_pthread_cond_broadcast.
12060         * old_pthread_cond_broadcast.c: New file.
12061         * old_pthread_cond_destroy.c: New file.
12062         * old_pthread_cond_init.c: New file.
12063         * old_pthread_cond_signal.c: New file.
12064         * old_pthread_cond_timedwait.c: New file.
12065         * old_pthread_cond_wait.c: New file.
12066         * pthreadP.h: Add prototypes for the compatibility interfaces.
12068         * pthread_cond_destroy.c: Don't include <errno.h>.
12070 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
12072         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
12073         unnecessary zero offset when addressing MUTEX.
12075 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
12077         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
12078         __register_atfork.
12079         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
12080         for __register_atfork.
12082 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
12084         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
12085         instead of ASSEMBLER test macro.
12087         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
12088         __libc_current_sigrtmax): Add libc_hidden_def.
12090         * sysdeps/pthread/list.h: Remove assert.h include.
12092 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
12094         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
12095         __pthread_initialize_minimal_internal not
12096         __pthread_initialize_minimal.
12098 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
12100         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
12101         __pthread_initialize_minimal as hidden.
12103         * init.c (__pthread_initialize_minimal_internal): Don't mark as
12104         constructor.
12106 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
12108         * Makefile ($(inst_libdir)/libpthread.so): Depend on
12109         $(common-objpfx)format.lds, include that into the output script.
12110         Fix comment.
12111         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
12113 2002-12-28  Andreas Jaeger  <aj@suse.de>
12115         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
12116         nsec resolution changes.
12117         (xstat64_conv): Likewise.
12118         (xstat32_conv): Likewise.
12119         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
12120         struct kernel_stat.
12121         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
12122         structs stat and stat64.
12123         * time/time.h (__timespec_defined): Define for __USE_MISC.
12124         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
12126 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
12128         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
12129         argument.
12130         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
12131         (pthread_exit): Use strong_alias to avoid warnings.
12132         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
12133         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
12134         ptr___pthread_attr_init_2_*.
12135         * init.c (pthread_functions): Adjust.
12137 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
12139         * forward.c: Make all functions available by default again.  It
12140         caused too much trouble.
12142         * pt-siglongjmp.c: Removed.
12144 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
12146         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
12147         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
12148         * sysdeps/i386/Makefile: New file.
12149         * sysdeps/i386/tcb-offsets.sym: New file.
12150         * sysdeps/pthread/tcb-offsets.h: New file.
12151         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
12152         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
12154         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
12155         __register_atfork...
12156         (GLIBC_2.3.2): ...here.
12158 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
12160         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
12161         pthread_attr_setstackaddr with __attribute_deprecated__.
12163 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
12165         * pt-system.c (system): Remove cancellation handling.
12166         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
12167         cancellation routines.
12169 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
12171         * descr.h: Include <dl-sysdep.h>.
12172         (struct pthread): Move header.data.list to the back of the struct.
12173         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
12174         (MULTIPLE_THREADS_OFFSET): Adjust offset.
12175         (SYSINFO_OFFSEET): Likewise.
12177 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
12179         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
12180         Define.
12181         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
12182         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
12183         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
12184         (USE_DL_SYSINFO): Undef.
12186 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
12188         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
12189         $(common-objpfx)libc.so.
12190         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
12191         it is bigger than pipe buffer size even on arches with bigger
12192         page size.
12193         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
12195 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
12197         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
12198         correct errno access for case that USE___THREAD is not defined.
12200 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
12202         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
12203         Patch by Marijn Ros <marijn@mad.scientist.com>.
12205 2002-12-22  Roland McGrath  <roland@redhat.com>
12207         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
12209 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
12211         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
12213 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
12215         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
12216         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
12217         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
12219         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
12220         of int $0x80.
12221         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
12222         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
12223         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
12224         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
12225         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
12226         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
12227         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
12228         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
12230         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
12231         sysenter.
12232         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
12234         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
12236         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
12237         in new TCB.
12238         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
12239         that sysinfo is properly initialized.
12240         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
12241         to 1 only for ld.so.
12243         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
12244         RTLD_CORRECT_DYNAMIC_WEAK.
12246 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
12248         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
12249         Use return 0 as 6th argument to FORWARD4.
12250         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
12252 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
12254         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
12255         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
12256         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
12257         (INIT_SYSINFO): New #define.
12258         (TLS_TP_INIT): Use INIT_SYSINFO.
12259         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
12260         At test to make sure SYSINFO_OFFSET value is correct.
12261         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
12263 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
12265         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
12266         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
12267         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
12268         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
12269         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
12270         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
12271         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
12273 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
12275         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
12276         macro instead of using int $0x80 directly.
12278         * sysdeps/pthread/bits/stdio-lock.h: New file.
12279         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
12280         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
12281         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
12282         * Makefile (routines): Add libc-lowlevelmutex.
12284         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
12285         __i686.get_pc_thunk.dx.
12287 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
12289         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
12290         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
12291         ($(objpfx)tst-cancel-wrappers.out): New rule.
12292         * tst-cancel-wrappers.sh: New test.
12293         * tst-locale1.c: Include signal.h.
12294         (uselocale): Test static linking of __libc_current_sigrt*.
12296 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
12298         * Makefile (tests): Add tst-cancel6.
12299         * tst-cancel6.c: New file
12301 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
12303         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
12304         Define meaningfully for assembler as well.
12305         * pthreadP.h (struct pthread_functions): Remove
12306         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
12307         and ptr_pthread_attr_init_2_1 fields.
12308         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
12309         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
12310         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
12311         (FORWARD3): Define using FORWARD4.
12312         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
12313         versions.
12314         * pt-system.c: Remove duplicate stdlib.h include.
12316 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
12318         * sem_init.c: Define sem_init@GLIBC_2.0.
12319         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
12320         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
12322         * flockfile.c: Moved to...
12323         * sysdeps/pthread/flockfile.c: ...here.  New file.
12324         * funlockfile.c: Moved to...
12325         * sysdeps/pthread/funlockfile.c: ...here.  New file.
12326         * ftrylockfile.c: Moved to...
12327         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
12329 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
12331         * libc-cancellation.c: Guard both function with
12332         #if !defined NOT_IN_libc.
12333         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
12334         automatically provided pthread wrappers.
12335         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
12336         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
12337         nor in libpthread.
12338         * pt-open.c: Removed.
12339         * pt-fcntl.c: Removed.
12340         * pt-fsync.c: Removed.
12341         * pt-lseek.c: Removed.
12342         * pt-msgrcv.c: Removed.
12343         * pt-msgsnd.c: Removed.
12344         * pt-msync.c: Removed.
12345         * pt-nanosleep.c: Removed.
12346         * pt-open64.c: Removed.
12347         * pt-pause.c: Removed.
12348         * pt-pread.c: Removed.
12349         * pt-pread64.c: Removed.
12350         * pt-pwrite.c: Removed.
12351         * pt-pwrite64.c: Removed.
12352         * pt-read.c: Removed.
12353         * pt-recv.c: Removed.
12354         * pt-recvfrom.c: Removed.
12355         * pt-recvmsg.c: Removed.
12356         * pt-send.c: Removed.
12357         * pt-sendto.c: Removed.
12358         * pt-sigtimedwait.c: Removed.
12359         * pt-sigwait.c: Removed.
12360         * pt-wait.c: Removed.
12361         * pt-waitpid.c: Removed.
12362         * pt-write.c: Removed.
12363         * pt-accept.c: Removed.
12364         * pt-close.c: Removed.
12365         * pt-connect.c: Removed.
12366         * pt-lseek64.c: Removed.
12367         * pt-sendmsg.c: Removed.
12368         * pt-tcdrain.c: Removed.
12370 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
12372         * init.c (__pthread_initialize_minimal_internal): Renamed from
12373         __pthread_initialize_minimal.  Make old name an alias.  This
12374         converts a normal relocation into a relative relocation.
12376         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
12378         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
12379         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
12380         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
12381         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
12382         pt-sigwaitinfo, pt-waitid, and pt-writev.
12383         * pt-creat.c: Removed.
12384         * pt-poll.c: Removed.
12385         * pt-pselect.c: Removed.
12386         * pt-readv.c: Removed.
12387         * pt-select.c: Removed.
12388         * pt-sigpause.c: Removed.
12389         * pt-sigsuspend.c: Removed.
12390         * pt-sigwaitinfo.c: Removed.
12391         * pt-waitid.c: Removed.
12392         * pt-writev.c: Removed.
12394         * init.c (pthread_functions): New variable.
12395         (__pthread_initialize_minimal): Pass pointer to pthread_functions
12396         (or NULL) to __libc_pthread_init.
12397         * forward.c: Rewrite to use __libc:pthread_functions array to get
12398         function addresses.
12399         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
12400         prototype.
12401         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
12402         Take new parameter.  Copy content of variable pointed to by it
12403         to __libc_pthread_init.
12405         * pthreadP.h (struct pthread_functions): New type.
12406         (__libc_pthread_init): Declare.
12408         * pthread_attr_destroy.c: Add namespace protected alias.
12409         * pthread_attr_getdetachstate.c: Likewise.
12410         * pthread_attr_getinheritsched.c: Likewise.
12411         * pthread_attr_getschedparam.c: Likewise.
12412         * pthread_attr_getschedpolicy.c: Likewise.
12413         * pthread_attr_getscope.c: Likewise.
12414         * pthread_attr_setdetachstate.c: Likewise.
12415         * pthread_attr_setinheritsched.c: Likewise.
12416         * pthread_attr_setschedparam.c: Likewise.
12417         * pthread_attr_setschedpolicy.c: Likewise.
12418         * pthread_attr_setscope.c: Likewise.
12419         * pthread_cond_broadcast.c: Likewise.
12420         * pthread_cond_destroy.c: Likewise.
12421         * pthread_cond_init.c: Likewise.
12422         * pthread_cond_signal.c: Likewise.
12423         * pthread_cond_wait.c: Likewise.
12424         * pthread_condattr_destroy.c: Likewise.
12425         * pthread_condattr_init.c: Likewise.
12426         * pthread_equal.c: Likewise.
12427         * pthread_exit.c: Likewise.
12428         * pthread_getschedparam.c: Likewise.
12429         * pthread_self.c: Likewise.
12430         * pthread_setcancelstate.c: Likewise.
12431         * pthread_setschedparam.c: Likewise.
12432         * pthread_mutex_destroy.c: Likewise.
12433         * pthread_mutex_init.c: Likewise.
12434         * pthreadP.h: Add prototypes for the aliases.
12436         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
12437         multiple_threads member in correct TCB to 1.
12439         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
12440         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
12441         member of thread decriptor, otherwise return unconditionally 1.
12443 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
12445         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
12446         regular Linux version.  Remove file.
12447         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
12448         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
12449         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
12450         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
12451         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
12452         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
12453         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
12454         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
12455         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
12456         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
12457         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
12458         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
12459         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
12460         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
12461         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
12462         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
12463         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
12464         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
12465         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
12466         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
12467         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
12468         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
12469         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
12470         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
12471         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
12472         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
12473         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
12474         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
12475         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
12476         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
12478 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
12480         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
12481         * sysdeps/unix/sysv/linux/open.c: Removed.
12482         * sysdeps/unix/sysv/linux/fsync.c: Removed.
12483         * sysdeps/unix/sysv/linux/lseek.c: Removed.
12484         * sysdeps/unix/sysv/linux/msync.c: Removed.
12485         * sysdeps/unix/sysv/linux/read.c: Removed.
12486         * sysdeps/unix/sysv/linux/close.c: Removed.
12487         * sysdeps/unix/sysv/linux/creat.c: Removed.
12488         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
12489         * sysdeps/unix/sysv/linux/pause.c: Removed.
12490         * sysdeps/unix/sysv/linux/select.c: Removed.
12491         * sysdeps/unix/sysv/linux/write.c: Removed.
12493 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
12495         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
12496         element in TCB to see whether locking is needed.
12498         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
12499         MULTIPLE_THREADS_OFFSET value is correct.
12501         * sysdeps/unix/sysv/linux/close.c: New file.
12502         * sysdeps/unix/sysv/linux/connect.S: New file.
12503         * sysdeps/unix/sysv/linux/creat.c: New file.
12504         * sysdeps/unix/sysv/linux/fsync.c: New file.
12505         * sysdeps/unix/sysv/linux/llseek.c: New file.
12506         * sysdeps/unix/sysv/linux/lseek.c: New file.
12507         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
12508         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
12509         * sysdeps/unix/sysv/linux/msync.c: New file.
12510         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
12511         * sysdeps/unix/sysv/linux/open.c: New file.
12512         * sysdeps/unix/sysv/linux/open64.c: New file.
12513         * sysdeps/unix/sysv/linux/pause.c: New file.
12514         * sysdeps/unix/sysv/linux/poll.c: New file.
12515         * sysdeps/unix/sysv/linux/pread.c: New file.
12516         * sysdeps/unix/sysv/linux/pread64.c: New file.
12517         * sysdeps/unix/sysv/linux/pselect.c: New file.
12518         * sysdeps/unix/sysv/linux/pwrite.c: New file.
12519         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
12520         * sysdeps/unix/sysv/linux/readv.c: New file.
12521         * sysdeps/unix/sysv/linux/recv.S: New file.
12522         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
12523         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
12524         * sysdeps/unix/sysv/linux/select.c: New file.
12525         * sysdeps/unix/sysv/linux/send.S: New file.
12526         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
12527         * sysdeps/unix/sysv/linux/sendto.S: New file.
12528         * sysdeps/unix/sysv/linux/sigpause.c: New file.
12529         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
12530         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
12531         * sysdeps/unix/sysv/linux/sigwait.c: New file.
12532         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
12533         * sysdeps/unix/sysv/linux/system.c: New file.
12534         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
12535         * sysdeps/unix/sysv/linux/wait.c: New file.
12536         * sysdeps/unix/sysv/linux/waitid.c: New file.
12537         * sysdeps/unix/sysv/linux/waitpid.c: New file.
12538         * sysdeps/unix/sysv/linux/writev.c: New file.
12539         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
12541         * pt-readv.c: Fix comment.
12543 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
12545         * tst-cleanup1.c: Include stdlib.h.
12547         * tst-cancel5.c: New test.
12548         * Makefile (tests): Add tst-cancel5.
12549         (tst-cancel5): Link against libc.so libpthread.so in that order.
12551 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
12553         * forward.c (test_loaded): Prevent recursive calls.
12555         * Makefile (routines): Add libc-cancellation.
12556         * libc-cancellation.c: New file.
12557         * descr.h (struct pthread): Add multiple_threads field.
12558         * allocatestack.c (allocate_stack): Initialize multiple_header field of
12559         new thread descriptor to 1.
12560         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
12561         Initialize multiple_thread field after successful thread creation.
12562         * cancellation.c (__do_cancel): Move to pthreadP.h.
12563         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
12564         (__pthread_disable_asynccancel): Add internal_function attribute.
12565         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
12566         * pthread_setcancelstate.c: Likewise.
12567         * pthread_setcanceltype.c: Likewise.
12568         * pthread_exit.c: Likewise.
12569         * pthreadP.h (CANCELLATION_P): Likewise.
12570         (__do_cancel): Define as static inline.
12571         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
12572         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
12573         declarations.
12574         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
12575         fields.  Define MULTIPLE_THREADS_OFFSET.
12576         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
12577         declaration.
12578         * sysdeps/unix/sysv/linux/accept.S: New file.
12579         * sysdeps/unix/sysv/linux/read.c: New file.
12580         * sysdeps/unix/sysv/linux/write.c: New file.
12581         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
12582         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
12583         initialization of __libc_locking_needed.
12584         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
12585         __libc_locking_needed, use multiple_threads field in TCB.
12586         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
12588 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
12590         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
12591         version.
12592         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
12594         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
12595         access to __libc_locking_needed for PIC.
12597 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
12599         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
12600         declare for libc.so.
12601         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
12602         expression.
12603         (__libc_lock_lock): Put into statement expression.
12604         (__libc_lock_unlock): Remove trailing semicolon.
12605         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
12607 2002-12-12  Roland McGrath  <roland@redhat.com>
12609         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
12610         "m" constraint to refer to __libc_locking_needed.  Declare it here.
12612 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
12614         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
12615         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
12616         Initialize __libc_locking_needed.
12617         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
12618         instead of __register_pthread_fork_handler.
12619         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
12620         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
12621         fork-gen with libc_pthread_init.
12622         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
12623         of __register_pthread_fork_handler.
12624         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
12625         of __register_pthread_fork_handler.
12626         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
12627         __libc_locking_needed to determine whether lock prefix can be avoided.
12628         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
12630 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
12632         * Makefile (tests): Add tst-cleanup1.
12633         * tst-cleanup1.c: New file.
12634         * cancellation.c (__cleanup_thread): Removed.
12635         (__do_cancel): Remove call to __cleanup_thread.
12636         * pthreadP.h: Remove __cleanup_thread prorotype.
12638         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
12639         Remember function and argument even if cancellation handler
12640         function is not available.
12641         (__libc_cleanup_region_end): Execute registered function directly if
12642         pthread functions are not available.
12643         (__libc_cleanup_end): Likewise.
12645         * init.c (__pthread_initialize_minimal): Fix initialization in
12646         static lib by preventing gcc from being too clever.
12648 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
12650         * init.c (__pthread_initialize_minimal): Remove unneccesary
12651         sigaddset call.
12653         * Makefile (tests): We can run tst-locale2 now.
12655 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
12657         * Versions: Remove duplicated sigwait entry.
12659 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
12661         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
12662         inside libpthread.
12664         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
12666         * pthreadP.h: Declare __pthread_enable_asynccancel and
12667         __pthread_disable_asynccancel.
12668         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
12669         (CANCEL_RESET): Use __pthread_disable_asynccancel.
12670         * cancellation.c (__pthread_enable_asynccancel): New function.
12671         (__pthread_disable_asynccancel): New function.
12672         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
12673         * pt-close.c: Likewise.
12674         * pt-connect.c: Likewise.
12675         * pt-creat.c: Likewise.
12676         * pt-fcntl.c: Likewise.
12677         * pt-fsync.c: Likewise.
12678         * pt-lseek.c: Likewise.
12679         * pt-lseek64.c: Likewise.
12680         * pt-msgrcv.c: Likewise.
12681         * pt-msgsnd.c: Likewise.
12682         * pt-msync.c: Likewise.
12683         * pt-nanosleep.c: Likewise.
12684         * pt-open.c: Likewise.
12685         * pt-open64.c: Likewise.
12686         * pt-pause.c: Likewise.
12687         * pt-poll.c: Likewise.
12688         * pt-pread.c: Likewise.
12689         * pt-pread64.c: Likewise.
12690         * pt-pselect.c: Likewise.
12691         * pt-pwrite.c: Likewise.
12692         * pt-pwrite64.c: Likewise.
12693         * pt-read.c: Likewise.
12694         * pt-readv.c: Likewise.
12695         * pt-recv.c: Likewise.
12696         * pt-recvfrom.c: Likewise.
12697         * pt-recvmsg.c: Likewise.
12698         * pt-select.c: Likewise.
12699         * pt-send.c: Likewise.
12700         * pt-sendmsg.c: Likewise.
12701         * pt-sendto.c: Likewise.
12702         * pt-sigpause.c: Likewise.
12703         * pt-sigsuspend.c: Likewise.
12704         * pt-sigtimedwait.c: Likewise.
12705         * pt-sigwait.c: Likewise.
12706         * pt-sigwaitinfo.c: Likewise.
12707         * pt-system.c: Likewise.
12708         * pt-tcdrain.c: Likewise.
12709         * pt-wait.c: Likewise.
12710         * pt-waitid.c: Likewise.
12711         * pt-waitpid.c: Likewise.
12712         * pt-write.c: Likewise.
12713         * pt-writev.c: Likewise.
12714         * pthread_join.c: Likewise.
12715         * pthread_timedjoin.c: Likewise.
12717         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
12718         (__xpg_sigpause): New function.
12719         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
12721 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
12723         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
12725         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
12726         _GI_pthread_cleanup_pop to pthreadP.h.
12728         * ftrylockfile.c: Use _IO_lock_trylock instead of
12729         pthread_mutex_trylock.
12731         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
12732         (CANCEL_RESET): Likewise.
12733         (__pthread_setcanceltype_): Declare.
12734         (__pthread_mutex_lock_internal): Declare.
12735         (__pthread_mutex_unlock_internal): Declare.
12736         (__pthread_once_internal): Declare.
12737         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
12738         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
12740         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
12741         and pthread_mutex_unlock.
12742         * pthread_cond_wait.c: Likewise.
12743         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
12744         * pthread_mutex_unlock.c: Likewise.
12746         * pthread_setcanceltype.c: Add additional alias
12747         __pthread_setcanceltype.
12749         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
12750         * sem_open.c (sem_open): Likewise.
12751         Use __libc_open, __libc_write, and __libc_close instead of
12752         open, write, and close respectively.
12754         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
12755         Rewrite as statement expression since it must return a value.
12757         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
12758         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
12759         __pthread_kill.
12761         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
12762         alias __pthread_once_internal.
12764         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
12766 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
12768         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
12769         * tst-stdio1.c: New file.
12770         * tst-stdio2.c: New file.
12772         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
12774         * Makefile (tests): Comment out tst-locale2 for now.
12775         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
12777         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
12778         -D_IO_MTSAFE_IO.
12779         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
12780         Use _IO_lock_init instead of explicit assignment.
12782         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
12783         Define __libc_lock_* and __libc_lock_recursive macros with
12784         lowlevellock macros, not pthread mutexes.
12786         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
12787         of pthread_mutex_lock.
12788         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
12789         instead of pthread_mutex_unlock.
12791 2002-12-06  Roland McGrath  <roland@redhat.com>
12793         * allocatestack.c (__stack_user): Use uninitialized defn.
12794         * init.c (__pthread_initialize_minimal): Initialize it here.
12796 2002-12-05  Roland McGrath  <roland@redhat.com>
12798         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
12799         string.
12800         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
12802         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
12803         missing & here too.
12805 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
12807         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12808         lowlevellock.
12809         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
12810         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
12811         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
12812         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
12813         for __libc_lock_* macros.
12814         * Makefile (routines): Add libc-lowlevellock.
12816 2002-10-09  Roland McGrath  <roland@redhat.com>
12818         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
12819         Under [__PIC__], call the function via the pointer fetched for
12820         comparison rather than a call by name that uses the PLT.
12821         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
12822         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
12823         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
12824         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
12825         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
12827 2002-12-04  Roland McGrath  <roland@redhat.com>
12829         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
12831         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
12832         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
12834         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
12836 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
12838         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
12839         a completely opaque, non-integer type.
12840         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
12842 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
12844         * sysdeps/i386/tls.h: Include stdlib.h.
12845         * sysdeps/x86_64/tls.h: Likewise.
12847 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
12849         * Makefile (tests): Add tst-locale2.
12850         (tests-static): Likewise.
12851         * tst-locale2.c: New file.
12853         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
12854         volatile and add memory clobbers to lock operations.
12856 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
12858         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
12859         * sysdeps/i386/i486/bits/atomic.h: New file.
12860         * sysdeps/i386/i586/bits/atomic.h: New file.
12861         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
12862         include i486 version.
12863         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
12864         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
12865         Patch by Marijn Ros <marijn@mad.scientist.com>.
12867         * allocatestack.c (get_cached_stack): Don't crash if we first
12868         found a stack with a larger size then needed.
12869         Reported by Hui Huang <hui.huang@sun.com>.
12871         * Makefile (tests): Add tst-sysconf.
12872         * tst-sysconf.c: New file.
12874         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
12875         PTHREAD_THREADS_MAX.
12877 2002-12-02  Roland McGrath  <roland@redhat.com>
12879         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
12880         Declare using hidden_proto instead of attribute_hidden, so there are
12881         non-.hidden static symbols for gdb to find.
12882         (__pthread_keys): Likewise.
12883         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
12884         * allocatestack.c (__stack_user): Likewise.
12885         * pthread_create.c (__pthread_keys): Likewise.
12886         (__nptl_threads_events, __nptl_last_event): Make these static instead
12887         of hidden.
12888         * pthread_key_create.c (__pthread_pthread_keys_max,
12889         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
12891 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
12893         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
12894         statically.
12895         * tst-locale1.c: New file.
12897         * pthread_cond_timedwait.c: Include <stdlib.h>.
12899         * Makefile (tests): Add tst-fork2 and tst-fork3.
12900         * tst-fork2.c: New file.
12901         * tst-fork3.c: New file.
12903 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
12905         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
12907         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
12908         require it to 200112L.
12910         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
12911         instruction only if HAVE_CMOV is defined.
12912         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
12914         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
12916         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
12918         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
12920         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
12922 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
12924         * sysdeps/x86_64/bits/atomic.h: New file.
12926         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
12927         16-bit operations.
12929         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
12930         possible since gettid cannot fail.
12932         * sysdeps/x86_64/pthreaddef.h: New file.
12934         * sysdeps/i386/pthreaddef.h (gettid): Removed.
12936         * sysdeps/x86_64/pthread_spin_init.c: New file.
12937         * sysdeps/x86_64/pthread_spin_lock.c: New file.
12938         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
12939         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
12941         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
12942         Add missing lock prefix.  Minute optimization.
12944         * tst-spin2.c (main): Also check successful trylock call.
12946         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
12947         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
12949         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
12950         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
12952         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
12953         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
12954         value in case of an error.  Add support for INTERNAL_SYSCALL.
12956         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
12957         value in case of an error.
12959         * sysdeps/x86_64/tls.h: New file.
12961 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
12963         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
12964         takes the array member name and the index as parameters.
12965         (THREAD_SETMEM_NC): Likewise.
12966         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
12967         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
12968         interfaces.
12970         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
12971         to decide which code to use.
12972         (THREAD_SETMEM_NC): Likewise.
12974         * allocatestack.c (queue_stack): Don't remove stack from list here.
12975         Do it in the caller.  Correct condition to prematurely terminate
12976         loop to free stacks.
12977         (__deallocate_stack): Remove stack from list here.
12979 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
12981         * Makefile (tests): Add tst-stack1.
12982         * tst-stack1.c: New file.
12984         * allocatestack.c (allocate_stack): Initialize the TCB on a user
12985         provided stack.
12987         * pthread_attr_getstack.c: Return bottom of the thread area.
12989 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
12991         * Makefile (libpthread-routines): Add pt-allocrtsig and
12992         pthread_kill_other_threads.
12993         * pt-allocrtsig.c: New file.
12994         * pthread_kill_other_threads.c: New file.
12995         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
12996         all three functions.
12997         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12998         allocrtsig.
12999         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
13000         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
13001         and __libc_allocate_rtsig_private.
13002         * Versions (libpthread): Export pthread_kill_other_threads_np,
13003         __libc_current_sigrtmin, and __libc_current_sigrtmax.
13005 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
13007         * allocatestack.c (allocate_stack): stackaddr in attribute points to
13008         the end of the stack.  Adjust computations.
13009         When mprotect call fails dequeue stack and free it.
13010         * pthread_attr_setstack.c: Store top of the stack in stackaddr
13011         attribute.
13012         * pthread_getattr_np.c: Likewise.
13014         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
13015         surprises.
13017 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
13019         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
13020         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
13022 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
13024         * pthread_getspecific.c: Optimize access to first 2nd-level array.
13025         * pthread_setspecific.c: Likewise.
13027 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
13029         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
13030         definitions.  Get them from the official place.
13031         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
13033         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
13034         Use new CLONE_ flags in clone() calls.
13036         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
13037         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
13039         * Versions: Add pthread_* functions for libc.
13040         * forward.c: New file.
13042         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
13043         errno-loc.
13044         * herrno.c: New file.
13045         * res.c: New file.
13047         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
13048         sem_trywait, and sem_timedwait.  Add herrno and res.
13049         * sem_init.c: Don't initialize lock and waiters members.
13050         * sem_open.c: Likewise.
13051         * sem_post.c: Removed.
13052         * sem_wait.c: Removed.
13053         * sem_trywait.c: Removed.
13054         * sem_timedwait.c: Removed.
13055         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
13056         Includes full implementations of sem_post, sem_wait, sem_trywait,
13057         and sem_timedwait.
13058         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
13059         for new implementation.
13060         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
13061         and waiters fields.
13063         * tst-sem3.c: Improve error message.
13064         * tst-signal3.c: Likewise.
13066         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
13067         to tell the kernel about the termination futex and to initialize tid
13068         member.  Don't initialize main_thread.
13069         * descr.h (struct pthread): Remove main_thread member.
13070         * cancelllation.c (__do_cancel): Remove code handling main thread.
13071         The main thread is not special anymore.
13073         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
13074         size of the stacks to stack_cache_actsize.
13076         * pt-readv.c: Add missing "defined".
13077         * pt-sigwait.c: Likewise.
13078         * pt-writev.c: Likewise.
13080 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
13082         * Versions: Export __connect from libpthread.
13083         Patch by Luca Barbieri <ldb@ldb.ods.org>.
13085         * Makefile (libpthread-routines): Add pt-raise.
13086         * sysdeps/unix/sysv/linux/raise.c: New file.
13087         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
13088         * sysdeps/generic/pt-raise.c: New file.
13090         * pthread_cond_init.c: Initialize all data elements of the condvar
13091         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
13093         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
13094         * pthread_create.c: Likewise.
13096         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
13097         * tst-key1.c: New file.
13098         * tst-key2.c: New file.
13099         * tst-key3.c: New file.
13101         * Versions: Export pthread_detach for version GLIBC_2.0.
13102         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
13104 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
13106         * pthread_key_create.c: Terminate search after an unused key was found.
13107         Patch by Luca Barbieri <ldb@ldb.ods.org>.
13109         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
13110         Patch by Luca Barbieri <ldb@ldb.ods.org>.
13112 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
13114         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
13115         dynamic lookup for errno in PIC.
13117         * allocatestack.c (get_cached_stack): Rearrange code slightly to
13118         release the stack lock as soon as possible.
13119         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
13120         the static TLS block.
13121         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
13123         * cancellation.c: Renamed from cancelation.c.
13124         * Makefile: Adjust accordingly.
13125         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
13126         * cleanup_defer.c: Use CANCELLATION_P.
13127         * pthread_testcancel.c: Likewise.
13128         * descr.h: Fix spelling in comments.
13129         * init.c: Likewise.
13130         * pthread_getattr_np.c: Likewise.
13131         * pthread_getschedparam.c: Likewise.
13132         * pthread_setschedparam.c: Likewise.
13133         * Versions: Likewise.
13135         * pt-pselect.c: New file.
13136         * Makefile (libpthread-routines): Add pt-pselect.
13137         * Versions: Add pselect.
13139         * tst-cancel4.c: New file.
13140         * Makefile (tests): Add tst-cancel4.
13142 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
13144         * pthread_mutex_lock.c: Always record lock ownership.
13145         * pthread_mutex_timedlock.c: Likewise.
13146         * pthread_mutex_trylock.c: Likewise.
13148         * pt-readv.c: New file.
13149         * pt-writev.c: New file.
13150         * pt-creat.c: New file.
13151         * pt-msgrcv.c: New file.
13152         * pt-msgsnd.c: New file.
13153         * pt-poll.c: New file.
13154         * pt-select.c: New file.
13155         * pt-sigpause.c: New file.
13156         * pt-sigsuspend.c: New file.
13157         * pt-sigwait.c: New file.
13158         * pt-sigwaitinfo.c: New file.
13159         * pt-waitid.c: New file.
13160         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
13161         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
13162         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
13163         * Versions: Add all the new functions.
13165         * tst-exit1.c: New file.
13166         * Makefile (tests): Add tst-exit1.
13168         * sem_timedwait.c: Minor optimization for more optimal fastpath.
13170 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
13172         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
13174         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
13175         call.  pthread_join is an official cancellation point.
13176         * pthread_timedjoin.c: Likewise.
13178         * pthread_cond_wait.c: Revert order in which internal lock are dropped
13179         and the condvar's mutex are retrieved.
13180         * pthread_cond_timedwait.c: Likewise.
13181         Reported by dice@saros.East.Sun.COM.
13183 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
13185         * pthreadP.h: Cut out all type definitions and move them...
13186         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
13187         * pthreadP.h: Include <internaltypes.h>.
13189         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
13190         performance tweaks.
13192         * sem_trywait.c: Shuffle #includes around to get right order.
13193         * sem_timedwait.c: Likewise.
13194         * sem_post.c: Likewise.
13195         * sem_wait.c: Likewise.
13197         * nptl 0.3 released.
13199         * Makefile (tests): Add tst-signal3.
13200         * tst-signal3.c: New file.
13202 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
13204         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
13205         the asms modify the sem object.
13206         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
13208         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
13209         the actual members.
13210         * pthreadP.h (struct sem): New type.  Actual semaphore type.
13211         * semaphoreP.h: Include pthreadP.h.
13212         * sem_getvalue.c: Adjust to sem_t change.
13213         * sem_init.c: Likewise.
13214         * sem_open.c: Likewise.
13215         * sem_post.c: Likewise.
13216         * sem_timedwait.c: Likewise.
13217         * sem_trywait.c: Likewise.
13218         * sem_wait.c: Likewise.
13220 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
13222         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
13223         * tst-basic2.c: New file.
13224         * tst-exec1.c: New file.
13225         * tst-exec2.c: New file.
13226         * tst-exec3.c: New file.
13228         * tst-fork1.c: Remove extra */.
13230         * nptl 0.2 released.  The API for IA-32 is complete.