Merge commit 'origin/master' into fedora/master
[glibc.git] / nptl / ChangeLog
blob42f1b6799232c239a2ff9480a1be423c50bc94ff
1 2009-08-27  Andrew Stubbs  <ams@codesourcery.com>
3         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
4         Correct a logic error.
6 2009-08-25  Ulrich Drepper  <drepper@redhat.com>
8         * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
9         of the field in local variables.
10         (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
11         variable and don't unconditionally clear it.
13 2009-08-24  Ulrich Drepper  <drepper@redhat.com>
15         * pthread_create.c (start_thread): Hint to the kernel that memory for
16         the stack can be reused.  We do not mark all the memory.  The part
17         still in use and some reserve are kept.
19 2009-08-23  Ulrich Drepper  <drepper@redhat.com>
21         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
23 2009-08-11  Ulrich Drepper  <drepper@redhat.com>
25         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
26         directives.
28 2009-08-10  Ulrich Drepper  <drepper@redhat.com>
30         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
31         directives.
32         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
34 2009-08-10  Andreas Schwab  <schwab@redhat.com>
36         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
37         (__pthread_cond_signal): Don't clobber register used for syscall
38         number.
40 2009-08-08  Ulrich Drepper  <drepper@redhat.com>
42         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
43         Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
45         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
46         (__pthread_cond_wait): Optimize by avoiding use of callee-safe
47         register.
49 2009-08-07  Ulrich Drepper  <drepper@redhat.com>
51         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
52         enabled by the special *_asynccancel functions.
53         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
54         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
56         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
58 2009-08-04  Ulrich Drepper  <drepper@redhat.com>
60         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
61         * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
62         * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
63         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
64         since we can assume the special __*_{en,dis}able_asynccancel
65         functions.
66         (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
67         * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
68         and PTHREAD_CANCELED.
70 2009-07-31  Ulrich Drepper  <drepper@redhat.com>
72         * descr.h: Better definition of *_BITMASK macros for cancellation.
74 2009-07-29  Ulrich Drepper  <drepper@redhat.com>
76         * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
78         * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
79         dynamic linker might have to save.
80         Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
81         RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL.  Pretty
82         printing.
84         * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
86 2009-07-28  Ulrich Drepper  <drepper@redhat.com>
88         * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
89         New function.
90         * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
91         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
92         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
93         requeue_pi for robust mutexes.
94         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
95         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
96         Don't only skip __pthread_mutex_cond_lock.  Call instead
97         __pthread_mutex_cond_lock_adjust.
98         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
100         * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
101         optimization of PI mutex handling.
103 2009-07-27  Ulrich Drepper  <drepper@redhat.com>
105         [BZ #10418]
106         * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
107         instead of of _acq variants of cmpxchg.
109 2009-07-23  Ulrich Drepper  <drepper@redhat.com>
111         * sysdeps/x86_64/configure.in: New file.
113         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
114         path when not using absolute timeout futex.
116 2009-07-20  Ulrich Drepper  <drepper@redhat.com>
118         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
119         optimizations of last changes.
120         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
122 2009-07-19  Ulrich Drepper  <drepper@redhat.com>
124         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
125         FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
126         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
127         is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
128         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
129         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
130         is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
131         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
133         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
134         (__pthread_cond_timedwait): Make more robust.
136 2009-07-18  Ulrich Drepper  <drepper@redhat.com>
138         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
139         (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
140         directly use absolute timeout.
142         * tst-sem5.c (do_test): Add test for premature timeout.
143         * Makefile: Linu tst-sem5 with librt.
145         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
146         (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
147         directly use absolute timeout.
148         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
149         (pthread_rwlock_timedrdlock): Likewise.
151         * tst-cond11.c (run_test): Add test to check that the timeout is
152         long enough.
154         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
155         (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
156         directly use absolute timeout.
158         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
159         (__pthread_cond_wait): Convert to using exception handler instead of
160         registered unwind buffer.
161         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
162         (__pthread_cond_timedwait): Likewise.
164 2009-07-17  Ulrich Drepper  <drepper@redhat.com>
166         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
167         If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
168         use absolute timeout.
170         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
171         handling of uncontested semaphore.
173         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
174         (__condvar_cleanup): Rewrite to use cfi directives instead of
175         hand-coded unwind tables.
176         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
177         Likewise.
178         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
179         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
180         Likewise.
182 2009-06-12  Ulrich Drepper  <drepper@redhat.com>
184         * Makefile (libpthread-routines): Add pthread_sigqueue.
185         * Versions: Add pthread_sigqueue for GLIBC_2.11.
186         * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
187         * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
189 2009-06-11  Ulrich Drepper  <drepper@redhat.com>
191         [BZ #10262]
192         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
193         (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
194         cannot be assumed.
195         Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
197 2009-05-16  Ulrich Drepper  <drepper@redhat.com>
199         * libc-cancellation.c: Move __libc_cleanup_routine to...
200         * libc-cleanup.c: ...here.  New file.
201         * Makefile (routines): Add libc-cleanup.
203         * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
204         test.
205         * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
206         * sysdeps/pthread/librt-cancellation.c: Likewise.
208         [BZ #9924]
209         * nptl-init.c: Renamed from init.c.
210         * Makefile: Change all occurences of init.c to nptl-init.c.
212 2009-05-15  Ulrich Drepper  <drepper@redhat.com>
214         * cancellation.c (__pthread_disable_asynccancel): Correct the bits
215         to test when deciding on the delay.
216         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
217         * pthread_cancel.c: Close race between deciding on sending a signal
218         and setting the CANCELING_BIT bit.
220         * cancellation.c (__pthread_disable_asynccancel): Don't return if
221         thread is canceled.
222         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
224 2009-04-27  Ulrich Drepper  <drepper@redhat.com>
226         * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
227         is available.
228         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
229         * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
230         * sysdeps/i386/tls.h: Likewise.
231         (tcbhead_t): Add __private_tm member.
233 2009-04-26  Ulrich Drepper  <drepper@redhat.com>
235         * sem_open.c (sem_open): Rewrite initialization of initsem to
236         avoid warnings.
238         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
239         Avoid warning by using may_alias attribute on ptrhack.
241 2009-04-22  Ulrich Drepper  <drepper@redhat.com>
243         [BZ #10090]
244         * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
245         Check policy and priority for validity.
246         Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
248 2009-03-15  Ulrich Drepper  <drepper@redhat.com>
250         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
251         (__pthread_cond_timedwait): Change to use cfi directives instead of
252         hand-coded unwind sections.
254 2009-03-10  Ulrich Drepper  <drepper@redhat.com>
256         * init.c (nptl_freeres): Compile only for SHARED.
258 2009-03-09  Jakub Jelinek  <jakub@redhat.com>
260         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
261         FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
262         FUTEX_BITSET_MATCH_ANY.
264 2009-02-27  Roland McGrath  <roland@redhat.com>
266         * init.c (__nptl_initial_report_events): Mark __attribute_used__.
267         * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
269 2009-02-26  Ulrich Drepper  <drepper@redhat.com>
271         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
272         _POSIX_THREAD_ROBUST_PRIO_INHERIT and
273         _POSIX_THREAD_ROBUST_PRIO_PROTECT.  Reset value of macros from
274         200112L to 200809L.
276 2009-02-25  Ulrich Drepper  <drepper@redhat.com>
278         * sysdeps/pthread/pthread.h: The robust mutex functions are in
279         POSIX 2008.
281 2009-02-24  Ulrich Drepper  <drepper@redhat.com>
283         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
284         Unify name of include protector macro.
286 2009-02-14  SUGIOKA Toshinobu  <sugioka@itonet.co.jp>
288         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
289         LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
291 2009-01-29  Ulrich Drepper  <drepper@redhat.com>
293         * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
294         pointer variables.
296         * allocatestack.c (__free_stacks): Renamed from free_stacks.
297         (__free_stack_cache): Removed.  Change callers to call __free_stacks.
298         * init.c (nptl_freeres): New function.
299         (pthread_functions): Initialize ptr_freeres to nptl_freeres.
300         * pthreadP.h: Don't declare __free_stack_cache.  Declare __free_stacks.
301         * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
302         variable.
303         (pthread_cancel_init): Depend in libgcc_s_handle for decision to
304         load DSO.  Assign last.
305         (__unwind_freeres): New function.
307         * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
308         for better debugging.  No need to use stack_list_add here.
310 2009-01-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
312         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
313         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
314         instead of computing relative timeout.
315         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
316         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
318 2009-01-25  Ulrich Drepper  <drepper@redhat.com>
320         * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
322 2009-01-08  Ulrich Drepper  <drepper@redhat.com>
324         * sysdeps/pthread/list.h (list_add): Initialize new element first.
325         (list_add_tail): Removed.
327 2009-01-07  Ulrich Drepper  <drepper@redhat.com>
329         * (in_flight_stack): New variable.
330         (stack_list_del): New function.  Use instead of list_del.
331         (stack_list_add): New function.  Use instead of list_add when adding to
332         stack_cache and stack_used lists.
333         (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
334         when the fork call interrupted another thread.
336 2009-01-04  Ulrich Drepper  <drepper@redhat.com>
338         * init.c (__pthread_initialize_minimal_internal): Optimize test
339         FUTEX_CLOCK_REALTIME a bit.
341 2009-01-03  Ulrich Drepper  <drepper@redhat.com>
343         * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
344         only passing five parameters to FUTEX_WAIT_BITSET call.
346         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
347         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
348         instead of computing relative timeout.
350 2009-01-02  Ulrich Drepper  <drepper@redhat.com>
352         * init.c (__pthread_initialize_minimal_internal): Check for
353         FUTEX_CLOCK_REALTIME flag.
354         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
355         Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
356         relative timeout.
358         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
359         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
360         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
361         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
362         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
363         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
365 2008-12-09  Ulrich Drepper  <drepper@redhat.com>
367         * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
368         loop body instead of ; to avoid gcc warnings.
369         (pthread_cleanup_pop_restore_np): Likewise.
370         Patch by Caolán McNamara <caolanm@redhat.com>.
372 2008-12-09  Jakub Jelinek  <jakub@redhat.com>
374         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
375         fast path here, for robust/PI/PP mutexes call
376         __pthread_mutex_lock_full.  Don't use switch, instead use a series
377         of ifs according to their probability.
378         (__pthread_mutex_lock_full): New function.
379         * pthread_mutex_unlock.c: Include assert.h.
380         (__pthread_mutex_unlock_usercnt): Handle only the
381         fast path here, for robust/PI/PP mutexes call
382         __pthread_mutex_unlock_full.  Don't use switch, instead use a series
383         of ifs according to their probability.
384         (__pthread_mutex_unlock_full): New function.
385         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
386         (__pthread_mutex_lock_full): Define.
388 2008-12-08  Ulrich Drepper  <drepper@redhat.com>
390         * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
391         implementation.  Add necessary padding and.
392         * descr.h (struct pthread): Increase padding for tcbhead_t to 24
393         words.
395 2008-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
397         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
398         and FUTEX_WAKE_BITSET.
400 2008-12-02  Ulrich Drepper  <drepper@redhat.com>
402         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
403         and FUTEX_WAKE_BITSET.
404         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
405         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
406         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
407         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
409 2008-11-25  Roland McGrath  <roland@redhat.com>
411         * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
412         Subdirectories moved to ports repository as
413         sysdeps/.../nptl subdirectories.
415 2008-11-12  Jakub Jelinek  <jakub@redhat.com>
417         [BZ #7008]
418         * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
419         of old value.
420         * pthread_cond_init.c (__pthread_cond_init): Fix
421         cond->__data.__nwaiters initialization.
422         * Makefile (tests): Add tst-cond23.
423         * tst-cond23.c: New test.
425 2008-11-07  Jakub Jelinek  <jakub@redhat.com>
427         * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
428         arguments.
429         (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
430         arguments.
432 2008-11-01  Ulrich Drepper  <drepper@redhat.com>
434         [BZ #6955]
435         * pthread_mutex_lock.c: Add support for private PI mutexes.
436         * pthread_mutex_timedlock.c: Likewise.
437         * pthread_mutex_trylock.c: Likewise.
438         * pthread_mutex_unlock.c: Likewise.
439         Patch mostly by Ben Jackson <ben@ben.com>.
441 2008-10-31  Ulrich Drepper  <drepper@redhat.com>
443         [BZ #6843]
444         * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
445         Increase stack size for helper thread.
447 2008-10-06  Martin Schwidefsky  <schwidefsky@de.ibm.com>
449         * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
450         assembly with a clobber list for access registers a0 and a1.
452 2008-09-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
454         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
455         to force runp->refcntr to be read from memory.
457 2008-09-08  Richard Guenther  <rguenther@suse.de>
459         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
460         lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
461         lll_timedlock, lll_robust_timedlock, lll_unlock,
462         lll_robust_unlock): Promote private to int.
464 2008-08-15  Ulrich Drepper  <drepper@redhat.com>
466         * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
467         ARCH_RETRY_MMAP definitions.
468         * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
469         Define MAP_STACK when not defined.
470         (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS.  Remove
471         handling of ARCH_RETRY_MMAP.
473 2008-07-30  Ulrich Drepper  <drepper@redhat.com>
475         * tst-align2.c (f): Print message that f is reached.
477 2008-04-28  Hiroki Kaminaga  <kaminaga@sm.sony.co.jp>
479         [BZ #6740]
480         * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
481         definition with #ifndef __ASSUME_PRIVATE_FUTEX.
483 2008-07-25  Ulrich Drepper  <drepper@redhat.com>
485         * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
486         SOCK_CLOEXEC if possible.
488 2008-05-29  Ulrich Drepper  <drepper@redhat.com>
490         * Makefile (tests): Add tst-rwlock2a.
491         * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
492         * tst-rwlock2a.c: New file.
494 2008-06-12  Ulrich Drepper  <drepper@redhat.com>
496         * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
498 2008-05-17  Samuel Thibault  <samuel.thibault@ens-lyon.org>
500         * sysdeps/pthread/pthread.h: Fix typo in comment.
502 2008-05-28  Ulrich Drepper  <drepper@redhat.com>
504         * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
505         of CPU set to the kernel.
507 2008-05-23  Paul Pluzhnikov  <ppluzhnikov@google.com>
509         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
510         cfi directives.
511         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
512         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
513         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
514         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
515         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
516         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
518 2008-05-22  Paul Pluzhnikov  <ppluzhnikov@google.com>
520         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
521         cfi directives.
522         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
523         Likewise.
524         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
525         Likewise.
526         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
527         Likewise.
529 2008-05-26  Ulrich Drepper  <drepper@redhat.com>
531         * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
533 2008-05-20  Jakub Jelinek  <jakub@redhat.com>
535         David S. Miller  <davem@davemloft.net>
537         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
539 2008-05-10  Ulrich Drepper  <drepper@redhat.com>
541         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
542         __pshared correctly.
543         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
544         Likewise.
545         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
546         Likewise.
547         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
548         Likewise.
549         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
550         Likewise.
551         Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
553 2008-04-14  David S. Miller  <davem@davemloft.net>
555         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
556         (__old_sem_wait): Fix argument to lll_futex_wait().
558 2007-11-26  Daniel Jacobowitz  <dan@codesourcery.com>
560         * pthread_create.c: Require pthread_mutex_trylock and
561         pthread_key_delete for libgcc.
563 2008-04-08  Jakub Jelinek  <jakub@redhat.com>
565         [BZ #6020]
566         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
567         (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
568         Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
570 2008-03-27  Ulrich Drepper  <drepper@redhat.com>
572         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
573         <linux/limits.h> has defined it.
574         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
575         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
576         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
577         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
579 2008-03-18  Jakub Jelinek  <jakub@redhat.com>
581         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
582         of ASSEMBLER.
583         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
584         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
586 2008-03-14  Ulrich Drepper  <drepper@redhat.com>
588         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
589         HAVE_DL_DISCOVER_OSVERSION.
590         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
591         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
593 2008-03-07  Ulrich Drepper  <drepper@redhat.com>
595         [BZ #5778]
596         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
597         _POSIX_CHOWN_RESTRICTED value to zero.
599 2008-01-31  Roland McGrath  <roland@redhat.com>
601         * Makefile (omit-deps): Variable removed.
603 2008-01-30  Ulrich Drepper  <drepper@redhat.com>
605         * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
606         unnecessary addr32 prefix.
608 2008-01-29  Roland McGrath  <roland@redhat.com>
610         * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
612 2008-01-22  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
614         * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
616 2008-01-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
618         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
619         a scratch register.
620         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
621         (__lll_lock_wait_private): Fix typo.
622         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
623         (pthread_barrier_wait): Likewise.  Adjust XADD use.
624         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
625         Adjust XADD use.
626         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
627         (pthread_rwlock_timedrdlock): Return correct return value.
628         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
629         (pthread_rwlock_timedwrlock): Likewise.
631 2008-01-15  Ulrich Drepper  <drepper@redhat.com>
633         * tst-eintr2.c (do_test): make sure that if mutex_lock in main
634         thread returns the program exits with an error code.
636 2008-01-10  Ulrich Drepper  <drepper@redhat.com>
638         * pthread-errnos.sym: Add EOVERFLOW.
639         * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
640         * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
641         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
642         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
644 2007-12-14  Ulrich Drepper  <drepper@redhat.com>
646         * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
647         parameter.  Passed it as permission to mmap.
648         * allocatestack.c (allocate_stack): Pass prot as second parameter
649         to ARCH_RETRY_MMAP.
651 2007-12-12  Ulrich Drepper  <drepper@redhat.com>
653         * tst-basic7.c: Allocate memory for the stack.
655         [BZ #5465]
656         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
657         (__pthread_cond_timedwait): Don't use VDSO.
658         Patch by Michal Januszewski.
660 2007-12-07  Ulrich Drepper  <drepper@redhat.com>
662         [BZ #5455]
663         * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
664         Allow label before pthread_cleanup_pop.
665         (pthread_cleanup_pop_restore_np): Likewise.
667 2007-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
669         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
670         Store 2 before returning ETIMEDOUT.
672 2007-11-23  Ulrich Drepper  <drepper@redhat.com>
674         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
675         Store 2 before returning ETIMEDOUT.
676         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
677         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
678         (__lll_lock_wait_private): Optimize.
679         (__lll_lock_wait): Likewise.
681 2007-11-20  Jakub Jelinek  <jakub@redhat.com>
683         * sysdeps/pthread/pthread.h (pthread_cleanup_push,
684         pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
685         g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
687 2007-11-08  Ulrich Drepper  <drepper@redhat.com>
689         [BZ #5240]
690         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
691         If we time out, try one last time to lock the futex to avoid
692         losing a wakeup signal.
693         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
694         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
696         [BZ #5245]
697         * sysdeps/pthread/createthread.c (do_clone): Translate clone error
698         if necessary.
700 2007-11-07  Ulrich Drepper  <drepper@redhat.com>
702         [BZ #5245]
703         * allocatestack.c (allocate_stack): Change ENOMEM error in case
704         mmap failed to EAGAIN.
705         * Makefile (tests): Add tst-basic7.
706         * tst-basic7.c: New file.
708 2007-11-05  Ulrich Drepper  <drepper@redhat.com>
710         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
711         Use __linkin_atfork.
713 2007-11-03  Mike Frysinger  <vapier@gentoo.org>
715         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
716         missing line continuations.
717         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
718         LOAD_FUTEX_WAKE): Likewise.  Also add missing 3rd parameter.
720 2007-10-28  Ulrich Drepper  <drepper@redhat.com>
722         [BZ #5220]
723         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
724         __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
725         (struct timer): Add next element.
726         * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
727         enqueue timer structure into __active_timer_sigev_thread list.
728         * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
729         remove timer struct from __active_timer_sigev_thread.
730         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
731         Before using timer structure make sure it is still on the
732         __active_timer_sigev_thread list.  Keep lock until done.
733         Define __active_timer_sigev_thread and
734         __active_timer_sigev_thread_lock.
736 2007-10-27  Ulrich Drepper  <drepper@redhat.com>
738         * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
739         Redefine thread_atfork for use of ATFORK_MEM.
740         * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
741         * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
742         function.
743         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
744         Use atomic operation when removing first element of list.
746 2007-10-17  Jakub Jelinek  <jakub@redhat.com>
748         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
749         routine instead of an alias to __new_sem_post.
751 2007-10-15  Jakub Jelinek  <jakub@redhat.com>
753         * init.c (__pthread_initialize_minimal): Initialize word to appease
754         valgrind.
756 2007-10-10  Jakub Jelinek  <jakub@redhat.com>
758         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
759         libc.so just clear NAME.
760         (__libc_rwlock_fini): Nop inside of libc.so.
761         * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
762         all zeros.
764 2007-09-02  Ulrich Drepper  <drepper@redhat.com>
766         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
767         (__pthread_cond_wait): Fix unlocking of internal lock after mutex
768         unlocking failed.
769         Patch by Luca Barbieri <luca.barbieri@gmail.com>.
771 2007-08-21  Ulrich Drepper  <drepper@redhat.com>
773         [BZ #4938]
774         * allocatestack.c (__reclaim_stacks): Clear the TSD in the
775         reclaimed stack if necessary.
776         * Makefile (tests): Add tst-tsd6.
777         * tst-tsd6.c: New file.
779 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
781         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
782         Add private argument.
784 2007-08-20  Ulrich Drepper  <drepper@redhat.com>
786         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
787         (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
789 2007-08-16  Jakub Jelinek  <jakub@redhat.com>
791         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
792         (__lll_robust_timedlock): Pass private as last argument to
793         __lll_robust_timedlock_wait.
794         (__lll_unlock): Fix a pasto.
796 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
798         * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
799         sparc_old_sem): New structs.
800         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
801         (__sem_wait_cleanup): New function.
802         (__new_sem_wait): Use sparc_new_sem structure.  Bump and afterwards
803         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
804         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
805         lll_futex_wait.
806         (__old_sem_wait): New function.
807         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
808         nptl/sysdeps/unix/sysv/linux/sparc version.
809         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
810         Likewise.
811         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
812         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
813         (__new_sem_trywait): Use sparc_old_sem structure.
814         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
815         (sem_timedwait): Use sparc_new_sem structure.  Bump and afterwards
816         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
817         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
818         lll_futex_timed_wait.
819         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
820         Use sparc_new_sem structure.  Only wake if nwaiters > 0.  Pass
821         isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
822         lll_futex_wake.
823         (__old_sem_post): New function.
824         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
825         * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
826         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
827         * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
828         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
829         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
831 2007-08-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
833         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
834         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
835         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
836         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
837         * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
838         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
839         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
840         Use FUTEX_WAKE_OP.
841         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
842         kernel-features.h and tcb-offsets.h.
843         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
844         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
845         process private.
846         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
847         tcb-offsets.h.
848         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
849         to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
850         process private.
851         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
852         __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
853         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
854         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
855         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
856         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
857         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
859 2007-08-14  Jakub Jelinek  <jakub@redhat.com>
861         * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
862         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
863         (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
864         lll_futex_timed_wait.
866         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
867         __lll_robust_unlock): Rewrite as macros instead of inline functions.
868         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
869         __lll_robust_unlock, __lll_wait_tid): Likewise.
871 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
873         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
874         Fix a pasto.
875         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
876         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
877         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
878         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
879         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
880         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
881         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
882         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
883         kernel-features.h.
884         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
885         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
886         process private.  Switch DW_CFA_advance_loc1 and some
887         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
888         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
889         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
890         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
891         process private.  Switch DW_CFA_advance_loc{1,2} and some
892         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
893         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
894         #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
895         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
896         Likewise.
897         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
898         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
899         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
900         Likewise.
901         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
902         (__pthread_cond_broadcast): Compare %r8 instead of
903         dep_mutex-cond_*(%rdi) with $-1.
904         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
905         (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
906         of oring.
908 2007-08-13  Ulrich Drepper  <drepper@redhat.com>
910         * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
912 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
914         * allocatestack.c: Include kernel-features.h.
915         * pthread_create.c: Likewise.
916         * pthread_mutex_init.c: Likewise.
917         * init.c: Likewise.
918         * pthread_cond_timedwait.c: Likewise.
919         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
920         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
921         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
922         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
923         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
924         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
925         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
926         Likewise.
927         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
928         Likewise.
929         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
930         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
931         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
932         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
934 2007-08-12  Jakub Jelinek  <jakub@redhat.com>
936         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
937         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
938         byte elements.  One of them is the new __shared element.
939         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
940         adjust names of other padding elements.
941         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
942         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
943         byte elements.  One of them is the new __shared element.
944         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
945         adjust names of other padding elements.
946         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
947         Renamed __pad1 element to __shared, adjust names of other padding
948         elements.
949         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
950         (pthread_rwlock_t): Likewise.
951         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
952         typo.
954 2007-08-09  Anton Blanchard  <anton@samba.org>
956         * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
958 2007-08-12  Ulrich Drepper  <drepper@redhat.com>
960         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
961         <kernel-features.h>.
962         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
964 2007-08-11  Ulrich Drepper  <drepper@redhat.com>
966         * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
967         * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
968         dealing with robust mutexes.
969         * pthread_mutex_timedlock.c: Likewise.
970         * pthread_mutex_trylock.c: Likewise.
971         * pthread_mutex_unlock.c: Likewise.
972         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
974 2007-08-06  Jakub Jelinek  <jakub@redhat.com>
976         * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
977         (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
978         (PTHREAD_MUTEX_PSHARED): Define.
979         * pthread_mutex_init.c (__pthread_mutex_init): Set
980         PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
981         mutexes.
982         * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
983         instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
984         as second argument to lll_lock.
985         (LLL_MUTEX_TRYLOCK): Take mutex as argument
986         instead of its __data.__lock field.
987         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
988         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
989         to lll_robust_lock.
990         (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
991         LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
992         instead of mutex->__data.__kind directly, pass
993         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
994         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
995         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
996         directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
997         (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
998         to lll_timedlock, lll_robust_timedlock, lll_unlock and
999         lll_futex_timed_wait.  Use PTHREAD_MUTEX_TYPE (mutex) instead
1000         of mutex->__data.__kind directly.
1001         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
1002         PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
1003         lll_robust_timedlock, lll_unlock and lll_futex_timed_wait.  Use
1004         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
1005         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
1006         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
1007         and lll_futex_wake.
1008         * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
1009         PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
1010         Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
1011         directly.
1012         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
1013         Take mutex as argument instead of its __data.__lock field, pass
1014         PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
1015         (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
1016         __data.__lock field.
1017         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
1018         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
1019         to lll_robust_cond_lock.
1020         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
1021         variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
1022         lll_futex_wake.  Don't use lll_futex_requeue if dependent mutex
1023         has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
1024         * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
1025         variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
1026         lll_futex_wait.
1027         * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
1028         variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
1029         lll_futex_wake.
1030         * pthread_cond_timedwait.c (__pthread_cond_wait): Add
1031         pshared variable, pass it to lll_lock, lll_unlock,
1032         lll_futex_timedwait and lll_futex_wake.
1033         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
1034         pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
1035         and lll_futex_wake.
1036         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
1037         lll_futex_wake_unlock): Add private argument, use __lll_private_flag
1038         macro.
1039         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
1040         lll_futex_wake_unlock): Likewise.
1041         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
1042         Likewise.
1043         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
1044         lll_futex_wake_unlock): Likewise.
1045         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
1046         Likewise.
1047         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
1048         lll_futex_wake_unlock): Likewise.
1049         (lll_futex_wake): Fix a typo.
1050         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
1051         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
1052         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
1053         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1054         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
1055         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1056         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
1057         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1058         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1059         (__pthread_cond_timedwait): Likewise.
1060         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
1061         (__condvar_cleanup, __pthread_cond_wait): Likewise.
1063 2007-08-05  Jakub Jelinek  <jakub@redhat.com>
1065         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
1066         Don't use CGOTSETUP and CGOTRESTORE macros.
1067         (CGOTSETUP, CGOTRESTORE): Remove.
1068         <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
1069         @local symbol.
1071 2007-08-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1073         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
1074         definitions for private futexes.
1075         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
1076         kernel-features.h and lowlevellock.h.  Use private futexes if
1077         they are available.
1078         (__lll_lock_wait_private, __lll_unlock_wake_private): New.
1079         (__lll_mutex_lock_wait): Rename to
1080         (__lll_lock_wait): ... this.  Don't compile in for libc.so.
1081         (__lll_mutex_timedlock_wait): Rename to ...
1082         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.
1083         Don't compile in for libc.so.
1084         (__lll_mutex_unlock_wake): Rename to ...
1085         (__lll_unlock_wake): ... this.  Don't compile in for libc.so.
1086         (__lll_timedwait_tid): Use __NR_gettimeofday.
1087         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
1088         the header from assembler.  Renamed all lll_mutex_* resp.
1089         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
1090         Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
1091         (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
1092         Define.
1093         (__lll_lock_wait_private): Add prototype.
1094         (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
1095         __lll_robust_timedlock_wait, __lll_unlock_wake_private,
1096         __lll_unlock_wake): Likewise.
1097         (lll_lock): Add private argument.  Call __lll_lock_wait_private
1098         if private is constant LLL_PRIVATE.
1099         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1100         lll_timedlock, lll_robust_timedlock): Add private argument.
1101         (lll_unlock): Add private argument.  Call __lll_unlock_wake_private
1102         if private is constant LLL_PRIVATE.
1103         (lll_robust_unlock, lll_robust_dead): Add private argument.
1104         (lll_lock_t): Remove.
1105         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1106         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1107         lll_cond_wake, lll_cond_broadcast): Remove.
1108         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
1109         kernel-features.h and lowlevellock.h.
1110         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1111         (LOAD_FUTEX_WAIT): Define.
1112         (__lll_robust_mutex_lock_wait): Rename to ...
1113         (__lll_robust_lock_wait): ... this.  Add private argument.
1114         Use LOAD_FUTEX_WAIT macro.
1115         (__lll_robust_mutex_timedlock_wait): Rename to ...
1116         (__lll_robust_timedlock_wait): ... this.    Add private argument.
1117         Use __NR_gettimeofday.  Use LOAD_FUTEX_WAIT macro.
1118         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
1119         lowlevellock.h.
1120         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1121         (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
1122         __lll_mutex_{lock,unlock}_*.
1123         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
1124         lowlevellock.h and pthread-errnos.h.
1125         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1126         FUTEX_CMP_REQUEUE, EINVAL): Remove.
1127         (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
1128         __lll_mutex_{lock,unlock}_*.
1129         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
1130         lowlevellock.h and pthread-errnos.h.
1131         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
1132         (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
1133         __lll_mutex_{lock,unlock}_*.
1134         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
1135         lowlevellock.h.
1136         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
1137         (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
1138         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
1139         (__condvar_tw_cleanup): Likewise.
1140         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
1141         lowlevellock.h.
1142         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1143         (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
1144         __lll_mutex_{lock,unlock}_*.
1145         ( __condvar_w_cleanup): Likewise.
1146         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
1147         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1148         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
1149         lowlevellock.h.
1150         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1151         (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
1152         __lll_mutex_{lock,unlock}_*.
1153         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
1154         lowlevellock.h.
1155         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1156         FUTEX_PRIVATE_FLAG): Remove.
1157         (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
1158         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
1159         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
1160         lowlevellock.h.
1161         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1162         FUTEX_PRIVATE_FLAG): Remove.
1163         (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
1164         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
1165         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
1166         lowlevellock.h.
1167         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1168         (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
1169         __lll_mutex_{lock,unlock}_*.
1170         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
1171         lowlevellock.h.
1172         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1173         (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
1174         __lll_mutex_{lock,unlock}_*.
1175         * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
1176         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1177         (__new_sem_post): Use standard initial exec code sequences.
1178         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
1179         lowlevellock.h.
1180         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1181         FUTEX_PRIVATE_FLAG): Remove.
1182         (sem_timedwait): Use __NR_gettimeofday.  Use standard initial
1183         exec code sequences.
1184         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
1185         (__new_sem_trywait): Use standard initial exec code sequences.
1186         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
1187         (__new_sem_wait): Use standard initial exec code sequences.
1189 2007-07-31  Anton Blanchard  <anton@samba.org>
1191         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1192         Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
1193         atomic_full_barrier.
1195 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
1197         * allocatestack.c (stack_cache_lock): Change type to int.
1198         (get_cached_stack, allocate_stack, __deallocate_stack,
1199         __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
1200         __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
1201         as second argument to lll_lock and lll_unlock macros on
1202         stack_cache_lock.
1203         * pthread_create.c (__find_in_stack_list): Likewise.
1204         (start_thread): Similarly with pd->lock.  Use lll_robust_dead
1205         macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
1206         as second argument.
1207         * descr.h (struct pthread): Change lock and setxid_futex field
1208         type to int.
1209         * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
1210         LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
1211         * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
1212         * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
1213         Likewise.
1214         * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
1215         * pthread_cond_init.c (__pthread_cond_init): Likewise.
1216         * pthreadP.h (__attr_list_lock): Change type to int.
1217         * pthread_attr_init.c (__attr_list_lock): Likewise.
1218         * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
1219         ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
1220         lll_{,un}lock.
1221         * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
1222         also for lll_futex_{wake,wait}.
1223         * pthread_barrier_init.c (pthread_barrier_init): Make iattr
1224         a pointer to const.
1225         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
1226         LLL_SHARED as second argument to lll_{,un}lock.
1227         * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
1228         * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
1229         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1230         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
1231         Likewise.
1232         * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
1233         as second argument to lll_{,un}lock macros on pd->lock.
1234         * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
1235         * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
1236         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
1237         * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
1238         Likewise.
1239         * sysdeps/pthread/createthread.c (do_clone, create_thread):
1240         Likewise.
1241         * pthread_once.c (once_lock): Change type to int.
1242         (__pthread_once): Pass LLL_PRIVATE as second argument to
1243         lll_{,un}lock macros on once_lock.
1244         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
1245         lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
1246         rwlock->__data.__shared as second argument to them and similarly
1247         for lll_futex_w*.
1248         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
1249         Likewise.
1250         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
1251         Likewise.
1252         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
1253         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
1254         * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
1255         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1256         * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
1257         to lll_{,un}lock macros on __sem_mappings_lock.
1258         * sem_open.c (check_add_mapping): Likewise.
1259         (__sem_mappings_lock): Change type to int.
1260         * semaphoreP.h (__sem_mappings_lock): Likewise.
1261         * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
1262         LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
1263         instead of lll_*mutex_*, pass LLL_SHARED as last
1264         argument.
1265         (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
1266         pass LLL_SHARED as last argument.
1267         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
1268         LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
1269         lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
1270         pass LLL_SHARED as last argument.
1271         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
1272         lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
1273         LLL_SHARED as last argument.
1274         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
1275         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
1276         Similarly.
1277         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
1278         __libc_lock_lock_recursive, __libc_lock_unlock,
1279         __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
1280         argument to lll_{,un}lock.
1281         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
1282         _IO_lock_unlock): Likewise.
1283         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
1284         compound literal.
1285         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1286         Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
1287         __fork_lock.
1288         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
1289         free_mem): Likewise.
1290         (__fork_lock): Change type to int.
1291         * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
1292         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
1293         isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
1294         lll_futex_wake.
1295         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
1296         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
1297         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
1298         New function.
1299         (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
1300         pass it through to lll_futex_*wait, only compile in when
1301         IS_IN_libpthread.
1302         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1303         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
1304         argument and pass it through to lll_futex_*wait.
1305         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
1306         lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
1307         lll_robust_*.  Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
1308         inline functions to __lll_* resp. __lll_robust_*.
1309         (LLL_MUTEX_LOCK_INITIALIZER): Remove.
1310         (lll_mutex_dead): Add private argument.
1311         (__lll_lock_wait_private): New prototype.
1312         (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
1313         __lll_robust_lock_timedwait): Add private argument to prototypes.
1314         (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
1315         call __lll_lock_wait_private, otherwise pass private to
1316         __lll_lock_wait.
1317         (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
1318         __lll_robust_timedlock): Add private argument, pass it to
1319         __lll_*wait functions.
1320         (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
1321         call __lll_unlock_wake_private, otherwise pass private to
1322         __lll_unlock_wake.
1323         (__lll_robust_unlock): Add private argument, pass it to
1324         __lll_robust_unlock_wake.
1325         (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
1326         lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
1327         argument, pass it through to __lll_* inline function.
1328         (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
1329         (lll_lock_t): Remove.
1330         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1331         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1332         lll_cond_wake, lll_cond_broadcast): Remove.
1333         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1334         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1335         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1336         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1337         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
1338         the header from assembler.  Renamed all lll_mutex_* resp.
1339         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
1340         (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
1341         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1342         (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
1343         LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
1344         (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
1345         __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
1346         Remove prototype.
1347         (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
1348         (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
1349         rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
1350         (lll_trylock): Likewise, use __lll_trylock_asm, pass
1351         MULTIPLE_THREADS_OFFSET as another asm operand.
1352         (lll_lock): Add private argument, use __lll_lock_asm_start, pass
1353         MULTIPLE_THREADS_OFFSET as last asm operand, call
1354         __lll_lock_wait_private if private is constant LLL_PRIVATE,
1355         otherwise pass private as another argument to __lll_lock_wait.
1356         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1357         lll_timedlock, lll_robust_timedlock): Add private argument, pass
1358         private as another argument to __lll_*lock_wait call.
1359         (lll_unlock): Add private argument, use __lll_unlock_asm, pass
1360         MULTIPLE_THREADS_OFFSET as another asm operand, call
1361         __lll_unlock_wake_private if private is constant LLL_PRIVATE,
1362         otherwise pass private as another argument to __lll_unlock_wake.
1363         (lll_robust_unlock): Add private argument, pass private as another
1364         argument to __lll_unlock_wake.
1365         (lll_robust_dead): Add private argument, use __lll_private_flag
1366         macro.
1367         (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
1368         LLL_MUTEX_LOCK_INITIALIZER.
1369         (lll_lock_t): Remove.
1370         (LLL_LOCK_INITIALIZER_WAITERS): Define.
1371         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1372         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1373         lll_cond_wake, lll_cond_broadcast): Remove.
1374         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1375         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
1376         2007-05-2{3,9} changes.
1377         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
1378         kernel-features.h and lowlevellock.h.
1379         (LOAD_PRIVATE_FUTEX_WAIT): Define.
1380         (LOAD_FUTEX_WAIT): Rewritten.
1381         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1382         define.
1383         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1384         (__lll_mutex_lock_wait): Rename to ...
1385         (__lll_lock_wait): ... this.  Take futex addr from %edx instead of
1386         %ecx, %ecx is now private argument.  Don't compile in for libc.so.
1387         (__lll_mutex_timedlock_wait): Rename to ...
1388         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.  %esi
1389         contains private argument.  Don't compile in for libc.so.
1390         (__lll_mutex_unlock_wake): Rename to ...
1391         (__lll_unlock_wake): ... this.  %ecx contains private argument.
1392         Don't compile in for libc.so.
1393         (__lll_timedwait_tid): Use __NR_gettimeofday.
1394         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
1395         kernel-features.h and lowlevellock.h.
1396         (LOAD_FUTEX_WAIT): Define.
1397         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1398         define.
1399         (__lll_robust_mutex_lock_wait): Rename to ...
1400         (__lll_robust_lock_wait): ... this.  Futex addr is now in %edx
1401         argument, %ecx argument contains private.  Use LOAD_FUTEX_WAIT
1402         macro.
1403         (__lll_robust_mutex_timedlock_wait): Rename to ...
1404         (__lll_robust_timedlock_wait): ... this.  Use __NR_gettimeofday.
1405         %esi argument contains private, use LOAD_FUTEX_WAIT macro.
1406         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
1407         lowlevellock.h.
1408         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1409         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1410         PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
1411         __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
1412         to __lll_lock_wait in %edx.
1413         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1414         Include lowlevellock.h and pthread-errnos.h.
1415         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1416         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1417         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
1418         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1419         pass LLL_SHARED in %ecx to both __lll_lock_wait and
1420         __lll_unlock_wake.
1421         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1422         Include lowlevellock.h and pthread-errnos.h.
1423         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1424         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1425         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
1426         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1427         pass LLL_SHARED in %ecx to both __lll_lock_wait and
1428         __lll_unlock_wake.
1429         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1430         Include lowlevellock.h.
1431         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1432         Don't define.
1433         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
1434         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1435         pass LLL_SHARED in %ecx to both __lll_lock_wait and
1436         __lll_unlock_wake.  Use __NR_gettimeofday.
1437         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1438         Include lowlevellock.h.
1439         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1440         (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
1441         to __lll_*, pass cond_lock address in %edx rather than %ecx to
1442         __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
1443         and __lll_unlock_wake.
1444         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
1445         Include lowlevellock.h.
1446         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1447         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
1448         MUTEX(%ebx) address in %edx rather than %ecx to
1449         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1450         and __lll_unlock_wake.  Move return value from %ecx to %edx
1451         register.
1452         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1453         Include lowlevellock.h.
1454         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1455         Don't define.
1456         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1457         MUTEX(%ebp) address in %edx rather than %ecx to
1458         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1459         and __lll_unlock_wake.  Move return value from %ecx to %edx
1460         register.  Use __NR_gettimeofday.
1461         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1462         Include lowlevellock.h.
1463         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1464         Don't define.
1465         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1466         MUTEX(%ebp) address in %edx rather than %ecx to
1467         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1468         and __lll_unlock_wake.  Move return value from %ecx to %edx
1469         register.  Use __NR_gettimeofday.
1470         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1471         Include lowlevellock.h.
1472         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1473         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
1474         MUTEX(%edi) address in %edx rather than %ecx to
1475         __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
1476         and __lll_unlock_wake.
1477         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1478         Include lowlevellock.h.
1479         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1480         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1481         MUTEX(%ebx) address in %edx rather than %ecx to
1482         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1483         and __lll_unlock_wake.  Move return value from %ecx to %edx
1484         register.
1485         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
1486         lowlevellock.h.
1487         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1488         define.
1489         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
1490         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1491         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
1492         lowlevellock.h.
1493         (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
1494         (sem_timedwait): Use __NR_gettimeofday.
1495         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
1496         lowlevellock.h.
1497         (LOCK): Don't define.
1498         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
1499         lowlevellock.h.
1500         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1501         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
1502         are waiters.
1503         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
1504         2007-05-2{3,9} changes.
1505         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
1506         kernel-features.h and lowlevellock.h.
1507         (LOAD_PRIVATE_FUTEX_WAIT): Define.
1508         (LOAD_FUTEX_WAIT): Rewritten.
1509         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1510         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1511         (__lll_mutex_lock_wait): Rename to ...
1512         (__lll_lock_wait): ... this.  %esi is now private argument.
1513         Don't compile in for libc.so.
1514         (__lll_mutex_timedlock_wait): Rename to ...
1515         (__lll_timedlock_wait): ... this.  %esi contains private argument.
1516         Don't compile in for libc.so.
1517         (__lll_mutex_unlock_wake): Rename to ...
1518         (__lll_unlock_wake): ... this.  %esi contains private argument.
1519         Don't compile in for libc.so.
1520         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
1521         kernel-features.h and lowlevellock.h.
1522         (LOAD_FUTEX_WAIT): Define.
1523         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1524         (__lll_robust_mutex_lock_wait): Rename to ...
1525         (__lll_robust_lock_wait): ... this.  %esi argument contains private.
1526         Use LOAD_FUTEX_WAIT macro.
1527         (__lll_robust_mutex_timedlock_wait): Rename to ...
1528         (__lll_robust_timedlock_wait): ... this. %esi argument contains
1529         private, use LOAD_FUTEX_WAIT macro.
1530         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
1531         lowlevellock.h.
1532         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1533         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1534         PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
1535         __lll_lock_wait and __lll_unlock_wake.
1536         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
1537         Include lowlevellock.h and pthread-errnos.h.
1538         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1539         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1540         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
1541         pass LLL_SHARED in %esi to both __lll_lock_wait and
1542         __lll_unlock_wake.
1543         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
1544         Include lowlevellock.h and pthread-errnos.h.
1545         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1546         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1547         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
1548         pass LLL_SHARED in %esi to both __lll_lock_wait and
1549         __lll_unlock_wake.
1550         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
1551         Include lowlevellock.h.
1552         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1553         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
1554         pass LLL_SHARED in %esi to both __lll_lock_wait and
1555         __lll_unlock_wake.
1556         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
1557         Include lowlevellock.h.
1558         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1559         (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
1560         to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
1561         and __lll_unlock_wake.
1562         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
1563         Include lowlevellock.h.
1564         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1565         Don't define.
1566         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
1567         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1568         and __lll_unlock_wake.
1569         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1570         Include lowlevellock.h.
1571         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1572         Don't define.
1573         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1574         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1575         and __lll_unlock_wake.
1576         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1577         Include lowlevellock.h.
1578         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1579         Don't define.
1580         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1581         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1582         and __lll_unlock_wake.
1583         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
1584         Include lowlevellock.h.
1585         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1586         Don't define.
1587         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
1588         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1589         and __lll_unlock_wake.
1590         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
1591         Include lowlevellock.h.
1592         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1593         Don't define.
1594         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1595         pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
1596         and __lll_unlock_wake.
1597         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
1598         lowlevellock.h.
1599         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1600         define.
1601         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
1602         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1603         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
1604         lowlevellock.h.
1605         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1606         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
1607         lowlevellock.h.
1608         (LOCK): Don't define.
1609         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
1610         lowlevellock.h.
1611         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1612         * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
1613         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
1614         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
1615         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
1616         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
1617         (__lll_lock_wait_private): New function.
1618         (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
1619         it to lll_futex_*wait.  Don't compile in for libc.so.
1620         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
1621         Remove.
1622         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
1623         (struct sparc_pthread_barrier): Remove.
1624         (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
1625         struct sparc_pthread_barrier.  Pass
1626         ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
1627         and lll_futex_wait macros.
1628         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
1629         Remove.
1630         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1631         Include sparc pthread_barrier_wait.c instead of generic one.
1633 2007-07-30  Jakub Jelinek  <jakub@redhat.com>
1635         * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
1637         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
1638         (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
1639         %ecx.
1640         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
1641         (pthread_rwlock_timedwrlock): Likewise.
1642         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
1643         (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
1645 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
1647         * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
1649 2007-07-26  Jakub Jelinek  <jakub@redhat.com>
1651         * tst-locale2.c (useless): Add return statement.
1653 2007-07-24  Jakub Jelinek  <jakub@redhat.com>
1655         * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
1656         lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
1657         * pthread_create.c (start_thread): Likewise.
1658         * init.c (sighandler_setxid): Likewise.
1659         * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1660         * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1661         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1662         * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1663         * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1664         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1665         * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1666         * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1667         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
1668         Likewise.
1669         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
1670         Likewise.
1671         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1672         Likewise.
1673         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
1674         __rtld_notify): Likewise.
1675         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
1676         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
1677         __pthread_once): Likewise.
1678         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
1679         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1680         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1681         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1682         (lll_futex_wait): Add private argument, define as wrapper around
1683         lll_futex_timed_wait.
1684         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1685         use __lll_private_flag macro.
1686         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1687         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1688         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
1689         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1690         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1691         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1692         (lll_futex_wait): Add private argument, define as wrapper around
1693         lll_futex_timed_wait.
1694         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1695         use __lll_private_flag macro.
1696         (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
1697         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1698         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1699         Define.
1700         (lll_futex_timed_wait, lll_futex_wake): Use it.
1701         (lll_private_futex_wait, lll_private_futex_timed_wait,
1702         lll_private_futex_wake): Removed.
1703         * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
1704         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1705         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1706         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1707         (lll_futex_wait): Add private argument, define as wrapper around
1708         lll_futex_timed_wait.
1709         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1710         use __lll_private_flag macro.
1711         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1712         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1713         to lll_futex_*.
1714         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1715         (lll_private_futex_wait, lll_private_futex_timed_wait,
1716         lll_private_futex_wake): Removed.
1717         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
1718         Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
1719         (lll_private_futex_wait, lll_private_futex_timed_wait,
1720         lll_private_futex_wake): Removed.
1721         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
1722         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1723         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1724         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1725         (lll_futex_wait): Add private argument, define as wrapper around
1726         lll_futex_timed_wait.
1727         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1728         use __lll_private_flag macro.
1729         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1730         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1731         to lll_futex_*.
1732         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
1733         Define.
1734         (lll_futex_timed_wait, lll_futex_wake): Use it.
1735         (lll_private_futex_wait, lll_private_futex_timed_wait,
1736         lll_private_futex_wake): Removed.
1738 2007-07-27  Jakub Jelinek  <jakub@redhat.com>
1740         * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
1741         of the structure for sparc32.
1743 2007-07-26  Aurelien Jarno  <aurelien@aurel32.net>
1745         * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
1747 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1749         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1750         code used when private futexes are assumed.
1751         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1752         Likewise.
1754 2007-07-23  Jakub Jelinek  <jakub@redhat.com>
1756         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1757         (__lll_private_flag): Define.
1758         (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
1759         (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
1760         __lll_private_flag.
1761         (lll_private_futex_wait, lll_private_futex_timedwait,
1762         lll_private_futex_wake): Define as wrapper around non-_private
1763         macros.
1764         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1765         (__lll_private_flag): Define.
1766         (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
1767         (lll_private_futex_wait, lll_private_futex_timedwait,
1768         lll_private_futex_wake): Define as wrapper around non-_private
1769         macros.
1771 2007-07-10  Steven Munroe  <sjmunroe@us.ibm.com>
1773         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
1774         parameter to lll_futex_wait call.
1775         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1777         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1778         Replace lll_futex_wait with lll_private_futex_wait.
1779         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1780         Add LLL_SHARED parameter to lll_futex_wake().
1782         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
1783         LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
1784         lll_private_futex_wake.
1785         (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
1786         bit from private parm before syscall.
1787         (lll_futex_timed_wait): Likewise.
1788         (lll_futex_wake): Likewise.
1789         (lll_futex_wake_unlock): Likewise.
1790         (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
1791         (lll_robust_mutex_unlock): Likewise.
1792         (lll_mutex_unlock_force): Likewise.
1793         (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
1795 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1797         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1798         compilation when unconditionally using private futexes.
1799         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1800         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1801         Likewise.
1802         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1803         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1805 2007-07-17  Jakub Jelinek  <jakub@redhat.com>
1807         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
1808         Define.
1810 2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1812         * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
1813         kernel-features.h.
1815 2007-05-16  Roland McGrath  <roland@redhat.com>
1817         * init.c (__nptl_initial_report_events): New variable.
1818         (__pthread_initialize_minimal_internal): Initialize pd->report_events
1819         to that.
1821 2007-06-22  Jakub Jelinek  <jakub@redhat.com>
1823         * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
1824         cpusetsize if pthread_getaffinity_np failed with ENOSYS.
1826 2007-06-19  Ulrich Drepper  <drepper@redhat.com>
1828         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
1829         implementation.
1831 2007-06-18  Ulrich Drepper  <drepper@redhat.com>
1833         * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
1834         * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
1835         * pthread_mutex_timedlock.c: Likewise.
1836         * pthread_mutex_trylock.c: Likewise.
1837         * pthread_mutex_unlock.c: Likewise.
1839 2007-06-17  Andreas Schwab  <schwab@suse.de>
1841         * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
1842         sections.
1844 2007-06-17  Ulrich Drepper  <drepper@redhat.com>
1846         * allocatestack.c (allocate_stack): Make code compile if
1847         __ASSUME_PRIVATE_FUTEX is set.
1849 2007-06-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1851         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
1852         (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
1853         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
1854         (__pthread_rwlock_wrlock): Likewise.
1855         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
1856         (pthread_rwlock_timedrdlock): Likewise.
1857         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
1858         (pthread_rwlock_timedwrlock): Likewise.
1859         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
1860         (__pthread_rwlock_unlock): Likewise.
1862 2007-06-10  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1864         * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
1865         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
1866         Split __flags into __flags, __shared, __pad1 and __pad2.
1867         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
1868         futexes if they are available.
1869         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
1870         in libc-lowlevellock.S allow using private futexes.
1871         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1872         FUTEX_PRIVATE_FLAG.  Add additional parameter to lll_futex_wait,
1873         lll_futex_timed_wait and lll_futex_wake.  Change lll_futex_wait
1874         to call lll_futex_timed_wait.  Add lll_private_futex_wait,
1875         lll_private_futex_timed_wait and lll_private_futex_wake.
1876         (lll_robust_mutex_unlock): Fix typo.
1877         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
1878         field in futex command setup.
1879         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
1880         COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
1881         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
1882         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
1883         if they are available.  Remove clear_once_control.
1884         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
1885         futexes if they are available.
1886         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1887         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1888         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1889         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1890         * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
1891         Wake only when there are waiters.
1892         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
1893         support.  Indicate that there are waiters.  Remove unnecessary
1894         extra cancellation test.
1895         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.  Removed
1896         left-over duplication of __sem_wait_cleanup.
1898 2007-06-07  Ulrich Drepper  <drepper@redhat.com>
1900         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
1901         parameter to lll_futex_wait, lll_futex_timed_wait, and
1902         lll_futex_wake.  Change lll_futex_wait to call lll_futex_timed_wait.
1903         Add lll_private_futex_wait, lll_private_futex_timed_wait, and
1904         lll_private_futex_wake.
1905         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1906         * allocatestack.c: Adjust use of lll_futex_* macros.
1907         * init.c: Likewise.
1908         * lowlevellock.h: Likewise.
1909         * pthread_barrier_wait.c: Likewise.
1910         * pthread_cond_broadcast.c: Likewise.
1911         * pthread_cond_destroy.c: Likewise.
1912         * pthread_cond_signal.c: Likewise.
1913         * pthread_cond_timedwait.c: Likewise.
1914         * pthread_cond_wait.c: Likewise.
1915         * pthread_create.c: Likewise.
1916         * pthread_mutex_lock.c: Likewise.
1917         * pthread_mutex_setprioceiling.c: Likewise.
1918         * pthread_mutex_timedlock.c: Likewise.
1919         * pthread_mutex_unlock.c: Likewise.
1920         * pthread_rwlock_timedrdlock.c: Likewise.
1921         * pthread_rwlock_timedwrlock.c: Likewise.
1922         * pthread_rwlock_unlock.c: Likewise.
1923         * sysdeps/alpha/tls.h: Likewise.
1924         * sysdeps/i386/tls.h: Likewise.
1925         * sysdeps/ia64/tls.h: Likewise.
1926         * sysdeps/powerpc/tls.h: Likewise.
1927         * sysdeps/pthread/aio_misc.h: Likewise.
1928         * sysdeps/pthread/gai_misc.h: Likewise.
1929         * sysdeps/s390/tls.h: Likewise.
1930         * sysdeps/sh/tls.h: Likewise.
1931         * sysdeps/sparc/tls.h: Likewise.
1932         * sysdeps/unix/sysv/linux/fork.c: Likewise.
1933         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1934         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
1935         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
1936         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
1937         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1938         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
1939         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
1940         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
1941         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
1942         Likewise.
1943         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
1944         * sysdeps/x86_64/tls.h: Likewise.
1946 2007-05-29  Ulrich Drepper  <drepper@redhat.com>
1948         * pthread_getattr_np.c: No need to install a cancellation handler,
1949         this is no cancellation point.
1950         * pthread_getschedparam.c: Likewise.
1951         * pthread_setschedparam.c: Likewise.
1952         * pthread_setschedprio.c: Likewise.
1953         * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
1954         lll_unlock_wake_cb.
1955         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1956         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1957         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1958         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1959         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1960         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1961         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
1962         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1963         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1964         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
1965         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1966         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1968         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
1969         whether there are more than one thread makes no sense here since
1970         we only call the slow path if the locks are taken.
1971         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
1973         * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
1974         COND_NWAITERS_SHIFT.
1975         * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
1976         COND_CLOCK_BITS.
1977         * pthread_cond_init.c: Likewise.
1978         * pthread_cond_timedwait.c: Likewise.
1979         * pthread_cond_wait.c: Likewise.
1980         * pthread_condattr_getclock.c: Likewise.
1981         * pthread_condattr_setclock.c: Likewise.
1982         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
1983         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1984         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1985         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1986         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1988 2007-05-28  Jakub Jelinek  <jakub@redhat.com>
1990         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
1991         unistd.h.
1993         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
1994         insn suffix.
1995         (THREAD_GSCOPE_GET_FLAG): Remove.
1996         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
1997         * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
1998         changes.
1999         * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
2000         (THREAD_GSCOPE_GET_FLAG): Remove.
2001         (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
2002         instead of THREAD_GSCOPE_GET_FLAG.
2003         (THREAD_GSCOPE_SET_FLAG): Likewise.  Add atomic_write_barrier after
2004         it.
2005         * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2006         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2007         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2008         THREAD_GSCOPE_WAIT): Define.
2009         * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2010         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2011         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2012         THREAD_GSCOPE_WAIT): Define.
2013         * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2014         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2015         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2016         THREAD_GSCOPE_WAIT): Define.
2017         * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2018         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2019         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2020         THREAD_GSCOPE_WAIT): Define.
2022 2007-05-24  Richard Henderson  <rth@redhat.com>
2024         * descr.h (struct pthread): Add header.gscope_flag.
2025         * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2026         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2027         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2028         THREAD_GSCOPE_WAIT): Define.
2030 2007-05-27  Ulrich Drepper  <drepper@redhat.com>
2032         * init.c: Make it compile with older kernel headers.
2034         * tst-initializers1.c: Show through exit code which test failed.
2036         * pthread_rwlock_init.c: Also initialize __shared field.
2037         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
2038         element in rwlock structure into four byte elements.  One of them is
2039         the new __shared element.
2040         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
2041         Likewise.
2042         [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
2043         __shared, adjust names of other padding elements.
2044         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2045         * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
2046         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
2047         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
2048         FUTEX_PRIVATE_FLAG.
2049         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
2050         futex to use private operations if possible.
2051         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2052         Likewise.
2053         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2054         Likewise.
2055         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
2056         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2057         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2058         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2059         Likewise.
2060         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2061         Likewise.
2062         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2063         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2065 2007-05-26  Ulrich Drepper  <drepper@redhat.com>
2067         * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
2068         * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
2069         * pthread_rwlock_timedrdlock.c: Likewise.
2070         * pthread_rwlock_tryrdlock.c: Likewise.
2072         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
2073         optimization.
2075         * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
2076         * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
2077         duplication of __sem_wait_cleanup.
2079         * allocatestack.c: Revert last change.
2080         * init.c: Likewise.
2081         * sysdeps/i386/tls.h: Likewise.
2082         * sysdeps/x86_64/tls.h: Likewise.
2083         * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
2084         header structure.
2085         * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
2087         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
2088         Add private field.
2089         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
2090         * pthread_barrier_init.c: Set private flag if pshared and private
2091         futexes are supported.
2092         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
2093         private field in futex command setup.
2094         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
2096 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
2098         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
2099         support.
2100         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2101         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2102         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2103         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2104         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2106         * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
2107         * sem_init.c (__new_sem_init): Rewrite to initialize all three
2108         fields in the structure.
2109         (__old_sem_init): New function.
2110         * sem_open.c: Initialize all fields of the structure.
2111         * sem_getvalue.c: Adjust for renamed element.
2112         * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
2113         (gen-as-const-headers): Add structsem.sym.
2114         * sysdeps/unix/sysv/linux/structsem.sym: New file.
2115         * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
2116         struct new_sem.  Add struct old_sem.
2117         * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
2118         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2119         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2120         * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
2121         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2122         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2123         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
2124         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2125         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2126         * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
2127         * tst-sem10.c: New file.
2128         * tst-sem11.c: New file.
2129         * tst-sem12.c: New file.
2130         * tst-typesizes.c: Test struct new_sem and struct old_sem instead
2131         of struct sem.
2133 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
2134             Jakub Jelinek  <jakub@redhat.com>
2136         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
2137         Move __pthread_enable_asynccancel right before futex syscall.
2138         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2139         Likewise.
2141 2007-05-24  Jakub Jelinek  <jakub@redhat.com>
2143         * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
2144         THREAD_COPY_PRIVATE_FUTEX): Define.
2145         * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
2146         THREAD_COPY_PRIVATE_FUTEX): Define.
2147         * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
2148         * init.c (__pthread_initialize_minimal_internal): Use
2149         THREAD_SET_PRIVATE_FUTEX.
2151         * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
2152         (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
2153         THREAD_GSCOPE_FLAG_WAIT): Define.
2154         (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
2155         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
2156         * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
2157         PTR_DEMANGLE.
2158         (THREAD_GSCOPE_GET_FLAG): Define.
2159         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
2160         * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
2161         instead of ->header.gscope_flag directly.
2163 2007-05-23  Ulrich Drepper  <drepper@redhat.com>
2165         * init.c (__pthread_initialize_minimal_internal): Check whether
2166         private futexes are available.
2167         * allocatestack.c (allocate_stack): Copy private_futex field from
2168         current thread into the new stack.
2169         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
2170         futexes if they are available.
2171         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
2172         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
2173         in libc-lowlevellock.S allow using private futexes.
2174         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2175         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
2176         FUTEX_PRIVATE_FLAG.
2177         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2178         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
2179         if they are available.
2180         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
2181         * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
2182         * sysdeps/i386/tcb-offsets.sym: Likewise.
2183         * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
2184         * sysdeps/i386/tls.h (tcbhead_t): Likewise.
2186 2007-05-21  Ulrich Drepper  <drepper@redhat.com>
2188         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2189         Remove ptr_wait_lookup_done again.
2190         * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
2191         (__pthread_initialize_minimal_internal): Initialize
2192         _dl_wait_lookup_done pointer in _rtld_global directly.
2193         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2194         Remove code to code _dl_wait_lookup_done.
2195         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
2196         encrypted for now.
2198 2007-05-21  Jakub Jelinek  <jakub@redhat.com>
2200         * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
2201         pthread_mutex_init failed with ENOTSUP.
2203 2007-05-19  Ulrich Drepper  <drepper@redhat.com>
2205         * allocatestack.c (__wait_lookup_done): New function.
2206         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2207         Add ptr_wait_lookup_done.
2208         * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
2209         * pthreadP.h: Declare __wait_lookup_done.
2210         * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
2211         Define macros to implement reference handling of global scope.
2212         * sysdeps/x86_64/tls.h: Likewise.
2213         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2214         Initialize GL(dl_wait_lookup_done).
2216 2007-05-17  Ulrich Drepper  <drepper@redhat.com>
2218         [BZ #4512]
2219         * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
2220         is detected.
2221         * pthread_mutex_timedlock.c: Likewise.
2222         * pthread_mutex_trylock.c: Likewise.
2223         Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
2225         * Makefile (tests): Add tst-robust9 and tst-robustpi9.
2226         * tst-robust9.c: New file.
2227         * tst-robustpi9.c: New file.
2229         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
2230         unnecessary extra cancellation test.
2232 2007-05-14  Ulrich Drepper  <drepper@redhat.com>
2234         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
2235         extra cancellation test.
2236         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2238 2007-05-10  Ulrich Drepper  <drepper@redhat.com>
2240         * descr.h (struct pthread): Rearrange members to fill hole in
2241         64-bit layout.
2243         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2244         (__pthread_setaffinity_new): If syscall was successful and
2245         RESET_VGETCPU_CACHE is defined, use it before returning.
2246         * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
2248 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
2250         [BZ #4455]
2251         * tst-align2.c: Include stackinfo.h.
2252         * tst-getpid1.c: Likewise.
2254 2007-05-02  Carlos O'Donell  <carlos@systemhalted.org>
2256         [BZ #4455]
2257         * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
2258         * tst-getpid1.c (do_test): Likewise.
2260         [BZ #4456]
2261         * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
2262         (allocate_stack): Likewise.
2264 2007-05-07  Ulrich Drepper  <drepper@redhat.com>
2266         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2267         (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
2268         (__lll_robust_timedlock_wait): Likewise.
2269         Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
2271 2007-05-06  Mike Frysinger  <vapier@gentoo.org>
2273         [BZ #4465]
2274         * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
2275         * tst-cancel4.c (tf_fdatasync): New test.
2277 2007-04-27  Ulrich Drepper  <drepper@redhat.com>
2279         [BZ #4392]
2280         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
2281         check mutexes like normal mutexes.
2283         [BZ #4306]
2284         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
2285         Initialize the whole sigevent structure to appease valgrind.
2287 2007-04-25  Ulrich Drepper  <drepper@redhat.com>
2289         * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
2290         * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
2292 2007-04-06  Ulrich Drepper  <drepper@redhat.com>
2294         * tst-locale1.c: Avoid warnings.
2295         * tst-locale2.c: Likewise.
2297 2007-03-19  Steven Munroe  <sjmunroe@us.ibm.com>
2299         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2300         (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
2302 2007-03-16  Jakub Jelinek  <jakub@redhat.com>
2304         * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
2305         __extern_always_inline where appropriate.
2306         * sysdeps/pthread/pthread.h: Likewise.
2308 2007-03-13  Richard Henderson  <rth@redhat.com>
2310         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
2311         separate cfi regions for the two subsections.
2313 2007-02-25  Ulrich Drepper  <drepper@redhat.com>
2315         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
2316         new thread, don't just decrement it.
2317         Patch by Suzuki K P <suzuki@in.ibm.com>.
2319 2007-02-21  Ulrich Drepper  <drepper@redhat.com>
2321         * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
2322         PTHFCT_CALL definition.
2324 2007-02-18  Ulrich Drepper  <drepper@redhat.com>
2326         * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
2327         available, don't use it.
2329 2007-02-09  Jakub Jelinek  <jakub@redhat.com>
2331         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2332         (__lll_mutex_timedlock_wait): Use correct pointer when we don't
2333         call into the kernel to delay.
2335 2007-01-18  Ulrich Drepper  <drepper@redhat.com>
2337         * tst-initializers1.c: We want to test the initializers as seen
2338         outside of libc, so undefined _LIBC.
2340         * pthread_join.c (cleanup): Avoid warning.
2342 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
2344         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2345         (__lll_timedwait_tid): Add unwind info.
2347         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
2348         function table, mangle the pointers.
2349         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
2350         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
2351         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
2352         demangle pointers before use.
2353         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
2354         demangle pointer.
2355         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
2356         * sysdeps/pthread/setxid.h: Likewise.
2358 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
2360         * tst-rwlock7.c: Show some more information in case of correct
2361         behavior.
2363 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
2365         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2366         (lll_futex_timed_wait): Undo part of last change, don't negate
2367         return value.
2369 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
2371         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
2372         FUTEX_CMP_REQUEUE and lll_futex_requeue.
2374 2006-12-28  David S. Miller  <davem@davemloft.net>
2376         * shlib-versions: Fix sparc64 linux target specification.
2378 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
2380         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2381         Adjust include path for pthread_barrier_wait.c move.
2383 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
2385         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
2386         tid isn't reread from pd->tid in between ESRCH test and the syscall.
2388 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
2390         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
2391         6 argument cancellable syscalls.
2392         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
2393         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
2394         6 argument cancellable syscalls.
2395         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
2397 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
2399         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
2400         (__rtld_mrlock_initialize): Add missing closing parenthesis.
2402 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
2404         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
2405         __sync_lock_release instead of __sync_lock_release_si.
2407 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
2409         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
2410         Define.
2411         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
2412         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
2413         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
2414         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
2415         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
2416         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2417         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
2418         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
2419         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2420         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2421         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
2423 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
2425         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
2426         * pthread_barrier_wait.c: ...here.
2427         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
2428         * pthread_cond_broadcast.c: ...here.
2429         * sysdeps/pthread/pthread_cond_signal.c: Move to...
2430         * pthread_cond_signal.c: ...here.
2431         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
2432         * pthread_cond_timedwait.c: ...here.
2433         * sysdeps/pthread/pthread_cond_wait.c: Move to...
2434         * pthread_cond_wait.c: ...here.
2435         * sysdeps/pthread/pthread_once.c: Move to...
2436         * pthread_once.c: ...here.
2437         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
2438         * pthread_rwlock_rdlock.c: ...here.
2439         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
2440         * pthread_rwlock_timedrdlock.c: ...here.
2441         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
2442         * pthread_rwlock_timedwrlock.c: ...here.
2443         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
2444         * pthread_rwlock_unlock.c: ...here.
2445         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
2446         * pthread_rwlock_wrlock.c: ...here.
2447         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
2448         * pthread_spin_destroy.c: ...here.
2449         * sysdeps/pthread/pthread_spin_init.c: Move to...
2450         * pthread_spin_init.c: ...here.
2451         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
2452         * pthread_spin_unlock.c: ...here.
2453         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
2454         * pthread_getcpuclockid.c: ...here.
2456         * init.c: USE_TLS support is now always enabled.
2457         * tst-tls5.h: Likewise.
2458         * sysdeps/alpha/tls.h: Likewise.
2459         * sysdeps/i386/tls.h: Likewise.
2460         * sysdeps/ia64/tls.h: Likewise.
2461         * sysdeps/powerpc/tls.h: Likewise.
2462         * sysdeps/s390/tls.h: Likewise.
2463         * sysdeps/sh/tls.h: Likewise.
2464         * sysdeps/sparc/tls.h: Likewise.
2465         * sysdeps/x86_64/tls.h: Likewise.
2467 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
2469         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2470         __rtld_mrlock_change): Update oldval if atomic compare and exchange
2471         failed.
2473         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
2474         Define to THREAD_SELF->header.multiple_threads.
2475         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
2476         Likewise.
2477         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
2478         Likewise.
2479         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
2480         (SINGLE_THREAD_P): Likewise.
2481         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
2482         (SINGLE_THREAD_P): Likewise.
2483         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2484         (SINGLE_THREAD_P): Likewise.
2485         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
2486         (SINGLE_THREAD_P): Likewise.
2487         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
2488         Likewise.
2489         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
2490         (SINGLE_THREAD_P): Likewise.
2491         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
2492         (SINGLE_THREAD_P): Likewise.
2493         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
2494         Likewise.
2496 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
2498         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
2499         by default rather than 2_3_3.
2501 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
2503         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2504         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
2505         atomic_* instead of catomic_* macros.
2507 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
2509         [BZ #3285]
2510         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
2511         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2512         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2513         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2514         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2515         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
2516         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
2517         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
2518         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
2519         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
2520         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
2521         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
2522         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
2524 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
2526         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
2527         cancelable syscalls with six parameters.
2529         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
2530         operations instead of atomic_*.
2532 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
2534         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
2536 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
2538         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
2539         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
2540         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
2541         New file.
2542         * pthread_attr_setstack.c: Allow overwriting the version number of the
2543         new symbol.
2544         * pthread_attr_setstacksize.c: Likewise.
2545         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
2546         it.
2547         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
2548         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
2550 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
2552         [BZ #3251]
2553         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
2554         Patch by Petr Baudis.
2556 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
2558         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
2560         * tst-cancel2.c (tf): Loop as long as something was written.
2562 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2564         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
2565         mutexes wake all mutexes.
2566         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
2567         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2568         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2570 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
2572         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
2573         to guarantee the thread is always canceled.
2575 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
2577         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
2578         Include stdlib.h.
2579         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
2580         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
2581         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2582         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2583         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2585 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
2587         [BZ #3123]
2588         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
2589         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2590         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2591         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2592         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2593         * Makefile (tests): Add tst-cond22.
2594         * tst-cond22.c: New file.
2596 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
2598         [BZ #3124]
2599         * descr.h (struct pthread): Add parent_cancelhandling.
2600         * sysdeps/pthread/createthread.c (create_thread): Pass parent
2601         cancelhandling value to child.
2602         * pthread_create.c (start_thread): If parent thread was canceled
2603         reset the SIGCANCEL mask.
2604         * Makefile (tests): Add tst-cancel25.
2605         * tst-cancel25.c: New file.
2607 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
2608             Ulrich Drepper  <drepper@redhat.com>
2610         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
2611         counterp if it is already zero.
2612         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
2614 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
2615             Roland McGrath  <roland@redhat.com>
2617         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2618         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2619         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
2620         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2621         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2622         lll_robust_mutex_timedlock, lll_mutex_unlock,
2623         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2624         Add _L_*_ symbols around the subsection.
2625         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
2626         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
2628 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
2629             Roland McGrath  <roland@redhat.com>
2631         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2632         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2633         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
2634         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2635         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2636         lll_robust_mutex_timedlock, lll_mutex_unlock,
2637         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2638         Add _L_*_ symbols around the subsection.
2639         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
2640         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
2642 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
2644         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
2645         change because it can disturb too much existing code.  If real hard
2646         reader preference is needed we'll introduce another type.
2647         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2648         (pthread_rwlock_timedwrlock): Likewise.
2649         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2650         Likewise.
2652 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
2654         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
2655         reader preference.
2656         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2657         (pthread_rwlock_timedwrlock): Likewise.
2658         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2659         Likewise.
2661 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
2663         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
2664         Only define ifdef SHARED.
2666 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
2668         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
2669         (free_stacks): ...here.
2670         (__free_stack_cache): New function.
2671         * pthreadP.h: Declare __free_stack_cache.
2672         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
2673         ptr_freeres.
2674         * init.c (pthread_functions): Initialize ptr_freeres.
2675         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
2676         New freeres function.
2678 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
2680         [BZ #3018]
2681         * Makefile (extra-objs): Add modules to extra-test-objs instead.
2683 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
2685         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2686         _XOPEN_REALTIME_THREADS.
2688 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
2690         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
2691         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
2692         HAVE_CLOCK_GETTIME_VSYSCALL.
2693         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
2695 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
2697         * sysdeps/unix/sysv/linux/bits/posix_opt.h
2698         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
2699         * descr.h (struct priority_protection_data): New type.
2700         (struct pthread): Add tpp field.
2701         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
2702         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
2703         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
2704         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
2705         TPP mutexes.
2706         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
2707         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
2708         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
2709         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
2710         * tpp.c: New file.
2711         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
2712         boosted by TPP.
2713         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2714         * pthread_mutexattr_getprioceiling.c
2715         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
2716         in the SCHED_FIFO priority range.
2717         * pthread_mutexattr_setprioceiling.c
2718         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
2719         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
2720         if mutex is not TPP.  Ceiling is now in __data.__lock.
2721         * pthread_mutex_setprioceiling.c: Include stdbool.h.
2722         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
2723         is now in __data.__lock.  Add locking.
2724         * pthread_create.c (__free_tcb): Free pd->tpp structure.
2725         * Makefile (libpthread-routines): Add tpp.
2726         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
2727         * tst-tpp.h: New file.
2728         * tst-mutexpp1.c: New file.
2729         * tst-mutexpp6.c: New file.
2730         * tst-mutexpp10.c: New file.
2731         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
2732         * tst-mutex6.c (TEST_FUNCTION): Likewise.
2734 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
2736         [BZ #2843]
2737         * pthread_join.c (pthread_join): Account for self being canceled
2738         when checking for deadlocks.
2739         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
2740         (tf1): Don't print anything after pthread_join returns, this would be
2741         another cancellation point.
2742         (tf2): Likewise.
2743         * tst-join6.c: New file.
2744         * Makefile (tests): Add tst-join6.
2746 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
2748         [BZ #2892]
2749         * pthread_setspecific.c (__pthread_setspecific): Check
2750         out-of-range index before checking for unused key.
2752         * sysdeps/pthread/gai_misc.h: New file.
2754 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
2756         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
2757         file.  Don't use sysctl.
2758         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
2759         overwrite the file if this is likely not true.
2761 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
2763         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
2764         * Makefile (tests): Add tst-getpid3.
2765         * tst-getpid3.c: New file.
2767 2006-07-30  Roland McGrath  <roland@redhat.com>
2769         * Makefile (libpthread-routines): Add ptw-sigsuspend.
2771         * sysdeps/unix/sysv/linux/i386/not-cancel.h
2772         (pause_not_cancel): New macro.
2773         (nanosleep_not_cancel): New macro.
2774         (sigsuspend_not_cancel): New macro.
2775         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2776         nanosleep_not_cancel macro from <not-cancel.h>.
2777         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
2778         macro from <not-cancel.h>.
2780 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
2781             Jakub Jelinek  <jakub@redhat.com>
2783         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
2784         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
2785         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
2786         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
2787         * pthread_mutex_init.c: Add support for priority inheritance mutex.
2788         * pthread_mutex_lock.c: Likewise.
2789         * pthread_mutex_timedlock.c: Likewise.
2790         * pthread_mutex_trylock.c: Likewise.
2791         * pthread_mutex_unlock.c: Likewise.
2792         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
2793         all mutexes.
2794         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
2795         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
2796         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
2797         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
2798         pthread-pi-defines.sym.
2799         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
2800         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
2801         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2802         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2803         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2804         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2805         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2806         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2807         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2808         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2809         _POSIX_THREAD_PRIO_INHERIT to 200112L.
2810         * tst-mutex1.c: Adjust to allow use in PI mutex test.
2811         * tst-mutex2.c: Likewise.
2812         * tst-mutex3.c: Likewise.
2813         * tst-mutex4.c: Likewise.
2814         * tst-mutex5.c: Likewise.
2815         * tst-mutex6.c: Likewise.
2816         * tst-mutex7.c: Likewise.
2817         * tst-mutex7a.c: Likewise.
2818         * tst-mutex8.c: Likewise.
2819         * tst-mutex9.c: Likewise.
2820         * tst-robust1.c: Likewise.
2821         * tst-robust7.c: Likewise.
2822         * tst-robust8.c: Likewise.
2823         * tst-mutexpi1.c: New file.
2824         * tst-mutexpi2.c: New file.
2825         * tst-mutexpi3.c: New file.
2826         * tst-mutexpi4.c: New file.
2827         * tst-mutexpi5.c: New file.
2828         * tst-mutexpi6.c: New file.
2829         * tst-mutexpi7.c: New file.
2830         * tst-mutexpi7a.c: New file.
2831         * tst-mutexpi8.c: New file.
2832         * tst-mutexpi9.c: New file.
2833         * tst-robust1.c: New file.
2834         * tst-robust2.c: New file.
2835         * tst-robust3.c: New file.
2836         * tst-robust4.c: New file.
2837         * tst-robust5.c: New file.
2838         * tst-robust6.c: New file.
2839         * tst-robust7.c: New file.
2840         * tst-robust8.c: New file.
2841         * Makefile (tests): Add the new tests.
2843         * pthread_create.c (start_thread): Add some casts to avoid warnings.
2844         * pthread_mutex_destroy.c: Remove unneeded label.
2846 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
2848         * pthread_mutex_init.c (__pthread_mutex_init): Move some
2849         computations to compile time.
2851 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
2853         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
2855 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
2857         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
2859 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
2861         * pthread_key_create.c (__pthread_key_create): Do away with
2862         __pthread_keys_lock.
2864         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2865         (__kernel_cpumask_size): Mark as hidden.
2866         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2868         * sem_open.c (__sem_mappings_lock): Mark as hidden.
2869         * semaphoreP.h (__sem_mappings_lock): Likewise.
2871 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
2873         * pthread_atfork.c: Mark __dso_handle as hidden.
2875 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
2877         [BZ #2644]
2878         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
2879         the reload problem.  Change the one path in pthread_cancel_init
2880         which causes the problem.  Force gcc to reload.  Simplify callers.
2881         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
2882         (_Unwind_GetBSP): Undo last patch.
2884 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
2886         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
2887         function pointer is reloaded after pthread_cancel_init calls.
2889         [BZ #2644]
2890         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
2891         pointers are reloaded after pthread_cancel_init calls.
2893 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
2895         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
2896         __always_inline.
2898 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
2900         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2901         Allocate new object which is passed to timer_sigev_thread so that
2902         the timer can be deleted before the new thread is scheduled.
2904 2006-04-26  Roland McGrath  <roland@redhat.com>
2906         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
2908 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
2910         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
2911         suffix for conditional jumps.
2912         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
2913         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2914         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2915         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2916         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2917         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2919         * init.c (sigcancel_handler): Compare with correct PID even if the
2920         thread is in the middle of a fork call.
2921         (sighandler_setxid): Likewise.
2922         Reported by Suzuki K P <suzuki@in.ibm.com> .
2924 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
2926         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
2928 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
2930         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
2931         fails [Coverity CID 105].
2933 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
2935         * sysdeps/pthread/pthread.h: Add nonnull attributes.
2937 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
2939         [BZ #2505]
2940         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
2941         Define __lll_rel_instr using lwsync.
2943 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
2945         * allocatestack.c (allocate_stack): Always initialize robust_head.
2946         * descr.h: Define struct robust_list_head.
2947         (struct pthread): Use robust_list_head in robust mutex list definition.
2948         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
2949         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
2950         (__pthread_initialize_minimal_internal): Register robust_list with
2951         the kernel.
2952         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
2953         Declare __set_robust_list_avail.
2954         * pthread_create.c (start_thread): Register robust_list of new thread.
2955         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
2956         waiters.
2957         * pthread_mutex_destroy.c: For robust mutexes don't look at the
2958         number of users, it's unreliable.
2959         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
2960         set_robust_list syscall is available.
2961         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
2962         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
2963         Set robust_head.list_op_pending before trying to lock a robust mutex.
2964         * pthread_mutex_timedlock.c: Likewise.
2965         * pthread_mutex_trylock.c: Likewise.
2966         * pthread_mutex_unlock.c: Likewise for unlocking.
2967         * Makefile (tests): Add tst-robust8.
2968         * tst-robust8.c: New file.
2970 2006-03-08  Andreas Schwab  <schwab@suse.de>
2972         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
2973         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
2975 2006-03-05  Roland McGrath  <roland@redhat.com>
2977         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
2978         and $config_os doesn't match *linux*.
2980 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
2982         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
2983         Use __syscall_error.
2984         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2985         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
2986         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
2987         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2988         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
2989         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
2991 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
2993         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
2995 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
2997         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2998         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
2999         mutex.
3000         (__lll_robust_timedlock_wait): Likewise.
3001         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
3002         (__lll_robust_lock_wait): Likewise.
3003         (__lll_robust_timedlock_wait): Likewise.
3004         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3005         (__lll_robust_lock_wait): Likewise.
3006         (__lll_robust_timedlock_wait): Likewise.
3008 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
3010         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
3011         lll_robust_mutex_trylock, lll_robust_mutex_lock,
3012         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
3013         lll_robust_mutex_unlock): Define.
3014         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
3016 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
3018         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
3019         instead of <clone.S>.
3021 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
3023         * Makefile (libpthread-routines): Add
3024         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
3025         and pthread_mutex_[sg]etprioceiling.
3026         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
3027         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
3028         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
3029         pthread_mutex_setprioceiling.
3030         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
3031         PTHREAD_PRIO_PROTECT): New enum values.
3032         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
3033         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
3034         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
3035         prototypes.
3036         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
3037         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
3038         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
3039         Define.
3040         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
3041         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
3042         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
3043         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
3044         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
3045         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
3046         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
3047         protocol mutexes.
3048         * pthread_mutex_getprioceiling.c: New file.
3049         * pthread_mutex_setprioceiling.c: New file.
3050         * pthread_mutexattr_getprioceiling.c: New file.
3051         * pthread_mutexattr_setprioceiling.c: New file.
3052         * pthread_mutexattr_getprotocol.c: New file.
3053         * pthread_mutexattr_setprotocol.c: New file.
3055 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
3057         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
3059 2006-02-27  Roland McGrath  <roland@redhat.com>
3061         * sysdeps/pthread/Subdirs: List nptl here too.
3062         * configure (libc_add_on_canonical): New variable.
3064         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
3066         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
3067         self to get main source tree's file.
3068         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
3069         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
3070         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
3071         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
3072         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
3073         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
3074         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
3075         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
3076         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
3077         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
3078         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
3079         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
3080         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
3082         * Makefile: Use $(sysdirs) in vpath directive.
3084         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
3085         (CPPFLAGS-timer_routines.c): Likewise.
3087         * Makeconfig (includes): Variable removed.
3089 2006-02-26  Roland McGrath  <roland@redhat.com>
3091         * sysdeps/generic/pt-raise.c: Moved to ...
3092         * pt-raise.c: ... here.
3093         * sysdeps/generic/lowlevellock.h: Moved to ...
3094         * lowlevellock.h: ... here.
3096 2006-02-23  Roland McGrath  <roland@redhat.com>
3098         * descr.h (struct pthread): Add final member `end_padding'.
3099         (PTHREAD_STRUCT_END_PADDING): Use it.
3101 2006-02-20  Roland McGrath  <roland@redhat.com>
3103         * sysdeps/mips: Directory removed, saved in ports repository.
3104         * sysdeps/unix/sysv/linux/mips: Likewise.
3106 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
3108         * tst-robust1.c: Add second mutex to check that the mutex list is
3109         handled correctly.
3111 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
3113         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
3114         lll_robust_mutex_trylock, lll_robust_mutex_lock,
3115         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
3116         lll_robust_mutex_unlock): New macros.
3117         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
3118         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3119         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3120         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3121         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
3123 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3125         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
3126         definitions.
3127         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
3129 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
3131         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3132         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
3133         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
3134         (lll_robust_mutex_unlock): Likewise.
3136 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
3138         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
3139         Set robust_list.__next rather than robust_list.
3140         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3141         (__pthread_list_t): New typedef.
3142         (pthread_mutex_t): Replace __next and __prev fields with __list.
3143         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
3144         (__pthread_list_t): New typedef.
3145         (pthread_mutex_t): Replace __next and __prev fields with __list.
3146         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3147         (__pthread_list_t, __pthread_slist_t): New typedefs.
3148         (pthread_mutex_t): Replace __next and __prev fields with __list.
3149         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
3150         (__pthread_list_t, __pthread_slist_t): New typedefs.
3151         (pthread_mutex_t): Replace __next and __prev fields with __list.
3152         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
3153         (__pthread_list_t, __pthread_slist_t): New typedefs.
3154         (pthread_mutex_t): Replace __next and __prev fields with __list.
3155         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
3156         (__pthread_slist_t): New typedef.
3157         (pthread_mutex_t): Replace __next field with __list.
3159 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
3161         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
3162         PTHREAD_MUTEX_OWNERDEAD.
3163         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
3164         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
3165         * Makefile (libpthread-routines): Add lowlevelrobustlock.
3166         * pthread_create.c (start_thread): Very much simplify robust_list loop.
3167         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
3168         to PTHREAD_MUTEX_INCONSISTENT.
3169         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
3170         * pthread_mutex_lock.c: Reimplement robust mutex handling.
3171         * pthread_mutex_trylock.c: Likewise.
3172         * pthread_mutex_timedlock.c: Likewise.
3173         * pthread_mutex_unlock.c: Likewise.
3174         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
3175         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
3176         lowlevelrobustlock.sym.
3177         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
3178         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
3179         definitions.
3180         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3181         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
3182         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
3183         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
3184         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
3186 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
3188         * allocatestack.c (allocate_stack): Initialize robust_list.
3189         * init.c (__pthread_initialize_minimal_internal): Likewise.
3190         * descr.h (struct xid_command): Pretty printing.
3191         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
3192         robust_list.  Adjust macros.
3193         * pthread_create.c (start_thread): Adjust robust_list handling.
3194         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
3195         but the owner for all robust mutex types.
3196         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
3197         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
3198         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3199         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
3201         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
3202         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
3204 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
3206         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
3207         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
3209 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3211         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
3212         Return status.
3213         (lll_futex_timed_wait): Define.
3215 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
3217         * tst-cancel4.c: Test ppoll.
3219 2006-01-18  Andreas Jaeger  <aj@suse.de>
3221         [BZ #2167]
3222         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
3223         (pthread_mutex_t): Follow changes for other archs.  Based on patch
3224         by Jim Gifford <patches@jg555.com>.
3226 2006-01-13  Richard Henderson  <rth@redhat.com>
3228         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
3230 2006-01-10  Roland McGrath  <roland@redhat.com>
3232         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
3233         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
3234         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
3235         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3236         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3237         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3238         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3239         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
3240         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
3241         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3243 2006-01-09  Roland McGrath  <roland@redhat.com>
3245         * tst-initializers1-c89.c: New file.
3246         * tst-initializers1-c99.c: New file.
3247         * tst-initializers1-gnu89.c: New file.
3248         * tst-initializers1-gnu99.c: New file.
3249         * Makefile (tests): Add them.
3250         (CFLAGS-tst-initializers1-c89.c): New variable.
3251         (CFLAGS-tst-initializers1-c99.c): New variable.
3252         (CFLAGS-tst-initializers1-gnu89.c): New variable.
3253         (CFLAGS-tst-initializers1-gnu99.c): New variable.
3255         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3256         Use __extension__ on anonymous union definition.
3257         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3258         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3259         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3260         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3261         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3263 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
3265         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
3266         Don't give the union a name because it changes the mangled name.
3267         Instead name the struct for __data.
3268         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
3269         Likewise.
3270         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
3271         Likewise.
3273 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
3275         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
3276         stack bias to mc_ftp field.
3278 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
3280         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
3281         being too clever and reloading the futex value where it shouldn't.
3283 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
3285         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
3286         correct type.
3288 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
3290         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
3291         Add cfi directives.
3293 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
3295         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
3296         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
3297         rename in tcbhead_t.
3299         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3300         Don't give the union a name because it changes the mangled name.
3301         Instead name the struct for __data.
3302         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3303         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3304         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3305         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3306         * pthread_create.c (start_thread): Adjust robust mutex free loop.
3307         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
3309 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
3311         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
3312         Return status.
3313         (lll_futex_timed_wait): Define.
3314         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3315         * sysdeps/pthread/aio_misc.h: New file.
3317 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
3319         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
3321 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
3323         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3324         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
3325         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3327 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
3329         * tst-cancel24.cc: Use C headers instead of C++ headers.
3331 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
3333         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
3334         sparc-linux configured glibc.
3335         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
3336         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
3337         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
3338         atomic_compare_and_exchange_val_24_acq instead of
3339         atomic_compare_and_exchange_val_acq.
3340         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
3341         instead of atomic_exchange_rel.
3342         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
3343         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
3344         file.
3345         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
3346         file.
3347         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
3348         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
3349         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
3350         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
3351         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
3352         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3353         New file.
3354         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3355         New file.
3356         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
3357         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
3358         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
3359         file.
3360         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
3361         file.
3362         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
3364 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
3366         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
3367         mutex initializers.
3369 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
3371         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
3372         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3373         THREAD_COPY_POINTER_GUARD): Define.
3374         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
3375         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
3377 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
3379         * version.c: Update copyright year.
3381 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3383         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
3384         .eh_frame section, use cfi_* directives.
3385         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
3387 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
3389         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
3390         now.
3392 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
3394         * sysdeps/pthread/sigaction.c: Removed.
3395         * sigaction.c: New file.
3396         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
3398 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
3400         * Makefile (tests): Add tst-signal7.
3401         * tst-signal7.c: New file.
3403 2005-12-27  Roland McGrath  <roland@redhat.com>
3405         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
3406         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
3407         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
3408         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
3409         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
3410         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3411         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3412         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3413         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3414         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
3415         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3417 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
3419         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
3420         and __prev field to pthread_mutex_t.
3421         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3422         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3423         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3424         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3425         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
3426         to pthread_mutex_t.
3428 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
3430         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
3431         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
3432         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
3433         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
3434         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
3435         and PTHREAD_MUTEXATTR_FLAG_BITS.
3436         * descr.h (struct pthread): Add robust_list field and define
3437         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
3438         * pthread_mutexattr_getrobust.c: New file.
3439         * pthread_mutexattr_setrobust.c: New file.
3440         * pthread_mutex_consistent.c: New file.
3441         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
3442         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3443         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
3444         Adjust pthread_mutex_t initializers.
3445         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
3446         field to pthread_mutex_t.
3447         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
3448         and __prev field to pthread_mutex_t.
3449         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
3450         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
3451         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
3452         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
3453         * pthread_mutexattr_gettype.c: Likewise.
3454         * pthread_mutexattr_setpshared.c: Likewise.
3455         * pthread_mutexattr_settype.c: Likewise.
3456         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
3457         Initialize mutex kind according to robust flag.
3458         * pthread_mutex_lock.c: Implement local robust mutex.
3459         * pthread_mutex_timedlock.c: Likewise.
3460         * pthread_mutex_trylock.c: Likewise.
3461         * pthread_mutex_unlock.c: Likewise.
3462         * pthread_create.c (start_thread): Mark robust mutexes which remained
3463         locked as dead.
3464         * tst-robust1.c: New file.
3465         * tst-robust2.c: New file.
3466         * tst-robust3.c: New file.
3467         * tst-robust4.c: New file.
3468         * tst-robust5.c: New file.
3469         * tst-robust6.c: New file.
3470         * tst-robust7.c: New file.
3471         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
3472         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3473         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
3474         tst-robust5, tst-robust6, and tst-robust7.
3476         * tst-typesizes.c: New file.
3477         * Makefile (tests): Add tst-typesizes.
3479         * tst-once3.c: More debug output.
3481 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
3483         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
3484         missing after last change.
3486         * version.c: Update copyright year.
3488 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
3490         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
3491         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
3492         * pthread_mutex_trylock.c: Likewise.
3493         * pthread_mutex_timedlock.c: Likewise.
3494         * pthread_mutex_unlock.c: Likewise.
3496 2005-12-22  Roland McGrath  <roland@redhat.com>
3498         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
3499         so that #include_next's search location is not reset to the -I..
3500         directory where <nptl/...> can be found.
3502 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
3504         [BZ #1913]
3505         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3506         Fix unwind info.  Remove useless branch prediction prefix.
3507         * tst-cancel24.cc: New file.
3508         * Makefile: Add rules to build and run tst-cancel24.
3510 2005-12-21  Roland McGrath  <roland@redhat.com>
3512         * libc-cancellation.c: Use <> rather than "" #includes.
3513         * pt-cleanup.c: Likewise.
3514         * pthread_create.c: Likewise.
3515         * pthread_join.c: Likewise.
3516         * pthread_timedjoin.c: Likewise.
3517         * pthread_tryjoin.c: Likewise.
3518         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
3519         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
3520         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3521         * unwind.c: Likewise.
3523 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3525         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
3526         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
3527         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3528         THREAD_COPY_POINTER_GUARD): Define.
3530 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
3532         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
3533         rather than one.
3534         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3535         THREAD_COPY_POINTER_GUARD): Define.
3536         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
3537         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
3538         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3539         THREAD_COPY_POINTER_GUARD): Define.
3540         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
3541         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
3542         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
3543         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
3544         Use PTR_DEMANGLE for B0 if defined.
3546 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
3548         * pthread_create.c (__pthread_create_2_1): Use
3549         THREAD_COPY_POINTER_GUARD if available.
3550         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
3551         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
3552         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
3553         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
3554         * sysdeps/x86_64/tls.h: Likewise.
3556 2005-12-15  Roland McGrath  <roland@redhat.com>
3558         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
3560 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
3562         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
3563         sysdeps/generic.
3564         * errno-loc.c: New file.
3566 2005-12-12  Roland McGrath  <roland@redhat.com>
3568         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
3569         adjustments before choosing stack size.  Update minimum stack size
3570         calculation to match allocate_stack change.
3572 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
3574         * allocatestack.c (allocate_stack): Don't demand that there is an
3575         additional full page available on the stack beside guard, TLS, the
3576         minimum stack.
3578 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
3580         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3581         (__cleanup_fct_attribute): Use __regparm__ not regparm.
3583         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
3584         compiling 32-bit code we must define __cleanup_fct_attribute.
3586 005-11-24  Jakub Jelinek  <jakub@redhat.com>
3588         [BZ #1920]
3589         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
3590         __attribute__ instead of __attribute.
3591         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3592         (__cleanup_fct_attribute): Likewise.
3594 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
3596         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
3597         a write barrier before writing libgcc_s_getcfa.
3599 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
3601         * sysdeps/unix/sysv/linux/configure: Removed.
3603 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
3605         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
3606         optional init_array/fini_array support.
3608 2005-10-24  Roland McGrath  <roland@redhat.com>
3610         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
3611         versioned_symbol use.
3613 2005-10-16  Roland McGrath  <roland@redhat.com>
3615         * init.c (__pthread_initialize_minimal_internal): Even when using a
3616         compile-time default stack size, apply the minimum that allocate_stack
3617         will require, and round up to page size.
3619 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
3621         * Makefile ($(test-modules)): Remove static pattern rule.
3623 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
3624             Ulrich Drepper  <drepper@redhat.com>
3626         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
3627         alignment in callback function.
3628         * Makefile: Add rules to build and run tst-align3.
3629         * tst-align3.c: New file.
3631 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
3633         * allocatestack.c (setxid_signal_thread): Add
3634         INTERNAL_SYSCALL_DECL (err).
3636 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
3638         * allocatestack.c (setxid_signal_thread): Need to use
3639         atomic_compare_and_exchange_bool_acq.
3641 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
3642             Jakub Jelinek  <jakub@redhat.com>
3644         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
3645         CANCEL_RESTMASK.
3646         (struct pthread): Move specific_used field to avoid padding.
3647         Add setxid_futex field.
3648         * init.c (sighandler_setxid): Reset setxid flag and release the
3649         setxid futex.
3650         * allocatestack.c (setxid_signal_thread): New function.  Broken
3651         out of the bodies of the two loops in __nptl_setxid.  For undetached
3652         threads check whether they are exiting and if yes, don't send a signal.
3653         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
3654         * pthread_create.c (start_thread): For undetached threads, check
3655         whether setxid bit is set.  If yes, wait until signal has been
3656         processed.
3658         * allocatestack.c (STACK_VARIABLES): Initialize them.
3659         * pthread_create.c (__pthread_create_2_1): Initialize pd.
3661 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
3663         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
3664         waiters, awake all waiters on the associated mutex.
3666 2005-09-22  Roland McGrath  <roland@redhat.com>
3668         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
3669         ../sysdeps/x86_64/hp-timing.h).
3671 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
3673         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
3674         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3675         (lll_futex_wake_unlock): Define.
3676         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
3677         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3678         (lll_futex_wake_unlock): Define.
3679         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
3680         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3681         (lll_futex_wake_unlock): Define.
3682         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
3683         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3684         (lll_futex_wake_unlock): Define.
3685         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
3686         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3687         (lll_futex_wake_unlock): Define.
3688         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
3689         lll_futex_wake_unlock.
3690         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3691         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3692         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3693         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3694         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3695         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3697 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3699         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
3700         Fix typo in register name.
3702 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
3704         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3705         Use __sigfillset.  Document that sigfillset does the right thing wrt
3706         to SIGSETXID.
3708 2005-08-08  Jakub Jelinek  <jakub@redhat.com>
3710         * tst-stackguard1.c (do_test): Likewise.
3712 2005-07-29  Jakub Jelinek  <jakub@redhat.com>
3714         * tst-stackguard1.c (do_test): Don't fail if the poor man's
3715         randomization doesn't work well enough.
3717 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3719         [BZ #1102]
3720         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
3721         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
3722         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
3723         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
3724         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
3725         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
3726         in the structure.
3727         * Makefile (tests): Add tst-initializers1.
3728         (CFLAGS-tst-initializers1.c): Set.
3729         * tst-initializers1.c: New test.
3731 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3733         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
3734         Make sure __flags are located at offset 48 from the start of the
3735         structure.
3737 2005-07-02  Roland McGrath  <roland@redhat.com>
3739         * Makeconfig: Comment fix.
3741 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
3743         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
3744         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
3745         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
3746         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
3747         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3748         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3749         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
3750         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
3751         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
3752         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3754 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
3756         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
3757         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3758         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
3759         fields.
3760         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3761         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
3762         field.  Put in sysinfo field unconditionally.
3763         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3764         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
3765         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3766         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
3767         fields.
3768         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3769         * pthread_create.c (__pthread_create_2_1): Use
3770         THREAD_COPY_STACK_GUARD macro.
3771         * Makefile: Add rules to build and run tst-stackguard1{,-static}
3772         tests.
3773         * tst-stackguard1.c: New file.
3774         * tst-stackguard1-static.c: New file.
3776 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
3778         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3779         Invoke CGOTSETUP and CGOTRESTORE.
3780         (CGOTSETUP, CGOTRESTORE): Define.
3782 2005-05-29  Richard Henderson  <rth@redhat.com>
3784         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
3785         (tf_write, tf_writev): Use it.
3786         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
3787         the system minimum.
3789 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
3791         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3792         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
3793         __librt_*_asynccancel@local.
3795 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
3797         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
3798         all occurrences of JUMPTARGET.  Instead append @local to labels.
3800 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
3802         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
3803         size/alignment of struct pthread rather than tcbhead_t.
3804         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3805         Likewise.
3806         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3807         Likewise.
3808         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3809         Likewise.
3811 2005-05-19  Richard Henderson  <rth@redhat.com>
3813         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
3814         __sync_val_compare_and_swap, not explicit _si variant.
3815         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
3817 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
3819         [BZ #915]
3820         * sysdeps/pthread/pthread.h: Avoid empty initializers.
3822 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
3824         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
3825         .eh_frame section, use cfi_* directives.
3827 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
3829         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
3830         of "" includes.
3832 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
3834         [BZ #1075]
3835         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
3836         aio_write blocks.
3838 2005-04-27  Roland McGrath  <roland@redhat.com>
3840         * Makefile (tests): Remove tst-clock2.
3842         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
3843         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
3844         translating to the kernel clockid_t for our own process/thread clock.
3846         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
3848 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
3850         * old_pthread_cond_init.c: Include <errno.h>.
3851         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
3852         process shared or uses clock other than CLOCK_REALTIME.
3853         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
3855 2005-04-13  David S. Miller  <davem@davemloft.net>
3857         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
3858         * sysdeps/sparc/sparc64/clone.S: New file.
3860 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
3862         [BZ #1102]
3863         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
3864         __inline instead of inline.
3865         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
3867 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
3869         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
3870         functionally equivalent, but shorter instructions.
3871         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3872         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3873         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3874         Likewise.
3875         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3876         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3877         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3878         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3879         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3880         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
3881         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3882         Likewise.
3883         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3884         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3885         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3886         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3887         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3889 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
3891         * sysdeps/mips/Makefile: New file.
3892         * sysdeps/mips/nptl-sysdep.S: New file.
3893         * sysdeps/mips/tcb-offsets.sym: New file.
3894         * sysdeps/mips/pthread_spin_lock.S: New file.
3895         * sysdeps/mips/pthread_spin_trylock.S: New file.
3896         * sysdeps/mips/pthreaddef.h: New file.
3897         * sysdeps/mips/tls.h: New file.
3898         * sysdeps/mips/jmpbuf-unwind.h: New file.
3899         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
3900         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
3901         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
3902         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
3903         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
3904         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
3905         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
3906         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
3907         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
3908         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
3910 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
3912         [BZ #1112]
3913         * pthread_create.c (__pthread_create_2_1): Rename syscall error
3914         variable to scerr.
3916 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
3918         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
3920 2005-02-25  Roland McGrath  <roland@redhat.com>
3922         * alloca_cutoff.c: Correct license text.
3923         * tst-unload.c: Likewise.
3924         * sysdeps/pthread/allocalim.h: Likewise.
3925         * sysdeps/pthread/pt-initfini.c: Likewise.
3926         * sysdeps/pthread/bits/libc-lock.h: Likewise.
3927         * sysdeps/pthread/bits/sigthread.h: Likewise.
3928         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
3929         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
3931 2005-02-16  Roland McGrath  <roland@redhat.com>
3933         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3934         Use unsigned int * for ptr_nthreads.
3936 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
3938         [BZ #721]
3939         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
3940         gcc4.
3942 2005-02-07  Richard Henderson  <rth@redhat.com>
3944         [BZ #787]
3945         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
3946         argument.
3948 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
3950         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
3951         order of arguments in invocation of atomic_add_zero.
3953 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
3955         [BZ #737]
3956         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
3957         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
3958         at least gotntpoff relocation and addition.
3959         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3960         Likewise.
3961         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
3962         Likewise.
3963         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3964         Likewise.
3966 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
3968         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
3969         entry for static tls deallocation fix.
3970         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
3971         also contains information whether the memory pointed to is static
3972         TLS or not.
3973         * sysdeps/i386/tls.h: Likewise.
3974         * sysdeps/ia64/tls.h: Likewise.
3975         * sysdeps/powerpc/tls.h: Likewise.
3976         * sysdeps/s390/tls.h: Likewise.
3977         * sysdeps/sh/tls.h: Likewise.
3978         * sysdeps/sparc/tls.h: Likewise.
3979         * sysdeps/x86_64/tls.h: Likewise.
3981 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
3983         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
3985 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
3987         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
3988         %esp.
3989         * Makefile (tests): Add tst-align2.
3990         * tst-align2.c: New test.
3991         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
3992         -mpreferred-stack-boundary=4.
3994 2004-12-18  Roland McGrath  <roland@redhat.com>
3996         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
3997         New file removed withdrawn for the moment.
3999 2004-12-17  Richard Henderson  <rth@redhat.com>
4001         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
4002         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
4004 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
4006         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
4007         Increased PTHREAD_STACK_MIN.
4009         * tst-context1.c (stacks): Use bigger stack size.
4011 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
4013         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
4014         * sysdeps/sparc/tcb-offsets.sym: Add TID.
4016 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
4018         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
4019         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
4020         * sysdeps/s390/tcb-offsets.sym (TID): Add.
4022 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
4024         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
4026 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
4028         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
4029         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
4031         * tst-getpid1.c: If child crashes, report this first.  Print which
4032         signal.
4034 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
4036         * init.c (__pthread_initialize_minimal_internal): Also unblock
4037         SIGSETXID.
4039 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
4041         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
4042         _POSIX_THREAD_CPUTIME): Define to 0.
4043         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
4044         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
4045         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
4046         __timer_signal_thread_tclk): Remove.
4047         (init_module): Remove their initialization.
4048         (thread_cleanup): Remove their cleanup assertions.
4049         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
4050         __timer_signal_thread_tclk): Remove.
4051         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
4052         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
4053         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
4055 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
4057         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
4058         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
4060         * Makefile (tests): Add tst-getpid2.
4061         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
4062         (do_test): Use it.  Use __clone2 instead of clone on ia64.
4063         * tst-getpid2.c: New test.
4065 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4067         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
4069 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
4071         * Makefile (tests): Add tst-getpid1.
4072         * tst-getpid1.c: New file.
4073         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
4074         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
4076 2004-12-02  Roland McGrath  <roland@redhat.com>
4078         * Makefile (libpthread-nonshared): Variable removed.
4079         ($(objpfx)libpthread_nonshared.a): Target removed.
4080         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
4081         These are now handled by generic magic from
4082         libpthread-static-only-routines being set.
4084 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
4086         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
4087         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
4088         _POSIX_THREAD_PRIO_PROTECT): Define.
4089         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4090         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4091         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
4093 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
4095         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
4096         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
4097         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
4098         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
4099         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4100         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4101         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
4103 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
4105         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
4107         * Makefile (libpthread-routines): Add pthread_setschedprio.
4108         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
4109         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
4110         * pthread_setschedprio.c: New file.
4112 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
4114         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
4115         * pthread_cancel.c (pthread_create): Likewise.
4117         * Makefile (libpthread-routines): Add vars.
4118         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
4119         * init.c (__default_stacksize, __is_smp): Remove.
4120         * vars.c: New file.
4121         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
4122         and define a wrapper macro.
4123         (PTHREAD_STATIC_FN_REQUIRE): Define.
4124         * allocatestack.c (__find_thread_by_id): Undefine.
4125         * pthread_create (__pthread_keys): Remove.
4126         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
4127         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
4128         PTHREAD_STATIC_FN_REQUIRE.
4130 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4132         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
4133         parameter to REGISTER macro.
4135 2004-11-17  Roland McGrath  <roland@redhat.com>
4137         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
4138         Make sure SIGCANCEL is blocked as well.
4140 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
4142         * sysdeps/pthread/setxid.h: New file.
4143         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
4144         (struct xid_command): Add forward decl.
4145         (struct pthread_functions): Change return type of __nptl_setxid hook
4146         to int.
4147         * pthreadP.h (__nptl_setxid): Change return type to int.
4148         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
4149         calling thread, return its return value and set errno on failure.
4150         * descr.h (struct xid_command): Change id type to long array.
4152         * Makefile: Add rules to build and test tst-setuid1 and
4153         tst-setuid1-static.
4154         * tst-setuid1.c: New test.
4155         * tst-setuid1-static.c: New test.
4157 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
4159         * Makefile (tests): Add tst-exit3.
4160         * tst-exit3.c: New test.
4162 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
4164         * Makefile (tests): Add tst-exit2.
4165         * tst-exit2.c: New file.
4167 2004-11-09  Roland McGrath  <roland@redhat.com>
4169         [BZ #530]
4170         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
4171         here, before calling clone.
4172         * pthread_create.c (start_thread): Don't do it here.
4174 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
4176         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
4178 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
4180         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4181         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
4182         assembler warning.
4184 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
4186         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
4187         if sched_priority is not between minprio and maxprio.
4189 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4191         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4192         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
4194         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
4195         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
4197 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
4199         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
4200         not-cancelable I/O functions.
4202 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4204         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
4205         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
4206         make sure 2 is stored in the futex and we looked at the old value.
4207         Fix a few other problems to return the correct value.
4209 2004-10-14  Richard Henderson  <rth@redhat.com>
4211         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
4212         make gcc4 happy.
4214 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
4216         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
4217         of pthread-functions.h and pthreaddef.h.
4218         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
4220         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4221         Change __data.__nwaiters from int to unsigned int.
4223         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
4224         sysconf (_SC_THREAD_CPUTIME) returns negative value.
4226         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
4227         before return type.
4229         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
4230         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
4232 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
4234         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
4235         test fails, remove message queue.
4236         (tf_msgsnd): Likewise.
4238 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
4240         * tst-clock1.c: Change #ifdef to #if defined.
4241         * tst-clock2.c: Likewise.
4242         * tst-cond11.c: Likewise.
4244         * sysdeps/pthread/timer_create.c (timer_create): Use
4245         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
4246         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
4247         THREAD_CPUTIME.
4249 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
4251         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
4252         _POSIX_THREAD_CPUTIME): Define to 0.
4254 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
4256         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
4257         and _POSIX_THREAD_CPUTIME to zero.
4258         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4259         * tst-barrier2.c: Fix testing for POSIX feature.
4260         * tst-clock1.c: Likewise.
4261         * tst-clock2.c: Likewise.
4262         * tst-cond11.c: Likewise.
4263         * tst-cond4.c: Likewise.
4264         * tst-cond6.c: Likewise.
4265         * tst-flock2.c: Likewise.
4266         * tst-mutex4.c: Likewise.
4267         * tst-mutex9.c: Likewise.
4268         * tst-rwlock12.c: Likewise.
4269         * tst-rwlock4.c: Likewise.
4270         * tst-signal1.c: Likewise.
4271         * tst-spin2.c: Likewise.
4272         * sysdeps/pthread/posix-timer.h: Likewise.
4273         * sysdeps/pthread/timer_create.c: Likewise.
4274         * sysdeps/pthread/timer_routines.c: Likewise.
4276 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
4278         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4279         (__lll_mutex_timedlock_wait): Address futex correctly.
4281         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4282         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
4283         make sure 2 is stored in the futex and we looked at the old value.
4284         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4285         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
4286         which might very well made the code not working at all before.
4287         [BZ #417]
4289 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
4291         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
4292         allow SIGSETXID to be sent.
4293         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
4294         for SIGSETXID to be defined.
4295         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
4296         SIGSETXID cannot be blocked.
4298         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4299         Add __extension__ to long long types.
4300         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4301         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4302         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4303         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4304         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
4305         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4306         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4308 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
4310         * descr.h (struct pthread): Add stopped_start field.
4311         * sysdeps/pthread/createthread.c (create_thread): Set
4312         start_stopped flag in descriptor for new thread appropriately.
4313         * pthread_create.c (start_thread): Only take lock to be stopped on
4314         startup if stopped_start flag says so.
4316 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
4318         * pthread_create.c (__pthread_create_2_1): Remember whether thread
4319         is created detached and if yes, do not try to free the stack in case
4320         the thread creation failed.
4321         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
4322         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
4323         case there has been no error.  [BZ #405]
4325         * pthread_create.c (start_thread): Don't wait for scheduler data
4326         etc to be set at the beginning of the function.  The cancellation
4327         infrastructure must have been set up.  And enable async
4328         cancellation before potentially going to sleep.  [BZ #401]
4330 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
4332         * Versions: Remove exports for pthread_set*id_np functions.
4333         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
4334         for now.
4335         * Makefile: Don't build pthread_set*id code for now.
4337 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
4339         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
4340         internal use.
4341         * allocatestack.c (__nptl_setxid): New function.
4342         * descr.h (struct xid_command): Define type.
4343         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
4344         (sighandler_setxid): New function.
4345         (__pthread_initialize_minimal): Register sighandler_setxid for
4346         SIGCANCEL.
4347         * pt-allocrtsig.c: Update comment.
4348         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
4349         Declare __nptl_setxid.
4350         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
4351         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
4352         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
4353         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
4354         and pthread_setresuid_np.
4355         * pthread_setgid_np.c: New file.
4356         * pthread_setuid_np.c: New file.
4357         * pthread_setegid_np.c: New file.
4358         * pthread_seteuid_np.c: New file.
4359         * pthread_setregid_np.c: New file.
4360         * pthread_setreuid_np.c: New file.
4361         * pthread_setresgid_np.c: New file.
4362         * pthread_setresuid_np.c: New file.
4363         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
4364         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
4365         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
4366         and pthread_setresuid_np.
4367         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
4368         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
4369         pthread_setregid, and pthread_setresgid.
4371 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
4373         * allocatestack.c (allocate_stack): Return EAGAIN instead of
4374         ENOMEM when out of memory.
4376 2004-09-10  Roland McGrath  <roland@redhat.com>
4378         [BZ #379]
4379         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
4380         code, since we don't try to use the broken CLONE_STOPPED any more.
4381         * pthread_create.c (start_thread): Likewise.
4383 2004-09-15  Richard Henderson  <rth@redhat.com>
4385         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
4387 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
4389         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
4390         (__libc_unwind_longjmp): Delete macro and declare as function.
4391         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
4392         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
4393         nptl directory.
4394         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
4395         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
4396         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
4398 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
4400         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
4401         for __USE_XOPEN2K.
4402         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
4403         types also for __USE_XOPEN2K.
4404         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4405         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4406         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4407         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4408         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4409         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4410         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4411         [BZ #320]
4413 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
4415         * sysdeps/pthread/pthread.h
4416         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
4417         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
4418         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
4419         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
4420         [BZ #375]
4422 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
4424         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
4425         PSEUDO to be used with . prefix.
4427         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
4428         Use atomic_increment instead of atomic_exchange_and_add.
4429         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
4430         Likewise.
4431         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
4432         Likewise.
4433         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
4434         Likewise.
4436         * allocatestack.c (allocate_stack): Use atomic_increment_val
4437         instead of atomic_exchange_and_add.
4438         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
4439         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
4440         Likewise.
4441         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4442         Likewise.
4444         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
4445         the initialization function might throw.
4447 2005-09-05  Richard Henderson  <rth@redhat.com>
4449         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4450         Move definition inside libpthread, libc, librt check.  Provide
4451         definition for rtld.
4453 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
4455         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
4456         waiters, awake all waiters on the associated mutex.
4458 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
4460         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
4461         * sysdeps/i386/jmpbuf-unwind.h: Likewise
4462         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4463         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4464         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4465         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4466         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4467         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4468         * unwind.c: Use it.
4470         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4471         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
4472         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4473         Likewise.
4474         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4475         Decrement __nwaiters.  If pthread_cond_destroy has been called and
4476         this is the last waiter, signal pthread_cond_destroy caller and
4477         avoid using the pthread_cond_t structure after unlock.
4478         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4479         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4480         Read clock type from the least significant bits of __nwaiters instead
4481         of __clock.
4482         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4483         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
4485 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
4487         [BZ #342]
4488         * Makefile (tests): Add tst-cond20 and tst-cond21.
4489         * tst-cond20.c: New test.
4490         * tst-cond21.c: New test.
4491         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4492         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
4493         it unsigned int.
4494         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4495         Likewise.
4496         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4497         (pthread_cond_t): Likewise.
4498         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4499         Likewise.
4500         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4501         Likewise.
4502         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4503         Likewise.
4504         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
4505         (cond_nwaiters): New.
4506         (clock_bits): New.
4507         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
4508         if there are waiters not signalled yet.
4509         Wait until all already signalled waiters wake up.
4510         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
4511         __nwaiters.  If pthread_cond_destroy has been called and this is the
4512         last waiter, signal pthread_cond_destroy caller and avoid using
4513         the pthread_cond_t structure after unlock.
4514         (__pthread_cond_wait): Increment __nwaiters in the beginning,
4515         decrement it when leaving.  If pthread_cond_destroy has been called
4516         and this is the last waiter, signal pthread_cond_destroy caller.
4517         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4518         Likewise.  Read clock type from the least significant bits of
4519         __nwaiters instead of __clock.
4520         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
4521         whether clock ID can be encoded in COND_CLOCK_BITS bits.
4522         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
4523         clock type just from the last COND_CLOCK_BITS bits of value.
4524         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
4525         instead of __clock, just from second bit of condattr's value.
4527 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
4529         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
4530         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
4531         != 64.
4532         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4534 2004-08-15  Roland McGrath  <roland@frob.com>
4536         * pthread_atfork.c: Update copyright terms including special exception
4537         for these trivial files, which are statically linked into executables
4538         that use dynamic linking for the significant library code.
4540 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
4542         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
4543         pthread_rwlock_rdlock.
4544         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
4545         Decrease __nr_readers_queued after reacquiring lock.
4546         * sysdeps/pthread/pthread_rwlock_timedrdlock
4547         (pthread_rwlock_timedrdlock): Likewise.
4548         Reported by Bob Cook <bobcook47@hotmail.com>.
4550 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
4552         * tst-rwlock14.c (tf): Read main thread handle from *ARG
4553         before pthread_barrier_wait.
4555 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
4557         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
4558         Remove unnecessary exception handling data.
4560 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
4562         [BZ #284]
4563         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
4564         instead of clockid_t.
4566 2004-07-21  Roland McGrath  <roland@redhat.com>
4568         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
4570 2004-07-19  Roland McGrath  <roland@redhat.com>
4572         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
4574 2004-07-02  Roland McGrath  <roland@redhat.com>
4576         * configure: Don't exit.
4578 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4580         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4581         (__pthread_cond_timedwait): Check for invalid nanosecond in
4582         timeout value.
4584 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
4586         * Makefile: Add rules to build and run tst-fini1.
4587         * tst-fini1.c: New file.
4588         * tst-fini1mod.c: New file.
4590 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
4592         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
4593         if no cancellation support is needed.
4594         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4595         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4596         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4597         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4598         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4599         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4600         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4601         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4602         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4604         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
4605         only if not already defined.
4607 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
4609         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
4610         constraint "m" instead of "0" for futex.
4612         * shlib-versions: Add powerpc64-.*-linux.*.
4614 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
4616         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
4617         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
4618         for valid tv_nsec.
4619         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
4620         1 billion and 64-bit tv_nsec which is valid when truncated to 32
4621         bits.
4623 2004-06-29  Roland McGrath  <roland@redhat.com>
4625         * Banner: NPTL no longer has its own version number.
4626         * Makefile (nptl-version): Variable removed.
4627         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
4628         using $(version), the glibc version number.
4630 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4632         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4633         Fix branch offset for a PLT entry.
4634         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
4635         Likewise.
4636         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4637         Likewise.
4638         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
4639         Likewise.
4640         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
4641         Likewise.
4643 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
4645         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
4646         unconditionally.
4648 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
4650         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4651         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
4652         instead of tv_sec.
4653         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
4654         (pthread_rwlock_timedrdlock): Likewise.
4656 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
4658         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4659         Set __r7 to val, not mutex.
4661 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
4663         * Makefile: Add rules to build tst-rwlock14.
4664         * tst-rwlock14.c: New file.
4666 2004-06-24  Boris Hu  <boris.hu@intel.com>
4668         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
4669         check.
4670         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4672 2004-06-19  Andreas Jaeger  <aj@suse.de>
4674         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
4675         assembler in last patch.
4677 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
4679         * sysdeps/pthread/pthread_cond_timedwait.c
4680         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
4681         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4682         (__pthread_cond_timedwait): Check for invalid nanosecond in
4683         timeout value.
4684         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4685         * tst-cond19.c: New file.
4686         * Makefile: Add rules to build and run tst-cond19.
4688 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
4690         * tst-context1.c (GUARD_PATTERN): Defined.
4691         (tst_context_t): Define struct containing ucontext_t & guard words.
4692         (ctx): Declare as an array of tst_context_t.
4693         (fct): Verify uc_link & guard words are still valid.
4694         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
4696 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4698         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4699         Add __data.__futex field, reshuffle __data.__clock.
4700         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
4701         (__pthread_cond_signal): Increment __futex at the same time as
4702         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4703         address of low 32-bits of __wakeup_seq to futex syscall.
4704         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4705         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4706         releasing internal lock to FUTEX_WAIT.
4707         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4708         (__pthread_cond_timedwait): Likewise.
4709         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4710         (FUTEX_CMP_REQUEUE): Define.
4711         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4712         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4713         Pass __futex value from before the unlock and __futex address instead
4714         of address of low 32-bits of __wakeup_seq to futex syscall.
4715         Fallback to FUTEX_WAKE all on any errors.
4717 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
4719         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
4720         comment typo.
4721         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
4722         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
4723         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
4724         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
4725         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
4727 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4729         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
4730         Add memory clobber to inline assembly.
4731         (__lll_mutex_trylock): Likewise.
4732         (__lll_mutex_cond_trylock): Likewise.
4734 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4736         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4737         Pass val argument as 6th system call argument in %r7.
4739 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
4741         * Makefile (tests): Add tst-cond16.
4742         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
4743         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
4744         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4745         Add __data.__futex field, reshuffle __data.__clock.
4746         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
4747         (__pthread_cond_signal): Increment __futex at the same time as
4748         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4749         address of low 32-bits of __wakeup_seq to futex syscall.
4750         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
4751         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4752         releasing internal lock to FUTEX_WAIT.
4753         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
4754         (__pthread_cond_timedwait): Likewise.
4755         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
4756         (FUTEX_CMP_REQUEUE): Define.
4757         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4758         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4759         Pass __futex value from before the unlock and __futex address instead
4760         of address of low 32-bits of __wakeup_seq to futex syscall.
4761         Fallback to FUTEX_WAKE all on any errors.
4762         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
4763         Define.
4764         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4765         internally.  Return non-zero if error, zero if success.
4766         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4767         Add __data.__futex field, reshuffle __data.__clock.
4768         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
4769         Define.
4770         (lll_futex_requeue): Add val argument, return 1 unconditionally
4771         for the time being.
4772         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4773         Add __data.__futex field, reshuffle __data.__clock.
4774         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4775         Define.
4776         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4777         internally.  Return non-zero if error, zero if success.
4778         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4779         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
4780         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4781         Define.
4782         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4783         internally.  Return non-zero if error, zero if success.
4784         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4785         Add __data.__futex field, reshuffle __data.__clock.
4786         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
4787         Define.
4788         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4789         internally.  Return non-zero if error, zero if success.
4790         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4791         Add __data.__futex field, reshuffle __data.__clock.
4792         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4793         Add __data.__futex field, reshuffle __data.__clock.
4794         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
4795         Increment __futex at the same time as __wakeup_seq or __total_seq.
4796         Pass address of __futex instead of address of low 32-bits of
4797         __wakeup_seq to futex syscall.
4798         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4799         Pass __futex value from before releasing internal lock
4800         to FUTEX_WAIT.
4801         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4802         Likewise.  Avoid unnecessary shadowing of variables.
4803         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
4804         Set __futex to 2 * __total_seq.  Pass __futex value from before the
4805         unlock and __futex address instead of address of low 32-bits of
4806         __wakeup_seq to futex_requeue macro, adjust for new return value
4807         meaning.
4808         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4809         (__pthread_cond_signal): Increment __futex at the same time as
4810         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4811         address of low 32-bits of __wakeup_seq to futex syscall.
4812         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
4813         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4814         releasing internal lock to FUTEX_WAIT.
4815         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4816         (__pthread_cond_timedwait): Likewise.
4817         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4818         (FUTEX_CMP_REQUEUE): Define.
4819         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4820         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4821         Pass __futex value from before the unlock and __futex address instead
4822         of address of low 32-bits of __wakeup_seq to futex syscall.
4823         Fallback to FUTEX_WAKE all on any errors.
4825 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4827         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
4828         Add nop to align the end of critical section.
4829         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
4831 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4833         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4834         Add __broadcast_seq field.
4835         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
4836         all waiters as woken with woken_seq and bump broadcast counter.
4837         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
4838         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
4839         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4840         Comment typo fixes.  Avoid returning -ETIMEDOUT.
4842 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
4844         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4845         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
4846         Reported by Kaz Kojima.
4848 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
4850         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
4852 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
4854         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
4855         __broadcast_seq with bc_seq after acquiring internal lock instead of
4856         before it.
4858 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
4860         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
4861         compilation.
4862         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4863         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
4864         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4865         (pthread_cond_t): Add __data.__broadcast_seq field.
4866         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4867         (FRAME_SIZE): Define.
4868         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
4869         Comment typo fixes.
4870         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
4871         Define.
4872         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
4873         typo fixes.
4874         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4875         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
4876         fixes.
4878 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
4880         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
4881         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4882         Add __broadcast_seq field.
4883         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4884         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4885         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4886         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4887         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4888         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
4889         all waiters as woken with woken_seq and bump broadcast counter.
4890         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
4891         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
4892         __broadcast_seq field.
4893         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4894         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4895         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
4896         * pthread_cond_init.c: Initialize __broadcast_seq field.
4897         * Makefile (tests): Add tst-cond17 and tst-cond18.
4898         Add .NOTPARALLEL goal.
4899         * tst-cond16.c: New file.  From Jakub.
4900         * tst-cond17.c: New file.  From Jakub.
4901         * tst-cond18.c: New file.  From Jakub.
4903 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
4905         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
4906         unwind info.
4908         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4909         Parametrize frame size.  Correct some unwind info.
4910         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4912 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4914         * tst-stack3.c: Note testing functionality beyond POSIX.
4916 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4918         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
4919         Change conditional from ifdef to if.
4921 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
4923         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
4924         SYSDEP_CANCEL_ERROR): Define.
4925         (PSEUDO): Use it.
4927 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
4929         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
4931 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
4933         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
4935 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4937         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
4938         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4939         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
4940         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4942 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
4944         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
4945         thread has all signals blocked.
4947 2004-04-18  Andreas Jaeger  <aj@suse.de>
4949         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
4950         (SEM_VALUE_MAX): Add missing brace.
4952 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
4954         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
4955         in rt subdir.
4956         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
4957         * sysdeps/pthread/tst-mqueue8x.c: New test.
4958         * tst-cancel4.c: Update comment about message queues.
4960         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
4961         return it_value { 0, 0 }.
4962         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
4963         like SIGEV_SIGNAL.
4964         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
4965         assertion for SIGEV_NONE.
4966         (thread_attr_compare): Compare all attributes, not just a partial
4967         subset.
4969 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
4971         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
4973 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
4975         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
4976         Just use a plain number.
4977         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
4978         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4979         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4980         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4981         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4982         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4983         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4985 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4987         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
4988         frame info.
4989         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4991 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
4993         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
4994         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
4995         of calling sigwaitinfo.
4997 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
4999         * allocatestack.c (allocate_stack): Set reported_guardsize
5000         unconditionally.
5001         * pthread_getattr_np.c (pthread_getattr_np): Use
5002         reported_guardsize instead of guardsize.
5003         * descr.h (struct pthread): Add reported_guardsize field.
5005 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
5007         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
5009 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
5011         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
5013 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
5015         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
5016         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
5017         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
5018         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
5019         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
5020         Define.
5021         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
5022         (_POSIX_MESSAGE_PASSING): Define.
5023         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
5024         (_POSIX_MESSAGE_PASSING): Define.
5025         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
5026         (_POSIX_MESSAGE_PASSING): Define.
5028 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
5030         * tst-context1.c (fct): Check whether correct stack is used.
5032 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
5034         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
5035         matching constraints for asm mem parameters.
5037         * tst-clock2.c (tf): Don't define unless needed.
5039 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
5041         * Makefile (link-libc-static): Use $(static-gnulib) instead of
5042         $(gnulib).
5044 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
5046         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
5047         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
5048         * pthreadP.h: Declare __nptl_deallocate_tsd.
5049         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
5050         Adjust caller.
5052         * Makefile (tests): Add tst-tsd5.
5053         * tst-tsd5.c: New file.
5055 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
5057         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5058         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
5059         is SHLIB_COMPAT check.
5060         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5061         (__pthread_attr_getaffinity_old): Likewise.
5062         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5063         (__pthread_getaffinity_old): Likewise.
5064         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5065         (__pthread_setaffinity_old): Likewise.
5067 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
5069         * allocatestack.c (_make_stacks_executable): Call
5070         _dl_make_stack_executable first.
5072 2004-03-24  Roland McGrath  <roland@redhat.com>
5074         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
5075         constraint instead of "0".
5077 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
5079         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5080         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
5082         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
5083         code to avoid warning.
5085 2004-03-24  Andreas Jaeger  <aj@suse.de>
5087         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5088         (__pthread_attr_setaffinity_old): Remove const.
5090 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
5092         * sysdeps/unix/sysv/linux/smp.h: New file.
5093         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
5094         * init.c: Define __is_smp.
5095         (__pthread_initialize_minimal_internal): Call is_smp_system to
5096         initialize __is_smp.
5097         * pthreadP.h: Declare __is_smp.
5098         Define MAX_ADAPTIVE_COUNT is necessary.
5099         * pthread_mutex_init.c: Add comment regarding __spins field.
5100         * pthread_mutex_lock.c: Implement adaptive mutex type.
5101         * pthread_mutex_timedlock.c: Likewise.
5102         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
5103         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
5104         Add __spins field.
5105         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5106         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5107         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5108         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5109         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5110         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5111         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5112         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
5113         lll_mutex_cond_trylock.
5114         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5115         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5116         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5117         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5118         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5119         Define BUSY_WAIT_NOP.
5120         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5121         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5123         * tst-mutex5.c: Add support for testing adaptive mutexes.
5124         * tst-mutex7.c: Likewise.
5125         * tst-mutex5a.c: New file.
5126         * tst-mutex7a.c: New file.
5127         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
5129         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5130         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
5131         vgettimeofday call might destroy the content.
5133         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
5134         @pause in the loop.
5136         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
5137         No need to restrict type of ret.  Make it int.  Add comment.
5139         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
5140         Remove unnecessary setne instruction.
5142 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
5144         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5145         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
5146         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
5147         If realloc fails, break out of the loop.
5149 2004-03-20  Andreas Jaeger  <aj@suse.de>
5151         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5152         (__pthread_setaffinity_old): Fix interface.
5153         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5154         (__pthread_getaffinity_old): Likewise.
5156         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5157         (__pthread_setaffinity_new): Remove duplicate declaration.
5159 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5161         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
5162         the return value to a safe register.
5163         (CDISABLE): Set the function argument correctly.
5165 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5167         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
5168         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5169         Rewrite so that only one locked memory operation per round is needed.
5170         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
5171         (pthread_barrier_wait): After wakeup, release lock only when the
5172         last thread stopped using the barrier object.
5173         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
5174         (__pthread_cond_wait): Don't store mutex address if the current
5175         value is ~0l.  Add correct cleanup support and unwind info.
5176         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5177         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
5178         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
5179         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
5180         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
5181         Add correct cleanup support and unwind info.
5182         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
5183         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
5184         information for syscall wrappers.
5186 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
5188         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
5189         cpusetsize field, remove next.
5190         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
5191         parameter for size of the CPU set.
5192         (pthread_setaffinity_np): Likewise.
5193         (pthread_attr_getaffinity_np): Likewise.
5194         (pthread_attr_setaffinity_np): Likewise.
5195         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
5196         interface change, keep compatibility code.
5197         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
5198         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
5199         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
5200         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
5201         __pthread_getaffinity_np.
5202         * Versions: Add version for changed interfaces.
5203         * tst-attr3.c: Adjust test for interface change.
5204         * pthread_getattr_np.c: Query the kernel about the affinity mask with
5205         increasing buffer sizes.
5206         * pthread_attr_destroy.c: Remove unused list handling.
5207         * pthread_attr_init.c: Likewise.
5209 2004-03-17  Roland McGrath  <roland@redhat.com>
5211         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
5212         first argument to clock_getres so we ever enable kernel timers.
5214 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
5216         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
5218 2004-03-12  Richard Henderson  <rth@redhat.com>
5220         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
5221         oldvalue from CENABLE to CDISABLE.
5223 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
5225         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
5226         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
5227         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
5228         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
5230 2004-03-11  Richard Henderson  <rth@redhat.com>
5232         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
5233         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
5234         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
5236 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
5238         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
5239         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
5240         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
5242 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
5244         * forward.c (__pthread_cond_broadcast_2_0,
5245         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
5246         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
5247         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
5249 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5251         * sysdeps/sh/tcb-offsets.sym: Add PID.
5252         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
5253         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
5255 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
5257         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
5258         include <sysdep-cancel.h>, vfork is no cancellation point.
5259         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
5260         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
5261         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
5263 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
5265         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
5266         libc_hidden_def.
5267         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
5268         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
5269         Likewise.
5270         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
5271         Likewise.
5272         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
5273         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
5274         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
5275         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
5276         of DO_CALL_VIA_BREAK.  Work around a gas problem.
5278         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
5279         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
5280         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
5281         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
5282         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
5283         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
5285         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
5286         a local register for saving old PID.  Negate PID in parent upon exit.
5288         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
5289         tcb-offsets.h.
5290         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
5291         before syscall, set to the old value in the parent afterwards.
5292         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
5293         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
5294         tcb-offsets.h.
5295         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
5296         before syscall, set to the old value in the parent afterwards.
5297         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
5298         * sysdeps/s390/tcb-offsets.sym: Add PID.
5300         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
5301         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
5302         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
5303         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
5304         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
5305         * sysdeps/sparc/tcb-offsets.sym: Add PID.
5307 2004-03-10  Andreas Schwab  <schwab@suse.de>
5309         * sysdeps/ia64/tcb-offsets.sym: Add PID.
5310         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
5311         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
5313 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
5315         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
5316         * tst-cancel21.c (do_one_test): Likewise.
5317         Reported by Gordon Jin <gordon.jin@intel.com>.
5319 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
5321         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
5322         if non-zero and set to INT_MIN if zero.
5323         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
5324         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
5325         (SAVE_PID, RESTORE_PID): Define.
5326         (__vfork): Use it.
5327         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
5328         Use relative path to avoid including NPTL i386/vfork.S.
5329         (SAVE_PID, RESTORE_PID): Define.
5330         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
5331         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
5332         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
5333         tst-vfork2x.
5334         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
5335         * tst-vfork1.c: New test.
5336         * tst-vfork2.c: New test.
5337         * tst-vfork1x.c: New test.
5338         * tst-vfork2x.c: New test.
5340 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
5342         * sysdeps/i386/tcb-offsets.sym: Add PID.
5343         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
5344         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
5345         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
5347 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
5349         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
5351 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
5353         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
5354         _rtld_global_ro.
5356 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
5358         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
5359         _rtld_global_ro.
5361         * tst-once4.c: Remove unnecessary macro definition.
5363         * tst-mutex7.c (do_test): Limit thread stack size.
5364         * tst-once2.c (do_test): Likewise.
5365         * tst-tls3.c (do_test): Likewise.
5366         * tst-tls1.c (do_test): Likewise.
5367         * tst-signal3.c (do_test): Likewise.
5368         * tst-kill6.c (do_test): Likewise.
5369         * tst-key4.c (do_test): Likewise.
5370         * tst-join4.c (do_test): Likewise.
5371         * tst-fork1.c (do_test): Likewise.
5372         * tst-context1.c (do_test): Likewise.
5373         * tst-cond2.c (do_test): Likewise.
5374         * tst-cond10.c (do_test): Likewise.
5375         * tst-clock2.c (do_test): Likewise.
5376         * tst-cancel10.c (do_test): Likewise.
5377         * tst-basic2.c (do_test): Likewise.
5378         * tst-barrier4.c (do_test): Likewise.
5380 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
5382         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
5384 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
5386         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5387         (__pthread_cond_timedwait): Optimize wakeup test.
5388         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5389         (__pthread_cond_wait): Likewise.
5390         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
5391         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5392         Likewise.
5394 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
5396         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5397         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
5398         the atomic instruction needed.
5399         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5400         (__lll_mutex_lock_wait): Likewise.
5402 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
5404         * Makefile (tests): Add tst-cond14 and tst-cond15.
5405         * tst-cond14.c: New file.
5406         * tst-cond15.c: New file.
5408 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
5410         * sysdeps/pthread/createthread.c (create_thread): Remove use of
5411         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
5412         needs to be implemented differently to be useful.
5414 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
5416         * pthread_attr_setschedparam.c: Don't test priority against limits
5417         here.  Set ATTR_FLAG_SCHED_SET flag.
5418         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
5419         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
5420         from parent thread to child.  If attribute is used and scheduling
5421         parameters are not inherited, copy parameters from attribute or
5422         compute them.  Check priority value.
5423         * pthread_getschedparam.c: If the parameters aren't known yet get
5424         them from the kernel.
5425         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
5426         ATTR_FLAG_POLICY_SET flag for thread.
5427         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
5428         and ATTR_FLAG_POLICY_SET.
5430         * sysdeps/pthread/createthread.c: Use tgkill if possible.
5432         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
5433         fail if stack address hasn't been set.  Just return 0.
5435 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
5437         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
5438         libpthread for the files in this list.
5439         (CFLAGS-tst-unload): Removed.
5440         * tst-unload.c (do_test): Don't use complete path for
5441         LIBPHREAD_SO.
5443         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
5444         tst-_res1mod2.
5446 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
5448         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5449         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
5450         operation per round is needed.
5451         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5452         (__lll_mutex_lock_wait): Likewise.
5454 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
5456         * tst-cancel9.c (cleanup): Don't print to stderr.
5458 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5460         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
5462 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
5464         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
5465         (__syscall_error_handler2): Call CDISABLE.
5466         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
5467         (__syscall_error_handler2): Call CDISABLE.
5469         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5470         Release lock before the loop, don't reacquire it.
5472         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
5474 2004-02-19  Andreas Schwab  <schwab@suse.de>
5476         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5477         Fix last change.
5479 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
5481         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
5482         (pthread_barrier_wait): After wakeup, release lock only when the
5483         last thread stopped using the barrier object.
5484         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
5485         (pthread_barrier_wait): Likewise.
5486         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5487         Likewise.
5488         * Makefile (tests): Add tst-barrier4.
5489         * tst-barrier4.c: New file.
5491         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5492         (__pthread_cond_timedwait): Perform timeout test while holding
5493         internal lock to prevent wakeup race.
5494         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5495         * sysdeps/pthread/pthread_cond_timedwait.c
5496         (__pthread_cond_timedwait): Likewise.
5497         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5498         (__pthread_cond_timedwait): Likewise.
5500 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
5502         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
5503         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
5504         * Makefile (tests): Add tst-rwlock13.
5505         * tst-rwlock13.c: New test.
5507 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
5509         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5510         (__condvar_tw_cleanup): Little optimization.
5511         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5513 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
5515         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
5516         libpthread as "lib" parameter to SHLIB_COMPAT.
5517         (__novmx_siglongjmp): Fix typo in function name.
5518         (__novmx_longjmp): Fix typo in function name.
5520 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
5522         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
5523         __builtin_expect.
5525         * sysdeps/generic/pt-longjmp.c: Moved to...
5526         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
5528 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
5530         * Makefile (libpthread-routines): Add pt-cleanup.
5531         * pt-longjmp.c: Removed.
5532         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
5533         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
5534         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
5535         Version longjmp, siglongjmp for GLIBC_2.3.4.
5536         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
5538 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
5540         * sysdeps/pthread/pthread_cond_timedwait.c
5541         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
5542         Reuse code.  Add __builtin_expects.
5544         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5545         (__pthread_cond_timedwait): Get internal lock in case timeout has
5546         passed before the futex syscall.
5547         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5549 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
5551         * allocatestack.c: Pretty printing.
5553         * sysdeps/pthread/createthread.c (create_thread): Don't add
5554         CLONE_DETACHED bit if it is not necessary.
5556 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
5558         * pthread_getattr_np.c: Include ldsodefs.h.
5560 2004-01-16  Richard Henderson  <rth@redhat.com>
5562         * allocatestack.c: Don't declare __libc_stack_end.
5563         * init.c (__pthread_initialize_minimal_internal): Likewise.
5564         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
5566 2004-01-15  Richard Henderson  <rth@redhat.com>
5568         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
5569         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
5570         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
5571         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
5572         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
5573         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
5574         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
5575         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
5577 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
5579         * init.c (pthread_functions): Make array const.
5581 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
5583         * allocatestack.c (__make_stacks_executable): Change interface.
5584         Check parameters.  Pass parameter on to libc counterpart.
5585         * pthreadP.h: Change declaration.
5587 2004-01-13  Richard Henderson  <rth@redhat.com>
5589         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
5590         prototype form.
5591         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
5592         Likewise.
5594         * sysdeps/alpha/Makefile: New file.
5595         * sysdeps/alpha/tcb-offsets.sym: New file.
5596         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
5597         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
5599         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
5600         on powerpc version.
5602 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
5604         * Makefile (tests): Add tst-backtrace1.
5605         * tst-backtrace1.c: New test.
5607 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
5609         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
5610         register as second parameter to the REGISTER macro.
5611         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
5612         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
5613         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
5614         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
5615         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
5616         of thread register as second parameter to REGISTER macro in 64 case.
5618 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
5620         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
5621         (CFLAGS-getpid.o): Defined.
5622         (CFLAGS-getpid.os): Defined.
5624 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
5626         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
5627         returned for main thread does not overlap with any other VMA.
5628         Patch by Jakub Jelinek.
5630 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
5632         * tst-raise1.c: Include stdio.h.
5634 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
5636         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
5637         setting with __ASSUME_TGKILL || defined __NR_tgkill.
5638         If pid is 0, set it to selftid.
5639         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
5640         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
5641         != 0, return self->tid without doing a syscall.
5642         * descr.h (struct pthread): Move pid field after tid.
5644         * Makefile (tests): Add tst-raise1.
5645         * tst-raise1.c: New file.
5647 2003-12-23  Roland McGrath  <roland@redhat.com>
5649         * tst-oddstacklimit.c: New file.
5650         * Makefile (tests): Add it.
5651         (tst-oddstacklimit-ENV): New variable.
5653         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
5654         value up to page size for __default_stacksize.
5656 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
5658         * Makefile (tests): Add tst-eintr5.
5659         * tst-eintr5.c: New file.
5661         * eintr.c (eintr_source): Prevent sending signal to self.
5663         * tst-eintr2.c (tf1): Improve error message.
5665 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
5667         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
5668         * sysdeps/unix/sysv/linux/getpid.c: New file.
5669         * pthread_cancel.c: Add comment explaining use of PID field.
5670         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
5671         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
5672         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
5673         temporarily to signal the field must not be relied on and updated
5674         by getpid().
5675         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
5676         temporarily negative.
5677         * sysdeps/unix/sysv/linux/raise.c: Likewise.
5679 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
5681         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
5682         (eintr_source): If ARG != NULL, use pthread_kill.
5683         * tst-eintr1.c: Adjust for this change.
5684         * tst-eintr2.c: Likewise.
5685         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
5686         * tst-eintr3.c: New file.
5687         * tst-eintr4.c: New file.
5689 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
5691         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
5692         if CANCELSTATE_BITMASK is set.
5693         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
5694         Likewise.
5696         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
5697         (tests-reverse): Add tst-cancel23.
5698         * tst-cancel22.c: New test.
5699         * tst-cancel23.c: New test.
5701 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
5703         * tst-eintr1.c: Better error messages.
5705         * Makefile (tests): Add tst-eintr2.
5706         * tst-eintr2.c: New file.
5708 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
5710         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
5711         (CFLAGS-tst-cancelx21.c): Set.
5712         * tst-cancel21.c: New test.
5713         * tst-cancelx21.c: New test.
5715         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
5716         comparison operand.
5717         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
5718         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
5719         * pt-longjmp.c: Include jmpbuf-unwind.h.
5720         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
5721         _JMPBUF_UNWINDS.  Adjust compared pointers.
5722         * init.c (__pthread_initialize_minimal_internal): Initialize
5723         pd->stackblock_size.
5724         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
5725         * sysdeps/alpha/jmpbuf-unwind.h: New file.
5726         * sysdeps/i386/jmpbuf-unwind.h: New file.
5727         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
5728         * sysdeps/s390/jmpbuf-unwind.h: New file.
5729         * sysdeps/sh/jmpbuf-unwind.h: New file.
5730         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
5731         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
5732         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
5733         (_JMPBUF_CFA_UNWINDS): Remove.
5734         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
5736 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
5738         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
5739         (CFLAGS-tst-cancelx20.c): Set.
5740         * tst-cancel20.c: New test.
5741         * tst-cancelx20.c: New test.
5743 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
5745         * init.c (__pthread_initialize_minimal_internal): Don't treat
5746         architectures with separate register stack special here when
5747         computing default stack size.
5749 2003-12-17  Roland McGrath  <roland@redhat.com>
5751         * Makefile (tst-cancelx7-ARGS): New variable.
5752         Reportd by Greg Schafer <gschafer@zip.com.au>.
5754 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
5756         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
5757         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
5758         (tst-stack3-ENV): Set.
5759         ($(objpfx)tst-stack3-mem): New.
5760         * tst-stack3.c: New test.
5762 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
5764         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
5765         Add unwind directives.  Drop unused .regstk directive.
5766         (_fini_EPILOG_BEGINS): Add unwind directives.
5768 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
5770         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5771         Assume parameter is a pointer.
5772         (lll_futex_wake): Likewise.
5773         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
5774         Likewise.
5775         (lll_futex_wake): Likewise.
5776         Reported by Boris Hu.
5777         * sysdeps/unix/sysv/linux/unregister-atfork.c
5778         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
5780         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
5782 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
5784         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
5785         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
5786         __rtld_lock_initialize for ld.so lock.
5787         Patch in part by Adam Li <adam.li@intel.com>.
5789 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
5791         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
5792         in $(gnulib).  Also, remove stale comment.
5794 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
5796         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
5797         advantage of new syscall stub and optimize accordingly.
5799         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
5800         from SYS_futex, to match expectations of
5801         sysdep.h:DO_INLINE_SYSCALL.
5802         (lll_futex_clobbers): Remove.
5803         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
5804         (lll_futex_wake): Likewise.
5805         (lll_futex_requeue): Likewise.
5806         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
5807         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
5808         Jelinek).
5809         (__lll_mutex_lock): Likewise.
5810         (__lll_mutex_cond_lock): Likewise.
5811         (__lll_mutex_timed_lock): Likewise.
5812         (__lll_mutex_unlock): Likewise.
5813         (__lll_mutex_unlock_force): Likewise.
5815         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
5816         comes before the include of <sysdep.h>.
5817         (THREAD_SELF_SYSINFO): New macro.
5818         (THREAD_SYSINFO): Likewise.
5819         (INIT_SYSINFO): New macro.
5820         (TLS_INIT_TP): Call INIT_SYSINFO.
5822         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
5824         * sysdeps/pthread/createthread.c (create_thread): Use
5825         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
5826         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
5827         THREAD_SELF_SYSINFO instead of open code.
5828         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
5829         (THREAD_SYSINFO): Likewise.
5831         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
5833         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
5835 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
5837         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
5838         instead of .init.  Patch by David Mosberger.
5840 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
5842         * sysdeps/pthread/configure.in: Remove broken declaration in C
5843         cleanup handling check.
5845 2003-11-30  Andreas Jaeger  <aj@suse.de>
5847         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
5848         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
5849         Likewise.
5851 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
5853         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
5854         * pthread_attr_destroy.c: Include shlib-compat.h.
5855         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
5856         is set in iattr->flags.
5857         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
5859 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
5861         * Makefile (distribute): Add tst-cleanup4aux.c.
5863         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
5864         include.
5866 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
5868         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
5869         pthread_cond_signal.
5871         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
5872         store mutex address if the current value is ~0l.
5873         * sysdeps/pthread/pthread_cond_timedwait.c
5874         (__pthread_cond_timedwait): Likewise.
5875         * sysdeps/pthread/pthread_cond_broadcast.c
5876         (__pthread_cond_broadcast): Don't use requeue for pshared
5877         condvars.
5879         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5880         (__pthread_cond_wait): Don't store mutex address if the current
5881         value is ~0l.
5882         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5883         (__pthread_cond_timedwait): Likewise.
5884         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5885         (__pthread_cond_broadcast): Don't use requeue for pshared
5886         condvars.
5888         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
5889         element with ~0l for pshared condvars, with NULL otherwise.
5891         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5892         (__pthread_cond_wait): Don't store mutex address if the current
5893         value is ~0l.
5894         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5895         (__pthread_cond_timedwait): Likewise.
5896         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
5897         (__pthread_cond_broadcast): Don't use requeue for pshared
5898         condvars.
5900         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
5901         * tst-cond12.c: New file.
5902         * tst-cond13.c: New file.
5904 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
5906         * sysdeps/pthread/configure.in: Make missing forced unwind support
5907         fatal.
5909 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
5911         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
5913 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
5915         * Makefile: Add magic to clean up correctly.
5917 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
5919         * unwind.c (FRAME_LEFT): Define.
5920         (unwind_stop): Handle old style cleanups here.
5921         (__pthread_unwind): Handle old style cleanups only if
5922         !HAVE_FORCED_UNWIND.
5923         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
5924         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
5925         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
5926         ($(objpfx)tst-cleanupx4): Likewise.
5927         * tst-cleanup4.c: New test.
5928         * tst-cleanup4aux.c: New.
5929         * tst-cleanupx4.c: New test.
5931 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
5933         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
5934         lll_mutex_*lock macros to skip atomic operations on some archs.
5936 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
5938         * sysdeps/pthread/tst-timer.c (main): Initialize
5939         sigev2.sigev_value as well.
5941 2003-10-15  Roland McGrath  <roland@redhat.com>
5943         * sysdeps/pthread/configure.in: Barf if visibility attribute support
5944         is missing.
5945         * sysdeps/pthread/configure: Regenerated.
5947 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5949         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
5950         locking macros.  No distinction between normal and mutex locking
5951         anymore.
5952         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
5953         Merge bits from lowlevelmutex.S we still need.
5954         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
5955         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
5956         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
5957         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
5958         new mutex implementation.
5959         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
5960         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
5961         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5962         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
5963         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
5964         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5965         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5966         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
5967         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5968         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
5969         symbol for entry point to avoid cancellation.
5971 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
5973         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
5974         changes.
5975         (SAVE_OLDTYPE_0): Fix a typo.
5977 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
5979         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
5980         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
5982 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
5984         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
5985         correct offset.
5987 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
5989         * Makefile (tests): Add tst-cancel19.
5990         * tst-cancel19.c: New test.
5992 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
5994         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
5995         restoring of the old cancellation type.
5997 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
5999         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
6001 2003-09-27  Wolfram Gloger  <wg@malloc.de>
6003         * sysdeps/pthread/malloc-machine.h: New file
6005 2003-09-24  Roland McGrath  <roland@redhat.com>
6007         * allocatestack.c (__make_stacks_executable): Don't ignore return
6008         value from _dl_make_stack_executable.
6010 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
6012         * allocatestack.c (__make_stacks_executable): Also change
6013         permission of the currently unused stacks.
6015         * allocatestack.c (change_stack_perm): Split out from
6016         __make_stacks_executable.
6017         (allocate_stack): If the required permission changed between the time
6018         we started preparing the stack and queueing it, change the permission.
6019         (__make_stacks_executable): Call change_stack_perm.
6021         * Makefile: Build tst-execstack-mod locally.
6022         * tst-execstack-mod.c: New file.
6024 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
6026         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
6028 2003-09-23  Roland McGrath  <roland@redhat.com>
6030         * tst-execstack.c: New file.
6031         * Makefile (tests): Add it.
6032         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
6033         (LDFLAGS-tst-execstack): New variable.
6035         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
6036         whether to use PROT_EXEC for stack mmap.
6037         (__make_stacks_executable): New function.
6038         * pthreadP.h: Declare it.
6039         * init.c (__pthread_initialize_minimal_internal): Set
6040         GL(dl_make_stack_executable_hook) to that.
6042 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
6044         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
6045         recommendation from AMD re avoidance of lock prefix.
6047 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
6049         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
6050         lll_futex_timed_wait instead of lll_futex_wait.
6051         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
6052         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
6053         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
6054         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
6055         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
6056         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
6057         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
6058         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
6059         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
6060         Completely revamp the locking macros.  No distinction between
6061         normal and mutex locking anymore.
6062         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
6063         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
6064         __lll_lock_timedwait): Fix prototypes.
6065         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
6066         __lll_lock_timedwait): Likewise.
6067         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
6068         macros, add __builtin_expect.
6069         (lll_mutex_timedlock): Likewise.  Fix return value.
6070         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
6071         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
6072         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
6073         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
6074         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
6075         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
6076         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
6077         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
6079 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
6081         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6082         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
6083         operation if possible.
6085         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
6086         like jumping over the lock prefix.
6088 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
6090         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
6091         locking macros.  No distinction between normal and mutex locking
6092         anymore.
6093         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6094         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
6095         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
6096         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
6097         locking.  Merge bits from lowlevelmutex.S we still need.
6098         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
6099         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
6100         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
6101         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
6102         * Makefile (routines): Remove libc-lowlevelmutex.
6103         (libpthread-rountines): Remove lowlevelmutex.
6104         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
6105         for new mutex implementation.
6106         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6107         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6108         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6109         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6110         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6111         Likewise.
6112         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6113         Likewise.
6114         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
6115         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6116         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
6117         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6118         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6119         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6120         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6121         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6122         Likewise.
6123         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6124         Likewise.
6125         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
6126         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6127         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6128         Don't use requeue.
6129         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6130         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
6132 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
6134         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
6135         in parameters of asm with output parameters.
6137         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
6138         type of DECR parameter to int.
6139         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
6141 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
6143         * tst-attr3.c (tf, do_test): Print stack start/end/size and
6144         guardsize for each thread.
6146 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
6148         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
6149         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6150         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
6152         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
6153         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
6154         NULL.
6155         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
6156         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
6157         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6158         (pthread_getaffinity_np): Add hidden_def.
6160         * Makefile (tests): Add tst-attr3.
6161         * tst-attr3.c: New test.
6163         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
6165 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
6167         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
6168         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
6170 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
6172         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
6173         * tst-align.c: Include tst-stack-align.h.
6174         (tf, do_test): Use TEST_STACK_ALIGN macro.
6176 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
6178         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
6179         variable.
6181 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
6183         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
6184         stack-related values for the initial thread.
6186 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
6188         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
6190 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
6192         * pthread_mutex_lock.c: Minor code rearrangements.
6194 2003-09-05  Roland McGrath  <roland@redhat.com>
6196         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
6197         Instead, include ../nptl_db/db_info.c to do its magic.
6198         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
6199         (__pthread_pthread_key_2ndlevel_size): Likewise.
6200         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
6201         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
6202         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
6203         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
6204         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
6205         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
6206         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
6207         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
6208         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
6209         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
6210         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
6211         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
6212         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
6213         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
6214         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
6215         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
6216         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
6218 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
6220         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
6221         of pthread_t to be compatible with LT.
6222         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6223         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6224         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6225         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6226         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
6227         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6228         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6230 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
6232         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
6234 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
6236         * unwind-forcedunwind.c: Move to...
6237         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
6238         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
6239         * sysdeps/pthread/jmpbuf-unwind.h: New file.
6240         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
6241         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
6242         * unwind.c: Include jmpbuf-unwind.h.
6243         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
6245 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
6247         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
6248         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
6249         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
6250         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
6251         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
6252         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
6253         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
6254         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
6255         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
6256         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
6257         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
6258         function.
6259         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
6260         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
6261         * Makefile (tests): Add tst-stack2.
6262         * tst-stack2.c: New test.
6263         * tst-stack1.c: Include limits.h and sys/param.h.
6264         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
6266         * pthread_condattr_setpshared.c: Include errno.h.
6267         (pthread_condattr_setpshared): Return EINVAL if pshared
6268         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
6270         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
6271         defined symbol for entry point to avoid cancellation.
6272         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6273         Likewise.
6274         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
6275         Likewise.
6276         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6277         Likewise.
6278         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
6279         Likewise.
6280         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
6281         Likewise.
6282         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
6283         __close_nocancel, __read_nocancel, __write_nocancel,
6284         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
6285         libpthread.so or librt.so, define to corresponding function
6286         without _nocancel suffix.
6287         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
6288         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
6289         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
6291         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
6293 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
6295         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
6296         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
6298         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
6299         in subsections has a symbol associated with it.
6301         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
6302         defined symbol for entry point to avoid cancellation.
6303         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
6305 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
6307         * Makefile (tests): Add tst-tls5.
6308         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
6309         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
6310         ($(objpfx)tst-tls5): New.
6311         ($(objpfx)tst-tls6.out): Likewise.
6312         (tests): Depend on $(objpfx)tst-tls6.out.
6313         * tst-tls3.c: Include stdint.h and pthreaddef.h.
6314         (do_test): Check pthread_self () return value alignment.
6315         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
6316         (tf): Check pthread_self () return value alignment.
6317         * tst-tls5.c: New test.
6318         * tst-tls5.h: New.
6319         * tst-tls5mod.c: New.
6320         * tst-tls5moda.c: New.
6321         * tst-tls5modb.c: New.
6322         * tst-tls5modc.c: New.
6323         * tst-tls5modd.c: New.
6324         * tst-tls5mode.c: New.
6325         * tst-tls5modf.c: New.
6326         * tst-tls6.sh: New test.
6328         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
6329         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
6330         * init.c (pthread_functions): Initialize them.
6331         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
6332         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
6333         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
6334         pthread_cond_timedwait@@GLIBC_2.3.2.
6336 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
6338         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
6339         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
6340         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
6341         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
6342         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
6343         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
6345         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
6347         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
6348         _POSIX_THREAD_PRIORITY_SCHEDULING.
6349         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
6351 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
6353         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
6354         nested function, use static inline function from libio.h.
6355         Code by Richard Henderson.
6357         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
6358         weak.
6360 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
6362         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
6363         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
6364         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
6365         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
6366         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
6367         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
6368         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
6369         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
6370         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
6371         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
6372         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
6373         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
6374         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
6375         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
6376         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
6377         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
6378         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
6379         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
6380         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
6381         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
6382         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
6383         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
6384         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
6385         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
6386         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
6387         * sysdeps/sparc/tls.h: New file.
6388         * sysdeps/sparc/tcb-offsets.sym: New file.
6389         * sysdeps/sparc/Makefile: New file.
6390         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
6391         * init.c [__sparc__] (__NR_set_tid_address): Define.
6393 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
6395         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
6396         _IO_release_lock): Define.
6398 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
6400         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
6401         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
6403 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
6405         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
6406         (__pthread_cleanup_class): Add missing return types of member
6407         functions.
6409 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
6411         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6412         (lll_mutex_unlock_force): Add memory barrier between store and futex
6413         syscall.
6415 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
6417         * tst-cancel4.c (do_test): Also unlink tempfname and remove
6418         tempmsg in first loop.
6420 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
6422         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6423         _POSIX_THREAD_PRIORITY_SCHEDULING.
6424         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6426 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
6428         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
6429         (__rtld_lock_default_lock_recursive,
6430         __rtld_lock_default_unlock_recursive): Define.
6431         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
6432         __rtld_lock_unlock_recursive): Define using
6433         GL(_dl_rtld_*lock_recursive).
6434         * init.c (__pthread_initialize_minimal_internal): Initialize
6435         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
6436         Lock GL(_dl_load_lock) the same number of times as
6437         GL(_dl_load_lock) using non-mt implementation was nested.
6439         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
6440         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
6442 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
6444         * tst-cancel17.c (do_test): Make len2 maximum of page size and
6445         PIPE_BUF.
6447 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
6449         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
6451 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
6453         * sysdeps/pthread/createthread.c (do_clone): Move error handling
6454         to first syscall error check.  Move syscall error check for tkill
6455         into __ASSUME_CLONE_STOPPED #ifdef.
6457 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
6459         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
6460         is not defined, do explicit synchronization.
6461         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
6462         is not defined also unlock pd->lock for non-debugging case in case
6463         it is necessary.
6464         * pthread_create.c (start_thread): Always get and release pd->lock
6465         if __ASSUME_CLONE_STOPPED is not defined.
6466         (start_thread_debug): Removed.  Adjust users.
6467         * allocatestack.c (allocate_stack): Always initialize lock if
6468         __ASSUME_CLONE_STOPPED is not defined.
6469         * Makefile (tests): Add tst-sched1.
6470         * tst-sched1.c: New file.
6472         * sysdeps/pthread/createthread.c (do_clone): Only use
6473         sched_setschduler and pass correct parameters.
6475 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
6477         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
6478         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
6479         PTHREAD_STACK_MIN in comments.
6481 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
6483         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6484         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
6485         argument.
6486         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
6487         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
6488         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
6489         (__pthread_cleanup_upto): Fix prototype.
6490         (_longjmp_unwind): Adjust caller.
6491         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
6492         Change second argument to const struct pointer.
6493         * tst-sem8.c (main): Remove unused s2 and s3 variables.
6494         * tst-sem9.c (main): Likewise.
6495         * unwind.c: Include string.h for strlen prototype.
6497 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
6499         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6500         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
6501         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
6502         Define HAVE_CMOV.
6503         Patch by Nicholas Miell <nmiell@attbi.com>.
6505 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
6507         * init.c (__pthread_initialize_minimal_internal): Initialize
6508         GL(dl_init_static_tls).
6509         * pthreadP.h (__pthread_init_static_tls): New prototype.
6510         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
6511         New functions.
6512         * Makefile (tests): Add tst-tls4.
6513         (modules-names): Add tst-tls4moda and tst-tls4modb.
6514         ($(objpfx)tst-tls4): Link against libdl and libpthread.
6515         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
6516         tst-tls4modb.so.
6517         * tst-tls4.c: New file.
6518         * tst-tls4moda.c: New file.
6519         * tst-tls4modb.c: New file.
6521 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
6523         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
6524         before __timer_dealloc.
6525         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
6526         Don't call list_unlink.
6528 2003-07-29  Roland McGrath  <roland@redhat.com>
6530         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
6532 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
6534         * descr.h: Don't include lowlevellock.h, pthreaddef.h and dl-sysdep.h
6535         if __need_struct_pthread_size, instead define lll_lock_t.
6537 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
6539         * tst-cancel17.c (do_test): Check if aio_cancel failed.
6540         Don't reuse struct aiocb A if it failed.
6541         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
6542         not just one byte, as that does not block.
6544 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
6546         * sysdeps/pthread/unwind-resume.c: New file.
6547         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
6548         unwind-resume in csu subdir.
6549         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
6550         exceptions.
6551         (librt-sysdep_routines, librt-shared-only-routines): Add
6552         rt-unwind-resume.
6553         * sysdeps/pthread/rt-unwind-resume.c: New file.
6554         * unwind-forcedunwind.c: New file.
6555         * Makefile (libpthread-routines): Add unwind-forcedunwind.
6556         (libpthread-shared-only-routines): Likewise.
6557         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
6558         * pthreadP.h (pthread_cancel_init): New prototype.
6559         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
6561         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
6562         attr argument const struct pthread_attr *.
6564         * res.c (__res_state): Return __resp.
6565         * descr.h: Include resolv.h.
6566         (struct pthread): Add res field.
6567         * pthread_create.c: Include resolv.h.
6568         (start_thread): Initialize __resp.
6569         * Makefile (tests): Add tst-_res1.
6570         (module-names): Add tst-_res1mod1, tst-_res1mod2.
6571         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
6572         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
6573         libpthread.
6574         * tst-_res1.c: New file.
6575         * tst-_res1mod1.c: New file.
6576         * tst-_res1mod2.c: New file.
6578 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
6580         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
6582         * Makefile: Define various *-no-z-defs variables for test DSOs
6583         which has undefined symbols.
6585 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
6587         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
6588         Retry if the stwcx fails to store once_control.
6590 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
6592         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
6593         pthread_attr_setaffinity.
6594         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
6595         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
6596         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
6597         * pthread_attr_destroy.c: Free cpuset element if allocated.
6598         * pthread_create.c: Pass iattr as additional parameter to
6599         create_thread.
6600         * sysdeps/pthread/createthread.c: If attribute is provided and
6601         a new thread is created with affinity set or scheduling parameters,
6602         start thread with CLONE_STOPPED.
6603         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
6604         pthread_attr_setaffinity.
6605         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6606         cpuset element.
6608 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
6610         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
6612 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
6614         * sysdeps/pthread/configure.in: Require CFI directives also for
6615         ppc and s390.
6617 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
6619         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6620         Add cfi directives.
6622 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6624         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
6625         CLEANUP_JMP_BUF.
6626         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
6627         registers as variables.  Call __pthread_mutex_unlock_usercnt.
6628         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6629         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
6630         not self pointer in __writer.  Compare with TID to determine
6631         deadlocks.
6632         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6633         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
6634         Likewise.
6635         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
6636         Likewise.
6637         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
6638         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
6639         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
6640         macros also when compiling librt.
6642 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
6644         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
6645         -fasynchronous-unwind-tables.
6646         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
6647         (PSEUDO): Add cfi directives.
6648         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
6649         Likewise.
6650         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6651         Likewise.
6653 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
6655         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
6656         __pthread_unregister_cancel): Add prototypes and hidden_proto.
6657         * unwind.c (__pthread_unwind_next): Add hidden_def.
6658         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
6659         Likewise.
6660         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
6661         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6662         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
6663         Likewise.
6664         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
6665         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
6666         Likewise.
6667         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
6668         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
6669         __pthread_unregister_cancel and __pthread_unwind_next.
6671 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
6673         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
6674         different symbol for the cancellation syscall wrapper and
6675         non-cancellation syscall wrapper.
6676         (PSEUDO_END): Define.
6678 2003-07-05  Richard Henderson  <rth@redhat.com>
6680         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
6681         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
6682         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6683         return actual return value from the syscall, not 0.
6685 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
6687         * descr.h (struct pthread): Add pid field.
6688         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
6689         (__reclaim_stacks): Likewise.
6690         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
6691         also check for PID of the signal source.
6692         (__pthread_initialize_minimal_internal): Also initialize pid field
6693         of initial thread's descriptor.
6694         * pthread_cancel.c: Use tgkill instead of tkill if possible.
6695         * sysdeps/unix/sysv/linux/fork.c: Likewise.
6696         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
6697         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6698         * sysdeps/unix/sysv/linux/raise.c: Likewise.
6700 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
6702         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
6703         Fix use of parameter.
6704         (__libc_cleanup_pop): Likewise.
6706 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
6708         * init.c (sigcancel_handler): Change parameters to match handler
6709         for SA_SIGACTION.  Check signal number and code to recognize
6710         invalid invocations.
6712 2003-07-03  Roland McGrath  <roland@redhat.com>
6714         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
6715         Apply sizeof (struct pthread) bias to r13 value.
6717 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
6719         * sysdeps/pthread/configure.in: Require CFI directives.
6721         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
6722         definition.
6723         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
6724         libpthread compilation.
6725         * unwind.c (__pthread_unwind): Add hidden_def.
6726         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
6728 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6730         * libc-cancellation.c (__libc_cleanup_routine): Define.
6731         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
6732         (__pthread_cleanup_pop): Define.
6734 2003-07-01  Richard Henderson  <rth@redhat.com>
6736         * sysdeps/alpha/elf/pt-initfini.c: New file.
6737         * sysdeps/alpha/pthread_spin_lock.S: New file.
6738         * sysdeps/alpha/pthread_spin_trylock.S: New file.
6739         * sysdeps/alpha/pthreaddef.h: New file.
6740         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
6741         * sysdeps/alpha/tls.h: New file.
6742         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
6743         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
6744         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
6745         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
6746         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
6747         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
6748         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
6749         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
6750         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
6751         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
6753 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6755         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
6756         cleanup support and unwind info.
6758 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
6760         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6761         Use correct cleanup handler registration.  Add unwind info.
6762         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
6763         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
6764         * tst-once3.c: Add cleanup handler and check it is called.
6765         * tst-once4.c: Likewise.
6766         * tst-oncex3.c: New file.
6767         * tst-oncex4.c: New file.
6768         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
6770 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
6772         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
6774 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
6776         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
6777         (tf_msgsnd): Likewise.
6779         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
6780         premature returns a bit more.
6782 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
6784         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
6785         definition to the front.
6787         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
6788         the cleanup functions to make the names unique.  Fix dwarf opcode
6789         un unwind table.
6790         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
6791         functions to make the names unique.  Fix CFA offset for two blocks.
6793 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
6795         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
6796         missing closing braces.
6797         Patch by Christophe Saout <christophe@saout.de>.
6799 2003-06-24  Roland McGrath  <roland@redhat.com>
6801         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
6803 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
6805         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
6806         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
6808         * pthreadP.h: Declare __find_thread_by_id.
6809         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
6810         * pthread_clock_gettime.c: Allow using other thread's clock.
6811         * pthread_clock_settime.c: Likewise.
6812         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
6813         * Makefile: Add rules to build and run tst-clock2.
6814         * tst-clock2.c: New file.
6816 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
6818         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
6819         to use exception-based cleanup handler.
6820         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6822         * tst-cond8.c (ch): Announce that we are done.
6824         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
6826         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
6827         Also test aio_suspend with timeout value.
6829 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
6831         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
6832         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
6833         attribute_hidden.
6835         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
6836         (__pthread_mutex_lock_internal): Likewise.
6837         (__pthread_mutex_unlock_internal): Likewise.
6838         (__pthread_mutex_unlock_usercnt): Declare.
6839         * pthread_mutex_destroy.c: Always fail if used in any way.
6840         * pthread_mutex_init.c: Update comment.
6841         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
6842         * pthread_mutex_timedlock.c: Adjust __nusers.
6843         * pthread_mutex_trylock.c: Adjust __nusers.
6844         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
6845         and public interfaces are wrapper with pass additional parameter.
6846         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
6847         parameter zero.
6848         * tst-mutex8.c: New file.
6849         * Makefile (tests): Add tst-mutex8.
6850         * sysdeps/pthread/pthread_cond_timedwait.c: Call
6851         __pthread_mutex_unlock_usercnt.
6852         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6853         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6854         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6855         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6856         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6857         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
6858         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6859         Add __nusers.
6860         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6861         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6862         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6863         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6864         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6866         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
6867         * pthread_mutex_timedlock.c: Likewise.
6868         * pthread_mutex_trylock.c: Adjust __nusers.
6869         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
6870         * tst-mutex9.c: New file.
6871         * Makefile (tests): Add tst-mutex9.
6872         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
6873         * sysdeps/ia64/tls.h: Likewise.
6874         * sysdeps/powerpc/tls.h: Likewise.
6875         * sysdeps/s390/tls.h: Likewise.
6876         * sysdeps/sh/tls.h: Likewise.
6877         * sysdeps/x86_64/tls.h: Likewise.
6878         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6879         Change type of __owner.
6880         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6881         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6882         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6883         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6884         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6886 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
6888         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
6889         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
6891         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
6892         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
6893         instead of nr to lll_futex_wake.  Only set errno and return -1
6894         if err < 0.
6896         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
6897         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6898         return actual return value from the syscall, not 0.
6900 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
6902         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
6903         find a random value.
6904         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
6905         errno==EIDRM.
6907         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
6908         compat_timer_settime.
6909         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
6910         compat_timer_gettime.
6911         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
6912         compat_timer_getoverrun.
6913         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
6914         compat_timer_delete.
6916         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
6917         error-checking mutex detect busy mutexes.
6919 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6921         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
6922         Add ax to clobber list.
6923         (lll_mutex_cond_lock): Likewise.
6924         (lll_mutex_unlock): Likewise.
6925         (lll_lock): Likewise.
6926         (lll_unlock): Likewise.
6928         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
6929         * tst-cancel18.c: New file.
6930         * tst-cancelx18.c: New file.
6932         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
6933         and tcdrain.
6935         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
6936         * tst-cancel17.c: New file.
6937         * tst-cancelx17.c: New file.
6939         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
6940         * sysdeps/unix/sysv/linux/sigwait.c: New file.
6941         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
6943         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
6945 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
6947         * sysdeps/pthread/createthread.c (create_thread): Set
6948         header.multiple_threads unconditionally.
6949         * allocatestack.c (allocate_stack): Likewise.
6950         * descr.h (struct pthread): Add header.multiple_threads
6951         unconditionally.
6952         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
6953         Define for librt.  #error if neither libpthread, libc nor librt.
6954         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
6955         Likewise.
6956         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
6957         CDISABLE): Likewise.
6958         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
6959         CDISABLE): Likewise.
6960         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
6961         CDISABLE): Likewise.
6962         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
6963         CDISABLE): Likewise.  Access header.multiple_threads outside of
6964         libc and libpthread.
6965         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
6966         Likewise.
6967         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
6968         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
6970 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6972         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
6973         Also test early cancellation before the thread reaches the cancellation
6974         point.
6976         * Makefile: Compile forward.c with exceptions.
6978         * sysdeps/unix/sysv/linux/sleep.c: New file.
6980 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
6982         * Makefile: Add CFLAGS definition to compile function wrappers
6983         duplicated from libc with exceptions.
6984         * tst-cancel4.c: Also check cancellation handlers.
6986         * Makefile: Add rules to build and run tst-cancel16 and
6987         tst-cancelx16.  Add missing CFLAGS definitions.
6988         * tst-cancel16.c: New file.
6989         * tst-cancelx16.c: New file.
6991 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
6993         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6994         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
6995         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
6996         (DL_SYSINFO_IMPLEMENTATION): Likewise.
6998         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
6999         (LIBC_CANCEL_RESET): Likewise.
7000         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
7001         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
7002         librt-cancellation.
7003         (CFLAGS-libcrt-cancellation.c): Define.
7004         * sysdeps/pthread/librt-cancellation.c: New file.
7005         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
7006         macros also when compiling librt.
7007         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
7008         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
7009         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
7010         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
7011         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
7012         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
7013         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7015         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
7016         compat_timer_create.
7018 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
7020         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
7022         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
7023         __register_atfork.
7024         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
7025         Add libc_hidden_def.
7027 2003-06-13  Roland McGrath  <roland@redhat.com>
7029         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
7030         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
7032 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
7034         * allocatestack.c (queue_stack): Always inline.
7035         * ptreadhP.h (__do_cancel): Likewise.
7037 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
7039         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
7040         a typo.
7042 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
7044         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7045         (__pthread_cond_signal): Remove incorrect second addition for
7046         cond_lock!=0.
7048 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
7050         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7051         (__pthread_cond_signal): Use correct futex pointer in
7052         __lll_mutex_lock_wait call.
7054         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7055         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
7057 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
7059         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
7060         cancelable.
7061         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
7062         Likewise.
7064         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
7065         hand-written CFI generation code.  Since ENTRY/END also initiated
7066         CFI frames this caused two CFI sets to be generated.
7068 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
7070         * cleanup_routine.c: New file.
7071         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
7072         * sysdeps/pthread/pthread.h: Add support for fully exception-based
7073         cleanup handling.
7074         * Makefile (libpthread-routines): Add cleanup_routine.
7075         Add more CFLAGS variables to compile with exceptions.  Add comments
7076         why which file needs unwind tables.
7077         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
7078         tests.
7079         * tst-cancelx1.c: New file.
7080         * tst-cancelx2.c: New file.
7081         * tst-cancelx3.c: New file.
7082         * tst-cancelx4.c: New file.
7083         * tst-cancelx5.c: New file.
7084         * tst-cancelx6.c: New file.
7085         * tst-cancelx7.c: New file.
7086         * tst-cancelx8.c: New file.
7087         * tst-cancelx9.c: New file.
7088         * tst-cancelx10.c: New file.
7089         * tst-cancelx11.c: New file.
7090         * tst-cancelx12.c: New file.
7091         * tst-cancelx13.c: New file.
7092         * tst-cancelx14.c: New file.
7093         * tst-cancelx15.c: New file.
7094         * tst-cleanupx0.c: New file.
7095         * tst-cleanupx0.expect: New file.
7096         * tst-cleanupx1.c: New file.
7097         * tst-cleanupx2.c: New file.
7098         * tst-cleanupx3.c: New file.
7100         * tst-cleanup0.c: Make standard compliant.
7101         * tst-cleanup1.c: Likewise.
7103         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
7104         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7105         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7106         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
7107         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7108         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7109         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
7110         CLEANUP_JMP_BUF.
7111         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7112         * tst-cancel12.c: New file.
7113         * tst-cancel13.c: New file.
7114         * tst-cancel14.c: New file.
7115         * tst-cancel15.c: New file.
7116         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
7117         and tst-cancel15.
7119         * tst-cancel1.c: Add some comments.
7121         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
7122         timeout correctly.
7124 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
7126         * Makefile (CFLAGS-pthread_cancel.c): Define.
7128 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
7130         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
7131         Change type of __writer element to int.
7132         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7133         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7134         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7135         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7136         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7137         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
7138         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7139         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
7140         Compare with TID to determine deadlocks.
7141         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
7142         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7143         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
7144         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7145         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7146         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7147         Likewise.
7148         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7149         Likewise.
7150         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7151         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7152         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
7153         Likewise.
7154         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
7155         Likewise.
7156         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7157         * Makefile (tests): Add tst-rwlock12.
7158         * tst-rwlock12.c: New file.
7160 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
7162         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
7163         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
7164         Remove bogus hidden_proto.
7165         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
7166         Likewise.
7167         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
7168         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
7169         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
7170         ___lll_mutex_timedlock): Likewise.
7172 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
7174         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7175         (__pthread_cond_signal): Add some code to eventually handle
7176         cond_lock!=0.
7178 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
7180         * Makefile (tests): Add tst-exec4.
7181         (tst-exec4-ARGS): Define.
7182         * tst-exec4.c: New file.
7184 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
7186         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7187         Also fail if tv_nsec < 0.
7188         (__lll_timedwait_tid): Likewise.
7189         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
7190         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
7191         Likewise.
7192         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
7193         Likewise.
7194         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
7195         Likewise.
7196         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
7197         Likewise.
7198         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
7199         Likewise.
7200         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
7201         Likewise.
7203         * Makefile (tests): Add tst-sem8 and tst-sem9.
7204         * tst-sem8.c: New file.
7205         * tst-sem9.c: New file.
7206         * sem_open.c: Fix creation of in_use record if the file exists but
7207         no internal record.
7209         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
7210         definitions.
7212         * sysdeps/pthread/timer_create.c (timer_create): In case
7213         evp==NULL, assign timer ID to sival_ptr.
7215         * descr.h (struct pthread_unwind_buf): Change type of prev element to
7216         struct pthread_unwind_buf *.
7217         (struct pthread): Likewise for cleanup_jmp_buf element.
7219         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
7220         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
7221         * unwind.c (__pthread_unwind_next): Likewise.
7223 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
7225         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7226         (lll_futex_timed_wait): Use int for futex value parameter.
7227         (lll_futex_wake): Likewise.
7228         (lll_futex_requeue): Likewise.
7230         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7231         Replace one memory operation with one register operation.
7233         * tst-join4.c (do_test): Fix error message.
7235         * tst-rwlock6.c (do_test): Use correct format specifier.
7237         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7238         (__lll_mutex_lock_wait): Replace one memory operation with one
7239         register operation.
7240         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
7241         (__lll_mutex_lock_wait): Likewise.
7243         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7244         (__lll_mutex_cond_lock): Add one to value parameter of
7245         __lll_lock_wait to reflect reality in the futex syscall.
7246         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7247         (lll_mutex_cond_lock): Likewise.
7249 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
7251         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
7252         New function.
7253         (lll_mutex_cond_lock): Define.
7255 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
7257         * Makefile (tests): Add tst-signal6.
7258         * tst-signal6.c: New file.
7260         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
7261         (__lll_mutex_unlock_force): New function
7262         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
7264         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7265         (__lll_mutex_unlock_force): New function.
7266         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
7268         * tst-rwlock7.c (do_test): Use correct format specifier.
7270         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
7271         Find break parameter in correct asm argument.
7273 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
7275         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
7276         Remove out4.
7277         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
7278         error occured.
7279         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7280         Add __mutex.
7281         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
7282         lll_futex_requeue, lll_mutex_unlock_force): Define.
7284 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
7286         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7287         (pthread_cond_t): Add __mutex.
7288         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
7289         lll_futex_requeue, lll_mutex_unlock_force): Define.
7291 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7293         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
7294         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
7295         Add __mutex field.
7296         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
7297         Define.
7298         (lll_futex_wait, lll_futex_wake): Define.
7299         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
7300         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
7301         FUTEX_REQUEUE instead of FUTEX_WAIT.
7302         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7303         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
7304         mutex which was used in condvar structure.  Call
7305         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
7306         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7308         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
7309         include tcb-offsets.h.  Read wakeup value in locked region.
7310         Use the value of gbr register as THREAD_ID.
7311         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7312         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7313         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7315         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
7316         macros.
7318 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
7320         * sysdeps/pthread/pthread_cond_broadcast.c
7321         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
7323 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
7325         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
7326         typo in register name.
7327         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
7328         correctly.  Actually use requeue.  Little optimization.
7329         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
7330         mutex address early.  Handle cancellation state as 32-bit value.
7331         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7332         Remove unnecessary label.
7334 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
7336         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
7337         instead of FUTEX_WAIT.
7338         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
7339         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7340         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7341         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
7342         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7343         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
7344         used in condvar structure.  Call __pthread_mutex_cond_lock instead
7345         of __pthread_mutex_lock_internal.
7346         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7347         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7348         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7349         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
7350         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7351         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7352         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
7353         Add pthread_mutex_cond_lock.
7354         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
7355         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
7356         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
7357         lll_mutex_cond_lock.
7358         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
7359         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7360         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7361         Add __mutex field.
7362         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7363         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7365         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
7366         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7368         * pthreadP.h: Declare __pthread_mutex_cond_lock.
7369         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
7370         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
7371         macro don't define aliases.
7373         * cancellation.c: Remove __pthread_enable_asynccancel_2.
7374         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
7375         * sysdeps/pthread/pthread_cond_timedwait.c: Use
7376         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
7377         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7378         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7379         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7380         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7381         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7383 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
7385         * sem_open.c: Fix one endless loop.  Implement correct semantics
7386         wrt opening the same semaphore more then once.
7387         * sem_close.c: Adjust for sem_open change.
7388         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
7389         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
7390         * Makefile (tests): Add tst-sem7.
7391         * tst-sem7.c: New file.
7393 2003-05-16  Roland McGrath  <roland@redhat.com>
7395         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
7396         uninitialized variable braino.
7398 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
7400         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
7401         test for syscall availability.
7403         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
7404         __no_posix_timers to -1 if the syscalls don't exist.
7406         * pthread_join.c (pthread_join): Set tid field of the joined
7407         thread to -1.  This isn't necessary but helps to recognize some
7408         error conditions with almost no cost.
7410         * allocatestack.c (FREE_P): Also negative values indicate an
7411         unused stack.
7413         * unwind.c: Include <unistd.h>.
7415 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
7417         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
7419 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
7421         * Makefile (crti-objs, crtn-objs): New variables.
7422         (omit-deps, extra-objs): Add crtn.
7423         ($(objpfx)libpthread.so): Depend on both crti and crtn
7424         and links to them in multidir.
7425         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
7427 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
7429         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7430         (lll_mutex_unlock): Use atomic_exchange_rel.
7432 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
7434         * cond-perf.c (cons): Add missing locking around setting of alldone.
7436 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
7438         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
7439         related macros.
7440         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7442 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
7444         * tst-sem6.c: New file.
7445         * Makefile (tests): Add tst-sem6.
7447         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
7448         Use atomic_exchange_rel instead of atomic_exchange.
7449         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
7450         Likewise.
7452         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
7453         code for lll_futex_wait and lll_futex_wake in static apps.  Use
7454         vsyscall is possible.
7456         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
7457         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
7458         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
7459         pthread_setaffinity_np.
7460         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
7461         and pthread_setaffinity_np.
7462         * Makefile (libpthread-routines): Add pthread_getaffinity and
7463         pthread_setaffinity.
7465         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
7466         use it in case mmap to allocate the stack fails.
7467         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
7468         ARCH_MAP_FLAGS here.
7469         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
7470         ARCH_RETRY_MMAP.
7472 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
7474         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
7475         handler implementation.  It is now lockless in fork().
7476         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
7477         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
7478         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
7479         declare the __fork_*_lists.
7480         (struct fork_handler): Include pointers to all three functions.
7481         Add next, refcntr and need_signal elements.
7482         (__fork_handlers): New declaration.
7483         (__register_atfork_malloc): Remove declaration.
7484         (HAVE_register_atfork_malloc): Remove definition.
7485         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
7486         __pthread_child_handler variable.
7487         (__libc_pthread_init): Use __register_atfork instead of explicitly
7488         adding to the list.
7489         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
7490         and lll_futex_wake.
7491         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7493         * unwind.c (unwind_cleanup): Print error message and then abort.  This
7494         function must never be reached.
7496         * cond-perf.c: New file.
7498 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
7500         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
7502 2003-05-04  Roland McGrath  <roland@redhat.com>
7504         * Makefile ($(objpfx)../libc.so): New target.
7506 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
7508         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7509         (pthread_condattr_t): Size is only an int, don't use long for
7510         alignment.
7511         (pthread_mutexattr_t): Likewise.
7512         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7513         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7514         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7516 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
7518         * sysdeps/i386/tls.h: Define THREAD_ID.
7519         * sysdeps/ia64/tls.h: Likewise.
7520         * sysdeps/powerpc/tls.h: Likewise.
7521         * sysdeps/s390/tls.h: Likewise.
7522         * sysdeps/sh/tls.h: Likewise.
7523         * sysdeps/x86_64/tls.h: Likewise.
7524         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
7525         record ownership.
7526         * pthread_mutex_timedlock.c: Likewise.
7527         * pthread_mutex_trylock.c: Likewise.
7528         * pthread_mutex_unlock.c: Likewise.
7529         * pthread_rwlock_trywrlock.c: Likewise.
7530         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
7531         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7532         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
7533         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7535         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
7536         flag.
7538 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
7540         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7541         (__SIZEOF_PTHREAD_COND_T): Define to 48.
7542         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
7543         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7544         Make __align long long instead of long.
7545         (pthread_rwlock_t): Formatting.
7546         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
7547         (pthread_rwlock_t): Formatting.
7548         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7549         (pthread_cond_t): Make __align long long instead of long.
7550         (pthread_rwlock_t): Move __flags field to the same position as in
7551         linuxthreads.
7553 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
7555         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
7556         * tst-rwlock7.c (do_test): Likewise.
7558 2003-04-26  Roland McGrath  <roland@redhat.com>
7560         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
7562 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
7564         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
7565         sizeof (struct pthread).
7566         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
7567         1 struct pthread.
7568         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
7569         to 0.
7570         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
7571         struct pthread.
7572         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
7573         to 32-bit bytes.
7574         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
7575         tcbp.
7576         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
7577         unneccessarily.
7578         (NO_TLS_OFFSET): Define.
7579         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
7580         add TLS_TCB_SIZE unnecessarily.
7582 2003-04-22  Roland McGrath  <roland@redhat.com>
7584         * Makeconfig (shared-thread-library): Reverse link order to work
7585         around linker bug.
7587 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
7589         * semaphore.h: Fix typo in comment.
7591 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
7593         * sysdeps/pthread/sigfillset.c: New file.
7595         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
7596         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
7597         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
7598         * sysdeps/pthread/sigaction.c: Likewise.
7599         * sysdeps/pthread/sigprocmask.c: New file.
7600         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
7601         __SIGRTMIN+1.
7602         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7603         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
7604         in this case.
7606 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
7608         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7609         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
7611         * sysdeps/unix/sysv/linux/unregister-atfork.c
7612         (__unregister_atfork): Don't free memory not allocated dynamically.
7614         * semaphore.h: Remove __THROW marker from cancellation points.
7615         * nptl/sysdeps/pthread/pthread.h: Likewise.
7617 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
7619         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
7620         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
7621         __THROW.
7623 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
7625         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
7627 2003-04-15  Roland McGrath  <roland@redhat.com>
7629         * forward.c (__pthread_unwind): Tweak to avoid warning.
7631 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
7633         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
7635 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
7637         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
7638         overflow CFA advance instructions.
7639         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7641 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
7643         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
7644         * sysdeps/i386/pthread_spin_lock.c: Likewise.
7645         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
7646         defined.
7648         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
7649         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
7650         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
7651         DW_CFA_advance_loc for .Laddl-.Lsubl.
7653 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
7655         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
7656         position-independent unwind data for static libraries.
7657         Add missing unwind info.  Add comments.
7659         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
7660         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7661         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7662         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7664 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
7666         * Makefile: Make sure all cancellation points are compiled with
7667         exception and asynchronous unwind tables.
7669         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
7670         which mishandles loading of global object addresses in PIC.
7671         (THREAD_SETMEM_NC): Likewise.
7673 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
7675         * pthread.h: Define new data structure for cleanup buffer.  Declare
7676         new cleanup handler interfaces.
7677         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
7678         (struct pthread): Add cleanup_jmp_buf pointer.  Define
7679         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
7680         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
7681         it.  Declare old cleanup handler installation functions.
7682         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
7683         handling.
7684         * cleanup_defer.c: Likewise.
7685         * cleanup_compat.c: New file.  Old cleanup code.
7686         * cleanup_def_compat.c: New file.  Old cleanup code.
7687         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
7688         if own thread descriptor.
7689         * unwind.c: New file.
7690         * forward.c: Add __pthread_unwind.
7691         * init.c (pthread_functions): Add __pthread_unwind.
7692         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
7693         Add ptr___pthread_unwind.
7694         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
7695         and unwind function.
7696         * Makefile (libpthread-routines): Add cleanup_compat,
7697         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
7698         table generation if necessary.
7699         * version.c: Record whether unwind support is compiled in.
7700         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
7701         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
7702         handler interfaces.
7703         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
7704         complication to generate unwind information for syscall wrappers.
7705         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7706         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
7707         __cleanup_fct_attribute.
7709         * Makefile: Add rules to build and run tst-cleanup0.
7710         * tst-cleanup0.c: New file.
7711         * tst-cleanup0.expect: New file.
7713         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
7714         caller.  Optimize to avoid often unecessary local variable.
7716 2003-04-11  Roland McGrath  <roland@redhat.com>
7718         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
7719         sets variable `multidir'; include that.
7720         (generated): Add it.
7721         ($(objpfx)$(multidir)/crti.o): New target.
7722         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
7724 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
7726         * tst-attr2.c (do_test): Add cast to avoid warning.
7727         * tst-mutex4.c (do_test): Likewise.
7729 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
7731         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
7732         in child.
7734 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
7736         * Makefile (tests): Add tst-detach1.
7737         * tst-detach1.c: New file.
7739 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
7741         * sysdeps/pthread/pthread.h: Remove duplicate
7742         pthread_cleanup_{push,pop} definitions.
7744         * tst-barrier2.c: Eliminate warnings.
7745         * tst-cancel4.c: Likewise.
7746         * tst-cond4.c: Likewise.
7747         * tst-cond6.c: Likewise.
7748         * tst-detach1.c: Likewise.
7749         * tst-rwlock4.c: Likewise.
7750         * tst-rwlock6.c: Likewise.
7751         * tst-rwlock7.c: Likewise.
7752         * tst-sem3.c: Likewise.
7753         * tst-spin2.c: Likewise.
7754         * tst-umask1.c: Likewise.
7756 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
7758         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
7760 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
7762         * descr.h (struct pthread): Move cancelhandling member to the front.
7764 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
7766         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
7767         malloc_parent, and malloc_child statically.
7768         (__register_atfork_malloc): New function.
7769         (free_mem): Don't free any of the malloc_* variables on the list.
7770         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
7771         Define HAVE_register_atfork_malloc.
7773 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
7775         * sysdeps/pthread/createthread.c (create_thread): Add some more
7776         comments explaining when to set multiple_threads and when not.
7778         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7779         THREAD_ATOMIC_BIT_SET if not already defined.
7780         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7781         THREAD_ATOMIC_BIT_SET:
7782         * sysdeps/x86_64/tls.h: Likewise.
7783         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
7784         THREAD_ATOMIC_CMPXCHG_VAL.
7785         (_pthread_cleanup_pop_restore): Likewise.
7786         * cancellation.c (__pthread_enable_asynccancel): Likewise.
7787         (__pthread_enable_asynccancel_2): Likewise.
7788         (__pthread_disable_asynccancel): Likewise.
7789         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7790         (__libc_disable_asynccancel): Likewise.
7791         * init.c (sigcancel_handler): Likewise.
7792         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
7793         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
7795 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
7797         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
7798         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7799         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
7800         * Makefile (tests): Add tst-cancel11.
7801         * tst-cancel11.c: New file.
7803 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
7805         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
7806         round, not the first.  Use specific_used flag instead of local
7807         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
7808         (__free_tcb): Don't call deallocate_tsd here.
7809         (start_thread): Call deallocate_tsd here.
7810         * pthread_setspecific.c: Set specific_used flag really only when
7811         needed.
7812         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
7813         * tst-tsd3.c: New file.
7814         * tst-tsd4.c: New file.
7816 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
7818         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
7819         Use atomic_exchange_and_add instead of __lll_add.
7820         (__lll_mutex_timedlock): Likewise.
7821         Patch by Ian Wienand.
7823 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
7825         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7826         (SINGLE_THREAD_P): Fix typo.
7827         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
7829 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
7831         * Makefile (tests): Add tst-align.
7832         * tst-align.c: New file.
7833         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
7835         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
7836         function correctly.
7838         * tst-tsd2.c: Add casts to avoid warnings.
7840 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
7842         * descr.h (struct pthread): Move most often used elements to the front.
7844 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
7846         * Makefile (libpthread-routines): Add pthread_atfork.
7847         (libpthread-static-only-routines): Add pthread_atfork.
7849 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7851         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
7852         of TLS_DTV_AT_TP.
7853         (INSTALL_DTV): Add parens.
7854         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
7855         Use passed descr instead of THREAD_SELF.
7856         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
7857         (__lll_mutex_timedlock_wait): Correct expected value after
7858         spurious wakeup.
7859         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
7860         Release lock before waking up the waiters.
7861         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
7862         criteria.  Reorderstruct passed to cleanup handler.  Fix
7863         handling of cancellation and failung pthread_mutex_unlock call.
7864         Use __pthread_enable_asynccancel_2 instead of
7865         __pthread_enable_asynccancel.
7866         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7867         Return result of lock re-get if it fails.
7868         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
7869         for __pthread_cleanup_push.
7870         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
7871         completely broken rwlock implementation.
7872         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7873         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7874         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7875         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7876         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7877         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
7878         versioned_symbol macro.
7879         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
7880         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7882 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
7884         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
7885         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
7886         and __helper_tid.
7887         (struct timer): Remove th and bar field.
7888         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
7889         debugging code.  Create only one helper thread.
7890         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
7891         helper thread.
7892         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7893         Renamed.  Define statically.  Use thread info from siginfo.
7894         (__helper_once): New variable.
7895         (__helper_tid): New variable.
7896         (__reset_helper_control): New function.
7897         (__start_helper_thread): New function.
7899         * pthread_create.c (start_thread): Don't use setjmp inside
7900         __builtin_expect to work around gcc bug.
7902         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
7903         timer_delete syscall fails, but not with ENOSYS, set
7904         __no_posix_timers.
7906         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
7907         (timer_settime): Fix typo.
7908         * sysdeps/unix/sysv/linux/timer_getoverr.c
7909         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
7911 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
7913         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
7914         offset of cleanupbuf.__prev.
7916 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
7918         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
7919         of included file.
7921 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
7923         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
7924         NULL provide default definition to syscall.
7926 2003-03-25  Roland McGrath  <roland@redhat.com>
7928         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
7929         (timer_id2ptr): Fix typo.
7931 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
7933         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
7934         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
7935         * sysdeps/ia64/pthreaddef.h: Likewise.
7936         * sysdeps/powerpc/pthreaddef.h: Likewise.
7937         * sysdeps/s390/pthreaddef.h: Likewise.
7938         * sysdeps/sh/pthreaddef.h: Likewise.
7939         * sysdeps/x86_64/pthreaddef.h: Likewise.
7940         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
7941         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
7942         being changed.
7943         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
7944         SIGTIMER is not unblocked.
7945         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
7946         RT signal taken.
7947         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
7948         be send.
7949         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
7950         pass pointer through as ID.
7951         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
7952         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
7953         * sysdeps/unix/sysv/linux/timer_create.c: New file.
7954         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
7955         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
7956         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
7957         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
7958         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
7959         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
7960         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
7961         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
7962         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
7963         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
7964         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
7965         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
7966         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
7967         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
7968         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
7969         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
7970         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
7971         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
7972         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
7973         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
7974         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
7975         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
7976         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
7977         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
7978         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
7979         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
7980         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
7981         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
7982         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
7983         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
7985         * pthreadP.h: Remove FRAME_LEFT definition.
7986         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
7987         already left frame.  Programs which have this problem are not POSIX
7988         compliant.
7989         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
7991 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
7993         * sysdeps/pthread/tst-timer.c: Check return values of the
7994         functions we test.
7996 2003-03-23  Roland McGrath  <roland@redhat.com>
7998         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
7999         * tst-tls3mod.c: Likewise.
8000         * tst-tls1.c: Likewise.
8001         * tst-tls2.c: Likewise.
8003         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
8004         undefined behavior.
8006         * tst-join5.c (tf1, tf2): Add a cast.
8008         * Makeconfig (includes): Append -I$(..)nptl to this variable.
8010         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
8011         Don't test anything.
8012         * tst-cond4.c: Likewise.
8013         * tst-cond6.c: Likewise.
8014         * tst-flock2.c: Likewise.
8015         * tst-mutex4.c: Likewise.
8016         * tst-rwlock4.c: Likewise.
8017         * tst-signal1.c: Likewise.
8018         * tst-spin2.c: Likewise.
8019         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
8021         * tst-mutex4.c: Use test-skeleton.c.
8022         * tst-spin2.c: Likewise.
8023         * tst-sysconf.c: Likewise.
8024         * tst-barrier2.c: Likewise.
8025         * tst-cond4.c: Likewise.
8026         * tst-cond6.c: Likewise.
8027         * tst-rwlock4.c: Likewise.
8028         * tst-unload.c: Likewise.
8029         * tst-flock2.c (do_test): Use return instead of exit.
8031 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
8033         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
8035 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
8037         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8038         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
8039         instead of __lll_compare_and_swap.
8040         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
8041         Likewise.
8042         Removed definition if __lll_compare_and_swap.
8044         * cancellation.c: Adjust for new form of compare&exchange macros.
8045         * cleanup_defer.c: Likewise.
8046         * init.c: Likewise.
8047         * libc-cancellation.c: Likewise.
8048         * old_pthread_cond_broadcast.c: Likewise.
8049         * old_pthread_cond_signal.c: Likewise.
8050         * old_pthread_cond_timedwait.c: Likewise.
8051         * old_pthread_cond_wait.c: Likewise.
8052         * pthread_cancel.c: Likewise.
8053         * pthread_create.c: Likewise.
8054         * pthread_detach.c: Likewise.
8055         * pthread_join.c: Likewise.
8056         * pthread_key_delete.c: Likewise.
8057         * pthread_setcancelstate.c: Likewise.
8058         * pthread_setcanceltype.c: Likewise.
8059         * pthread_timedjoin.c: Likewise.
8060         * pthread_tryjoin.c: Likewise.
8061         * sysdeps/pthread/createthread.c: Likewise.
8063 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
8065         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
8066         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
8067         definitions.  Replace uses with calls to atomic_* functions.
8068         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
8069         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
8070         __lll_test_and_set calls with atomic_exchange_and_add and
8071         atomic_exchange calls respectively.
8072         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
8073         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
8074         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
8075         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
8076         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
8077         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
8078         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
8080         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
8081         returns the old value.
8083 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
8085         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
8086         int for variable OLDVAL and correct inline assembler contraint.
8087         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
8088         type int for variable OLD.
8090         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
8091         only for s390-32.
8092         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
8093         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
8094         instead of multiple_threads field in the TCB.
8096 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
8098         * sysdeps/i386/i686/bits/atomic.h: Removed.
8099         * sysdeps/i386/i586/bits/atomic.h: Removed.
8100         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
8101         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
8102         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
8103         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
8104         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
8105         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
8106         * atomic.h: Removed.  Moved to glibc.
8108         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
8109         support for clock selection.
8111         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
8112         signalling waiters.
8114 2003-03-18  Roland McGrath  <roland@redhat.com>
8116         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
8117         Add __lll_rel_instr first.  Add memory clobber.
8118         (lll_mutex_unlock): Use __lll_test_and_set.
8119         From Paul Mackerras <paulus@samba.org>.
8121         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
8122         unconditionally.
8123         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
8124         (SINGLE_THREAD_P):  Add `header.' prefix.
8125         From Paul Mackerras <paulus@samba.org>.
8127         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
8128         pthread_timedjoin_np to ...
8129         (libpthread: GLIBC_2.3.3): ... here.
8130         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
8132         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8133         Avoid shadowing VAL variable.
8135         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
8136         New macro.
8138 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
8140         * Makefile (tests): Add tst-cond11.
8141         * tst-cond11.c: New file.
8143         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
8144         struct passed to cleanup handler to eliminate one more
8145         instruction.
8146         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8148         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8149         (pthrad_cond_t): Replace __unused field with __clock.
8151         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
8152         waken all waiters in cleanup handler.
8153         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8154         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8156         * pthread_condattr_getclock.c: New file.
8157         * pthread_condattr_setclock.c: New file.
8158         * sysdeps/pthread/pthread.h: Declare these new functions.
8159         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
8160         * Makefile (libpthread-routines): Add the new functions.
8161         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
8162         Renamed field to value.  Document use of the bits.
8163         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
8164         change.
8165         * pthread_condattr_setpshared.c: Likewise.
8166         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
8167         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
8168         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
8169         Add __clock field.
8170         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8171         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8172         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8173         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8174         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
8175         Implement clock selection.
8176         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
8177         * pthread-errnos.sym: Add ENOSYS.
8178         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8179         _POSIX_CLOCK_SELECTION.
8180         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8182         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
8183         invalid .size directive.
8185 2003-03-17  Roland McGrath  <roland@redhat.com>
8187         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
8188         Formatting tweaks.
8190 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
8192         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
8193         Use __lll_add instead of spelling it out.  Use protected symbol names.
8194         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
8195         Use __lll_add.
8196         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
8197         Renamed from lll_compare_and_swap.  Use new name where necessary.
8198         (__lll_add): Defined.
8199         (__lll_dec_if_positive): Defined.
8200         (__lll_test_and_set): Defined.
8201         * sysdeps/ia64/pthread_spin_init.c: Removed.
8202         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
8203         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
8204         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
8205         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
8206         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
8207         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
8208         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
8209         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
8210         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
8211         __sync_lock_release_si.
8212         Patch by Jakub Jelinek.
8214         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
8215         Fix timeout handling.
8216         (__lll_timedwait_tid): Likewise.
8217         (lll_unlock_wake_cb): Wake up other waiters if necessary.
8218         Patch by Jakub Jelinek.
8220         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
8222 2003-03-17  Roland McGrath  <roland@redhat.com>
8224         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
8225         * sysdeps/pthread/pthread_spin_init.c: New file.
8226         * sysdeps/pthread/pthread_spin_unlock.c: New file.
8227         * sysdeps/powerpc/Makefile: New file.
8228         * sysdeps/powerpc/pthread_spin_lock.c: New file.
8229         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
8230         * sysdeps/powerpc/pthreaddef.h: New file.
8231         * sysdeps/powerpc/tcb-offsets.sym: New file.
8232         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
8233         * sysdeps/powerpc/tls.h: New file.
8234         * sysdeps/powerpc/bits/atomic.h: New file.
8235         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
8236         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
8237         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
8239         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
8240         * sysdeps/unix/sysv/linux/sem_post.c: New file.
8241         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
8242         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
8243         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
8244         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
8245         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
8246         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
8247         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
8248         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
8249         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
8250         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
8251         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
8252         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
8253         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
8255         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
8256         not gettimeofday.
8257         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
8258         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8259         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
8260         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
8261         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8263 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
8265         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
8266         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
8267         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8268         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8269         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
8271 2003-03-16  Roland McGrath  <roland@redhat.com>
8273         * tst-fork4.c: Include <string.h>.
8274         * tst-signal2.c: Likewise.
8275         * tst-mutex5.c (do_test): exit -> return.
8276         * tst-mutex2.c: Include <stdlib.h>.
8278 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
8280         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8281         (__lll_mutex_timedlock_wait): Correct expected value after
8282         spurious wakeup.  Otherwise we would never wait again.
8284         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
8285         zone versus inline asm stupidity.  Use correct instructions.
8287         * tst-rwlock6.c: Add some more status output.
8289 2003-03-15  Roland McGrath  <roland@redhat.com>
8291         * sysdeps/pthread/configure.in: New file.
8292         * sysdeps/pthread/configure: New file (generated).
8294 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
8296         * allocatestack.c (allocate_stack): Store the exact stack size of
8297         user allocated stacks.
8299 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
8301         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
8302         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
8303         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
8304         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
8305         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
8306         Use `header.' prefix.
8307         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
8309 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
8311         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
8312         __builtin_frame_address, use stack pointer.
8314         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
8315         instead of __builtin_frame_pointer.
8317 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
8319         * tst-basic1.c (do_test): Add cast to avoid warning.
8320         * tst-basic2.c (do_test): Likewise.
8322         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
8323         amount of stack correction.
8325         * tst-fork4.c: Use test-skeleton.c.
8327 2003-03-14  Roland McGrath  <roland@redhat.com>
8329         * init.c: Fix typo "#eli" for "#else".
8331 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
8333         * allocatestack.c (__stack_user): Use hidden_data_def.
8334         * pthread_create.c (__pthread_keys): Likewise.
8336         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
8338 2003-03-14  Roland McGrath  <roland@redhat.com>
8340         * tst-fork4.c: New file.
8341         * Makefile (tests): Add it.
8343         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
8344         we always define the padding space.
8345         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
8346         stopped supporting its own extensions fully.
8347         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
8348         struct also called `header', so `header.multiple_threads' is the field
8349         name to use on all machines.
8350         * allocatestack.c (allocate_stack): Use `header.' prefix.
8351         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8352         * pthread_create.c (__pthread_create_2_1): Likewise.
8353         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
8354         (THREAD_SELF): Likewise.
8355         * sysdeps/x86_64/tls.h: Likewise.
8356         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8357         (SINGLE_THREAD_P): Likewise.
8358         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8359         (SINGLE_THREAD_P): Likewise.
8360         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
8361         (SINGLE_THREAD_P): Likewise.
8363         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
8364         value directly.
8366 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
8368         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
8369         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
8371         * pthread_create.c (start_thread): setjmp is expected to return 0.
8373         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
8374         (THREAD_GETMEM_NC): Likewise.
8376 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
8378         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
8379         and the size of the stack which must be allocated is a multiple,
8380         allocate one more page.
8381         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
8382         MULTI_PAGE_ALIASING.
8384 2003-03-13  Roland McGrath  <roland@redhat.com>
8386         * pthread_create.c (start_thread): Set EXITING_BIT after the
8387         event-reporting (and destructors), not before.
8389 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
8391         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
8392         lll_futex_wake): Declare register variables as long int instead of
8393         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
8394         Make syscall arguments clobbered by the syscall.
8395         (lll_futex_wait): Define using lll_futex_timed_wait.
8397         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
8398         to void *.
8400         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
8401         PPID if [! NDEBUG].
8403         * allocatestack.c (nptl_ncreated): Only declare if
8404         COLORING_INCREMENT != 0.
8406         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
8407         (__libc_enable_asynccancel_2): Remove prototype.
8409         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
8410         ctid to match kernel.
8412 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
8414         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
8415         libc_multiple_threads.
8416         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
8417         __libc_multiple_threads to...
8418         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
8420         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
8421         versioning.
8422         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8423         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8425         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
8426         (__pthread_once_internal): Define.
8428         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
8429         macros instead of .symver directly.
8430         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8431         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8433         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
8434         * sysdeps/x86_64/tcb-offsets.sym: New file.
8435         * sysdeps/x86_64/Makefile: New file.
8437         * sysdeps/i386/tcb-offsets.sym: Add SELF.
8438         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
8439         to access own pthread_t in TCB.
8440         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8441         Likewise.
8442         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8443         Likewise.
8444         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8446 2003-03-12  Roland McGrath  <roland@redhat.com>
8448         * pthread-errnos.sym: New file.
8449         * Makefile (gen-as-const-headers): New variable, list that file.
8450         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
8451         header <pthread-errnos.h> instead of defining errno values here.
8452         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8453         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8454         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8455         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8456         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8457         Likewise.
8458         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8459         Likewise.
8460         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8461         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8462         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8463         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8464         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8465         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8466         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8467         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8468         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8469         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8470         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
8471         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
8472         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8473         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
8474         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
8475         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8476         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8477         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8478         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8479         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
8480         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8481         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
8482         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
8483         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
8484         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
8485         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8486         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8488         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
8489         CLONE_CHILD_SETTID worked.
8491 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
8493         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
8494         file.
8495         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
8496         file.
8498         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8499         (pthread_cond_t): Add padding.
8501         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
8502         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
8503         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
8505         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
8506         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
8507         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
8508         (__pthread_rwlock_timedrdlock): Likewise.
8509         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
8510         (__pthread_rwlock_wrlock): Likewise.
8511         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
8512         (__pthread_rwlock_rdlock): Likewise.
8514         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
8516         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
8517         result of lock re-get if it fails.
8519 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
8521         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
8522         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8523         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8524         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8525         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8526         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
8527         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8528         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8529         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8530         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8532         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
8533         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
8535         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
8536         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
8537         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
8538         (create_thread): Likewise.
8539         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
8540         * init.c (__pthread_initialize_minimal_internal): Initialize
8541         __libc_multiple_threads_ptr if necessary.
8542         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
8543         __pthread_multiple_threads and __libc_multiple_threads_ptr.
8544         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
8545         __libc_multiple_threads.
8546         (__libc_pthread_init): Return pointer to __libc_pthread_init if
8547         necessary.
8549         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
8550         (THREAD_SETMEM_NC): Likewise.
8552         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
8553         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
8554         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
8555         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
8557         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
8558         Eliminate one entire instruction.
8560         * cancellation.c (__pthread_enable_asynccancel_2): New function.
8561         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
8562         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8563         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
8564         instead of __pthread_enable_asynccancel.
8565         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8566         (__pthread_cond_wait): Likewise.
8567         * sysdeps/pthread/pthread_cond_timedwait.c
8568         (__pthread_cond_timedwait): Likewise.
8569         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
8571         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8572         (__condvar_cleanup): Wake up all waiters in case we got signaled
8573         after being woken up but before disabling asynchronous
8574         cancellation.
8575         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8576         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
8577         (__condvar_cleanup): Likewise.
8579         * init.c (__NR_set_tid_address): If already defined, don't redefine.
8580         Make it an error if architecture has no #if case.  Add x86-64.
8582         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
8583         pt-initfini.s generation.
8585         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
8586         (TLS_INIT_TP): Fix typo.
8588 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
8590         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
8591         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
8593         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
8594         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8595         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
8596         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
8597         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
8598         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8599         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8600         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8602 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
8604         * sysdeps/pthread/pthread_cond_timedwait.c
8605         (__pthread_cond_timedwait): Return the result of the final
8606         locking.  If it succeeds, the regular function return value.
8608         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
8609         Return result of the final locking.
8610         * version.c (__nptl_main): Work around problems with the strange
8611         INTERNAL_SYSCALL macro on ppc32.
8612         * init.c (__pthread_initialize_minimal_internal): Unblock
8613         SIGCANCEL in case the parent blocked it.
8614         Reported by Paul Mackerras <paulus@samba.org>.
8616         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
8617         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
8618         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
8620 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
8622         * sysdeps/pthread/pthread_cond_timedwait.c
8623         (__pthread_cond_timedwait): Unlock and fail if
8624         __pthread_mutex_unlock_internal failed.
8626         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
8627         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
8628         Use ARCH_CLONE.
8629         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
8630         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
8631         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
8632         ALLOCATE_STACK): New macros.
8633         (TLS_TPADJ): New macro.
8634         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
8635         (allocate_stack): Handle TLS_DTV_AT_TP and
8636         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
8637         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
8638         Don't set PD->self.
8639         * init.c [__ia64__] (__NR_set_tid_address): Define.
8641         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
8642         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
8643         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
8644         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
8645         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
8646         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
8647         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
8648         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
8649         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
8650         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
8651         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
8652         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
8653         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
8654         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
8655         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
8656         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
8657         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
8658         * sysdeps/ia64/bits/atomic.h: New file.
8659         * sysdeps/ia64/Makefile: New file.
8660         * sysdeps/ia64/pthread_spin_init.c: New file.
8661         * sysdeps/ia64/pthread_spin_lock.c: New file.
8662         * sysdeps/ia64/pthread_spin_trylock.c: New file.
8663         * sysdeps/ia64/pthread_spin_unlock.c: New file.
8664         * sysdeps/ia64/pthreaddef.h: New file.
8665         * sysdeps/ia64/tcb-offsets.sym: New file.
8666         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
8667         * sysdeps/ia64/tls.h: New file.
8669         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
8670         to syscall instead of no arguments.
8672 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
8674         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
8675         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
8676         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
8677         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
8679         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
8680         unused code.
8682         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
8684         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8685         lowlevelbarrier.sym.
8686         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
8687         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
8688         Include lowlevelbarrier.h and don't define offsets locally.
8689         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
8691         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
8692         (__lll_mutex_lock_wait): Reverse order of first two parameters.
8693         (__lll_mutex_timedlock_wait): Likewise.
8694         (lll_mutex_lock): Adjust asm for that.
8695         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
8696         (lll_lock): Adjust asm for operand order change.
8697         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
8698         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
8700         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
8701         Reverse order of parameters.
8702         (__lll_timedwait_tid): Remove regparms attribute.
8703         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
8704         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
8706         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8707         (__lll_timedwait_tid): Remove one unnecessary instruction.
8709         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
8710         __lll_mutex_timedlock_wait only for NOT_IN_libc.
8711         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
8712         lowlevelmutex.S.
8714         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
8715         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
8716         for NOT_IN_libc.
8717         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
8718         lowlevellock.S.
8720         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
8721         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
8722         for libc.so.
8723         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
8724         define LOCK here (if UP is not defined).  The actual code is in
8725         lowlevelmutex.S.
8727         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
8728         LOCK is already defined.  Don't define lll_unlock_wake_cb and
8729         __lll_timedwait_tid for libc.so.
8730         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
8731         define LOCK here (if UP is not defined).  The actual code is in
8732         lowlevellock.S.
8734         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
8735         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
8736         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
8737         instead of lowlevelsem.h.
8738         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8739         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8740         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8742         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8743         lowlevelrwlock.sym.
8744         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
8745         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
8746         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
8748         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
8749         register loading.
8750         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
8751         last changed.  D'oh.
8753         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
8755         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
8756         of __libc_locking_needed.
8757         (lll_trylock): Initialize %eax to zero.
8759         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
8760         pthread_cond_t definition.
8762 2003-03-10  Roland McGrath  <roland@redhat.com>
8764         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
8765         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
8766         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
8767         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
8768         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
8770         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
8771         Instead of setting PD->multiple_threads, set globals
8772         __pthread_multiple_threads and __libc_multiple_threads.
8773         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8774         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
8775         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
8777         * descr.h (struct pthread): Conditionalize first member on
8778         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
8779         containing an anonymous tcbhead_t.  Move `list' member out.
8780         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
8781         * allocatestack.c: Remove use of `header.data.' prefix.
8782         * pthread_create.c: Likewise.
8783         * init.c (__pthread_initialize_minimal_internal): Likewise.
8784         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8785         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
8786         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
8787         * sysdeps/x86_64/tls.h: Likewise.
8788         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8789         (SINGLE_THREAD_P): Likewise.
8790         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8791         (SINGLE_THREAD_P): Likewise.
8792         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
8793         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
8795 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
8797         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
8799         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
8800         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8802         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
8803         leftovers from the ia32 code.
8805         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
8806         memory load.
8807         (clear_once_control): Don't load %esi.
8809         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
8810         handling.
8812         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8814         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
8815         * sysdeps/unix/sysv/linux/createthread.c: ...here.
8817         * Makefile (tests): Add tst-cond10.
8818         * tst-cond10.c: New file.
8820 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
8822         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
8823         * tst-signal3.c (do_test): Likewise.
8824         * tst-sem5.c (do_test): Likewise.
8825         * tst-kill6.c (do_test): Likewise.
8826         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
8828         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
8829         of inc/dec.
8830         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
8831         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
8832         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8833         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8834         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8835         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8836         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8837         Likewise.
8838         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8839         Likewise.
8840         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8841         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8842         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8843         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8844         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8845         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
8846         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8847         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8849         * allocatestack.c (allocate_stack): If mprotect() fails free the
8850         TLS memory.
8852 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
8854         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
8856         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
8857         lll_wake_tid.  This was used only to work around kernel limits in
8858         the early days.
8859         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
8860         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
8861         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8862         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
8864         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
8865         (__pthread_initialize_minimal_internal): Change initialization of
8866         __static_tls_align_m1 appropriately.
8867         * pthreadP.h (__static_tls_align_m1): Renamed from
8868         __static_tls_align.
8869         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
8870         instead of __static_tls_align-1.
8872 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
8874         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
8876         * pthread_create.c: Define __pthread_keys using nocommon
8877         attribute, not by placing it explicitly in bss.
8878         Remove DEFINE_DEALLOC definition.  Not needed anymore.
8880         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
8881         Use it in mmap call to allocate stacks.
8883         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
8885         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
8886         result of the thread function.
8888 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
8890         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
8891         version is just fine.
8893         * sysdeps/unix/sysv/linux/libc_pthread_init.c
8894         (__pthread_child_handler): Renamed from pthread_child_handler,
8895         exported, and marked hidden.  Change all users.
8896         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
8897         free __pthread_child_handler from child list.
8899 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8901         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
8903         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8904         Fix handling of cancellation and failing pthread_mutex_unlock call.
8905         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8906         (__pthread_cond_wait): Likewise.
8908         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
8909         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
8910         lll_futex_timed_wait call.
8911         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
8912         (pthread_rwlock_timedwrlock): Likewise.
8914         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8915         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
8916         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
8918         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
8919         check of lll_futex_wake return value.
8921 2003-03-03  Roland McGrath  <roland@redhat.com>
8923         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
8925         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8926         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
8927         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
8929 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
8931         * sysdeps/pthread/timer_create.c (timer_create): Return correct
8932         error for CPU clocks.
8934         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8935         _POSIX_MONOTONIC_CLOCK.
8936         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8938         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
8939         recent kernels.
8941 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8943         * descr.h (struct pthread): Move cleanup field to the front.
8945 2003-03-01  Roland McGrath  <roland@redhat.com>
8947         * sem_open.c (sem_open): Braino fix.
8949 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8951         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
8952         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
8953         __pthread_cleanup_pop functionality.
8954         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8956         * descr.h (struct pthread): Move tid field to the front now that
8957         it is often used.
8959         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
8960         (__lll_mutex_timedlock_wait): Remove.
8961         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8962         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8963         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8964         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8965         (lll_unlock_wake_cb): Don't save and restore %esi.
8966         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
8967         %esi.
8968         (__lll_timedwait_tid): Add alignment.
8969         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8970         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
8971         %esi.
8972         (__lll_timedwait_tid): Removed.
8973         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
8974         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
8975         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
8976         (pthread_barrier_wait): Don't save, load, and restore %esi for
8977         last thread.
8978         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8979         (__pthread_cond_signal): Don't save, load, and restore %esi.
8980         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
8981         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
8982         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
8983         Don't save, load, and restore %esi.
8985 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
8987         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
8988         Release lock before waking up the waiters.
8990         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
8992         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
8993         (reader_thread): Likewise.
8995         * sysdeps/pthread/pthread_rwlock_unlock.c
8996         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
8997         to wake up readers if there are none.
8999         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
9000         Release internal lock before wake threads.
9002 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
9004         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
9005         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
9006         predefined.
9007         * tst-rwlock9.c: Likewise.
9008         * tst-rwlock10.c: New file.
9009         * tst-rwlock11.c: New file.
9011         * Makefile (tests): Add tst-dlsym1.
9012         * tst-dlsym1.c: New file.
9014         * init.c (__pthread_initialize_minimal_internal): Set
9015         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
9016         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
9018 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
9020         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
9022         * tst-cond2.c: Fix sychronization with child.
9024         * tst-rwlock8.c (reader_thread): Remove unused variable.
9026         * Makefile: Add rules to build and run tst-tls3.
9027         * tst-tls3.c: New file.
9028         * tst-tls3mod.c: New file.
9030         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
9031         * tst-rwlock8.c: New file.
9032         * tst-rwlock9.c: New file.
9033         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
9034         complete broken rwlock implementation.
9035         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9036         Likewise.
9037         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9038         Likewise.
9039         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
9040         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9041         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
9042         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9043         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
9044         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
9045         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9047 2003-02-23  Roland McGrath  <roland@redhat.com>
9049         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
9051 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
9053         * Makefile (tests): Add tst-context1.
9054         * tst-context1.c: New file.
9056         * Makefile (tests): Add tst-tls1 and tst-tls2.
9057         * tst-tls1.c: New file.
9058         * tst-tls2.c: New file.
9060         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
9061         for failed cmpxchg.
9063         * pthread_create.c (start_thread): Set EXITING_BIT early.
9065         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
9066         (THREAD_GETMEM_NC): Likewise.
9068 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
9070         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
9071         off 3 more bytes by using offset-less instructions when possible.
9073         * Makefile: Add dependency for $(objpfx)version.d.
9075         * eintr.c (eintr_source): Add unnecessary return but the compiler
9076         insists.
9078         * tst-kill3.c: Include <unistd.h>.
9080 2003-02-21  Roland McGrath  <roland@redhat.com>
9082         * pthread_create.c (start_thread): Call __libc_thread_freeres.
9084 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
9086         * Makefile (tests): Add tst-eintr1.
9087         (distribute): Add eintr.c.
9088         * tst-eintr1.c: New file.
9089         * eintr.c: New file.
9091         * pthread_cancel.c (pthread_cancel): Use tkill directly.
9093         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
9094         Disallow sending SIGCANCEL.
9096         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
9097         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
9098         * tst-kill1.c: New file.
9099         * tst-kill2.c: New file.
9100         * tst-kill3.c: New file.
9101         * tst-kill5.c: New file.
9102         * tst-kill6.c: New file.
9103         * tst-basic7.c: Renamed to...
9104         * tst-kill4.c: ...this.
9106 2003-02-21  Roland McGrath  <roland@redhat.com>
9108         * Makefile (install-lib-ldscripts): New variable.
9110 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
9112         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
9113         * pthread_cancel.c: Use INVALID_TD_P.
9114         * pthread_detach.c: Likewise.
9115         * pthread_getschedparam.c: Likewise.
9116         * pthread_setschedparam.c: Likewise.
9117         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
9118         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
9119         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
9120         * pthread_timedjoin.c: Likewise.
9122         * tst-basic7.c: Include <signal.h>.
9124         * pthread_join.c (pthread_join): Limited checking for invalid
9125         descriptors.
9126         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
9128 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
9130         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
9131         beginning of the loop.  Clear the entire first block of TSD.
9132         * Makefile (tests): Add tst-key4.
9133         * tst-key4.c: New file.
9135 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
9137         * Makefile (tests): Add tst-basic7.
9138         * tst-basic7.c: New file.
9140         * pthread_create.c (deallocate_tsd): Mark as internal_function.
9141         Add some more __builtin_expect.
9143         * pthreadP.h: Define dummy version of DEBUGGING_P.
9145 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
9147         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
9148         _POSIX_THREAD_PRIORITY_SCHEDULING.
9149         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
9150         _XOPEN_REALTIME_THREADS.
9151         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
9153         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
9154         kernel returns EINVAL for PID <= 0, work around it.
9156         * Makefile (tests): Add tst-signal5.
9157         * tst-signal5.c: New file.
9159         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
9160         and LOGIN_NAME_MAX.
9162         * tst-cancel1.c (tf): Block all signals.
9164         * Makefile (tests): Add tst-basic6.
9165         * tst-basic6.c: New file.
9167         * tst-basic1.c: Add test for process ID.
9169         * Makefile (tests): Add tst-cancel10.
9170         * tst-cancel10.c: New file.
9172         * Makefile (tests): Add tst-signal4.
9173         * tst-signal4.c: New file.
9175         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
9176         __sigismember instead of sigismember.  Add __builtin_expect.
9178 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
9180         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
9181         pthread_setcancelstate, and pthread_rwlock_setpshared.
9183         * tst-cancel7.c (do_test): Make sure the pid file exists before
9184         canceling the thread.
9186         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
9187         pthread_rwlock_timedrdlock tests.
9188         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
9189         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9190         Check for invalid tv_nsec field.
9191         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9192         Likewise.
9194         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
9195         recursive mutex of overflow.
9197         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
9199         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
9200         going into an endless loop.
9201         * Makefile (tests): Add tst-cancel9.
9202         * tst-cancel9.c: New file.
9204         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
9206 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
9208         * tst-mutex5.c (do_test): Add more timedlock tests.
9210         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
9211         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
9213         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
9214         use INLINE_SYSCALL.  Error number is returned, not -1.
9216         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
9217         and __deallocate_stack with internal_function.
9218         * pthread_create.c: Adjust definitions appropriately.
9219         * allocatestack.c: Likewise.
9221         * pthread_join.c: Add one more __builtin_expect.
9222         * pthread_timedjoin.c: Likewise.
9224         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
9225         not data of sequence number does not match.
9226         Add one __builtin_expect.
9228         * Makefile (tests): Add tst-clock1.
9229         * tst-clock1.c: New file.
9231         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
9232         negative arguments.
9233         * Makefile (tests): Add tst-basic5.
9234         * tst-basic5.c: New file.
9236 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
9238         * Makefile (tests): Add tst-basic4.
9239         * tst-basic4.c: New file.
9241         * pthreadP.h: Add declaraction for __nptl_nthreads.
9242         * pthread_create.c: Define __nptl_nthreads
9243         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
9244         after thread is done.  If then zero, call exit(0).
9245         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9246         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
9247         * init.c (pthread_functions): Initialize ptr_nthreads.
9248         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
9249         (__reclaim_stacks): Decrement __nptl_nthreads.
9250         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
9251         Define.
9252         * Makefile (tests): Add tst-basic3.
9253         * tst-basic3.c: New file.
9255         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
9256         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
9257         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
9258         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
9259         if asynchronous canceling is enabled.
9260         * pthread_join.c (pthread_join): When recognizing circular joins,
9261         take into account the other thread might be already canceled.
9262         * Makefile (tests): Add tst-join5.
9263         * tst-join5.c: New file.
9265         * Makefile (tests): Add tst-join4.
9266         * tst-join4.c: New file.
9268 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
9270         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
9272 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
9274         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
9275         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
9276         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
9277         warning.
9278         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
9279         to avoid warning.
9280         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
9281         error if lll_futex_wake failed.
9283 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
9285         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
9286         handling of cancellation and failung pthread_mutex_unlock call.
9287         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9288         * Makefile (tests): Add tst-cond8 and tst-cond9.
9289         * tst-cond8.c: New file.
9290         * tst-cond9.c: New file.
9292         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
9294         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
9295         non-standard initializers with __USE_GNU.
9297         * Makefile (tests): Add tst-cleanup3.
9298         * tst-cleanup3.c: New file.
9300 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
9302         * Makefile (tests): Add tst-attr1 and tst-attr2.
9303         * tst-attr1.c: New file.
9304         * tst-attr2.c: New file.
9306         * Makefile: Add rules to build and run tst-atfork2 test.
9307         * tst-atfork2.c: New file.
9308         * tst-atfork2mod.c: New file.
9310         * sysdeps/unix/sysv/linux/unregister-atfork.c
9311         (__unregister_atfork): Free the memory allocated for the handlers
9312         after removing them from the lists.
9314         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
9315         cleanup function.
9317         * tst-atfork1.c (do_test): Wait for the child we forked.
9318         Report error in child.
9320         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
9322         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
9324 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
9326         * Makefile (tests): Add tst-cancel8.
9327         * tst-cancel8.c: New file.
9329         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
9330         clearing of control variable.
9331         * Makefile (tests): Add tst-once3 and tst-once4.
9332         * tst-once3.c: New file.
9333         * tst-once4.c: New file.
9335 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
9337         * sysdeps/sh/Makefile: New file.
9338         * sysdeps/sh/bits/atomic.h: New file.
9339         * sysdeps/sh/pthread_spin_init.c: New file.
9340         * sysdeps/sh/pthread_spin_lock.c: New file.
9341         * sysdeps/sh/pthread_spin_trylock.S: New file.
9342         * sysdeps/sh/pthread_spin_unlock.S: New file.
9343         * sysdeps/sh/pthreaddef.h: New file.
9344         * sysdeps/sh/tcb-offsets.sym: New file.
9345         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
9346         * sysdeps/sh/tls.h: New file.
9347         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
9348         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
9349         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
9350         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
9351         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
9352         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
9353         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
9354         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
9355         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
9356         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
9357         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
9358         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
9359         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
9360         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
9361         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
9362         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
9363         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
9364         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
9365         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
9366         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
9367         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
9368         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
9369         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
9370         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
9371         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
9372         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
9373         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
9374         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
9375         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
9376         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
9378 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
9380         * tst-cond2.c: Rearrange code to not rely on behavior undefined
9381         according to POSIX.
9383         * tst-basic2.c (do_test): Lock mutex before creating the thread.
9385 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
9387         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
9388         (TLS_GET_FS): New #define.
9389         (TLS_SET_FS): New #define.
9390         Correct value of __NR_set_thread_area.
9392         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
9394 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
9396         * Makefile (tests): Add tst-popen1.
9397         * tst-popen1.c: New file.
9399         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
9400         but inactive generalization.
9401         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9402         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9403         Minor optimization, remove one instruction.
9404         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9406 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
9408         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
9410 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
9412         * init.c (__NR_set_tid_address): Add #ifdef for s390.
9413         * sysdeps/pthread/pthread_barrier_wait.c: New file.
9414         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
9415         * sysdeps/pthread/pthread_cond_signal.c: New file.
9416         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
9417         * sysdeps/pthread/pthread_cond_wait.c: New file.
9418         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
9419         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
9420         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
9421         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
9422         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
9423         * sysdeps/s390/Makefile: New file.
9424         * sysdeps/s390/bits/atomic.h: New file.
9425         * sysdeps/s390/pthread_spin_init.c: New file.
9426         * sysdeps/s390/pthread_spin_lock.c: New file.
9427         * sysdeps/s390/pthread_spin_trylock.c: New file.
9428         * sysdeps/s390/pthread_spin_unlock.c: New file.
9429         * sysdeps/s390/pthreaddef.h: New file.
9430         * sysdeps/s390/tcb-offsets.sym: New file.
9431         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
9432         * sysdeps/s390/tls.h: New file.
9433         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
9434         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
9435         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
9436         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
9437         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
9438         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
9439         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9440         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
9441         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
9442         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
9443         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
9444         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
9445         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
9446         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
9447         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
9448         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
9449         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
9450         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
9451         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
9452         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
9453         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
9454         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9455         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
9457 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
9459         * atomic.h: Add a couple more default implementations.
9460         (atomic_compare_and_exchange_acq): Use
9461         __arch_compare_and_exchange_32_acq in return value definition.  It
9462         always exists.
9463         (atomic_bit_set): Renamed from atomic_set_bit.
9464         Add missing atomic_ prefixes.
9466         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
9467         thread library is available, use correct value to mark initialized
9468         once variable.
9470 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
9472         * allocatestack.c (allocate_stack): Use __getpagesize instead of
9473         __sysconf to determine pagesize.
9475         * pthread_create.c: Include <atomic.h>.
9476         * allocatestack.c (allocate_stack): Implement coloring of the
9477         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
9478         size minus one.  Adjust users.
9479         * sysdeps/i386/i686/Makefile: New file.
9481 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
9483         * allocatestack.c: Improve comment throughout the file.
9485         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9486         (__lll_lock_wait): Add branch prediction.
9487         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
9488         (__lll_lock_wait): Likewise.
9489         (lll_unlock_wake_cb): Removed.
9491 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
9493         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
9494         _POSIX_THREAD_PRIORITY_SCHEDULING.
9496 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
9498         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9499         Fix return type of ptr___pthread_getspecific.
9501 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
9503         * Makefile (tests): Add tst-umask1.
9504         (tst-umask1-ARGS): Define.
9505         * tst-umask1.c: New file.
9507 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
9509         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
9510         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
9511         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
9512         pthread_rwlock_unlock.
9513         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
9514         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
9515         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
9516         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
9517         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9518         New file.
9519         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
9520         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9521         New file.
9522         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
9523         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
9524         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
9525         New file.
9526         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
9527         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
9528         New file.
9529         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
9530         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
9531         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
9532         New file.
9533         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
9534         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
9535         New file.
9536         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
9538         * Makefile (libpthread-routines): Remove lowlevelcond and
9539         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
9540         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
9541         and pthread_cond_broadcast.
9542         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
9543         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
9544         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
9545         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
9546         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
9547         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
9548         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
9549         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
9550         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
9551         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
9552         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
9553         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
9554         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
9555         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
9556         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
9557         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
9558         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
9559         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
9560         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
9561         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
9562         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
9563         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
9564         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
9565         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
9566         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
9567         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
9568         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
9569         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
9570         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
9571         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
9572         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
9574         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
9575         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
9576         of the code is moved to ...
9577         * sysdeps/pthread/createthread.c: ...here.  New file.
9579 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
9581         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
9582         (__new_sem_post): Clear %eax before returning.
9583         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
9585         * Makefile (tests): Add tst-cleanup2.
9586         * tst-cleanup2.c: New file.
9588         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9589         Interpret first parameter correctly.
9591 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
9593         * Makefile (headers): Add bits/semaphore.h.
9595 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
9597         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
9598         if not SHARED.
9600 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
9602         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
9603         must be used and mapping failed.
9604         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
9606         * Makefile (CFLAGS-pthread_self.os): Define this, not
9607         CFLAGS-pthread_self.c.
9609 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
9611         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
9612         lll_unlock_wake_cb.
9614         * Makefile (libpthread-routines): Add version.  Add rules to build
9615         version.os and banner.h.
9616         * version.c: New file.
9618 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
9620         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
9621         the alias unconditional.
9622         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
9624 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
9626         * Makefile (CFLAGS-pthread_self.c): New definition.
9628 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
9630         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
9631         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
9632         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
9633         * init.c (__pthread_initialize_minimal_internal): Likewise.
9635 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
9637         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
9639         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9640         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9641         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9642         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
9643         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9644         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9646 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
9648         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
9649         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
9650         * tst-cancel-wrappers.sh: Remove all exceptions.
9652 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
9654         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
9655         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
9657         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
9658         Use __libc_pthread_functions array if SHARED.
9660         * pthreadP.h: Move pthread_cond_2_0_t definition to...
9661         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
9663         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
9664         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
9665         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
9666         __libc_ptf_call instead of __libc_maybe_call.
9667         (PTF): New #define.
9668         (__libc_cleanup_region_start): Wrap function name with PTF call.
9669         (__libc_cleanup_region_end): Likewise.
9670         (__libc_cleanup_end): Likewise.
9672         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
9673         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
9674         * pthread_key_create.c: Add __pthread_key_create_internal alias.
9675         * pthreadP.h: Add prototypes.
9677         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
9678         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
9679         __pthread_rwlock_unlock aliases.
9680         * pthreadP.h: Add prototypes for new aliases.
9682         * pthreadP.h (struct pthead_functions): Moved to...
9683         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
9684         * init.c (pthread_functions): Add initializers for new elements.
9686         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
9687         __pthread_cleanup_pop_restore aliases.
9688         * pthreadP.h: Add prototypes.
9690         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
9691         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
9692         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
9693         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
9694         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9695         * pthreadP.h: Adjust prototypes and callers.
9697 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
9699         * Makefile (tests): Add tst-cancel7.
9700         (tst-cancel7-ARGS): New variable.
9701         * tst-cancel7.c: New file.
9703         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
9704         around gcc defficiencies.
9705         * old_pthread_cond_signal.c: Likewise.
9706         * old_pthread_cond_timedwait.c: Likewise.
9707         * old_pthread_cond_wait.c: Likewise.
9709         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
9711 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9713         * Makefile (tests): Add tst-cond7.
9714         * tst-cond7.c: New file.
9716         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9717         (condvar_cleanup): Get condvar address from the right place.
9719         * atomic.h: Correct definitions of atomic_full_barrier,
9720         atomic_read_barrier, atomic_write_barrier.
9722         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
9723         race-free.
9724         * old_pthread_cond_signal.c: Likewise.
9725         * old_pthread_cond_timedwait.c: Likewise.
9726         * old_pthread_cond_wait.c: Likewise.
9728 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
9730         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
9732 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9734         * pthreadP.h (pthread_cond_2_0_t): New type.
9735         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
9736         Use new type for the 2.0 condvar function prototypes.
9737         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
9738         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
9739         parameter.
9740         * old_pthread_cond_destroy.c: Likewise.
9741         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
9742         * old_pthread_cond_signal.c: Likewise.
9743         * old_pthread_cond_timedwait.c: Likewise.
9744         * old_pthread_cond_wait.c: Likewise.
9746         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9747         (__pthread_cond_wait): Don't save cancellation mode and seq value
9748         in same location.
9750         * herrno.c (__h_errno_location): Don't define as weak.
9752 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
9754         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
9755         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
9756         and pthread_cond_wait.
9757         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
9758         Renamed to...
9759         (__pthread_cond_broadcast_2_0): ... this.
9760         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
9761         Renamed to...
9762         (__pthread_cond_destroy_2_0): ... this.
9763         * old_pthread_cond_init.c (__old_pthread_cond_init):
9764         Renamed to...
9765         (__pthread_cond_init_2_0): ... this.
9766         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
9767         Renamed to...
9768         (__pthread_cond_signal_2_0): ... this.
9769         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
9770         Renamed to...
9771         (__pthread_cond_wait_2_0): ... this.
9772         * pthread_cond_destroy.c: Include shlib-compat.h.
9773         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
9774         * pthread_cond_init.c: Include shlib-compat.h.
9775         (pthread_cond_init): Change strong_alias into versioned_symbol.
9776         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
9777         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
9778         fields.
9779         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
9780         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
9781         __pthread_cond_wait_2_0): New prototypes.
9782         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
9783         __old_pthread_cond_init, __old_pthread_cond_signal,
9784         __old_pthread_cond_wait): Removed.
9785         * init.c: Include shlib-compat.h.
9786         (pthread_functions): Guard ptr___pthread_attr_init_2_0
9787         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
9788         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
9789         ptr___pthread_cond_*_2_0 fields.
9790         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
9791         pthread_cond_*@GLIBC_2.0 compatibility symbols.
9793         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
9794         LIBC_SIGACTION was not yet defined.
9795         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
9796         [!defined LIBC_SIGACTION] (__sigaction): New function and
9797         libc_hidden_weak.
9798         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
9799         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
9801 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
9803         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
9805 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
9807         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9808         New, larger type definition.
9809         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
9810         implementation.
9811         * Versions [libpthread]: Add definitions for new pthread_cond_*
9812         interfaces for version GLIBC_2.3.2.
9813         * pthread_cond_init.c: Update initialization for new type definition.
9814         * Makefile (libpthread-routines): Remove pthread_cond_wait,
9815         pthread_cond_timedwait, pthread_cond_signal, and
9816         pthread_cond_broadcast.  Add old_pthread_cond_init,
9817         old_pthread_cond_destroy, old_pthread_cond_wait,
9818         old_pthread_cond_timedwait, old_pthread_cond_signal, and
9819         old_pthread_cond_broadcast.
9820         * old_pthread_cond_broadcast.c: New file.
9821         * old_pthread_cond_destroy.c: New file.
9822         * old_pthread_cond_init.c: New file.
9823         * old_pthread_cond_signal.c: New file.
9824         * old_pthread_cond_timedwait.c: New file.
9825         * old_pthread_cond_wait.c: New file.
9826         * pthreadP.h: Add prototypes for the compatibility interfaces.
9828         * pthread_cond_destroy.c: Don't include <errno.h>.
9830 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
9832         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
9833         unnecessary zero offset when addressing MUTEX.
9835 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
9837         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
9838         __register_atfork.
9839         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
9840         for __register_atfork.
9842 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
9844         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
9845         instead of ASSEMBLER test macro.
9847         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
9848         __libc_current_sigrtmax): Add libc_hidden_def.
9850         * sysdeps/pthread/list.h: Remove assert.h include.
9852 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
9854         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
9855         __pthread_initialize_minimal_internal not
9856         __pthread_initialize_minimal.
9858 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
9860         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
9861         __pthread_initialize_minimal as hidden.
9863         * init.c (__pthread_initialize_minimal_internal): Don't mark as
9864         constructor.
9866 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
9868         * Makefile ($(inst_libdir)/libpthread.so): Depend on
9869         $(common-objpfx)format.lds, include that into the output script.
9870         Fix comment.
9871         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
9873 2002-12-28  Andreas Jaeger  <aj@suse.de>
9875         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
9876         nsec resolution changes.
9877         (xstat64_conv): Likewise.
9878         (xstat32_conv): Likewise.
9879         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
9880         struct kernel_stat.
9881         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
9882         structs stat and stat64.
9883         * time/time.h (__timespec_defined): Define for __USE_MISC.
9884         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
9886 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
9888         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
9889         argument.
9890         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
9891         (pthread_exit): Use strong_alias to avoid warnings.
9892         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
9893         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
9894         ptr___pthread_attr_init_2_*.
9895         * init.c (pthread_functions): Adjust.
9897 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
9899         * forward.c: Make all functions available by default again.  It
9900         caused too much trouble.
9902         * pt-siglongjmp.c: Removed.
9904 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
9906         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
9907         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
9908         * sysdeps/i386/Makefile: New file.
9909         * sysdeps/i386/tcb-offsets.sym: New file.
9910         * sysdeps/pthread/tcb-offsets.h: New file.
9911         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9912         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
9914         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
9915         __register_atfork...
9916         (GLIBC_2.3.2): ...here.
9918 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9920         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
9921         pthread_attr_setstackaddr with __attribute_deprecated__.
9923 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9925         * pt-system.c (system): Remove cancellation handling.
9926         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
9927         cancellation routines.
9929 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9931         * descr.h: Include <dl-sysdep.h>.
9932         (struct pthread): Move header.data.list to the back of the struct.
9933         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
9934         (MULTIPLE_THREADS_OFFSET): Adjust offset.
9935         (SYSINFO_OFFSEET): Likewise.
9937 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9939         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
9940         Define.
9941         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
9942         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
9943         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
9944         (USE_DL_SYSINFO): Undef.
9946 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
9948         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
9949         $(common-objpfx)libc.so.
9950         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
9951         it is bigger than pipe buffer size even on arches with bigger
9952         page size.
9953         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
9955 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
9957         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
9958         correct errno access for case that USE___THREAD is not defined.
9960 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
9962         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
9963         Patch by Marijn Ros <marijn@mad.scientist.com>.
9965 2002-12-22  Roland McGrath  <roland@redhat.com>
9967         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
9969 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
9971         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
9973 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
9975         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
9976         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
9977         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
9979         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
9980         of int $0x80.
9981         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9982         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
9983         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
9984         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9985         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9986         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
9987         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
9988         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9990         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
9991         sysenter.
9992         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9994         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
9996         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
9997         in new TCB.
9998         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
9999         that sysinfo is properly initialized.
10000         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
10001         to 1 only for ld.so.
10003         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
10004         RTLD_CORRECT_DYNAMIC_WEAK.
10006 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
10008         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
10009         Use return 0 as 6th argument to FORWARD4.
10010         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
10012 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
10014         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
10015         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
10016         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
10017         (INIT_SYSINFO): New #define.
10018         (TLS_TP_INIT): Use INIT_SYSINFO.
10019         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10020         At test to make sure SYSINFO_OFFSET value is correct.
10021         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
10023 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
10025         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
10026         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
10027         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
10028         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
10029         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
10030         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
10031         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
10033 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
10035         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
10036         macro instead of using int $0x80 directly.
10038         * sysdeps/pthread/bits/stdio-lock.h: New file.
10039         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
10040         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
10041         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
10042         * Makefile (routines): Add libc-lowlevelmutex.
10044         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
10045         __i686.get_pc_thunk.dx.
10047 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
10049         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
10050         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
10051         ($(objpfx)tst-cancel-wrappers.out): New rule.
10052         * tst-cancel-wrappers.sh: New test.
10053         * tst-locale1.c: Include signal.h.
10054         (uselocale): Test static linking of __libc_current_sigrt*.
10056 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
10058         * Makefile (tests): Add tst-cancel6.
10059         * tst-cancel6.c: New file
10061 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
10063         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
10064         Define meaningfully for assembler as well.
10065         * pthreadP.h (struct pthread_functions): Remove
10066         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
10067         and ptr_pthread_attr_init_2_1 fields.
10068         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
10069         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
10070         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
10071         (FORWARD3): Define using FORWARD4.
10072         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
10073         versions.
10074         * pt-system.c: Remove duplicate stdlib.h include.
10076 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
10078         * sem_init.c: Define sem_init@GLIBC_2.0.
10079         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
10080         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
10082         * flockfile.c: Moved to...
10083         * sysdeps/pthread/flockfile.c: ...here.  New file.
10084         * funlockfile.c: Moved to...
10085         * sysdeps/pthread/funlockfile.c: ...here.  New file.
10086         * ftrylockfile.c: Moved to...
10087         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
10089 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
10091         * libc-cancellation.c: Guard both function with
10092         #if !defined NOT_IN_libc.
10093         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
10094         automatically provided pthread wrappers.
10095         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
10096         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
10097         nor in libpthread.
10098         * pt-open.c: Removed.
10099         * pt-fcntl.c: Removed.
10100         * pt-fsync.c: Removed.
10101         * pt-lseek.c: Removed.
10102         * pt-msgrcv.c: Removed.
10103         * pt-msgsnd.c: Removed.
10104         * pt-msync.c: Removed.
10105         * pt-nanosleep.c: Removed.
10106         * pt-open64.c: Removed.
10107         * pt-pause.c: Removed.
10108         * pt-pread.c: Removed.
10109         * pt-pread64.c: Removed.
10110         * pt-pwrite.c: Removed.
10111         * pt-pwrite64.c: Removed.
10112         * pt-read.c: Removed.
10113         * pt-recv.c: Removed.
10114         * pt-recvfrom.c: Removed.
10115         * pt-recvmsg.c: Removed.
10116         * pt-send.c: Removed.
10117         * pt-sendto.c: Removed.
10118         * pt-sigtimedwait.c: Removed.
10119         * pt-sigwait.c: Removed.
10120         * pt-wait.c: Removed.
10121         * pt-waitpid.c: Removed.
10122         * pt-write.c: Removed.
10123         * pt-accept.c: Removed.
10124         * pt-close.c: Removed.
10125         * pt-connect.c: Removed.
10126         * pt-lseek64.c: Removed.
10127         * pt-sendmsg.c: Removed.
10128         * pt-tcdrain.c: Removed.
10130 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
10132         * init.c (__pthread_initialize_minimal_internal): Renamed from
10133         __pthread_initialize_minimal.  Make old name an alias.  This
10134         converts a normal relocation into a relative relocation.
10136         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
10138         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
10139         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
10140         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
10141         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
10142         pt-sigwaitinfo, pt-waitid, and pt-writev.
10143         * pt-creat.c: Removed.
10144         * pt-poll.c: Removed.
10145         * pt-pselect.c: Removed.
10146         * pt-readv.c: Removed.
10147         * pt-select.c: Removed.
10148         * pt-sigpause.c: Removed.
10149         * pt-sigsuspend.c: Removed.
10150         * pt-sigwaitinfo.c: Removed.
10151         * pt-waitid.c: Removed.
10152         * pt-writev.c: Removed.
10154         * init.c (pthread_functions): New variable.
10155         (__pthread_initialize_minimal): Pass pointer to pthread_functions
10156         (or NULL) to __libc_pthread_init.
10157         * forward.c: Rewrite to use __libc:pthread_functions array to get
10158         function addresses.
10159         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
10160         prototype.
10161         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10162         Take new parameter.  Copy content of variable pointed to by it
10163         to __libc_pthread_init.
10165         * pthreadP.h (struct pthread_functions): New type.
10166         (__libc_pthread_init): Declare.
10168         * pthread_attr_destroy.c: Add namespace protected alias.
10169         * pthread_attr_getdetachstate.c: Likewise.
10170         * pthread_attr_getinheritsched.c: Likewise.
10171         * pthread_attr_getschedparam.c: Likewise.
10172         * pthread_attr_getschedpolicy.c: Likewise.
10173         * pthread_attr_getscope.c: Likewise.
10174         * pthread_attr_setdetachstate.c: Likewise.
10175         * pthread_attr_setinheritsched.c: Likewise.
10176         * pthread_attr_setschedparam.c: Likewise.
10177         * pthread_attr_setschedpolicy.c: Likewise.
10178         * pthread_attr_setscope.c: Likewise.
10179         * pthread_cond_broadcast.c: Likewise.
10180         * pthread_cond_destroy.c: Likewise.
10181         * pthread_cond_init.c: Likewise.
10182         * pthread_cond_signal.c: Likewise.
10183         * pthread_cond_wait.c: Likewise.
10184         * pthread_condattr_destroy.c: Likewise.
10185         * pthread_condattr_init.c: Likewise.
10186         * pthread_equal.c: Likewise.
10187         * pthread_exit.c: Likewise.
10188         * pthread_getschedparam.c: Likewise.
10189         * pthread_self.c: Likewise.
10190         * pthread_setcancelstate.c: Likewise.
10191         * pthread_setschedparam.c: Likewise.
10192         * pthread_mutex_destroy.c: Likewise.
10193         * pthread_mutex_init.c: Likewise.
10194         * pthreadP.h: Add prototypes for the aliases.
10196         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
10197         multiple_threads member in correct TCB to 1.
10199         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
10200         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
10201         member of thread decriptor, otherwise return unconditionally 1.
10203 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
10205         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
10206         regular Linux version.  Remove file.
10207         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
10208         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
10209         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
10210         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
10211         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
10212         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
10213         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
10214         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
10215         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
10216         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
10217         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
10218         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
10219         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
10220         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
10221         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
10222         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
10223         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
10224         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
10225         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
10226         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
10227         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
10228         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
10229         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
10230         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
10231         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
10232         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
10233         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
10234         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
10235         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
10236         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
10238 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
10240         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
10241         * sysdeps/unix/sysv/linux/open.c: Removed.
10242         * sysdeps/unix/sysv/linux/fsync.c: Removed.
10243         * sysdeps/unix/sysv/linux/lseek.c: Removed.
10244         * sysdeps/unix/sysv/linux/msync.c: Removed.
10245         * sysdeps/unix/sysv/linux/read.c: Removed.
10246         * sysdeps/unix/sysv/linux/close.c: Removed.
10247         * sysdeps/unix/sysv/linux/creat.c: Removed.
10248         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
10249         * sysdeps/unix/sysv/linux/pause.c: Removed.
10250         * sysdeps/unix/sysv/linux/select.c: Removed.
10251         * sysdeps/unix/sysv/linux/write.c: Removed.
10253 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
10255         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
10256         element in TCB to see whether locking is needed.
10258         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
10259         MULTIPLE_THREADS_OFFSET value is correct.
10261         * sysdeps/unix/sysv/linux/close.c: New file.
10262         * sysdeps/unix/sysv/linux/connect.S: New file.
10263         * sysdeps/unix/sysv/linux/creat.c: New file.
10264         * sysdeps/unix/sysv/linux/fsync.c: New file.
10265         * sysdeps/unix/sysv/linux/llseek.c: New file.
10266         * sysdeps/unix/sysv/linux/lseek.c: New file.
10267         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
10268         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
10269         * sysdeps/unix/sysv/linux/msync.c: New file.
10270         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
10271         * sysdeps/unix/sysv/linux/open.c: New file.
10272         * sysdeps/unix/sysv/linux/open64.c: New file.
10273         * sysdeps/unix/sysv/linux/pause.c: New file.
10274         * sysdeps/unix/sysv/linux/poll.c: New file.
10275         * sysdeps/unix/sysv/linux/pread.c: New file.
10276         * sysdeps/unix/sysv/linux/pread64.c: New file.
10277         * sysdeps/unix/sysv/linux/pselect.c: New file.
10278         * sysdeps/unix/sysv/linux/pwrite.c: New file.
10279         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
10280         * sysdeps/unix/sysv/linux/readv.c: New file.
10281         * sysdeps/unix/sysv/linux/recv.S: New file.
10282         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
10283         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
10284         * sysdeps/unix/sysv/linux/select.c: New file.
10285         * sysdeps/unix/sysv/linux/send.S: New file.
10286         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
10287         * sysdeps/unix/sysv/linux/sendto.S: New file.
10288         * sysdeps/unix/sysv/linux/sigpause.c: New file.
10289         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
10290         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
10291         * sysdeps/unix/sysv/linux/sigwait.c: New file.
10292         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
10293         * sysdeps/unix/sysv/linux/system.c: New file.
10294         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
10295         * sysdeps/unix/sysv/linux/wait.c: New file.
10296         * sysdeps/unix/sysv/linux/waitid.c: New file.
10297         * sysdeps/unix/sysv/linux/waitpid.c: New file.
10298         * sysdeps/unix/sysv/linux/writev.c: New file.
10299         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
10301         * pt-readv.c: Fix comment.
10303 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
10305         * tst-cleanup1.c: Include stdlib.h.
10307         * tst-cancel5.c: New test.
10308         * Makefile (tests): Add tst-cancel5.
10309         (tst-cancel5): Link against libc.so libpthread.so in that order.
10311 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
10313         * forward.c (test_loaded): Prevent recursive calls.
10315         * Makefile (routines): Add libc-cancellation.
10316         * libc-cancellation.c: New file.
10317         * descr.h (struct pthread): Add multiple_threads field.
10318         * allocatestack.c (allocate_stack): Initialize multiple_header field of
10319         new thread descriptor to 1.
10320         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
10321         Initialize multiple_thread field after successful thread creation.
10322         * cancellation.c (__do_cancel): Move to pthreadP.h.
10323         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
10324         (__pthread_disable_asynccancel): Add internal_function attribute.
10325         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
10326         * pthread_setcancelstate.c: Likewise.
10327         * pthread_setcanceltype.c: Likewise.
10328         * pthread_exit.c: Likewise.
10329         * pthreadP.h (CANCELLATION_P): Likewise.
10330         (__do_cancel): Define as static inline.
10331         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
10332         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
10333         declarations.
10334         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
10335         fields.  Define MULTIPLE_THREADS_OFFSET.
10336         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
10337         declaration.
10338         * sysdeps/unix/sysv/linux/accept.S: New file.
10339         * sysdeps/unix/sysv/linux/read.c: New file.
10340         * sysdeps/unix/sysv/linux/write.c: New file.
10341         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
10342         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
10343         initialization of __libc_locking_needed.
10344         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
10345         __libc_locking_needed, use multiple_threads field in TCB.
10346         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10348 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
10350         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
10351         version.
10352         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
10354         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
10355         access to __libc_locking_needed for PIC.
10357 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
10359         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
10360         declare for libc.so.
10361         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
10362         expression.
10363         (__libc_lock_lock): Put into statement expression.
10364         (__libc_lock_unlock): Remove trailing semicolon.
10365         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
10367 2002-12-12  Roland McGrath  <roland@redhat.com>
10369         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
10370         "m" constraint to refer to __libc_locking_needed.  Declare it here.
10372 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
10374         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
10375         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
10376         Initialize __libc_locking_needed.
10377         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
10378         instead of __register_pthread_fork_handler.
10379         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
10380         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
10381         fork-gen with libc_pthread_init.
10382         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
10383         of __register_pthread_fork_handler.
10384         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
10385         of __register_pthread_fork_handler.
10386         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
10387         __libc_locking_needed to determine whether lock prefix can be avoided.
10388         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10390 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
10392         * Makefile (tests): Add tst-cleanup1.
10393         * tst-cleanup1.c: New file.
10394         * cancellation.c (__cleanup_thread): Removed.
10395         (__do_cancel): Remove call to __cleanup_thread.
10396         * pthreadP.h: Remove __cleanup_thread prorotype.
10398         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
10399         Remember function and argument even if cancellation handler
10400         function is not available.
10401         (__libc_cleanup_region_end): Execute registered function directly if
10402         pthread functions are not available.
10403         (__libc_cleanup_end): Likewise.
10405         * init.c (__pthread_initialize_minimal): Fix initialization in
10406         static lib by preventing gcc from being too clever.
10408 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
10410         * init.c (__pthread_initialize_minimal): Remove unneccesary
10411         sigaddset call.
10413         * Makefile (tests): We can run tst-locale2 now.
10415 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
10417         * Versions: Remove duplicated sigwait entry.
10419 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
10421         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
10422         inside libpthread.
10424         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
10426         * pthreadP.h: Declare __pthread_enable_asynccancel and
10427         __pthread_disable_asynccancel.
10428         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
10429         (CANCEL_RESET): Use __pthread_disable_asynccancel.
10430         * cancellation.c (__pthread_enable_asynccancel): New function.
10431         (__pthread_disable_asynccancel): New function.
10432         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
10433         * pt-close.c: Likewise.
10434         * pt-connect.c: Likewise.
10435         * pt-creat.c: Likewise.
10436         * pt-fcntl.c: Likewise.
10437         * pt-fsync.c: Likewise.
10438         * pt-lseek.c: Likewise.
10439         * pt-lseek64.c: Likewise.
10440         * pt-msgrcv.c: Likewise.
10441         * pt-msgsnd.c: Likewise.
10442         * pt-msync.c: Likewise.
10443         * pt-nanosleep.c: Likewise.
10444         * pt-open.c: Likewise.
10445         * pt-open64.c: Likewise.
10446         * pt-pause.c: Likewise.
10447         * pt-poll.c: Likewise.
10448         * pt-pread.c: Likewise.
10449         * pt-pread64.c: Likewise.
10450         * pt-pselect.c: Likewise.
10451         * pt-pwrite.c: Likewise.
10452         * pt-pwrite64.c: Likewise.
10453         * pt-read.c: Likewise.
10454         * pt-readv.c: Likewise.
10455         * pt-recv.c: Likewise.
10456         * pt-recvfrom.c: Likewise.
10457         * pt-recvmsg.c: Likewise.
10458         * pt-select.c: Likewise.
10459         * pt-send.c: Likewise.
10460         * pt-sendmsg.c: Likewise.
10461         * pt-sendto.c: Likewise.
10462         * pt-sigpause.c: Likewise.
10463         * pt-sigsuspend.c: Likewise.
10464         * pt-sigtimedwait.c: Likewise.
10465         * pt-sigwait.c: Likewise.
10466         * pt-sigwaitinfo.c: Likewise.
10467         * pt-system.c: Likewise.
10468         * pt-tcdrain.c: Likewise.
10469         * pt-wait.c: Likewise.
10470         * pt-waitid.c: Likewise.
10471         * pt-waitpid.c: Likewise.
10472         * pt-write.c: Likewise.
10473         * pt-writev.c: Likewise.
10474         * pthread_join.c: Likewise.
10475         * pthread_timedjoin.c: Likewise.
10477         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
10478         (__xpg_sigpause): New function.
10479         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
10481 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
10483         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
10485         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
10486         _GI_pthread_cleanup_pop to pthreadP.h.
10488         * ftrylockfile.c: Use _IO_lock_trylock instead of
10489         pthread_mutex_trylock.
10491         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
10492         (CANCEL_RESET): Likewise.
10493         (__pthread_setcanceltype_): Declare.
10494         (__pthread_mutex_lock_internal): Declare.
10495         (__pthread_mutex_unlock_internal): Declare.
10496         (__pthread_once_internal): Declare.
10497         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
10498         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
10500         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
10501         and pthread_mutex_unlock.
10502         * pthread_cond_wait.c: Likewise.
10503         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
10504         * pthread_mutex_unlock.c: Likewise.
10506         * pthread_setcanceltype.c: Add additional alias
10507         __pthread_setcanceltype.
10509         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
10510         * sem_open.c (sem_open): Likewise.
10511         Use __libc_open, __libc_write, and __libc_close instead of
10512         open, write, and close respectively.
10514         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
10515         Rewrite as statement expression since it must return a value.
10517         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
10518         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
10519         __pthread_kill.
10521         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
10522         alias __pthread_once_internal.
10524         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
10526 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
10528         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
10529         * tst-stdio1.c: New file.
10530         * tst-stdio2.c: New file.
10532         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
10534         * Makefile (tests): Comment out tst-locale2 for now.
10535         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
10537         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
10538         -D_IO_MTSAFE_IO.
10539         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
10540         Use _IO_lock_init instead of explicit assignment.
10542         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
10543         Define __libc_lock_* and __libc_lock_recursive macros with
10544         lowlevellock macros, not pthread mutexes.
10546         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
10547         of pthread_mutex_lock.
10548         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
10549         instead of pthread_mutex_unlock.
10551 2002-12-06  Roland McGrath  <roland@redhat.com>
10553         * allocatestack.c (__stack_user): Use uninitialized defn.
10554         * init.c (__pthread_initialize_minimal): Initialize it here.
10556 2002-12-05  Roland McGrath  <roland@redhat.com>
10558         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
10559         string.
10560         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
10562         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
10563         missing & here too.
10565 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
10567         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10568         lowlevellock.
10569         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
10570         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
10571         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
10572         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
10573         for __libc_lock_* macros.
10574         * Makefile (routines): Add libc-lowlevellock.
10576 2002-10-09  Roland McGrath  <roland@redhat.com>
10578         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
10579         Under [__PIC__], call the function via the pointer fetched for
10580         comparison rather than a call by name that uses the PLT.
10581         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
10582         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
10583         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
10584         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
10585         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
10587 2002-12-04  Roland McGrath  <roland@redhat.com>
10589         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
10591         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
10592         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
10594         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
10596 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
10598         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
10599         a completely opaque, non-integer type.
10600         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
10602 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
10604         * sysdeps/i386/tls.h: Include stdlib.h.
10605         * sysdeps/x86_64/tls.h: Likewise.
10607 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
10609         * Makefile (tests): Add tst-locale2.
10610         (tests-static): Likewise.
10611         * tst-locale2.c: New file.
10613         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
10614         volatile and add memory clobbers to lock operations.
10616 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
10618         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
10619         * sysdeps/i386/i486/bits/atomic.h: New file.
10620         * sysdeps/i386/i586/bits/atomic.h: New file.
10621         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
10622         include i486 version.
10623         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
10624         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
10625         Patch by Marijn Ros <marijn@mad.scientist.com>.
10627         * allocatestack.c (get_cached_stack): Don't crash if we first
10628         found a stack with a larger size then needed.
10629         Reported by Hui Huang <hui.huang@sun.com>.
10631         * Makefile (tests): Add tst-sysconf.
10632         * tst-sysconf.c: New file.
10634         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
10635         PTHREAD_THREADS_MAX.
10637 2002-12-02  Roland McGrath  <roland@redhat.com>
10639         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
10640         Declare using hidden_proto instead of attribute_hidden, so there are
10641         non-.hidden static symbols for gdb to find.
10642         (__pthread_keys): Likewise.
10643         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
10644         * allocatestack.c (__stack_user): Likewise.
10645         * pthread_create.c (__pthread_keys): Likewise.
10646         (__nptl_threads_events, __nptl_last_event): Make these static instead
10647         of hidden.
10648         * pthread_key_create.c (__pthread_pthread_keys_max,
10649         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
10651 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
10653         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
10654         statically.
10655         * tst-locale1.c: New file.
10657         * pthread_cond_timedwait.c: Include <stdlib.h>.
10659         * Makefile (tests): Add tst-fork2 and tst-fork3.
10660         * tst-fork2.c: New file.
10661         * tst-fork3.c: New file.
10663 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
10665         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
10667         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
10668         require it to 200112L.
10670         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
10671         instruction only if HAVE_CMOV is defined.
10672         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
10674         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
10676         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
10678         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
10680         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
10682 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
10684         * sysdeps/x86_64/bits/atomic.h: New file.
10686         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
10687         16-bit operations.
10689         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
10690         possible since gettid cannot fail.
10692         * sysdeps/x86_64/pthreaddef.h: New file.
10694         * sysdeps/i386/pthreaddef.h (gettid): Removed.
10696         * sysdeps/x86_64/pthread_spin_init.c: New file.
10697         * sysdeps/x86_64/pthread_spin_lock.c: New file.
10698         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
10699         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
10701         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
10702         Add missing lock prefix.  Minute optimization.
10704         * tst-spin2.c (main): Also check successful trylock call.
10706         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
10707         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
10709         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
10710         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
10712         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
10713         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
10714         value in case of an error.  Add support for INTERNAL_SYSCALL.
10716         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
10717         value in case of an error.
10719         * sysdeps/x86_64/tls.h: New file.
10721 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10723         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
10724         takes the array member name and the index as parameters.
10725         (THREAD_SETMEM_NC): Likewise.
10726         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
10727         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
10728         interfaces.
10730         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
10731         to decide which code to use.
10732         (THREAD_SETMEM_NC): Likewise.
10734         * allocatestack.c (queue_stack): Don't remove stack from list here.
10735         Do it in the caller.  Correct condition to prematurely terminate
10736         loop to free stacks.
10737         (__deallocate_stack): Remove stack from list here.
10739 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10741         * Makefile (tests): Add tst-stack1.
10742         * tst-stack1.c: New file.
10744         * allocatestack.c (allocate_stack): Initialize the TCB on a user
10745         provided stack.
10747         * pthread_attr_getstack.c: Return bottom of the thread area.
10749 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
10751         * Makefile (libpthread-routines): Add pt-allocrtsig and
10752         pthread_kill_other_threads.
10753         * pt-allocrtsig.c: New file.
10754         * pthread_kill_other_threads.c: New file.
10755         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
10756         all three functions.
10757         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10758         allocrtsig.
10759         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
10760         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
10761         and __libc_allocate_rtsig_private.
10762         * Versions (libpthread): Export pthread_kill_other_threads_np,
10763         __libc_current_sigrtmin, and __libc_current_sigrtmax.
10765 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
10767         * allocatestack.c (allocate_stack): stackaddr in attribute points to
10768         the end of the stack.  Adjust computations.
10769         When mprotect call fails dequeue stack and free it.
10770         * pthread_attr_setstack.c: Store top of the stack in stackaddr
10771         attribute.
10772         * pthread_getattr_np.c: Likewise.
10774         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
10775         surprises.
10777 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
10779         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
10780         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
10782 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
10784         * pthread_getspecific.c: Optimize access to first 2nd-level array.
10785         * pthread_setspecific.c: Likewise.
10787 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
10789         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
10790         definitions.  Get them from the official place.
10791         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
10793         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
10794         Use new CLONE_ flags in clone() calls.
10796         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
10797         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
10799         * Versions: Add pthread_* functions for libc.
10800         * forward.c: New file.
10802         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
10803         errno-loc.
10804         * herrno.c: New file.
10805         * res.c: New file.
10807         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
10808         sem_trywait, and sem_timedwait.  Add herrno and res.
10809         * sem_init.c: Don't initialize lock and waiters members.
10810         * sem_open.c: Likewise.
10811         * sem_post.c: Removed.
10812         * sem_wait.c: Removed.
10813         * sem_trywait.c: Removed.
10814         * sem_timedwait.c: Removed.
10815         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
10816         Includes full implementations of sem_post, sem_wait, sem_trywait,
10817         and sem_timedwait.
10818         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
10819         for new implementation.
10820         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
10821         and waiters fields.
10823         * tst-sem3.c: Improve error message.
10824         * tst-signal3.c: Likewise.
10826         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
10827         to tell the kernel about the termination futex and to initialize tid
10828         member.  Don't initialize main_thread.
10829         * descr.h (struct pthread): Remove main_thread member.
10830         * cancelllation.c (__do_cancel): Remove code handling main thread.
10831         The main thread is not special anymore.
10833         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
10834         size of the stacks to stack_cache_actsize.
10836         * pt-readv.c: Add missing "defined".
10837         * pt-sigwait.c: Likewise.
10838         * pt-writev.c: Likewise.
10840 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
10842         * Versions: Export __connect from libpthread.
10843         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10845         * Makefile (libpthread-routines): Add pt-raise.
10846         * sysdeps/unix/sysv/linux/raise.c: New file.
10847         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
10848         * sysdeps/generic/pt-raise.c: New file.
10850         * pthread_cond_init.c: Initialize all data elements of the condvar
10851         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
10853         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
10854         * pthread_create.c: Likewise.
10856         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
10857         * tst-key1.c: New file.
10858         * tst-key2.c: New file.
10859         * tst-key3.c: New file.
10861         * Versions: Export pthread_detach for version GLIBC_2.0.
10862         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
10864 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
10866         * pthread_key_create.c: Terminate search after an unused key was found.
10867         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10869         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
10870         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10872 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
10874         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
10875         dynamic lookup for errno in PIC.
10877         * allocatestack.c (get_cached_stack): Rearrange code slightly to
10878         release the stack lock as soon as possible.
10879         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
10880         the static TLS block.
10881         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
10883         * cancellation.c: Renamed from cancelation.c.
10884         * Makefile: Adjust accordingly.
10885         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
10886         * cleanup_defer.c: Use CANCELLATION_P.
10887         * pthread_testcancel.c: Likewise.
10888         * descr.h: Fix spelling in comments.
10889         * init.c: Likewise.
10890         * pthread_getattr_np.c: Likewise.
10891         * pthread_getschedparam.c: Likewise.
10892         * pthread_setschedparam.c: Likewise.
10893         * Versions: Likewise.
10895         * pt-pselect.c: New file.
10896         * Makefile (libpthread-routines): Add pt-pselect.
10897         * Versions: Add pselect.
10899         * tst-cancel4.c: New file.
10900         * Makefile (tests): Add tst-cancel4.
10902 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
10904         * pthread_mutex_lock.c: Always record lock ownership.
10905         * pthread_mutex_timedlock.c: Likewise.
10906         * pthread_mutex_trylock.c: Likewise.
10908         * pt-readv.c: New file.
10909         * pt-writev.c: New file.
10910         * pt-creat.c: New file.
10911         * pt-msgrcv.c: New file.
10912         * pt-msgsnd.c: New file.
10913         * pt-poll.c: New file.
10914         * pt-select.c: New file.
10915         * pt-sigpause.c: New file.
10916         * pt-sigsuspend.c: New file.
10917         * pt-sigwait.c: New file.
10918         * pt-sigwaitinfo.c: New file.
10919         * pt-waitid.c: New file.
10920         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
10921         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
10922         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
10923         * Versions: Add all the new functions.
10925         * tst-exit1.c: New file.
10926         * Makefile (tests): Add tst-exit1.
10928         * sem_timedwait.c: Minor optimization for more optimal fastpath.
10930 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
10932         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
10934         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
10935         call.  pthread_join is an official cancellation point.
10936         * pthread_timedjoin.c: Likewise.
10938         * pthread_cond_wait.c: Revert order in which internal lock are dropped
10939         and the condvar's mutex are retrieved.
10940         * pthread_cond_timedwait.c: Likewise.
10941         Reported by dice@saros.East.Sun.COM.
10943 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
10945         * pthreadP.h: Cut out all type definitions and move them...
10946         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
10947         * pthreadP.h: Include <internaltypes.h>.
10949         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
10950         performance tweaks.
10952         * sem_trywait.c: Shuffle #includes around to get right order.
10953         * sem_timedwait.c: Likewise.
10954         * sem_post.c: Likewise.
10955         * sem_wait.c: Likewise.
10957         * nptl 0.3 released.
10959         * Makefile (tests): Add tst-signal3.
10960         * tst-signal3.c: New file.
10962 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
10964         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
10965         the asms modify the sem object.
10966         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
10968         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
10969         the actual members.
10970         * pthreadP.h (struct sem): New type.  Actual semaphore type.
10971         * semaphoreP.h: Include pthreadP.h.
10972         * sem_getvalue.c: Adjust to sem_t change.
10973         * sem_init.c: Likewise.
10974         * sem_open.c: Likewise.
10975         * sem_post.c: Likewise.
10976         * sem_timedwait.c: Likewise.
10977         * sem_trywait.c: Likewise.
10978         * sem_wait.c: Likewise.
10980 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
10982         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
10983         * tst-basic2.c: New file.
10984         * tst-exec1.c: New file.
10985         * tst-exec2.c: New file.
10986         * tst-exec3.c: New file.
10988         * tst-fork1.c: Remove extra */.
10990         * nptl 0.2 released.  The API for IA-32 is complete.