Consistently include Makeconfig after defining subdir.
[glibc.git] / nptl / ChangeLog
bloba1d0f11d4b228285fc2b2426b635234ff5e6786a
1 2014-02-26  Joseph Myers  <joseph@codesourcery.com>
3         * Makefile: Include Makeconfig immediately after defining subdir.
5 2014-02-21  Joseph Myers  <joseph@codesourcery.com>
7         * Makefile ($(objpfx)tst-stack3-mem): Use $(evaluate-test).
8         ($(objpfx)tst-tls6.out): Likewise.
9         ($(objpfx)tst-cleanup0.out): Likewise.
10         ($(objpfx)tst-cleanup0-cmp.out): Likewise.
11         ($(objpfx)tst-cancel-wrappers.out): Likewise.
12         ($(objpfx)tst-oddstacklimit.out): Likewise.
14 2014-02-14  Joseph Myers  <joseph@codesourcery.com>
16         * Makefile ($(objpfx)tst-cleanup0.out): Do not run cmp.
17         [$(run-built-tests) = yes] (tests): Depend on
18         $(objpfx)tst-cleanup0-cmp.out.
19         ($(objpfx)tst-cleanup0-cmp.out): New rule.
21 2014-02-10  Ondřej Bílka  <neleai@seznam.cz>
23         * allocatestack.c (queue_stack, allocate_stack,
24         __deallocate_stack, __reclaim_stacks): Use glibc_likely instead
25         __builtin_expect.
26         * cancellation.c (__pthread_enable_asynccancel,
27         __pthread_disable_asynccancel): Likewise.
28         * cleanup_defer.c (__pthread_register_cancel_defer,
29         __pthread_unregister_cancel_restore): Likewise.
30         * cleanup_defer_compat.c (_pthread_cleanup_push_defer,
31         _pthread_cleanup_pop_restore): Likewise.
32         * cond-perf.c (main): Likewise.
33         * nptl-init.c (sigcancel_handler, sighandler_setxid): Likewise.
34         * perf.c (get_clockfreq): Likewise.
35         * pthread_barrier_destroy.c (pthread_barrier_destroy): Likewise.
36         * pthread_barrier_init.c (pthread_barrier_init): Likewise.
37         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
38         * pthread_cond_wait.c (__pthread_cond_wait): Likewise.
39         * pthread_create.c (__free_tcb, start_thread, __pthread_create_2_1):
40         Likewise.
41         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
42         * pthread_getspecific.c (__pthread_getspecific): Likewise.
43         * pthread_join.c (pthread_join): Likewise.
44         * pthread_key_delete.c (pthread_key_delete): Likewise.
45         * pthread_mutex_init.c (__pthread_mutex_init): Likewise.
46         * pthread_mutex_lock.c (__pthread_mutex_lock,
47         __pthread_mutex_lock_full): Likewise.
48         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
49         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
50         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
51         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
52         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
53         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
54         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
55         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
56         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
57         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
58         * pthread_setspecific.c (__pthread_setspecific): Likewise.
59         * sem_init.c (__new_sem_init): Likewise.
60         * sem_open.c (__where_is_shmfs): Likewise.
61         * sigaction.c: Likewise.
62         * sockperf.c (get_clockfreq): Likewise.
63         * sysdeps/pthread/createthread.c (do_clone, create_thread): Likewise.
64         * sysdeps/pthread/setxid.h: Likewise.
65         * sysdeps/pthread/timer_create.c (timer_create): Likewise.
66         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init,
67         __unwind_freeres, _Unwind_Resume, __gcc_personality_v0,
68         _Unwind_ForcedUnwind): Likewise.
69         * sysdeps/unix/sysv/linux/getpid.c (__getpid): Likewise.
70         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
71         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Likewise.
72         * sysdeps/unix/sysv/linux/mq_notify.c (mq_notify): Likewise.
73         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
74         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Likewise.
75         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
76         (__pthread_setaffinity_new): Likewise.
77         * sysdeps/unix/sysv/linux/pthread_sigqueue.c (pthread_sigqueue):
78         Likewise.
79         * sysdeps/unix/sysv/linux/pt-raise.c (raise): Likewise.
80         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
81         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_robust_trylock,
82         __lll_robust_lock, __lll_cond_lock, __lll_robust_timedlock): Likewise.
83         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (__lll_lock,
84         __lll_cond_lock, __lll_timedlock, __lll_robust_timedlock): Likewise.
85         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c
86         (pthread_barrier_destroy): Likewise.
87         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c
88         (pthread_barrier_init): Likewise.
89         * sysdeps/unix/sysv/linux/sparc/sem_init.c (__new_sem_init): Likewise.
90         * sysdeps/unix/sysv/linux/x86_64/timer_create.c (__timer_create_old):
91         Likewise.
92         * unwind.c (unwind_stop): Likewise.
94 2014-02-08  Mike Frysinger  <vapier@gentoo.org>
96         * sem_open.c (__where_is_shmfs): Compare f.f_type to RAMFS_MAGIC too.
98 2014-02-05  Carlos O'Donell  <carlos@redhat.com>
100         * sysdeps/unix/sysv/linux/tst-setgetname.c (do_test): Skip the
101         test if !__ASSUME_PROC_PID_TASK_COMM and get_self_comm returns
102         ENOENT.
104 2014-01-23  Stefan Liebler  <stli@linux.vnet.ibm.com>
106         * tst-tls7.c: Adjust testcase timeout
108 2014-01-18  H.J. Lu  <hongjiu.lu@intel.com>
110         [BZ #14782]
111         * tst-cancel-wrappers.sh: Remove system.
113 2014-01-11  Paul Pluzhnikov  <ppluzhnikov@google.com>
115         * tst-tls7.c (action): New function.
116         (do_test): Call it.
117         * tst-tls7mod.c (action): Move sem_post to caller.
119 2011-12-12  Adhemerval Zanella  <azanella@linux.vnet.ibm.com>
121         * sysdeps/powerpc/tls.h (struct tcbhead_t): Add DSO and TAR fields.
122         * nptl/sysdeps/powerpc/tcb-offsets.sym: Likewise.
124 2013-12-09  Carlos O'Donell  <carlos@redhat.com>
126         * sysdeps/unix/sysv/linux/tst-setgetname.c: New file.
127         * sysdeps/unix/sysv/linux/Makefile (tests): Add tst-setgetname.
129 2013-12-09  Andreas Schwab  <schwab@suse.de>
131         [BZ #15843]
132         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
133         (__pthread_cond_timedwait): Remove wrong cfi_adjust_cfa_offset
134         before __condvar_tw_cleanup2 label.
136 2013-12-04  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
138         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
139         (CANCEL_FRAMESIZE, CANCEL_PARM_SAVE): New macros to save parameters
140         into our own stack frame instead of the caller's.
141         (PSEUDO): Use them.  Use symbolic stack frame offsets.
142         (DOCARGS_1, UNDOCARGS_1): Use CANCEL_PARM_SAVE.
143         (DOCARGS_2, UNDOCARGS_2): Likewise.
144         (DOCARGS_3, UNDOCARGS_3): Likewise.
145         (DOCARGS_4, UNDOCARGS_4): Likewise.
146         (DOCARGS_5, UNDOCARGS_5): Likewise.
147         (DOCARGS_6, UNDOCARGS_6): Likewise.
149 2013-11-26  Ondřej Bílka  <neleai@seznam.cz>
151         * sysdeps/i386/tls.h: Use __glibc_reserved instead __unused.
152         * sysdeps/x86_64/tls.h: Likewise.
154 2013-11-25  Paul Pluzhnikov  <ppluzhnikov@google.com>
156         [BZ #11214]
157         * Makefile (tst-getpid2-ENV): New variable.
159 2013-11-20  Paul Pluzhnikov  <ppluzhnikov@google.com>
161         * Makefile (tst-cleanup2, tst-cleanupx2): Add -fno-builtin
163 2013-10-30  Mike Frysinger  <vapier@gentoo.org>
165         * sysdeps/pthread/configure.in: Moved to ...
166         * sysdeps/pthread/configure.ac: ... here.
167         * sysdeps/x86_64/configure.in: Moved to ...
168         * sysdeps/x86_64/configure.ac: ... here.
169         * sysdeps/pthread/configure: Regenerated.
170         * sysdeps/x86_64/configure: Likewise.
172 2013-10-04  Maciej W. Rozycki  <macro@codesourcery.com>
174         * tst-mutex8.c (check_type) [ENABLE_PI]: Handle ENOTSUP failure
175         from pthread_mutex_init.
177 2013-10-01  Siddhesh Poyarekar  <siddhesh@redhat.com>
179         [BZ #15988]
180         * pthread_cond_broadcast.c (__pthread_cond_broadcast)
181         [lll_futex_cmp_requeue_pi && __ASSUME_REQUEUE_PI]: Use
182         USE_REQUEUE_PI.
183         * pthread_cond_signal.c (__pthread_cond_signal)
184         [lll_futex_cmd_requeue_pi && __ASSUME_REQUEUE_PI]: Likewise.
186 2013-09-27  Siddhesh Poyarekar  <siddhesh@redhat.com>
188         * sysdeps/pthread/bits/libc-lock.h [_LIBC && (!NOT_IN_libc ||
189         IS_IN_libpthread)] (__libc_lock_fini_recursive): Use the mutex
190         member of the argument.
191         (__libc_lock_trylock_recursive): Likewise.
192         (__libc_lock_unlock_recursive): Likewise.
194 2013-09-04  Joseph Myers  <joseph@codesourcery.com>
196         * sysdeps/unix/sysv/linux/x86_64/cancellation.S
197         [SHARED && DO_VERSIONING && !NO_HIDDEN]: Change conditional to
198         [SHARED && !NO_HIDDEN].
200 2013-09-03  Siddhesh Poyarekar  <siddhesh@redhat.com>
202         [BZ #15921]
203         * tst-cleanup2.c (do_test): New volatile variable RET to
204         return success.
206 2013-08-30   Ondřej Bílka  <neleai@seznam.cz>
208         * sysdeps/pthread/pthread.h: Fix typos.
209         * sysdeps/unix/sysv/linux/internaltypes.h: Likewise.
210         * tst-cancel4.c: Likewise.
212 2013-08-21   Ondřej Bílka  <neleai@seznam.cz>
214         * pthread_getschedparam.c: Fix typos.
215         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
217 2013-07-23  David S. Miller  <davem@davemloft.net>
219         * tst-cancel4.c (WRITE_BUFFER_SIZE): Adjust comment.
221 2013-07-22  David S. Miller  <davem@davemloft.net>
223         * tst-cancel4.c (WRITE_BUFFER_SIZE): Increase to 16384.
225 2013-07-19  Dominik Vogt  <vogt@de.ibm.com>
227         * pthread_mutex_lock.c: Fix whitespace.
228         * pthread_mutex_trylock.c: Likewise.
229         * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: Likewise.
230         * sysdeps/unix/sysv/linux/x86/elision-conf.c: Likewise.
231         * sysdeps/unix/sysv/linux/x86/elision-conf.h: Likewise.
232         * sysdeps/unix/sysv/linux/x86/elision-lock.c: Likewise.
233         * sysdeps/unix/sysv/linux/x86/elision-timed.c: Likewise.
234         * sysdeps/unix/sysv/linux/x86/elision-trylock.c: Likewise.
235         * sysdeps/unix/sysv/linux/x86/force-elision.h: Likewise.
236         * sysdeps/unix/sysv/linux/x86/hle.h: Likewise.
237         * sysdeps/unix/sysv/linux/x86/pthread_mutex_cond_lock.c: Likewise.
238         * sysdeps/unix/sysv/linux/x86/pthread_mutex_lock.c: Likewise.
239         * sysdeps/unix/sysv/linux/x86/pthread_mutex_timedlock.c: Likewise.
240         * sysdeps/unix/sysv/linux/x86/pthread_mutex_trylock.c: Likewise.
242         * sysdeps/unix/sysv/linux/x86/elision-conf.c:
243         Remove __rwlock_rtm_enabled and __rwlock_rtm_read_retries.
244         (elision_init): Don't set __rwlock_rtm_enabled.
245         * sysdeps/unix/sysv/linux/x86/elision-conf.h:
246         Remove __rwlock_rtm_enabled.
248 2013-07-03  H.J. Lu  <hongjiu.lu@intel.com>
250         * sysdeps/unix/sysv/linux/x86/init-arch.c: New file.
251         * sysdeps/unix/sysv/linux/x86/init-arch.h: Likewise.
253 2013-07-02  Andi Kleen <ak@linux.intel.com>
255         * sysdeps/unix/sysv/linux/x86/elision-conf.c (elision_init):
256           Check ENABLE_LOCK_ELISION.
258 2013-07-02  Andi Kleen  <ak@linux.intel.com>
260         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype):
261           Disable elision for PTHREAD_MUTEX_DEFAULT.
263 2013-07-02  Andi Kleen  <ak@linux.intel.com>
264             Hongjiu Lu  <hongjiu.lu@intel.com>
266         * pthread_mutex_lock.c
267         (__pthread_mutex_lock): Add lock elision support.
268         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
269         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
270         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
271         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
272         * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: Likewise.
273         * sysdeps/unix/sysv/linux/x86/Makefile: New file.
274         * sysdeps/unix/sysv/linux/x86/force-elision.h: New file
275         * sysdeps/unix/sysv/linux/x86/pthread_mutex_cond_lock.c: Likewise.
276         * sysdeps/unix/sysv/linux/x86/pthread_mutex_lock.c: Likewise.
277         * sysdeps/unix/sysv/linux/x86/pthread_mutex_timedlock.c: Likewise.
278         * sysdeps/unix/sysv/linux/x86/pthread_mutex_trylock.c: Likewise.
279         * sysdeps/unix/sysv/linux/x86/pthread_mutex_unlock.c: Likewise.
281 2013-07-02  Andi Kleen  <ak@linux.intel.com>
283         * tst-mutex5.c: Include config.h.
284           (do_test): Add checks for ENABLE_LOCK_ELISION.
285         * tst-mutex8.c: Include config.h
286           (tf): Add checks for ENABLE_LOCK_ELISION.
287           (check_type): Likewise.
289 2013-07-02  Andi Kleen  <ak@linux.intel.com>
291         * pthreadP.h: Add elision types.
292           (PTHREAD_MUTEX_TYPE_ELISION): Add.
293         * sysdeps/pthread/pthread.h: Add elision initializers.
294           (PTHREAD_MUTEX_ELISION_NP, PTHREAD_MUTEX_NO_ELISION_NP,
295            PTHREAD_MUTEX_PSHARED_NP): Add new flags.
296           (__PTHREAD_SPINS): Add.
298 2013-07-02  Andi Kleen  <ak@linux.intel.com>
299             Hongjiu Lu  <hongjiu.lu@intel.com>
301         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_timedwait_tid,
302           lll_timedlock_elision, __lll_lock_elision, __lll_unlock_elision,
303           __lll_trylock_elision, lll_lock_elision, lll_unlock_elision,
304           lll_trylock_elision): Add.
305         * sysdeps/unix/sysv/linux/x86/Makefile: Imply x86.
306         * sysdeps/unix/sysv/linux/x86/elision-conf.c: New file.
307         * sysdeps/unix/sysv/linux/x86/elision-conf.h: New file.
308         * sysdeps/unix/sysv/linux/x86/elision-lock.c: New file.
309         * sysdeps/unix/sysv/linux/x86/elision-timed.c: New file.
310         * sysdeps/unix/sysv/linux/x86/elision-trylock.c: New file.
311         * sysdeps/unix/sysv/linux/x86/elision-unlock.c: New file.
312         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_timedwait_tid,
313           lll_timedlock_elision, __lll_lock_elision, __lll_unlock_elision,
314           __lll_trylock_elision, lll_lock_elision, lll_unlock_elision,
315           lll_trylock_elision): Add.
316         * nptl/sysdeps/unix/sysv/linux/x86/hle.h: New file.
317         * elision-conf.h: New file.
319 2013-06-24  Vladimir Nikulichev  <v.nikulichev@gmail.com>
321         [BZ #12310]
322         * pthread_exit.c: Add reference to pthread_create.
324 2013-06-22  Joseph Myers  <joseph@codesourcery.com>
326         * pthread_getattr_default_np.c: Include <string.h>.
328 2013-06-15  Siddhesh Poyarekar  <siddhesh@redhat.com>
330         * Versions (libpthread): Add GLIBC_2.18.
331         (GLIBC_2.18): Add pthread_setattr_default_np and
332         pthread_getattr_default_np.
333         * allocatestack.c (allocate_stack): Synchronize read from
334         __default_pthread_attr.
335         (__reclaim_stacks): Initialize __default_pthread_attr_lock.
336         * nptl-init.c (__pthread_initialize_minimal_internal):
337         Synchronize write to __default_pthread_attr.
338         * pthreadP.h (__default_pthread_attr_lock): Declare.
339         * pthread_attr_getstacksize (__pthread_attr_getstacksize):
340         Synchronize read from __default_pthread_attr.
341         * pthread_create.c (__pthread_create_2_1): Make a local copy of
342         __default_pthread_attr.  Check value of flags in IATTR even if
343         input ATTR is NULL.
344         * pthread_getattr_default_np.c: New file.
345         * pthread_setattr_default_np.c: New file.
346         * sysdeps/pthread/pthread.h [__USE_GNU]
347         (pthread_getattr_default_np, pthread_setattr_default_np):
348         Declare.
349         * tst-default-attr.c: New test case.
350         * Makefile (libpthread-routines): Add
351         pthread_setattr_default_np and pthread_getattr_default_np.
352         (tests): Add tst-default-attr.
353         * vars.c (__default_pthread_attr_lock): Declare and initialize.
355 2013-06-13  Siddhesh Poyarekar  <siddhesh@redhat.com>
356             Carlos O'Donell  <carlos@redhat.com>
358         [BZ #15618]
359         * tst-pthread-attr-affinity: New test case.
360         * Makefile (tests): Add it.
361         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
362         (__pthread_attr_getaffinity_new): Copy minimum of source and
363         destination sizes to avoid a buffer overrun.
365 2013-06-10  Carlos O'Donell  <carlos@redhat.com>
367         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
368         (lll_futex_wake): Return syscall error.
369         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
370         (lll_futex_wake): Return syscall error.
372 2013-08-06   Ondřej Bílka  <neleai@seznam.cz>
374         * sysdeps/pthread/allocalim.h: (__libc_use_alloca): Fix warning.
376 2013-06-06   Ondřej Bílka  <neleai@seznam.cz>
378         * tst-cond22.c: Fix leading whitespaces.
379         * tst-umask1.c: Likewise.
381 2013-06-06  Joseph Myers  <joseph@codesourcery.com>
383         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Remove
384         trailing whitespace.
385         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Likewise.
386         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
387         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
388         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
389         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
390         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
391         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
392         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
393         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
394         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
395         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
396         * tst-mutexpp10.c: Likewise.
397         * tst-stackguard1.c: Likewise.
399 2013-05-31  Joseph Myers  <joseph@codesourcery.com>
401         * Makefile ($(objpfx)libpthread.so): Remove dependencies on libc
402         and ld.so.
404 2013-05-16  Ryan S. Arnold  <rsa@linux.vnet.ibm.com>
406         * pthread_create.c: Add missing #include <stdint.h> due to uint64_t or
407         uint32_t usage.
408         * sysdeps/pthread/createthread.c: Likewise.
410 2013-05-14  Andreas Jaeger  <aj@suse.de>
412         [BZ #10686]
413         * sysdeps/x86_64/tls.h (struct tcbhead_t): Add __private_ss field.
414         * sysdeps/i386/tls.h (struct tcbhead_t): Likewise.
416 2013-05-09  Andi Kleen  <ak@linux.intel.com>
418         * tst-mutex8.c (do_test): Check for ENABLE_PI.
420 2013-04-22  Siddhesh Poyarekar  <siddhesh@redhat.com>
422         * pthreadP.h (check_sched_policy_attr): New inline function.
423         (check_sched_priority_attr): Likewise.
424         (check_stacksize_attr): Likewise.
425         (__kernel_cpumask_size, __determine_cpumask_size): Declare
426         extern.
427         (check_cpuset_attr): New inline function.
428         * pthread_attr_setschedparam (__pthread_attr_setschedparam):
429         Use check_sched_priority_attr.
430         * pthread_attr_setschedpolicy.c
431         (__pthread_attr_setschedpolicy): Use check_sched_policy_attr.
432         * pthread_attr_setstack.c (__pthread_attr_setstack): Use
433         check_stacksize_attr.
434         * pthread_attr_setstacksize.c (__pthread_attr_setstacksize):
435         Likewise.
436         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
437         (__pthread_attr_setaffinity_new): Use check_cpuset_attr.
439 2013-04-11  Andreas Schwab  <schwab@suse.de>
441         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
442         (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
443         directly use absolute timeout.
445 2013-04-07  Carlos O'Donell  <carlos@redhat.com>
447         * sysdeps/unix/sysv/linux/sem_post.c: Include atomic.h.
449 2013-04-04  Siddhesh Poyarekar  <siddhesh@redhat.com>
451         [BZ #15337]
452         * sysdeps/unix/sysv/linux/x86_64/cancellation.S
453         [IS_IN_libpthread]
454         [SHARED && defined DO_VERSIONING && !defined NO_HIDDEN]: Mark
455         __pthread_unwind hidden.
457 2013-03-28  Roland McGrath  <roland@hack.frob.com>
459         * pthread_create.c (start_thread) [!SHARED]:
460         Call __call_tls_dtors only if it's not NULL.
462 2013-03-19  Siddhesh Poyarekar  <siddhesh@redhat.com>
464         * allocatestack.c (allocate_stack): Use __default_pthread_attr
465         instead of __default_stacksize.
466         * nptl-init.c (__pthread_initialize_minimal_internal):
467         Likewise.  Initialize guardsize.
468         * pthreadP.h (__default_pthread_attr): Declare.
469         * pthread_attr_getstacksize.c (__pthread_attr_getstacksize):
470         Use __default_pthread_attr instead of __default_stacksize.
471         * pthread_create.c (default_attr): Remove.
472         (__pthread_create_2_1): Use __default_pthread_attr instead of
473         default_attr.
474         * vars.c (__default_stacksize): Remove.
475         (__default_pthread_attr): New static variable to store
476         default thread attributes.
478 2013-03-18  Siddhesh Poyarekar  <siddhesh@redhat.com>
480         * pthread_barrier_init.c (default_attr): Rename to
481         default_barrierattr.
482         (pthread_barrier_init): Adjust for the rename.
483         * pthread_mutex_init.c (default_attr): Rename to
484         default_mutexattr.
485         (__pthread_mutex_init): Adjust for the rename.
486         * pthread_rwlock_init.c (default_attr): Rebane to
487         default_rwlockattr.
488         (__pthread_rwlock_init): Adjust for the rename.
490 2013-03-12  Carlos O'Donell  <carlos@redhat.com>
492         * sysdeps/unix/sysv/linux/lowlevellock.c: Include <atomic.h>.
494 2013-03-04  Roland McGrath  <roland@hack.frob.com>
496         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h:
497         Change multiple inclusion guard to _LINUX_I686_DL_SYSDEP_H.
498         Use #include_next.
499         (HAVE_DL_DISCOVER_OSVERSION): Remove definition, now redundant.
500         (RTLD_PRIVATE_ERRNO): Likewise.
501         (NEED_DL_SYSINFO, DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION):
502         Move macros and associated declaration to ...
503         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: ... here.
504         Change multiple include guard to _LINUX_I386_DL_SYSDEP_H.
505         Use #include_next.
507 2013-03-01  Carlos O'Donell  <carlos@redhat.com>
509         * Makefile (tests): Revert last change.
510         (tst-pthread-stack-env-ENV): Likewise.
511         * nptl-init.c (set_default_stacksize): Likewise.
512         (__pthread_initialize_minimal_internal): Likewise.
513         * tst-pthread-stack-env.c: Likewise.
515 2013-03-01  Siddhesh Poyarekar  <siddhesh@redhat.com>
517         * tst-oddstacklimit.c: Include stdlib.h.
519         * Makefile (tests): Add tst-pthread-stack-env.
520         (tst-pthread-stack-env-ENV): Set environment for test.
521         * nptl-init.c (set_default_stacksize): New function.
522         (__pthread_initialize_minimal_internal): Accept ARGC, ARGV and
523         ENVP.  Initialize __ENVIRON and set __DEFAULT_STACKSIZE.
524         * tst-pthread-stack-env.c: New test case.
526 2013-02-21  David S. Miller  <davem@davemloft.net>
528         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
529         (FUTEX_WAIT_REQUEUE_PI): Define.
530         (FUTEX_CMP_REQUEUE_PI): Likewise.
531         (lll_futex_wait_requeue_pi): Likewise.
532         (lll_futex_timed_wait_requeue_pi): Likewise.
533         (lll_futex_cmp_requeue_pi): Likewise.
535 2013-02-21  Carlos O'Donell  <carlos@redhat.com>
537         * sysdeps/unix/sysv/linux/fork.c: Fix comment typo.
539 2013-02-18  Siddhesh Poyarekar  <siddhesh@redhat.com>
541         * sysdeps/pthread/tst-timer.c: Include stdlib.h for declaration
542         of exit.
543         * tst-barrier4.c: Likewise.
544         * tst-robust7.c: Likewise.
546         [BZ #14920]
547         * pthreadP.h (USE_REQUEUE_PI): New macro to check if mutex is
548         PI-aware.
549         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Use
550         PI-aware futex operations if available and mutex is PI-aware.
551         * pthread_cond_signal.c (__pthread_cond_signal): Likewise.
552         * nptl/pthread_cond_timedwait.c (__pthread_cond_timedwait):
553         Likewise.
554         * pthread_cond_wait.c (__condvar_cleanup): Adjust lock if
555         cancellation occurred just after futex returned successfully
556         from a PI operation with the mutex held.
557         (__pthread_cond_wait): Use PI-aware futex operations if
558         available and mutex is PI-aware.
559         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
560         (FUTEX_WAIT_REQUEUE_PI): Define.
561         (FUTEX_CMP_REQUEUE_PI): Likewise.
562         (lll_futex_wait_requeue_pi): Likewise.
563         (lll_futex_timed_wait_requeue_pi): Likewise.
564         (lll_futex_cmp_requeue_pi): Likewise.
565         * nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h
566         (FUTEX_WAIT_REQUEUE_PI): Define.
567         (FUTEX_CMP_REQUEUE_PI): Likewise.
568         (lll_futex_wait_requeue_pi): Likewise.
569         (lll_futex_timed_wait_requeue_pi): Likewise.
570         (lll_futex_cmp_requeue_pi): Likewise.
571         * sysdeps/unix/sysv/linux/kernel-features.h: Define
572         __ASSUME_REQUEUE_PI for Linux version higher than 2.6.31.
574 2013-02-04  Andreas Schwab  <schwab@suse.de>
576         [BZ #14142]
577         * tst-cancel14.c: Include <sys/time.h>.
578         * tst-cancel15.c: Likewise.
579         * tst-mutex9.c: Include <stdint.h>, <stdlib.h> and <sys/time.h>.
580         * tst-stackguard1.c: Include <tls.h>
582 2013-01-16  Andreas Schwab  <schwab@suse.de>
584         [BZ #14327]
585         * sem_open.c (sem_open): Use __mktemp instead of mktemp.
587 2013-01-11  Carlos O'Donell  <codonell@redhat.com>
589         * allocatestack.c (allocate_stack): Add comment. Remove assert
590         on attr.
592 2013-01-11  H.J. Lu  <hongjiu.lu@intel.com>
594         * Makefile (tst-cancel7-ARGS: Replace $(host-built-program-cmd)
595         with $(host-test-program-cmd).
596         (tst-exec4-ARGS): Likewise.
597         (tst-stackguard1-ARGS): Likewise.
598         ($(objpfx)tst-tls6.out): Don't pass $(elf-objpfx) to tst-tls6.sh.
599         Replace $(rtld-installed-name) with $(test-via-rtld-prefix).
600         * tst-tls6.sh (elf_objpfx): Removed.
601         (rtld_installed_name): Renamed to ...
602         (test_via_rtld_prefix): This.
603         (tst_tls5): Prepend ${test_via_rtld_prefix}.
605 2013-01-02  Joseph Myers  <joseph@codesourcery.com>
607         * All files with FSF copyright notices: Update copyright dates
608         using scripts/update-copyrights.
610 2013-01-01  Joseph Myers  <joseph@codesourcery.com>
612         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Reformat
613         copyright notice.
615 2012-12-28  Andi Kleen  <ak@linux.intel.com>
617         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Convert
618         to prototype.
619         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock):
620         Likewise.
622 2012-12-27  David S. Miller  <davem@davemloft.net>
624         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
625         (lll_futex_timed_wait_bitset): New macro.
627 2012-12-27  Siddhesh Poyarekar  <siddhesh@redhat.com>
629         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (SYS_futex):
630         Remove definition.
631         (lll_futex_timed_wait): Replace assembly code with
632         INTERNAL_SYSCALL.
633         (lll_futex_timed_wait_bitset): Likewise.
634         (lll_futex_wake): Likewise.
635         (lll_futex_requeue): Likewise.
636         (lll_futex_wake_unlock): Likewise.
638 2012-12-08  Siddhesh Poyarekar  <siddhesh@redhat.com>
640         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind):
641         Declare LOCAL_VAR as char.
643 2012-12-04  Joseph Myers  <joseph@codesourcery.com>
645         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__old_sem_post):
646         Cast result of atomic_increment_val to (void) instead of storing
647         in otherwise-unused variable.
649 2012-12-03  Allan McRae  <allan@archlinux.org>
651         * Makefile (LDFLAGS-tst-cond24, LDFLAGS-tst-cond25): Remove.
653 2012-11-26  H.J. Lu  <hongjiu.lu@intel.com>
655         * unwind.c (__pthread_unwind): Pass address of unwind_cleanup
656         to THREAD_SETMEM.
657         * sysdeps/i386/tls.h: Include <libc-internal.h>.
658         (THREAD_SETMEM): Use cast_to_integer before casting to uint64_t.
659         (THREAD_SETMEM_NC): Likewise.
660         * sysdeps/x86_64/tls.h: Include <libc-internal.h>.
661         (THREAD_SETMEM): Use cast_to_integer before casting to uint64_t.
662         (THREAD_SETMEM_NC): Likewise.
664 2012-11-21  Joseph Myers  <joseph@codesourcery.com>
666         * sysdeps/unix/sysv/linux/sem_post.c (__old_sem_post): Cast result
667         of atomic_increment_val to (void) instead of storing in
668         otherwise-unused variable.
670         * pthread_cond_timedwait.c (__pthread_cond_timedwait)
671         [__NR_clock_gettime]: Cast result of INTERNAL_VSYSCALL to void
672         instead of storing in otherwise-unused variable.
674 2012-11-14  Marcus Shawcroft  <marcus.shawcroft@linaro.org>
676         * Makefile (CFLAGS-open.c, CFLAGS-open64.c, CFLAGS-pause.c)
677           (CFLAGS-recv.c, CFLAGS-send.c): Define.
679 2012-11-06  Chris Metcalf  <cmetcalf@tilera.com>
681         * tst-sem14.c (TIMEOUT): Set timeout to 10 seconds.
682         * tst-cond24.c (TIMEOUT): Increase from 10 to 20 seconds.
684 2012-11-05  Siddhesh Poyarekar  <siddhesh@redhat.com>
686         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Time out
687         if absolute timeout is negative.
688         [__ASSUME_FUTEX_CLOCK_REALTIME &&
689         lll_futex_timed_wait_bitset]: Use lll_futex_timed_wait_bitset.
690         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
691         Likewise.
692         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
693         Likewise.
694         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
695         (__lll_robust_timedlock_wait): Likewise.
696         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
697         (lll_futex_timed_wait_bitset): New macro.
698         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
699         (lll_futex_timed_wait_bitset): Likewise.
701 2012-11-03  David S. Miller  <davem@davemloft.net>
703         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (BUSY_WAIT_NOP):
704         Add missing spaces.
705         (__cpu_relax): Likewise.
707 2012-11-02  H.J. Lu  <hongjiu.lu@intel.com>
709         * sysdeps/x86_64/tls.h: Don't include <xmmintrin.h>.
710         (__128bits): New struct typedef.
711         (tcbhead_t): Replace __m128 with __128bits.
713 2012-10-30  Aurelien Jarno  <aurelien@aurel32.net>
714             Joseph Myers  <joseph@codesourcery.com>
716         * Makefile (tst-cancel7-ARGS): Use exec in --command argument.
718 2012-10-28  David S. Miller  <davem@davemloft.net>
720         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (BUSY_WAIT_NOP):
721         Define when we have v9 instructions available.
722         * sysdeps/unix/sysv/linux/sparc/sparc64/cpu_relax.S: New file.
723         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/cpu_relax.S: New
724         file.
725         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/Makefile: New
726         file.
727         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: Add cpu_relax
728         to libpthread-routines.
730 2012-10-25  Roland McGrath  <roland@hack.frob.com>
732         * tst-cond-except.c (TEST_FUNCTION): New macro.
734 2012-10-25  Joseph Myers  <joseph@codesourcery.com>
736         * Makefile ($(objpfx)tst-tls6.out): Use $(BASH) not $(SHELL) to
737         run tst-tls6.sh.
738         * tst-tls6.sh: Use /bin/bash not /bin/sh.
740 2012-10-25  Roland McGrath  <roland@hack.frob.com>
742         * tst-basic2.c (do_test): Return RESULT, not always zero.
744         * tst-cond25.c: Include <stdint.h>
745         (waiter): Add casts to uintptr_t between casting integer<->pointer.
746         (timed_waiter): Likewise.
747         (do_test_wait): Likewise.
748         * tst-cond-except.c (thr): Likewise.
749         (do_test): Use prototype definition.
751 2012-10-24  Joseph Myers  <joseph@codesourcery.com>
752             Jim Blandy  <jimb@codesourcery.com>
754         * Makefile ($(objpfx)tst-tls6.out): Pass $(test-wrapper-env) to
755         tst-tls6.sh.
756         * tst-tls6.sh (test_wrapper_env): New variable.  Use it to run
757         programs with LD_PRELOAD set.
759 2012-10-24  Roland McGrath  <roland@hack.frob.com>
761         * Makefile ($(objpfx)tst-cond11, $(objpfx)tst-cond19): Targets removed.
762         ($(objpfx)tst-sem5, $(objpfx)tst-cancel18): Likewise.
763         ((objpfx)tst-cancelx18, $(objpfx)tst-clock2): Likewise.
764         ($(objpfx)tst-rwlock14): Likewise.
766 2012-10-24  Joseph Myers  <joseph@codesourcery.com>
768         * Makefile (tests): Remove tst-oddstacklimit.
769         (test-srcs): New variable.
770         (tst-oddstacklimit-ENV): Remove.
771         [$(run-built-tests) = yes] (tests): Depend on
772         $(objpfx)tst-oddstacklimit.out.
773         [$(run-built-tests) = yes] ($(objpfx)tst-oddstacklimit.out): New
774         target.
775         * tst-oddstacklimit.c: Do not include "tst-basic1.c".  Use
776         setrlimit before executing tst-basic1 test passed to --command.
778 2012-10-23  Joseph Myers  <joseph@codesourcery.com>
780         * Makefile [$(cross-compiling) = no]: Change condition to
781         [$(run-built-tests) = yes].
783 2012-10-23  Jim Blandy  <jimb@codesourcery.com>
784             Joseph Myers  <joseph@codesourcery.com>
786         * Makefile (tst-cancel7-ARGS): Use $(host-built-program-cmd).
787         (tst-exec4-ARGS): Likewise.
788         (tst-stackguard1-ARGS): Likewise.
790 2012-10-21  Jim Blandy  <jimb@codesourcery.com>
791             Joseph Myers  <joseph@codesourcery.com>
793         * Makefile ($(objpfx)tst-cancel-wrappers.out): Pass $(NM) to
794         tst-cancel-wrappers.sh.
795         * tst-cancel-wrappers.sh: Use nm program given as first argument,
796         not hardcoded "nm".
798 2012-10-17  Siddhesh Poyarekar  <siddhesh@redhat.com>
800         * tst-cond25.c (do_test_wait): Don't check for return value from
801         pthread_cancel.
803 2012-10-16  Siddhesh Poyarekar  <siddhesh@redhat.com>
805         [BZ #14652]
806         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
807         (__condvar_tw_cleanup):  Adjust the mutex data structure if it
808         was locked by FUTEX_WAIT_REQUEUE_PI.
809         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait
810         (__condvar_w_cleanup): Likewise.
811         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
812         (__condvar_cleanup2): Likewise.
813         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
814         (__condvar_cleanup1): Likewise.
816 2012-10-10  Carlos O'Donell  <carlos@systemhalted.org>
818         * sysdeps/pthread/pthread.h [!(defined __GNUC__ &&
819         defined __EXCEPTIONS) && defined __USE_GNU]
820         (pthread_cleanup_push_defer_np): Fix formatting.
822 2012-10-10  Siddhesh Poyarekar  <siddhesh@redhat.com>
824         [BZ #14652]
825         * Makefile (tests): New test case tst-cond25.
826         (LDFLAGS-tst-cond25): Link tst-cond25 against librt.
827         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
828         (__condvar_tw_cleanup): Lock mutex only if we don't already
829         own it.
830         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
831         (__condvar_w_cleanup): Likewise.
832         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add TID_MASK.
833         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
834         (__condvar_cleanup2): Lock mutex only if we don't already
835         own it.
836         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
837         (__condvar_cleanup1): Likewise.
838         * tst-cond25.c: New test case.
840 2012-10-09  Roland McGrath  <roland@hack.frob.com>
842         * sysdeps/pthread/configure: Regenerated.
843         * sysdeps/x86_64/configure: Regenerated.
845 2012-10-05  David S. Miller  <davem@davemloft.net>
847         [BZ #14568]
848         * sysdeps/sparc/tls.h (DB_THREAD_SELF_INCLUDE): Delete.
849         (DB_THREAD_SELF): Use constants for the register offsets.  Correct
850         the case of a 64-bit debugger with a 32-bit inferior.
852 2012-10-05  H.J. Lu  <hongjiu.lu@intel.com>
854         [BZ #14557]
855         * Makefile (tests-static): Add tst-cancel24-static,
856         tst-cond8-static tst-mutex8-static, tst-mutexpi8-static,
857         tst-sem11-static and tst-sem12-static.
858         (tests): Likewise.
859         (LDLIBS-tst-cancel24-static): New macro.
860         * tst-cancel24-static.cc: New file.
861         * tst-cond8-static.c: Likewise.
862         * tst-mutex8-static.c: Likewise.
863         * tst-mutexpi8-static.c: Likewise.
864         * tst-sem11-static.c: Likewise.
865         * tst-sem12-static.c: Likewise.
867 2012-10-05  Siddhesh Poyarekar  <siddhesh@redhat.com>
869         [BZ #14417]
870         * Makefile (tests): New test case tst-cond24.
871         (LDFLAGS-tst-cond24): Link tst-cond24 against librt.
872         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
873         (__pthread_cond_timedwait): Unlock mutex before going back to
874         wait in PI case.
875         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
876         (__pthread_cond_wait): Likewise.  Revert handling of EAGAIN
877         return from futex_wait.
878         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
879         (__pthread_cond_timedwait): Unlock mutex before going back to
880         wait in PI case.  Set requeue_pi flag only if wait returned 0.
881         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
882         (__pthread_cond_wait): Likewise.  Revert handling of EAGAIN
883         return from futex_wait.
884         * tst-cond24.c: New test case.
886 2012-10-04  Roland McGrath  <roland@hack.frob.com>
888         * pthread_create.c (start_thread): Use __madvise, not madvise.
890 2012-10-02  H.J. Lu  <hongjiu.lu@intel.com>
892         * sysdeps/i386/tls.h: Update copyright years.
894 2012-10-02  Siddhesh Poyarekar  <siddhesh@redhat.com>
896         * pthread_create.c (start_thread): Fix clone flag name in
897         comment to CLONE_CHILD_CLEARTID.
898         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
899         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
900         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
901         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
902         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
903         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
905 2012-10-01  Siddhesh Poyarekar  <siddhesh@redhat.com>
907         [BZ #14477]
908         * Makefile (tests): Add tst-cond-except.
909         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
910         (__pthread_cond_timedwait): Mark instructions where %ebx is
911         incremented in PI case.
912         (.gcc_except_table): Add entry to jump to __condvar_tw_cleanup2
913         for the marked PI case instructions.
914         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
915         (__pthread_cond_wait): Mark instructions where %ebx is
916         incremented in PI case.
917         (.gcc_except_table): Add entry to jump to __condvar_w_cleanup2
918         for the marked PI case instructions.
919         * tst-cond-except.c: New test case.
921 2012-09-24  Dmitry V. Levin  <ldv@altlinux.org>
923         * tst-tls6.sh: Add "set -e".
924         * Makefile: Do not specify -e option when running testsuite
925         shell scripts.
927         * tst-tls6.sh: Add copyright header.
929 2012-09-24  H.J. Lu  <hongjiu.lu@intel.com>
931         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Add "()" when casting
932         to uint64_t for 64-bit store.
933         (THREAD_SETMEM_NC): Likewise.
935 2012-09-19  H.J. Lu  <hongjiu.lu@intel.com>
937         * sysdeps/i386/tls.h (THREAD_SETMEM): Cast to uint64_t for
938         64-bit store.
939         (THREAD_SETMEM_NC): Likewise.
941 2012-09-14  Jeff Law  <law@redhat.com>
943         [BZ #14583]
944         * sysdeps/pthread/pthread.h: Fix prototype of __sigsetjmp.
946 2012-09-13  H.J. Lu  <hongjiu.lu@intel.com>
948         [BZ #14576]
949         * sysdeps/pthread/bits/libc-lockP.h (__rtld_lock_init_recursive):
950         Removed.
952 2012-09-07  H.J. Lu  <hongjiu.lu@intel.com>
954         * Makefile (LDFLAGS-tst-cancel24): Renamed to ...
955         (LDLIBS-tst-cancel24): This.
957 2012-09-06  H.J. Lu  <hongjiu.lu@intel.com>
959         [BZ #14545]
960         * Makefile (tests-static): Add tst-cancel21-static.
961         (tests): Likewise.
962         * tst-cancel21-static.c: New file.
964 2012-09-01  Joseph Myers  <joseph@codesourcery.com>
966         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
967         [!__ASSUME_POSIX_CPU_TIMERS]: Remove conditional code.
968         [__NR_clock_getres]: Make code unconditional.
969         (pthread_getcpuclockid): Remove code left unreachable by removal
970         of conditionals.
972 2012-08-31  Joseph Myers  <joseph@codesourcery.com>
974         [BZ #14532]
975         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Use
976         atomic_compare_and_exchange_bool_rel.
977         * tst-sem14.c: New file.
978         * Makefile (tests): Add tst-sem14.
980 2012-08-15  Roland McGrath  <roland@hack.frob.com>
982         * Makefile (CFLAGS-flockfile.c): Use $(libio-mtsafe) instead
983         of -D_IO_MTSAFE_IO.
984         (CFLAGS-ftrylockfile.c, CFLAGS-funlockfile.c): Likewise.
985         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-fork.c): Likewise.
987 2012-08-16  Joseph Myers  <joseph@codesourcery.com>
989         * pthread_cond_timedwait.c (__pthread_cond_timedwait)
990         [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
991         * pthread_condattr_setclock.c (pthread_condattr_setclock)
992         [!__ASSUME_POSIX_TIMERS]: Likewise.
993         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
994         (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
995         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c
996         [!__ASSUME_POSIX_TIMERS]: Likewise.
997         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
998         (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Likewise.
999         * sysdeps/unix/sysv/linux/timer_create.c [__NR_timer_create]: Make
1000         code unconditional.
1001         [!__NR-timer_create]: Remove conditional code.
1002         (timer_create) [!__ASSUME_POSIX_TIMERS]: Likewise.
1003         * sysdeps/unix/sysv/linux/timer_delete.c [__NR_timer_delete]: Make
1004         code unconditional.
1005         [!__NR_timer_delete]: Remove conditional code.
1006         (timer_delete) [!__ASSUME_POSIX_TIMERS]: Likewise.
1007         * sysdeps/unix/sysv/linux/timer_getoverr.c
1008         [__NR_timer_getoverrun]: Make code unconditional.
1009         [!__NR_timer_getoverrun]: Remove conditional code.
1010         (timer_getoverrun) [!__ASSUME_POSIX_TIMERS]: Likewise.
1011         * sysdeps/unix/sysv/linux/timer_gettime.c [__NR_timer_gettime]:
1012         Make code unconditional.
1013         [!__NR_timer_gettime]: Remove conditional code.
1014         (timer_gettime) [!__ASSUME_POSIX_TIMERS]: Likewise.
1015         * sysdeps/unix/sysv/linux/timer_routines.c [__NR_timer_create]:
1016         Make code unconditional.
1017         [!__ASSUME_POSIX_TIMERS]: Remove conditional code.
1018         * sysdeps/unix/sysv/linux/timer_settime.c [__NR_timer_settime]:
1019         Make code unconditional.
1020         [!__NR_timer_settime]: Remove conditional code.
1021         (timer_settime) [!__ASSUME_POSIX_TIMERS]: Likewise.
1022         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1023         (__pthread_cond_timedwait) [!__ASSUME_POSIX_TIMERS]: Remove
1024         conditional code.
1026 2012-08-15  Tom de Vries  <vries@codesourcery.com>
1027             Maxim Kuvyrkov  <maxim@codesourcery.com>
1029         * sysdeps/pthread/bits/libc-lockP.h (__libc_lock_lock)
1030         (__libc_lock_trylock): Allow pre-existing definitions.
1032 2012-08-15  Maxim Kuvyrkov  <maxim@codesourcery.com>
1034         * pthread_spin_lock.c: New file.
1035         * pthread_spin_trylock.c: New file.
1037 2012-08-08  Joseph Myers  <joseph@codesourcery.com>
1039         * allocatestack.c (setxid_signal_thread) [__ASSUME_TGKILL]: Make
1040         code unconditional.
1041         (setxid_signal_thread) [!__ASSUME_TGKILL]: Remove conditional code.
1042         * pthread_cancel.c (pthread_cancel) [__ASSUME_TGKILL]: Make code
1043         unconditional.
1044         (pthread_cancel) [!__ASSUME_TGKILL]: Remove conditional code.
1045         * sysdeps/pthread/createthread.c (do_clone) [__ASSUME_TGKILL]:
1046         Make code unconditional.
1047         (do_clone) [!__ASSUME_TGKILL]: Remove conditional code.
1048         * sysdeps/unix/sysv/linux/pt-raise.c (raise) [__ASSUME_TGKILL ||
1049         __NR_tgkill]: Make code unconditional.
1050         (raise) [__ASSUME_TGKILL]: Likewise.
1051         (raise) [!__ASSUME_TGKILL]: Remove conditional code.
1052         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill)
1053         [__ASSUME_TGKILL]: Make code unconditional.
1054         (__pthread_kill) [!__ASSUME_TGKILL]: Remove conditional code.
1055         * sysdeps/unix/sysv/linux/raise.c (raise) [__ASSUME_TGKILL ||
1056         __NR_tgkill]: Make code unconditional.
1057         (raise) [__ASSUME_TGKILL]: Likewise.
1058         (raise) [!__ASSUME_TGKILL]: Remove conditional code.
1060 2012-08-07  Joseph Myers  <joseph@codesourcery.com>
1062         * sysdeps/pthread/createthread.c (create_thread)
1063         [!__ASSUME_NO_CLONE_DETACHED]: Remove conditional code.
1065 2012-08-03  Joseph Myers  <joseph@codesourcery.com>
1067         * nptl-init.c (sigcancel_handler) [__ASSUME_CORRECT_SI_PID]: Make
1068         code unconditional.
1069         (sighandler_setxid) [__ASSUME_CORRECT_SI_PID]: Likewise.
1071 2012-07-28  Siddhesh Poyarekar  <siddhesh@redhat.com>
1073         * tst-pthread-getattr.c (MAX_STACK_SIZE): New macro.
1074         (pagesize): New static variable.
1075         (allocate_and_test): Return MEM.  Rename parameter to TARGET.
1076         (check_stack_top): New local variables MEM and PAGEMASK.  Cap
1077         stack size to MAX_STACK_SIZE.  Call allocate_and_test for
1078         halfway up the stack top page.  Verify that the top page was
1079         written into.
1080         (do_test): Get pagesize using sysconf.
1082 2012-07-25  Andreas Schwab  <schwab@linux-m68k.org>
1084         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Remove pseudo_end
1085         label.
1086         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Likewise.
1087         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO):
1088         Likewise.
1090 2012-07-25  Siddhesh Poyarekar  <siddhesh@redhat.com>
1092         * tst-pthread-getattr.c: Revert last change.
1094 2012-07-20  Siddhesh Poyarekar  <siddhesh@redhat.com>
1096         * tst-pthread-getattr.c (MAX_STACK_SIZE): New max cap for stack
1097         size.
1098         (_MIN): New macro.
1099         (allocate_and_test): Return STACKADDR.  Access STACKADDR instead
1100         of MEM to test.
1101         (check_stack_top): Read valued written into STACKADDR in
1102         allocate_and_test.  Cap stack size to MAX_STACK_SIZE.
1104 2012-07-19  Siddhesh Poyarekar  <siddhesh@redhat.com>
1106         * nptl-init.c (sighandler_setxid): Fix the comment that
1107         describes it.
1109 2012-06-23  Thomas Schwinge  <thomas@codesourcery.com>
1111         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
1112         (__lll_robust_timedlock_wait): Simplify CFI directives.
1114 2012-06-20  Siddhesh Poyarekar  <siddhesh@redhat.com>
1116         [BZ #12416]
1117         * Makefile (tests): Add test case.
1118         * pthread_getattr_np.c (pthread_getattr_np): Deduct pages below
1119         the __libc_stack_end page from stacksize.  Truncate stacksize to
1120         make it page aligned when it is computed from RLIMIT_STACK.
1121         * tst-pthread-getattr.c: New test case. Verify that stackaddr is
1122         accessible.
1124 2012-06-07  Carlos Sánchez de La Lama  <csanchezdll@gmail.com>
1126         [BZ #14205]
1127         * sysdeps/sparc/sparc32/pthread_spin_lock.S: Do not use v9
1128         branches.
1130 2012-06-04  Siddhesh Poyarekar  <siddhesh@redhat.com>
1131             Jakub Jelinek  <jakub@redhat.com>
1133         [BZ #14188]
1134         * sysdeps/pthread/pthread.h
1135         [!(defined __GNUC__ && defined __EXCEPTIONS)]
1136         (pthread_cleanup_push, pthread_cleanup_push_defer_np): Use
1137         __libc_unlikely instead of __builtin_expect.
1139 2012-05-30  H.J. Lu  <hongjiu.lu@intel.com>
1141         [BZ #14117]
1142         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Removed.
1143         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
1144         * sysdeps/unix/sysv/linux/i386/Implies: New file.
1145         * sysdeps/unix/sysv/linux/x86_64/Implies: Likewise.
1146         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Renamed
1147         to ...
1148         * sysdeps/unix/sysv/linux/x86/bits/pthreadtypes.h: This.
1149         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Renamed
1150         to ...
1151         * sysdeps/unix/sysv/linux/x86/bits/semaphore.h: This.
1153 2012-05-30  Andreas Schwab  <schwab@linux-m68k.org>
1155         [BZ #14132]
1156         * nptl-init.c (pthread_functions): Remove use of INTUSE and
1157         _internal aliases.
1158         (__pthread_initialize_minimal_internal): Likewise.
1159         * sem_open.c: Likewise.
1160         * sem_unlink.c: Likewise.
1161         * pthreadP.h: Replace _internal aliases by hidden_proto
1162         declarations.
1163         * pthread_getspecific.c: Replace _internal alias by hidden_def.
1164         * pthread_key_create.c: Likewise.
1165         * pthread_mutex_destroy.c: Likewise.
1166         * pthread_mutex_init.c: Likewise.
1167         * pthread_mutex_lock.c: Likewise.
1168         * pthread_mutex_unlock.c: Likewise.
1169         * pthread_once.c: Likewise.
1170         * pthread_rwlock_rdlock.c: Likewise.
1171         * pthread_rwlock_unlock.c: Likewise.
1172         * pthread_rwlock_wrlock.c: Likewise.
1173         * pthread_setspecific.c: Likewise.
1174         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
1175         Likewise.
1176         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1177         Likewise.
1178         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1179         Likewise.
1180         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1181         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
1182         * sysdeps/unix/sysv/linux/s390/pthread_once.c: Likewise.
1183         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Likewise.
1184         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
1185         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1186         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1187         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
1188         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
1189         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
1190         Likewise.
1191         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
1192         Likewise.
1193         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
1194         Likewise.
1196 2012-05-27  Chung-Lin Tang  <cltang@codesourcery.com>
1198         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO, LOAD_ARGS_1)
1199         (LOAD_ARGS_2 ,LOAD_ARGS_3 ,LOAD_ARGS_4): Add CFI restores.
1201         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_lock_wait_private)
1202         (__lll_lock_wait, __lll_timedlock_wait, __lll_timedwait_tid): Add CFI
1203         directives.
1204         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S
1205         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Likewise.
1206         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
1207         (pthread_barrier_wait): Likewise.
1208         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
1209         (__pthread_cond_broadcast): Likewise.
1210         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
1211         (__pthread_cond_signal): Likewise.
1212         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1213         (__pthread_cond_timedwait): Likewise.
1214         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S (__pthread_cond_wait):
1215         Likewise.
1216         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S
1217         (__pthread_rwlock_rdlock): Likewise.
1218         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
1219         (pthread_rwlock_timedrdlock): Likewise.
1220         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
1221         (pthread_rwlock_timedwrlock): Likewise.
1222         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S
1223         (__pthread_rwlock_unlock): Likewise.
1224         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S
1225         (__pthread_rwlock_wrlock): Likewise.
1226         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post): Likewise.
1227         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
1228         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
1229         Likewise.
1230         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
1232 2012-05-26  Siddhesh Poyarekar  <siddhesh@redhat.com>
1234         [BZ #12416]
1235         * nptl/pthread_getattr_np.c (pthread_getattr_np): Use
1236         __libc_stack_end rounded to the end of containing page as the
1237         real stack end.
1239 2012-05-25  Rayson Ho  <rho@redhat.com>
1241         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Low-level SystemTap
1242         probes for i386.
1243         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1244         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1245         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
1246         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
1247         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1248         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1249         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1250         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1252 2012-05-25  Rayson Ho  <rho@redhat.com>
1253             Roland McGrath  <roland@hack.frob.com>
1255         * DESIGN-systemtap-probes.txt: New file.
1256         * pthread_cond_broadcast.c: SystemTap probes.
1257         * pthread_cond_init.c: Likewise.
1258         * pthread_cond_signal.c: Likewise.
1259         * pthread_cond_wait.c: Likewise.
1260         * pthread_cond_destroy.c: Likewise.
1261         * pthread_create.c: Likewise.
1262         * pthread_join.c: Likewise.
1263         * pthread_mutex_destroy.c: Likewise.
1264         * pthread_mutex_init.c: Likewise.
1265         * pthread_mutex_lock.c: Likewise.
1266         * pthread_mutex_timedlock.c: Likewise.
1267         * pthread_mutex_unlock.c: Likewise.
1268         * pthread_rwlock_destroy.c: Likewise.
1269         * pthread_rwlock_rdlock.c: Likewise.
1270         * pthread_rwlock_unlock.c: Likewise.
1271         * pthread_rwlock_wrlock.c: Likewise.
1272         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1273         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1274         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
1275         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
1276         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1277         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1278         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1279         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1281 2012-05-24  Roland McGrath  <roland@hack.frob.com>
1283         * pthread_create.c (start_thread): Define pthread_start LIBC_PROBE.
1285 2012-05-17  Andreas Jaeger  <aj@suse.de>
1287         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
1288         (HAVE_DL_DISCOVER_OSVERSION): Don't declare _dl_discover_osversion
1289         only for older kernels.
1291 2012-05-15  Joseph Myers  <joseph@codesourcery.com>
1293         * pthreadP.h [!__NR_set_robust_list] (__NR_set_robust_list): Do
1294         not define.
1296 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1298         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_lock): Load
1299         futex pointer into RDI_LP.  Use RSP_LP to operate on stack.
1300         (lll_robust_lock): Likewise.
1301         (lll_cond_lock): Likewise.
1302         (lll_robust_cond_lock): Likewise.
1303         (lll_timedlock): Likewise.
1304         (lll_robust_timedlock): Likewise.
1305         (lll_unlock): Likewise.
1306         (lll_robust_unlock): Likewise.
1308 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1310         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use
1311         LP_OP(cmp) and RCX_LP on dep_mutex pointer.
1313 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1315         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Use LP_OP(op)
1316         on NWAITERS.
1317         (__gcc_personality_v0): Replace 8-byte data alignment with
1318         LP_SIZE alignment and .quad with ASM_ADDR.
1320 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1322         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Use LP_OP(op)
1323         on NWAITERS.
1324         (__gcc_personality_v0): Replace 8-byte data alignment with
1325         LP_SIZE alignment and .quad with ASM_ADDR.
1327 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1329         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Use LP_OP(cmp) on
1330         NWAITERS, which is unsigned long int.
1332 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1334         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
1335         (__gcc_personality_v0): Replace 8-byte data alignment with
1336         LP_SIZE alignment and .quad with ASM_ADDR.
1338 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1340         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Use
1341         LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer.  Load
1342         __vdso_clock_gettime pointer into RAX_LP.
1343         (__gcc_personality_v0): Replace 8-byte data alignment with
1344         LP_SIZE alignment and .quad with ASM_ADDR.
1346 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1348         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Use
1349         LP_OP(cmp), RSI_LP and R8_LP on dep_mutex pointer.  Load
1350         __vdso_clock_gettime pointer into RAX_LP.
1351         (__gcc_personality_v0): Replace 8-byte data alignment with
1352         LP_SIZE alignment and .quad with ASM_ADDR.
1354 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1356         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Use
1357         LP_OP(cmp) and R8_LP on dep_mutex pointer.
1359 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1361         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Use LP_OP(mov)
1362         to update pointer in memory.  Load pointer into RDI_LP.
1364 2012-05-15  H.J. Lu  <hongjiu.lu@intel.com>
1366         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1367         (LLL_STUB_UNWIND_INFO_START): Align label to LP_SIZE instead
1368         of 8.
1369         (LLL_STUB_UNWIND_INFO_END): Likewise.
1370         (lll_timedlock): Load timeout pointer into RDX_LP.
1371         (lll_robust_timedlock): Likewise.
1373 2012-05-15  Siddhesh Poyarekar  <siddhesh@redhat.com>
1374             Jakub Jelinek  <jakub@redhat.com>
1376         [BZ #13613]
1377         * Makefile (tests): Add test cases.
1378         * descr.h (struct pthread): Add a comment describing multiple_threads.
1379         * pthreadP.h (__pthread_multiple_threads): Expand comment to include
1380         single-process case.
1381         * pthread_cancel.c (pthread_cancel): Enable multiple_threads
1382         before setting cancelstate of the thread.
1383         * sysdeps/unix/sysv/linux/libc_multiple_threads.c
1384         (__libc_multiple_threads): Add explanatory comment.
1385         * tst-cancel-self-cancelstate.c: New test case.
1386         * tst-cancel-self-canceltype.c: Likewise.
1387         * tst-cancel-self-cleanup.c: Supporting file for test cases.
1388         * tst-cancel-self-testcancel.c: New test case.
1389         * tst-cancel-self.c: Likewise.
1390         * vars.c: Expand comment to include single-process case.
1392 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
1394         * sysdeps/x86_64/tls.h: Don't include <bits/wordsize.h>.
1395         (tcbhead_t): Remove __x86_64__ check.  Align rtld_savespace_sse
1396         to 32 bytes.
1398 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
1400         * sysdeps/pthread/pthread.h (__PTHREAD_RWLOCK_INT_FLAGS_SHARED):
1401         New.
1402         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Check
1403         __PTHREAD_RWLOCK_INT_FLAGS_SHARED instead of __WORDSIZE.
1405 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
1407         * shlib-versions: Move x86_64-.*-linux.* entry to ...
1408         * sysdeps/x86_64/64/shlib-versions: Here.  New file.
1409         * sysdeps/x86_64/x32/shlib-versions: New file.
1411 2012-05-14  H.J. Lu  <hongjiu.lu@intel.com>
1413         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Define x32
1414         __SIZEOF_PTHREAD_XXX_T.
1415         (__pthread_internal_list): Check __x86_64__ instead of __WORDSIZE.
1416         (pthread_mutex_t): Likewise.
1417         (pthread_rwlock_t): Likewise.
1418         (__PTHREAD_RWLOCK_INT_FLAGS_SHARED): New.  Defined if __x86_64__
1419         is defined.
1421 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
1423         * sysdeps/x86_64/x32/tls.h: New file.
1425 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
1427         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Use uint64_t on 64-bit
1428         integer.
1429         (THREAD_SETMEM_NC): Likewise.
1431 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
1433         * sysdeps/x86_64/tls.h (THREAD_SELF): Replace movq/%q0 with
1434         mov/%0.
1436 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
1438         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
1439         (__cleanup_fct_attribute): Check __x86_64__ instead of
1440         __WORDSIZE.
1442 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
1444         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER): Check
1445         __PTHREAD_MUTEX_HAVE_PREV instead of __WORDSIZE.
1446         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Likewise.
1447         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
1448         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
1450 2012-05-11  H.J. Lu  <hongjiu.lu@intel.com>
1452         * pthread_create.c (start_thread): Check __PTHREAD_MUTEX_HAVE_PREV
1453         instead of __WORDSIZE.
1455 2012-05-10  Thomas Schwinge  <thomas@schwinge.name>
1457         [BZ #3748]
1458         * sysdeps/pthread/bits/libc-lockP.h (__libc_once_get): New macro.
1460 2012-05-09  Chung-Lin Tang  <cltang@codesourcery.com>
1462         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
1463         (__pthread_cond_timedwait): Use CFI directives.
1464         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
1465         (__pthread_cond_wait): Likewise.
1466         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Likewise.
1467         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
1469 2012-05-03  David S. Miller  <davem@davemloft.net>
1471         * sysdeps/sparc/sparc64/pthread_spin_unlock.S: Fix thinko, we
1472         always have to return 0, especially for the pthread_spin_init
1473         alias.
1474         * sysdeps/sparc/sparc32/pthread_spin_lock.S: Add missing trailing
1475         newline.
1476         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: Likewise.
1477         * sysdeps/sparc/sparc64/pthread_spin_lock.S: Likewise.
1479 2012-05-02  David S. Miller  <davem@davemloft.net>
1481         * sysdeps/sparc/sparc64/pthread_spin_lock.S: New.
1482         * sysdeps/sparc/sparc64/pthread_spin_lock.c: Delete.
1483         * sysdeps/sparc/sparc64/pthread_spin_unlock.S: New.
1484         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: Delete.
1485         * sysdeps/sparc/sparc64/pthread_spin_trylock.S: New.
1486         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: Delete.
1487         * sysdeps/sparc/sparc64/pthread_spin_init.c: New.
1488         * sysdeps/sparc/sparc32/pthread_spin_lock.S: New.
1489         * sysdeps/sparc/sparc32/pthread_spin_lock.c: Delete.
1490         * sysdeps/sparc/sparc32/pthread_spin_trylock.S: New.
1491         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: Delete.
1492         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.S: New.
1493         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: Delete.
1494         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.S: New.
1495         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: Delete.
1496         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.S: New.
1497         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: Delete.
1498         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_init.c: New.
1500 2012-05-02  Allan McRae  <allan@archlinux.org>
1502         * Makefile: (LDFLAGS-tst-tls5): Use $(no-as-needed).
1503         (LDFLAGS-tst-cancel24): Likewise.
1505 2012-05-02  Paul Pluzhnikov  <ppluzhnikov@google.com>
1507         * sysdeps/i386/pthread_spin_lock.S: New.
1508         * sysdeps/i386/pthread_spin_lock.c: Delete.
1509         * sysdeps/x86_64/pthread_spin_lock.S: New.
1510         * sysdeps/x86_64/pthread_spin_lock.c: Delete.
1512 2012-04-28  Andreas Schwab  <schwab@linux-m68k.org>
1514         * Makefile ($(objpfx)tst-stack3-mem, $(objpfx)tst-tls6.out): Don't
1515         run when cross-compiling.
1517 2012-04-26  Siddhesh Poyarekar  <siddhesh@redhat.com>
1519         * sysdeps/pthread/unwind-forcedunwind.c: Include gnu/lib-names.h
1520         instead of libgcc_s.h.
1522 2012-04-20  Paul Pluzhnikov  <ppluzhnikov@google.com>
1524         * sysdeps/x86_64/tls.h (TLS_GET_FS, TLS_SET_FS): Delete.
1526 2012-03-27  David S. Miller  <davem@davemloft.net>
1528         * tst-cond16.c (do_test): Use a thread stack size which is either
1529         PTHREAD_STACK_MIN or the page size, whichever is larger.
1530         * tst-cond18.c (do_test): Likewise.
1532 2012-03-19  H.J. Lu  <hongjiu.lu@intel.com>
1534         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Use
1535         register char * __asm__("rsp") to get stack frame.
1537 2012-03-19  H.J. Lu  <hongjiu.lu@intel.com>
1539         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (SYS_futex): Use
1540         __NR_futex directly.
1542 2012-03-19  H.J. Lu  <hongjiu.lu@intel.com>
1544         * unwind.c (unwind_stop): Cast _Unwind_GetCFA return to
1545         _Unwind_Ptr first.
1547 2012-03-16  David S. Miller  <davem@davemloft.net>
1549         [BZ #13844]
1550         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: Include using <..>
1551         instead of "...".
1552         * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c:
1553         Delete, not needed.
1555 2012-03-15  David S. Miller  <davem@davemloft.net>
1557         [BZ #13844]
1558         * sysdeps/unix/sysv/linux/sparc/sparc32/libc-lowlevellock.c: New file.
1560 2012-03-09  Paul Eggert  <eggert@cs.ucla.edu>
1562         [BZ #13673]
1563         * pt-crti.S: Replace FSF snail mail address with URL.
1565 2012-03-09  Joseph Myers  <joseph@codesourcery.com>
1567         * sysdeps/pthread/pthread.h (__need_clockid_t, __need_timespec):
1568         Do not define before including <time.h>.
1570 2012-03-08  David S. Miller  <davem@davemloft.net>
1572         * sysdeps/unix/sysv/linux/sparc/sem_post.c: Update copyright year.
1574 2012-03-08  Thomas Schwinge  <thomas@codesourcery.com>
1576         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
1577         Check for timestamp before the Epoch.
1579         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait): Fix
1580         updating nwaiters.
1582         * tst-sem13.c (do_test): Add another test case.
1583         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1584         Fix updating nwaiters.
1586 2012-03-07  Joseph Myers  <joseph@codesourcery.com>
1588         [BZ #10545]
1589         * sysdeps/pthread/configure.in (libc_cv_forced_unwind): Change
1590         link test to a compile test.
1591         (libc_cv_c_cleanup): Likewise.  Declare puts rather than including
1592         <stdio.h>.
1593         * sysdeps/pthread/configure: Regenerated.
1595 2012-03-07  Ulrich Drepper  <drepper@gmail.com>
1597         * Makefile (distribute): Remove variable.
1599 2012-01-23  Thomas Schwinge  <thomas@codesourcery.com>
1601         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Get rid of
1602         superfluous assignment.
1603         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c (sem_timedwait):
1604         Likewise.
1605         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
1606         (sem_timedwait): Likewise.
1608 2012-03-06  Ulrich Drepper  <drepper@gmail.com>
1610         * sysdeps/pthread/bits/libc-lock.h: Move information not needed in
1611         installed headers to...
1612         * sysdeps/pthread/bits/libc-lockP.h: ...here.  New file.
1614 2012-03-06  David S. Miller  <davem@davemloft.net>
1616         * sysdeps/unix/sysv/linux/sparc/sem_post.c (__new_sem_post): Use
1617         atomic_increment and remove unused local variable.
1618         (__old_sem_post): Likewise.
1620 2012-02-27  David S. Miller  <davem@davemloft.net>
1622         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Don't refer to
1623         non-existing __pthread_attr.
1624         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1625         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1626         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1627         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1628         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1630 2012-02-26  Ulrich Drepper  <drepper@gmail.com>
1632         * sysdeps/pthread/pthread.h: Define __need_clockid_t for __USE_XOPEN2K.
1634         * sysdeps/pthread/pthread.h: Define __need_timespec before including
1635         <time.h>.
1636         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Name pthread_attr_t
1637         union.
1638         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1639         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
1640         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
1641         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
1642         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
1644 2012-02-21  Joseph Myers  <joseph@codesourcery.com>
1646         [BZ #13695]
1647         * Makefile (generated): Remove crti.S, crtn.S, defs.h and
1648         pt-initfini.s.
1649         [crti.S not in sysdirs] (omit-deps): Do not append.
1650         [crti.S not in sysdirs] (CFLAGS-pt-initfini.s): Remove variable.
1651         [crti.S not in sysdirs] (pt-initfini.c): Remove vpath directive.
1652         [crti.S not in sysdirs] ($(objpfx)crti.S): Remove rule.
1653         [crti.S not in sysdirs] ($(objpfx)crtn.S): Likewise.
1654         [crti.S not in sysdirs] ($(objpfx)defs.h): Likewise.
1655         [crti.S not in sysdirs] ($(objpfx)crti.o): Likewise.
1656         [crti.S not in sysdirs] ($(objpfx)crtn.o): Likewise.
1657         [crti.S in sysdirs] (extra-objs): Append unconditionally.
1658         [crti.S in sysdirs] ($(objpfx)crti.o): Define rule
1659         unconditionally.
1660         * sysdeps/pthread/pt-initfini.c: Remove file.
1662 2012-02-16  Richard Henderson  <rth@twiddle.net>
1664         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: Remove file.
1665         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: Remove file.
1667 2012-02-15  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1669         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: Remove file.
1671 2012-02-16  David S. Miller  <davem@davemloft.net>
1673         * sysdeps/sparc/Makefile: Add -fPIC when building pt-crti.S and crtn.S
1675 2012-02-15  Marek Polacek  <polacek@redhat.com>
1677         * sysdeps/unix/sysv/linux/x86_64/Makefile: Remove file.
1679 2012-02-09  Paul Eggert  <eggert@cs.ucla.edu>
1681         Replace FSF snail mail address with URLs, as per GNU coding standards.
1683 2012-02-08  Andreas Schwab  <schwab@linux-m68k.org>
1685         * Makefile (extra-objs) [crti.S in sysdirs]: Add pt-crti.o.
1687 2012-02-08  Joseph Myers  <joseph@codesourcery.com>
1689         Support crti.S and crtn.S provided directly by architectures.
1690         * Makefile [crti.S in sysdirs] (omit-deps): Do not append.
1691         [crti.S in sysdirs] (CFLAGS-pt-initfini.s): Do not define variable.
1692         [crti.S in sysdirs] ($(objpfx)pt-initfini.s): Disable rule.
1693         [crti.S in sysdirs] ($(objpfx)crti.S): Likewise.
1694         [crti.S in sysdirs] ($(objpfx)crtn.S): Likewise.
1695         [crti.S in sysdirs] ($(objpfx)defs.h): Likewise.
1696         [crti.S in sysdirs] ($(objpfx)crti.o): Likewise.
1697         [crti.S in sysdirs] ($(objpfx)crtn.o): Likewise.
1698         [crti.S in sysdirs] (pt-initfini.c): Remove vpath directive.
1699         [crti.S in sysdirs] ($(objpfx)crti.o): New rule.
1700         * pt-crti.S: New file.
1701         * sysdeps/unix/sysv/linux/i386/Makefile: Remove file.
1703 2012-02-03  Joseph Myers  <joseph@codesourcery.com>
1705         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
1706         macros for PIC register setup.
1707         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1708         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1709         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1710         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1711         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1713 2012-01-11  Marek Polacek  <polacek@redhat.com>
1715         * forward.c (FORWARD_NORETURN): Define macro.
1716         (__pthread_unwind): Use FORWARD_NORETURN macro to avoid warning.
1717         (__pthread_exit): Likewise.
1719 2012-01-10  Ulrich Drepper  <drepper@gmail.com>
1721         * sysdeps/pthread/pthread.h: Add const attribute to pthread_equal.
1723         * pthreadP.h: Add noreturn to __pthread_exit.
1724         * sysdeps/pthread/pthread-functions.h: Likewise for ptr___pthread_exit.
1726 2011-12-30  Adhemerval Zanella  <azanella@linux.vnet.ibm.com>
1728         * sysdeps/unix/sysv/linux/aio_misc.h (__aio_create_helper_thread):
1729         Call pthread_attr_setstacksize() with result of
1730         __pthread_get_minstack() to account for application TLS usage.
1732 2012-01-08  Marek Polacek  <polacek@redhat.com>
1734         * sysdeps/unix/sysv/linux/mq_notify.c: Include <nptl/pthreadP.h>.
1736 2012-01-07  Ulrich Drepper  <drepper@gmail.com>
1738         [BZ #13553]
1739         * pthreadP.h: Use const instead of __const.
1740         * semaphore.h: Likewise.
1741         * sysdeps/pthread/bits/libc-lock.h: Likewise.
1742         * sysdeps/pthread/bits/sigthread.h: Likewise.
1743         * sysdeps/pthread/pthread.h: Likewise.
1745         * Makefile: Remove elf=yes test, only ELF is supported.
1747         * shlib-versions: Remove entries for ports architectures.
1749         In case anyone cares, the IA-64 architecture could move to ports.
1750         * sysdeps/ia64/*: Removed.
1751         * sysdeps/unix/sysv/linux/ia64/*: Removed.
1753 2011-12-22  Ulrich Drepper  <drepper@gmail.com>
1755         * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread): Use
1756         __pthread_get_minstack.
1757         * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Likewise.
1759         [BZ #13088]
1760         * sysdeps/unix/sysv/linux/timer_routines.c: Get minimum stack size
1761         through __pthread_get_minstack.
1762         * nptl-init.c (__pthread_initialize_minimal_internal): Get page size
1763         directly from _rtld_global_ro.
1764         (__pthread_get_minstack): New function.
1765         * pthreadP.h: Declare __pthread_get_minstack.
1766         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_get_minstack.
1768 2011-12-21  Ulrich Drepper  <drepper@gmail.com>
1770         [BZ #13515]
1771         * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
1772         Correct reading name from file.
1774 2011-12-14  Carlos O'Donell  <carlos@systemhalted.org>
1776         * allocatestack.c (allocate_stack): Return errno on failure.
1778 2011-12-14  Jeff Law  <law@redhat.com>
1780         [BZ #5245]
1781         * pthread_create.c (__pthread_create_2_1): Translate ENOMEM to EAGAIN.
1783 2011-11-28  Andreas Schwab  <schwab@redhat.com>
1785         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Handle
1786         EAGAIN from FUTEX_WAIT_REQUEUE_PI.
1787         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1789 2011-11-15  Ulrich Drepper  <drepper@gmail.com>
1791         * pthread_getattr_np.c (pthread_getattr_np): Set FD_CLOEXEC for
1792         /proc/self/maps.
1794 2011-10-29  Ulrich Drepper  <drepper@gmail.com>
1796         [BZ #13358]
1797         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1798         (__pthread_cond_timedwait): Initialize %r15 correctly also for code
1799         path for kernels with FUTEX_CLOCK_REALTIME.
1800         Debugged by H.J. Lu <hjl.tools@gmail.com>.
1802 2011-10-27  Andreas Schwab  <schwab@redhat.com>
1804         [BZ #13344]
1805         * sysdeps/pthread/pthread.h: Use __THREADNL instead of __THREAD
1806         for memory synchronization functions.
1807         * semaphore.h: Likewise.
1809 2011-10-24  Ulrich Drepper  <drepper@gmail.com>
1811         * tst-cancel7.c: Avoid warning.
1812         * tst-mutex6.c: Likewise.
1813         * tst-mutex9.c: Likewise.
1814         * tst-mutexpi6.c: Likewise.
1816 2011-10-23  Ulrich Drepper  <drepper@gmail.com>
1818         * sysdeps/i386/tls.h: Remove #include <list.h>.
1820 2011-10-15  Ulrich Drepper  <drepper@gmail.com>
1822         * pthread_create.c (start_thread): Call __ctype_init.
1824 2011-09-15  Andreas Schwab  <schwab@redhat.com>
1826         * sysdeps/pthread/list.h: Define only list_t if __need_list_t is
1827         defined.
1828         (list_add): Add atomic_write_barrier.
1829         * descr.h: Define __need_list_t before including <list.h>.
1830         * nptl-init.c: Include <list.h>
1831         * allocatestack.c: Likewise.
1833 2011-09-11  Ulrich Drepper  <drepper@gmail.com>
1835         * sysdeps/i386/tls.h: Remove HAVE_TLS_SUPPORT test.
1836         * sysdeps/ia64/tls.h: Likewise.
1837         * sysdeps/powerpc/tls.h: Likewise.
1838         * sysdeps/s390/tls.h: Likewise.
1839         * sysdeps/sh/tls.h: Likewise.
1840         * sysdeps/sparc/tls.h: Likewise.
1841         * sysdeps/x86_64/tls.h: Likewise.
1843 2011-09-10  Ulrich Drepper  <drepper@gmail.com>
1845         * sysdeps/pthread/malloc-machine.h: Define MUTEX_INITIALIZER.
1847         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Don't handle
1848         !USE___THREAD.
1849         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1850         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
1851         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1852         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1853         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
1854         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
1855         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
1856         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
1857         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1858         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1859         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
1860         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1862         * tst-tls1.c: Support for __thread is now mandatory.
1863         * tst-tls2.c: Likewise.
1864         * tst-tls3.c: Likewise.
1865         * tst-tls3mod.c: Likewise.
1866         * tst-tls4.c: Likewise.
1867         * tst-tls4moda.c: Likewise.
1868         * tst-tls4modb.c: Likewise.
1869         * tst-tls5.h: Likewise.
1871 2011-09-08  Ulrich Drepper  <drepper@gmail.com>
1873         [BZ #12403]
1874         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
1875         (pthread_rwlock_timedwrlock): Use correct macro in test.
1876         Patch by H.J. Lu <hongjiu.lu@intel.com>.
1878 2011-09-06  Ulrich Drepper  <drepper@gmail.com>
1880         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait): Don't
1881         use gettimeofday vsyscall, just call gettimeofday.
1882         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1883         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
1884         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1885         Likewise.
1886         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1887         Likewise.
1888         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1889         Simplify __vdso_clock_gettime use.
1891 2011-09-05  David S. Miller  <davem@davemloft.net>
1893         * sysdeps/unix/sysv/linux/sem_timedwait.c (do_futex_timed_wait):
1894         New function.
1895         (sem_timedwait): Call it to force an exception region around
1896         the async cancel enable and the futex operation.
1897         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: Likewise.
1898         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: Likewise.
1899         * sysdeps/unix/sysv/linux/sem_wait.c (do_futex_wait): New function.
1900         (__new_sem_wait): Call it to force an exception region around
1901         the async cancel enable and the futex operation.
1902         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: Likewise.
1903         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: Likewise.
1905 2011-08-31  Andreas Schwab  <schwab@redhat.com>
1907         * allocatestack.c (setxid_mark_thread): Ensure that the exiting
1908         thread is woken up.
1910 2011-08-20  David S. Miller  <davem@davemloft.net>
1912         * Makefile (tst-cleanup0.out): Fix typo in output redirection.
1914 2011-08-14  Roland McGrath  <roland@hack.frob.com>
1916         * sysdeps/i386/pthreaddef.h (TCB_ALIGNMENT): Set to 64, optimal on Atom.
1917         * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Likewise.
1919 2011-08-08  Andreas Schwab  <schwab@redhat.com>
1921         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned
1922         stack.
1923         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1924         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1926 2011-07-22  Ulrich Drepper  <drepper@gmail.com>
1928         * sysdeps/pthread/unwind-forcedunwind.c (_Unwind_Resume): Add read
1929         barrier.
1930         (__gcc_personality_v0): Likewise.
1931         (_Unwind_ForcedUnwind): Likewise.
1932         (_Unwind_GetCFA): Likewise.
1934 2011-07-14  Roland McGrath  <roland@hack.frob.com>
1936         * allocatestack.c (__reclaim_stacks): Use uintptr_t cast rather than
1937         UINTMAX_C.
1939 2011-06-30  Ulrich Drepper  <drepper@gmail.com>
1941         * nptl-init.c (__nptl_set_robust): New function.
1942         (pthread_functions): Add reference.
1943         * npthreadP.h: Declare __nptl_set_robust.
1944         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
1945         ptr_set_robust member.
1946         * sysdeps/unix/sysv/linux/fork.c: Call set_robust_list syscall in
1947         child if threads are used.
1949 2011-06-14  Andreas Jaeger  <aj@suse.de>
1951         * pthread_rwlock_init.c: Include <string.h> for memset declaration.
1953 2011-05-11  Ulrich Drepper  <drepper@gmail.com>
1955         [BZ #386]
1956         * allocatestack.c (allocate_stack): Convert ENOMEM error to EAGAIN.
1958 2011-04-10  Ulrich Drepper  <drepper@gmail.com>
1960         [BZ #12650]
1961         * allocatestack.c (get_cached_stack): Deallocate DTV entries before
1962         clearing memory.
1963         Patch partly by Robert Rex <robert.rex@exasol.com>.
1965 2011-01-19  Roland McGrath  <roland@redhat.com>
1967         * pthread_cond_wait.c (__pthread_cond_wait): Fix comment typo.
1968         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1969         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Likewise.
1970         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1971         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock): Likewise.
1972         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock): Likewise.
1974 2011-01-16  Andreas Schwab  <schwab@linux-m68k.org>
1976         * Makefile (test-extras): Add tst-cleanup4aux.
1978 2011-01-14  Ulrich Drepper  <drepper@gmail.com>
1980         [BZ #10563]
1981         * sysdeps/pthread/setxid.h (__SETXID_1): Add cast to assignment.
1982         (__SETXID_2): Likewise.
1983         (__SETXID_3): Likewise.
1985 2011-01-13  Ulrich Drepper  <drepper@gmail.com>
1987         [BZ #10484]
1988         * Versions [libc] (GLIBC_PRIVATE): Export __libc_alloca_cutoff.
1989         * alloca_cutoff.c: Add libc_hidden_def.
1991 2010-10-13  H.J. Lu  <hongjiu.lu@intel.com>
1993         [BZ #12113]
1994         * sysdeps/x86_64/pthreaddef.h (TCB_ALIGNMENT): Changed to 32.
1995         * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Defined with alignment
1996         of "struct pthread".
1998 2010-09-21  Andreas Schwab  <schwab@redhat.com>
2000         * sysdeps/pthread/pthread.h (pthread_cleanup_push)
2001         [!__EXCEPTIONS]: Mangle local variable not_first_call.
2002         (pthread_cleanup_push_defer_np): Likewise.
2004 2010-09-03  Ulrich Drepper  <drepper@redhat.com>
2006         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Expect blocks are
2007         small.
2009 2010-08-10  Dinakar Guniguntala  <dino@in.ibm.com>
2010             Stefan Hajnoczi  <stefanha@linux.vnet.ibm.com>
2012         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: If
2013         FUTEX_WAKE_OP fails make sure to call FUTEX_WAKE instead.
2015 2010-08-12  H.J. Lu  <hongjiu.lu@intel.com>
2017         * sysdeps/unix/sysv/linux/i386/Makefile: New file.
2019 2010-05-01  Alan Modra  <amodra@gmail.com>
2021         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
2022         (PSEUDO): Use correct cr save.  Don't use wrong parm save area
2023         to save temps.  Correct cfi for possible later frame manipulation.
2024         (DOCARGS_1, UNDOCARGS_1): Use the correct parm save area.
2025         (DOCARGS_2, UNDOCARGS_2, DOCARGS_3, UNDOCARGS_3): Likewise.
2026         (DOCARGS_4, UNDOCARGS_4, DOCARGS_5, UNDOCARGS_5): Likewise.
2027         (DOCARGS_6, UNDOCARGS_6): Likewise.
2028         (CENABLE, CDISABLE): Add nops for non-shared calls.
2030 2010-07-06  Andreas Schwab  <schwab@redhat.com>
2032         * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
2033         Fix type mismatch.
2035 2010-07-03  Ulrich Drepper  <drepper@redhat.com>
2037         * tst-abstime.c (do_test): Some more cleanups
2039 2010-07-02  Ulrich Drepper  <drepper@redhat.com>
2041         * tst-abstime.c: Correct testing and add test for sem_timedwait.
2043 2010-07-01  Andreas Schwab  <schwab@redhat.com>
2044             Ulrich Drepper  <drepper@redhat.com>
2046         * Makefile (tests): Add tst-abstime.
2047         * tst-abstime.c: New file.
2048         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2049         (__lll_timedlock_wait): Check for timestamp before the Epoch.
2050         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2051         (__lll_timedlock_wait): Likewise.
2052         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2053         (__lll_robust_timedlock_wait): Likewise.
2054         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2055         (__pthread_cond_timedwait): Likewise.
2056         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
2057         (pthread_rwlock_timedrdlock): Likewise.
2058         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
2059         (pthread_rwlock_timedwrlock): Likewise.
2060         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2061         Likewise.
2063 2010-07-01  Ulrich Drepper  <drepper@redhat.com>
2065         * Makefile (tst-_res1): Add tst-_res1mod1 to dependency list.
2067 2010-06-01  Takashi Yoshii  <takashi.yoshii.zj@renesas.com>
2069         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Fix incorrect
2070         location of ifndef __ASSUME_FUTEX_CLOCK_REALTIME.
2072 2010-04-09  Ulrich Drepper  <drepper@redhat.com>
2074         [BZ #11390]
2075         * sysdeps/unix/sysv/linux/pthread_getname.c: New file.
2076         * sysdeps/unix/sysv/linux/pthread_setname.c: New file.
2077         * nptl/sysdeps/pthread/pthread.h: Declare pthread_getname and
2078         pthread_setname.
2079         * Makefile (libpthread-routines): Add pthread_getname and
2080         pthread_setname.
2081         * Versions: Export pthread_getname and pthread_setname for GLIBC_2.12.
2083 2010-04-05  Thomas Schwinge  <thomas@schwinge.name>
2085         * sysdeps/pthread/unwind-resume.c: Moved to main tree sysdeps/gnu/.
2086         * sysdeps/pthread/rt-unwind-resume.c: Likewise.
2087         * sysdeps/pthread/Makefile: Remove csu section and rt section's
2088         unwind-resume bits, now in main tree sysdeps/gnu/Makefile instead.
2090 2010-03-23  Luis Machado  <luisgpm@br.ibm.com>
2092         * pthread_cond_timedwait.c: Add check for
2093         HAVE_CLOCK_GETTIME_VSYSCALL to use VDSO whenever possible.
2094         (pthread_cond_timedwait): Use INTERNAL_VSYSCALL instead of
2095         INTERNAL_SYSCALL.
2097 2010-03-09  Ulrich Drepper  <drepper@redhat.com>
2099         * pthread_create.c (__pthread_create_2_1): If priorities are incorrect
2100         and the call fails wake eventually waiting setxid threads.  Don't free
2101         stack here if we try starting a thread.
2102         * sysdeps/pthread/createthread.c (do_clone): Only wake setxid waiter
2103         if the clone call failed.
2105 2010-03-08  Andreas Schwab  <schwab@redhat.com>
2107         * pthread_create.c (__pthread_create_2_1): Don't set setxid_futex.
2108         * allocatestack.c (get_cached_stack): Set setxid_futex.
2109         (allocate_stack): Likewise.
2111 2010-03-05  Andreas Schwab  <schwab@redhat.com>
2112             Ulrich Drepper  <drepper@redhat.com>
2114         * allocatestack.c (setxid_mark_thread): Delay handling of thread if
2115         it is creating a thread or it is just being created.
2116         * pthread_create.c (start_thread): Wake setxid thread if it is
2117         waiting.
2118         (__pthread_create_2_1): Initialize setxid_futex.
2119         * sysdeps/pthread/createthread.c (do_clone): Wake setxid thread if it
2120         is waiting.
2122 2010-01-15  Ulrich Drepper  <drepper@redhat.com>
2124         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
2125         Fix unwind info.
2126         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2128 2010-01-15  Michal Schmidt  <mschmidt@redhat.com>
2130         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
2131         Fix pthread_cond_timedwait with requeue-PI.
2132         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
2133         Fix pthread_cond_wait with requeue-PI.
2135 2010-01-14  Ulrich Drepper  <drepper@redhat.com>
2137         * Versions: Add pthread_mutex_consistent, pthread_mutexattr_getrobust,
2138         and pthread_mutexattr_setrobust for GLIBC_2.12.
2139         * pthread_mutex_consistent.c: Define alias pthread_mutex_consistent.
2140         * pthread_mutexattr_getrobust.c: Define alias
2141         pthread_mutexattr_getrobust.
2142         * pthread_mutexattr_setrobust.c: Define alias
2143         pthread_mutexattr_setrobust.
2145 2010-01-12  Ulrich Drepper  <drepper@redhat.com>
2147         * sysdeps/pthread/pthread.h: Cleanup.  Fix up for XPG7.
2149 2010-01-08  Ulrich Drepper  <drepper@redhat.com>
2151         * sysdeps/pthread/pthread.h: Fix pthread_mutex_consistent declaration.
2153 2009-12-18  Thomas Schwinge  <thomas@codesourcery.com>
2155         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c (_init): Don't
2156         call __gmon_start__.
2157         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c (_init): Likewise.
2159 2009-12-17  Ulrich Drepper  <drepper@redhat.com>
2161         * pthread_rwlock_init.c (__pthread_rwlock_init): Simplify code by
2162         using memset.
2164 2009-12-01  Dinakar Guniguntala  <dino@in.ibm.com>
2166         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.h: Define
2167         FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
2168         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: If mutex
2169         is a non robust PI mutex, then use FUTEX_CMP_REQUEUE_PI.
2170         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
2171         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: If mutex
2172         is a non robust PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
2173         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2175 2009-12-12  Ulrich Drepper  <drepper@redhat.com>
2177         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
2178         Don't update nwaiters after invalid timeout is recognized.
2180 2009-11-27  Thomas Schwinge  <thomas@codesourcery.com>
2182         * sysdeps/unix/sysv/linux/sh/pt-initfini.c (_init): Don't call
2183         __gmon_start__.
2185 2009-11-27  Andreas Schwab  <schwab@redhat.com>
2187         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Reload
2188         THREAD_SELF->cancelhandling after returning from futex call.
2190 2009-11-24  Ulrich Drepper  <drepper@redhat.com>
2192         * tst-sem13.c: New file.
2193         * Makefile (tests): Add tst-sem13.
2195 2009-11-22  Roland McGrath  <roland@redhat.com>
2197         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: # include "i686/dl-sysdep.h"
2198         instead of recapitulating its contents.
2200 2009-11-18  Ulrich Drepper  <drepper@redhat.com>
2202         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Minor
2203         optimizations and cleanups.
2205 2009-11-18  Dinakar Guniguntala  <dino@in.ibm.com>
2207         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
2208         Remove redundant code. Fix cfi offsets.
2209         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
2210         Fix cfi offsets.
2212 2009-11-17  Ulrich Drepper  <drepper@redhat.com>
2214         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Minimally
2215         reduce size of unwind info.
2217         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Convert to use
2218         cfi directives.
2219         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2220         Based on a patch by Dinakar Guniguntala <dino@in.ibm.com>.
2222 2009-11-03  Andreas Schwab  <schwab@linux-m68k.org>
2224         [BZ #4457]
2225         * sysdeps/pthread/unwind-resume.c: Include <libgcc_s.h> and use
2226         LIBGCC_S_SO.
2227         * sysdeps/pthread/unwind-forcedunwind.c: Likewise.
2229 2009-10-30  Ulrich Drepper  <drepper@redhat.com>
2231         * tst-sem11.c (main): Rewrite to avoid aliasing problems.
2233         [BZ #3270]
2234         * allocatestack.c (__nptl_setxid): Perform the operation in multiple
2235         steps to avoid races with creation and terminations.
2236         * nptl-init.c (sighandler_setxid): Adjust.
2237         Patch by Daniel Jacobowitz.
2239 2009-09-07  Andreas Schwab  <schwab@redhat.com>
2241         * sysdeps/pthread/bits/libc-lock.h (BP_SYM): Remove space before paren.
2243 2009-09-02  Suzuki K P  <suzuki@in.ibm.com>
2244             Joseph Myers  <joseph@codesourcery.com>
2246         [BZ #7094]
2247         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
2248         Initialize the sigev_notify field for newly created timer to make sure
2249         the timer gets deleted from the active timer's list upon timer_delete.
2251 2009-08-27  Andrew Stubbs  <ams@codesourcery.com>
2253         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
2254         Correct a logic error.
2256 2009-08-25  Ulrich Drepper  <drepper@redhat.com>
2258         * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
2259         of the field in local variables.
2260         (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
2261         variable and don't unconditionally clear it.
2263 2009-08-24  Ulrich Drepper  <drepper@redhat.com>
2265         * pthread_create.c (start_thread): Hint to the kernel that memory for
2266         the stack can be reused.  We do not mark all the memory.  The part
2267         still in use and some reserve are kept.
2269 2009-08-23  Ulrich Drepper  <drepper@redhat.com>
2271         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
2273 2009-08-11  Ulrich Drepper  <drepper@redhat.com>
2275         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
2276         directives.
2278 2009-08-10  Ulrich Drepper  <drepper@redhat.com>
2280         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
2281         directives.
2282         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2284 2009-08-10  Andreas Schwab  <schwab@redhat.com>
2286         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
2287         (__pthread_cond_signal): Don't clobber register used for syscall
2288         number.
2290 2009-08-08  Ulrich Drepper  <drepper@redhat.com>
2292         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2293         Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
2295         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2296         (__pthread_cond_wait): Optimize by avoiding use of callee-safe
2297         register.
2299 2009-08-07  Ulrich Drepper  <drepper@redhat.com>
2301         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
2302         enabled by the special *_asynccancel functions.
2303         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2304         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2306         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
2308 2009-08-04  Ulrich Drepper  <drepper@redhat.com>
2310         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
2311         * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
2312         * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
2313         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
2314         since we can assume the special __*_{en,dis}able_asynccancel
2315         functions.
2316         (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
2317         * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
2318         and PTHREAD_CANCELED.
2320 2009-07-31  Ulrich Drepper  <drepper@redhat.com>
2322         * descr.h: Better definition of *_BITMASK macros for cancellation.
2324 2009-07-29  Ulrich Drepper  <drepper@redhat.com>
2326         * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
2328         * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
2329         dynamic linker might have to save.
2330         Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
2331         RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL.  Pretty
2332         printing.
2334         * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
2336 2009-07-28  Ulrich Drepper  <drepper@redhat.com>
2338         * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
2339         New function.
2340         * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
2341         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
2342         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
2343         requeue_pi for robust mutexes.
2344         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
2345         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2346         Don't only skip __pthread_mutex_cond_lock.  Call instead
2347         __pthread_mutex_cond_lock_adjust.
2348         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2350         * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
2351         optimization of PI mutex handling.
2353 2009-07-27  Ulrich Drepper  <drepper@redhat.com>
2355         [BZ #10418]
2356         * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
2357         instead of of _acq variants of cmpxchg.
2359 2009-07-23  Ulrich Drepper  <drepper@redhat.com>
2361         * sysdeps/x86_64/configure.in: New file.
2363         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
2364         path when not using absolute timeout futex.
2366 2009-07-20  Ulrich Drepper  <drepper@redhat.com>
2368         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
2369         optimizations of last changes.
2370         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
2372 2009-07-19  Ulrich Drepper  <drepper@redhat.com>
2374         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
2375         FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
2376         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
2377         is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
2378         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
2379         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
2380         is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
2381         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2383         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2384         (__pthread_cond_timedwait): Make more robust.
2386 2009-07-18  Ulrich Drepper  <drepper@redhat.com>
2388         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2389         (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
2390         directly use absolute timeout.
2392         * tst-sem5.c (do_test): Add test for premature timeout.
2393         * Makefile: Linu tst-sem5 with librt.
2395         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
2396         (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
2397         directly use absolute timeout.
2398         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
2399         (pthread_rwlock_timedrdlock): Likewise.
2401         * tst-cond11.c (run_test): Add test to check that the timeout is
2402         long enough.
2404         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2405         (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
2406         directly use absolute timeout.
2408         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2409         (__pthread_cond_wait): Convert to using exception handler instead of
2410         registered unwind buffer.
2411         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2412         (__pthread_cond_timedwait): Likewise.
2414 2009-07-17  Ulrich Drepper  <drepper@redhat.com>
2416         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2417         If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
2418         use absolute timeout.
2420         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
2421         handling of uncontested semaphore.
2423         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
2424         (__condvar_cleanup): Rewrite to use cfi directives instead of
2425         hand-coded unwind tables.
2426         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
2427         Likewise.
2428         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
2429         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2430         Likewise.
2432 2009-06-12  Ulrich Drepper  <drepper@redhat.com>
2434         * Makefile (libpthread-routines): Add pthread_sigqueue.
2435         * Versions: Add pthread_sigqueue for GLIBC_2.11.
2436         * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
2437         * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
2439 2009-06-11  Ulrich Drepper  <drepper@redhat.com>
2441         [BZ #10262]
2442         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2443         (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
2444         cannot be assumed.
2445         Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
2447 2009-05-16  Ulrich Drepper  <drepper@redhat.com>
2449         * libc-cancellation.c: Move __libc_cleanup_routine to...
2450         * libc-cleanup.c: ...here.  New file.
2451         * Makefile (routines): Add libc-cleanup.
2453         * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
2454         test.
2455         * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
2456         * sysdeps/pthread/librt-cancellation.c: Likewise.
2458         [BZ #9924]
2459         * nptl-init.c: Renamed from init.c.
2460         * Makefile: Change all occurences of init.c to nptl-init.c.
2462 2009-05-15  Ulrich Drepper  <drepper@redhat.com>
2464         * cancellation.c (__pthread_disable_asynccancel): Correct the bits
2465         to test when deciding on the delay.
2466         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
2467         * pthread_cancel.c: Close race between deciding on sending a signal
2468         and setting the CANCELING_BIT bit.
2470         * cancellation.c (__pthread_disable_asynccancel): Don't return if
2471         thread is canceled.
2472         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
2474 2009-04-27  Ulrich Drepper  <drepper@redhat.com>
2476         * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
2477         is available.
2478         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
2479         * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
2480         * sysdeps/i386/tls.h: Likewise.
2481         (tcbhead_t): Add __private_tm member.
2483 2009-04-26  Ulrich Drepper  <drepper@redhat.com>
2485         * sem_open.c (sem_open): Rewrite initialization of initsem to
2486         avoid warnings.
2488         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2489         Avoid warning by using may_alias attribute on ptrhack.
2491 2009-04-22  Ulrich Drepper  <drepper@redhat.com>
2493         [BZ #10090]
2494         * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
2495         Check policy and priority for validity.
2496         Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
2498 2009-03-15  Ulrich Drepper  <drepper@redhat.com>
2500         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
2501         (__pthread_cond_timedwait): Change to use cfi directives instead of
2502         hand-coded unwind sections.
2504 2009-03-10  Ulrich Drepper  <drepper@redhat.com>
2506         * init.c (nptl_freeres): Compile only for SHARED.
2508 2009-03-09  Jakub Jelinek  <jakub@redhat.com>
2510         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
2511         FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
2512         FUTEX_BITSET_MATCH_ANY.
2514 2009-02-27  Roland McGrath  <roland@redhat.com>
2516         * init.c (__nptl_initial_report_events): Mark __attribute_used__.
2517         * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
2519 2009-02-26  Ulrich Drepper  <drepper@redhat.com>
2521         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2522         _POSIX_THREAD_ROBUST_PRIO_INHERIT and
2523         _POSIX_THREAD_ROBUST_PRIO_PROTECT.  Reset value of macros from
2524         200112L to 200809L.
2526 2009-02-25  Ulrich Drepper  <drepper@redhat.com>
2528         * sysdeps/pthread/pthread.h: The robust mutex functions are in
2529         POSIX 2008.
2531 2009-02-24  Ulrich Drepper  <drepper@redhat.com>
2533         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
2534         Unify name of include protector macro.
2536 2009-02-14  SUGIOKA Toshinobu  <sugioka@itonet.co.jp>
2538         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
2539         LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
2541 2009-01-29  Ulrich Drepper  <drepper@redhat.com>
2543         * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
2544         pointer variables.
2546         * allocatestack.c (__free_stacks): Renamed from free_stacks.
2547         (__free_stack_cache): Removed.  Change callers to call __free_stacks.
2548         * init.c (nptl_freeres): New function.
2549         (pthread_functions): Initialize ptr_freeres to nptl_freeres.
2550         * pthreadP.h: Don't declare __free_stack_cache.  Declare __free_stacks.
2551         * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
2552         variable.
2553         (pthread_cancel_init): Depend in libgcc_s_handle for decision to
2554         load DSO.  Assign last.
2555         (__unwind_freeres): New function.
2557         * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
2558         for better debugging.  No need to use stack_list_add here.
2560 2009-01-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2562         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
2563         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
2564         instead of computing relative timeout.
2565         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
2566         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
2568 2009-01-25  Ulrich Drepper  <drepper@redhat.com>
2570         * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
2572 2009-01-08  Ulrich Drepper  <drepper@redhat.com>
2574         * sysdeps/pthread/list.h (list_add): Initialize new element first.
2575         (list_add_tail): Removed.
2577 2009-01-07  Ulrich Drepper  <drepper@redhat.com>
2579         * (in_flight_stack): New variable.
2580         (stack_list_del): New function.  Use instead of list_del.
2581         (stack_list_add): New function.  Use instead of list_add when adding to
2582         stack_cache and stack_used lists.
2583         (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
2584         when the fork call interrupted another thread.
2586 2009-01-04  Ulrich Drepper  <drepper@redhat.com>
2588         * init.c (__pthread_initialize_minimal_internal): Optimize test
2589         FUTEX_CLOCK_REALTIME a bit.
2591 2009-01-03  Ulrich Drepper  <drepper@redhat.com>
2593         * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
2594         only passing five parameters to FUTEX_WAIT_BITSET call.
2596         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
2597         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
2598         instead of computing relative timeout.
2600 2009-01-02  Ulrich Drepper  <drepper@redhat.com>
2602         * init.c (__pthread_initialize_minimal_internal): Check for
2603         FUTEX_CLOCK_REALTIME flag.
2604         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
2605         Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
2606         relative timeout.
2608         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
2609         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
2610         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2611         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2612         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2613         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2615 2008-12-09  Ulrich Drepper  <drepper@redhat.com>
2617         * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
2618         loop body instead of ; to avoid gcc warnings.
2619         (pthread_cleanup_pop_restore_np): Likewise.
2620         Patch by Caolán McNamara <caolanm@redhat.com>.
2622 2008-12-09  Jakub Jelinek  <jakub@redhat.com>
2624         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
2625         fast path here, for robust/PI/PP mutexes call
2626         __pthread_mutex_lock_full.  Don't use switch, instead use a series
2627         of ifs according to their probability.
2628         (__pthread_mutex_lock_full): New function.
2629         * pthread_mutex_unlock.c: Include assert.h.
2630         (__pthread_mutex_unlock_usercnt): Handle only the
2631         fast path here, for robust/PI/PP mutexes call
2632         __pthread_mutex_unlock_full.  Don't use switch, instead use a series
2633         of ifs according to their probability.
2634         (__pthread_mutex_unlock_full): New function.
2635         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
2636         (__pthread_mutex_lock_full): Define.
2638 2008-12-08  Ulrich Drepper  <drepper@redhat.com>
2640         * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
2641         implementation.  Add necessary padding and.
2642         * descr.h (struct pthread): Increase padding for tcbhead_t to 24
2643         words.
2645 2008-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2647         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
2648         and FUTEX_WAKE_BITSET.
2650 2008-12-02  Ulrich Drepper  <drepper@redhat.com>
2652         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
2653         and FUTEX_WAKE_BITSET.
2654         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2655         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2656         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2657         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2659 2008-11-25  Roland McGrath  <roland@redhat.com>
2661         * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
2662         Subdirectories moved to ports repository as
2663         sysdeps/.../nptl subdirectories.
2665 2008-11-12  Jakub Jelinek  <jakub@redhat.com>
2667         [BZ #7008]
2668         * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
2669         of old value.
2670         * pthread_cond_init.c (__pthread_cond_init): Fix
2671         cond->__data.__nwaiters initialization.
2672         * Makefile (tests): Add tst-cond23.
2673         * tst-cond23.c: New test.
2675 2008-11-07  Jakub Jelinek  <jakub@redhat.com>
2677         * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
2678         arguments.
2679         (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
2680         arguments.
2682 2008-11-01  Ulrich Drepper  <drepper@redhat.com>
2684         [BZ #6955]
2685         * pthread_mutex_lock.c: Add support for private PI mutexes.
2686         * pthread_mutex_timedlock.c: Likewise.
2687         * pthread_mutex_trylock.c: Likewise.
2688         * pthread_mutex_unlock.c: Likewise.
2689         Patch mostly by Ben Jackson <ben@ben.com>.
2691 2008-10-31  Ulrich Drepper  <drepper@redhat.com>
2693         [BZ #6843]
2694         * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
2695         Increase stack size for helper thread.
2697 2008-10-06  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2699         * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
2700         assembly with a clobber list for access registers a0 and a1.
2702 2008-09-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
2704         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
2705         to force runp->refcntr to be read from memory.
2707 2008-09-08  Richard Guenther  <rguenther@suse.de>
2709         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
2710         lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
2711         lll_timedlock, lll_robust_timedlock, lll_unlock,
2712         lll_robust_unlock): Promote private to int.
2714 2008-08-15  Ulrich Drepper  <drepper@redhat.com>
2716         * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
2717         ARCH_RETRY_MMAP definitions.
2718         * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
2719         Define MAP_STACK when not defined.
2720         (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS.  Remove
2721         handling of ARCH_RETRY_MMAP.
2723 2008-07-30  Ulrich Drepper  <drepper@redhat.com>
2725         * tst-align2.c (f): Print message that f is reached.
2727 2008-04-28  Hiroki Kaminaga  <kaminaga@sm.sony.co.jp>
2729         [BZ #6740]
2730         * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
2731         definition with #ifndef __ASSUME_PRIVATE_FUTEX.
2733 2008-07-25  Ulrich Drepper  <drepper@redhat.com>
2735         * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
2736         SOCK_CLOEXEC if possible.
2738 2008-05-29  Ulrich Drepper  <drepper@redhat.com>
2740         * Makefile (tests): Add tst-rwlock2a.
2741         * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
2742         * tst-rwlock2a.c: New file.
2744 2008-06-12  Ulrich Drepper  <drepper@redhat.com>
2746         * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
2748 2008-05-17  Samuel Thibault  <samuel.thibault@ens-lyon.org>
2750         * sysdeps/pthread/pthread.h: Fix typo in comment.
2752 2008-05-28  Ulrich Drepper  <drepper@redhat.com>
2754         * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
2755         of CPU set to the kernel.
2757 2008-05-23  Paul Pluzhnikov  <ppluzhnikov@google.com>
2759         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
2760         cfi directives.
2761         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
2762         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
2763         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2764         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2765         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2766         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2768 2008-05-22  Paul Pluzhnikov  <ppluzhnikov@google.com>
2770         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
2771         cfi directives.
2772         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2773         Likewise.
2774         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2775         Likewise.
2776         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2777         Likewise.
2779 2008-05-26  Ulrich Drepper  <drepper@redhat.com>
2781         * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
2783 2008-05-20  Jakub Jelinek  <jakub@redhat.com>
2785         David S. Miller  <davem@davemloft.net>
2787         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
2789 2008-05-10  Ulrich Drepper  <drepper@redhat.com>
2791         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
2792         __pshared correctly.
2793         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2794         Likewise.
2795         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2796         Likewise.
2797         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
2798         Likewise.
2799         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
2800         Likewise.
2801         Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
2803 2008-04-14  David S. Miller  <davem@davemloft.net>
2805         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
2806         (__old_sem_wait): Fix argument to lll_futex_wait().
2808 2007-11-26  Daniel Jacobowitz  <dan@codesourcery.com>
2810         * pthread_create.c: Require pthread_mutex_trylock and
2811         pthread_key_delete for libgcc.
2813 2008-04-08  Jakub Jelinek  <jakub@redhat.com>
2815         [BZ #6020]
2816         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
2817         (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
2818         Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
2820 2008-03-27  Ulrich Drepper  <drepper@redhat.com>
2822         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
2823         <linux/limits.h> has defined it.
2824         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2825         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2826         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2827         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2829 2008-03-18  Jakub Jelinek  <jakub@redhat.com>
2831         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
2832         of ASSEMBLER.
2833         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2834         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
2836 2008-03-14  Ulrich Drepper  <drepper@redhat.com>
2838         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
2839         HAVE_DL_DISCOVER_OSVERSION.
2840         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
2841         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
2843 2008-03-07  Ulrich Drepper  <drepper@redhat.com>
2845         [BZ #5778]
2846         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
2847         _POSIX_CHOWN_RESTRICTED value to zero.
2849 2008-01-31  Roland McGrath  <roland@redhat.com>
2851         * Makefile (omit-deps): Variable removed.
2853 2008-01-30  Ulrich Drepper  <drepper@redhat.com>
2855         * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
2856         unnecessary addr32 prefix.
2858 2008-01-29  Roland McGrath  <roland@redhat.com>
2860         * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
2862 2008-01-22  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2864         * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
2866 2008-01-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2868         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
2869         a scratch register.
2870         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
2871         (__lll_lock_wait_private): Fix typo.
2872         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
2873         (pthread_barrier_wait): Likewise.  Adjust XADD use.
2874         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
2875         Adjust XADD use.
2876         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
2877         (pthread_rwlock_timedrdlock): Return correct return value.
2878         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
2879         (pthread_rwlock_timedwrlock): Likewise.
2881 2008-01-15  Ulrich Drepper  <drepper@redhat.com>
2883         * tst-eintr2.c (do_test): make sure that if mutex_lock in main
2884         thread returns the program exits with an error code.
2886 2008-01-10  Ulrich Drepper  <drepper@redhat.com>
2888         * pthread-errnos.sym: Add EOVERFLOW.
2889         * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
2890         * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
2891         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2892         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2894 2007-12-14  Ulrich Drepper  <drepper@redhat.com>
2896         * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
2897         parameter.  Passed it as permission to mmap.
2898         * allocatestack.c (allocate_stack): Pass prot as second parameter
2899         to ARCH_RETRY_MMAP.
2901 2007-12-12  Ulrich Drepper  <drepper@redhat.com>
2903         * tst-basic7.c: Allocate memory for the stack.
2905         [BZ #5465]
2906         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
2907         (__pthread_cond_timedwait): Don't use VDSO.
2908         Patch by Michal Januszewski.
2910 2007-12-07  Ulrich Drepper  <drepper@redhat.com>
2912         [BZ #5455]
2913         * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
2914         Allow label before pthread_cleanup_pop.
2915         (pthread_cleanup_pop_restore_np): Likewise.
2917 2007-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2919         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
2920         Store 2 before returning ETIMEDOUT.
2922 2007-11-23  Ulrich Drepper  <drepper@redhat.com>
2924         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
2925         Store 2 before returning ETIMEDOUT.
2926         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
2927         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
2928         (__lll_lock_wait_private): Optimize.
2929         (__lll_lock_wait): Likewise.
2931 2007-11-20  Jakub Jelinek  <jakub@redhat.com>
2933         * sysdeps/pthread/pthread.h (pthread_cleanup_push,
2934         pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
2935         g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
2937 2007-11-08  Ulrich Drepper  <drepper@redhat.com>
2939         [BZ #5240]
2940         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
2941         If we time out, try one last time to lock the futex to avoid
2942         losing a wakeup signal.
2943         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2944         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
2946         [BZ #5245]
2947         * sysdeps/pthread/createthread.c (do_clone): Translate clone error
2948         if necessary.
2950 2007-11-07  Ulrich Drepper  <drepper@redhat.com>
2952         [BZ #5245]
2953         * allocatestack.c (allocate_stack): Change ENOMEM error in case
2954         mmap failed to EAGAIN.
2955         * Makefile (tests): Add tst-basic7.
2956         * tst-basic7.c: New file.
2958 2007-11-05  Ulrich Drepper  <drepper@redhat.com>
2960         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
2961         Use __linkin_atfork.
2963 2007-11-03  Mike Frysinger  <vapier@gentoo.org>
2965         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
2966         missing line continuations.
2967         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
2968         LOAD_FUTEX_WAKE): Likewise.  Also add missing 3rd parameter.
2970 2007-10-28  Ulrich Drepper  <drepper@redhat.com>
2972         [BZ #5220]
2973         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
2974         __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
2975         (struct timer): Add next element.
2976         * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
2977         enqueue timer structure into __active_timer_sigev_thread list.
2978         * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
2979         remove timer struct from __active_timer_sigev_thread.
2980         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2981         Before using timer structure make sure it is still on the
2982         __active_timer_sigev_thread list.  Keep lock until done.
2983         Define __active_timer_sigev_thread and
2984         __active_timer_sigev_thread_lock.
2986 2007-10-27  Ulrich Drepper  <drepper@redhat.com>
2988         * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
2989         Redefine thread_atfork for use of ATFORK_MEM.
2990         * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
2991         * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
2992         function.
2993         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
2994         Use atomic operation when removing first element of list.
2996 2007-10-17  Jakub Jelinek  <jakub@redhat.com>
2998         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
2999         routine instead of an alias to __new_sem_post.
3001 2007-10-15  Jakub Jelinek  <jakub@redhat.com>
3003         * init.c (__pthread_initialize_minimal): Initialize word to appease
3004         valgrind.
3006 2007-10-10  Jakub Jelinek  <jakub@redhat.com>
3008         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
3009         libc.so just clear NAME.
3010         (__libc_rwlock_fini): Nop inside of libc.so.
3011         * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
3012         all zeros.
3014 2007-09-02  Ulrich Drepper  <drepper@redhat.com>
3016         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
3017         (__pthread_cond_wait): Fix unlocking of internal lock after mutex
3018         unlocking failed.
3019         Patch by Luca Barbieri <luca.barbieri@gmail.com>.
3021 2007-08-21  Ulrich Drepper  <drepper@redhat.com>
3023         [BZ #4938]
3024         * allocatestack.c (__reclaim_stacks): Clear the TSD in the
3025         reclaimed stack if necessary.
3026         * Makefile (tests): Add tst-tsd6.
3027         * tst-tsd6.c: New file.
3029 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
3031         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
3032         Add private argument.
3034 2007-08-20  Ulrich Drepper  <drepper@redhat.com>
3036         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
3037         (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
3039 2007-08-16  Jakub Jelinek  <jakub@redhat.com>
3041         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
3042         (__lll_robust_timedlock): Pass private as last argument to
3043         __lll_robust_timedlock_wait.
3044         (__lll_unlock): Fix a pasto.
3046 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
3048         * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
3049         sparc_old_sem): New structs.
3050         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
3051         (__sem_wait_cleanup): New function.
3052         (__new_sem_wait): Use sparc_new_sem structure.  Bump and afterwards
3053         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
3054         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
3055         lll_futex_wait.
3056         (__old_sem_wait): New function.
3057         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
3058         nptl/sysdeps/unix/sysv/linux/sparc version.
3059         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
3060         Likewise.
3061         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
3062         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
3063         (__new_sem_trywait): Use sparc_old_sem structure.
3064         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
3065         (sem_timedwait): Use sparc_new_sem structure.  Bump and afterwards
3066         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
3067         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
3068         lll_futex_timed_wait.
3069         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
3070         Use sparc_new_sem structure.  Only wake if nwaiters > 0.  Pass
3071         isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
3072         lll_futex_wake.
3073         (__old_sem_post): New function.
3074         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
3075         * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
3076         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
3077         * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
3078         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
3079         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
3081 2007-08-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3083         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
3084         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
3085         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
3086         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
3087         * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
3088         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
3089         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
3090         Use FUTEX_WAKE_OP.
3091         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
3092         kernel-features.h and tcb-offsets.h.
3093         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
3094         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
3095         process private.
3096         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
3097         tcb-offsets.h.
3098         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
3099         to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
3100         process private.
3101         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
3102         __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
3103         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
3104         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
3105         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
3106         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
3107         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
3109 2007-08-14  Jakub Jelinek  <jakub@redhat.com>
3111         * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
3112         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
3113         (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
3114         lll_futex_timed_wait.
3116         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
3117         __lll_robust_unlock): Rewrite as macros instead of inline functions.
3118         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
3119         __lll_robust_unlock, __lll_wait_tid): Likewise.
3121 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
3123         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
3124         Fix a pasto.
3125         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
3126         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
3127         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
3128         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
3129         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3130         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
3131         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
3132         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
3133         kernel-features.h.
3134         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
3135         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
3136         process private.  Switch DW_CFA_advance_loc1 and some
3137         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
3138         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
3139         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
3140         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
3141         process private.  Switch DW_CFA_advance_loc{1,2} and some
3142         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
3143         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
3144         #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
3145         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3146         Likewise.
3147         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3148         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3149         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3150         Likewise.
3151         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
3152         (__pthread_cond_broadcast): Compare %r8 instead of
3153         dep_mutex-cond_*(%rdi) with $-1.
3154         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3155         (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
3156         of oring.
3158 2007-08-13  Ulrich Drepper  <drepper@redhat.com>
3160         * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
3162 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
3164         * allocatestack.c: Include kernel-features.h.
3165         * pthread_create.c: Likewise.
3166         * pthread_mutex_init.c: Likewise.
3167         * init.c: Likewise.
3168         * pthread_cond_timedwait.c: Likewise.
3169         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
3170         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3171         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
3172         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
3173         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
3174         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3175         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
3176         Likewise.
3177         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3178         Likewise.
3179         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3180         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3181         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3182         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
3184 2007-08-12  Jakub Jelinek  <jakub@redhat.com>
3186         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
3187         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
3188         byte elements.  One of them is the new __shared element.
3189         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
3190         adjust names of other padding elements.
3191         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
3192         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
3193         byte elements.  One of them is the new __shared element.
3194         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
3195         adjust names of other padding elements.
3196         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
3197         Renamed __pad1 element to __shared, adjust names of other padding
3198         elements.
3199         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3200         (pthread_rwlock_t): Likewise.
3201         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
3202         typo.
3204 2007-08-09  Anton Blanchard  <anton@samba.org>
3206         * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
3208 2007-08-12  Ulrich Drepper  <drepper@redhat.com>
3210         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
3211         <kernel-features.h>.
3212         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3214 2007-08-11  Ulrich Drepper  <drepper@redhat.com>
3216         * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
3217         * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
3218         dealing with robust mutexes.
3219         * pthread_mutex_timedlock.c: Likewise.
3220         * pthread_mutex_trylock.c: Likewise.
3221         * pthread_mutex_unlock.c: Likewise.
3222         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
3224 2007-08-06  Jakub Jelinek  <jakub@redhat.com>
3226         * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
3227         (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
3228         (PTHREAD_MUTEX_PSHARED): Define.
3229         * pthread_mutex_init.c (__pthread_mutex_init): Set
3230         PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
3231         mutexes.
3232         * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
3233         instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
3234         as second argument to lll_lock.
3235         (LLL_MUTEX_TRYLOCK): Take mutex as argument
3236         instead of its __data.__lock field.
3237         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
3238         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
3239         to lll_robust_lock.
3240         (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
3241         LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
3242         instead of mutex->__data.__kind directly, pass
3243         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
3244         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
3245         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
3246         directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
3247         (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
3248         to lll_timedlock, lll_robust_timedlock, lll_unlock and
3249         lll_futex_timed_wait.  Use PTHREAD_MUTEX_TYPE (mutex) instead
3250         of mutex->__data.__kind directly.
3251         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
3252         PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
3253         lll_robust_timedlock, lll_unlock and lll_futex_timed_wait.  Use
3254         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
3255         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
3256         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
3257         and lll_futex_wake.
3258         * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
3259         PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
3260         Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
3261         directly.
3262         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
3263         Take mutex as argument instead of its __data.__lock field, pass
3264         PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
3265         (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
3266         __data.__lock field.
3267         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
3268         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
3269         to lll_robust_cond_lock.
3270         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
3271         variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
3272         lll_futex_wake.  Don't use lll_futex_requeue if dependent mutex
3273         has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
3274         * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
3275         variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
3276         lll_futex_wait.
3277         * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
3278         variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
3279         lll_futex_wake.
3280         * pthread_cond_timedwait.c (__pthread_cond_wait): Add
3281         pshared variable, pass it to lll_lock, lll_unlock,
3282         lll_futex_timedwait and lll_futex_wake.
3283         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
3284         pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
3285         and lll_futex_wake.
3286         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
3287         lll_futex_wake_unlock): Add private argument, use __lll_private_flag
3288         macro.
3289         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
3290         lll_futex_wake_unlock): Likewise.
3291         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
3292         Likewise.
3293         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
3294         lll_futex_wake_unlock): Likewise.
3295         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
3296         Likewise.
3297         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
3298         lll_futex_wake_unlock): Likewise.
3299         (lll_futex_wake): Fix a typo.
3300         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
3301         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
3302         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
3303         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
3304         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
3305         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3306         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
3307         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
3308         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
3309         (__pthread_cond_timedwait): Likewise.
3310         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
3311         (__condvar_cleanup, __pthread_cond_wait): Likewise.
3313 2007-08-05  Jakub Jelinek  <jakub@redhat.com>
3315         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3316         Don't use CGOTSETUP and CGOTRESTORE macros.
3317         (CGOTSETUP, CGOTRESTORE): Remove.
3318         <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
3319         @local symbol.
3321 2007-08-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3323         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
3324         definitions for private futexes.
3325         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
3326         kernel-features.h and lowlevellock.h.  Use private futexes if
3327         they are available.
3328         (__lll_lock_wait_private, __lll_unlock_wake_private): New.
3329         (__lll_mutex_lock_wait): Rename to
3330         (__lll_lock_wait): ... this.  Don't compile in for libc.so.
3331         (__lll_mutex_timedlock_wait): Rename to ...
3332         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.
3333         Don't compile in for libc.so.
3334         (__lll_mutex_unlock_wake): Rename to ...
3335         (__lll_unlock_wake): ... this.  Don't compile in for libc.so.
3336         (__lll_timedwait_tid): Use __NR_gettimeofday.
3337         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
3338         the header from assembler.  Renamed all lll_mutex_* resp.
3339         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
3340         Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
3341         (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
3342         Define.
3343         (__lll_lock_wait_private): Add prototype.
3344         (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
3345         __lll_robust_timedlock_wait, __lll_unlock_wake_private,
3346         __lll_unlock_wake): Likewise.
3347         (lll_lock): Add private argument.  Call __lll_lock_wait_private
3348         if private is constant LLL_PRIVATE.
3349         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
3350         lll_timedlock, lll_robust_timedlock): Add private argument.
3351         (lll_unlock): Add private argument.  Call __lll_unlock_wake_private
3352         if private is constant LLL_PRIVATE.
3353         (lll_robust_unlock, lll_robust_dead): Add private argument.
3354         (lll_lock_t): Remove.
3355         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
3356         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
3357         lll_cond_wake, lll_cond_broadcast): Remove.
3358         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
3359         kernel-features.h and lowlevellock.h.
3360         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
3361         (LOAD_FUTEX_WAIT): Define.
3362         (__lll_robust_mutex_lock_wait): Rename to ...
3363         (__lll_robust_lock_wait): ... this.  Add private argument.
3364         Use LOAD_FUTEX_WAIT macro.
3365         (__lll_robust_mutex_timedlock_wait): Rename to ...
3366         (__lll_robust_timedlock_wait): ... this.    Add private argument.
3367         Use __NR_gettimeofday.  Use LOAD_FUTEX_WAIT macro.
3368         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
3369         lowlevellock.h.
3370         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
3371         (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
3372         __lll_mutex_{lock,unlock}_*.
3373         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
3374         lowlevellock.h and pthread-errnos.h.
3375         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3376         FUTEX_CMP_REQUEUE, EINVAL): Remove.
3377         (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
3378         __lll_mutex_{lock,unlock}_*.
3379         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
3380         lowlevellock.h and pthread-errnos.h.
3381         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
3382         (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
3383         __lll_mutex_{lock,unlock}_*.
3384         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
3385         lowlevellock.h.
3386         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
3387         (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
3388         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
3389         (__condvar_tw_cleanup): Likewise.
3390         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
3391         lowlevellock.h.
3392         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
3393         (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
3394         __lll_mutex_{lock,unlock}_*.
3395         ( __condvar_w_cleanup): Likewise.
3396         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
3397         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3398         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
3399         lowlevellock.h.
3400         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3401         (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
3402         __lll_mutex_{lock,unlock}_*.
3403         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
3404         lowlevellock.h.
3405         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
3406         FUTEX_PRIVATE_FLAG): Remove.
3407         (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
3408         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
3409         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
3410         lowlevellock.h.
3411         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
3412         FUTEX_PRIVATE_FLAG): Remove.
3413         (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
3414         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
3415         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
3416         lowlevellock.h.
3417         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3418         (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
3419         __lll_mutex_{lock,unlock}_*.
3420         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
3421         lowlevellock.h.
3422         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3423         (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
3424         __lll_mutex_{lock,unlock}_*.
3425         * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
3426         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
3427         (__new_sem_post): Use standard initial exec code sequences.
3428         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
3429         lowlevellock.h.
3430         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
3431         FUTEX_PRIVATE_FLAG): Remove.
3432         (sem_timedwait): Use __NR_gettimeofday.  Use standard initial
3433         exec code sequences.
3434         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
3435         (__new_sem_trywait): Use standard initial exec code sequences.
3436         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
3437         (__new_sem_wait): Use standard initial exec code sequences.
3439 2007-07-31  Anton Blanchard  <anton@samba.org>
3441         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3442         Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
3443         atomic_full_barrier.
3445 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
3447         * allocatestack.c (stack_cache_lock): Change type to int.
3448         (get_cached_stack, allocate_stack, __deallocate_stack,
3449         __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
3450         __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
3451         as second argument to lll_lock and lll_unlock macros on
3452         stack_cache_lock.
3453         * pthread_create.c (__find_in_stack_list): Likewise.
3454         (start_thread): Similarly with pd->lock.  Use lll_robust_dead
3455         macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
3456         as second argument.
3457         * descr.h (struct pthread): Change lock and setxid_futex field
3458         type to int.
3459         * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
3460         LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
3461         * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
3462         * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
3463         Likewise.
3464         * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
3465         * pthread_cond_init.c (__pthread_cond_init): Likewise.
3466         * pthreadP.h (__attr_list_lock): Change type to int.
3467         * pthread_attr_init.c (__attr_list_lock): Likewise.
3468         * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
3469         ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
3470         lll_{,un}lock.
3471         * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
3472         also for lll_futex_{wake,wait}.
3473         * pthread_barrier_init.c (pthread_barrier_init): Make iattr
3474         a pointer to const.
3475         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
3476         LLL_SHARED as second argument to lll_{,un}lock.
3477         * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
3478         * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
3479         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
3480         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
3481         Likewise.
3482         * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
3483         as second argument to lll_{,un}lock macros on pd->lock.
3484         * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
3485         * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
3486         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
3487         * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
3488         Likewise.
3489         * sysdeps/pthread/createthread.c (do_clone, create_thread):
3490         Likewise.
3491         * pthread_once.c (once_lock): Change type to int.
3492         (__pthread_once): Pass LLL_PRIVATE as second argument to
3493         lll_{,un}lock macros on once_lock.
3494         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
3495         lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
3496         rwlock->__data.__shared as second argument to them and similarly
3497         for lll_futex_w*.
3498         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
3499         Likewise.
3500         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
3501         Likewise.
3502         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
3503         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
3504         * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
3505         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
3506         * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
3507         to lll_{,un}lock macros on __sem_mappings_lock.
3508         * sem_open.c (check_add_mapping): Likewise.
3509         (__sem_mappings_lock): Change type to int.
3510         * semaphoreP.h (__sem_mappings_lock): Likewise.
3511         * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
3512         LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
3513         instead of lll_*mutex_*, pass LLL_SHARED as last
3514         argument.
3515         (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
3516         pass LLL_SHARED as last argument.
3517         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
3518         LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
3519         lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
3520         pass LLL_SHARED as last argument.
3521         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
3522         lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
3523         LLL_SHARED as last argument.
3524         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
3525         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
3526         Similarly.
3527         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
3528         __libc_lock_lock_recursive, __libc_lock_unlock,
3529         __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
3530         argument to lll_{,un}lock.
3531         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
3532         _IO_lock_unlock): Likewise.
3533         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
3534         compound literal.
3535         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
3536         Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
3537         __fork_lock.
3538         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
3539         free_mem): Likewise.
3540         (__fork_lock): Change type to int.
3541         * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
3542         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
3543         isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
3544         lll_futex_wake.
3545         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
3546         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
3547         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
3548         New function.
3549         (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
3550         pass it through to lll_futex_*wait, only compile in when
3551         IS_IN_libpthread.
3552         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3553         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
3554         argument and pass it through to lll_futex_*wait.
3555         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
3556         lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
3557         lll_robust_*.  Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
3558         inline functions to __lll_* resp. __lll_robust_*.
3559         (LLL_MUTEX_LOCK_INITIALIZER): Remove.
3560         (lll_mutex_dead): Add private argument.
3561         (__lll_lock_wait_private): New prototype.
3562         (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
3563         __lll_robust_lock_timedwait): Add private argument to prototypes.
3564         (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
3565         call __lll_lock_wait_private, otherwise pass private to
3566         __lll_lock_wait.
3567         (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
3568         __lll_robust_timedlock): Add private argument, pass it to
3569         __lll_*wait functions.
3570         (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
3571         call __lll_unlock_wake_private, otherwise pass private to
3572         __lll_unlock_wake.
3573         (__lll_robust_unlock): Add private argument, pass it to
3574         __lll_robust_unlock_wake.
3575         (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
3576         lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
3577         argument, pass it through to __lll_* inline function.
3578         (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
3579         (lll_lock_t): Remove.
3580         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
3581         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
3582         lll_cond_wake, lll_cond_broadcast): Remove.
3583         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3584         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3585         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3586         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
3587         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
3588         the header from assembler.  Renamed all lll_mutex_* resp.
3589         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
3590         (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
3591         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3592         (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
3593         LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
3594         (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
3595         __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
3596         Remove prototype.
3597         (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
3598         (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
3599         rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
3600         (lll_trylock): Likewise, use __lll_trylock_asm, pass
3601         MULTIPLE_THREADS_OFFSET as another asm operand.
3602         (lll_lock): Add private argument, use __lll_lock_asm_start, pass
3603         MULTIPLE_THREADS_OFFSET as last asm operand, call
3604         __lll_lock_wait_private if private is constant LLL_PRIVATE,
3605         otherwise pass private as another argument to __lll_lock_wait.
3606         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
3607         lll_timedlock, lll_robust_timedlock): Add private argument, pass
3608         private as another argument to __lll_*lock_wait call.
3609         (lll_unlock): Add private argument, use __lll_unlock_asm, pass
3610         MULTIPLE_THREADS_OFFSET as another asm operand, call
3611         __lll_unlock_wake_private if private is constant LLL_PRIVATE,
3612         otherwise pass private as another argument to __lll_unlock_wake.
3613         (lll_robust_unlock): Add private argument, pass private as another
3614         argument to __lll_unlock_wake.
3615         (lll_robust_dead): Add private argument, use __lll_private_flag
3616         macro.
3617         (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
3618         LLL_MUTEX_LOCK_INITIALIZER.
3619         (lll_lock_t): Remove.
3620         (LLL_LOCK_INITIALIZER_WAITERS): Define.
3621         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
3622         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
3623         lll_cond_wake, lll_cond_broadcast): Remove.
3624         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3625         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
3626         2007-05-2{3,9} changes.
3627         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
3628         kernel-features.h and lowlevellock.h.
3629         (LOAD_PRIVATE_FUTEX_WAIT): Define.
3630         (LOAD_FUTEX_WAIT): Rewritten.
3631         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
3632         define.
3633         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
3634         (__lll_mutex_lock_wait): Rename to ...
3635         (__lll_lock_wait): ... this.  Take futex addr from %edx instead of
3636         %ecx, %ecx is now private argument.  Don't compile in for libc.so.
3637         (__lll_mutex_timedlock_wait): Rename to ...
3638         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.  %esi
3639         contains private argument.  Don't compile in for libc.so.
3640         (__lll_mutex_unlock_wake): Rename to ...
3641         (__lll_unlock_wake): ... this.  %ecx contains private argument.
3642         Don't compile in for libc.so.
3643         (__lll_timedwait_tid): Use __NR_gettimeofday.
3644         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
3645         kernel-features.h and lowlevellock.h.
3646         (LOAD_FUTEX_WAIT): Define.
3647         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
3648         define.
3649         (__lll_robust_mutex_lock_wait): Rename to ...
3650         (__lll_robust_lock_wait): ... this.  Futex addr is now in %edx
3651         argument, %ecx argument contains private.  Use LOAD_FUTEX_WAIT
3652         macro.
3653         (__lll_robust_mutex_timedlock_wait): Rename to ...
3654         (__lll_robust_timedlock_wait): ... this.  Use __NR_gettimeofday.
3655         %esi argument contains private, use LOAD_FUTEX_WAIT macro.
3656         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
3657         lowlevellock.h.
3658         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3659         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
3660         PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
3661         __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
3662         to __lll_lock_wait in %edx.
3663         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
3664         Include lowlevellock.h and pthread-errnos.h.
3665         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3666         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
3667         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
3668         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3669         pass LLL_SHARED in %ecx to both __lll_lock_wait and
3670         __lll_unlock_wake.
3671         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
3672         Include lowlevellock.h and pthread-errnos.h.
3673         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
3674         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
3675         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
3676         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3677         pass LLL_SHARED in %ecx to both __lll_lock_wait and
3678         __lll_unlock_wake.
3679         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
3680         Include lowlevellock.h.
3681         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3682         Don't define.
3683         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
3684         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
3685         pass LLL_SHARED in %ecx to both __lll_lock_wait and
3686         __lll_unlock_wake.  Use __NR_gettimeofday.
3687         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
3688         Include lowlevellock.h.
3689         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3690         (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
3691         to __lll_*, pass cond_lock address in %edx rather than %ecx to
3692         __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
3693         and __lll_unlock_wake.
3694         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
3695         Include lowlevellock.h.
3696         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3697         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
3698         MUTEX(%ebx) address in %edx rather than %ecx to
3699         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
3700         and __lll_unlock_wake.  Move return value from %ecx to %edx
3701         register.
3702         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
3703         Include lowlevellock.h.
3704         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
3705         Don't define.
3706         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3707         MUTEX(%ebp) address in %edx rather than %ecx to
3708         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
3709         and __lll_unlock_wake.  Move return value from %ecx to %edx
3710         register.  Use __NR_gettimeofday.
3711         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.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_unlock.S:
3721         Include lowlevellock.h.
3722         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3723         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
3724         MUTEX(%edi) address in %edx rather than %ecx to
3725         __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
3726         and __lll_unlock_wake.
3727         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
3728         Include lowlevellock.h.
3729         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3730         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
3731         MUTEX(%ebx) address in %edx rather than %ecx to
3732         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
3733         and __lll_unlock_wake.  Move return value from %ecx to %edx
3734         register.
3735         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
3736         lowlevellock.h.
3737         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
3738         define.
3739         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
3740         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
3741         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
3742         lowlevellock.h.
3743         (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
3744         (sem_timedwait): Use __NR_gettimeofday.
3745         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
3746         lowlevellock.h.
3747         (LOCK): Don't define.
3748         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
3749         lowlevellock.h.
3750         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3751         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
3752         are waiters.
3753         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
3754         2007-05-2{3,9} changes.
3755         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
3756         kernel-features.h and lowlevellock.h.
3757         (LOAD_PRIVATE_FUTEX_WAIT): Define.
3758         (LOAD_FUTEX_WAIT): Rewritten.
3759         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
3760         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
3761         (__lll_mutex_lock_wait): Rename to ...
3762         (__lll_lock_wait): ... this.  %esi is now private argument.
3763         Don't compile in for libc.so.
3764         (__lll_mutex_timedlock_wait): Rename to ...
3765         (__lll_timedlock_wait): ... this.  %esi contains private argument.
3766         Don't compile in for libc.so.
3767         (__lll_mutex_unlock_wake): Rename to ...
3768         (__lll_unlock_wake): ... this.  %esi contains private argument.
3769         Don't compile in for libc.so.
3770         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
3771         kernel-features.h and lowlevellock.h.
3772         (LOAD_FUTEX_WAIT): Define.
3773         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
3774         (__lll_robust_mutex_lock_wait): Rename to ...
3775         (__lll_robust_lock_wait): ... this.  %esi argument contains private.
3776         Use LOAD_FUTEX_WAIT macro.
3777         (__lll_robust_mutex_timedlock_wait): Rename to ...
3778         (__lll_robust_timedlock_wait): ... this. %esi argument contains
3779         private, use LOAD_FUTEX_WAIT macro.
3780         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
3781         lowlevellock.h.
3782         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3783         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
3784         PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
3785         __lll_lock_wait and __lll_unlock_wake.
3786         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
3787         Include lowlevellock.h and pthread-errnos.h.
3788         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
3789         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
3790         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
3791         pass LLL_SHARED in %esi to both __lll_lock_wait and
3792         __lll_unlock_wake.
3793         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
3794         Include lowlevellock.h and pthread-errnos.h.
3795         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
3796         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
3797         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
3798         pass LLL_SHARED in %esi to both __lll_lock_wait and
3799         __lll_unlock_wake.
3800         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
3801         Include lowlevellock.h.
3802         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3803         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
3804         pass LLL_SHARED in %esi to both __lll_lock_wait and
3805         __lll_unlock_wake.
3806         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
3807         Include lowlevellock.h.
3808         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
3809         (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
3810         to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
3811         and __lll_unlock_wake.
3812         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
3813         Include lowlevellock.h.
3814         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3815         Don't define.
3816         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
3817         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3818         and __lll_unlock_wake.
3819         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3820         Include lowlevellock.h.
3821         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3822         Don't define.
3823         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3824         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3825         and __lll_unlock_wake.
3826         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3827         Include lowlevellock.h.
3828         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3829         Don't define.
3830         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3831         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3832         and __lll_unlock_wake.
3833         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
3834         Include lowlevellock.h.
3835         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3836         Don't define.
3837         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
3838         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
3839         and __lll_unlock_wake.
3840         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
3841         Include lowlevellock.h.
3842         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
3843         Don't define.
3844         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
3845         pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
3846         and __lll_unlock_wake.
3847         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
3848         lowlevellock.h.
3849         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
3850         define.
3851         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
3852         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
3853         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
3854         lowlevellock.h.
3855         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3856         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
3857         lowlevellock.h.
3858         (LOCK): Don't define.
3859         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
3860         lowlevellock.h.
3861         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
3862         * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
3863         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
3864         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
3865         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
3866         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
3867         (__lll_lock_wait_private): New function.
3868         (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
3869         it to lll_futex_*wait.  Don't compile in for libc.so.
3870         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
3871         Remove.
3872         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
3873         (struct sparc_pthread_barrier): Remove.
3874         (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
3875         struct sparc_pthread_barrier.  Pass
3876         ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
3877         and lll_futex_wait macros.
3878         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3879         Remove.
3880         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3881         Include sparc pthread_barrier_wait.c instead of generic one.
3883 2007-07-30  Jakub Jelinek  <jakub@redhat.com>
3885         * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
3887         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
3888         (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
3889         %ecx.
3890         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
3891         (pthread_rwlock_timedwrlock): Likewise.
3892         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
3893         (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
3895 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
3897         * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
3899 2007-07-26  Jakub Jelinek  <jakub@redhat.com>
3901         * tst-locale2.c (useless): Add return statement.
3903 2007-07-24  Jakub Jelinek  <jakub@redhat.com>
3905         * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
3906         lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
3907         * pthread_create.c (start_thread): Likewise.
3908         * init.c (sighandler_setxid): Likewise.
3909         * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3910         * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3911         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3912         * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3913         * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3914         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3915         * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3916         * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
3917         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
3918         Likewise.
3919         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
3920         Likewise.
3921         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
3922         Likewise.
3923         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
3924         __rtld_notify): Likewise.
3925         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
3926         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
3927         __pthread_once): Likewise.
3928         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
3929         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3930         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3931         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3932         (lll_futex_wait): Add private argument, define as wrapper around
3933         lll_futex_timed_wait.
3934         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3935         use __lll_private_flag macro.
3936         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3937         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3938         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
3939         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3940         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3941         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3942         (lll_futex_wait): Add private argument, define as wrapper around
3943         lll_futex_timed_wait.
3944         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3945         use __lll_private_flag macro.
3946         (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
3947         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
3948         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
3949         Define.
3950         (lll_futex_timed_wait, lll_futex_wake): Use it.
3951         (lll_private_futex_wait, lll_private_futex_timed_wait,
3952         lll_private_futex_wake): Removed.
3953         * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
3954         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3955         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3956         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3957         (lll_futex_wait): Add private argument, define as wrapper around
3958         lll_futex_timed_wait.
3959         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3960         use __lll_private_flag macro.
3961         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3962         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3963         to lll_futex_*.
3964         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
3965         (lll_private_futex_wait, lll_private_futex_timed_wait,
3966         lll_private_futex_wake): Removed.
3967         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
3968         Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
3969         (lll_private_futex_wait, lll_private_futex_timed_wait,
3970         lll_private_futex_wake): Removed.
3971         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
3972         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
3973         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
3974         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
3975         (lll_futex_wait): Add private argument, define as wrapper around
3976         lll_futex_timed_wait.
3977         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
3978         use __lll_private_flag macro.
3979         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
3980         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
3981         to lll_futex_*.
3982         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
3983         Define.
3984         (lll_futex_timed_wait, lll_futex_wake): Use it.
3985         (lll_private_futex_wait, lll_private_futex_timed_wait,
3986         lll_private_futex_wake): Removed.
3988 2007-07-27  Jakub Jelinek  <jakub@redhat.com>
3990         * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
3991         of the structure for sparc32.
3993 2007-07-26  Aurelien Jarno  <aurelien@aurel32.net>
3995         * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
3997 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
3999         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
4000         code used when private futexes are assumed.
4001         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
4002         Likewise.
4004 2007-07-23  Jakub Jelinek  <jakub@redhat.com>
4006         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4007         (__lll_private_flag): Define.
4008         (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
4009         (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
4010         __lll_private_flag.
4011         (lll_private_futex_wait, lll_private_futex_timedwait,
4012         lll_private_futex_wake): Define as wrapper around non-_private
4013         macros.
4014         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4015         (__lll_private_flag): Define.
4016         (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
4017         (lll_private_futex_wait, lll_private_futex_timedwait,
4018         lll_private_futex_wake): Define as wrapper around non-_private
4019         macros.
4021 2007-07-10  Steven Munroe  <sjmunroe@us.ibm.com>
4023         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
4024         parameter to lll_futex_wait call.
4025         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
4027         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
4028         Replace lll_futex_wait with lll_private_futex_wait.
4029         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
4030         Add LLL_SHARED parameter to lll_futex_wake().
4032         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
4033         LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
4034         lll_private_futex_wake.
4035         (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
4036         bit from private parm before syscall.
4037         (lll_futex_timed_wait): Likewise.
4038         (lll_futex_wake): Likewise.
4039         (lll_futex_wake_unlock): Likewise.
4040         (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
4041         (lll_robust_mutex_unlock): Likewise.
4042         (lll_mutex_unlock_force): Likewise.
4043         (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
4045 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
4047         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
4048         compilation when unconditionally using private futexes.
4049         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
4050         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
4051         Likewise.
4052         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
4053         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
4055 2007-07-17  Jakub Jelinek  <jakub@redhat.com>
4057         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
4058         Define.
4060 2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4062         * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
4063         kernel-features.h.
4065 2007-05-16  Roland McGrath  <roland@redhat.com>
4067         * init.c (__nptl_initial_report_events): New variable.
4068         (__pthread_initialize_minimal_internal): Initialize pd->report_events
4069         to that.
4071 2007-06-22  Jakub Jelinek  <jakub@redhat.com>
4073         * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
4074         cpusetsize if pthread_getaffinity_np failed with ENOSYS.
4076 2007-06-19  Ulrich Drepper  <drepper@redhat.com>
4078         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
4079         implementation.
4081 2007-06-18  Ulrich Drepper  <drepper@redhat.com>
4083         * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
4084         * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
4085         * pthread_mutex_timedlock.c: Likewise.
4086         * pthread_mutex_trylock.c: Likewise.
4087         * pthread_mutex_unlock.c: Likewise.
4089 2007-06-17  Andreas Schwab  <schwab@suse.de>
4091         * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
4092         sections.
4094 2007-06-17  Ulrich Drepper  <drepper@redhat.com>
4096         * allocatestack.c (allocate_stack): Make code compile if
4097         __ASSUME_PRIVATE_FUTEX is set.
4099 2007-06-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4101         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
4102         (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
4103         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
4104         (__pthread_rwlock_wrlock): Likewise.
4105         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
4106         (pthread_rwlock_timedrdlock): Likewise.
4107         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
4108         (pthread_rwlock_timedwrlock): Likewise.
4109         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
4110         (__pthread_rwlock_unlock): Likewise.
4112 2007-06-10  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4114         * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
4115         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
4116         Split __flags into __flags, __shared, __pad1 and __pad2.
4117         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
4118         futexes if they are available.
4119         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
4120         in libc-lowlevellock.S allow using private futexes.
4121         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
4122         FUTEX_PRIVATE_FLAG.  Add additional parameter to lll_futex_wait,
4123         lll_futex_timed_wait and lll_futex_wake.  Change lll_futex_wait
4124         to call lll_futex_timed_wait.  Add lll_private_futex_wait,
4125         lll_private_futex_timed_wait and lll_private_futex_wake.
4126         (lll_robust_mutex_unlock): Fix typo.
4127         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
4128         field in futex command setup.
4129         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
4130         COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
4131         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
4132         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
4133         if they are available.  Remove clear_once_control.
4134         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
4135         futexes if they are available.
4136         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
4137         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
4138         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
4139         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
4140         * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
4141         Wake only when there are waiters.
4142         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
4143         support.  Indicate that there are waiters.  Remove unnecessary
4144         extra cancellation test.
4145         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.  Removed
4146         left-over duplication of __sem_wait_cleanup.
4148 2007-06-07  Ulrich Drepper  <drepper@redhat.com>
4150         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
4151         parameter to lll_futex_wait, lll_futex_timed_wait, and
4152         lll_futex_wake.  Change lll_futex_wait to call lll_futex_timed_wait.
4153         Add lll_private_futex_wait, lll_private_futex_timed_wait, and
4154         lll_private_futex_wake.
4155         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
4156         * allocatestack.c: Adjust use of lll_futex_* macros.
4157         * init.c: Likewise.
4158         * lowlevellock.h: Likewise.
4159         * pthread_barrier_wait.c: Likewise.
4160         * pthread_cond_broadcast.c: Likewise.
4161         * pthread_cond_destroy.c: Likewise.
4162         * pthread_cond_signal.c: Likewise.
4163         * pthread_cond_timedwait.c: Likewise.
4164         * pthread_cond_wait.c: Likewise.
4165         * pthread_create.c: Likewise.
4166         * pthread_mutex_lock.c: Likewise.
4167         * pthread_mutex_setprioceiling.c: Likewise.
4168         * pthread_mutex_timedlock.c: Likewise.
4169         * pthread_mutex_unlock.c: Likewise.
4170         * pthread_rwlock_timedrdlock.c: Likewise.
4171         * pthread_rwlock_timedwrlock.c: Likewise.
4172         * pthread_rwlock_unlock.c: Likewise.
4173         * sysdeps/alpha/tls.h: Likewise.
4174         * sysdeps/i386/tls.h: Likewise.
4175         * sysdeps/ia64/tls.h: Likewise.
4176         * sysdeps/powerpc/tls.h: Likewise.
4177         * sysdeps/pthread/aio_misc.h: Likewise.
4178         * sysdeps/pthread/gai_misc.h: Likewise.
4179         * sysdeps/s390/tls.h: Likewise.
4180         * sysdeps/sh/tls.h: Likewise.
4181         * sysdeps/sparc/tls.h: Likewise.
4182         * sysdeps/unix/sysv/linux/fork.c: Likewise.
4183         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
4184         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
4185         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
4186         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
4187         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
4188         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
4189         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
4190         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
4191         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
4192         Likewise.
4193         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
4194         * sysdeps/x86_64/tls.h: Likewise.
4196 2007-05-29  Ulrich Drepper  <drepper@redhat.com>
4198         * pthread_getattr_np.c: No need to install a cancellation handler,
4199         this is no cancellation point.
4200         * pthread_getschedparam.c: Likewise.
4201         * pthread_setschedparam.c: Likewise.
4202         * pthread_setschedprio.c: Likewise.
4203         * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
4204         lll_unlock_wake_cb.
4205         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
4206         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
4207         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4208         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
4209         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
4210         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
4211         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
4212         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
4213         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
4214         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
4215         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
4216         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
4218         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
4219         whether there are more than one thread makes no sense here since
4220         we only call the slow path if the locks are taken.
4221         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
4223         * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
4224         COND_NWAITERS_SHIFT.
4225         * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
4226         COND_CLOCK_BITS.
4227         * pthread_cond_init.c: Likewise.
4228         * pthread_cond_timedwait.c: Likewise.
4229         * pthread_cond_wait.c: Likewise.
4230         * pthread_condattr_getclock.c: Likewise.
4231         * pthread_condattr_setclock.c: Likewise.
4232         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
4233         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4234         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4235         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4236         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4238 2007-05-28  Jakub Jelinek  <jakub@redhat.com>
4240         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
4241         unistd.h.
4243         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
4244         insn suffix.
4245         (THREAD_GSCOPE_GET_FLAG): Remove.
4246         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
4247         * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
4248         changes.
4249         * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
4250         (THREAD_GSCOPE_GET_FLAG): Remove.
4251         (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
4252         instead of THREAD_GSCOPE_GET_FLAG.
4253         (THREAD_GSCOPE_SET_FLAG): Likewise.  Add atomic_write_barrier after
4254         it.
4255         * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4256         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4257         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4258         THREAD_GSCOPE_WAIT): Define.
4259         * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4260         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4261         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4262         THREAD_GSCOPE_WAIT): Define.
4263         * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4264         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4265         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4266         THREAD_GSCOPE_WAIT): Define.
4267         * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4268         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4269         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4270         THREAD_GSCOPE_WAIT): Define.
4272 2007-05-24  Richard Henderson  <rth@redhat.com>
4274         * descr.h (struct pthread): Add header.gscope_flag.
4275         * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
4276         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
4277         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
4278         THREAD_GSCOPE_WAIT): Define.
4280 2007-05-27  Ulrich Drepper  <drepper@redhat.com>
4282         * init.c: Make it compile with older kernel headers.
4284         * tst-initializers1.c: Show through exit code which test failed.
4286         * pthread_rwlock_init.c: Also initialize __shared field.
4287         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
4288         element in rwlock structure into four byte elements.  One of them is
4289         the new __shared element.
4290         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
4291         Likewise.
4292         [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
4293         __shared, adjust names of other padding elements.
4294         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4295         * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
4296         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
4297         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
4298         FUTEX_PRIVATE_FLAG.
4299         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
4300         futex to use private operations if possible.
4301         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
4302         Likewise.
4303         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
4304         Likewise.
4305         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
4306         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
4307         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
4308         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
4309         Likewise.
4310         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
4311         Likewise.
4312         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
4313         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
4315 2007-05-26  Ulrich Drepper  <drepper@redhat.com>
4317         * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
4318         * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
4319         * pthread_rwlock_timedrdlock.c: Likewise.
4320         * pthread_rwlock_tryrdlock.c: Likewise.
4322         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
4323         optimization.
4325         * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
4326         * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
4327         duplication of __sem_wait_cleanup.
4329         * allocatestack.c: Revert last change.
4330         * init.c: Likewise.
4331         * sysdeps/i386/tls.h: Likewise.
4332         * sysdeps/x86_64/tls.h: Likewise.
4333         * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
4334         header structure.
4335         * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
4337         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
4338         Add private field.
4339         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
4340         * pthread_barrier_init.c: Set private flag if pshared and private
4341         futexes are supported.
4342         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
4343         private field in futex command setup.
4344         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
4346 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
4348         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
4349         support.
4350         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4351         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4352         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
4353         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4354         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4356         * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
4357         * sem_init.c (__new_sem_init): Rewrite to initialize all three
4358         fields in the structure.
4359         (__old_sem_init): New function.
4360         * sem_open.c: Initialize all fields of the structure.
4361         * sem_getvalue.c: Adjust for renamed element.
4362         * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
4363         (gen-as-const-headers): Add structsem.sym.
4364         * sysdeps/unix/sysv/linux/structsem.sym: New file.
4365         * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
4366         struct new_sem.  Add struct old_sem.
4367         * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
4368         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
4369         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
4370         * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
4371         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
4372         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
4373         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
4374         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
4375         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4376         * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
4377         * tst-sem10.c: New file.
4378         * tst-sem11.c: New file.
4379         * tst-sem12.c: New file.
4380         * tst-typesizes.c: Test struct new_sem and struct old_sem instead
4381         of struct sem.
4383 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
4384             Jakub Jelinek  <jakub@redhat.com>
4386         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
4387         Move __pthread_enable_asynccancel right before futex syscall.
4388         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
4389         Likewise.
4391 2007-05-24  Jakub Jelinek  <jakub@redhat.com>
4393         * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
4394         THREAD_COPY_PRIVATE_FUTEX): Define.
4395         * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
4396         THREAD_COPY_PRIVATE_FUTEX): Define.
4397         * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
4398         * init.c (__pthread_initialize_minimal_internal): Use
4399         THREAD_SET_PRIVATE_FUTEX.
4401         * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
4402         (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
4403         THREAD_GSCOPE_FLAG_WAIT): Define.
4404         (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
4405         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
4406         * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
4407         PTR_DEMANGLE.
4408         (THREAD_GSCOPE_GET_FLAG): Define.
4409         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
4410         * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
4411         instead of ->header.gscope_flag directly.
4413 2007-05-23  Ulrich Drepper  <drepper@redhat.com>
4415         * init.c (__pthread_initialize_minimal_internal): Check whether
4416         private futexes are available.
4417         * allocatestack.c (allocate_stack): Copy private_futex field from
4418         current thread into the new stack.
4419         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
4420         futexes if they are available.
4421         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
4422         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
4423         in libc-lowlevellock.S allow using private futexes.
4424         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
4425         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
4426         FUTEX_PRIVATE_FLAG.
4427         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
4428         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
4429         if they are available.
4430         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
4431         * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
4432         * sysdeps/i386/tcb-offsets.sym: Likewise.
4433         * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
4434         * sysdeps/i386/tls.h (tcbhead_t): Likewise.
4436 2007-05-21  Ulrich Drepper  <drepper@redhat.com>
4438         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
4439         Remove ptr_wait_lookup_done again.
4440         * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
4441         (__pthread_initialize_minimal_internal): Initialize
4442         _dl_wait_lookup_done pointer in _rtld_global directly.
4443         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
4444         Remove code to code _dl_wait_lookup_done.
4445         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
4446         encrypted for now.
4448 2007-05-21  Jakub Jelinek  <jakub@redhat.com>
4450         * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
4451         pthread_mutex_init failed with ENOTSUP.
4453 2007-05-19  Ulrich Drepper  <drepper@redhat.com>
4455         * allocatestack.c (__wait_lookup_done): New function.
4456         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
4457         Add ptr_wait_lookup_done.
4458         * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
4459         * pthreadP.h: Declare __wait_lookup_done.
4460         * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
4461         Define macros to implement reference handling of global scope.
4462         * sysdeps/x86_64/tls.h: Likewise.
4463         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
4464         Initialize GL(dl_wait_lookup_done).
4466 2007-05-17  Ulrich Drepper  <drepper@redhat.com>
4468         [BZ #4512]
4469         * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
4470         is detected.
4471         * pthread_mutex_timedlock.c: Likewise.
4472         * pthread_mutex_trylock.c: Likewise.
4473         Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
4475         * Makefile (tests): Add tst-robust9 and tst-robustpi9.
4476         * tst-robust9.c: New file.
4477         * tst-robustpi9.c: New file.
4479         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
4480         unnecessary extra cancellation test.
4482 2007-05-14  Ulrich Drepper  <drepper@redhat.com>
4484         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
4485         extra cancellation test.
4486         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
4488 2007-05-10  Ulrich Drepper  <drepper@redhat.com>
4490         * descr.h (struct pthread): Rearrange members to fill hole in
4491         64-bit layout.
4493         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4494         (__pthread_setaffinity_new): If syscall was successful and
4495         RESET_VGETCPU_CACHE is defined, use it before returning.
4496         * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
4498 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
4500         [BZ #4455]
4501         * tst-align2.c: Include stackinfo.h.
4502         * tst-getpid1.c: Likewise.
4504 2007-05-02  Carlos O'Donell  <carlos@systemhalted.org>
4506         [BZ #4455]
4507         * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
4508         * tst-getpid1.c (do_test): Likewise.
4510         [BZ #4456]
4511         * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
4512         (allocate_stack): Likewise.
4514 2007-05-07  Ulrich Drepper  <drepper@redhat.com>
4516         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
4517         (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
4518         (__lll_robust_timedlock_wait): Likewise.
4519         Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
4521 2007-05-06  Mike Frysinger  <vapier@gentoo.org>
4523         [BZ #4465]
4524         * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
4525         * tst-cancel4.c (tf_fdatasync): New test.
4527 2007-04-27  Ulrich Drepper  <drepper@redhat.com>
4529         [BZ #4392]
4530         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
4531         check mutexes like normal mutexes.
4533         [BZ #4306]
4534         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
4535         Initialize the whole sigevent structure to appease valgrind.
4537 2007-04-25  Ulrich Drepper  <drepper@redhat.com>
4539         * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
4540         * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
4542 2007-04-06  Ulrich Drepper  <drepper@redhat.com>
4544         * tst-locale1.c: Avoid warnings.
4545         * tst-locale2.c: Likewise.
4547 2007-03-19  Steven Munroe  <sjmunroe@us.ibm.com>
4549         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4550         (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
4552 2007-03-16  Jakub Jelinek  <jakub@redhat.com>
4554         * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
4555         __extern_always_inline where appropriate.
4556         * sysdeps/pthread/pthread.h: Likewise.
4558 2007-03-13  Richard Henderson  <rth@redhat.com>
4560         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
4561         separate cfi regions for the two subsections.
4563 2007-02-25  Ulrich Drepper  <drepper@redhat.com>
4565         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
4566         new thread, don't just decrement it.
4567         Patch by Suzuki K P <suzuki@in.ibm.com>.
4569 2007-02-21  Ulrich Drepper  <drepper@redhat.com>
4571         * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
4572         PTHFCT_CALL definition.
4574 2007-02-18  Ulrich Drepper  <drepper@redhat.com>
4576         * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
4577         available, don't use it.
4579 2007-02-09  Jakub Jelinek  <jakub@redhat.com>
4581         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4582         (__lll_mutex_timedlock_wait): Use correct pointer when we don't
4583         call into the kernel to delay.
4585 2007-01-18  Ulrich Drepper  <drepper@redhat.com>
4587         * tst-initializers1.c: We want to test the initializers as seen
4588         outside of libc, so undefined _LIBC.
4590         * pthread_join.c (cleanup): Avoid warning.
4592 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
4594         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4595         (__lll_timedwait_tid): Add unwind info.
4597         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
4598         function table, mangle the pointers.
4599         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
4600         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
4601         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
4602         demangle pointers before use.
4603         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
4604         demangle pointer.
4605         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
4606         * sysdeps/pthread/setxid.h: Likewise.
4608 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
4610         * tst-rwlock7.c: Show some more information in case of correct
4611         behavior.
4613 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
4615         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4616         (lll_futex_timed_wait): Undo part of last change, don't negate
4617         return value.
4619 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
4621         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
4622         FUTEX_CMP_REQUEUE and lll_futex_requeue.
4624 2006-12-28  David S. Miller  <davem@davemloft.net>
4626         * shlib-versions: Fix sparc64 linux target specification.
4628 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
4630         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
4631         Adjust include path for pthread_barrier_wait.c move.
4633 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
4635         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
4636         tid isn't reread from pd->tid in between ESRCH test and the syscall.
4638 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
4640         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
4641         6 argument cancellable syscalls.
4642         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
4643         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
4644         6 argument cancellable syscalls.
4645         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
4647 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
4649         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
4650         (__rtld_mrlock_initialize): Add missing closing parenthesis.
4652 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
4654         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
4655         __sync_lock_release instead of __sync_lock_release_si.
4657 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
4659         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
4660         Define.
4661         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
4662         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
4663         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4664         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4665         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4666         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4667         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4668         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4669         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4670         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4671         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4673 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
4675         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
4676         * pthread_barrier_wait.c: ...here.
4677         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
4678         * pthread_cond_broadcast.c: ...here.
4679         * sysdeps/pthread/pthread_cond_signal.c: Move to...
4680         * pthread_cond_signal.c: ...here.
4681         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
4682         * pthread_cond_timedwait.c: ...here.
4683         * sysdeps/pthread/pthread_cond_wait.c: Move to...
4684         * pthread_cond_wait.c: ...here.
4685         * sysdeps/pthread/pthread_once.c: Move to...
4686         * pthread_once.c: ...here.
4687         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
4688         * pthread_rwlock_rdlock.c: ...here.
4689         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
4690         * pthread_rwlock_timedrdlock.c: ...here.
4691         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
4692         * pthread_rwlock_timedwrlock.c: ...here.
4693         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
4694         * pthread_rwlock_unlock.c: ...here.
4695         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
4696         * pthread_rwlock_wrlock.c: ...here.
4697         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
4698         * pthread_spin_destroy.c: ...here.
4699         * sysdeps/pthread/pthread_spin_init.c: Move to...
4700         * pthread_spin_init.c: ...here.
4701         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
4702         * pthread_spin_unlock.c: ...here.
4703         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
4704         * pthread_getcpuclockid.c: ...here.
4706         * init.c: USE_TLS support is now always enabled.
4707         * tst-tls5.h: Likewise.
4708         * sysdeps/alpha/tls.h: Likewise.
4709         * sysdeps/i386/tls.h: Likewise.
4710         * sysdeps/ia64/tls.h: Likewise.
4711         * sysdeps/powerpc/tls.h: Likewise.
4712         * sysdeps/s390/tls.h: Likewise.
4713         * sysdeps/sh/tls.h: Likewise.
4714         * sysdeps/sparc/tls.h: Likewise.
4715         * sysdeps/x86_64/tls.h: Likewise.
4717 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
4719         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
4720         __rtld_mrlock_change): Update oldval if atomic compare and exchange
4721         failed.
4723         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4724         Define to THREAD_SELF->header.multiple_threads.
4725         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
4726         Likewise.
4727         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
4728         Likewise.
4729         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
4730         (SINGLE_THREAD_P): Likewise.
4731         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
4732         (SINGLE_THREAD_P): Likewise.
4733         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
4734         (SINGLE_THREAD_P): Likewise.
4735         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
4736         (SINGLE_THREAD_P): Likewise.
4737         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
4738         Likewise.
4739         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
4740         (SINGLE_THREAD_P): Likewise.
4741         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
4742         (SINGLE_THREAD_P): Likewise.
4743         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
4744         Likewise.
4746 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
4748         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
4749         by default rather than 2_3_3.
4751 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
4753         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
4754         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
4755         atomic_* instead of catomic_* macros.
4757 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
4759         [BZ #3285]
4760         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
4761         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
4762         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4763         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4764         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4765         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
4766         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4767         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4768         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4769         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
4770         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4771         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4772         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4774 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
4776         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
4777         cancelable syscalls with six parameters.
4779         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
4780         operations instead of atomic_*.
4782 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
4784         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
4786 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
4788         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
4789         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
4790         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
4791         New file.
4792         * pthread_attr_setstack.c: Allow overwriting the version number of the
4793         new symbol.
4794         * pthread_attr_setstacksize.c: Likewise.
4795         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
4796         it.
4797         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
4798         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
4800 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
4802         [BZ #3251]
4803         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
4804         Patch by Petr Baudis.
4806 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
4808         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
4810         * tst-cancel2.c (tf): Loop as long as something was written.
4812 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4814         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
4815         mutexes wake all mutexes.
4816         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
4817         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
4818         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4820 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
4822         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
4823         to guarantee the thread is always canceled.
4825 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
4827         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
4828         Include stdlib.h.
4829         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
4830         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
4831         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
4832         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4833         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4835 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
4837         [BZ #3123]
4838         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
4839         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
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.
4843         * Makefile (tests): Add tst-cond22.
4844         * tst-cond22.c: New file.
4846 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
4848         [BZ #3124]
4849         * descr.h (struct pthread): Add parent_cancelhandling.
4850         * sysdeps/pthread/createthread.c (create_thread): Pass parent
4851         cancelhandling value to child.
4852         * pthread_create.c (start_thread): If parent thread was canceled
4853         reset the SIGCANCEL mask.
4854         * Makefile (tests): Add tst-cancel25.
4855         * tst-cancel25.c: New file.
4857 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
4858             Ulrich Drepper  <drepper@redhat.com>
4860         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
4861         counterp if it is already zero.
4862         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
4864 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
4865             Roland McGrath  <roland@redhat.com>
4867         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
4868         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4869         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
4870         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4871         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4872         lll_robust_mutex_timedlock, lll_mutex_unlock,
4873         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4874         Add _L_*_ symbols around the subsection.
4875         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
4876         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
4878 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
4879             Roland McGrath  <roland@redhat.com>
4881         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
4882         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
4883         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
4884         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
4885         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
4886         lll_robust_mutex_timedlock, lll_mutex_unlock,
4887         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
4888         Add _L_*_ symbols around the subsection.
4889         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
4890         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
4892 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
4894         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
4895         change because it can disturb too much existing code.  If real hard
4896         reader preference is needed we'll introduce another type.
4897         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4898         (pthread_rwlock_timedwrlock): Likewise.
4899         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
4900         Likewise.
4902 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
4904         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
4905         reader preference.
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-25  Jakub Jelinek  <jakub@redhat.com>
4913         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
4914         Only define ifdef SHARED.
4916 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
4918         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
4919         (free_stacks): ...here.
4920         (__free_stack_cache): New function.
4921         * pthreadP.h: Declare __free_stack_cache.
4922         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
4923         ptr_freeres.
4924         * init.c (pthread_functions): Initialize ptr_freeres.
4925         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
4926         New freeres function.
4928 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
4930         [BZ #3018]
4931         * Makefile (extra-objs): Add modules to extra-test-objs instead.
4933 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
4935         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
4936         _XOPEN_REALTIME_THREADS.
4938 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
4940         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
4941         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
4942         HAVE_CLOCK_GETTIME_VSYSCALL.
4943         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
4945 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
4947         * sysdeps/unix/sysv/linux/bits/posix_opt.h
4948         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
4949         * descr.h (struct priority_protection_data): New type.
4950         (struct pthread): Add tpp field.
4951         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
4952         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
4953         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
4954         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
4955         TPP mutexes.
4956         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
4957         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
4958         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
4959         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
4960         * tpp.c: New file.
4961         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
4962         boosted by TPP.
4963         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
4964         * pthread_mutexattr_getprioceiling.c
4965         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
4966         in the SCHED_FIFO priority range.
4967         * pthread_mutexattr_setprioceiling.c
4968         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
4969         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
4970         if mutex is not TPP.  Ceiling is now in __data.__lock.
4971         * pthread_mutex_setprioceiling.c: Include stdbool.h.
4972         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
4973         is now in __data.__lock.  Add locking.
4974         * pthread_create.c (__free_tcb): Free pd->tpp structure.
4975         * Makefile (libpthread-routines): Add tpp.
4976         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
4977         * tst-tpp.h: New file.
4978         * tst-mutexpp1.c: New file.
4979         * tst-mutexpp6.c: New file.
4980         * tst-mutexpp10.c: New file.
4981         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
4982         * tst-mutex6.c (TEST_FUNCTION): Likewise.
4984 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
4986         [BZ #2843]
4987         * pthread_join.c (pthread_join): Account for self being canceled
4988         when checking for deadlocks.
4989         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
4990         (tf1): Don't print anything after pthread_join returns, this would be
4991         another cancellation point.
4992         (tf2): Likewise.
4993         * tst-join6.c: New file.
4994         * Makefile (tests): Add tst-join6.
4996 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
4998         [BZ #2892]
4999         * pthread_setspecific.c (__pthread_setspecific): Check
5000         out-of-range index before checking for unused key.
5002         * sysdeps/pthread/gai_misc.h: New file.
5004 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
5006         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
5007         file.  Don't use sysctl.
5008         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
5009         overwrite the file if this is likely not true.
5011 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
5013         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
5014         * Makefile (tests): Add tst-getpid3.
5015         * tst-getpid3.c: New file.
5017 2006-07-30  Roland McGrath  <roland@redhat.com>
5019         * Makefile (libpthread-routines): Add ptw-sigsuspend.
5021         * sysdeps/unix/sysv/linux/i386/not-cancel.h
5022         (pause_not_cancel): New macro.
5023         (nanosleep_not_cancel): New macro.
5024         (sigsuspend_not_cancel): New macro.
5025         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
5026         nanosleep_not_cancel macro from <not-cancel.h>.
5027         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
5028         macro from <not-cancel.h>.
5030 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
5031             Jakub Jelinek  <jakub@redhat.com>
5033         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
5034         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
5035         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
5036         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
5037         * pthread_mutex_init.c: Add support for priority inheritance mutex.
5038         * pthread_mutex_lock.c: Likewise.
5039         * pthread_mutex_timedlock.c: Likewise.
5040         * pthread_mutex_trylock.c: Likewise.
5041         * pthread_mutex_unlock.c: Likewise.
5042         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
5043         all mutexes.
5044         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
5045         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
5046         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
5047         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
5048         pthread-pi-defines.sym.
5049         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
5050         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
5051         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5052         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
5053         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5054         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5055         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
5056         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
5057         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
5058         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5059         _POSIX_THREAD_PRIO_INHERIT to 200112L.
5060         * tst-mutex1.c: Adjust to allow use in PI mutex test.
5061         * tst-mutex2.c: Likewise.
5062         * tst-mutex3.c: Likewise.
5063         * tst-mutex4.c: Likewise.
5064         * tst-mutex5.c: Likewise.
5065         * tst-mutex6.c: Likewise.
5066         * tst-mutex7.c: Likewise.
5067         * tst-mutex7a.c: Likewise.
5068         * tst-mutex8.c: Likewise.
5069         * tst-mutex9.c: Likewise.
5070         * tst-robust1.c: Likewise.
5071         * tst-robust7.c: Likewise.
5072         * tst-robust8.c: Likewise.
5073         * tst-mutexpi1.c: New file.
5074         * tst-mutexpi2.c: New file.
5075         * tst-mutexpi3.c: New file.
5076         * tst-mutexpi4.c: New file.
5077         * tst-mutexpi5.c: New file.
5078         * tst-mutexpi6.c: New file.
5079         * tst-mutexpi7.c: New file.
5080         * tst-mutexpi7a.c: New file.
5081         * tst-mutexpi8.c: New file.
5082         * tst-mutexpi9.c: New file.
5083         * tst-robust1.c: New file.
5084         * tst-robust2.c: New file.
5085         * tst-robust3.c: New file.
5086         * tst-robust4.c: New file.
5087         * tst-robust5.c: New file.
5088         * tst-robust6.c: New file.
5089         * tst-robust7.c: New file.
5090         * tst-robust8.c: New file.
5091         * Makefile (tests): Add the new tests.
5093         * pthread_create.c (start_thread): Add some casts to avoid warnings.
5094         * pthread_mutex_destroy.c: Remove unneeded label.
5096 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
5098         * pthread_mutex_init.c (__pthread_mutex_init): Move some
5099         computations to compile time.
5101 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
5103         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
5105 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
5107         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
5109 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
5111         * pthread_key_create.c (__pthread_key_create): Do away with
5112         __pthread_keys_lock.
5114         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5115         (__kernel_cpumask_size): Mark as hidden.
5116         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
5118         * sem_open.c (__sem_mappings_lock): Mark as hidden.
5119         * semaphoreP.h (__sem_mappings_lock): Likewise.
5121 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
5123         * pthread_atfork.c: Mark __dso_handle as hidden.
5125 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
5127         [BZ #2644]
5128         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
5129         the reload problem.  Change the one path in pthread_cancel_init
5130         which causes the problem.  Force gcc to reload.  Simplify callers.
5131         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
5132         (_Unwind_GetBSP): Undo last patch.
5134 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
5136         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
5137         function pointer is reloaded after pthread_cancel_init calls.
5139         [BZ #2644]
5140         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
5141         pointers are reloaded after pthread_cancel_init calls.
5143 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
5145         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
5146         __always_inline.
5148 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
5150         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5151         Allocate new object which is passed to timer_sigev_thread so that
5152         the timer can be deleted before the new thread is scheduled.
5154 2006-04-26  Roland McGrath  <roland@redhat.com>
5156         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
5158 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
5160         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
5161         suffix for conditional jumps.
5162         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
5163         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
5164         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
5165         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
5166         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
5167         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
5169         * init.c (sigcancel_handler): Compare with correct PID even if the
5170         thread is in the middle of a fork call.
5171         (sighandler_setxid): Likewise.
5172         Reported by Suzuki K P <suzuki@in.ibm.com> .
5174 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
5176         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
5178 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
5180         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
5181         fails [Coverity CID 105].
5183 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
5185         * sysdeps/pthread/pthread.h: Add nonnull attributes.
5187 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
5189         [BZ #2505]
5190         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
5191         Define __lll_rel_instr using lwsync.
5193 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
5195         * allocatestack.c (allocate_stack): Always initialize robust_head.
5196         * descr.h: Define struct robust_list_head.
5197         (struct pthread): Use robust_list_head in robust mutex list definition.
5198         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
5199         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
5200         (__pthread_initialize_minimal_internal): Register robust_list with
5201         the kernel.
5202         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
5203         Declare __set_robust_list_avail.
5204         * pthread_create.c (start_thread): Register robust_list of new thread.
5205         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
5206         waiters.
5207         * pthread_mutex_destroy.c: For robust mutexes don't look at the
5208         number of users, it's unreliable.
5209         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
5210         set_robust_list syscall is available.
5211         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
5212         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
5213         Set robust_head.list_op_pending before trying to lock a robust mutex.
5214         * pthread_mutex_timedlock.c: Likewise.
5215         * pthread_mutex_trylock.c: Likewise.
5216         * pthread_mutex_unlock.c: Likewise for unlocking.
5217         * Makefile (tests): Add tst-robust8.
5218         * tst-robust8.c: New file.
5220 2006-03-08  Andreas Schwab  <schwab@suse.de>
5222         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
5223         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
5225 2006-03-05  Roland McGrath  <roland@redhat.com>
5227         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
5228         and $config_os doesn't match *linux*.
5230 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
5232         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
5233         Use __syscall_error.
5234         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
5235         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
5236         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
5237         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
5238         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
5239         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
5241 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
5243         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
5245 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
5247         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
5248         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
5249         mutex.
5250         (__lll_robust_timedlock_wait): Likewise.
5251         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
5252         (__lll_robust_lock_wait): Likewise.
5253         (__lll_robust_timedlock_wait): Likewise.
5254         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
5255         (__lll_robust_lock_wait): Likewise.
5256         (__lll_robust_timedlock_wait): Likewise.
5258 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
5260         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
5261         lll_robust_mutex_trylock, lll_robust_mutex_lock,
5262         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
5263         lll_robust_mutex_unlock): Define.
5264         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
5266 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
5268         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
5269         instead of <clone.S>.
5271 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
5273         * Makefile (libpthread-routines): Add
5274         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
5275         and pthread_mutex_[sg]etprioceiling.
5276         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
5277         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
5278         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
5279         pthread_mutex_setprioceiling.
5280         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
5281         PTHREAD_PRIO_PROTECT): New enum values.
5282         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
5283         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
5284         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
5285         prototypes.
5286         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
5287         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
5288         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
5289         Define.
5290         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
5291         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
5292         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
5293         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
5294         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
5295         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
5296         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
5297         protocol mutexes.
5298         * pthread_mutex_getprioceiling.c: New file.
5299         * pthread_mutex_setprioceiling.c: New file.
5300         * pthread_mutexattr_getprioceiling.c: New file.
5301         * pthread_mutexattr_setprioceiling.c: New file.
5302         * pthread_mutexattr_getprotocol.c: New file.
5303         * pthread_mutexattr_setprotocol.c: New file.
5305 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
5307         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
5309 2006-02-27  Roland McGrath  <roland@redhat.com>
5311         * sysdeps/pthread/Subdirs: List nptl here too.
5312         * configure (libc_add_on_canonical): New variable.
5314         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
5316         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
5317         self to get main source tree's file.
5318         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
5319         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
5320         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
5321         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
5322         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
5323         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
5324         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
5325         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
5326         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
5327         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
5328         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
5329         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
5330         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
5332         * Makefile: Use $(sysdirs) in vpath directive.
5334         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
5335         (CPPFLAGS-timer_routines.c): Likewise.
5337         * Makeconfig (includes): Variable removed.
5339 2006-02-26  Roland McGrath  <roland@redhat.com>
5341         * sysdeps/generic/pt-raise.c: Moved to ...
5342         * pt-raise.c: ... here.
5343         * sysdeps/generic/lowlevellock.h: Moved to ...
5344         * lowlevellock.h: ... here.
5346 2006-02-23  Roland McGrath  <roland@redhat.com>
5348         * descr.h (struct pthread): Add final member `end_padding'.
5349         (PTHREAD_STRUCT_END_PADDING): Use it.
5351 2006-02-20  Roland McGrath  <roland@redhat.com>
5353         * sysdeps/mips: Directory removed, saved in ports repository.
5354         * sysdeps/unix/sysv/linux/mips: Likewise.
5356 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
5358         * tst-robust1.c: Add second mutex to check that the mutex list is
5359         handled correctly.
5361 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
5363         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
5364         lll_robust_mutex_trylock, lll_robust_mutex_lock,
5365         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
5366         lll_robust_mutex_unlock): New macros.
5367         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
5368         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
5369         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5370         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5371         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
5373 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5375         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
5376         definitions.
5377         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
5379 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
5381         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
5382         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
5383         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
5384         (lll_robust_mutex_unlock): Likewise.
5386 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
5388         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
5389         Set robust_list.__next rather than robust_list.
5390         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
5391         (__pthread_list_t): New typedef.
5392         (pthread_mutex_t): Replace __next and __prev fields with __list.
5393         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
5394         (__pthread_list_t): New typedef.
5395         (pthread_mutex_t): Replace __next and __prev fields with __list.
5396         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
5397         (__pthread_list_t, __pthread_slist_t): New typedefs.
5398         (pthread_mutex_t): Replace __next and __prev fields with __list.
5399         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
5400         (__pthread_list_t, __pthread_slist_t): New typedefs.
5401         (pthread_mutex_t): Replace __next and __prev fields with __list.
5402         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
5403         (__pthread_list_t, __pthread_slist_t): New typedefs.
5404         (pthread_mutex_t): Replace __next and __prev fields with __list.
5405         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
5406         (__pthread_slist_t): New typedef.
5407         (pthread_mutex_t): Replace __next field with __list.
5409 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
5411         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
5412         PTHREAD_MUTEX_OWNERDEAD.
5413         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
5414         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
5415         * Makefile (libpthread-routines): Add lowlevelrobustlock.
5416         * pthread_create.c (start_thread): Very much simplify robust_list loop.
5417         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
5418         to PTHREAD_MUTEX_INCONSISTENT.
5419         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
5420         * pthread_mutex_lock.c: Reimplement robust mutex handling.
5421         * pthread_mutex_trylock.c: Likewise.
5422         * pthread_mutex_timedlock.c: Likewise.
5423         * pthread_mutex_unlock.c: Likewise.
5424         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
5425         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
5426         lowlevelrobustlock.sym.
5427         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
5428         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
5429         definitions.
5430         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5431         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
5432         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
5433         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
5434         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
5436 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
5438         * allocatestack.c (allocate_stack): Initialize robust_list.
5439         * init.c (__pthread_initialize_minimal_internal): Likewise.
5440         * descr.h (struct xid_command): Pretty printing.
5441         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
5442         robust_list.  Adjust macros.
5443         * pthread_create.c (start_thread): Adjust robust_list handling.
5444         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
5445         but the owner for all robust mutex types.
5446         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
5447         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
5448         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5449         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
5451         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
5452         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
5454 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
5456         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
5457         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
5459 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5461         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
5462         Return status.
5463         (lll_futex_timed_wait): Define.
5465 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
5467         * tst-cancel4.c: Test ppoll.
5469 2006-01-18  Andreas Jaeger  <aj@suse.de>
5471         [BZ #2167]
5472         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
5473         (pthread_mutex_t): Follow changes for other archs.  Based on patch
5474         by Jim Gifford <patches@jg555.com>.
5476 2006-01-13  Richard Henderson  <rth@redhat.com>
5478         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
5480 2006-01-10  Roland McGrath  <roland@redhat.com>
5482         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
5483         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
5484         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
5485         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
5486         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
5487         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
5488         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
5489         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
5490         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
5491         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
5493 2006-01-09  Roland McGrath  <roland@redhat.com>
5495         * tst-initializers1-c89.c: New file.
5496         * tst-initializers1-c99.c: New file.
5497         * tst-initializers1-gnu89.c: New file.
5498         * tst-initializers1-gnu99.c: New file.
5499         * Makefile (tests): Add them.
5500         (CFLAGS-tst-initializers1-c89.c): New variable.
5501         (CFLAGS-tst-initializers1-c99.c): New variable.
5502         (CFLAGS-tst-initializers1-gnu89.c): New variable.
5503         (CFLAGS-tst-initializers1-gnu99.c): New variable.
5505         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
5506         Use __extension__ on anonymous union definition.
5507         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5508         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5509         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5510         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5511         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5513 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
5515         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
5516         Don't give the union a name because it changes the mangled name.
5517         Instead name the struct for __data.
5518         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
5519         Likewise.
5520         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
5521         Likewise.
5523 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
5525         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
5526         stack bias to mc_ftp field.
5528 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
5530         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
5531         being too clever and reloading the futex value where it shouldn't.
5533 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
5535         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
5536         correct type.
5538 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
5540         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
5541         Add cfi directives.
5543 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
5545         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
5546         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
5547         rename in tcbhead_t.
5549         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
5550         Don't give the union a name because it changes the mangled name.
5551         Instead name the struct for __data.
5552         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5553         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5554         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5555         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5556         * pthread_create.c (start_thread): Adjust robust mutex free loop.
5557         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
5559 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
5561         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5562         Return status.
5563         (lll_futex_timed_wait): Define.
5564         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5565         * sysdeps/pthread/aio_misc.h: New file.
5567 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
5569         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
5571 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
5573         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
5574         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
5575         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
5577 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
5579         * tst-cancel24.cc: Use C headers instead of C++ headers.
5581 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
5583         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
5584         sparc-linux configured glibc.
5585         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
5586         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
5587         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
5588         atomic_compare_and_exchange_val_24_acq instead of
5589         atomic_compare_and_exchange_val_acq.
5590         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
5591         instead of atomic_exchange_rel.
5592         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
5593         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
5594         file.
5595         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
5596         file.
5597         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
5598         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
5599         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
5600         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
5601         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
5602         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
5603         New file.
5604         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
5605         New file.
5606         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
5607         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
5608         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
5609         file.
5610         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
5611         file.
5612         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
5614 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
5616         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
5617         mutex initializers.
5619 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
5621         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
5622         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5623         THREAD_COPY_POINTER_GUARD): Define.
5624         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
5625         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
5627 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
5629         * version.c: Update copyright year.
5631 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5633         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
5634         .eh_frame section, use cfi_* directives.
5635         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
5637 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
5639         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
5640         now.
5642 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
5644         * sysdeps/pthread/sigaction.c: Removed.
5645         * sigaction.c: New file.
5646         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
5648 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
5650         * Makefile (tests): Add tst-signal7.
5651         * tst-signal7.c: New file.
5653 2005-12-27  Roland McGrath  <roland@redhat.com>
5655         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
5656         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
5657         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
5658         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
5659         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
5660         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
5661         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
5662         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
5663         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
5664         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
5665         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
5667 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
5669         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
5670         and __prev field to pthread_mutex_t.
5671         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5672         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5673         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5674         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5675         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
5676         to pthread_mutex_t.
5678 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
5680         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
5681         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
5682         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
5683         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
5684         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
5685         and PTHREAD_MUTEXATTR_FLAG_BITS.
5686         * descr.h (struct pthread): Add robust_list field and define
5687         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
5688         * pthread_mutexattr_getrobust.c: New file.
5689         * pthread_mutexattr_setrobust.c: New file.
5690         * pthread_mutex_consistent.c: New file.
5691         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
5692         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
5693         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
5694         Adjust pthread_mutex_t initializers.
5695         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
5696         field to pthread_mutex_t.
5697         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
5698         and __prev field to pthread_mutex_t.
5699         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
5700         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
5701         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
5702         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
5703         * pthread_mutexattr_gettype.c: Likewise.
5704         * pthread_mutexattr_setpshared.c: Likewise.
5705         * pthread_mutexattr_settype.c: Likewise.
5706         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
5707         Initialize mutex kind according to robust flag.
5708         * pthread_mutex_lock.c: Implement local robust mutex.
5709         * pthread_mutex_timedlock.c: Likewise.
5710         * pthread_mutex_trylock.c: Likewise.
5711         * pthread_mutex_unlock.c: Likewise.
5712         * pthread_create.c (start_thread): Mark robust mutexes which remained
5713         locked as dead.
5714         * tst-robust1.c: New file.
5715         * tst-robust2.c: New file.
5716         * tst-robust3.c: New file.
5717         * tst-robust4.c: New file.
5718         * tst-robust5.c: New file.
5719         * tst-robust6.c: New file.
5720         * tst-robust7.c: New file.
5721         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
5722         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
5723         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
5724         tst-robust5, tst-robust6, and tst-robust7.
5726         * tst-typesizes.c: New file.
5727         * Makefile (tests): Add tst-typesizes.
5729         * tst-once3.c: More debug output.
5731 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
5733         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
5734         missing after last change.
5736         * version.c: Update copyright year.
5738 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
5740         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
5741         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
5742         * pthread_mutex_trylock.c: Likewise.
5743         * pthread_mutex_timedlock.c: Likewise.
5744         * pthread_mutex_unlock.c: Likewise.
5746 2005-12-22  Roland McGrath  <roland@redhat.com>
5748         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
5749         so that #include_next's search location is not reset to the -I..
5750         directory where <nptl/...> can be found.
5752 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
5754         [BZ #1913]
5755         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
5756         Fix unwind info.  Remove useless branch prediction prefix.
5757         * tst-cancel24.cc: New file.
5758         * Makefile: Add rules to build and run tst-cancel24.
5760 2005-12-21  Roland McGrath  <roland@redhat.com>
5762         * libc-cancellation.c: Use <> rather than "" #includes.
5763         * pt-cleanup.c: Likewise.
5764         * pthread_create.c: Likewise.
5765         * pthread_join.c: Likewise.
5766         * pthread_timedjoin.c: Likewise.
5767         * pthread_tryjoin.c: Likewise.
5768         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
5769         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
5770         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
5771         * unwind.c: Likewise.
5773 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5775         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
5776         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
5777         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5778         THREAD_COPY_POINTER_GUARD): Define.
5780 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
5782         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
5783         rather than one.
5784         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5785         THREAD_COPY_POINTER_GUARD): Define.
5786         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
5787         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
5788         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
5789         THREAD_COPY_POINTER_GUARD): Define.
5790         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
5791         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
5792         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
5793         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
5794         Use PTR_DEMANGLE for B0 if defined.
5796 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
5798         * pthread_create.c (__pthread_create_2_1): Use
5799         THREAD_COPY_POINTER_GUARD if available.
5800         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
5801         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
5802         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
5803         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
5804         * sysdeps/x86_64/tls.h: Likewise.
5806 2005-12-15  Roland McGrath  <roland@redhat.com>
5808         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
5810 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
5812         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
5813         sysdeps/generic.
5814         * errno-loc.c: New file.
5816 2005-12-12  Roland McGrath  <roland@redhat.com>
5818         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
5819         adjustments before choosing stack size.  Update minimum stack size
5820         calculation to match allocate_stack change.
5822 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
5824         * allocatestack.c (allocate_stack): Don't demand that there is an
5825         additional full page available on the stack beside guard, TLS, the
5826         minimum stack.
5828 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
5830         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5831         (__cleanup_fct_attribute): Use __regparm__ not regparm.
5833         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
5834         compiling 32-bit code we must define __cleanup_fct_attribute.
5836 005-11-24  Jakub Jelinek  <jakub@redhat.com>
5838         [BZ #1920]
5839         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
5840         __attribute__ instead of __attribute.
5841         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
5842         (__cleanup_fct_attribute): Likewise.
5844 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
5846         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
5847         a write barrier before writing libgcc_s_getcfa.
5849 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
5851         * sysdeps/unix/sysv/linux/configure: Removed.
5853 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
5855         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
5856         optional init_array/fini_array support.
5858 2005-10-24  Roland McGrath  <roland@redhat.com>
5860         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
5861         versioned_symbol use.
5863 2005-10-16  Roland McGrath  <roland@redhat.com>
5865         * init.c (__pthread_initialize_minimal_internal): Even when using a
5866         compile-time default stack size, apply the minimum that allocate_stack
5867         will require, and round up to page size.
5869 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
5871         * Makefile ($(test-modules)): Remove static pattern rule.
5873 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
5874             Ulrich Drepper  <drepper@redhat.com>
5876         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
5877         alignment in callback function.
5878         * Makefile: Add rules to build and run tst-align3.
5879         * tst-align3.c: New file.
5881 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
5883         * allocatestack.c (setxid_signal_thread): Add
5884         INTERNAL_SYSCALL_DECL (err).
5886 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
5888         * allocatestack.c (setxid_signal_thread): Need to use
5889         atomic_compare_and_exchange_bool_acq.
5891 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
5892             Jakub Jelinek  <jakub@redhat.com>
5894         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
5895         CANCEL_RESTMASK.
5896         (struct pthread): Move specific_used field to avoid padding.
5897         Add setxid_futex field.
5898         * init.c (sighandler_setxid): Reset setxid flag and release the
5899         setxid futex.
5900         * allocatestack.c (setxid_signal_thread): New function.  Broken
5901         out of the bodies of the two loops in __nptl_setxid.  For undetached
5902         threads check whether they are exiting and if yes, don't send a signal.
5903         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
5904         * pthread_create.c (start_thread): For undetached threads, check
5905         whether setxid bit is set.  If yes, wait until signal has been
5906         processed.
5908         * allocatestack.c (STACK_VARIABLES): Initialize them.
5909         * pthread_create.c (__pthread_create_2_1): Initialize pd.
5911 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
5913         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
5914         waiters, awake all waiters on the associated mutex.
5916 2005-09-22  Roland McGrath  <roland@redhat.com>
5918         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
5919         ../sysdeps/x86_64/hp-timing.h).
5921 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
5923         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
5924         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5925         (lll_futex_wake_unlock): Define.
5926         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
5927         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5928         (lll_futex_wake_unlock): Define.
5929         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
5930         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5931         (lll_futex_wake_unlock): Define.
5932         * sysdeps/unix/sysv/linux/s390/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/sparc/lowlevellock.h (FUTEX_WAKE_OP,
5936         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5937         (lll_futex_wake_unlock): Define.
5938         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
5939         lll_futex_wake_unlock.
5940         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
5941         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5942         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5943         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
5944         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
5945         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
5947 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5949         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5950         Fix typo in register name.
5952 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
5954         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
5955         Use __sigfillset.  Document that sigfillset does the right thing wrt
5956         to SIGSETXID.
5958 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
5960         [BZ #1102]
5961         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
5962         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
5963         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
5964         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
5965         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
5966         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
5967         in the structure.
5968         * Makefile (tests): Add tst-initializers1.
5969         (CFLAGS-tst-initializers1.c): Set.
5970         * tst-initializers1.c: New test.
5972 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
5974         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
5975         Make sure __flags are located at offset 48 from the start of the
5976         structure.
5978 2005-07-02  Roland McGrath  <roland@redhat.com>
5980         * Makeconfig: Comment fix.
5982 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
5984         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
5985         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
5986         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
5987         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
5988         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5989         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5990         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
5991         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
5992         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
5993         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
5995 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
5997         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
5998         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
5999         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
6000         fields.
6001         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
6002         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
6003         field.  Put in sysinfo field unconditionally.
6004         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
6005         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
6006         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
6007         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
6008         fields.
6009         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
6010         * pthread_create.c (__pthread_create_2_1): Use
6011         THREAD_COPY_STACK_GUARD macro.
6012         * Makefile: Add rules to build and run tst-stackguard1{,-static}
6013         tests.
6014         * tst-stackguard1.c: New file.
6015         * tst-stackguard1-static.c: New file.
6017 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
6019         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
6020         Invoke CGOTSETUP and CGOTRESTORE.
6021         (CGOTSETUP, CGOTRESTORE): Define.
6023 2005-05-29  Richard Henderson  <rth@redhat.com>
6025         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
6026         (tf_write, tf_writev): Use it.
6027         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
6028         the system minimum.
6030 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
6032         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
6033         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
6034         __librt_*_asynccancel@local.
6036 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
6038         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
6039         all occurrences of JUMPTARGET.  Instead append @local to labels.
6041 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
6043         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
6044         size/alignment of struct pthread rather than tcbhead_t.
6045         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
6046         Likewise.
6047         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
6048         Likewise.
6049         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
6050         Likewise.
6052 2005-05-19  Richard Henderson  <rth@redhat.com>
6054         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
6055         __sync_val_compare_and_swap, not explicit _si variant.
6056         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
6058 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
6060         [BZ #915]
6061         * sysdeps/pthread/pthread.h: Avoid empty initializers.
6063 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
6065         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
6066         .eh_frame section, use cfi_* directives.
6068 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
6070         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
6071         of "" includes.
6073 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
6075         [BZ #1075]
6076         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
6077         aio_write blocks.
6079 2005-04-27  Roland McGrath  <roland@redhat.com>
6081         * Makefile (tests): Remove tst-clock2.
6083         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
6084         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
6085         translating to the kernel clockid_t for our own process/thread clock.
6087         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
6089 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
6091         * old_pthread_cond_init.c: Include <errno.h>.
6092         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
6093         process shared or uses clock other than CLOCK_REALTIME.
6094         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
6096 2005-04-13  David S. Miller  <davem@davemloft.net>
6098         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
6099         * sysdeps/sparc/sparc64/clone.S: New file.
6101 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
6103         [BZ #1102]
6104         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
6105         __inline instead of inline.
6106         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
6108 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
6110         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
6111         functionally equivalent, but shorter instructions.
6112         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6113         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6114         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6115         Likewise.
6116         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
6117         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6118         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6119         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6120         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6121         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
6122         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6123         Likewise.
6124         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6125         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
6126         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6127         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
6128         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6130 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
6132         * sysdeps/mips/Makefile: New file.
6133         * sysdeps/mips/nptl-sysdep.S: New file.
6134         * sysdeps/mips/tcb-offsets.sym: New file.
6135         * sysdeps/mips/pthread_spin_lock.S: New file.
6136         * sysdeps/mips/pthread_spin_trylock.S: New file.
6137         * sysdeps/mips/pthreaddef.h: New file.
6138         * sysdeps/mips/tls.h: New file.
6139         * sysdeps/mips/jmpbuf-unwind.h: New file.
6140         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
6141         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
6142         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
6143         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
6144         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
6145         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
6146         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
6147         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
6148         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
6149         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
6151 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
6153         [BZ #1112]
6154         * pthread_create.c (__pthread_create_2_1): Rename syscall error
6155         variable to scerr.
6157 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
6159         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
6161 2005-02-25  Roland McGrath  <roland@redhat.com>
6163         * alloca_cutoff.c: Correct license text.
6164         * tst-unload.c: Likewise.
6165         * sysdeps/pthread/allocalim.h: Likewise.
6166         * sysdeps/pthread/pt-initfini.c: Likewise.
6167         * sysdeps/pthread/bits/libc-lock.h: Likewise.
6168         * sysdeps/pthread/bits/sigthread.h: Likewise.
6169         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
6170         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
6172 2005-02-16  Roland McGrath  <roland@redhat.com>
6174         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
6175         Use unsigned int * for ptr_nthreads.
6177 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
6179         [BZ #721]
6180         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
6181         gcc4.
6183 2005-02-07  Richard Henderson  <rth@redhat.com>
6185         [BZ #787]
6186         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
6187         argument.
6189 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
6191         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
6192         order of arguments in invocation of atomic_add_zero.
6194 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
6196         [BZ #737]
6197         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
6198         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
6199         at least gotntpoff relocation and addition.
6200         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
6201         Likewise.
6202         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
6203         Likewise.
6204         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
6205         Likewise.
6207 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
6209         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
6210         entry for static tls deallocation fix.
6211         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
6212         also contains information whether the memory pointed to is static
6213         TLS or not.
6214         * sysdeps/i386/tls.h: Likewise.
6215         * sysdeps/ia64/tls.h: Likewise.
6216         * sysdeps/powerpc/tls.h: Likewise.
6217         * sysdeps/s390/tls.h: Likewise.
6218         * sysdeps/sh/tls.h: Likewise.
6219         * sysdeps/sparc/tls.h: Likewise.
6220         * sysdeps/x86_64/tls.h: Likewise.
6222 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
6224         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
6226 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
6228         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
6229         %esp.
6230         * Makefile (tests): Add tst-align2.
6231         * tst-align2.c: New test.
6232         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
6233         -mpreferred-stack-boundary=4.
6235 2004-12-18  Roland McGrath  <roland@redhat.com>
6237         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
6238         New file removed withdrawn for the moment.
6240 2004-12-17  Richard Henderson  <rth@redhat.com>
6242         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
6243         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
6245 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
6247         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
6248         Increased PTHREAD_STACK_MIN.
6250         * tst-context1.c (stacks): Use bigger stack size.
6252 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
6254         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
6255         * sysdeps/sparc/tcb-offsets.sym: Add TID.
6257 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
6259         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
6260         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
6261         * sysdeps/s390/tcb-offsets.sym (TID): Add.
6263 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
6265         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
6267 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
6269         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
6270         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
6272         * tst-getpid1.c: If child crashes, report this first.  Print which
6273         signal.
6275 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
6277         * init.c (__pthread_initialize_minimal_internal): Also unblock
6278         SIGSETXID.
6280 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
6282         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
6283         _POSIX_THREAD_CPUTIME): Define to 0.
6284         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
6285         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
6286         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
6287         __timer_signal_thread_tclk): Remove.
6288         (init_module): Remove their initialization.
6289         (thread_cleanup): Remove their cleanup assertions.
6290         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
6291         __timer_signal_thread_tclk): Remove.
6292         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
6293         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
6294         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
6296 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
6298         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
6299         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
6301         * Makefile (tests): Add tst-getpid2.
6302         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
6303         (do_test): Use it.  Use __clone2 instead of clone on ia64.
6304         * tst-getpid2.c: New test.
6306 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6308         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
6310 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
6312         * Makefile (tests): Add tst-getpid1.
6313         * tst-getpid1.c: New file.
6314         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
6315         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
6317 2004-12-02  Roland McGrath  <roland@redhat.com>
6319         * Makefile (libpthread-nonshared): Variable removed.
6320         ($(objpfx)libpthread_nonshared.a): Target removed.
6321         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
6322         These are now handled by generic magic from
6323         libpthread-static-only-routines being set.
6325 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
6327         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
6328         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
6329         _POSIX_THREAD_PRIO_PROTECT): Define.
6330         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6331         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
6332         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
6334 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
6336         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
6337         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
6338         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
6339         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
6340         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6341         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
6342         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
6344 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
6346         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
6348         * Makefile (libpthread-routines): Add pthread_setschedprio.
6349         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
6350         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
6351         * pthread_setschedprio.c: New file.
6353 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
6355         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
6356         * pthread_cancel.c (pthread_create): Likewise.
6358         * Makefile (libpthread-routines): Add vars.
6359         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
6360         * init.c (__default_stacksize, __is_smp): Remove.
6361         * vars.c: New file.
6362         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
6363         and define a wrapper macro.
6364         (PTHREAD_STATIC_FN_REQUIRE): Define.
6365         * allocatestack.c (__find_thread_by_id): Undefine.
6366         * pthread_create (__pthread_keys): Remove.
6367         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
6368         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
6369         PTHREAD_STATIC_FN_REQUIRE.
6371 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6373         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
6374         parameter to REGISTER macro.
6376 2004-11-17  Roland McGrath  <roland@redhat.com>
6378         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
6379         Make sure SIGCANCEL is blocked as well.
6381 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
6383         * sysdeps/pthread/setxid.h: New file.
6384         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
6385         (struct xid_command): Add forward decl.
6386         (struct pthread_functions): Change return type of __nptl_setxid hook
6387         to int.
6388         * pthreadP.h (__nptl_setxid): Change return type to int.
6389         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
6390         calling thread, return its return value and set errno on failure.
6391         * descr.h (struct xid_command): Change id type to long array.
6393         * Makefile: Add rules to build and test tst-setuid1 and
6394         tst-setuid1-static.
6395         * tst-setuid1.c: New test.
6396         * tst-setuid1-static.c: New test.
6398 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
6400         * Makefile (tests): Add tst-exit3.
6401         * tst-exit3.c: New test.
6403 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
6405         * Makefile (tests): Add tst-exit2.
6406         * tst-exit2.c: New file.
6408 2004-11-09  Roland McGrath  <roland@redhat.com>
6410         [BZ #530]
6411         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
6412         here, before calling clone.
6413         * pthread_create.c (start_thread): Don't do it here.
6415 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
6417         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
6419 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
6421         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
6422         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
6423         assembler warning.
6425 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
6427         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
6428         if sched_priority is not between minprio and maxprio.
6430 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6432         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6433         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
6435         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
6436         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
6438 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
6440         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
6441         not-cancelable I/O functions.
6443 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6445         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
6446         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
6447         make sure 2 is stored in the futex and we looked at the old value.
6448         Fix a few other problems to return the correct value.
6450 2004-10-14  Richard Henderson  <rth@redhat.com>
6452         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
6453         make gcc4 happy.
6455 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
6457         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
6458         of pthread-functions.h and pthreaddef.h.
6459         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
6461         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6462         Change __data.__nwaiters from int to unsigned int.
6464         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
6465         sysconf (_SC_THREAD_CPUTIME) returns negative value.
6467         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
6468         before return type.
6470         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
6471         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
6473 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
6475         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
6476         test fails, remove message queue.
6477         (tf_msgsnd): Likewise.
6479 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
6481         * tst-clock1.c: Change #ifdef to #if defined.
6482         * tst-clock2.c: Likewise.
6483         * tst-cond11.c: Likewise.
6485         * sysdeps/pthread/timer_create.c (timer_create): Use
6486         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
6487         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
6488         THREAD_CPUTIME.
6490 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
6492         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
6493         _POSIX_THREAD_CPUTIME): Define to 0.
6495 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
6497         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
6498         and _POSIX_THREAD_CPUTIME to zero.
6499         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
6500         * tst-barrier2.c: Fix testing for POSIX feature.
6501         * tst-clock1.c: Likewise.
6502         * tst-clock2.c: Likewise.
6503         * tst-cond11.c: Likewise.
6504         * tst-cond4.c: Likewise.
6505         * tst-cond6.c: Likewise.
6506         * tst-flock2.c: Likewise.
6507         * tst-mutex4.c: Likewise.
6508         * tst-mutex9.c: Likewise.
6509         * tst-rwlock12.c: Likewise.
6510         * tst-rwlock4.c: Likewise.
6511         * tst-signal1.c: Likewise.
6512         * tst-spin2.c: Likewise.
6513         * sysdeps/pthread/posix-timer.h: Likewise.
6514         * sysdeps/pthread/timer_create.c: Likewise.
6515         * sysdeps/pthread/timer_routines.c: Likewise.
6517 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
6519         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6520         (__lll_mutex_timedlock_wait): Address futex correctly.
6522         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6523         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
6524         make sure 2 is stored in the futex and we looked at the old value.
6525         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
6526         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
6527         which might very well made the code not working at all before.
6528         [BZ #417]
6530 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
6532         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
6533         allow SIGSETXID to be sent.
6534         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
6535         for SIGSETXID to be defined.
6536         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
6537         SIGSETXID cannot be blocked.
6539         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6540         Add __extension__ to long long types.
6541         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6542         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6543         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6544         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6545         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
6546         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6547         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6549 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
6551         * descr.h (struct pthread): Add stopped_start field.
6552         * sysdeps/pthread/createthread.c (create_thread): Set
6553         start_stopped flag in descriptor for new thread appropriately.
6554         * pthread_create.c (start_thread): Only take lock to be stopped on
6555         startup if stopped_start flag says so.
6557 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
6559         * pthread_create.c (__pthread_create_2_1): Remember whether thread
6560         is created detached and if yes, do not try to free the stack in case
6561         the thread creation failed.
6562         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
6563         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
6564         case there has been no error.  [BZ #405]
6566         * pthread_create.c (start_thread): Don't wait for scheduler data
6567         etc to be set at the beginning of the function.  The cancellation
6568         infrastructure must have been set up.  And enable async
6569         cancellation before potentially going to sleep.  [BZ #401]
6571 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
6573         * Versions: Remove exports for pthread_set*id_np functions.
6574         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
6575         for now.
6576         * Makefile: Don't build pthread_set*id code for now.
6578 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
6580         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
6581         internal use.
6582         * allocatestack.c (__nptl_setxid): New function.
6583         * descr.h (struct xid_command): Define type.
6584         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
6585         (sighandler_setxid): New function.
6586         (__pthread_initialize_minimal): Register sighandler_setxid for
6587         SIGCANCEL.
6588         * pt-allocrtsig.c: Update comment.
6589         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
6590         Declare __nptl_setxid.
6591         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
6592         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
6593         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
6594         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
6595         and pthread_setresuid_np.
6596         * pthread_setgid_np.c: New file.
6597         * pthread_setuid_np.c: New file.
6598         * pthread_setegid_np.c: New file.
6599         * pthread_seteuid_np.c: New file.
6600         * pthread_setregid_np.c: New file.
6601         * pthread_setreuid_np.c: New file.
6602         * pthread_setresgid_np.c: New file.
6603         * pthread_setresuid_np.c: New file.
6604         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
6605         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
6606         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
6607         and pthread_setresuid_np.
6608         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
6609         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
6610         pthread_setregid, and pthread_setresgid.
6612 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
6614         * allocatestack.c (allocate_stack): Return EAGAIN instead of
6615         ENOMEM when out of memory.
6617 2004-09-10  Roland McGrath  <roland@redhat.com>
6619         [BZ #379]
6620         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
6621         code, since we don't try to use the broken CLONE_STOPPED any more.
6622         * pthread_create.c (start_thread): Likewise.
6624 2004-09-15  Richard Henderson  <rth@redhat.com>
6626         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
6628 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
6630         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
6631         (__libc_unwind_longjmp): Delete macro and declare as function.
6632         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
6633         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
6634         nptl directory.
6635         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
6636         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
6637         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
6639 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
6641         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
6642         for __USE_XOPEN2K.
6643         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
6644         types also for __USE_XOPEN2K.
6645         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6646         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6647         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6648         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6649         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6650         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6651         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6652         [BZ #320]
6654 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
6656         * sysdeps/pthread/pthread.h
6657         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
6658         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
6659         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
6660         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
6661         [BZ #375]
6663 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
6665         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
6666         PSEUDO to be used with . prefix.
6668         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
6669         Use atomic_increment instead of atomic_exchange_and_add.
6670         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
6671         Likewise.
6672         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
6673         Likewise.
6674         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
6675         Likewise.
6677         * allocatestack.c (allocate_stack): Use atomic_increment_val
6678         instead of atomic_exchange_and_add.
6679         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
6680         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
6681         Likewise.
6682         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
6683         Likewise.
6685         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
6686         the initialization function might throw.
6688 2005-09-05  Richard Henderson  <rth@redhat.com>
6690         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
6691         Move definition inside libpthread, libc, librt check.  Provide
6692         definition for rtld.
6694 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
6696         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
6697         * sysdeps/i386/jmpbuf-unwind.h: Likewise
6698         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
6699         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
6700         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
6701         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
6702         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
6703         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
6704         * unwind.c: Use it.
6706         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6707         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
6708         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
6709         Likewise.
6710         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
6711         Decrement __nwaiters.  If pthread_cond_destroy has been called and
6712         this is the last waiter, signal pthread_cond_destroy caller and
6713         avoid using the pthread_cond_t structure after unlock.
6714         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6715         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6716         Read clock type from the least significant bits of __nwaiters instead
6717         of __clock.
6718         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6719         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
6721 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
6723         [BZ #342]
6724         * Makefile (tests): Add tst-cond20 and tst-cond21.
6725         * tst-cond20.c: New test.
6726         * tst-cond21.c: New test.
6727         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
6728         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
6729         it unsigned int.
6730         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6731         Likewise.
6732         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6733         (pthread_cond_t): Likewise.
6734         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
6735         Likewise.
6736         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6737         Likewise.
6738         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
6739         Likewise.
6740         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
6741         (cond_nwaiters): New.
6742         (clock_bits): New.
6743         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
6744         if there are waiters not signalled yet.
6745         Wait until all already signalled waiters wake up.
6746         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
6747         __nwaiters.  If pthread_cond_destroy has been called and this is the
6748         last waiter, signal pthread_cond_destroy caller and avoid using
6749         the pthread_cond_t structure after unlock.
6750         (__pthread_cond_wait): Increment __nwaiters in the beginning,
6751         decrement it when leaving.  If pthread_cond_destroy has been called
6752         and this is the last waiter, signal pthread_cond_destroy caller.
6753         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6754         Likewise.  Read clock type from the least significant bits of
6755         __nwaiters instead of __clock.
6756         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
6757         whether clock ID can be encoded in COND_CLOCK_BITS bits.
6758         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
6759         clock type just from the last COND_CLOCK_BITS bits of value.
6760         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
6761         instead of __clock, just from second bit of condattr's value.
6763 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
6765         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
6766         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
6767         != 64.
6768         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
6770 2004-08-15  Roland McGrath  <roland@frob.com>
6772         * pthread_atfork.c: Update copyright terms including special exception
6773         for these trivial files, which are statically linked into executables
6774         that use dynamic linking for the significant library code.
6776 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
6778         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
6779         pthread_rwlock_rdlock.
6780         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
6781         Decrease __nr_readers_queued after reacquiring lock.
6782         * sysdeps/pthread/pthread_rwlock_timedrdlock
6783         (pthread_rwlock_timedrdlock): Likewise.
6784         Reported by Bob Cook <bobcook47@hotmail.com>.
6786 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
6788         * tst-rwlock14.c (tf): Read main thread handle from *ARG
6789         before pthread_barrier_wait.
6791 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
6793         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
6794         Remove unnecessary exception handling data.
6796 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
6798         [BZ #284]
6799         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
6800         instead of clockid_t.
6802 2004-07-21  Roland McGrath  <roland@redhat.com>
6804         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
6806 2004-07-19  Roland McGrath  <roland@redhat.com>
6808         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
6810 2004-07-02  Roland McGrath  <roland@redhat.com>
6812         * configure: Don't exit.
6814 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6816         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6817         (__pthread_cond_timedwait): Check for invalid nanosecond in
6818         timeout value.
6820 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
6822         * Makefile: Add rules to build and run tst-fini1.
6823         * tst-fini1.c: New file.
6824         * tst-fini1mod.c: New file.
6826 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
6828         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
6829         if no cancellation support is needed.
6830         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6831         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6832         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6833         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6834         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6835         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6836         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6837         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
6838         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
6840         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
6841         only if not already defined.
6843 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
6845         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
6846         constraint "m" instead of "0" for futex.
6848         * shlib-versions: Add powerpc64-.*-linux.*.
6850 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
6852         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
6853         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
6854         for valid tv_nsec.
6855         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
6856         1 billion and 64-bit tv_nsec which is valid when truncated to 32
6857         bits.
6859 2004-06-29  Roland McGrath  <roland@redhat.com>
6861         * Banner: NPTL no longer has its own version number.
6862         * Makefile (nptl-version): Variable removed.
6863         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
6864         using $(version), the glibc version number.
6866 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6868         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
6869         Fix branch offset for a PLT entry.
6870         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
6871         Likewise.
6872         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
6873         Likewise.
6874         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
6875         Likewise.
6876         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
6877         Likewise.
6879 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
6881         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
6882         unconditionally.
6884 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
6886         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
6887         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
6888         instead of tv_sec.
6889         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
6890         (pthread_rwlock_timedrdlock): Likewise.
6892 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
6894         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6895         Set __r7 to val, not mutex.
6897 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
6899         * Makefile: Add rules to build tst-rwlock14.
6900         * tst-rwlock14.c: New file.
6902 2004-06-24  Boris Hu  <boris.hu@intel.com>
6904         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
6905         check.
6906         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6908 2004-06-19  Andreas Jaeger  <aj@suse.de>
6910         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
6911         assembler in last patch.
6913 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
6915         * sysdeps/pthread/pthread_cond_timedwait.c
6916         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
6917         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6918         (__pthread_cond_timedwait): Check for invalid nanosecond in
6919         timeout value.
6920         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6921         * tst-cond19.c: New file.
6922         * Makefile: Add rules to build and run tst-cond19.
6924 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
6926         * tst-context1.c (GUARD_PATTERN): Defined.
6927         (tst_context_t): Define struct containing ucontext_t & guard words.
6928         (ctx): Declare as an array of tst_context_t.
6929         (fct): Verify uc_link & guard words are still valid.
6930         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
6932 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6934         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6935         Add __data.__futex field, reshuffle __data.__clock.
6936         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
6937         (__pthread_cond_signal): Increment __futex at the same time as
6938         __wakeup_seq or __total_seq.  Pass address of __futex instead of
6939         address of low 32-bits of __wakeup_seq to futex syscall.
6940         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
6941         (__pthread_cond_wait): Likewise.  Pass __futex value from before
6942         releasing internal lock to FUTEX_WAIT.
6943         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
6944         (__pthread_cond_timedwait): Likewise.
6945         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
6946         (FUTEX_CMP_REQUEUE): Define.
6947         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6948         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6949         Pass __futex value from before the unlock and __futex address instead
6950         of address of low 32-bits of __wakeup_seq to futex syscall.
6951         Fallback to FUTEX_WAKE all on any errors.
6953 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
6955         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
6956         comment typo.
6957         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
6958         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
6959         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
6960         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
6961         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
6963 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
6965         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
6966         Add memory clobber to inline assembly.
6967         (__lll_mutex_trylock): Likewise.
6968         (__lll_mutex_cond_trylock): Likewise.
6970 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
6972         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
6973         Pass val argument as 6th system call argument in %r7.
6975 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
6977         * Makefile (tests): Add tst-cond16.
6978         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
6979         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
6980         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6981         Add __data.__futex field, reshuffle __data.__clock.
6982         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
6983         (__pthread_cond_signal): Increment __futex at the same time as
6984         __wakeup_seq or __total_seq.  Pass address of __futex instead of
6985         address of low 32-bits of __wakeup_seq to futex syscall.
6986         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
6987         (__pthread_cond_wait): Likewise.  Pass __futex value from before
6988         releasing internal lock to FUTEX_WAIT.
6989         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
6990         (__pthread_cond_timedwait): Likewise.
6991         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
6992         (FUTEX_CMP_REQUEUE): Define.
6993         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
6994         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
6995         Pass __futex value from before the unlock and __futex address instead
6996         of address of low 32-bits of __wakeup_seq to futex syscall.
6997         Fallback to FUTEX_WAKE all on any errors.
6998         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
6999         Define.
7000         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
7001         internally.  Return non-zero if error, zero if success.
7002         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
7003         Add __data.__futex field, reshuffle __data.__clock.
7004         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
7005         Define.
7006         (lll_futex_requeue): Add val argument, return 1 unconditionally
7007         for the time being.
7008         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7009         Add __data.__futex field, reshuffle __data.__clock.
7010         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
7011         Define.
7012         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
7013         internally.  Return non-zero if error, zero if success.
7014         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7015         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
7016         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
7017         Define.
7018         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
7019         internally.  Return non-zero if error, zero if success.
7020         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
7021         Add __data.__futex field, reshuffle __data.__clock.
7022         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
7023         Define.
7024         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
7025         internally.  Return non-zero if error, zero if success.
7026         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
7027         Add __data.__futex field, reshuffle __data.__clock.
7028         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
7029         Add __data.__futex field, reshuffle __data.__clock.
7030         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
7031         Increment __futex at the same time as __wakeup_seq or __total_seq.
7032         Pass address of __futex instead of address of low 32-bits of
7033         __wakeup_seq to futex syscall.
7034         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
7035         Pass __futex value from before releasing internal lock
7036         to FUTEX_WAIT.
7037         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7038         Likewise.  Avoid unnecessary shadowing of variables.
7039         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
7040         Set __futex to 2 * __total_seq.  Pass __futex value from before the
7041         unlock and __futex address instead of address of low 32-bits of
7042         __wakeup_seq to futex_requeue macro, adjust for new return value
7043         meaning.
7044         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
7045         (__pthread_cond_signal): Increment __futex at the same time as
7046         __wakeup_seq or __total_seq.  Pass address of __futex instead of
7047         address of low 32-bits of __wakeup_seq to futex syscall.
7048         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7049         (__pthread_cond_wait): Likewise.  Pass __futex value from before
7050         releasing internal lock to FUTEX_WAIT.
7051         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7052         (__pthread_cond_timedwait): Likewise.
7053         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
7054         (FUTEX_CMP_REQUEUE): Define.
7055         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
7056         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
7057         Pass __futex value from before the unlock and __futex address instead
7058         of address of low 32-bits of __wakeup_seq to futex syscall.
7059         Fallback to FUTEX_WAKE all on any errors.
7061 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7063         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
7064         Add nop to align the end of critical section.
7065         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
7067 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7069         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
7070         Add __broadcast_seq field.
7071         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
7072         all waiters as woken with woken_seq and bump broadcast counter.
7073         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
7074         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
7075         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7076         Comment typo fixes.  Avoid returning -ETIMEDOUT.
7078 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
7080         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7081         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
7082         Reported by Kaz Kojima.
7084 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
7086         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
7088 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
7090         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
7091         __broadcast_seq with bc_seq after acquiring internal lock instead of
7092         before it.
7094 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
7096         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
7097         compilation.
7098         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7099         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
7100         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7101         (pthread_cond_t): Add __data.__broadcast_seq field.
7102         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7103         (FRAME_SIZE): Define.
7104         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
7105         Comment typo fixes.
7106         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
7107         Define.
7108         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
7109         typo fixes.
7110         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
7111         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
7112         fixes.
7114 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
7116         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
7117         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
7118         Add __broadcast_seq field.
7119         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7120         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7121         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7122         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7123         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7124         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
7125         all waiters as woken with woken_seq and bump broadcast counter.
7126         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
7127         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
7128         __broadcast_seq field.
7129         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7130         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7131         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7132         * pthread_cond_init.c: Initialize __broadcast_seq field.
7133         * Makefile (tests): Add tst-cond17 and tst-cond18.
7134         Add .NOTPARALLEL goal.
7135         * tst-cond16.c: New file.  From Jakub.
7136         * tst-cond17.c: New file.  From Jakub.
7137         * tst-cond18.c: New file.  From Jakub.
7139 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
7141         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
7142         unwind info.
7144         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
7145         Parametrize frame size.  Correct some unwind info.
7146         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7148 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
7150         * tst-stack3.c: Note testing functionality beyond POSIX.
7152 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
7154         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
7155         Change conditional from ifdef to if.
7157 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
7159         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
7160         SYSDEP_CANCEL_ERROR): Define.
7161         (PSEUDO): Use it.
7163 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
7165         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
7167 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
7169         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
7171 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7173         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
7174         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
7175         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
7176         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
7178 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
7180         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
7181         thread has all signals blocked.
7183 2004-04-18  Andreas Jaeger  <aj@suse.de>
7185         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
7186         (SEM_VALUE_MAX): Add missing brace.
7188 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
7190         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
7191         in rt subdir.
7192         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
7193         * sysdeps/pthread/tst-mqueue8x.c: New test.
7194         * tst-cancel4.c: Update comment about message queues.
7196         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
7197         return it_value { 0, 0 }.
7198         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
7199         like SIGEV_SIGNAL.
7200         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
7201         assertion for SIGEV_NONE.
7202         (thread_attr_compare): Compare all attributes, not just a partial
7203         subset.
7205 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
7207         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
7209 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
7211         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
7212         Just use a plain number.
7213         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
7214         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
7215         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
7216         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
7217         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
7218         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
7219         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
7221 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7223         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
7224         frame info.
7225         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7227 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
7229         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
7230         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
7231         of calling sigwaitinfo.
7233 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
7235         * allocatestack.c (allocate_stack): Set reported_guardsize
7236         unconditionally.
7237         * pthread_getattr_np.c (pthread_getattr_np): Use
7238         reported_guardsize instead of guardsize.
7239         * descr.h (struct pthread): Add reported_guardsize field.
7241 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
7243         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
7245 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
7247         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
7249 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
7251         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
7252         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
7253         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
7254         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
7255         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
7256         Define.
7257         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
7258         (_POSIX_MESSAGE_PASSING): Define.
7259         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
7260         (_POSIX_MESSAGE_PASSING): Define.
7261         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
7262         (_POSIX_MESSAGE_PASSING): Define.
7264 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
7266         * tst-context1.c (fct): Check whether correct stack is used.
7268 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
7270         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
7271         matching constraints for asm mem parameters.
7273         * tst-clock2.c (tf): Don't define unless needed.
7275 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
7277         * Makefile (link-libc-static): Use $(static-gnulib) instead of
7278         $(gnulib).
7280 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
7282         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
7283         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
7284         * pthreadP.h: Declare __nptl_deallocate_tsd.
7285         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
7286         Adjust caller.
7288         * Makefile (tests): Add tst-tsd5.
7289         * tst-tsd5.c: New file.
7291 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
7293         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
7294         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
7295         is SHLIB_COMPAT check.
7296         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
7297         (__pthread_attr_getaffinity_old): Likewise.
7298         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7299         (__pthread_getaffinity_old): Likewise.
7300         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
7301         (__pthread_setaffinity_old): Likewise.
7303 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
7305         * allocatestack.c (_make_stacks_executable): Call
7306         _dl_make_stack_executable first.
7308 2004-03-24  Roland McGrath  <roland@redhat.com>
7310         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
7311         constraint instead of "0".
7313 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
7315         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7316         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
7318         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
7319         code to avoid warning.
7321 2004-03-24  Andreas Jaeger  <aj@suse.de>
7323         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
7324         (__pthread_attr_setaffinity_old): Remove const.
7326 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
7328         * sysdeps/unix/sysv/linux/smp.h: New file.
7329         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
7330         * init.c: Define __is_smp.
7331         (__pthread_initialize_minimal_internal): Call is_smp_system to
7332         initialize __is_smp.
7333         * pthreadP.h: Declare __is_smp.
7334         Define MAX_ADAPTIVE_COUNT is necessary.
7335         * pthread_mutex_init.c: Add comment regarding __spins field.
7336         * pthread_mutex_lock.c: Implement adaptive mutex type.
7337         * pthread_mutex_timedlock.c: Likewise.
7338         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
7339         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
7340         Add __spins field.
7341         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7342         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7343         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7344         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7345         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7346         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7347         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7348         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
7349         lll_mutex_cond_trylock.
7350         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7351         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7352         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7353         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
7354         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
7355         Define BUSY_WAIT_NOP.
7356         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7357         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7359         * tst-mutex5.c: Add support for testing adaptive mutexes.
7360         * tst-mutex7.c: Likewise.
7361         * tst-mutex5a.c: New file.
7362         * tst-mutex7a.c: New file.
7363         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
7365         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
7366         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
7367         vgettimeofday call might destroy the content.
7369         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
7370         @pause in the loop.
7372         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
7373         No need to restrict type of ret.  Make it int.  Add comment.
7375         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
7376         Remove unnecessary setne instruction.
7378 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
7380         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7381         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
7382         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
7383         If realloc fails, break out of the loop.
7385 2004-03-20  Andreas Jaeger  <aj@suse.de>
7387         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
7388         (__pthread_setaffinity_old): Fix interface.
7389         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
7390         (__pthread_getaffinity_old): Likewise.
7392         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
7393         (__pthread_setaffinity_new): Remove duplicate declaration.
7395 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7397         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
7398         the return value to a safe register.
7399         (CDISABLE): Set the function argument correctly.
7401 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7403         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
7404         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
7405         Rewrite so that only one locked memory operation per round is needed.
7406         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
7407         (pthread_barrier_wait): After wakeup, release lock only when the
7408         last thread stopped using the barrier object.
7409         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
7410         (__pthread_cond_wait): Don't store mutex address if the current
7411         value is ~0l.  Add correct cleanup support and unwind info.
7412         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7413         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
7414         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
7415         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
7416         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
7417         Add correct cleanup support and unwind info.
7418         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
7419         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
7420         information for syscall wrappers.
7422 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
7424         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
7425         cpusetsize field, remove next.
7426         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
7427         parameter for size of the CPU set.
7428         (pthread_setaffinity_np): Likewise.
7429         (pthread_attr_getaffinity_np): Likewise.
7430         (pthread_attr_setaffinity_np): Likewise.
7431         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
7432         interface change, keep compatibility code.
7433         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
7434         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
7435         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
7436         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
7437         __pthread_getaffinity_np.
7438         * Versions: Add version for changed interfaces.
7439         * tst-attr3.c: Adjust test for interface change.
7440         * pthread_getattr_np.c: Query the kernel about the affinity mask with
7441         increasing buffer sizes.
7442         * pthread_attr_destroy.c: Remove unused list handling.
7443         * pthread_attr_init.c: Likewise.
7445 2004-03-17  Roland McGrath  <roland@redhat.com>
7447         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
7448         first argument to clock_getres so we ever enable kernel timers.
7450 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
7452         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
7454 2004-03-12  Richard Henderson  <rth@redhat.com>
7456         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
7457         oldvalue from CENABLE to CDISABLE.
7459 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
7461         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
7462         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
7463         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
7464         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
7466 2004-03-11  Richard Henderson  <rth@redhat.com>
7468         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
7469         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
7470         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
7472 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
7474         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
7475         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
7476         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
7478 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
7480         * forward.c (__pthread_cond_broadcast_2_0,
7481         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
7482         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
7483         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
7485 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7487         * sysdeps/sh/tcb-offsets.sym: Add PID.
7488         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
7489         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
7491 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
7493         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
7494         include <sysdep-cancel.h>, vfork is no cancellation point.
7495         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
7496         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
7497         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
7499 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
7501         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
7502         libc_hidden_def.
7503         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
7504         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
7505         Likewise.
7506         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
7507         Likewise.
7508         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
7509         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
7510         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
7511         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
7512         of DO_CALL_VIA_BREAK.  Work around a gas problem.
7514         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
7515         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
7516         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
7517         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
7518         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
7519         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
7521         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
7522         a local register for saving old PID.  Negate PID in parent upon exit.
7524         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
7525         tcb-offsets.h.
7526         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
7527         before syscall, set to the old value in the parent afterwards.
7528         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
7529         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
7530         tcb-offsets.h.
7531         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
7532         before syscall, set to the old value in the parent afterwards.
7533         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
7534         * sysdeps/s390/tcb-offsets.sym: Add PID.
7536         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
7537         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
7538         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
7539         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
7540         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
7541         * sysdeps/sparc/tcb-offsets.sym: Add PID.
7543 2004-03-10  Andreas Schwab  <schwab@suse.de>
7545         * sysdeps/ia64/tcb-offsets.sym: Add PID.
7546         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
7547         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
7549 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
7551         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
7552         * tst-cancel21.c (do_one_test): Likewise.
7553         Reported by Gordon Jin <gordon.jin@intel.com>.
7555 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
7557         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
7558         if non-zero and set to INT_MIN if zero.
7559         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
7560         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
7561         (SAVE_PID, RESTORE_PID): Define.
7562         (__vfork): Use it.
7563         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
7564         Use relative path to avoid including NPTL i386/vfork.S.
7565         (SAVE_PID, RESTORE_PID): Define.
7566         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
7567         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
7568         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
7569         tst-vfork2x.
7570         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
7571         * tst-vfork1.c: New test.
7572         * tst-vfork2.c: New test.
7573         * tst-vfork1x.c: New test.
7574         * tst-vfork2x.c: New test.
7576 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
7578         * sysdeps/i386/tcb-offsets.sym: Add PID.
7579         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7580         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
7581         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
7583 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
7585         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
7587 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
7589         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
7590         _rtld_global_ro.
7592 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
7594         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
7595         _rtld_global_ro.
7597         * tst-once4.c: Remove unnecessary macro definition.
7599         * tst-mutex7.c (do_test): Limit thread stack size.
7600         * tst-once2.c (do_test): Likewise.
7601         * tst-tls3.c (do_test): Likewise.
7602         * tst-tls1.c (do_test): Likewise.
7603         * tst-signal3.c (do_test): Likewise.
7604         * tst-kill6.c (do_test): Likewise.
7605         * tst-key4.c (do_test): Likewise.
7606         * tst-join4.c (do_test): Likewise.
7607         * tst-fork1.c (do_test): Likewise.
7608         * tst-context1.c (do_test): Likewise.
7609         * tst-cond2.c (do_test): Likewise.
7610         * tst-cond10.c (do_test): Likewise.
7611         * tst-clock2.c (do_test): Likewise.
7612         * tst-cancel10.c (do_test): Likewise.
7613         * tst-basic2.c (do_test): Likewise.
7614         * tst-barrier4.c (do_test): Likewise.
7616 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
7618         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
7620 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
7622         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7623         (__pthread_cond_timedwait): Optimize wakeup test.
7624         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7625         (__pthread_cond_wait): Likewise.
7626         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
7627         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7628         Likewise.
7630 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
7632         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7633         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
7634         the atomic instruction needed.
7635         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
7636         (__lll_mutex_lock_wait): Likewise.
7638 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
7640         * Makefile (tests): Add tst-cond14 and tst-cond15.
7641         * tst-cond14.c: New file.
7642         * tst-cond15.c: New file.
7644 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
7646         * sysdeps/pthread/createthread.c (create_thread): Remove use of
7647         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
7648         needs to be implemented differently to be useful.
7650 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
7652         * pthread_attr_setschedparam.c: Don't test priority against limits
7653         here.  Set ATTR_FLAG_SCHED_SET flag.
7654         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
7655         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
7656         from parent thread to child.  If attribute is used and scheduling
7657         parameters are not inherited, copy parameters from attribute or
7658         compute them.  Check priority value.
7659         * pthread_getschedparam.c: If the parameters aren't known yet get
7660         them from the kernel.
7661         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
7662         ATTR_FLAG_POLICY_SET flag for thread.
7663         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
7664         and ATTR_FLAG_POLICY_SET.
7666         * sysdeps/pthread/createthread.c: Use tgkill if possible.
7668         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
7669         fail if stack address hasn't been set.  Just return 0.
7671 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
7673         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
7674         libpthread for the files in this list.
7675         (CFLAGS-tst-unload): Removed.
7676         * tst-unload.c (do_test): Don't use complete path for
7677         LIBPHREAD_SO.
7679         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
7680         tst-_res1mod2.
7682 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
7684         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
7685         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
7686         operation per round is needed.
7687         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
7688         (__lll_mutex_lock_wait): Likewise.
7690 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
7692         * tst-cancel9.c (cleanup): Don't print to stderr.
7694 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7696         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
7698 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
7700         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
7701         (__syscall_error_handler2): Call CDISABLE.
7702         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
7703         (__syscall_error_handler2): Call CDISABLE.
7705         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7706         Release lock before the loop, don't reacquire it.
7708         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
7710 2004-02-19  Andreas Schwab  <schwab@suse.de>
7712         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7713         Fix last change.
7715 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
7717         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
7718         (pthread_barrier_wait): After wakeup, release lock only when the
7719         last thread stopped using the barrier object.
7720         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
7721         (pthread_barrier_wait): Likewise.
7722         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
7723         Likewise.
7724         * Makefile (tests): Add tst-barrier4.
7725         * tst-barrier4.c: New file.
7727         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7728         (__pthread_cond_timedwait): Perform timeout test while holding
7729         internal lock to prevent wakeup race.
7730         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
7731         * sysdeps/pthread/pthread_cond_timedwait.c
7732         (__pthread_cond_timedwait): Likewise.
7733         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
7734         (__pthread_cond_timedwait): Likewise.
7736 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
7738         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
7739         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
7740         * Makefile (tests): Add tst-rwlock13.
7741         * tst-rwlock13.c: New test.
7743 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
7745         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7746         (__condvar_tw_cleanup): Little optimization.
7747         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
7749 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
7751         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
7752         libpthread as "lib" parameter to SHLIB_COMPAT.
7753         (__novmx_siglongjmp): Fix typo in function name.
7754         (__novmx_longjmp): Fix typo in function name.
7756 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
7758         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
7759         __builtin_expect.
7761         * sysdeps/generic/pt-longjmp.c: Moved to...
7762         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
7764 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
7766         * Makefile (libpthread-routines): Add pt-cleanup.
7767         * pt-longjmp.c: Removed.
7768         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
7769         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
7770         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
7771         Version longjmp, siglongjmp for GLIBC_2.3.4.
7772         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
7774 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
7776         * sysdeps/pthread/pthread_cond_timedwait.c
7777         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
7778         Reuse code.  Add __builtin_expects.
7780         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7781         (__pthread_cond_timedwait): Get internal lock in case timeout has
7782         passed before the futex syscall.
7783         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7785 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
7787         * allocatestack.c: Pretty printing.
7789         * sysdeps/pthread/createthread.c (create_thread): Don't add
7790         CLONE_DETACHED bit if it is not necessary.
7792 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
7794         * pthread_getattr_np.c: Include ldsodefs.h.
7796 2004-01-16  Richard Henderson  <rth@redhat.com>
7798         * allocatestack.c: Don't declare __libc_stack_end.
7799         * init.c (__pthread_initialize_minimal_internal): Likewise.
7800         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
7802 2004-01-15  Richard Henderson  <rth@redhat.com>
7804         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
7805         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
7806         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
7807         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
7808         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
7809         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
7810         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
7811         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
7813 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
7815         * init.c (pthread_functions): Make array const.
7817 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
7819         * allocatestack.c (__make_stacks_executable): Change interface.
7820         Check parameters.  Pass parameter on to libc counterpart.
7821         * pthreadP.h: Change declaration.
7823 2004-01-13  Richard Henderson  <rth@redhat.com>
7825         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
7826         prototype form.
7827         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
7828         Likewise.
7830         * sysdeps/alpha/Makefile: New file.
7831         * sysdeps/alpha/tcb-offsets.sym: New file.
7832         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
7833         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
7835         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
7836         on powerpc version.
7838 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
7840         * Makefile (tests): Add tst-backtrace1.
7841         * tst-backtrace1.c: New test.
7843 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
7845         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
7846         register as second parameter to the REGISTER macro.
7847         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
7848         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
7849         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
7850         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
7851         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
7852         of thread register as second parameter to REGISTER macro in 64 case.
7854 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
7856         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
7857         (CFLAGS-getpid.o): Defined.
7858         (CFLAGS-getpid.os): Defined.
7860 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
7862         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
7863         returned for main thread does not overlap with any other VMA.
7864         Patch by Jakub Jelinek.
7866 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
7868         * tst-raise1.c: Include stdio.h.
7870 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
7872         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
7873         setting with __ASSUME_TGKILL || defined __NR_tgkill.
7874         If pid is 0, set it to selftid.
7875         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
7876         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
7877         != 0, return self->tid without doing a syscall.
7878         * descr.h (struct pthread): Move pid field after tid.
7880         * Makefile (tests): Add tst-raise1.
7881         * tst-raise1.c: New file.
7883 2003-12-23  Roland McGrath  <roland@redhat.com>
7885         * tst-oddstacklimit.c: New file.
7886         * Makefile (tests): Add it.
7887         (tst-oddstacklimit-ENV): New variable.
7889         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
7890         value up to page size for __default_stacksize.
7892 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
7894         * Makefile (tests): Add tst-eintr5.
7895         * tst-eintr5.c: New file.
7897         * eintr.c (eintr_source): Prevent sending signal to self.
7899         * tst-eintr2.c (tf1): Improve error message.
7901 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
7903         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
7904         * sysdeps/unix/sysv/linux/getpid.c: New file.
7905         * pthread_cancel.c: Add comment explaining use of PID field.
7906         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
7907         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
7908         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
7909         temporarily to signal the field must not be relied on and updated
7910         by getpid().
7911         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
7912         temporarily negative.
7913         * sysdeps/unix/sysv/linux/raise.c: Likewise.
7915 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
7917         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
7918         (eintr_source): If ARG != NULL, use pthread_kill.
7919         * tst-eintr1.c: Adjust for this change.
7920         * tst-eintr2.c: Likewise.
7921         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
7922         * tst-eintr3.c: New file.
7923         * tst-eintr4.c: New file.
7925 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
7927         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
7928         if CANCELSTATE_BITMASK is set.
7929         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
7930         Likewise.
7932         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
7933         (tests-reverse): Add tst-cancel23.
7934         * tst-cancel22.c: New test.
7935         * tst-cancel23.c: New test.
7937 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
7939         * tst-eintr1.c: Better error messages.
7941         * Makefile (tests): Add tst-eintr2.
7942         * tst-eintr2.c: New file.
7944 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
7946         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
7947         (CFLAGS-tst-cancelx21.c): Set.
7948         * tst-cancel21.c: New test.
7949         * tst-cancelx21.c: New test.
7951         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
7952         comparison operand.
7953         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
7954         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
7955         * pt-longjmp.c: Include jmpbuf-unwind.h.
7956         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
7957         _JMPBUF_UNWINDS.  Adjust compared pointers.
7958         * init.c (__pthread_initialize_minimal_internal): Initialize
7959         pd->stackblock_size.
7960         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
7961         * sysdeps/alpha/jmpbuf-unwind.h: New file.
7962         * sysdeps/i386/jmpbuf-unwind.h: New file.
7963         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
7964         * sysdeps/s390/jmpbuf-unwind.h: New file.
7965         * sysdeps/sh/jmpbuf-unwind.h: New file.
7966         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
7967         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
7968         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
7969         (_JMPBUF_CFA_UNWINDS): Remove.
7970         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
7972 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
7974         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
7975         (CFLAGS-tst-cancelx20.c): Set.
7976         * tst-cancel20.c: New test.
7977         * tst-cancelx20.c: New test.
7979 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
7981         * init.c (__pthread_initialize_minimal_internal): Don't treat
7982         architectures with separate register stack special here when
7983         computing default stack size.
7985 2003-12-17  Roland McGrath  <roland@redhat.com>
7987         * Makefile (tst-cancelx7-ARGS): New variable.
7988         Reportd by Greg Schafer <gschafer@zip.com.au>.
7990 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
7992         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
7993         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
7994         (tst-stack3-ENV): Set.
7995         ($(objpfx)tst-stack3-mem): New.
7996         * tst-stack3.c: New test.
7998 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
8000         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
8001         Add unwind directives.  Drop unused .regstk directive.
8002         (_fini_EPILOG_BEGINS): Add unwind directives.
8004 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
8006         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
8007         Assume parameter is a pointer.
8008         (lll_futex_wake): Likewise.
8009         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
8010         Likewise.
8011         (lll_futex_wake): Likewise.
8012         Reported by Boris Hu.
8013         * sysdeps/unix/sysv/linux/unregister-atfork.c
8014         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
8016         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
8018 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
8020         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
8021         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
8022         __rtld_lock_initialize for ld.so lock.
8023         Patch in part by Adam Li <adam.li@intel.com>.
8025 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
8027         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
8028         in $(gnulib).  Also, remove stale comment.
8030 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
8032         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
8033         advantage of new syscall stub and optimize accordingly.
8035         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
8036         from SYS_futex, to match expectations of
8037         sysdep.h:DO_INLINE_SYSCALL.
8038         (lll_futex_clobbers): Remove.
8039         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
8040         (lll_futex_wake): Likewise.
8041         (lll_futex_requeue): Likewise.
8042         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
8043         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
8044         Jelinek).
8045         (__lll_mutex_lock): Likewise.
8046         (__lll_mutex_cond_lock): Likewise.
8047         (__lll_mutex_timed_lock): Likewise.
8048         (__lll_mutex_unlock): Likewise.
8049         (__lll_mutex_unlock_force): Likewise.
8051         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
8052         comes before the include of <sysdep.h>.
8053         (THREAD_SELF_SYSINFO): New macro.
8054         (THREAD_SYSINFO): Likewise.
8055         (INIT_SYSINFO): New macro.
8056         (TLS_INIT_TP): Call INIT_SYSINFO.
8058         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
8060         * sysdeps/pthread/createthread.c (create_thread): Use
8061         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
8062         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
8063         THREAD_SELF_SYSINFO instead of open code.
8064         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
8065         (THREAD_SYSINFO): Likewise.
8067         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
8069         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
8071 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
8073         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
8074         instead of .init.  Patch by David Mosberger.
8076 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
8078         * sysdeps/pthread/configure.in: Remove broken declaration in C
8079         cleanup handling check.
8081 2003-11-30  Andreas Jaeger  <aj@suse.de>
8083         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
8084         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
8085         Likewise.
8087 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
8089         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
8090         * pthread_attr_destroy.c: Include shlib-compat.h.
8091         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
8092         is set in iattr->flags.
8093         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
8095 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
8097         * Makefile (distribute): Add tst-cleanup4aux.c.
8099         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
8100         include.
8102 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
8104         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
8105         pthread_cond_signal.
8107         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
8108         store mutex address if the current value is ~0l.
8109         * sysdeps/pthread/pthread_cond_timedwait.c
8110         (__pthread_cond_timedwait): Likewise.
8111         * sysdeps/pthread/pthread_cond_broadcast.c
8112         (__pthread_cond_broadcast): Don't use requeue for pshared
8113         condvars.
8115         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
8116         (__pthread_cond_wait): Don't store mutex address if the current
8117         value is ~0l.
8118         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
8119         (__pthread_cond_timedwait): Likewise.
8120         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
8121         (__pthread_cond_broadcast): Don't use requeue for pshared
8122         condvars.
8124         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
8125         element with ~0l for pshared condvars, with NULL otherwise.
8127         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8128         (__pthread_cond_wait): Don't store mutex address if the current
8129         value is ~0l.
8130         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8131         (__pthread_cond_timedwait): Likewise.
8132         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
8133         (__pthread_cond_broadcast): Don't use requeue for pshared
8134         condvars.
8136         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
8137         * tst-cond12.c: New file.
8138         * tst-cond13.c: New file.
8140 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
8142         * sysdeps/pthread/configure.in: Make missing forced unwind support
8143         fatal.
8145 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
8147         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
8149 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
8151         * Makefile: Add magic to clean up correctly.
8153 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
8155         * unwind.c (FRAME_LEFT): Define.
8156         (unwind_stop): Handle old style cleanups here.
8157         (__pthread_unwind): Handle old style cleanups only if
8158         !HAVE_FORCED_UNWIND.
8159         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
8160         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
8161         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
8162         ($(objpfx)tst-cleanupx4): Likewise.
8163         * tst-cleanup4.c: New test.
8164         * tst-cleanup4aux.c: New.
8165         * tst-cleanupx4.c: New test.
8167 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
8169         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
8170         lll_mutex_*lock macros to skip atomic operations on some archs.
8172 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
8174         * sysdeps/pthread/tst-timer.c (main): Initialize
8175         sigev2.sigev_value as well.
8177 2003-10-15  Roland McGrath  <roland@redhat.com>
8179         * sysdeps/pthread/configure.in: Barf if visibility attribute support
8180         is missing.
8181         * sysdeps/pthread/configure: Regenerated.
8183 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
8185         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
8186         locking macros.  No distinction between normal and mutex locking
8187         anymore.
8188         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
8189         Merge bits from lowlevelmutex.S we still need.
8190         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
8191         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
8192         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
8193         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
8194         new mutex implementation.
8195         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
8196         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
8197         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8198         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
8199         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
8200         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8201         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8202         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
8203         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8204         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
8205         symbol for entry point to avoid cancellation.
8207 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
8209         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
8210         changes.
8211         (SAVE_OLDTYPE_0): Fix a typo.
8213 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
8215         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
8216         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
8218 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
8220         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
8221         correct offset.
8223 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
8225         * Makefile (tests): Add tst-cancel19.
8226         * tst-cancel19.c: New test.
8228 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
8230         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
8231         restoring of the old cancellation type.
8233 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
8235         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
8237 2003-09-27  Wolfram Gloger  <wg@malloc.de>
8239         * sysdeps/pthread/malloc-machine.h: New file
8241 2003-09-24  Roland McGrath  <roland@redhat.com>
8243         * allocatestack.c (__make_stacks_executable): Don't ignore return
8244         value from _dl_make_stack_executable.
8246 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
8248         * allocatestack.c (__make_stacks_executable): Also change
8249         permission of the currently unused stacks.
8251         * allocatestack.c (change_stack_perm): Split out from
8252         __make_stacks_executable.
8253         (allocate_stack): If the required permission changed between the time
8254         we started preparing the stack and queueing it, change the permission.
8255         (__make_stacks_executable): Call change_stack_perm.
8257         * Makefile: Build tst-execstack-mod locally.
8258         * tst-execstack-mod.c: New file.
8260 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
8262         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
8264 2003-09-23  Roland McGrath  <roland@redhat.com>
8266         * tst-execstack.c: New file.
8267         * Makefile (tests): Add it.
8268         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
8269         (LDFLAGS-tst-execstack): New variable.
8271         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
8272         whether to use PROT_EXEC for stack mmap.
8273         (__make_stacks_executable): New function.
8274         * pthreadP.h: Declare it.
8275         * init.c (__pthread_initialize_minimal_internal): Set
8276         GL(dl_make_stack_executable_hook) to that.
8278 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
8280         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
8281         recommendation from AMD re avoidance of lock prefix.
8283 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
8285         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
8286         lll_futex_timed_wait instead of lll_futex_wait.
8287         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
8288         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
8289         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
8290         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
8291         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
8292         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
8293         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
8294         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
8295         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
8296         Completely revamp the locking macros.  No distinction between
8297         normal and mutex locking anymore.
8298         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
8299         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
8300         __lll_lock_timedwait): Fix prototypes.
8301         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
8302         __lll_lock_timedwait): Likewise.
8303         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
8304         macros, add __builtin_expect.
8305         (lll_mutex_timedlock): Likewise.  Fix return value.
8306         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
8307         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
8308         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
8309         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
8310         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
8311         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
8312         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
8313         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
8315 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
8317         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8318         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
8319         operation if possible.
8321         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
8322         like jumping over the lock prefix.
8324 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
8326         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
8327         locking macros.  No distinction between normal and mutex locking
8328         anymore.
8329         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8330         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
8331         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
8332         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
8333         locking.  Merge bits from lowlevelmutex.S we still need.
8334         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
8335         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
8336         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
8337         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
8338         * Makefile (routines): Remove libc-lowlevelmutex.
8339         (libpthread-rountines): Remove lowlevelmutex.
8340         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
8341         for new mutex implementation.
8342         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8343         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8344         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8345         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8346         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8347         Likewise.
8348         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8349         Likewise.
8350         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8351         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8352         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
8353         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
8354         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8355         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8356         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8357         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
8358         Likewise.
8359         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
8360         Likewise.
8361         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
8362         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8363         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8364         Don't use requeue.
8365         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8366         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
8368 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
8370         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
8371         in parameters of asm with output parameters.
8373         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
8374         type of DECR parameter to int.
8375         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
8377 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
8379         * tst-attr3.c (tf, do_test): Print stack start/end/size and
8380         guardsize for each thread.
8382 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
8384         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
8385         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
8386         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
8388         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
8389         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
8390         NULL.
8391         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
8392         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
8393         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
8394         (pthread_getaffinity_np): Add hidden_def.
8396         * Makefile (tests): Add tst-attr3.
8397         * tst-attr3.c: New test.
8399         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
8401 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
8403         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
8404         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
8406 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
8408         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
8409         * tst-align.c: Include tst-stack-align.h.
8410         (tf, do_test): Use TEST_STACK_ALIGN macro.
8412 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
8414         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
8415         variable.
8417 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
8419         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
8420         stack-related values for the initial thread.
8422 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
8424         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
8426 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
8428         * pthread_mutex_lock.c: Minor code rearrangements.
8430 2003-09-05  Roland McGrath  <roland@redhat.com>
8432         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
8433         Instead, include ../nptl_db/db_info.c to do its magic.
8434         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
8435         (__pthread_pthread_key_2ndlevel_size): Likewise.
8436         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
8437         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
8438         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
8439         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
8440         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
8441         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
8442         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
8443         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
8444         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
8445         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
8446         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
8447         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
8448         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
8449         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
8450         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
8451         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
8452         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
8454 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
8456         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
8457         of pthread_t to be compatible with LT.
8458         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
8459         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8460         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8461         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8462         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
8463         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8464         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
8466 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
8468         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
8470 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
8472         * unwind-forcedunwind.c: Move to...
8473         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
8474         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
8475         * sysdeps/pthread/jmpbuf-unwind.h: New file.
8476         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
8477         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
8478         * unwind.c: Include jmpbuf-unwind.h.
8479         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
8481 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
8483         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
8484         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
8485         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
8486         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
8487         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
8488         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
8489         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
8490         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
8491         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
8492         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
8493         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
8494         function.
8495         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
8496         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
8497         * Makefile (tests): Add tst-stack2.
8498         * tst-stack2.c: New test.
8499         * tst-stack1.c: Include limits.h and sys/param.h.
8500         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
8502         * pthread_condattr_setpshared.c: Include errno.h.
8503         (pthread_condattr_setpshared): Return EINVAL if pshared
8504         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
8506         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
8507         defined symbol for entry point to avoid cancellation.
8508         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
8509         Likewise.
8510         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
8511         Likewise.
8512         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
8513         Likewise.
8514         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
8515         Likewise.
8516         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
8517         Likewise.
8518         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
8519         __close_nocancel, __read_nocancel, __write_nocancel,
8520         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
8521         libpthread.so or librt.so, define to corresponding function
8522         without _nocancel suffix.
8523         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
8524         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
8525         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
8527         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
8529 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
8531         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
8532         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
8534         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
8535         in subsections has a symbol associated with it.
8537         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
8538         defined symbol for entry point to avoid cancellation.
8539         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
8541 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
8543         * Makefile (tests): Add tst-tls5.
8544         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
8545         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
8546         ($(objpfx)tst-tls5): New.
8547         ($(objpfx)tst-tls6.out): Likewise.
8548         (tests): Depend on $(objpfx)tst-tls6.out.
8549         * tst-tls3.c: Include stdint.h and pthreaddef.h.
8550         (do_test): Check pthread_self () return value alignment.
8551         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
8552         (tf): Check pthread_self () return value alignment.
8553         * tst-tls5.c: New test.
8554         * tst-tls5.h: New.
8555         * tst-tls5mod.c: New.
8556         * tst-tls5moda.c: New.
8557         * tst-tls5modb.c: New.
8558         * tst-tls5modc.c: New.
8559         * tst-tls5modd.c: New.
8560         * tst-tls5mode.c: New.
8561         * tst-tls5modf.c: New.
8562         * tst-tls6.sh: New test.
8564         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
8565         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
8566         * init.c (pthread_functions): Initialize them.
8567         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
8568         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
8569         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
8570         pthread_cond_timedwait@@GLIBC_2.3.2.
8572 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
8574         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
8575         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
8576         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
8577         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
8578         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
8579         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
8581         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
8583         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
8584         _POSIX_THREAD_PRIORITY_SCHEDULING.
8585         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
8587 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
8589         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
8590         nested function, use static inline function from libio.h.
8591         Code by Richard Henderson.
8593         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
8594         weak.
8596 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
8598         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
8599         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
8600         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
8601         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
8602         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
8603         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
8604         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
8605         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
8606         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
8607         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
8608         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
8609         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
8610         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
8611         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
8612         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
8613         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
8614         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
8615         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
8616         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
8617         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
8618         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
8619         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
8620         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
8621         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
8622         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
8623         * sysdeps/sparc/tls.h: New file.
8624         * sysdeps/sparc/tcb-offsets.sym: New file.
8625         * sysdeps/sparc/Makefile: New file.
8626         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
8627         * init.c [__sparc__] (__NR_set_tid_address): Define.
8629 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
8631         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
8632         _IO_release_lock): Define.
8634 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
8636         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
8637         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
8639 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
8641         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
8642         (__pthread_cleanup_class): Add missing return types of member
8643         functions.
8645 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
8647         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
8648         (lll_mutex_unlock_force): Add memory barrier between store and futex
8649         syscall.
8651 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
8653         * tst-cancel4.c (do_test): Also unlink tempfname and remove
8654         tempmsg in first loop.
8656 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
8658         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8659         _POSIX_THREAD_PRIORITY_SCHEDULING.
8660         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8662 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
8664         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
8665         (__rtld_lock_default_lock_recursive,
8666         __rtld_lock_default_unlock_recursive): Define.
8667         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
8668         __rtld_lock_unlock_recursive): Define using
8669         GL(_dl_rtld_*lock_recursive).
8670         * init.c (__pthread_initialize_minimal_internal): Initialize
8671         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
8672         Lock GL(_dl_load_lock) the same number of times as
8673         GL(_dl_load_lock) using non-mt implementation was nested.
8675         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
8676         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
8678 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
8680         * tst-cancel17.c (do_test): Make len2 maximum of page size and
8681         PIPE_BUF.
8683 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
8685         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
8687 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
8689         * sysdeps/pthread/createthread.c (do_clone): Move error handling
8690         to first syscall error check.  Move syscall error check for tkill
8691         into __ASSUME_CLONE_STOPPED #ifdef.
8693 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
8695         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
8696         is not defined, do explicit synchronization.
8697         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
8698         is not defined also unlock pd->lock for non-debugging case in case
8699         it is necessary.
8700         * pthread_create.c (start_thread): Always get and release pd->lock
8701         if __ASSUME_CLONE_STOPPED is not defined.
8702         (start_thread_debug): Removed.  Adjust users.
8703         * allocatestack.c (allocate_stack): Always initialize lock if
8704         __ASSUME_CLONE_STOPPED is not defined.
8705         * Makefile (tests): Add tst-sched1.
8706         * tst-sched1.c: New file.
8708         * sysdeps/pthread/createthread.c (do_clone): Only use
8709         sched_setschduler and pass correct parameters.
8711 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
8713         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
8714         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
8715         PTHREAD_STACK_MIN in comments.
8717 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
8719         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8720         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
8721         argument.
8722         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
8723         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
8724         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
8725         (__pthread_cleanup_upto): Fix prototype.
8726         (_longjmp_unwind): Adjust caller.
8727         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
8728         Change second argument to const struct pointer.
8729         * tst-sem8.c (main): Remove unused s2 and s3 variables.
8730         * tst-sem9.c (main): Likewise.
8731         * unwind.c: Include string.h for strlen prototype.
8733 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
8735         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8736         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
8737         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
8738         Define HAVE_CMOV.
8739         Patch by Nicholas Miell <nmiell@attbi.com>.
8741 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
8743         * init.c (__pthread_initialize_minimal_internal): Initialize
8744         GL(dl_init_static_tls).
8745         * pthreadP.h (__pthread_init_static_tls): New prototype.
8746         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
8747         New functions.
8748         * Makefile (tests): Add tst-tls4.
8749         (modules-names): Add tst-tls4moda and tst-tls4modb.
8750         ($(objpfx)tst-tls4): Link against libdl and libpthread.
8751         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
8752         tst-tls4modb.so.
8753         * tst-tls4.c: New file.
8754         * tst-tls4moda.c: New file.
8755         * tst-tls4modb.c: New file.
8757 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
8759         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
8760         before __timer_dealloc.
8761         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
8762         Don't call list_unlink.
8764 2003-07-29  Roland McGrath  <roland@redhat.com>
8766         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
8768 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
8770         * tst-cancel17.c (do_test): Check if aio_cancel failed.
8771         Don't reuse struct aiocb A if it failed.
8772         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
8773         not just one byte, as that does not block.
8775 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
8777         * sysdeps/pthread/unwind-resume.c: New file.
8778         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
8779         unwind-resume in csu subdir.
8780         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
8781         exceptions.
8782         (librt-sysdep_routines, librt-shared-only-routines): Add
8783         rt-unwind-resume.
8784         * sysdeps/pthread/rt-unwind-resume.c: New file.
8785         * unwind-forcedunwind.c: New file.
8786         * Makefile (libpthread-routines): Add unwind-forcedunwind.
8787         (libpthread-shared-only-routines): Likewise.
8788         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
8789         * pthreadP.h (pthread_cancel_init): New prototype.
8790         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
8792         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
8793         attr argument const struct pthread_attr *.
8795         * res.c (__res_state): Return __resp.
8796         * descr.h: Include resolv.h.
8797         (struct pthread): Add res field.
8798         * pthread_create.c: Include resolv.h.
8799         (start_thread): Initialize __resp.
8800         * Makefile (tests): Add tst-_res1.
8801         (module-names): Add tst-_res1mod1, tst-_res1mod2.
8802         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
8803         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
8804         libpthread.
8805         * tst-_res1.c: New file.
8806         * tst-_res1mod1.c: New file.
8807         * tst-_res1mod2.c: New file.
8809 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
8811         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
8813         * Makefile: Define various *-no-z-defs variables for test DSOs
8814         which has undefined symbols.
8816 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
8818         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
8819         Retry if the stwcx fails to store once_control.
8821 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
8823         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
8824         pthread_attr_setaffinity.
8825         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
8826         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
8827         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
8828         * pthread_attr_destroy.c: Free cpuset element if allocated.
8829         * pthread_create.c: Pass iattr as additional parameter to
8830         create_thread.
8831         * sysdeps/pthread/createthread.c: If attribute is provided and
8832         a new thread is created with affinity set or scheduling parameters,
8833         start thread with CLONE_STOPPED.
8834         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
8835         pthread_attr_setaffinity.
8836         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
8837         cpuset element.
8839 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
8841         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
8843 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
8845         * sysdeps/pthread/configure.in: Require CFI directives also for
8846         ppc and s390.
8848 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
8850         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
8851         Add cfi directives.
8853 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
8855         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
8856         CLEANUP_JMP_BUF.
8857         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
8858         registers as variables.  Call __pthread_mutex_unlock_usercnt.
8859         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8860         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
8861         not self pointer in __writer.  Compare with TID to determine
8862         deadlocks.
8863         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8864         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
8865         Likewise.
8866         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
8867         Likewise.
8868         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
8869         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8870         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
8871         macros also when compiling librt.
8873 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
8875         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
8876         -fasynchronous-unwind-tables.
8877         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
8878         (PSEUDO): Add cfi directives.
8879         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
8880         Likewise.
8881         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
8882         Likewise.
8884 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
8886         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
8887         __pthread_unregister_cancel): Add prototypes and hidden_proto.
8888         * unwind.c (__pthread_unwind_next): Add hidden_def.
8889         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
8890         Likewise.
8891         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
8892         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
8893         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
8894         Likewise.
8895         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
8896         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
8897         Likewise.
8898         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
8899         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
8900         __pthread_unregister_cancel and __pthread_unwind_next.
8902 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
8904         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
8905         different symbol for the cancellation syscall wrapper and
8906         non-cancellation syscall wrapper.
8907         (PSEUDO_END): Define.
8909 2003-07-05  Richard Henderson  <rth@redhat.com>
8911         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
8912         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
8913         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
8914         return actual return value from the syscall, not 0.
8916 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
8918         * descr.h (struct pthread): Add pid field.
8919         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
8920         (__reclaim_stacks): Likewise.
8921         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
8922         also check for PID of the signal source.
8923         (__pthread_initialize_minimal_internal): Also initialize pid field
8924         of initial thread's descriptor.
8925         * pthread_cancel.c: Use tgkill instead of tkill if possible.
8926         * sysdeps/unix/sysv/linux/fork.c: Likewise.
8927         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
8928         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8929         * sysdeps/unix/sysv/linux/raise.c: Likewise.
8931 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
8933         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
8934         Fix use of parameter.
8935         (__libc_cleanup_pop): Likewise.
8937 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
8939         * init.c (sigcancel_handler): Change parameters to match handler
8940         for SA_SIGACTION.  Check signal number and code to recognize
8941         invalid invocations.
8943 2003-07-03  Roland McGrath  <roland@redhat.com>
8945         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
8946         Apply sizeof (struct pthread) bias to r13 value.
8948 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
8950         * sysdeps/pthread/configure.in: Require CFI directives.
8952         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
8953         definition.
8954         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
8955         libpthread compilation.
8956         * unwind.c (__pthread_unwind): Add hidden_def.
8957         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
8959 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
8961         * libc-cancellation.c (__libc_cleanup_routine): Define.
8962         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
8963         (__pthread_cleanup_pop): Define.
8965 2003-07-01  Richard Henderson  <rth@redhat.com>
8967         * sysdeps/alpha/elf/pt-initfini.c: New file.
8968         * sysdeps/alpha/pthread_spin_lock.S: New file.
8969         * sysdeps/alpha/pthread_spin_trylock.S: New file.
8970         * sysdeps/alpha/pthreaddef.h: New file.
8971         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
8972         * sysdeps/alpha/tls.h: New file.
8973         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
8974         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
8975         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
8976         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
8977         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
8978         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
8979         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
8980         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
8981         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
8982         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
8984 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
8986         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
8987         cleanup support and unwind info.
8989 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
8991         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
8992         Use correct cleanup handler registration.  Add unwind info.
8993         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
8994         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
8995         * tst-once3.c: Add cleanup handler and check it is called.
8996         * tst-once4.c: Likewise.
8997         * tst-oncex3.c: New file.
8998         * tst-oncex4.c: New file.
8999         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
9001 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
9003         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
9005 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
9007         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
9008         (tf_msgsnd): Likewise.
9010         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
9011         premature returns a bit more.
9013 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
9015         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
9016         definition to the front.
9018         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
9019         the cleanup functions to make the names unique.  Fix dwarf opcode
9020         un unwind table.
9021         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
9022         functions to make the names unique.  Fix CFA offset for two blocks.
9024 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
9026         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
9027         missing closing braces.
9028         Patch by Christophe Saout <christophe@saout.de>.
9030 2003-06-24  Roland McGrath  <roland@redhat.com>
9032         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
9034 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
9036         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
9037         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
9039         * pthreadP.h: Declare __find_thread_by_id.
9040         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
9041         * pthread_clock_gettime.c: Allow using other thread's clock.
9042         * pthread_clock_settime.c: Likewise.
9043         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
9044         * Makefile: Add rules to build and run tst-clock2.
9045         * tst-clock2.c: New file.
9047 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
9049         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
9050         to use exception-based cleanup handler.
9051         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9053         * tst-cond8.c (ch): Announce that we are done.
9055         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
9057         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
9058         Also test aio_suspend with timeout value.
9060 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
9062         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
9063         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
9064         attribute_hidden.
9066         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
9067         (__pthread_mutex_lock_internal): Likewise.
9068         (__pthread_mutex_unlock_internal): Likewise.
9069         (__pthread_mutex_unlock_usercnt): Declare.
9070         * pthread_mutex_destroy.c: Always fail if used in any way.
9071         * pthread_mutex_init.c: Update comment.
9072         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
9073         * pthread_mutex_timedlock.c: Adjust __nusers.
9074         * pthread_mutex_trylock.c: Adjust __nusers.
9075         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
9076         and public interfaces are wrapper with pass additional parameter.
9077         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
9078         parameter zero.
9079         * tst-mutex8.c: New file.
9080         * Makefile (tests): Add tst-mutex8.
9081         * sysdeps/pthread/pthread_cond_timedwait.c: Call
9082         __pthread_mutex_unlock_usercnt.
9083         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
9084         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9085         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9086         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9087         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9088         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
9089         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
9090         Add __nusers.
9091         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9092         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9093         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9094         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
9095         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9097         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
9098         * pthread_mutex_timedlock.c: Likewise.
9099         * pthread_mutex_trylock.c: Adjust __nusers.
9100         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
9101         * tst-mutex9.c: New file.
9102         * Makefile (tests): Add tst-mutex9.
9103         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
9104         * sysdeps/ia64/tls.h: Likewise.
9105         * sysdeps/powerpc/tls.h: Likewise.
9106         * sysdeps/s390/tls.h: Likewise.
9107         * sysdeps/sh/tls.h: Likewise.
9108         * sysdeps/x86_64/tls.h: Likewise.
9109         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
9110         Change type of __owner.
9111         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9112         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9113         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9114         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
9115         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9117 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
9119         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
9120         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
9122         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
9123         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
9124         instead of nr to lll_futex_wake.  Only set errno and return -1
9125         if err < 0.
9127         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
9128         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
9129         return actual return value from the syscall, not 0.
9131 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
9133         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
9134         find a random value.
9135         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
9136         errno==EIDRM.
9138         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
9139         compat_timer_settime.
9140         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
9141         compat_timer_gettime.
9142         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
9143         compat_timer_getoverrun.
9144         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
9145         compat_timer_delete.
9147         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
9148         error-checking mutex detect busy mutexes.
9150 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
9152         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
9153         Add ax to clobber list.
9154         (lll_mutex_cond_lock): Likewise.
9155         (lll_mutex_unlock): Likewise.
9156         (lll_lock): Likewise.
9157         (lll_unlock): Likewise.
9159         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
9160         * tst-cancel18.c: New file.
9161         * tst-cancelx18.c: New file.
9163         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
9164         and tcdrain.
9166         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
9167         * tst-cancel17.c: New file.
9168         * tst-cancelx17.c: New file.
9170         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
9171         * sysdeps/unix/sysv/linux/sigwait.c: New file.
9172         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
9174         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
9176 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
9178         * sysdeps/pthread/createthread.c (create_thread): Set
9179         header.multiple_threads unconditionally.
9180         * allocatestack.c (allocate_stack): Likewise.
9181         * descr.h (struct pthread): Add header.multiple_threads
9182         unconditionally.
9183         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
9184         Define for librt.  #error if neither libpthread, libc nor librt.
9185         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
9186         Likewise.
9187         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
9188         CDISABLE): Likewise.
9189         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
9190         CDISABLE): Likewise.
9191         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
9192         CDISABLE): Likewise.
9193         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
9194         CDISABLE): Likewise.  Access header.multiple_threads outside of
9195         libc and libpthread.
9196         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
9197         Likewise.
9198         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
9199         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
9201 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
9203         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
9204         Also test early cancellation before the thread reaches the cancellation
9205         point.
9207         * Makefile: Compile forward.c with exceptions.
9209         * sysdeps/unix/sysv/linux/sleep.c: New file.
9211 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
9213         * Makefile: Add CFLAGS definition to compile function wrappers
9214         duplicated from libc with exceptions.
9215         * tst-cancel4.c: Also check cancellation handlers.
9217         * Makefile: Add rules to build and run tst-cancel16 and
9218         tst-cancelx16.  Add missing CFLAGS definitions.
9219         * tst-cancel16.c: New file.
9220         * tst-cancelx16.c: New file.
9222 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
9224         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9225         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
9226         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
9227         (DL_SYSINFO_IMPLEMENTATION): Likewise.
9229         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
9230         (LIBC_CANCEL_RESET): Likewise.
9231         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
9232         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
9233         librt-cancellation.
9234         (CFLAGS-libcrt-cancellation.c): Define.
9235         * sysdeps/pthread/librt-cancellation.c: New file.
9236         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
9237         macros also when compiling librt.
9238         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
9239         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
9240         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
9241         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
9242         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
9243         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
9244         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
9246         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
9247         compat_timer_create.
9249 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
9251         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
9253         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
9254         __register_atfork.
9255         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
9256         Add libc_hidden_def.
9258 2003-06-13  Roland McGrath  <roland@redhat.com>
9260         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
9261         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
9263 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
9265         * allocatestack.c (queue_stack): Always inline.
9266         * ptreadhP.h (__do_cancel): Likewise.
9268 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
9270         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
9271         a typo.
9273 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
9275         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9276         (__pthread_cond_signal): Remove incorrect second addition for
9277         cond_lock!=0.
9279 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
9281         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9282         (__pthread_cond_signal): Use correct futex pointer in
9283         __lll_mutex_lock_wait call.
9285         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9286         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
9288 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
9290         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
9291         cancelable.
9292         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
9293         Likewise.
9295         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
9296         hand-written CFI generation code.  Since ENTRY/END also initiated
9297         CFI frames this caused two CFI sets to be generated.
9299 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
9301         * cleanup_routine.c: New file.
9302         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
9303         * sysdeps/pthread/pthread.h: Add support for fully exception-based
9304         cleanup handling.
9305         * Makefile (libpthread-routines): Add cleanup_routine.
9306         Add more CFLAGS variables to compile with exceptions.  Add comments
9307         why which file needs unwind tables.
9308         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
9309         tests.
9310         * tst-cancelx1.c: New file.
9311         * tst-cancelx2.c: New file.
9312         * tst-cancelx3.c: New file.
9313         * tst-cancelx4.c: New file.
9314         * tst-cancelx5.c: New file.
9315         * tst-cancelx6.c: New file.
9316         * tst-cancelx7.c: New file.
9317         * tst-cancelx8.c: New file.
9318         * tst-cancelx9.c: New file.
9319         * tst-cancelx10.c: New file.
9320         * tst-cancelx11.c: New file.
9321         * tst-cancelx12.c: New file.
9322         * tst-cancelx13.c: New file.
9323         * tst-cancelx14.c: New file.
9324         * tst-cancelx15.c: New file.
9325         * tst-cleanupx0.c: New file.
9326         * tst-cleanupx0.expect: New file.
9327         * tst-cleanupx1.c: New file.
9328         * tst-cleanupx2.c: New file.
9329         * tst-cleanupx3.c: New file.
9331         * tst-cleanup0.c: Make standard compliant.
9332         * tst-cleanup1.c: Likewise.
9334         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
9335         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
9336         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
9337         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
9338         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
9339         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
9340         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
9341         CLEANUP_JMP_BUF.
9342         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
9343         * tst-cancel12.c: New file.
9344         * tst-cancel13.c: New file.
9345         * tst-cancel14.c: New file.
9346         * tst-cancel15.c: New file.
9347         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
9348         and tst-cancel15.
9350         * tst-cancel1.c: Add some comments.
9352         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
9353         timeout correctly.
9355 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
9357         * Makefile (CFLAGS-pthread_cancel.c): Define.
9359 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
9361         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
9362         Change type of __writer element to int.
9363         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9364         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9365         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
9366         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9367         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9368         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
9369         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
9370         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
9371         Compare with TID to determine deadlocks.
9372         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
9373         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9374         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
9375         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9376         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
9377         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9378         Likewise.
9379         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9380         Likewise.
9381         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9382         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
9383         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
9384         Likewise.
9385         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
9386         Likewise.
9387         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
9388         * Makefile (tests): Add tst-rwlock12.
9389         * tst-rwlock12.c: New file.
9391 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
9393         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
9394         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
9395         Remove bogus hidden_proto.
9396         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
9397         Likewise.
9398         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
9399         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
9400         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
9401         ___lll_mutex_timedlock): Likewise.
9403 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
9405         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
9406         (__pthread_cond_signal): Add some code to eventually handle
9407         cond_lock!=0.
9409 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
9411         * Makefile (tests): Add tst-exec4.
9412         (tst-exec4-ARGS): Define.
9413         * tst-exec4.c: New file.
9415 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
9417         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
9418         Also fail if tv_nsec < 0.
9419         (__lll_timedwait_tid): Likewise.
9420         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
9421         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
9422         Likewise.
9423         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
9424         Likewise.
9425         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
9426         Likewise.
9427         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
9428         Likewise.
9429         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
9430         Likewise.
9431         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
9432         Likewise.
9434         * Makefile (tests): Add tst-sem8 and tst-sem9.
9435         * tst-sem8.c: New file.
9436         * tst-sem9.c: New file.
9437         * sem_open.c: Fix creation of in_use record if the file exists but
9438         no internal record.
9440         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
9441         definitions.
9443         * sysdeps/pthread/timer_create.c (timer_create): In case
9444         evp==NULL, assign timer ID to sival_ptr.
9446         * descr.h (struct pthread_unwind_buf): Change type of prev element to
9447         struct pthread_unwind_buf *.
9448         (struct pthread): Likewise for cleanup_jmp_buf element.
9450         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
9451         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
9452         * unwind.c (__pthread_unwind_next): Likewise.
9454 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
9456         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9457         (lll_futex_timed_wait): Use int for futex value parameter.
9458         (lll_futex_wake): Likewise.
9459         (lll_futex_requeue): Likewise.
9461         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
9462         Replace one memory operation with one register operation.
9464         * tst-join4.c (do_test): Fix error message.
9466         * tst-rwlock6.c (do_test): Use correct format specifier.
9468         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
9469         (__lll_mutex_lock_wait): Replace one memory operation with one
9470         register operation.
9471         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
9472         (__lll_mutex_lock_wait): Likewise.
9474         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9475         (__lll_mutex_cond_lock): Add one to value parameter of
9476         __lll_lock_wait to reflect reality in the futex syscall.
9477         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
9478         (lll_mutex_cond_lock): Likewise.
9480 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
9482         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
9483         New function.
9484         (lll_mutex_cond_lock): Define.
9486 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
9488         * Makefile (tests): Add tst-signal6.
9489         * tst-signal6.c: New file.
9491         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
9492         (__lll_mutex_unlock_force): New function
9493         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
9495         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
9496         (__lll_mutex_unlock_force): New function.
9497         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
9499         * tst-rwlock7.c (do_test): Use correct format specifier.
9501         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
9502         Find break parameter in correct asm argument.
9504 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
9506         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
9507         Remove out4.
9508         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
9509         error occured.
9510         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
9511         Add __mutex.
9512         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
9513         lll_futex_requeue, lll_mutex_unlock_force): Define.
9515 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
9517         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9518         (pthread_cond_t): Add __mutex.
9519         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
9520         lll_futex_requeue, lll_mutex_unlock_force): Define.
9522 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
9524         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
9525         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
9526         Add __mutex field.
9527         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
9528         Define.
9529         (lll_futex_wait, lll_futex_wake): Define.
9530         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
9531         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
9532         FUTEX_REQUEUE instead of FUTEX_WAIT.
9533         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
9534         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
9535         mutex which was used in condvar structure.  Call
9536         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
9537         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
9539         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
9540         include tcb-offsets.h.  Read wakeup value in locked region.
9541         Use the value of gbr register as THREAD_ID.
9542         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
9543         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
9544         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
9546         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
9547         macros.
9549 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
9551         * sysdeps/pthread/pthread_cond_broadcast.c
9552         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
9554 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
9556         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
9557         typo in register name.
9558         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
9559         correctly.  Actually use requeue.  Little optimization.
9560         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
9561         mutex address early.  Handle cancellation state as 32-bit value.
9562         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9563         Remove unnecessary label.
9565 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
9567         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
9568         instead of FUTEX_WAIT.
9569         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
9570         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9571         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9572         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
9573         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
9574         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
9575         used in condvar structure.  Call __pthread_mutex_cond_lock instead
9576         of __pthread_mutex_lock_internal.
9577         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9578         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9579         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
9580         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
9581         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9582         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9583         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
9584         Add pthread_mutex_cond_lock.
9585         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
9586         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
9587         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
9588         lll_mutex_cond_lock.
9589         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
9590         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9591         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9592         Add __mutex field.
9593         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9594         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9596         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
9597         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
9599         * pthreadP.h: Declare __pthread_mutex_cond_lock.
9600         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
9601         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
9602         macro don't define aliases.
9604         * cancellation.c: Remove __pthread_enable_asynccancel_2.
9605         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
9606         * sysdeps/pthread/pthread_cond_timedwait.c: Use
9607         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
9608         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9609         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9610         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
9611         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9612         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
9614 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
9616         * sem_open.c: Fix one endless loop.  Implement correct semantics
9617         wrt opening the same semaphore more then once.
9618         * sem_close.c: Adjust for sem_open change.
9619         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
9620         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
9621         * Makefile (tests): Add tst-sem7.
9622         * tst-sem7.c: New file.
9624 2003-05-16  Roland McGrath  <roland@redhat.com>
9626         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
9627         uninitialized variable braino.
9629 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
9631         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
9632         test for syscall availability.
9634         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
9635         __no_posix_timers to -1 if the syscalls don't exist.
9637         * pthread_join.c (pthread_join): Set tid field of the joined
9638         thread to -1.  This isn't necessary but helps to recognize some
9639         error conditions with almost no cost.
9641         * allocatestack.c (FREE_P): Also negative values indicate an
9642         unused stack.
9644         * unwind.c: Include <unistd.h>.
9646 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
9648         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
9650 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
9652         * Makefile (crti-objs, crtn-objs): New variables.
9653         (omit-deps, extra-objs): Add crtn.
9654         ($(objpfx)libpthread.so): Depend on both crti and crtn
9655         and links to them in multidir.
9656         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
9658 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
9660         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
9661         (lll_mutex_unlock): Use atomic_exchange_rel.
9663 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
9665         * cond-perf.c (cons): Add missing locking around setting of alldone.
9667 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
9669         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
9670         related macros.
9671         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
9673 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
9675         * tst-sem6.c: New file.
9676         * Makefile (tests): Add tst-sem6.
9678         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
9679         Use atomic_exchange_rel instead of atomic_exchange.
9680         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
9681         Likewise.
9683         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
9684         code for lll_futex_wait and lll_futex_wake in static apps.  Use
9685         vsyscall is possible.
9687         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
9688         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
9689         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
9690         pthread_setaffinity_np.
9691         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
9692         and pthread_setaffinity_np.
9693         * Makefile (libpthread-routines): Add pthread_getaffinity and
9694         pthread_setaffinity.
9696         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
9697         use it in case mmap to allocate the stack fails.
9698         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
9699         ARCH_MAP_FLAGS here.
9700         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
9701         ARCH_RETRY_MMAP.
9703 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
9705         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
9706         handler implementation.  It is now lockless in fork().
9707         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
9708         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
9709         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
9710         declare the __fork_*_lists.
9711         (struct fork_handler): Include pointers to all three functions.
9712         Add next, refcntr and need_signal elements.
9713         (__fork_handlers): New declaration.
9714         (__register_atfork_malloc): Remove declaration.
9715         (HAVE_register_atfork_malloc): Remove definition.
9716         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
9717         __pthread_child_handler variable.
9718         (__libc_pthread_init): Use __register_atfork instead of explicitly
9719         adding to the list.
9720         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
9721         and lll_futex_wake.
9722         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
9724         * unwind.c (unwind_cleanup): Print error message and then abort.  This
9725         function must never be reached.
9727         * cond-perf.c: New file.
9729 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
9731         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
9733 2003-05-04  Roland McGrath  <roland@redhat.com>
9735         * Makefile ($(objpfx)../libc.so): New target.
9737 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
9739         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9740         (pthread_condattr_t): Size is only an int, don't use long for
9741         alignment.
9742         (pthread_mutexattr_t): Likewise.
9743         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
9744         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9745         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
9747 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
9749         * sysdeps/i386/tls.h: Define THREAD_ID.
9750         * sysdeps/ia64/tls.h: Likewise.
9751         * sysdeps/powerpc/tls.h: Likewise.
9752         * sysdeps/s390/tls.h: Likewise.
9753         * sysdeps/sh/tls.h: Likewise.
9754         * sysdeps/x86_64/tls.h: Likewise.
9755         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
9756         record ownership.
9757         * pthread_mutex_timedlock.c: Likewise.
9758         * pthread_mutex_trylock.c: Likewise.
9759         * pthread_mutex_unlock.c: Likewise.
9760         * pthread_rwlock_trywrlock.c: Likewise.
9761         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
9762         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9763         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
9764         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9766         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
9767         flag.
9769 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
9771         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
9772         (__SIZEOF_PTHREAD_COND_T): Define to 48.
9773         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
9774         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
9775         Make __align long long instead of long.
9776         (pthread_rwlock_t): Formatting.
9777         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
9778         (pthread_rwlock_t): Formatting.
9779         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
9780         (pthread_cond_t): Make __align long long instead of long.
9781         (pthread_rwlock_t): Move __flags field to the same position as in
9782         linuxthreads.
9784 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
9786         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
9787         * tst-rwlock7.c (do_test): Likewise.
9789 2003-04-26  Roland McGrath  <roland@redhat.com>
9791         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
9793 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
9795         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
9796         sizeof (struct pthread).
9797         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
9798         1 struct pthread.
9799         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
9800         to 0.
9801         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
9802         struct pthread.
9803         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
9804         to 32-bit bytes.
9805         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
9806         tcbp.
9807         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
9808         unneccessarily.
9809         (NO_TLS_OFFSET): Define.
9810         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
9811         add TLS_TCB_SIZE unnecessarily.
9813 2003-04-22  Roland McGrath  <roland@redhat.com>
9815         * Makeconfig (shared-thread-library): Reverse link order to work
9816         around linker bug.
9818 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
9820         * semaphore.h: Fix typo in comment.
9822 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
9824         * sysdeps/pthread/sigfillset.c: New file.
9826         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
9827         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
9828         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
9829         * sysdeps/pthread/sigaction.c: Likewise.
9830         * sysdeps/pthread/sigprocmask.c: New file.
9831         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
9832         __SIGRTMIN+1.
9833         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
9834         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
9835         in this case.
9837 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
9839         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9840         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
9842         * sysdeps/unix/sysv/linux/unregister-atfork.c
9843         (__unregister_atfork): Don't free memory not allocated dynamically.
9845         * semaphore.h: Remove __THROW marker from cancellation points.
9846         * nptl/sysdeps/pthread/pthread.h: Likewise.
9848 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
9850         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
9851         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
9852         __THROW.
9854 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
9856         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
9858 2003-04-15  Roland McGrath  <roland@redhat.com>
9860         * forward.c (__pthread_unwind): Tweak to avoid warning.
9862 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
9864         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
9866 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
9868         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
9869         overflow CFA advance instructions.
9870         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9872 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
9874         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
9875         * sysdeps/i386/pthread_spin_lock.c: Likewise.
9876         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
9877         defined.
9879         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
9880         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
9881         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
9882         DW_CFA_advance_loc for .Laddl-.Lsubl.
9884 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
9886         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
9887         position-independent unwind data for static libraries.
9888         Add missing unwind info.  Add comments.
9890         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
9891         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
9892         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
9893         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9895 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
9897         * Makefile: Make sure all cancellation points are compiled with
9898         exception and asynchronous unwind tables.
9900         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
9901         which mishandles loading of global object addresses in PIC.
9902         (THREAD_SETMEM_NC): Likewise.
9904 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
9906         * pthread.h: Define new data structure for cleanup buffer.  Declare
9907         new cleanup handler interfaces.
9908         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
9909         (struct pthread): Add cleanup_jmp_buf pointer.  Define
9910         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
9911         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
9912         it.  Declare old cleanup handler installation functions.
9913         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
9914         handling.
9915         * cleanup_defer.c: Likewise.
9916         * cleanup_compat.c: New file.  Old cleanup code.
9917         * cleanup_def_compat.c: New file.  Old cleanup code.
9918         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
9919         if own thread descriptor.
9920         * unwind.c: New file.
9921         * forward.c: Add __pthread_unwind.
9922         * init.c (pthread_functions): Add __pthread_unwind.
9923         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
9924         Add ptr___pthread_unwind.
9925         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
9926         and unwind function.
9927         * Makefile (libpthread-routines): Add cleanup_compat,
9928         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
9929         table generation if necessary.
9930         * version.c: Record whether unwind support is compiled in.
9931         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
9932         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
9933         handler interfaces.
9934         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
9935         complication to generate unwind information for syscall wrappers.
9936         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
9937         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
9938         __cleanup_fct_attribute.
9940         * Makefile: Add rules to build and run tst-cleanup0.
9941         * tst-cleanup0.c: New file.
9942         * tst-cleanup0.expect: New file.
9944         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
9945         caller.  Optimize to avoid often unecessary local variable.
9947 2003-04-11  Roland McGrath  <roland@redhat.com>
9949         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
9950         sets variable `multidir'; include that.
9951         (generated): Add it.
9952         ($(objpfx)$(multidir)/crti.o): New target.
9953         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
9955 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
9957         * tst-attr2.c (do_test): Add cast to avoid warning.
9958         * tst-mutex4.c (do_test): Likewise.
9960 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
9962         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
9963         in child.
9965 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
9967         * Makefile (tests): Add tst-detach1.
9968         * tst-detach1.c: New file.
9970 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
9972         * sysdeps/pthread/pthread.h: Remove duplicate
9973         pthread_cleanup_{push,pop} definitions.
9975         * tst-barrier2.c: Eliminate warnings.
9976         * tst-cancel4.c: Likewise.
9977         * tst-cond4.c: Likewise.
9978         * tst-cond6.c: Likewise.
9979         * tst-detach1.c: Likewise.
9980         * tst-rwlock4.c: Likewise.
9981         * tst-rwlock6.c: Likewise.
9982         * tst-rwlock7.c: Likewise.
9983         * tst-sem3.c: Likewise.
9984         * tst-spin2.c: Likewise.
9985         * tst-umask1.c: Likewise.
9987 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
9989         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
9991 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
9993         * descr.h (struct pthread): Move cancelhandling member to the front.
9995 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
9997         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
9998         malloc_parent, and malloc_child statically.
9999         (__register_atfork_malloc): New function.
10000         (free_mem): Don't free any of the malloc_* variables on the list.
10001         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
10002         Define HAVE_register_atfork_malloc.
10004 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
10006         * sysdeps/pthread/createthread.c (create_thread): Add some more
10007         comments explaining when to set multiple_threads and when not.
10009         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
10010         THREAD_ATOMIC_BIT_SET if not already defined.
10011         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
10012         THREAD_ATOMIC_BIT_SET:
10013         * sysdeps/x86_64/tls.h: Likewise.
10014         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
10015         THREAD_ATOMIC_CMPXCHG_VAL.
10016         (_pthread_cleanup_pop_restore): Likewise.
10017         * cancellation.c (__pthread_enable_asynccancel): Likewise.
10018         (__pthread_enable_asynccancel_2): Likewise.
10019         (__pthread_disable_asynccancel): Likewise.
10020         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
10021         (__libc_disable_asynccancel): Likewise.
10022         * init.c (sigcancel_handler): Likewise.
10023         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
10024         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
10026 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
10028         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
10029         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
10030         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
10031         * Makefile (tests): Add tst-cancel11.
10032         * tst-cancel11.c: New file.
10034 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
10036         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
10037         round, not the first.  Use specific_used flag instead of local
10038         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
10039         (__free_tcb): Don't call deallocate_tsd here.
10040         (start_thread): Call deallocate_tsd here.
10041         * pthread_setspecific.c: Set specific_used flag really only when
10042         needed.
10043         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
10044         * tst-tsd3.c: New file.
10045         * tst-tsd4.c: New file.
10047 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
10049         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
10050         Use atomic_exchange_and_add instead of __lll_add.
10051         (__lll_mutex_timedlock): Likewise.
10052         Patch by Ian Wienand.
10054 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
10056         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
10057         (SINGLE_THREAD_P): Fix typo.
10058         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
10060 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
10062         * Makefile (tests): Add tst-align.
10063         * tst-align.c: New file.
10064         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
10066         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
10067         function correctly.
10069         * tst-tsd2.c: Add casts to avoid warnings.
10071 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
10073         * descr.h (struct pthread): Move most often used elements to the front.
10075 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
10077         * Makefile (libpthread-routines): Add pthread_atfork.
10078         (libpthread-static-only-routines): Add pthread_atfork.
10080 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
10082         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
10083         of TLS_DTV_AT_TP.
10084         (INSTALL_DTV): Add parens.
10085         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
10086         Use passed descr instead of THREAD_SELF.
10087         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
10088         (__lll_mutex_timedlock_wait): Correct expected value after
10089         spurious wakeup.
10090         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
10091         Release lock before waking up the waiters.
10092         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
10093         criteria.  Reorderstruct passed to cleanup handler.  Fix
10094         handling of cancellation and failung pthread_mutex_unlock call.
10095         Use __pthread_enable_asynccancel_2 instead of
10096         __pthread_enable_asynccancel.
10097         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
10098         Return result of lock re-get if it fails.
10099         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
10100         for __pthread_cleanup_push.
10101         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
10102         completely broken rwlock implementation.
10103         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
10104         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
10105         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
10106         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
10107         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
10108         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
10109         versioned_symbol macro.
10110         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
10111         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
10113 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
10115         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
10116         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
10117         and __helper_tid.
10118         (struct timer): Remove th and bar field.
10119         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
10120         debugging code.  Create only one helper thread.
10121         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
10122         helper thread.
10123         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
10124         Renamed.  Define statically.  Use thread info from siginfo.
10125         (__helper_once): New variable.
10126         (__helper_tid): New variable.
10127         (__reset_helper_control): New function.
10128         (__start_helper_thread): New function.
10130         * pthread_create.c (start_thread): Don't use setjmp inside
10131         __builtin_expect to work around gcc bug.
10133         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
10134         timer_delete syscall fails, but not with ENOSYS, set
10135         __no_posix_timers.
10137         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
10138         (timer_settime): Fix typo.
10139         * sysdeps/unix/sysv/linux/timer_getoverr.c
10140         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
10142 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
10144         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
10145         offset of cleanupbuf.__prev.
10147 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
10149         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
10150         of included file.
10152 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
10154         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
10155         NULL provide default definition to syscall.
10157 2003-03-25  Roland McGrath  <roland@redhat.com>
10159         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
10160         (timer_id2ptr): Fix typo.
10162 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
10164         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
10165         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
10166         * sysdeps/ia64/pthreaddef.h: Likewise.
10167         * sysdeps/powerpc/pthreaddef.h: Likewise.
10168         * sysdeps/s390/pthreaddef.h: Likewise.
10169         * sysdeps/sh/pthreaddef.h: Likewise.
10170         * sysdeps/x86_64/pthreaddef.h: Likewise.
10171         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
10172         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
10173         being changed.
10174         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
10175         SIGTIMER is not unblocked.
10176         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
10177         RT signal taken.
10178         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
10179         be send.
10180         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
10181         pass pointer through as ID.
10182         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
10183         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
10184         * sysdeps/unix/sysv/linux/timer_create.c: New file.
10185         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
10186         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
10187         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
10188         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
10189         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
10190         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
10191         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
10192         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
10193         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
10194         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
10195         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
10196         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
10197         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
10198         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
10199         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
10200         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
10201         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
10202         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
10203         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
10204         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
10205         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
10206         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
10207         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
10208         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
10209         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
10210         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
10211         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
10212         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
10213         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
10214         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
10216         * pthreadP.h: Remove FRAME_LEFT definition.
10217         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
10218         already left frame.  Programs which have this problem are not POSIX
10219         compliant.
10220         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
10222 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
10224         * sysdeps/pthread/tst-timer.c: Check return values of the
10225         functions we test.
10227 2003-03-23  Roland McGrath  <roland@redhat.com>
10229         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
10230         * tst-tls3mod.c: Likewise.
10231         * tst-tls1.c: Likewise.
10232         * tst-tls2.c: Likewise.
10234         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
10235         undefined behavior.
10237         * tst-join5.c (tf1, tf2): Add a cast.
10239         * Makeconfig (includes): Append -I$(..)nptl to this variable.
10241         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
10242         Don't test anything.
10243         * tst-cond4.c: Likewise.
10244         * tst-cond6.c: Likewise.
10245         * tst-flock2.c: Likewise.
10246         * tst-mutex4.c: Likewise.
10247         * tst-rwlock4.c: Likewise.
10248         * tst-signal1.c: Likewise.
10249         * tst-spin2.c: Likewise.
10250         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
10252         * tst-mutex4.c: Use test-skeleton.c.
10253         * tst-spin2.c: Likewise.
10254         * tst-sysconf.c: Likewise.
10255         * tst-barrier2.c: Likewise.
10256         * tst-cond4.c: Likewise.
10257         * tst-cond6.c: Likewise.
10258         * tst-rwlock4.c: Likewise.
10259         * tst-unload.c: Likewise.
10260         * tst-flock2.c (do_test): Use return instead of exit.
10262 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
10264         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
10266 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
10268         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
10269         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
10270         instead of __lll_compare_and_swap.
10271         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
10272         Likewise.
10273         Removed definition if __lll_compare_and_swap.
10275         * cancellation.c: Adjust for new form of compare&exchange macros.
10276         * cleanup_defer.c: Likewise.
10277         * init.c: Likewise.
10278         * libc-cancellation.c: Likewise.
10279         * old_pthread_cond_broadcast.c: Likewise.
10280         * old_pthread_cond_signal.c: Likewise.
10281         * old_pthread_cond_timedwait.c: Likewise.
10282         * old_pthread_cond_wait.c: Likewise.
10283         * pthread_cancel.c: Likewise.
10284         * pthread_create.c: Likewise.
10285         * pthread_detach.c: Likewise.
10286         * pthread_join.c: Likewise.
10287         * pthread_key_delete.c: Likewise.
10288         * pthread_setcancelstate.c: Likewise.
10289         * pthread_setcanceltype.c: Likewise.
10290         * pthread_timedjoin.c: Likewise.
10291         * pthread_tryjoin.c: Likewise.
10292         * sysdeps/pthread/createthread.c: Likewise.
10294 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
10296         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
10297         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
10298         definitions.  Replace uses with calls to atomic_* functions.
10299         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
10300         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
10301         __lll_test_and_set calls with atomic_exchange_and_add and
10302         atomic_exchange calls respectively.
10303         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
10304         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
10305         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
10306         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
10307         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
10308         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
10309         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
10311         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
10312         returns the old value.
10314 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
10316         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
10317         int for variable OLDVAL and correct inline assembler contraint.
10318         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
10319         type int for variable OLD.
10321         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
10322         only for s390-32.
10323         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
10324         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
10325         instead of multiple_threads field in the TCB.
10327 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
10329         * sysdeps/i386/i686/bits/atomic.h: Removed.
10330         * sysdeps/i386/i586/bits/atomic.h: Removed.
10331         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
10332         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
10333         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
10334         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
10335         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
10336         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
10337         * atomic.h: Removed.  Moved to glibc.
10339         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
10340         support for clock selection.
10342         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
10343         signalling waiters.
10345 2003-03-18  Roland McGrath  <roland@redhat.com>
10347         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
10348         Add __lll_rel_instr first.  Add memory clobber.
10349         (lll_mutex_unlock): Use __lll_test_and_set.
10350         From Paul Mackerras <paulus@samba.org>.
10352         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
10353         unconditionally.
10354         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
10355         (SINGLE_THREAD_P):  Add `header.' prefix.
10356         From Paul Mackerras <paulus@samba.org>.
10358         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
10359         pthread_timedjoin_np to ...
10360         (libpthread: GLIBC_2.3.3): ... here.
10361         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
10363         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
10364         Avoid shadowing VAL variable.
10366         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
10367         New macro.
10369 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
10371         * Makefile (tests): Add tst-cond11.
10372         * tst-cond11.c: New file.
10374         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
10375         struct passed to cleanup handler to eliminate one more
10376         instruction.
10377         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10379         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
10380         (pthrad_cond_t): Replace __unused field with __clock.
10382         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
10383         waken all waiters in cleanup handler.
10384         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
10385         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10387         * pthread_condattr_getclock.c: New file.
10388         * pthread_condattr_setclock.c: New file.
10389         * sysdeps/pthread/pthread.h: Declare these new functions.
10390         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
10391         * Makefile (libpthread-routines): Add the new functions.
10392         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
10393         Renamed field to value.  Document use of the bits.
10394         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
10395         change.
10396         * pthread_condattr_setpshared.c: Likewise.
10397         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
10398         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
10399         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
10400         Add __clock field.
10401         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
10402         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
10403         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
10404         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
10405         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
10406         Implement clock selection.
10407         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
10408         * pthread-errnos.sym: Add ENOSYS.
10409         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
10410         _POSIX_CLOCK_SELECTION.
10411         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
10413         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
10414         invalid .size directive.
10416 2003-03-17  Roland McGrath  <roland@redhat.com>
10418         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
10419         Formatting tweaks.
10421 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
10423         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
10424         Use __lll_add instead of spelling it out.  Use protected symbol names.
10425         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
10426         Use __lll_add.
10427         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
10428         Renamed from lll_compare_and_swap.  Use new name where necessary.
10429         (__lll_add): Defined.
10430         (__lll_dec_if_positive): Defined.
10431         (__lll_test_and_set): Defined.
10432         * sysdeps/ia64/pthread_spin_init.c: Removed.
10433         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
10434         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
10435         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
10436         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
10437         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
10438         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
10439         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
10440         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
10441         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
10442         __sync_lock_release_si.
10443         Patch by Jakub Jelinek.
10445         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
10446         Fix timeout handling.
10447         (__lll_timedwait_tid): Likewise.
10448         (lll_unlock_wake_cb): Wake up other waiters if necessary.
10449         Patch by Jakub Jelinek.
10451         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
10453 2003-03-17  Roland McGrath  <roland@redhat.com>
10455         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
10456         * sysdeps/pthread/pthread_spin_init.c: New file.
10457         * sysdeps/pthread/pthread_spin_unlock.c: New file.
10458         * sysdeps/powerpc/Makefile: New file.
10459         * sysdeps/powerpc/pthread_spin_lock.c: New file.
10460         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
10461         * sysdeps/powerpc/pthreaddef.h: New file.
10462         * sysdeps/powerpc/tcb-offsets.sym: New file.
10463         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
10464         * sysdeps/powerpc/tls.h: New file.
10465         * sysdeps/powerpc/bits/atomic.h: New file.
10466         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
10467         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
10468         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
10470         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
10471         * sysdeps/unix/sysv/linux/sem_post.c: New file.
10472         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
10473         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
10474         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
10475         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
10476         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
10477         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
10478         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
10479         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
10480         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
10481         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
10482         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
10483         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
10484         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
10486         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
10487         not gettimeofday.
10488         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
10489         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
10490         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
10491         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
10492         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10494 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
10496         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
10497         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
10498         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10499         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
10500         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
10502 2003-03-16  Roland McGrath  <roland@redhat.com>
10504         * tst-fork4.c: Include <string.h>.
10505         * tst-signal2.c: Likewise.
10506         * tst-mutex5.c (do_test): exit -> return.
10507         * tst-mutex2.c: Include <stdlib.h>.
10509 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
10511         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
10512         (__lll_mutex_timedlock_wait): Correct expected value after
10513         spurious wakeup.  Otherwise we would never wait again.
10515         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
10516         zone versus inline asm stupidity.  Use correct instructions.
10518         * tst-rwlock6.c: Add some more status output.
10520 2003-03-15  Roland McGrath  <roland@redhat.com>
10522         * sysdeps/pthread/configure.in: New file.
10523         * sysdeps/pthread/configure: New file (generated).
10525 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
10527         * allocatestack.c (allocate_stack): Store the exact stack size of
10528         user allocated stacks.
10530 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
10532         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
10533         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
10534         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
10535         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
10536         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
10537         Use `header.' prefix.
10538         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
10540 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
10542         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
10543         __builtin_frame_address, use stack pointer.
10545         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
10546         instead of __builtin_frame_pointer.
10548 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
10550         * tst-basic1.c (do_test): Add cast to avoid warning.
10551         * tst-basic2.c (do_test): Likewise.
10553         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
10554         amount of stack correction.
10556         * tst-fork4.c: Use test-skeleton.c.
10558 2003-03-14  Roland McGrath  <roland@redhat.com>
10560         * init.c: Fix typo "#eli" for "#else".
10562 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
10564         * allocatestack.c (__stack_user): Use hidden_data_def.
10565         * pthread_create.c (__pthread_keys): Likewise.
10567         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
10569 2003-03-14  Roland McGrath  <roland@redhat.com>
10571         * tst-fork4.c: New file.
10572         * Makefile (tests): Add it.
10574         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
10575         we always define the padding space.
10576         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
10577         stopped supporting its own extensions fully.
10578         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
10579         struct also called `header', so `header.multiple_threads' is the field
10580         name to use on all machines.
10581         * allocatestack.c (allocate_stack): Use `header.' prefix.
10582         * sysdeps/pthread/createthread.c (create_thread): Likewise.
10583         * pthread_create.c (__pthread_create_2_1): Likewise.
10584         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
10585         (THREAD_SELF): Likewise.
10586         * sysdeps/x86_64/tls.h: Likewise.
10587         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
10588         (SINGLE_THREAD_P): Likewise.
10589         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
10590         (SINGLE_THREAD_P): Likewise.
10591         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
10592         (SINGLE_THREAD_P): Likewise.
10594         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
10595         value directly.
10597 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
10599         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
10600         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
10602         * pthread_create.c (start_thread): setjmp is expected to return 0.
10604         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
10605         (THREAD_GETMEM_NC): Likewise.
10607 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
10609         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
10610         and the size of the stack which must be allocated is a multiple,
10611         allocate one more page.
10612         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
10613         MULTI_PAGE_ALIASING.
10615 2003-03-13  Roland McGrath  <roland@redhat.com>
10617         * pthread_create.c (start_thread): Set EXITING_BIT after the
10618         event-reporting (and destructors), not before.
10620 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
10622         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
10623         lll_futex_wake): Declare register variables as long int instead of
10624         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
10625         Make syscall arguments clobbered by the syscall.
10626         (lll_futex_wait): Define using lll_futex_timed_wait.
10628         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
10629         to void *.
10631         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
10632         PPID if [! NDEBUG].
10634         * allocatestack.c (nptl_ncreated): Only declare if
10635         COLORING_INCREMENT != 0.
10637         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
10638         (__libc_enable_asynccancel_2): Remove prototype.
10640         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
10641         ctid to match kernel.
10643 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
10645         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
10646         libc_multiple_threads.
10647         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
10648         __libc_multiple_threads to...
10649         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
10651         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
10652         versioning.
10653         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10654         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10656         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
10657         (__pthread_once_internal): Define.
10659         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
10660         macros instead of .symver directly.
10661         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
10662         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
10664         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
10665         * sysdeps/x86_64/tcb-offsets.sym: New file.
10666         * sysdeps/x86_64/Makefile: New file.
10668         * sysdeps/i386/tcb-offsets.sym: Add SELF.
10669         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
10670         to access own pthread_t in TCB.
10671         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10672         Likewise.
10673         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10674         Likewise.
10675         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10677 2003-03-12  Roland McGrath  <roland@redhat.com>
10679         * pthread-errnos.sym: New file.
10680         * Makefile (gen-as-const-headers): New variable, list that file.
10681         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
10682         header <pthread-errnos.h> instead of defining errno values here.
10683         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
10684         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
10685         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
10686         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
10687         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
10688         Likewise.
10689         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
10690         Likewise.
10691         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
10692         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
10693         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
10694         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
10695         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10696         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10697         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
10698         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
10699         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
10700         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
10701         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
10702         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
10703         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
10704         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
10705         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
10706         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
10707         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
10708         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
10709         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
10710         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
10711         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
10712         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
10713         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
10714         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
10715         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
10716         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
10717         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
10719         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
10720         CLONE_CHILD_SETTID worked.
10722 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
10724         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
10725         file.
10726         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
10727         file.
10729         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
10730         (pthread_cond_t): Add padding.
10732         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
10733         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
10734         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
10736         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
10737         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
10738         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
10739         (__pthread_rwlock_timedrdlock): Likewise.
10740         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
10741         (__pthread_rwlock_wrlock): Likewise.
10742         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
10743         (__pthread_rwlock_rdlock): Likewise.
10745         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
10747         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
10748         result of lock re-get if it fails.
10750 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
10752         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
10753         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
10754         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
10755         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
10756         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
10757         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
10758         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
10759         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
10760         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
10761         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
10763         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
10764         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
10766         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
10767         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
10768         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
10769         (create_thread): Likewise.
10770         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
10771         * init.c (__pthread_initialize_minimal_internal): Initialize
10772         __libc_multiple_threads_ptr if necessary.
10773         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
10774         __pthread_multiple_threads and __libc_multiple_threads_ptr.
10775         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
10776         __libc_multiple_threads.
10777         (__libc_pthread_init): Return pointer to __libc_pthread_init if
10778         necessary.
10780         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
10781         (THREAD_SETMEM_NC): Likewise.
10783         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
10784         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
10785         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
10786         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
10788         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
10789         Eliminate one entire instruction.
10791         * cancellation.c (__pthread_enable_asynccancel_2): New function.
10792         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
10793         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
10794         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
10795         instead of __pthread_enable_asynccancel.
10796         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10797         (__pthread_cond_wait): Likewise.
10798         * sysdeps/pthread/pthread_cond_timedwait.c
10799         (__pthread_cond_timedwait): Likewise.
10800         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
10802         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
10803         (__condvar_cleanup): Wake up all waiters in case we got signaled
10804         after being woken up but before disabling asynchronous
10805         cancellation.
10806         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
10807         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
10808         (__condvar_cleanup): Likewise.
10810         * init.c (__NR_set_tid_address): If already defined, don't redefine.
10811         Make it an error if architecture has no #if case.  Add x86-64.
10813         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
10814         pt-initfini.s generation.
10816         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
10817         (TLS_INIT_TP): Fix typo.
10819 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
10821         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
10822         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
10824         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
10825         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
10826         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
10827         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
10828         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
10829         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10830         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10831         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10833 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
10835         * sysdeps/pthread/pthread_cond_timedwait.c
10836         (__pthread_cond_timedwait): Return the result of the final
10837         locking.  If it succeeds, the regular function return value.
10839         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
10840         Return result of the final locking.
10841         * version.c (__nptl_main): Work around problems with the strange
10842         INTERNAL_SYSCALL macro on ppc32.
10843         * init.c (__pthread_initialize_minimal_internal): Unblock
10844         SIGCANCEL in case the parent blocked it.
10845         Reported by Paul Mackerras <paulus@samba.org>.
10847         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
10848         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
10849         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
10851 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
10853         * sysdeps/pthread/pthread_cond_timedwait.c
10854         (__pthread_cond_timedwait): Unlock and fail if
10855         __pthread_mutex_unlock_internal failed.
10857         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
10858         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
10859         Use ARCH_CLONE.
10860         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
10861         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
10862         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
10863         ALLOCATE_STACK): New macros.
10864         (TLS_TPADJ): New macro.
10865         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
10866         (allocate_stack): Handle TLS_DTV_AT_TP and
10867         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
10868         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
10869         Don't set PD->self.
10870         * init.c [__ia64__] (__NR_set_tid_address): Define.
10872         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
10873         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
10874         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
10875         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
10876         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
10877         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
10878         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
10879         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
10880         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
10881         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
10882         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
10883         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
10884         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
10885         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
10886         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
10887         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
10888         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
10889         * sysdeps/ia64/bits/atomic.h: New file.
10890         * sysdeps/ia64/Makefile: New file.
10891         * sysdeps/ia64/pthread_spin_init.c: New file.
10892         * sysdeps/ia64/pthread_spin_lock.c: New file.
10893         * sysdeps/ia64/pthread_spin_trylock.c: New file.
10894         * sysdeps/ia64/pthread_spin_unlock.c: New file.
10895         * sysdeps/ia64/pthreaddef.h: New file.
10896         * sysdeps/ia64/tcb-offsets.sym: New file.
10897         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
10898         * sysdeps/ia64/tls.h: New file.
10900         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
10901         to syscall instead of no arguments.
10903 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
10905         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
10906         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
10907         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
10908         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
10910         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
10911         unused code.
10913         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
10915         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10916         lowlevelbarrier.sym.
10917         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
10918         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
10919         Include lowlevelbarrier.h and don't define offsets locally.
10920         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
10922         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
10923         (__lll_mutex_lock_wait): Reverse order of first two parameters.
10924         (__lll_mutex_timedlock_wait): Likewise.
10925         (lll_mutex_lock): Adjust asm for that.
10926         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
10927         (lll_lock): Adjust asm for operand order change.
10928         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
10929         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
10931         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
10932         Reverse order of parameters.
10933         (__lll_timedwait_tid): Remove regparms attribute.
10934         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
10935         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
10937         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
10938         (__lll_timedwait_tid): Remove one unnecessary instruction.
10940         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
10941         __lll_mutex_timedlock_wait only for NOT_IN_libc.
10942         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
10943         lowlevelmutex.S.
10945         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
10946         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
10947         for NOT_IN_libc.
10948         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
10949         lowlevellock.S.
10951         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
10952         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
10953         for libc.so.
10954         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
10955         define LOCK here (if UP is not defined).  The actual code is in
10956         lowlevelmutex.S.
10958         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
10959         LOCK is already defined.  Don't define lll_unlock_wake_cb and
10960         __lll_timedwait_tid for libc.so.
10961         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
10962         define LOCK here (if UP is not defined).  The actual code is in
10963         lowlevellock.S.
10965         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
10966         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
10967         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
10968         instead of lowlevelsem.h.
10969         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
10970         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
10971         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
10973         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
10974         lowlevelrwlock.sym.
10975         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
10976         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
10977         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
10979         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
10980         register loading.
10981         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
10982         last changed.  D'oh.
10984         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
10986         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
10987         of __libc_locking_needed.
10988         (lll_trylock): Initialize %eax to zero.
10990         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
10991         pthread_cond_t definition.
10993 2003-03-10  Roland McGrath  <roland@redhat.com>
10995         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
10996         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
10997         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
10998         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
10999         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
11001         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
11002         Instead of setting PD->multiple_threads, set globals
11003         __pthread_multiple_threads and __libc_multiple_threads.
11004         * sysdeps/pthread/createthread.c (create_thread): Likewise.
11005         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
11006         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
11008         * descr.h (struct pthread): Conditionalize first member on
11009         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
11010         containing an anonymous tcbhead_t.  Move `list' member out.
11011         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
11012         * allocatestack.c: Remove use of `header.data.' prefix.
11013         * pthread_create.c: Likewise.
11014         * init.c (__pthread_initialize_minimal_internal): Likewise.
11015         * sysdeps/pthread/createthread.c (create_thread): Likewise.
11016         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
11017         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
11018         * sysdeps/x86_64/tls.h: Likewise.
11019         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
11020         (SINGLE_THREAD_P): Likewise.
11021         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
11022         (SINGLE_THREAD_P): Likewise.
11023         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
11024         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
11026 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
11028         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
11030         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
11031         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
11033         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
11034         leftovers from the ia32 code.
11036         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
11037         memory load.
11038         (clear_once_control): Don't load %esi.
11040         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
11041         handling.
11043         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
11045         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
11046         * sysdeps/unix/sysv/linux/createthread.c: ...here.
11048         * Makefile (tests): Add tst-cond10.
11049         * tst-cond10.c: New file.
11051 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
11053         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
11054         * tst-signal3.c (do_test): Likewise.
11055         * tst-sem5.c (do_test): Likewise.
11056         * tst-kill6.c (do_test): Likewise.
11057         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
11059         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
11060         of inc/dec.
11061         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
11062         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
11063         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
11064         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
11065         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
11066         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
11067         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11068         Likewise.
11069         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11070         Likewise.
11071         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
11072         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
11073         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
11074         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
11075         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
11076         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
11077         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
11078         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
11080         * allocatestack.c (allocate_stack): If mprotect() fails free the
11081         TLS memory.
11083 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
11085         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
11087         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
11088         lll_wake_tid.  This was used only to work around kernel limits in
11089         the early days.
11090         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
11091         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
11092         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
11093         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
11095         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
11096         (__pthread_initialize_minimal_internal): Change initialization of
11097         __static_tls_align_m1 appropriately.
11098         * pthreadP.h (__static_tls_align_m1): Renamed from
11099         __static_tls_align.
11100         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
11101         instead of __static_tls_align-1.
11103 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
11105         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
11107         * pthread_create.c: Define __pthread_keys using nocommon
11108         attribute, not by placing it explicitly in bss.
11109         Remove DEFINE_DEALLOC definition.  Not needed anymore.
11111         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
11112         Use it in mmap call to allocate stacks.
11114         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
11116         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
11117         result of the thread function.
11119 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
11121         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
11122         version is just fine.
11124         * sysdeps/unix/sysv/linux/libc_pthread_init.c
11125         (__pthread_child_handler): Renamed from pthread_child_handler,
11126         exported, and marked hidden.  Change all users.
11127         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
11128         free __pthread_child_handler from child list.
11130 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
11132         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
11134         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
11135         Fix handling of cancellation and failing pthread_mutex_unlock call.
11136         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
11137         (__pthread_cond_wait): Likewise.
11139         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
11140         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
11141         lll_futex_timed_wait call.
11142         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
11143         (pthread_rwlock_timedwrlock): Likewise.
11145         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
11146         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
11147         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
11149         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
11150         check of lll_futex_wake return value.
11152 2003-03-03  Roland McGrath  <roland@redhat.com>
11154         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
11156         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
11157         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
11158         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
11160 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
11162         * sysdeps/pthread/timer_create.c (timer_create): Return correct
11163         error for CPU clocks.
11165         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
11166         _POSIX_MONOTONIC_CLOCK.
11167         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
11169         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
11170         recent kernels.
11172 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
11174         * descr.h (struct pthread): Move cleanup field to the front.
11176 2003-03-01  Roland McGrath  <roland@redhat.com>
11178         * sem_open.c (sem_open): Braino fix.
11180 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
11182         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
11183         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
11184         __pthread_cleanup_pop functionality.
11185         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
11187         * descr.h (struct pthread): Move tid field to the front now that
11188         it is often used.
11190         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
11191         (__lll_mutex_timedlock_wait): Remove.
11192         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
11193         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
11194         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
11195         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
11196         (lll_unlock_wake_cb): Don't save and restore %esi.
11197         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
11198         %esi.
11199         (__lll_timedwait_tid): Add alignment.
11200         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
11201         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
11202         %esi.
11203         (__lll_timedwait_tid): Removed.
11204         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
11205         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
11206         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
11207         (pthread_barrier_wait): Don't save, load, and restore %esi for
11208         last thread.
11209         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
11210         (__pthread_cond_signal): Don't save, load, and restore %esi.
11211         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
11212         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
11213         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
11214         Don't save, load, and restore %esi.
11216 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
11218         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
11219         Release lock before waking up the waiters.
11221         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
11223         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
11224         (reader_thread): Likewise.
11226         * sysdeps/pthread/pthread_rwlock_unlock.c
11227         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
11228         to wake up readers if there are none.
11230         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
11231         Release internal lock before wake threads.
11233 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
11235         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
11236         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
11237         predefined.
11238         * tst-rwlock9.c: Likewise.
11239         * tst-rwlock10.c: New file.
11240         * tst-rwlock11.c: New file.
11242         * Makefile (tests): Add tst-dlsym1.
11243         * tst-dlsym1.c: New file.
11245         * init.c (__pthread_initialize_minimal_internal): Set
11246         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
11247         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
11249 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
11251         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
11253         * tst-cond2.c: Fix sychronization with child.
11255         * tst-rwlock8.c (reader_thread): Remove unused variable.
11257         * Makefile: Add rules to build and run tst-tls3.
11258         * tst-tls3.c: New file.
11259         * tst-tls3mod.c: New file.
11261         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
11262         * tst-rwlock8.c: New file.
11263         * tst-rwlock9.c: New file.
11264         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
11265         complete broken rwlock implementation.
11266         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11267         Likewise.
11268         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11269         Likewise.
11270         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
11271         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
11272         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
11273         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
11274         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
11275         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
11276         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
11278 2003-02-23  Roland McGrath  <roland@redhat.com>
11280         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
11282 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
11284         * Makefile (tests): Add tst-context1.
11285         * tst-context1.c: New file.
11287         * Makefile (tests): Add tst-tls1 and tst-tls2.
11288         * tst-tls1.c: New file.
11289         * tst-tls2.c: New file.
11291         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
11292         for failed cmpxchg.
11294         * pthread_create.c (start_thread): Set EXITING_BIT early.
11296         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
11297         (THREAD_GETMEM_NC): Likewise.
11299 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
11301         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
11302         off 3 more bytes by using offset-less instructions when possible.
11304         * Makefile: Add dependency for $(objpfx)version.d.
11306         * eintr.c (eintr_source): Add unnecessary return but the compiler
11307         insists.
11309         * tst-kill3.c: Include <unistd.h>.
11311 2003-02-21  Roland McGrath  <roland@redhat.com>
11313         * pthread_create.c (start_thread): Call __libc_thread_freeres.
11315 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
11317         * Makefile (tests): Add tst-eintr1.
11318         (distribute): Add eintr.c.
11319         * tst-eintr1.c: New file.
11320         * eintr.c: New file.
11322         * pthread_cancel.c (pthread_cancel): Use tkill directly.
11324         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
11325         Disallow sending SIGCANCEL.
11327         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
11328         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
11329         * tst-kill1.c: New file.
11330         * tst-kill2.c: New file.
11331         * tst-kill3.c: New file.
11332         * tst-kill5.c: New file.
11333         * tst-kill6.c: New file.
11334         * tst-basic7.c: Renamed to...
11335         * tst-kill4.c: ...this.
11337 2003-02-21  Roland McGrath  <roland@redhat.com>
11339         * Makefile (install-lib-ldscripts): New variable.
11341 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
11343         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
11344         * pthread_cancel.c: Use INVALID_TD_P.
11345         * pthread_detach.c: Likewise.
11346         * pthread_getschedparam.c: Likewise.
11347         * pthread_setschedparam.c: Likewise.
11348         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
11349         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
11350         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
11351         * pthread_timedjoin.c: Likewise.
11353         * tst-basic7.c: Include <signal.h>.
11355         * pthread_join.c (pthread_join): Limited checking for invalid
11356         descriptors.
11357         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
11359 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
11361         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
11362         beginning of the loop.  Clear the entire first block of TSD.
11363         * Makefile (tests): Add tst-key4.
11364         * tst-key4.c: New file.
11366 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
11368         * Makefile (tests): Add tst-basic7.
11369         * tst-basic7.c: New file.
11371         * pthread_create.c (deallocate_tsd): Mark as internal_function.
11372         Add some more __builtin_expect.
11374         * pthreadP.h: Define dummy version of DEBUGGING_P.
11376 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
11378         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
11379         _POSIX_THREAD_PRIORITY_SCHEDULING.
11380         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
11381         _XOPEN_REALTIME_THREADS.
11382         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
11384         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
11385         kernel returns EINVAL for PID <= 0, work around it.
11387         * Makefile (tests): Add tst-signal5.
11388         * tst-signal5.c: New file.
11390         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
11391         and LOGIN_NAME_MAX.
11393         * tst-cancel1.c (tf): Block all signals.
11395         * Makefile (tests): Add tst-basic6.
11396         * tst-basic6.c: New file.
11398         * tst-basic1.c: Add test for process ID.
11400         * Makefile (tests): Add tst-cancel10.
11401         * tst-cancel10.c: New file.
11403         * Makefile (tests): Add tst-signal4.
11404         * tst-signal4.c: New file.
11406         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
11407         __sigismember instead of sigismember.  Add __builtin_expect.
11409 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
11411         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
11412         pthread_setcancelstate, and pthread_rwlock_setpshared.
11414         * tst-cancel7.c (do_test): Make sure the pid file exists before
11415         canceling the thread.
11417         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
11418         pthread_rwlock_timedrdlock tests.
11419         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
11420         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11421         Check for invalid tv_nsec field.
11422         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11423         Likewise.
11425         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
11426         recursive mutex of overflow.
11428         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
11430         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
11431         going into an endless loop.
11432         * Makefile (tests): Add tst-cancel9.
11433         * tst-cancel9.c: New file.
11435         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
11437 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
11439         * tst-mutex5.c (do_test): Add more timedlock tests.
11441         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
11442         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
11444         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
11445         use INLINE_SYSCALL.  Error number is returned, not -1.
11447         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
11448         and __deallocate_stack with internal_function.
11449         * pthread_create.c: Adjust definitions appropriately.
11450         * allocatestack.c: Likewise.
11452         * pthread_join.c: Add one more __builtin_expect.
11453         * pthread_timedjoin.c: Likewise.
11455         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
11456         not data of sequence number does not match.
11457         Add one __builtin_expect.
11459         * Makefile (tests): Add tst-clock1.
11460         * tst-clock1.c: New file.
11462         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
11463         negative arguments.
11464         * Makefile (tests): Add tst-basic5.
11465         * tst-basic5.c: New file.
11467 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
11469         * Makefile (tests): Add tst-basic4.
11470         * tst-basic4.c: New file.
11472         * pthreadP.h: Add declaraction for __nptl_nthreads.
11473         * pthread_create.c: Define __nptl_nthreads
11474         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
11475         after thread is done.  If then zero, call exit(0).
11476         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
11477         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
11478         * init.c (pthread_functions): Initialize ptr_nthreads.
11479         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
11480         (__reclaim_stacks): Decrement __nptl_nthreads.
11481         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
11482         Define.
11483         * Makefile (tests): Add tst-basic3.
11484         * tst-basic3.c: New file.
11486         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
11487         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
11488         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
11489         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
11490         if asynchronous canceling is enabled.
11491         * pthread_join.c (pthread_join): When recognizing circular joins,
11492         take into account the other thread might be already canceled.
11493         * Makefile (tests): Add tst-join5.
11494         * tst-join5.c: New file.
11496         * Makefile (tests): Add tst-join4.
11497         * tst-join4.c: New file.
11499 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
11501         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
11503 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
11505         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
11506         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
11507         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
11508         warning.
11509         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
11510         to avoid warning.
11511         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
11512         error if lll_futex_wake failed.
11514 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
11516         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
11517         handling of cancellation and failung pthread_mutex_unlock call.
11518         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
11519         * Makefile (tests): Add tst-cond8 and tst-cond9.
11520         * tst-cond8.c: New file.
11521         * tst-cond9.c: New file.
11523         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
11525         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
11526         non-standard initializers with __USE_GNU.
11528         * Makefile (tests): Add tst-cleanup3.
11529         * tst-cleanup3.c: New file.
11531 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
11533         * Makefile (tests): Add tst-attr1 and tst-attr2.
11534         * tst-attr1.c: New file.
11535         * tst-attr2.c: New file.
11537         * Makefile: Add rules to build and run tst-atfork2 test.
11538         * tst-atfork2.c: New file.
11539         * tst-atfork2mod.c: New file.
11541         * sysdeps/unix/sysv/linux/unregister-atfork.c
11542         (__unregister_atfork): Free the memory allocated for the handlers
11543         after removing them from the lists.
11545         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
11546         cleanup function.
11548         * tst-atfork1.c (do_test): Wait for the child we forked.
11549         Report error in child.
11551         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
11553         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
11555 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
11557         * Makefile (tests): Add tst-cancel8.
11558         * tst-cancel8.c: New file.
11560         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
11561         clearing of control variable.
11562         * Makefile (tests): Add tst-once3 and tst-once4.
11563         * tst-once3.c: New file.
11564         * tst-once4.c: New file.
11566 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
11568         * sysdeps/sh/Makefile: New file.
11569         * sysdeps/sh/bits/atomic.h: New file.
11570         * sysdeps/sh/pthread_spin_init.c: New file.
11571         * sysdeps/sh/pthread_spin_lock.c: New file.
11572         * sysdeps/sh/pthread_spin_trylock.S: New file.
11573         * sysdeps/sh/pthread_spin_unlock.S: New file.
11574         * sysdeps/sh/pthreaddef.h: New file.
11575         * sysdeps/sh/tcb-offsets.sym: New file.
11576         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
11577         * sysdeps/sh/tls.h: New file.
11578         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
11579         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
11580         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
11581         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
11582         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
11583         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
11584         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
11585         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
11586         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
11587         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
11588         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
11589         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
11590         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
11591         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
11592         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
11593         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
11594         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
11595         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
11596         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
11597         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
11598         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
11599         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
11600         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
11601         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
11602         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
11603         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
11604         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
11605         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
11606         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
11607         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
11609 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
11611         * tst-cond2.c: Rearrange code to not rely on behavior undefined
11612         according to POSIX.
11614         * tst-basic2.c (do_test): Lock mutex before creating the thread.
11616 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
11618         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
11619         (TLS_GET_FS): New #define.
11620         (TLS_SET_FS): New #define.
11621         Correct value of __NR_set_thread_area.
11623         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
11625 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
11627         * Makefile (tests): Add tst-popen1.
11628         * tst-popen1.c: New file.
11630         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
11631         but inactive generalization.
11632         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
11633         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
11634         Minor optimization, remove one instruction.
11635         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
11637 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
11639         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
11641 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
11643         * init.c (__NR_set_tid_address): Add #ifdef for s390.
11644         * sysdeps/pthread/pthread_barrier_wait.c: New file.
11645         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
11646         * sysdeps/pthread/pthread_cond_signal.c: New file.
11647         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
11648         * sysdeps/pthread/pthread_cond_wait.c: New file.
11649         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
11650         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
11651         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
11652         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
11653         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
11654         * sysdeps/s390/Makefile: New file.
11655         * sysdeps/s390/bits/atomic.h: New file.
11656         * sysdeps/s390/pthread_spin_init.c: New file.
11657         * sysdeps/s390/pthread_spin_lock.c: New file.
11658         * sysdeps/s390/pthread_spin_trylock.c: New file.
11659         * sysdeps/s390/pthread_spin_unlock.c: New file.
11660         * sysdeps/s390/pthreaddef.h: New file.
11661         * sysdeps/s390/tcb-offsets.sym: New file.
11662         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
11663         * sysdeps/s390/tls.h: New file.
11664         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
11665         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
11666         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
11667         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
11668         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
11669         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
11670         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
11671         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
11672         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
11673         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
11674         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
11675         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
11676         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
11677         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
11678         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
11679         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
11680         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
11681         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
11682         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
11683         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
11684         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
11685         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
11686         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
11688 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
11690         * atomic.h: Add a couple more default implementations.
11691         (atomic_compare_and_exchange_acq): Use
11692         __arch_compare_and_exchange_32_acq in return value definition.  It
11693         always exists.
11694         (atomic_bit_set): Renamed from atomic_set_bit.
11695         Add missing atomic_ prefixes.
11697         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
11698         thread library is available, use correct value to mark initialized
11699         once variable.
11701 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
11703         * allocatestack.c (allocate_stack): Use __getpagesize instead of
11704         __sysconf to determine pagesize.
11706         * pthread_create.c: Include <atomic.h>.
11707         * allocatestack.c (allocate_stack): Implement coloring of the
11708         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
11709         size minus one.  Adjust users.
11710         * sysdeps/i386/i686/Makefile: New file.
11712 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
11714         * allocatestack.c: Improve comment throughout the file.
11716         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
11717         (__lll_lock_wait): Add branch prediction.
11718         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
11719         (__lll_lock_wait): Likewise.
11720         (lll_unlock_wake_cb): Removed.
11722 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
11724         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
11725         _POSIX_THREAD_PRIORITY_SCHEDULING.
11727 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
11729         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
11730         Fix return type of ptr___pthread_getspecific.
11732 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
11734         * Makefile (tests): Add tst-umask1.
11735         (tst-umask1-ARGS): Define.
11736         * tst-umask1.c: New file.
11738 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
11740         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
11741         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
11742         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
11743         pthread_rwlock_unlock.
11744         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
11745         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
11746         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
11747         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
11748         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
11749         New file.
11750         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
11751         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
11752         New file.
11753         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
11754         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
11755         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
11756         New file.
11757         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
11758         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
11759         New file.
11760         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
11761         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
11762         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
11763         New file.
11764         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
11765         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
11766         New file.
11767         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
11769         * Makefile (libpthread-routines): Remove lowlevelcond and
11770         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
11771         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
11772         and pthread_cond_broadcast.
11773         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
11774         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
11775         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
11776         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
11777         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
11778         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
11779         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
11780         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
11781         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
11782         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
11783         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
11784         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
11785         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
11786         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
11787         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
11788         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
11789         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
11790         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
11791         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
11792         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
11793         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
11794         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
11795         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
11796         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
11797         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
11798         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
11799         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
11800         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
11801         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
11802         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
11803         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
11805         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
11806         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
11807         of the code is moved to ...
11808         * sysdeps/pthread/createthread.c: ...here.  New file.
11810 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
11812         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
11813         (__new_sem_post): Clear %eax before returning.
11814         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
11816         * Makefile (tests): Add tst-cleanup2.
11817         * tst-cleanup2.c: New file.
11819         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
11820         Interpret first parameter correctly.
11822 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
11824         * Makefile (headers): Add bits/semaphore.h.
11826 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
11828         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
11829         if not SHARED.
11831 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
11833         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
11834         must be used and mapping failed.
11835         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
11837         * Makefile (CFLAGS-pthread_self.os): Define this, not
11838         CFLAGS-pthread_self.c.
11840 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
11842         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
11843         lll_unlock_wake_cb.
11845         * Makefile (libpthread-routines): Add version.  Add rules to build
11846         version.os and banner.h.
11847         * version.c: New file.
11849 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
11851         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
11852         the alias unconditional.
11853         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
11855 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
11857         * Makefile (CFLAGS-pthread_self.c): New definition.
11859 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
11861         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
11862         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
11863         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
11864         * init.c (__pthread_initialize_minimal_internal): Likewise.
11866 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
11868         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
11870         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
11871         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11872         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11873         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
11874         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
11875         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
11877 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
11879         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
11880         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
11881         * tst-cancel-wrappers.sh: Remove all exceptions.
11883 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
11885         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
11886         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
11888         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
11889         Use __libc_pthread_functions array if SHARED.
11891         * pthreadP.h: Move pthread_cond_2_0_t definition to...
11892         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
11894         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
11895         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
11896         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
11897         __libc_ptf_call instead of __libc_maybe_call.
11898         (PTF): New #define.
11899         (__libc_cleanup_region_start): Wrap function name with PTF call.
11900         (__libc_cleanup_region_end): Likewise.
11901         (__libc_cleanup_end): Likewise.
11903         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
11904         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
11905         * pthread_key_create.c: Add __pthread_key_create_internal alias.
11906         * pthreadP.h: Add prototypes.
11908         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
11909         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
11910         __pthread_rwlock_unlock aliases.
11911         * pthreadP.h: Add prototypes for new aliases.
11913         * pthreadP.h (struct pthead_functions): Moved to...
11914         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
11915         * init.c (pthread_functions): Add initializers for new elements.
11917         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
11918         __pthread_cleanup_pop_restore aliases.
11919         * pthreadP.h: Add prototypes.
11921         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
11922         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
11923         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
11924         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
11925         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
11926         * pthreadP.h: Adjust prototypes and callers.
11928 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
11930         * Makefile (tests): Add tst-cancel7.
11931         (tst-cancel7-ARGS): New variable.
11932         * tst-cancel7.c: New file.
11934         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
11935         around gcc defficiencies.
11936         * old_pthread_cond_signal.c: Likewise.
11937         * old_pthread_cond_timedwait.c: Likewise.
11938         * old_pthread_cond_wait.c: Likewise.
11940         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
11942 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
11944         * Makefile (tests): Add tst-cond7.
11945         * tst-cond7.c: New file.
11947         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11948         (condvar_cleanup): Get condvar address from the right place.
11950         * atomic.h: Correct definitions of atomic_full_barrier,
11951         atomic_read_barrier, atomic_write_barrier.
11953         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
11954         race-free.
11955         * old_pthread_cond_signal.c: Likewise.
11956         * old_pthread_cond_timedwait.c: Likewise.
11957         * old_pthread_cond_wait.c: Likewise.
11959 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
11961         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
11963 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
11965         * pthreadP.h (pthread_cond_2_0_t): New type.
11966         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
11967         Use new type for the 2.0 condvar function prototypes.
11968         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
11969         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
11970         parameter.
11971         * old_pthread_cond_destroy.c: Likewise.
11972         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
11973         * old_pthread_cond_signal.c: Likewise.
11974         * old_pthread_cond_timedwait.c: Likewise.
11975         * old_pthread_cond_wait.c: Likewise.
11977         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
11978         (__pthread_cond_wait): Don't save cancellation mode and seq value
11979         in same location.
11981         * herrno.c (__h_errno_location): Don't define as weak.
11983 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
11985         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
11986         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
11987         and pthread_cond_wait.
11988         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
11989         Renamed to...
11990         (__pthread_cond_broadcast_2_0): ... this.
11991         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
11992         Renamed to...
11993         (__pthread_cond_destroy_2_0): ... this.
11994         * old_pthread_cond_init.c (__old_pthread_cond_init):
11995         Renamed to...
11996         (__pthread_cond_init_2_0): ... this.
11997         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
11998         Renamed to...
11999         (__pthread_cond_signal_2_0): ... this.
12000         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
12001         Renamed to...
12002         (__pthread_cond_wait_2_0): ... this.
12003         * pthread_cond_destroy.c: Include shlib-compat.h.
12004         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
12005         * pthread_cond_init.c: Include shlib-compat.h.
12006         (pthread_cond_init): Change strong_alias into versioned_symbol.
12007         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
12008         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
12009         fields.
12010         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
12011         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
12012         __pthread_cond_wait_2_0): New prototypes.
12013         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
12014         __old_pthread_cond_init, __old_pthread_cond_signal,
12015         __old_pthread_cond_wait): Removed.
12016         * init.c: Include shlib-compat.h.
12017         (pthread_functions): Guard ptr___pthread_attr_init_2_0
12018         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
12019         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
12020         ptr___pthread_cond_*_2_0 fields.
12021         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
12022         pthread_cond_*@GLIBC_2.0 compatibility symbols.
12024         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
12025         LIBC_SIGACTION was not yet defined.
12026         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
12027         [!defined LIBC_SIGACTION] (__sigaction): New function and
12028         libc_hidden_weak.
12029         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
12030         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
12032 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
12034         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
12036 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
12038         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
12039         New, larger type definition.
12040         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
12041         implementation.
12042         * Versions [libpthread]: Add definitions for new pthread_cond_*
12043         interfaces for version GLIBC_2.3.2.
12044         * pthread_cond_init.c: Update initialization for new type definition.
12045         * Makefile (libpthread-routines): Remove pthread_cond_wait,
12046         pthread_cond_timedwait, pthread_cond_signal, and
12047         pthread_cond_broadcast.  Add old_pthread_cond_init,
12048         old_pthread_cond_destroy, old_pthread_cond_wait,
12049         old_pthread_cond_timedwait, old_pthread_cond_signal, and
12050         old_pthread_cond_broadcast.
12051         * old_pthread_cond_broadcast.c: New file.
12052         * old_pthread_cond_destroy.c: New file.
12053         * old_pthread_cond_init.c: New file.
12054         * old_pthread_cond_signal.c: New file.
12055         * old_pthread_cond_timedwait.c: New file.
12056         * old_pthread_cond_wait.c: New file.
12057         * pthreadP.h: Add prototypes for the compatibility interfaces.
12059         * pthread_cond_destroy.c: Don't include <errno.h>.
12061 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
12063         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
12064         unnecessary zero offset when addressing MUTEX.
12066 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
12068         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
12069         __register_atfork.
12070         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
12071         for __register_atfork.
12073 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
12075         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
12076         instead of ASSEMBLER test macro.
12078         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
12079         __libc_current_sigrtmax): Add libc_hidden_def.
12081         * sysdeps/pthread/list.h: Remove assert.h include.
12083 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
12085         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
12086         __pthread_initialize_minimal_internal not
12087         __pthread_initialize_minimal.
12089 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
12091         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
12092         __pthread_initialize_minimal as hidden.
12094         * init.c (__pthread_initialize_minimal_internal): Don't mark as
12095         constructor.
12097 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
12099         * Makefile ($(inst_libdir)/libpthread.so): Depend on
12100         $(common-objpfx)format.lds, include that into the output script.
12101         Fix comment.
12102         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
12104 2002-12-28  Andreas Jaeger  <aj@suse.de>
12106         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
12107         nsec resolution changes.
12108         (xstat64_conv): Likewise.
12109         (xstat32_conv): Likewise.
12110         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
12111         struct kernel_stat.
12112         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
12113         structs stat and stat64.
12114         * time/time.h (__timespec_defined): Define for __USE_MISC.
12115         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
12117 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
12119         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
12120         argument.
12121         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
12122         (pthread_exit): Use strong_alias to avoid warnings.
12123         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
12124         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
12125         ptr___pthread_attr_init_2_*.
12126         * init.c (pthread_functions): Adjust.
12128 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
12130         * forward.c: Make all functions available by default again.  It
12131         caused too much trouble.
12133         * pt-siglongjmp.c: Removed.
12135 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
12137         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
12138         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
12139         * sysdeps/i386/Makefile: New file.
12140         * sysdeps/i386/tcb-offsets.sym: New file.
12141         * sysdeps/pthread/tcb-offsets.h: New file.
12142         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
12143         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
12145         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
12146         __register_atfork...
12147         (GLIBC_2.3.2): ...here.
12149 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
12151         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
12152         pthread_attr_setstackaddr with __attribute_deprecated__.
12154 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
12156         * pt-system.c (system): Remove cancellation handling.
12157         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
12158         cancellation routines.
12160 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
12162         * descr.h: Include <dl-sysdep.h>.
12163         (struct pthread): Move header.data.list to the back of the struct.
12164         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
12165         (MULTIPLE_THREADS_OFFSET): Adjust offset.
12166         (SYSINFO_OFFSEET): Likewise.
12168 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
12170         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
12171         Define.
12172         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
12173         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
12174         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
12175         (USE_DL_SYSINFO): Undef.
12177 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
12179         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
12180         $(common-objpfx)libc.so.
12181         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
12182         it is bigger than pipe buffer size even on arches with bigger
12183         page size.
12184         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
12186 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
12188         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
12189         correct errno access for case that USE___THREAD is not defined.
12191 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
12193         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
12194         Patch by Marijn Ros <marijn@mad.scientist.com>.
12196 2002-12-22  Roland McGrath  <roland@redhat.com>
12198         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
12200 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
12202         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
12204 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
12206         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
12207         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
12208         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
12210         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
12211         of int $0x80.
12212         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
12213         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
12214         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
12215         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
12216         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
12217         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
12218         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
12219         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
12221         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
12222         sysenter.
12223         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
12225         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
12227         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
12228         in new TCB.
12229         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
12230         that sysinfo is properly initialized.
12231         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
12232         to 1 only for ld.so.
12234         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
12235         RTLD_CORRECT_DYNAMIC_WEAK.
12237 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
12239         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
12240         Use return 0 as 6th argument to FORWARD4.
12241         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
12243 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
12245         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
12246         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
12247         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
12248         (INIT_SYSINFO): New #define.
12249         (TLS_TP_INIT): Use INIT_SYSINFO.
12250         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
12251         At test to make sure SYSINFO_OFFSET value is correct.
12252         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
12254 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
12256         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
12257         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
12258         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
12259         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
12260         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
12261         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
12262         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
12264 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
12266         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
12267         macro instead of using int $0x80 directly.
12269         * sysdeps/pthread/bits/stdio-lock.h: New file.
12270         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
12271         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
12272         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
12273         * Makefile (routines): Add libc-lowlevelmutex.
12275         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
12276         __i686.get_pc_thunk.dx.
12278 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
12280         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
12281         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
12282         ($(objpfx)tst-cancel-wrappers.out): New rule.
12283         * tst-cancel-wrappers.sh: New test.
12284         * tst-locale1.c: Include signal.h.
12285         (uselocale): Test static linking of __libc_current_sigrt*.
12287 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
12289         * Makefile (tests): Add tst-cancel6.
12290         * tst-cancel6.c: New file
12292 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
12294         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
12295         Define meaningfully for assembler as well.
12296         * pthreadP.h (struct pthread_functions): Remove
12297         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
12298         and ptr_pthread_attr_init_2_1 fields.
12299         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
12300         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
12301         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
12302         (FORWARD3): Define using FORWARD4.
12303         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
12304         versions.
12305         * pt-system.c: Remove duplicate stdlib.h include.
12307 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
12309         * sem_init.c: Define sem_init@GLIBC_2.0.
12310         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
12311         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
12313         * flockfile.c: Moved to...
12314         * sysdeps/pthread/flockfile.c: ...here.  New file.
12315         * funlockfile.c: Moved to...
12316         * sysdeps/pthread/funlockfile.c: ...here.  New file.
12317         * ftrylockfile.c: Moved to...
12318         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
12320 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
12322         * libc-cancellation.c: Guard both function with
12323         #if !defined NOT_IN_libc.
12324         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
12325         automatically provided pthread wrappers.
12326         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
12327         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
12328         nor in libpthread.
12329         * pt-open.c: Removed.
12330         * pt-fcntl.c: Removed.
12331         * pt-fsync.c: Removed.
12332         * pt-lseek.c: Removed.
12333         * pt-msgrcv.c: Removed.
12334         * pt-msgsnd.c: Removed.
12335         * pt-msync.c: Removed.
12336         * pt-nanosleep.c: Removed.
12337         * pt-open64.c: Removed.
12338         * pt-pause.c: Removed.
12339         * pt-pread.c: Removed.
12340         * pt-pread64.c: Removed.
12341         * pt-pwrite.c: Removed.
12342         * pt-pwrite64.c: Removed.
12343         * pt-read.c: Removed.
12344         * pt-recv.c: Removed.
12345         * pt-recvfrom.c: Removed.
12346         * pt-recvmsg.c: Removed.
12347         * pt-send.c: Removed.
12348         * pt-sendto.c: Removed.
12349         * pt-sigtimedwait.c: Removed.
12350         * pt-sigwait.c: Removed.
12351         * pt-wait.c: Removed.
12352         * pt-waitpid.c: Removed.
12353         * pt-write.c: Removed.
12354         * pt-accept.c: Removed.
12355         * pt-close.c: Removed.
12356         * pt-connect.c: Removed.
12357         * pt-lseek64.c: Removed.
12358         * pt-sendmsg.c: Removed.
12359         * pt-tcdrain.c: Removed.
12361 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
12363         * init.c (__pthread_initialize_minimal_internal): Renamed from
12364         __pthread_initialize_minimal.  Make old name an alias.  This
12365         converts a normal relocation into a relative relocation.
12367         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
12369         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
12370         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
12371         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
12372         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
12373         pt-sigwaitinfo, pt-waitid, and pt-writev.
12374         * pt-creat.c: Removed.
12375         * pt-poll.c: Removed.
12376         * pt-pselect.c: Removed.
12377         * pt-readv.c: Removed.
12378         * pt-select.c: Removed.
12379         * pt-sigpause.c: Removed.
12380         * pt-sigsuspend.c: Removed.
12381         * pt-sigwaitinfo.c: Removed.
12382         * pt-waitid.c: Removed.
12383         * pt-writev.c: Removed.
12385         * init.c (pthread_functions): New variable.
12386         (__pthread_initialize_minimal): Pass pointer to pthread_functions
12387         (or NULL) to __libc_pthread_init.
12388         * forward.c: Rewrite to use __libc:pthread_functions array to get
12389         function addresses.
12390         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
12391         prototype.
12392         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
12393         Take new parameter.  Copy content of variable pointed to by it
12394         to __libc_pthread_init.
12396         * pthreadP.h (struct pthread_functions): New type.
12397         (__libc_pthread_init): Declare.
12399         * pthread_attr_destroy.c: Add namespace protected alias.
12400         * pthread_attr_getdetachstate.c: Likewise.
12401         * pthread_attr_getinheritsched.c: Likewise.
12402         * pthread_attr_getschedparam.c: Likewise.
12403         * pthread_attr_getschedpolicy.c: Likewise.
12404         * pthread_attr_getscope.c: Likewise.
12405         * pthread_attr_setdetachstate.c: Likewise.
12406         * pthread_attr_setinheritsched.c: Likewise.
12407         * pthread_attr_setschedparam.c: Likewise.
12408         * pthread_attr_setschedpolicy.c: Likewise.
12409         * pthread_attr_setscope.c: Likewise.
12410         * pthread_cond_broadcast.c: Likewise.
12411         * pthread_cond_destroy.c: Likewise.
12412         * pthread_cond_init.c: Likewise.
12413         * pthread_cond_signal.c: Likewise.
12414         * pthread_cond_wait.c: Likewise.
12415         * pthread_condattr_destroy.c: Likewise.
12416         * pthread_condattr_init.c: Likewise.
12417         * pthread_equal.c: Likewise.
12418         * pthread_exit.c: Likewise.
12419         * pthread_getschedparam.c: Likewise.
12420         * pthread_self.c: Likewise.
12421         * pthread_setcancelstate.c: Likewise.
12422         * pthread_setschedparam.c: Likewise.
12423         * pthread_mutex_destroy.c: Likewise.
12424         * pthread_mutex_init.c: Likewise.
12425         * pthreadP.h: Add prototypes for the aliases.
12427         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
12428         multiple_threads member in correct TCB to 1.
12430         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
12431         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
12432         member of thread decriptor, otherwise return unconditionally 1.
12434 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
12436         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
12437         regular Linux version.  Remove file.
12438         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
12439         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
12440         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
12441         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
12442         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
12443         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
12444         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
12445         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
12446         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
12447         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
12448         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
12449         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
12450         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
12451         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
12452         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
12453         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
12454         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
12455         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
12456         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
12457         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
12458         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
12459         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
12460         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
12461         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
12462         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
12463         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
12464         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
12465         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
12466         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
12467         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
12469 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
12471         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
12472         * sysdeps/unix/sysv/linux/open.c: Removed.
12473         * sysdeps/unix/sysv/linux/fsync.c: Removed.
12474         * sysdeps/unix/sysv/linux/lseek.c: Removed.
12475         * sysdeps/unix/sysv/linux/msync.c: Removed.
12476         * sysdeps/unix/sysv/linux/read.c: Removed.
12477         * sysdeps/unix/sysv/linux/close.c: Removed.
12478         * sysdeps/unix/sysv/linux/creat.c: Removed.
12479         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
12480         * sysdeps/unix/sysv/linux/pause.c: Removed.
12481         * sysdeps/unix/sysv/linux/select.c: Removed.
12482         * sysdeps/unix/sysv/linux/write.c: Removed.
12484 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
12486         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
12487         element in TCB to see whether locking is needed.
12489         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
12490         MULTIPLE_THREADS_OFFSET value is correct.
12492         * sysdeps/unix/sysv/linux/close.c: New file.
12493         * sysdeps/unix/sysv/linux/connect.S: New file.
12494         * sysdeps/unix/sysv/linux/creat.c: New file.
12495         * sysdeps/unix/sysv/linux/fsync.c: New file.
12496         * sysdeps/unix/sysv/linux/llseek.c: New file.
12497         * sysdeps/unix/sysv/linux/lseek.c: New file.
12498         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
12499         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
12500         * sysdeps/unix/sysv/linux/msync.c: New file.
12501         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
12502         * sysdeps/unix/sysv/linux/open.c: New file.
12503         * sysdeps/unix/sysv/linux/open64.c: New file.
12504         * sysdeps/unix/sysv/linux/pause.c: New file.
12505         * sysdeps/unix/sysv/linux/poll.c: New file.
12506         * sysdeps/unix/sysv/linux/pread.c: New file.
12507         * sysdeps/unix/sysv/linux/pread64.c: New file.
12508         * sysdeps/unix/sysv/linux/pselect.c: New file.
12509         * sysdeps/unix/sysv/linux/pwrite.c: New file.
12510         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
12511         * sysdeps/unix/sysv/linux/readv.c: New file.
12512         * sysdeps/unix/sysv/linux/recv.S: New file.
12513         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
12514         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
12515         * sysdeps/unix/sysv/linux/select.c: New file.
12516         * sysdeps/unix/sysv/linux/send.S: New file.
12517         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
12518         * sysdeps/unix/sysv/linux/sendto.S: New file.
12519         * sysdeps/unix/sysv/linux/sigpause.c: New file.
12520         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
12521         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
12522         * sysdeps/unix/sysv/linux/sigwait.c: New file.
12523         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
12524         * sysdeps/unix/sysv/linux/system.c: New file.
12525         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
12526         * sysdeps/unix/sysv/linux/wait.c: New file.
12527         * sysdeps/unix/sysv/linux/waitid.c: New file.
12528         * sysdeps/unix/sysv/linux/waitpid.c: New file.
12529         * sysdeps/unix/sysv/linux/writev.c: New file.
12530         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
12532         * pt-readv.c: Fix comment.
12534 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
12536         * tst-cleanup1.c: Include stdlib.h.
12538         * tst-cancel5.c: New test.
12539         * Makefile (tests): Add tst-cancel5.
12540         (tst-cancel5): Link against libc.so libpthread.so in that order.
12542 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
12544         * forward.c (test_loaded): Prevent recursive calls.
12546         * Makefile (routines): Add libc-cancellation.
12547         * libc-cancellation.c: New file.
12548         * descr.h (struct pthread): Add multiple_threads field.
12549         * allocatestack.c (allocate_stack): Initialize multiple_header field of
12550         new thread descriptor to 1.
12551         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
12552         Initialize multiple_thread field after successful thread creation.
12553         * cancellation.c (__do_cancel): Move to pthreadP.h.
12554         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
12555         (__pthread_disable_asynccancel): Add internal_function attribute.
12556         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
12557         * pthread_setcancelstate.c: Likewise.
12558         * pthread_setcanceltype.c: Likewise.
12559         * pthread_exit.c: Likewise.
12560         * pthreadP.h (CANCELLATION_P): Likewise.
12561         (__do_cancel): Define as static inline.
12562         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
12563         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
12564         declarations.
12565         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
12566         fields.  Define MULTIPLE_THREADS_OFFSET.
12567         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
12568         declaration.
12569         * sysdeps/unix/sysv/linux/accept.S: New file.
12570         * sysdeps/unix/sysv/linux/read.c: New file.
12571         * sysdeps/unix/sysv/linux/write.c: New file.
12572         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
12573         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
12574         initialization of __libc_locking_needed.
12575         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
12576         __libc_locking_needed, use multiple_threads field in TCB.
12577         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
12579 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
12581         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
12582         version.
12583         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
12585         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
12586         access to __libc_locking_needed for PIC.
12588 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
12590         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
12591         declare for libc.so.
12592         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
12593         expression.
12594         (__libc_lock_lock): Put into statement expression.
12595         (__libc_lock_unlock): Remove trailing semicolon.
12596         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
12598 2002-12-12  Roland McGrath  <roland@redhat.com>
12600         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
12601         "m" constraint to refer to __libc_locking_needed.  Declare it here.
12603 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
12605         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
12606         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
12607         Initialize __libc_locking_needed.
12608         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
12609         instead of __register_pthread_fork_handler.
12610         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
12611         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
12612         fork-gen with libc_pthread_init.
12613         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
12614         of __register_pthread_fork_handler.
12615         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
12616         of __register_pthread_fork_handler.
12617         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
12618         __libc_locking_needed to determine whether lock prefix can be avoided.
12619         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
12621 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
12623         * Makefile (tests): Add tst-cleanup1.
12624         * tst-cleanup1.c: New file.
12625         * cancellation.c (__cleanup_thread): Removed.
12626         (__do_cancel): Remove call to __cleanup_thread.
12627         * pthreadP.h: Remove __cleanup_thread prorotype.
12629         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
12630         Remember function and argument even if cancellation handler
12631         function is not available.
12632         (__libc_cleanup_region_end): Execute registered function directly if
12633         pthread functions are not available.
12634         (__libc_cleanup_end): Likewise.
12636         * init.c (__pthread_initialize_minimal): Fix initialization in
12637         static lib by preventing gcc from being too clever.
12639 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
12641         * init.c (__pthread_initialize_minimal): Remove unneccesary
12642         sigaddset call.
12644         * Makefile (tests): We can run tst-locale2 now.
12646 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
12648         * Versions: Remove duplicated sigwait entry.
12650 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
12652         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
12653         inside libpthread.
12655         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
12657         * pthreadP.h: Declare __pthread_enable_asynccancel and
12658         __pthread_disable_asynccancel.
12659         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
12660         (CANCEL_RESET): Use __pthread_disable_asynccancel.
12661         * cancellation.c (__pthread_enable_asynccancel): New function.
12662         (__pthread_disable_asynccancel): New function.
12663         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
12664         * pt-close.c: Likewise.
12665         * pt-connect.c: Likewise.
12666         * pt-creat.c: Likewise.
12667         * pt-fcntl.c: Likewise.
12668         * pt-fsync.c: Likewise.
12669         * pt-lseek.c: Likewise.
12670         * pt-lseek64.c: Likewise.
12671         * pt-msgrcv.c: Likewise.
12672         * pt-msgsnd.c: Likewise.
12673         * pt-msync.c: Likewise.
12674         * pt-nanosleep.c: Likewise.
12675         * pt-open.c: Likewise.
12676         * pt-open64.c: Likewise.
12677         * pt-pause.c: Likewise.
12678         * pt-poll.c: Likewise.
12679         * pt-pread.c: Likewise.
12680         * pt-pread64.c: Likewise.
12681         * pt-pselect.c: Likewise.
12682         * pt-pwrite.c: Likewise.
12683         * pt-pwrite64.c: Likewise.
12684         * pt-read.c: Likewise.
12685         * pt-readv.c: Likewise.
12686         * pt-recv.c: Likewise.
12687         * pt-recvfrom.c: Likewise.
12688         * pt-recvmsg.c: Likewise.
12689         * pt-select.c: Likewise.
12690         * pt-send.c: Likewise.
12691         * pt-sendmsg.c: Likewise.
12692         * pt-sendto.c: Likewise.
12693         * pt-sigpause.c: Likewise.
12694         * pt-sigsuspend.c: Likewise.
12695         * pt-sigtimedwait.c: Likewise.
12696         * pt-sigwait.c: Likewise.
12697         * pt-sigwaitinfo.c: Likewise.
12698         * pt-system.c: Likewise.
12699         * pt-tcdrain.c: Likewise.
12700         * pt-wait.c: Likewise.
12701         * pt-waitid.c: Likewise.
12702         * pt-waitpid.c: Likewise.
12703         * pt-write.c: Likewise.
12704         * pt-writev.c: Likewise.
12705         * pthread_join.c: Likewise.
12706         * pthread_timedjoin.c: Likewise.
12708         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
12709         (__xpg_sigpause): New function.
12710         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
12712 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
12714         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
12716         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
12717         _GI_pthread_cleanup_pop to pthreadP.h.
12719         * ftrylockfile.c: Use _IO_lock_trylock instead of
12720         pthread_mutex_trylock.
12722         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
12723         (CANCEL_RESET): Likewise.
12724         (__pthread_setcanceltype_): Declare.
12725         (__pthread_mutex_lock_internal): Declare.
12726         (__pthread_mutex_unlock_internal): Declare.
12727         (__pthread_once_internal): Declare.
12728         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
12729         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
12731         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
12732         and pthread_mutex_unlock.
12733         * pthread_cond_wait.c: Likewise.
12734         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
12735         * pthread_mutex_unlock.c: Likewise.
12737         * pthread_setcanceltype.c: Add additional alias
12738         __pthread_setcanceltype.
12740         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
12741         * sem_open.c (sem_open): Likewise.
12742         Use __libc_open, __libc_write, and __libc_close instead of
12743         open, write, and close respectively.
12745         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
12746         Rewrite as statement expression since it must return a value.
12748         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
12749         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
12750         __pthread_kill.
12752         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
12753         alias __pthread_once_internal.
12755         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
12757 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
12759         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
12760         * tst-stdio1.c: New file.
12761         * tst-stdio2.c: New file.
12763         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
12765         * Makefile (tests): Comment out tst-locale2 for now.
12766         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
12768         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
12769         -D_IO_MTSAFE_IO.
12770         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
12771         Use _IO_lock_init instead of explicit assignment.
12773         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
12774         Define __libc_lock_* and __libc_lock_recursive macros with
12775         lowlevellock macros, not pthread mutexes.
12777         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
12778         of pthread_mutex_lock.
12779         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
12780         instead of pthread_mutex_unlock.
12782 2002-12-06  Roland McGrath  <roland@redhat.com>
12784         * allocatestack.c (__stack_user): Use uninitialized defn.
12785         * init.c (__pthread_initialize_minimal): Initialize it here.
12787 2002-12-05  Roland McGrath  <roland@redhat.com>
12789         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
12790         string.
12791         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
12793         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
12794         missing & here too.
12796 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
12798         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12799         lowlevellock.
12800         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
12801         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
12802         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
12803         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
12804         for __libc_lock_* macros.
12805         * Makefile (routines): Add libc-lowlevellock.
12807 2002-10-09  Roland McGrath  <roland@redhat.com>
12809         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
12810         Under [__PIC__], call the function via the pointer fetched for
12811         comparison rather than a call by name that uses the PLT.
12812         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
12813         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
12814         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
12815         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
12816         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
12818 2002-12-04  Roland McGrath  <roland@redhat.com>
12820         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
12822         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
12823         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
12825         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
12827 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
12829         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
12830         a completely opaque, non-integer type.
12831         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
12833 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
12835         * sysdeps/i386/tls.h: Include stdlib.h.
12836         * sysdeps/x86_64/tls.h: Likewise.
12838 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
12840         * Makefile (tests): Add tst-locale2.
12841         (tests-static): Likewise.
12842         * tst-locale2.c: New file.
12844         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
12845         volatile and add memory clobbers to lock operations.
12847 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
12849         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
12850         * sysdeps/i386/i486/bits/atomic.h: New file.
12851         * sysdeps/i386/i586/bits/atomic.h: New file.
12852         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
12853         include i486 version.
12854         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
12855         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
12856         Patch by Marijn Ros <marijn@mad.scientist.com>.
12858         * allocatestack.c (get_cached_stack): Don't crash if we first
12859         found a stack with a larger size then needed.
12860         Reported by Hui Huang <hui.huang@sun.com>.
12862         * Makefile (tests): Add tst-sysconf.
12863         * tst-sysconf.c: New file.
12865         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
12866         PTHREAD_THREADS_MAX.
12868 2002-12-02  Roland McGrath  <roland@redhat.com>
12870         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
12871         Declare using hidden_proto instead of attribute_hidden, so there are
12872         non-.hidden static symbols for gdb to find.
12873         (__pthread_keys): Likewise.
12874         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
12875         * allocatestack.c (__stack_user): Likewise.
12876         * pthread_create.c (__pthread_keys): Likewise.
12877         (__nptl_threads_events, __nptl_last_event): Make these static instead
12878         of hidden.
12879         * pthread_key_create.c (__pthread_pthread_keys_max,
12880         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
12882 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
12884         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
12885         statically.
12886         * tst-locale1.c: New file.
12888         * pthread_cond_timedwait.c: Include <stdlib.h>.
12890         * Makefile (tests): Add tst-fork2 and tst-fork3.
12891         * tst-fork2.c: New file.
12892         * tst-fork3.c: New file.
12894 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
12896         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
12898         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
12899         require it to 200112L.
12901         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
12902         instruction only if HAVE_CMOV is defined.
12903         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
12905         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
12907         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
12909         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
12911         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
12913 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
12915         * sysdeps/x86_64/bits/atomic.h: New file.
12917         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
12918         16-bit operations.
12920         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
12921         possible since gettid cannot fail.
12923         * sysdeps/x86_64/pthreaddef.h: New file.
12925         * sysdeps/i386/pthreaddef.h (gettid): Removed.
12927         * sysdeps/x86_64/pthread_spin_init.c: New file.
12928         * sysdeps/x86_64/pthread_spin_lock.c: New file.
12929         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
12930         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
12932         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
12933         Add missing lock prefix.  Minute optimization.
12935         * tst-spin2.c (main): Also check successful trylock call.
12937         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
12938         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
12940         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
12941         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
12943         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
12944         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
12945         value in case of an error.  Add support for INTERNAL_SYSCALL.
12947         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
12948         value in case of an error.
12950         * sysdeps/x86_64/tls.h: New file.
12952 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
12954         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
12955         takes the array member name and the index as parameters.
12956         (THREAD_SETMEM_NC): Likewise.
12957         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
12958         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
12959         interfaces.
12961         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
12962         to decide which code to use.
12963         (THREAD_SETMEM_NC): Likewise.
12965         * allocatestack.c (queue_stack): Don't remove stack from list here.
12966         Do it in the caller.  Correct condition to prematurely terminate
12967         loop to free stacks.
12968         (__deallocate_stack): Remove stack from list here.
12970 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
12972         * Makefile (tests): Add tst-stack1.
12973         * tst-stack1.c: New file.
12975         * allocatestack.c (allocate_stack): Initialize the TCB on a user
12976         provided stack.
12978         * pthread_attr_getstack.c: Return bottom of the thread area.
12980 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
12982         * Makefile (libpthread-routines): Add pt-allocrtsig and
12983         pthread_kill_other_threads.
12984         * pt-allocrtsig.c: New file.
12985         * pthread_kill_other_threads.c: New file.
12986         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
12987         all three functions.
12988         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
12989         allocrtsig.
12990         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
12991         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
12992         and __libc_allocate_rtsig_private.
12993         * Versions (libpthread): Export pthread_kill_other_threads_np,
12994         __libc_current_sigrtmin, and __libc_current_sigrtmax.
12996 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
12998         * allocatestack.c (allocate_stack): stackaddr in attribute points to
12999         the end of the stack.  Adjust computations.
13000         When mprotect call fails dequeue stack and free it.
13001         * pthread_attr_setstack.c: Store top of the stack in stackaddr
13002         attribute.
13003         * pthread_getattr_np.c: Likewise.
13005         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
13006         surprises.
13008 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
13010         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
13011         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
13013 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
13015         * pthread_getspecific.c: Optimize access to first 2nd-level array.
13016         * pthread_setspecific.c: Likewise.
13018 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
13020         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
13021         definitions.  Get them from the official place.
13022         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
13024         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
13025         Use new CLONE_ flags in clone() calls.
13027         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
13028         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
13030         * Versions: Add pthread_* functions for libc.
13031         * forward.c: New file.
13033         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
13034         errno-loc.
13035         * herrno.c: New file.
13036         * res.c: New file.
13038         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
13039         sem_trywait, and sem_timedwait.  Add herrno and res.
13040         * sem_init.c: Don't initialize lock and waiters members.
13041         * sem_open.c: Likewise.
13042         * sem_post.c: Removed.
13043         * sem_wait.c: Removed.
13044         * sem_trywait.c: Removed.
13045         * sem_timedwait.c: Removed.
13046         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
13047         Includes full implementations of sem_post, sem_wait, sem_trywait,
13048         and sem_timedwait.
13049         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
13050         for new implementation.
13051         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
13052         and waiters fields.
13054         * tst-sem3.c: Improve error message.
13055         * tst-signal3.c: Likewise.
13057         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
13058         to tell the kernel about the termination futex and to initialize tid
13059         member.  Don't initialize main_thread.
13060         * descr.h (struct pthread): Remove main_thread member.
13061         * cancelllation.c (__do_cancel): Remove code handling main thread.
13062         The main thread is not special anymore.
13064         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
13065         size of the stacks to stack_cache_actsize.
13067         * pt-readv.c: Add missing "defined".
13068         * pt-sigwait.c: Likewise.
13069         * pt-writev.c: Likewise.
13071 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
13073         * Versions: Export __connect from libpthread.
13074         Patch by Luca Barbieri <ldb@ldb.ods.org>.
13076         * Makefile (libpthread-routines): Add pt-raise.
13077         * sysdeps/unix/sysv/linux/raise.c: New file.
13078         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
13079         * sysdeps/generic/pt-raise.c: New file.
13081         * pthread_cond_init.c: Initialize all data elements of the condvar
13082         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
13084         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
13085         * pthread_create.c: Likewise.
13087         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
13088         * tst-key1.c: New file.
13089         * tst-key2.c: New file.
13090         * tst-key3.c: New file.
13092         * Versions: Export pthread_detach for version GLIBC_2.0.
13093         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
13095 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
13097         * pthread_key_create.c: Terminate search after an unused key was found.
13098         Patch by Luca Barbieri <ldb@ldb.ods.org>.
13100         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
13101         Patch by Luca Barbieri <ldb@ldb.ods.org>.
13103 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
13105         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
13106         dynamic lookup for errno in PIC.
13108         * allocatestack.c (get_cached_stack): Rearrange code slightly to
13109         release the stack lock as soon as possible.
13110         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
13111         the static TLS block.
13112         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
13114         * cancellation.c: Renamed from cancelation.c.
13115         * Makefile: Adjust accordingly.
13116         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
13117         * cleanup_defer.c: Use CANCELLATION_P.
13118         * pthread_testcancel.c: Likewise.
13119         * descr.h: Fix spelling in comments.
13120         * init.c: Likewise.
13121         * pthread_getattr_np.c: Likewise.
13122         * pthread_getschedparam.c: Likewise.
13123         * pthread_setschedparam.c: Likewise.
13124         * Versions: Likewise.
13126         * pt-pselect.c: New file.
13127         * Makefile (libpthread-routines): Add pt-pselect.
13128         * Versions: Add pselect.
13130         * tst-cancel4.c: New file.
13131         * Makefile (tests): Add tst-cancel4.
13133 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
13135         * pthread_mutex_lock.c: Always record lock ownership.
13136         * pthread_mutex_timedlock.c: Likewise.
13137         * pthread_mutex_trylock.c: Likewise.
13139         * pt-readv.c: New file.
13140         * pt-writev.c: New file.
13141         * pt-creat.c: New file.
13142         * pt-msgrcv.c: New file.
13143         * pt-msgsnd.c: New file.
13144         * pt-poll.c: New file.
13145         * pt-select.c: New file.
13146         * pt-sigpause.c: New file.
13147         * pt-sigsuspend.c: New file.
13148         * pt-sigwait.c: New file.
13149         * pt-sigwaitinfo.c: New file.
13150         * pt-waitid.c: New file.
13151         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
13152         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
13153         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
13154         * Versions: Add all the new functions.
13156         * tst-exit1.c: New file.
13157         * Makefile (tests): Add tst-exit1.
13159         * sem_timedwait.c: Minor optimization for more optimal fastpath.
13161 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
13163         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
13165         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
13166         call.  pthread_join is an official cancellation point.
13167         * pthread_timedjoin.c: Likewise.
13169         * pthread_cond_wait.c: Revert order in which internal lock are dropped
13170         and the condvar's mutex are retrieved.
13171         * pthread_cond_timedwait.c: Likewise.
13172         Reported by dice@saros.East.Sun.COM.
13174 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
13176         * pthreadP.h: Cut out all type definitions and move them...
13177         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
13178         * pthreadP.h: Include <internaltypes.h>.
13180         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
13181         performance tweaks.
13183         * sem_trywait.c: Shuffle #includes around to get right order.
13184         * sem_timedwait.c: Likewise.
13185         * sem_post.c: Likewise.
13186         * sem_wait.c: Likewise.
13188         * nptl 0.3 released.
13190         * Makefile (tests): Add tst-signal3.
13191         * tst-signal3.c: New file.
13193 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
13195         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
13196         the asms modify the sem object.
13197         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
13199         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
13200         the actual members.
13201         * pthreadP.h (struct sem): New type.  Actual semaphore type.
13202         * semaphoreP.h: Include pthreadP.h.
13203         * sem_getvalue.c: Adjust to sem_t change.
13204         * sem_init.c: Likewise.
13205         * sem_open.c: Likewise.
13206         * sem_post.c: Likewise.
13207         * sem_timedwait.c: Likewise.
13208         * sem_trywait.c: Likewise.
13209         * sem_wait.c: Likewise.
13211 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
13213         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
13214         * tst-basic2.c: New file.
13215         * tst-exec1.c: New file.
13216         * tst-exec2.c: New file.
13217         * tst-exec3.c: New file.
13219         * tst-fork1.c: Remove extra */.
13221         * nptl 0.2 released.  The API for IA-32 is complete.